From 7cd066cf92d4238ecb17bdfe14167e86690dd56b Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Mon, 3 Oct 2022 00:13:42 -0600 Subject: [PATCH 1/2] update example schemas --- examples/stripe-openapi3.ts | 23847 ++++-- test/bin/expected/paths-enum.ts | 235 +- test/bin/expected/prettier-js.ts | 234 +- test/bin/expected/prettier-json.ts | 234 +- test/bin/expected/specs/no-response.ts | 21 + test/bin/expected/specs/petstore.ts | 234 +- test/bin/expected/stdin.ts | 234 +- test/bin/expected/stdout.ts | 234 +- test/bin/specs/petstore.yaml | 486 +- test/v2/specs/stripe.yaml | 2 +- test/v3/expected/github.additional.ts | 34727 ++++---- test/v3/expected/github.exported-type.ts | 29229 ++++--- test/v3/expected/github.immutable.ts | 29229 ++++--- .../expected/github.support-array-length.ts | 28855 +++---- test/v3/expected/github.ts | 29229 ++++--- test/v3/expected/petstore.additional.ts | 234 +- test/v3/expected/petstore.exported-type.ts | 234 +- test/v3/expected/petstore.immutable.ts | 234 +- .../expected/petstore.support-array-length.ts | 234 +- test/v3/expected/petstore.ts | 234 +- test/v3/expected/stripe.additional.ts | 28071 ++++-- test/v3/expected/stripe.exported-type.ts | 26336 ++++-- test/v3/expected/stripe.immutable.ts | 27108 ++++-- .../expected/stripe.support-array-length.ts | 26336 ++++-- test/v3/expected/stripe.ts | 26336 ++++-- test/v3/specs/github.yaml | 71180 ++++++++-------- test/v3/specs/petstore.yaml | 722 +- test/v3/specs/stripe.yaml | 66047 +++++++++----- 28 files changed, 269620 insertions(+), 180716 deletions(-) create mode 100644 test/bin/expected/specs/no-response.ts diff --git a/examples/stripe-openapi3.ts b/examples/stripe-openapi3.ts index d6f07bc3f..ea5d66585 100644 --- a/examples/stripe-openapi3.ts +++ b/examples/stripe-openapi3.ts @@ -4,14 +4,6 @@ */ 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"]; @@ -278,6 +270,20 @@ export interface paths { */ post: operations["PostApplicationFeesIdRefunds"]; }; + "/v1/apps/secrets": { + /**

List all secrets stored on the given scope.

*/ + get: operations["GetAppsSecrets"]; + /**

Create or replace a secret in the secret store.

*/ + post: operations["PostAppsSecrets"]; + }; + "/v1/apps/secrets/delete": { + /**

Deletes a secret from the secret store by name and scope.

*/ + post: operations["PostAppsSecretsDelete"]; + }; + "/v1/apps/secrets/find": { + /**

Finds a secret in the secret store by name and scope.

*/ + get: operations["GetAppsSecretsFind"]; + }; "/v1/balance": { /** *

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export interface paths { /**

Creates a session of the customer portal.

*/ post: operations["PostBillingPortalSessions"]; }; - "/v1/bitcoin/receivers": { - /**

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

*/ - get: operations["GetBitcoinReceivers"]; - }; - "/v1/bitcoin/receivers/{id}": { - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - get: operations["GetBitcoinReceiversId"]; - }; - "/v1/bitcoin/receivers/{receiver}/transactions": { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations["GetBitcoinReceiversReceiverTransactions"]; - }; - "/v1/bitcoin/transactions": { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations["GetBitcoinTransactions"]; - }; "/v1/charges": { /**

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

*/ get: operations["GetCharges"]; /**

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

*/ post: operations["PostCharges"]; }; + "/v1/charges/search": { + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetChargesSearch"]; + }; "/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"]; @@ -502,6 +501,15 @@ export interface paths { /**

Creates a new customer object.

*/ post: operations["PostCustomers"]; }; + "/v1/customers/search": { + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetCustomersSearch"]; + }; "/v1/customers/{customer}": { /**

Retrieves a Customer object.

*/ get: operations["GetCustomersCustomer"]; @@ -574,15 +582,41 @@ export interface paths { /**

Delete a specified source for a given customer.

*/ delete: operations["DeleteCustomersCustomerCardsId"]; }; + "/v1/customers/{customer}/cash_balance": { + /**

Retrieves a customer’s cash balance.

*/ + get: operations["GetCustomersCustomerCashBalance"]; + /**

Changes the settings on a customer’s cash balance.

*/ + post: operations["PostCustomersCustomerCashBalance"]; + }; + "/v1/customers/{customer}/cash_balance_transactions": { + /**

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

*/ + get: operations["GetCustomersCustomerCashBalanceTransactions"]; + }; + "/v1/customers/{customer}/cash_balance_transactions/{transaction}": { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + get: operations["GetCustomersCustomerCashBalanceTransactionsTransaction"]; + }; "/v1/customers/{customer}/discount": { get: operations["GetCustomersCustomerDiscount"]; /**

Removes the currently applied discount on a customer.

*/ delete: operations["DeleteCustomersCustomerDiscount"]; }; + "/v1/customers/{customer}/funding_instructions": { + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + post: operations["PostCustomersCustomerFundingInstructions"]; + }; "/v1/customers/{customer}/payment_methods": { /**

Returns a list of PaymentMethods for a given Customer

*/ get: operations["GetCustomersCustomerPaymentMethods"]; }; + "/v1/customers/{customer}/payment_methods/{payment_method}": { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + get: operations["GetCustomersCustomerPaymentMethodsPaymentMethod"]; + }; "/v1/customers/{customer}/sources": { /**

List sources for a specified customer.

*/ get: operations["GetCustomersCustomerSources"]; @@ -716,6 +750,34 @@ export interface paths { /**

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

Returns a list of Financial Connections Account objects.

*/ + get: operations["GetFinancialConnectionsAccounts"]; + }; + "/v1/financial_connections/accounts/{account}": { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations["GetFinancialConnectionsAccountsAccount"]; + }; + "/v1/financial_connections/accounts/{account}/disconnect": { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations["PostFinancialConnectionsAccountsAccountDisconnect"]; + }; + "/v1/financial_connections/accounts/{account}/owners": { + /**

Lists all owners for a given Account

*/ + get: operations["GetFinancialConnectionsAccountsAccountOwners"]; + }; + "/v1/financial_connections/accounts/{account}/refresh": { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations["PostFinancialConnectionsAccountsAccountRefresh"]; + }; + "/v1/financial_connections/sessions": { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations["PostFinancialConnectionsSessions"]; + }; + "/v1/financial_connections/sessions/{session}": { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations["GetFinancialConnectionsSessionsSession"]; + }; "/v1/identity/verification_reports": { /**

List all verification reports.

*/ get: operations["GetIdentityVerificationReports"]; @@ -803,9 +865,18 @@ export interface paths { "/v1/invoices": { /**

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

*/ get: operations["GetInvoices"]; - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ post: operations["PostInvoices"]; }; + "/v1/invoices/search": { + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetInvoicesSearch"]; + }; "/v1/invoices/upcoming": { /** *

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

@@ -863,18 +934,6 @@ export interface paths { /**

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"]; @@ -953,22 +1012,42 @@ export interface paths { /**

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations["PostLinkAccountSessions"]; + }; + "/v1/link_account_sessions/{session}": { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations["GetLinkAccountSessionsSession"]; + }; + "/v1/linked_accounts": { + /**

Returns a list of Financial Connections Account objects.

*/ + get: operations["GetLinkedAccounts"]; + }; + "/v1/linked_accounts/{account}": { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations["GetLinkedAccountsAccount"]; + }; + "/v1/linked_accounts/{account}/disconnect": { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations["PostLinkedAccountsAccountDisconnect"]; + }; + "/v1/linked_accounts/{account}/owners": { + /**

Lists all owners for a given Account

*/ + get: operations["GetLinkedAccountsAccountOwners"]; + }; + "/v1/linked_accounts/{account}/refresh": { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations["PostLinkedAccountsAccountRefresh"]; + }; "/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.

*/ + /**

Creates a new open order object.

*/ post: operations["PostOrders"]; }; "/v1/orders/{id}": { @@ -977,13 +1056,21 @@ export interface paths { /**

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

Cancels the order as well as the payment intent if one is attached.

*/ + post: operations["PostOrdersIdCancel"]; + }; + "/v1/orders/{id}/line_items": { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations["GetOrdersIdLineItems"]; + }; + "/v1/orders/{id}/reopen": { + /**

Reopens a submitted order.

*/ + post: operations["PostOrdersIdReopen"]; }; - "/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/orders/{id}/submit": { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + post: operations["PostOrdersIdSubmit"]; }; "/v1/payment_intents": { /**

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export interface paths { */ post: operations["PostPaymentIntents"]; }; + "/v1/payment_intents/search": { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetPaymentIntentsSearch"]; + }; "/v1/payment_intents/{intent}": { /** *

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

@@ -1022,11 +1118,17 @@ export interface paths { */ post: operations["PostPaymentIntentsIntent"]; }; + "/v1/payment_intents/{intent}/apply_customer_balance": { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + post: operations["PostPaymentIntentsIntentApplyCustomerBalance"]; + }; "/v1/payment_intents/{intent}/cancel": { /** *

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

* - *

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

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ post: operations["PostPaymentIntentsIntentCancel"]; }; @@ -1070,6 +1172,35 @@ export interface paths { */ post: operations["PostPaymentIntentsIntentConfirm"]; }; + "/v1/payment_intents/{intent}/increment_authorization": { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + post: operations["PostPaymentIntentsIntentIncrementAuthorization"]; + }; "/v1/payment_intents/{intent}/verify_microdeposits": { /**

Verifies microdeposits on a PaymentIntent object.

*/ post: operations["PostPaymentIntentsIntentVerifyMicrodeposits"]; @@ -1091,7 +1222,7 @@ export interface paths { get: operations["GetPaymentLinksPaymentLinkLineItems"]; }; "/v1/payment_methods": { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ get: operations["GetPaymentMethods"]; /** *

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

@@ -1101,7 +1232,7 @@ export interface paths { post: operations["PostPaymentMethods"]; }; "/v1/payment_methods/{payment_method}": { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ get: operations["GetPaymentMethodsPaymentMethod"]; /**

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

*/ post: operations["PostPaymentMethodsPaymentMethod"]; @@ -1112,9 +1243,11 @@ export interface paths { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export interface paths { post: operations["PostPaymentMethodsPaymentMethodAttach"]; }; "/v1/payment_methods/{payment_method}/detach": { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ post: operations["PostPaymentMethodsPaymentMethodDetach"]; }; "/v1/payouts": { @@ -1176,6 +1309,15 @@ export interface paths { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ post: operations["PostPrices"]; }; + "/v1/prices/search": { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetPricesSearch"]; + }; "/v1/prices/{price}": { /**

Retrieves the price with the given ID.

*/ get: operations["GetPricesPrice"]; @@ -1188,6 +1330,15 @@ export interface paths { /**

Creates a new product object.

*/ post: operations["PostProducts"]; }; + "/v1/products/search": { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetProductsSearch"]; + }; "/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"]; @@ -1282,29 +1433,6 @@ export interface paths { /**

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"]; @@ -1321,6 +1449,14 @@ export interface paths { */ post: operations["PostRefundsRefund"]; }; + "/v1/refunds/{refund}/cancel": { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + post: operations["PostRefundsRefundCancel"]; + }; "/v1/reporting/report_runs": { /**

Returns a list of Report Runs, with the most recent appearing first.

*/ get: operations["GetReportingReportRuns"]; @@ -1533,9 +1669,26 @@ export interface paths { "/v1/subscriptions": { /**

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

*/ get: operations["GetSubscriptions"]; - /**

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

*/ + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ post: operations["PostSubscriptions"]; }; + "/v1/subscriptions/search": { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations["GetSubscriptionsSearch"]; + }; "/v1/subscriptions/{subscription_exposed_id}": { /**

Retrieves the subscription with the given ID.

*/ get: operations["GetSubscriptionsSubscriptionExposedId"]; @@ -1555,7 +1708,7 @@ export interface paths { delete: operations["DeleteSubscriptionsSubscriptionExposedIdDiscount"]; }; "/v1/tax_codes": { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ get: operations["GetTaxCodes"]; }; "/v1/tax_codes/{id}": { @@ -1574,6 +1727,20 @@ export interface paths { /**

Updates an existing tax rate.

*/ post: operations["PostTaxRatesTaxRate"]; }; + "/v1/terminal/configurations": { + /**

Returns a list of Configuration objects.

*/ + get: operations["GetTerminalConfigurations"]; + /**

Creates a new Configuration object.

*/ + post: operations["PostTerminalConfigurations"]; + }; + "/v1/terminal/configurations/{configuration}": { + /**

Retrieves a Configuration object.

*/ + get: operations["GetTerminalConfigurationsConfiguration"]; + /**

Updates a new Configuration object.

*/ + post: operations["PostTerminalConfigurationsConfiguration"]; + /**

Deletes a Configuration object.

*/ + delete: operations["DeleteTerminalConfigurationsConfiguration"]; + }; "/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"]; @@ -1609,6 +1776,110 @@ export interface paths { /**

Deletes a Reader object.

*/ delete: operations["DeleteTerminalReadersReader"]; }; + "/v1/terminal/readers/{reader}/cancel_action": { + /**

Cancels the current reader action.

*/ + post: operations["PostTerminalReadersReaderCancelAction"]; + }; + "/v1/terminal/readers/{reader}/process_payment_intent": { + /**

Initiates a payment flow on a Reader.

*/ + post: operations["PostTerminalReadersReaderProcessPaymentIntent"]; + }; + "/v1/terminal/readers/{reader}/process_setup_intent": { + /**

Initiates a setup intent flow on a Reader.

*/ + post: operations["PostTerminalReadersReaderProcessSetupIntent"]; + }; + "/v1/terminal/readers/{reader}/set_reader_display": { + /**

Sets reader display to show cart details.

*/ + post: operations["PostTerminalReadersReaderSetReaderDisplay"]; + }; + "/v1/test_helpers/customers/{customer}/fund_cash_balance": { + /**

Create an incoming testmode bank transfer

*/ + post: operations["PostTestHelpersCustomersCustomerFundCashBalance"]; + }; + "/v1/test_helpers/issuing/cards/{card}/shipping/deliver": { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + post: operations["PostTestHelpersIssuingCardsCardShippingDeliver"]; + }; + "/v1/test_helpers/issuing/cards/{card}/shipping/fail": { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + post: operations["PostTestHelpersIssuingCardsCardShippingFail"]; + }; + "/v1/test_helpers/issuing/cards/{card}/shipping/return": { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + post: operations["PostTestHelpersIssuingCardsCardShippingReturn"]; + }; + "/v1/test_helpers/issuing/cards/{card}/shipping/ship": { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + post: operations["PostTestHelpersIssuingCardsCardShippingShip"]; + }; + "/v1/test_helpers/refunds/{refund}/expire": { + /**

Expire a refund with a status of requires_action.

*/ + post: operations["PostTestHelpersRefundsRefundExpire"]; + }; + "/v1/test_helpers/terminal/readers/{reader}/present_payment_method": { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + post: operations["PostTestHelpersTerminalReadersReaderPresentPaymentMethod"]; + }; + "/v1/test_helpers/test_clocks": { + /**

Returns a list of your test clocks.

*/ + get: operations["GetTestHelpersTestClocks"]; + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + post: operations["PostTestHelpersTestClocks"]; + }; + "/v1/test_helpers/test_clocks/{test_clock}": { + /**

Retrieves a test clock.

*/ + get: operations["GetTestHelpersTestClocksTestClock"]; + /**

Deletes a test clock.

*/ + delete: operations["DeleteTestHelpersTestClocksTestClock"]; + }; + "/v1/test_helpers/test_clocks/{test_clock}/advance": { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + post: operations["PostTestHelpersTestClocksTestClockAdvance"]; + }; + "/v1/test_helpers/treasury/inbound_transfers/{id}/fail": { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryInboundTransfersIdFail"]; + }; + "/v1/test_helpers/treasury/inbound_transfers/{id}/return": { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + post: operations["PostTestHelpersTreasuryInboundTransfersIdReturn"]; + }; + "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed": { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryInboundTransfersIdSucceed"]; + }; + "/v1/test_helpers/treasury/outbound_payments/{id}/fail": { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundPaymentsIdFail"]; + }; + "/v1/test_helpers/treasury/outbound_payments/{id}/post": { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundPaymentsIdPost"]; + }; + "/v1/test_helpers/treasury/outbound_payments/{id}/return": { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundPaymentsIdReturn"]; + }; + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail": { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail"]; + }; + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post": { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost"]; + }; + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return": { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + post: operations["PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn"]; + }; + "/v1/test_helpers/treasury/received_credits": { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + post: operations["PostTestHelpersTreasuryReceivedCredits"]; + }; + "/v1/test_helpers/treasury/received_debits": { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + post: operations["PostTestHelpersTreasuryReceivedDebits"]; + }; "/v1/tokens": { /** *

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export interface paths { */ post: operations["PostTransfersTransferReversalsId"]; }; + "/v1/treasury/credit_reversals": { + /**

Returns a list of CreditReversals.

*/ + get: operations["GetTreasuryCreditReversals"]; + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + post: operations["PostTreasuryCreditReversals"]; + }; + "/v1/treasury/credit_reversals/{credit_reversal}": { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + get: operations["GetTreasuryCreditReversalsCreditReversal"]; + }; + "/v1/treasury/debit_reversals": { + /**

Returns a list of DebitReversals.

*/ + get: operations["GetTreasuryDebitReversals"]; + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + post: operations["PostTreasuryDebitReversals"]; + }; + "/v1/treasury/debit_reversals/{debit_reversal}": { + /**

Retrieves a DebitReversal object.

*/ + get: operations["GetTreasuryDebitReversalsDebitReversal"]; + }; + "/v1/treasury/financial_accounts": { + /**

Returns a list of FinancialAccounts.

*/ + get: operations["GetTreasuryFinancialAccounts"]; + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + post: operations["PostTreasuryFinancialAccounts"]; + }; + "/v1/treasury/financial_accounts/{financial_account}": { + /**

Retrieves the details of a FinancialAccount.

*/ + get: operations["GetTreasuryFinancialAccountsFinancialAccount"]; + /**

Updates the details of a FinancialAccount.

*/ + post: operations["PostTreasuryFinancialAccountsFinancialAccount"]; + }; + "/v1/treasury/financial_accounts/{financial_account}/features": { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + get: operations["GetTreasuryFinancialAccountsFinancialAccountFeatures"]; + /**

Updates the Features associated with a FinancialAccount.

*/ + post: operations["PostTreasuryFinancialAccountsFinancialAccountFeatures"]; + }; + "/v1/treasury/inbound_transfers": { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + get: operations["GetTreasuryInboundTransfers"]; + /**

Creates an InboundTransfer.

*/ + post: operations["PostTreasuryInboundTransfers"]; + }; + "/v1/treasury/inbound_transfers/{id}": { + /**

Retrieves the details of an existing InboundTransfer.

*/ + get: operations["GetTreasuryInboundTransfersId"]; + }; + "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel": { + /**

Cancels an InboundTransfer.

*/ + post: operations["PostTreasuryInboundTransfersInboundTransferCancel"]; + }; + "/v1/treasury/outbound_payments": { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + get: operations["GetTreasuryOutboundPayments"]; + /**

Creates an OutboundPayment.

*/ + post: operations["PostTreasuryOutboundPayments"]; + }; + "/v1/treasury/outbound_payments/{id}": { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + get: operations["GetTreasuryOutboundPaymentsId"]; + }; + "/v1/treasury/outbound_payments/{id}/cancel": { + /**

Cancel an OutboundPayment.

*/ + post: operations["PostTreasuryOutboundPaymentsIdCancel"]; + }; + "/v1/treasury/outbound_transfers": { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + get: operations["GetTreasuryOutboundTransfers"]; + /**

Creates an OutboundTransfer.

*/ + post: operations["PostTreasuryOutboundTransfers"]; + }; + "/v1/treasury/outbound_transfers/{outbound_transfer}": { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + get: operations["GetTreasuryOutboundTransfersOutboundTransfer"]; + }; + "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel": { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + post: operations["PostTreasuryOutboundTransfersOutboundTransferCancel"]; + }; + "/v1/treasury/received_credits": { + /**

Returns a list of ReceivedCredits.

*/ + get: operations["GetTreasuryReceivedCredits"]; + }; + "/v1/treasury/received_credits/{id}": { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + get: operations["GetTreasuryReceivedCreditsId"]; + }; + "/v1/treasury/received_debits": { + /**

Returns a list of ReceivedDebits.

*/ + get: operations["GetTreasuryReceivedDebits"]; + }; + "/v1/treasury/received_debits/{id}": { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + get: operations["GetTreasuryReceivedDebitsId"]; + }; + "/v1/treasury/transaction_entries": { + /**

Retrieves a list of TransactionEntry objects.

*/ + get: operations["GetTreasuryTransactionEntries"]; + }; + "/v1/treasury/transaction_entries/{id}": { + /**

Retrieves a TransactionEntry object.

*/ + get: operations["GetTreasuryTransactionEntriesId"]; + }; + "/v1/treasury/transactions": { + /**

Retrieves a list of Transaction objects.

*/ + get: operations["GetTreasuryTransactions"]; + }; + "/v1/treasury/transactions/{id}": { + /**

Retrieves the details of an existing Transaction.

*/ + get: operations["GetTreasuryTransactionsId"]; + }; "/v1/webhook_endpoints": { /**

Returns a list of your webhook endpoints.

*/ get: operations["GetWebhookEndpoints"]; @@ -1703,9 +2086,9 @@ export interface components { */ account: { /** @description Business information about the account. */ - business_profile?: Partial< - components["schemas"]["account_business_profile"] - > | null; + business_profile?: + | components["schemas"]["account_business_profile"] + | null; /** * @description The business type. * @enum {string|null} @@ -1722,7 +2105,7 @@ export interface components { country?: string; /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ created?: number; /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1737,8 +2120,10 @@ export interface components { */ external_accounts?: { /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; + data: ( + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + )[]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -1764,7 +2149,7 @@ export interface components { payouts_enabled?: boolean; requirements?: components["schemas"]["account_requirements"]; /** @description Options for customizing how the account functions within Stripe. */ - settings?: Partial | null; + settings?: components["schemas"]["account_settings"] | null; tos_acceptance?: components["schemas"]["account_tos_acceptance"]; /** * @description The Stripe account type. Can be `standard`, `express`, or `custom`. @@ -1780,9 +2165,9 @@ export interface components { /** AccountBrandingSettings */ account_branding_settings: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. */ - icon?: (Partial & Partial) | null; + icon?: (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. */ - logo?: (Partial & Partial) | null; + logo?: (string | components["schemas"]["file"]) | null; /** @description A CSS hex color value representing the primary branding color for this account */ primary_color?: string | null; /** @description A CSS hex color value representing the secondary branding color for this account */ @@ -1797,7 +2182,7 @@ export interface components { /** @description Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. */ product_description?: string | null; /** @description A publicly available mailing address for sending support issues to. */ - support_address?: Partial | null; + support_address?: components["schemas"]["address"] | null; /** @description A publicly available email address for sending support issues to. */ support_email?: string | null; /** @description A publicly available phone number to call with support issues. */ @@ -1814,6 +2199,11 @@ export interface components { * @enum {string} */ acss_debit_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + affirm_payments?: "active" | "inactive" | "pending"; /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1834,6 +2224,16 @@ export interface components { * @enum {string} */ bancontact_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + bank_transfer_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + blik_payments?: "active" | "inactive" | "pending"; /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1889,11 +2289,21 @@ export interface components { * @enum {string} */ klarna_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + konbini_payments?: "active" | "inactive" | "pending"; /** * @description The status of the legacy payments capability of the account. * @enum {string} */ legacy_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + link_payments?: "active" | "inactive" | "pending"; /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1904,6 +2314,16 @@ export interface components { * @enum {string} */ p24_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + paynow_payments?: "active" | "inactive" | "pending"; + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + promptpay_payments?: "active" | "inactive" | "pending"; /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1929,6 +2349,16 @@ export interface components { * @enum {string} */ transfers?: "active" | "inactive" | "pending"; + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + treasury?: "active" | "inactive" | "pending"; + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + us_bank_account_ach_payments?: "active" | "inactive" | "pending"; }; /** AccountCapabilityFutureRequirements */ account_capability_future_requirements: { @@ -1995,6 +2425,10 @@ export interface components { decline_on?: components["schemas"]["account_decline_charge_on"]; /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ statement_descriptor_prefix?: string | null; + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null; + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null; }; /** AccountDashboardSettings */ account_dashboard_settings: { @@ -2068,6 +2502,10 @@ export interface components { statement_descriptor_kana?: string | null; /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ statement_descriptor_kanji?: string | null; + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null; + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null; }; /** AccountPayoutSettings */ account_payout_settings: { @@ -2117,6 +2555,7 @@ export interface components { code: | "invalid_address_city_state_postal_code" | "invalid_street_address" + | "invalid_tos_acceptance" | "invalid_value_other" | "verification_document_address_mismatch" | "verification_document_address_missing" @@ -2180,6 +2619,16 @@ export interface components { payments: components["schemas"]["account_payments_settings"]; payouts?: components["schemas"]["account_payout_settings"]; sepa_debit_payments?: components["schemas"]["account_sepa_debit_payments_settings"]; + treasury?: components["schemas"]["account_treasury_settings"]; + }; + /** AccountTermsOfService */ + account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null; + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null; + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string; }; /** AccountTOSAcceptance */ account_tos_acceptance: { @@ -2195,6 +2644,10 @@ export interface components { /** @description The user agent of the browser from which the account representative accepted their service agreement */ user_agent?: string | null; }; + /** AccountTreasurySettings */ + account_treasury_settings: { + tos_acceptance?: components["schemas"]["account_terms_of_service"]; + }; /** AccountUnificationAccountController */ account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2220,43 +2673,6 @@ export interface components { /** @description State, county, province, or region. */ state?: string | null; }; - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number; - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: - | (Partial & - Partial & - Partial) - | null; - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string; - /** @description Unique identifier for the object. */ - id: string; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string }; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "alipay_account"; - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null; - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null; - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean; - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean; - /** @description The username for the Alipay account. */ - username: string; - }; /** APIErrors */ api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2277,9 +2693,10 @@ export interface components { payment_method_type?: string; setup_intent?: components["schemas"]["setup_intent"]; /** @description The source object for errors returned on a request involving a source. */ - source?: Partial & - Partial & - Partial; + source?: + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"]; /** * @description The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` * @enum {string} @@ -2323,21 +2740,19 @@ export interface components { /** PlatformFee */ application_fee: { /** @description ID of the Stripe account this fee was taken from. */ - account: Partial & Partial; + account: string | components["schemas"]["account"]; /** @description Amount earned, in %s. */ amount: number; /** @description Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued) */ amount_refunded: number; /** @description ID of the Connect application that earned the fee. */ - application: Partial & - Partial; + application: string | components["schemas"]["application"]; /** @description Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** @description ID of the charge that the application fee was taken from. */ - charge: Partial & Partial; + charge: string | components["schemas"]["charge"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -2356,7 +2771,7 @@ export interface components { object: "application_fee"; /** @description ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. */ originating_transaction?: - | (Partial & Partial) + | (string | components["schemas"]["charge"]) | null; /** @description Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. */ refunded: boolean; @@ -2378,9 +2793,49 @@ export interface components { url: string; }; }; + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + "apps.secret": { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description If true, indicates that this secret has been deleted */ + deleted?: boolean; + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description A name for the secret that's unique within the scope. */ + name: string; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "apps.secret"; + /** @description The plaintext secret value to be stored. */ + payload?: string | null; + scope: components["schemas"]["secret_service_resource_scope"]; + }; /** AutomaticTax */ automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ enabled: boolean; /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2485,23 +2940,25 @@ export interface components { reporting_category: string; /** @description 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 & - Partial) + | ( + | string + | components["schemas"]["application_fee"] + | components["schemas"]["charge"] + | components["schemas"]["connect_collection_transfer"] + | components["schemas"]["dispute"] + | components["schemas"]["fee_refund"] + | components["schemas"]["issuing.authorization"] + | components["schemas"]["issuing.dispute"] + | components["schemas"]["issuing.transaction"] + | components["schemas"]["payout"] + | components["schemas"]["platform_tax_fee"] + | components["schemas"]["refund"] + | components["schemas"]["reserve_transaction"] + | components["schemas"]["tax_deducted_at_source"] + | components["schemas"]["topup"] + | components["schemas"]["transfer"] + | components["schemas"]["transfer_reversal"] + ) | null; /** @description If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. */ status: string; @@ -2555,9 +3012,7 @@ export interface components { */ bank_account: { /** @description The ID of the account that the bank account is associated with. */ - account?: - | (Partial & Partial) - | null; + account?: (string | components["schemas"]["account"]) | null; /** @description The name of the person or business that owns the bank account. */ account_holder_name?: string | null; /** @description The type of entity that holds the account. This can be either `individual` or `company`. */ @@ -2574,9 +3029,11 @@ export interface components { currency: string; /** @description The ID of the customer that the bank account is associated with. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description Whether this bank account is the default external account for its currency. */ default_for_currency?: boolean | null; @@ -2602,10 +3059,98 @@ export interface components { */ status: string; }; + /** BankConnectionsResourceAccountholder */ + bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account?: string | components["schemas"]["account"]; + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer?: string | components["schemas"]["customer"]; + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + type: "account" | "customer"; + }; + /** BankConnectionsResourceBalance */ + bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + as_of: number; + cash?: components["schemas"]["bank_connections_resource_balance_api_resource_cash_balance"]; + credit?: components["schemas"]["bank_connections_resource_balance_api_resource_credit_balance"]; + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + current: { [key: string]: number }; + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + type: "cash" | "credit"; + }; + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + available?: { [key: string]: number } | null; + }; + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + used?: { [key: string]: number } | null; + }; + /** BankConnectionsResourceBalanceRefresh */ + bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number; + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: "failed" | "pending" | "succeeded"; + }; + /** BankConnectionsResourceLinkAccountSessionFilters */ + bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + countries?: string[] | null; + }; + /** BankConnectionsResourceOwnershipRefresh */ + bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number; + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: "failed" | "pending" | "succeeded"; + }; /** billing_details */ billing_details: { /** @description Billing address. */ - address?: Partial | null; + address?: components["schemas"]["address"] | null; /** @description Email address. */ email?: string | null; /** @description Full name. */ @@ -2621,7 +3166,13 @@ export interface components { /** @description Whether the configuration is active and can be used to create portal sessions. */ active: boolean; /** @description ID of the Connect Application that created the configuration. */ - application?: string | null; + application?: + | ( + | string + | components["schemas"]["application"] + | components["schemas"]["deleted_application"] + ) + | null; business_profile: components["schemas"]["portal_business_profile"]; /** * Format: unix-time @@ -2637,6 +3188,7 @@ export interface components { is_default: boolean; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; + login_page: components["schemas"]["portal_login_page"]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null; /** @@ -2669,8 +3221,9 @@ export interface components { */ "billing_portal.session": { /** @description The configuration used by this session, describing the features available. */ - configuration: Partial & - Partial; + configuration: + | string + | components["schemas"]["billing_portal.configuration"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -2745,101 +3298,10 @@ export interface components { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ on_behalf_of?: string | null; /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string; + return_url?: string | null; /** @description The short-lived URL of the session that gives customers access to the customer portal. */ url: string; }; - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean; - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number; - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number; - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number; - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number; - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string; - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number; - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string; - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null; - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null; - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean; - /** @description Unique identifier for the object. */ - id: string; - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "bitcoin_receiver"; - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null; - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null; - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components["schemas"]["bitcoin_transaction"][]; - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: "list"; - /** @description The URL where this list can be accessed. */ - url: string; - }; - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean; - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null; - }; - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number; - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number; - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number; - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string; - /** @description Unique identifier for the object. */ - id: string; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "bitcoin_transaction"; - /** @description The receiver to which this transaction was sent. */ - receiver: string; - }; /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2848,7 +3310,7 @@ export interface components { */ capability: { /** @description The account for which the capability enables functionality. */ - account: Partial & Partial; + account: string | components["schemas"]["account"]; future_requirements?: components["schemas"]["account_capability_future_requirements"]; /** @description The identifier for the capability. */ id: string; @@ -2881,9 +3343,7 @@ export interface components { */ card: { /** @description The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. */ - account?: - | (Partial & Partial) - | null; + account?: (string | components["schemas"]["account"]) | null; /** @description City/District/Suburb/Town/Village. */ address_city?: string | null; /** @description Billing address country, if provided when creating card. */ @@ -2910,9 +3370,11 @@ export interface components { currency?: string | null; /** @description The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). */ cvc_check?: string | null; @@ -2945,10 +3407,8 @@ export interface components { * @enum {string} */ object: "card"; - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: - | (Partial & Partial) - | null; + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + status?: string | null; /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ tokenization_method?: string | null; }; @@ -2969,6 +3429,24 @@ export interface components { }; /** card_mandate_payment_method_details */ card_mandate_payment_method_details: { [key: string]: unknown }; + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + available?: { [key: string]: number } | null; + /** @description The ID of the customer whose cash balance this object represents. */ + customer: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "cash_balance"; + settings: components["schemas"]["customer_balance_customer_balance_settings"]; + }; /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2985,19 +3463,16 @@ export interface components { /** @description Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued). */ amount_refunded: number; /** @description ID of the Connect application that created the charge. */ - application?: - | (Partial & Partial) - | null; + application?: (string | components["schemas"]["application"]) | null; /** @description The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ application_fee?: - | (Partial & Partial) + | (string | components["schemas"]["application_fee"]) | null; /** @description The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees) for details. */ application_fee_amount?: number | null; /** @description ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; billing_details: components["schemas"]["billing_details"]; /** @description The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. */ @@ -3013,28 +3488,30 @@ export interface components { currency: string; /** @description ID of the customer this charge is for if one exists. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** @description Whether the charge has been disputed. */ disputed: boolean; + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction?: + | (string | components["schemas"]["balance_transaction"]) + | null; /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ failure_code?: string | null; /** @description Message to user further explaining reason for charge failure if available. */ failure_message?: string | null; /** @description Information on fraud assessments for the charge. */ - fraud_details?: Partial< - components["schemas"]["charge_fraud_details"] - > | null; + fraud_details?: components["schemas"]["charge_fraud_details"] | null; /** @description Unique identifier for the object. */ id: string; /** @description ID of the invoice this charge is for if one exists. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (string | components["schemas"]["invoice"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3045,27 +3522,22 @@ export interface components { */ object: "charge"; /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ - on_behalf_of?: - | (Partial & Partial) - | null; - /** @description ID of the order this charge is for if one exists. */ - order?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ - outcome?: Partial | null; + outcome?: components["schemas"]["charge_outcome"] | null; /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ paid: boolean; /** @description ID of the PaymentIntent associated with this charge, if one exists. */ payment_intent?: - | (Partial & Partial) + | (string | components["schemas"]["payment_intent"]) | null; /** @description ID of the payment method used in this charge. */ payment_method?: string | null; /** @description Details about the payment method at the time of the transaction. */ - payment_method_details?: Partial< - components["schemas"]["payment_method_details"] - > | null; + payment_method_details?: + | components["schemas"]["payment_method_details"] + | null; + radar_options?: components["schemas"]["radar_radar_options"]; /** @description This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null; /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3078,7 +3550,7 @@ export interface components { * RefundList * @description A list of refunds that have been applied to the charge. */ - refunds: { + refunds?: { /** @description Details about each object. */ data: components["schemas"]["refund"][]; /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3092,15 +3564,11 @@ export interface components { url: string; }; /** @description ID of the review associated with this charge if one exists. */ - review?: - | (Partial & Partial) - | null; + review?: (string | components["schemas"]["review"]) | null; /** @description Shipping information for the charge. */ - shipping?: Partial | null; + shipping?: components["schemas"]["shipping"] | null; /** @description The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ - source_transfer?: - | (Partial & Partial) - | null; + source_transfer?: (string | components["schemas"]["transfer"]) | null; /** @description For card charges, use `statement_descriptor_suffix` instead. Otherwise, you can use this value as the complete description of a charge on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ statement_descriptor?: string | null; /** @description Provides information about the charge that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ @@ -3111,11 +3579,9 @@ export interface components { */ status: "failed" | "pending" | "succeeded"; /** @description ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). */ - transfer?: Partial & Partial; + transfer?: string | components["schemas"]["transfer"]; /** @description An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. */ - transfer_data?: Partial< - components["schemas"]["charge_transfer_data"] - > | null; + transfer_data?: components["schemas"]["charge_transfer_data"] | null; /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null; }; @@ -3137,7 +3603,7 @@ export interface components { /** @description Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. */ risk_score?: number; /** @description The ID of the Radar rule that matched the payment, if applicable. */ - rule?: Partial & Partial; + rule?: string | components["schemas"]["rule"]; /** @description A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. */ seller_message?: string | null; /** @description Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. */ @@ -3148,7 +3614,7 @@ export interface components { /** @description The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. */ amount?: number | null; /** @description ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** * Session @@ -3165,13 +3631,13 @@ export interface components { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ "checkout.session": { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ - after_expiration?: Partial< - components["schemas"]["payment_pages_checkout_session_after_expiration"] - > | null; + after_expiration?: + | components["schemas"]["payment_pages_checkout_session_after_expiration"] + | null; /** @description Enables user redeemable promotion codes. */ allow_promotion_codes?: boolean | null; /** @description Total of all items before discounts or taxes are applied. */ @@ -3193,13 +3659,18 @@ export interface components { */ client_reference_id?: string | null; /** @description Results of `consent_collection` for this session. */ - consent?: Partial< - components["schemas"]["payment_pages_checkout_session_consent"] - > | null; + consent?: + | components["schemas"]["payment_pages_checkout_session_consent"] + | null; /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ - consent_collection?: Partial< - components["schemas"]["payment_pages_checkout_session_consent_collection"] - > | null; + consent_collection?: + | components["schemas"]["payment_pages_checkout_session_consent_collection"] + | null; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null; /** @@ -3210,19 +3681,21 @@ export interface components { * the Session was created. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** * @description Configure whether a Checkout Session creates a Customer when the Checkout Session completes. * @enum {string|null} */ customer_creation?: ("always" | "if_required") | null; - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ - customer_details?: Partial< - components["schemas"]["payment_pages_checkout_session_customer_details"] - > | null; + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ + customer_details?: + | components["schemas"]["payment_pages_checkout_session_customer_details"] + | null; /** * @description If provided, this value will be used when the Customer object is created. * If not provided, customers will be asked to enter their email address. @@ -3323,16 +3796,19 @@ export interface components { object: "checkout.session"; /** @description The ID of the PaymentIntent for Checkout Sessions in `payment` mode. */ payment_intent?: - | (Partial & Partial) + | (string | components["schemas"]["payment_intent"]) | null; /** @description The ID of the Payment Link that created this Session. */ - payment_link?: - | (Partial & Partial) - | null; + payment_link?: (string | components["schemas"]["payment_link"]) | null; + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + payment_method_collection?: ("always" | "if_required") | null; /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ - payment_method_options?: Partial< - components["schemas"]["checkout_session_payment_method_options"] - > | null; + payment_method_options?: + | components["schemas"]["checkout_session_payment_method_options"] + | null; /** * @description A list of the types of payment methods (e.g. card) this Checkout * Session is allowed to accept. @@ -3348,21 +3824,19 @@ export interface components { /** @description The ID of the original expired Checkout Session that triggered the recovery flow. */ recovered_from?: string | null; /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ - setup_intent?: - | (Partial & Partial) + setup_intent?: (string | components["schemas"]["setup_intent"]) | null; + /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ + shipping_address_collection?: + | components["schemas"]["payment_pages_checkout_session_shipping_address_collection"] + | null; + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: + | components["schemas"]["payment_pages_checkout_session_shipping_cost"] | null; /** @description Shipping information for this Checkout Session. */ - shipping?: Partial | null; - /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ - shipping_address_collection?: Partial< - components["schemas"]["payment_pages_checkout_session_shipping_address_collection"] - > | null; + shipping_details?: components["schemas"]["shipping"] | null; /** @description The shipping rate options applied to this Session. */ shipping_options: components["schemas"]["payment_pages_checkout_session_shipping_option"][]; - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: - | (Partial & Partial) - | null; /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3377,9 +3851,7 @@ export interface components { */ submit_type?: ("auto" | "book" | "donate" | "pay") | null; /** @description The ID of the subscription for Checkout Sessions in `subscription` mode. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (string | components["schemas"]["subscription"]) | null; /** * @description The URL the customer will be directed to after the payment or * subscription creation is successful. @@ -3387,10 +3859,13 @@ export interface components { success_url: string; tax_id_collection?: components["schemas"]["payment_pages_checkout_session_tax_id_collection"]; /** @description Tax and discount details for the computed total amount. */ - total_details?: Partial< - components["schemas"]["payment_pages_checkout_session_total_details"] - > | null; - /** @description The URL to the Checkout Session. */ + total_details?: + | components["schemas"]["payment_pages_checkout_session_total_details"] + | null; + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ url?: string | null; }; /** CheckoutAcssDebitMandateOptions */ @@ -3420,27 +3895,372 @@ export interface components { */ currency?: "cad" | "usd"; mandate_options?: components["schemas"]["checkout_acss_debit_mandate_options"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; /** * @description Bank account verification method. * @enum {string} */ verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** CheckoutAffirmPaymentMethodOptions */ + checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutAlipayPaymentMethodOptions */ + checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutAuBecsDebitPaymentMethodOptions */ + checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutBacsDebitPaymentMethodOptions */ + checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** CheckoutBancontactPaymentMethodOptions */ + checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; /** CheckoutBoletoPaymentMethodOptions */ checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** CheckoutCardInstallmentsOptions */ + checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + enabled?: boolean; + }; + /** CheckoutCardPaymentMethodOptions */ + checkout_card_payment_method_options: { + installments?: components["schemas"]["checkout_card_installments_options"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string; + }; + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + checkout_customer_balance_bank_transfer_payment_method_options: { + eu_bank_transfer?: components["schemas"]["payment_method_options_customer_balance_eu_bank_account"]; + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: + | ( + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer" + ) + | null; + }; + /** CheckoutCustomerBalancePaymentMethodOptions */ + checkout_customer_balance_payment_method_options: { + bank_transfer?: components["schemas"]["checkout_customer_balance_bank_transfer_payment_method_options"]; + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: "bank_transfer" | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutEpsPaymentMethodOptions */ + checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutFpxPaymentMethodOptions */ + checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutGiropayPaymentMethodOptions */ + checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutGrabPayPaymentMethodOptions */ + checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutIdealPaymentMethodOptions */ + checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutKlarnaPaymentMethodOptions */ + checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** CheckoutKonbiniPaymentMethodOptions */ + checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; }; /** CheckoutOxxoPaymentMethodOptions */ checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutP24PaymentMethodOptions */ + checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutPaynowPaymentMethodOptions */ + checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutPixPaymentMethodOptions */ + checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + expires_after_seconds?: number | null; + }; + /** CheckoutSepaDebitPaymentMethodOptions */ + checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; }; /** CheckoutSessionPaymentMethodOptions */ checkout_session_payment_method_options: { acss_debit?: components["schemas"]["checkout_acss_debit_payment_method_options"]; + affirm?: components["schemas"]["checkout_affirm_payment_method_options"]; + afterpay_clearpay?: components["schemas"]["checkout_afterpay_clearpay_payment_method_options"]; + alipay?: components["schemas"]["checkout_alipay_payment_method_options"]; + au_becs_debit?: components["schemas"]["checkout_au_becs_debit_payment_method_options"]; + bacs_debit?: components["schemas"]["checkout_bacs_debit_payment_method_options"]; + bancontact?: components["schemas"]["checkout_bancontact_payment_method_options"]; boleto?: components["schemas"]["checkout_boleto_payment_method_options"]; + card?: components["schemas"]["checkout_card_payment_method_options"]; + customer_balance?: components["schemas"]["checkout_customer_balance_payment_method_options"]; + eps?: components["schemas"]["checkout_eps_payment_method_options"]; + fpx?: components["schemas"]["checkout_fpx_payment_method_options"]; + giropay?: components["schemas"]["checkout_giropay_payment_method_options"]; + grabpay?: components["schemas"]["checkout_grab_pay_payment_method_options"]; + ideal?: components["schemas"]["checkout_ideal_payment_method_options"]; + klarna?: components["schemas"]["checkout_klarna_payment_method_options"]; + konbini?: components["schemas"]["checkout_konbini_payment_method_options"]; oxxo?: components["schemas"]["checkout_oxxo_payment_method_options"]; + p24?: components["schemas"]["checkout_p24_payment_method_options"]; + paynow?: components["schemas"]["checkout_paynow_payment_method_options"]; + pix?: components["schemas"]["checkout_pix_payment_method_options"]; + sepa_debit?: components["schemas"]["checkout_sepa_debit_payment_method_options"]; + sofort?: components["schemas"]["checkout_sofort_payment_method_options"]; + us_bank_account?: components["schemas"]["checkout_us_bank_account_payment_method_options"]; + }; + /** CheckoutSofortPaymentMethodOptions */ + checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** CheckoutUsBankAccountPaymentMethodOptions */ + checkout_us_bank_account_payment_method_options: { + financial_connections?: components["schemas"]["linked_account_options_us_bank_account"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant"; }; /** ConnectCollectionTransfer */ connect_collection_transfer: { @@ -3449,7 +4269,7 @@ export interface components { /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description ID of the account that funds are being collected for. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -3504,8 +4324,8 @@ export interface components { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3518,6 +4338,10 @@ export interface components { created: number; /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ currency?: string | null; + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: components["schemas"]["coupon_currency_option"]; + }; /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3557,6 +4381,11 @@ export interface components { /** @description A list of product IDs this coupon applies to */ products: string[]; }; + /** CouponCurrencyOption */ + coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: number; + }; /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3574,13 +4403,13 @@ export interface components { /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description ID of the customer. */ - customer: Partial & - Partial & - Partial; + customer: + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"]; /** @description Customer balance transaction related to this credit note. */ customer_balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["customer_balance_transaction"]) | null; /** @description The integer amount in %s representing the total amount of discount that was credited. */ discount_amount: number; @@ -3589,7 +4418,7 @@ export interface components { /** @description Unique identifier for the object. */ id: string; /** @description ID of the invoice. */ - invoice: Partial & Partial; + invoice: string | components["schemas"]["invoice"]; /** * CreditNoteLinesList * @description Line items that make up the credit note @@ -3637,20 +4466,22 @@ export interface components { ) | null; /** @description Refund related to this credit note. */ - refund?: - | (Partial & Partial) - | null; + refund?: (string | components["schemas"]["refund"]) | null; /** * @description Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). * @enum {string} */ status: "issued" | "void"; - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ subtotal: number; + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + subtotal_excluding_tax?: number | null; /** @description The aggregate amounts calculated per tax rate for all line items. */ tax_amounts: components["schemas"]["credit_note_tax_amount"][]; /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ total: number; + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax?: number | null; /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3666,6 +4497,8 @@ export interface components { credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number; + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null; /** @description Description of the item being credited. */ description?: string | null; /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3701,6 +4534,11 @@ export interface components { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null; + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null; }; /** CreditNoteTaxAmount */ credit_note_tax_amount: { @@ -3709,7 +4547,35 @@ export interface components { /** @description Whether this tax amount is inclusive or exclusive. */ inclusive: boolean; /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: Partial & Partial; + tax_rate: string | components["schemas"]["tax_rate"]; + }; + /** CurrencyOption */ + currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components["schemas"]["custom_unit_amount"] | null; + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ("exclusive" | "inclusive" | "unspecified") | null; + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components["schemas"]["price_tier"][]; + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null; + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null; + }; + /** CustomUnitAmount */ + custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + maximum?: number | null; + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum?: number | null; + /** @description The starting unit amount which can be updated by the customer. */ + preset?: number | null; }; /** * Customer @@ -3719,9 +4585,11 @@ export interface components { */ customer: { /** @description The customer's address. */ - address?: Partial | null; + address?: components["schemas"]["address"] | null; /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ balance?: number; + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + cash_balance?: components["schemas"]["cash_balance"] | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3735,12 +4603,12 @@ 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) + | ( + | string + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"] + ) | null; /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. @@ -3751,11 +4619,13 @@ export interface components { /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** @description Describes the current discount active on the customer, if there is one. */ - discount?: Partial | null; + discount?: components["schemas"]["discount"] | null; /** @description The customer's email address. */ email?: string | null; /** @description Unique identifier for the object. */ id: string; + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + invoice_credit_balance?: { [key: string]: number }; /** @description The prefix for the customer used to generate unique invoice numbers. */ invoice_prefix?: string | null; invoice_settings?: components["schemas"]["invoice_setting_customer_setting"]; @@ -3777,18 +4647,18 @@ export interface components { /** @description The customer's preferred locales (languages), ordered by preference. */ preferred_locales?: string[] | null; /** @description Mailing and shipping address for the customer. Appears on invoices emailed to this customer. */ - shipping?: Partial | null; + shipping?: components["schemas"]["shipping"] | null; /** * ApmsSourcesSourceList * @description The customer's payment sources, if any. */ sources?: { /** @description Details about each object. */ - data: (Partial & - Partial & - Partial & - Partial & - Partial)[]; + data: ( + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"] + )[]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -3839,6 +4709,10 @@ export interface components { /** @description The URL where this list can be accessed. */ url: string; }; + /** @description ID of the test clock this customer belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) + | null; }; /** customer_acceptance */ customer_acceptance: { @@ -3855,6 +4729,57 @@ export interface components { */ type: "offline" | "online"; }; + /** CustomerBalanceCustomerBalanceSettings */ + customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + reconciliation_mode: "automatic" | "manual"; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: string | components["schemas"]["payment_intent"]; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + bank_transfer: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer"]; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + eu_bank_transfer?: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer"]; + /** @description The user-supplied reference field on the bank transfer. */ + reference?: string | null; + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + bic?: string | null; + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4?: string | null; + /** @description The full name of the sender, as supplied by the sending bank. */ + sender_name?: string | null; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: string | components["schemas"]["refund"]; + }; + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: string | components["schemas"]["payment_intent"]; + }; /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3873,13 +4798,11 @@ export interface components { */ created: number; /** @description The ID of the credit note (if any) related to the transaction. */ - credit_note?: - | (Partial & Partial) - | null; + credit_note?: (string | components["schemas"]["credit_note"]) | null; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description The ID of the customer the transaction belongs to. */ - customer: Partial & Partial; + customer: string | components["schemas"]["customer"]; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** @description The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. */ @@ -3887,9 +4810,7 @@ export interface components { /** @description Unique identifier for the object. */ id: string; /** @description The ID of the invoice (if any) related to the transaction. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (string | components["schemas"]["invoice"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -3914,6 +4835,52 @@ export interface components { | "unapplied_from_invoice" | "unspent_receiver_credit"; }; + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + customer_cash_balance_transaction: { + applied_to_payment?: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction"]; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description The customer whose available cash balance changed as a result of this transaction. */ + customer: string | components["schemas"]["customer"]; + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + ending_balance: number; + funded?: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_funded_transaction"]; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + net_amount: number; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "customer_cash_balance_transaction"; + refunded_from_payment?: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction"]; + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + type: + | "applied_to_payment" + | "funded" + | "refunded_from_payment" + | "return_canceled" + | "return_initiated" + | "unapplied_from_payment"; + unapplied_from_payment?: components["schemas"]["customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction"]; + }; /** CustomerTax */ customer_tax: { /** @@ -3928,7 +4895,7 @@ export interface components { /** @description A recent IP address of the customer used for tax reporting and tax location inference. */ ip_address?: string | null; /** @description The customer's location as identified by Stripe Tax. */ - location?: Partial | null; + location?: components["schemas"]["customer_tax_location"] | null; }; /** CustomerTaxLocation */ customer_tax_location: { @@ -3961,8 +4928,8 @@ export interface components { */ object: "account"; }; - /** AlipayDeletedAccount */ - deleted_alipay_account: { + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3974,10 +4941,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "alipay_account"; + object: "apple_pay_domain"; }; - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { + /** DeletedApplication */ + deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3985,11 +4952,13 @@ export interface components { deleted: true; /** @description Unique identifier for the object. */ id: string; + /** @description The name of the application. */ + name?: string | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "apple_pay_domain"; + object: "application"; }; /** DeletedBankAccount */ deleted_bank_account: { @@ -4008,21 +4977,6 @@ export interface components { */ object: "bank_account"; }; - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true; - /** @description Unique identifier for the object. */ - id: string; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "bitcoin_receiver"; - }; /** DeletedCard */ deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4077,9 +5031,11 @@ export interface components { coupon: components["schemas"]["coupon"]; /** @description The ID of the customer associated with this discount. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** * @description Always true for a deleted object @@ -4099,7 +5055,7 @@ export interface components { object: "discount"; /** @description The promotion code applied to create this discount. */ promotion_code?: - | (Partial & Partial) + | (string | components["schemas"]["promotion_code"]) | null; /** * Format: unix-time @@ -4110,10 +5066,9 @@ export interface components { subscription?: string | null; }; /** Polymorphic */ - deleted_external_account: Partial< - components["schemas"]["deleted_bank_account"] - > & - Partial; + deleted_external_account: + | components["schemas"]["deleted_bank_account"] + | components["schemas"]["deleted_card"]; /** DeletedInvoice */ deleted_invoice: { /** @@ -4145,12 +5100,9 @@ export interface components { object: "invoiceitem"; }; /** Polymorphic */ - deleted_payment_source: Partial< - components["schemas"]["deleted_alipay_account"] - > & - Partial & - Partial & - Partial; + deleted_payment_source: + | components["schemas"]["deleted_bank_account"] + | components["schemas"]["deleted_card"]; /** DeletedPerson */ deleted_person: { /** @@ -4241,8 +5193,8 @@ export interface components { */ object: "radar.value_list_item"; }; - /** DeletedTransferRecipient */ - deleted_recipient: { + /** DeletedSku */ + deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4254,10 +5206,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "recipient"; + object: "sku"; }; - /** DeletedSku */ - deleted_sku: { + /** DeletedSubscriptionItem */ + deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4269,10 +5221,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "sku"; + object: "subscription_item"; }; - /** DeletedSubscriptionItem */ - deleted_subscription_item: { + /** deleted_tax_id */ + deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4284,10 +5236,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "subscription_item"; + object: "tax_id"; }; - /** deleted_tax_id */ - deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + "deleted_terminal.configuration": { /** * @description Always true for a deleted object * @enum {boolean} @@ -4299,7 +5251,7 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "tax_id"; + object: "terminal.configuration"; }; /** TerminalLocationDeletedLocation */ "deleted_terminal.location": { @@ -4331,6 +5283,21 @@ export interface components { */ object: "terminal.reader"; }; + /** DeletedTestClock */ + "deleted_test_helpers.test_clock": { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true; + /** @description Unique identifier for the object. */ + id: string; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "test_helpers.test_clock"; + }; /** NotificationWebhookEndpointDeleted */ deleted_webhook_endpoint: { /** @@ -4346,22 +5313,10 @@ export interface components { */ object: "webhook_endpoint"; }; - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string; - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string; - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string; - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string; - }; /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4371,9 +5326,11 @@ export interface components { coupon: components["schemas"]["coupon"]; /** @description The ID of the customer associated with this discount. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** * Format: unix-time @@ -4393,7 +5350,7 @@ export interface components { object: "discount"; /** @description The promotion code applied to create this discount. */ promotion_code?: - | (Partial & Partial) + | (string | components["schemas"]["promotion_code"]) | null; /** * Format: unix-time @@ -4408,9 +5365,10 @@ export interface components { /** @description The amount, in %s, of the discount. */ amount: number; /** @description The discount that was applied to get this discount amount. */ - discount: Partial & - Partial & - Partial; + discount: + | string + | components["schemas"]["discount"] + | components["schemas"]["deleted_discount"]; }; /** * Dispute @@ -4428,7 +5386,7 @@ export interface components { /** @description List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. */ balance_transactions: components["schemas"]["balance_transaction"][]; /** @description ID of the charge that was disputed. */ - charge: Partial & Partial; + charge: string | components["schemas"]["charge"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -4453,7 +5411,7 @@ export interface components { object: "dispute"; /** @description ID of the PaymentIntent that was disputed. */ payment_intent?: - | (Partial & Partial) + | (string | components["schemas"]["payment_intent"]) | null; /** @description Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Read more about [dispute reasons](https://stripe.com/docs/disputes/categories). */ reason: string; @@ -4478,17 +5436,13 @@ export interface components { /** @description The billing address provided by the customer. */ billing_address?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. */ - cancellation_policy?: - | (Partial & Partial) - | null; + cancellation_policy?: (string | components["schemas"]["file"]) | null; /** @description An explanation of how and when the customer was shown your refund policy prior to purchase. */ cancellation_policy_disclosure?: string | null; /** @description A justification for why the customer's subscription was not canceled. */ cancellation_rebuttal?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. */ - customer_communication?: - | (Partial & Partial) - | null; + customer_communication?: (string | components["schemas"]["file"]) | null; /** @description The email address of the customer. */ customer_email_address?: string | null; /** @description The name of the customer. */ @@ -4496,12 +5450,10 @@ export interface components { /** @description The IP address that the customer used when making the purchase. */ customer_purchase_ip?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. */ - customer_signature?: - | (Partial & Partial) - | null; + customer_signature?: (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. */ duplicate_charge_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** @description An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. */ duplicate_charge_explanation?: string | null; @@ -4510,13 +5462,9 @@ export interface components { /** @description A description of the product or service that was sold. */ product_description?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. */ - receipt?: - | (Partial & Partial) - | null; + receipt?: (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. */ - refund_policy?: - | (Partial & Partial) - | null; + refund_policy?: (string | components["schemas"]["file"]) | null; /** @description Documentation demonstrating that the customer was shown your refund policy prior to purchase. */ refund_policy_disclosure?: string | null; /** @description A justification for why the customer is not entitled to a refund. */ @@ -4524,9 +5472,7 @@ export interface components { /** @description The date on which the customer received or began receiving the purchased service, in a clear human-readable format. */ service_date?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. */ - service_documentation?: - | (Partial & Partial) - | null; + service_documentation?: (string | components["schemas"]["file"]) | null; /** @description The address to which a physical product was shipped. You should try to include as complete address information as possible. */ shipping_address?: string | null; /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. */ @@ -4534,15 +5480,11 @@ export interface components { /** @description The date on which a physical product began its route to the shipping address, in a clear human-readable format. */ shipping_date?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. */ - shipping_documentation?: - | (Partial & Partial) - | null; + shipping_documentation?: (string | components["schemas"]["file"]) | null; /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ shipping_tracking_number?: string | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. */ - uncategorized_file?: - | (Partial & Partial) - | null; + uncategorized_file?: (string | components["schemas"]["file"]) | null; /** @description Any additional evidence or statements. */ uncategorized_text?: string | null; }; @@ -4560,6 +5502,16 @@ export interface components { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number; }; + /** EmailSent */ + email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + email_sent_at: number; + /** @description The recipient's email address. */ + email_sent_to: string; + }; /** EphemeralKey */ ephemeral_key: { /** @@ -4643,9 +5595,7 @@ export interface components { /** @description Number of webhooks that have yet to be successfully delivered (i.e., to return a 20x response) to the URLs you've specified. */ pending_webhooks: number; /** @description Information on the API request that instigated the event. */ - request?: Partial< - components["schemas"]["notification_event_request"] - > | null; + request?: components["schemas"]["notification_event_request"] | null; /** @description Description of the event (e.g., `invoice.created` or `charge.refunded`). */ type: string; }; @@ -4675,8 +5625,9 @@ export interface components { rates: { [key: string]: number }; }; /** Polymorphic */ - external_account: Partial & - Partial; + external_account: + | components["schemas"]["bank_account"] + | components["schemas"]["card"]; /** Fee */ fee: { /** @description Amount of the fee, in cents. */ @@ -4703,8 +5654,7 @@ export interface components { amount: number; /** @description Balance transaction that describes the impact on your account balance. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** * Format: unix-time @@ -4714,7 +5664,7 @@ export interface components { /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description ID of the application fee that was refunded. */ - fee: Partial & Partial; + fee: string | components["schemas"]["application_fee"]; /** @description Unique identifier for the object. */ id: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -4790,7 +5740,8 @@ export interface components { | "pci_document" | "selfie" | "sigma_scheduled_query" - | "tax_document_user_upload"; + | "tax_document_user_upload" + | "terminal_reader_splashscreen"; /** @description The size in bytes of the file object. */ size: number; /** @description A user friendly title for the document. */ @@ -4820,7 +5771,7 @@ export interface components { */ expires_at?: number | null; /** @description The file object this link points to. */ - file: Partial & Partial; + file: string | components["schemas"]["file"]; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -4835,6 +5786,203 @@ export interface components { /** @description The publicly accessible URL to download the file. */ url?: string | null; }; + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + "financial_connections.account": { + /** @description The account holder that this account belongs to. */ + account_holder?: + | components["schemas"]["bank_connections_resource_accountholder"] + | null; + /** @description The most recent information about the account's balance. */ + balance?: + | components["schemas"]["bank_connections_resource_balance"] + | null; + /** @description The state of the most recent attempt to refresh the account balance. */ + balance_refresh?: + | components["schemas"]["bank_connections_resource_balance_refresh"] + | null; + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + category: "cash" | "credit" | "investment" | "other"; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name?: string | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description The name of the institution that holds this account. */ + institution_name: string; + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4?: string | null; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "financial_connections.account"; + /** @description The most recent information about the account's owners. */ + ownership?: + | ( + | string + | components["schemas"]["financial_connections.account_ownership"] + ) + | null; + /** @description The state of the most recent attempt to refresh the account owners. */ + ownership_refresh?: + | components["schemas"]["bank_connections_resource_ownership_refresh"] + | null; + /** @description The list of permissions granted by this account. */ + permissions?: + | ("balances" | "ownership" | "payment_method" | "transactions")[] + | null; + /** + * @description The status of the link to the account. + * @enum {string} + */ + status: "active" | "disconnected" | "inactive"; + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + subcategory: + | "checking" + | "credit_card" + | "line_of_credit" + | "mortgage" + | "other" + | "savings"; + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + supported_payment_method_types: ("link" | "us_bank_account")[]; + }; + /** BankConnectionsResourceOwner */ + "financial_connections.account_owner": { + /** @description The email address of the owner. */ + email?: string | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description The full name of the owner. */ + name: string; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "financial_connections.account_owner"; + /** @description The ownership object that this owner belongs to. */ + ownership: string; + /** @description The raw phone number of the owner. */ + phone?: string | null; + /** @description The raw physical address of the owner. */ + raw_address?: string | null; + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + refreshed_at?: number | null; + }; + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + "financial_connections.account_ownership": { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Unique identifier for the object. */ + id: string; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "financial_connections.account_ownership"; + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + owners: { + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account_owner"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + "financial_connections.session": { + /** @description The account holder for whom accounts are collected in this session. */ + account_holder?: + | components["schemas"]["bank_connections_resource_accountholder"] + | null; + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + accounts: { + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + /** @description A value that will be passed to the client to launch the authentication flow. */ + client_secret: string; + filters?: components["schemas"]["bank_connections_resource_link_account_session_filters"]; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "financial_connections.session"; + /** @description Permissions requested for accounts collected during this session. */ + permissions: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string; + }; /** FinancialReportingFinanceReportRunRunParameters */ financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4860,6 +6008,118 @@ export interface components { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ timezone?: string; }; + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + funding_instructions: { + bank_transfer: components["schemas"]["funding_instructions_bank_transfer"]; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + funding_type: "bank_transfer"; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "funding_instructions"; + }; + /** FundingInstructionsBankTransfer */ + funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + country: string; + /** @description A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: components["schemas"]["funding_instructions_bank_transfer_financial_address"][]; + /** + * @description The bank_transfer type + * @enum {string} + */ + type: "eu_bank_transfer" | "jp_bank_transfer"; + }; + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + funding_instructions_bank_transfer_financial_address: { + iban?: components["schemas"]["funding_instructions_bank_transfer_iban_record"]; + sort_code?: components["schemas"]["funding_instructions_bank_transfer_sort_code_record"]; + spei?: components["schemas"]["funding_instructions_bank_transfer_spei_record"]; + /** @description The payment networks supported by this FinancialAddress */ + supported_networks?: ("bacs" | "fps" | "sepa" | "spei" | "zengin")[]; + /** + * @description The type of financial address + * @enum {string} + */ + type: "iban" | "sort_code" | "spei" | "zengin"; + zengin?: components["schemas"]["funding_instructions_bank_transfer_zengin_record"]; + }; + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string; + /** @description The BIC/SWIFT code of the account. */ + bic: string; + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string; + /** @description The IBAN of the account. */ + iban: string; + }; + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string; + /** @description The account number */ + account_number: string; + /** @description The six-digit sort code */ + sort_code: string; + }; + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + bank_code: string; + /** @description The short banking institution name */ + bank_name: string; + /** @description The CLABE number */ + clabe: string; + }; + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + account_holder_name?: string | null; + /** @description The account number */ + account_number?: string | null; + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null; + /** @description The bank code of the account */ + bank_code?: string | null; + /** @description The bank name of the account */ + bank_name?: string | null; + /** @description The branch code of the account */ + branch_code?: string | null; + /** @description The branch name of the account */ + branch_name?: string | null; + }; /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -4926,27 +6186,25 @@ export interface components { */ gelato_document_report: { /** @description Address as it appears in the document. */ - address?: Partial | null; + address?: components["schemas"]["address"] | null; /** @description Date of birth as it appears in the document. */ - dob?: Partial< - components["schemas"]["gelato_data_document_report_date_of_birth"] - > | null; + dob?: + | components["schemas"]["gelato_data_document_report_date_of_birth"] + | null; /** @description Details on the verification error. Present when status is `unverified`. */ - error?: Partial< - components["schemas"]["gelato_document_report_error"] - > | null; + error?: components["schemas"]["gelato_document_report_error"] | null; /** @description Expiration date of the document. */ - expiration_date?: Partial< - components["schemas"]["gelato_data_document_report_expiration_date"] - > | null; + expiration_date?: + | components["schemas"]["gelato_data_document_report_expiration_date"] + | null; /** @description Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. */ files?: string[] | null; /** @description First name as it appears in the document. */ first_name?: string | null; /** @description Issued date of the document. */ - issued_date?: Partial< - components["schemas"]["gelato_data_document_report_issued_date"] - > | null; + issued_date?: + | components["schemas"]["gelato_data_document_report_issued_date"] + | null; /** @description Issuing country of the document. */ issuing_country?: string | null; /** @description Last name as it appears in the document. */ @@ -4986,13 +6244,9 @@ export interface components { */ gelato_id_number_report: { /** @description Date of birth. */ - dob?: Partial< - components["schemas"]["gelato_data_id_number_report_date"] - > | null; + dob?: components["schemas"]["gelato_data_id_number_report_date"] | null; /** @description Details on the verification error. Present when status is `unverified`. */ - error?: Partial< - components["schemas"]["gelato_id_number_report_error"] - > | null; + error?: components["schemas"]["gelato_id_number_report_error"] | null; /** @description First name. */ first_name?: string | null; /** @description ID number. */ @@ -5047,9 +6301,7 @@ export interface components { /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. */ document?: string | null; /** @description Details on the verification error. Present when status is `unverified`. */ - error?: Partial< - components["schemas"]["gelato_selfie_report_error"] - > | null; + error?: components["schemas"]["gelato_selfie_report_error"] | null; /** @description ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. */ selfie?: string | null; /** @@ -5132,11 +6384,9 @@ export interface components { /** GelatoVerifiedOutputs */ gelato_verified_outputs: { /** @description The user's verified address. */ - address?: Partial | null; + address?: components["schemas"]["address"] | null; /** @description The user’s verified date of birth. */ - dob?: Partial< - components["schemas"]["gelato_data_verified_outputs_date"] - > | null; + dob?: components["schemas"]["gelato_data_verified_outputs_date"] | null; /** @description The user's verified first name. */ first_name?: string | null; /** @description The user's verified id number. */ @@ -5199,7 +6449,7 @@ export interface components { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5215,13 +6465,10 @@ export interface components { /** @description Unique identifier for the object. */ id: string; /** @description If present, this property tells you the last error encountered when processing the verification. */ - last_error?: Partial< - components["schemas"]["gelato_session_last_error"] - > | null; + last_error?: components["schemas"]["gelato_session_last_error"] | null; /** @description ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) */ last_verification_report?: - | (Partial & - Partial) + | (string | components["schemas"]["identity.verification_report"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; @@ -5234,9 +6481,9 @@ export interface components { object: "identity.verification_session"; options: components["schemas"]["gelato_verification_session_options"]; /** @description Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. */ - redaction?: Partial< - components["schemas"]["verification_session_redaction"] - > | null; + redaction?: + | components["schemas"]["verification_session_redaction"] + | null; /** * @description Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). * @enum {string} @@ -5250,9 +6497,45 @@ export interface components { /** @description The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. */ url?: string | null; /** @description The user’s verified data. */ - verified_outputs?: Partial< - components["schemas"]["gelato_verified_outputs"] - > | null; + verified_outputs?: + | components["schemas"]["gelato_verified_outputs"] + | null; + }; + /** InboundTransfers */ + inbound_transfers: { + billing_details: components["schemas"]["treasury_shared_resource_billing_details"]; + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + type: "us_bank_account"; + us_bank_account?: components["schemas"]["inbound_transfers_payment_method_details_us_bank_account"]; + }; + /** inbound_transfers_payment_method_details_us_bank_account */ + inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ("company" | "individual") | null; + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ("checking" | "savings") | null; + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** @description Last four digits of the bank account number. */ + last4?: string | null; + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + network: "ach"; + /** @description Routing number of the bank account. */ + routing_number?: string | null; }; /** * Invoice @@ -5296,16 +6579,26 @@ export interface components { account_name?: string | null; /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: - | (Partial & - Partial & - Partial)[] + | ( + | string + | components["schemas"]["tax_id"] + | components["schemas"]["deleted_tax_id"] + )[] | null; /** @description Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. */ amount_due: number; /** @description The amount, in %s, that was paid. */ amount_paid: number; - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ amount_remaining: number; + /** @description ID of the Connect Application that created the invoice. */ + application?: + | ( + | string + | components["schemas"]["application"] + | components["schemas"]["deleted_application"] + ) + | null; /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ application_fee_amount?: number | null; /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5333,9 +6626,7 @@ export interface components { ) | null; /** @description ID of the latest charge generated for this invoice, if any. */ - charge?: - | (Partial & Partial) - | null; + charge?: (string | components["schemas"]["charge"]) | null; /** * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. * @enum {string} @@ -5354,12 +6645,14 @@ export interface components { | null; /** @description The ID of the customer who will be billed. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. */ - customer_address?: Partial | null; + customer_address?: components["schemas"]["address"] | null; /** @description The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. */ customer_email?: string | null; /** @description The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. */ @@ -5367,7 +6660,7 @@ export interface components { /** @description The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. */ customer_phone?: string | null; /** @description The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. */ - customer_shipping?: Partial | null; + customer_shipping?: components["schemas"]["shipping"] | null; /** * @description The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. * @enum {string|null} @@ -5379,28 +6672,30 @@ export interface components { | null; /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ default_payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ default_source?: - | (Partial & - Partial & - Partial & - Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"] + ) | null; /** @description The tax rates applied to this invoice, if any. */ default_tax_rates: components["schemas"]["tax_rate"][]; /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ description?: string | null; /** @description Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. */ - discount?: Partial | null; + discount?: components["schemas"]["discount"] | null; /** @description The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ discounts?: - | (Partial & - Partial & - Partial)[] + | ( + | string + | components["schemas"]["discount"] + | components["schemas"]["deleted_discount"] + )[] | null; /** * Format: unix-time @@ -5411,6 +6706,8 @@ export interface components { ending_balance?: number | null; /** @description Footer displayed on the invoice. */ footer?: string | null; + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice?: components["schemas"]["invoices_from_invoice"] | null; /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ hosted_invoice_url?: string | null; /** @description Unique identifier for the object. */ @@ -5418,9 +6715,9 @@ export interface components { /** @description The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. */ invoice_pdf?: string | null; /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ - last_finalization_error?: Partial< - components["schemas"]["api_errors"] - > | null; + last_finalization_error?: components["schemas"]["api_errors"] | null; + /** @description The ID of the most recent non-draft revision of this invoice */ + latest_revision?: (string | components["schemas"]["invoice"]) | null; /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5455,16 +6752,14 @@ export interface components { */ object: "invoice"; /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** @description Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. */ paid: boolean; /** @description Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. */ paid_out_of_band: boolean; /** @description The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. */ payment_intent?: - | (Partial & Partial) + | (string | components["schemas"]["payment_intent"]) | null; payment_settings: components["schemas"]["invoices_payment_settings"]; /** @@ -5482,11 +6777,13 @@ export interface components { /** @description Total amount of all pre-payment credit notes issued for this invoice. */ pre_payment_credit_notes_amount: number; /** @description The quote this invoice was generated from. */ - quote?: - | (Partial & Partial) - | null; + quote?: (string | components["schemas"]["quote"]) | null; /** @description This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number?: string | null; + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | components["schemas"]["invoice_setting_rendering_options"] + | null; /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ starting_balance: number; /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5500,15 +6797,19 @@ export interface components { | null; status_transitions: components["schemas"]["invoices_status_transitions"]; /** @description The subscription that this invoice was prepared for, if any. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (string | components["schemas"]["subscription"]) | null; /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number; - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ subtotal: number; + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal_excluding_tax?: number | null; /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ tax?: number | null; + /** @description ID of the test clock this invoice belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) + | null; threshold_reason?: components["schemas"]["invoice_threshold_reason"]; /** @description Total after discounts and taxes. */ total: number; @@ -5516,18 +6817,23 @@ export interface components { total_discount_amounts?: | components["schemas"]["discounts_resource_discount_amount"][] | null; + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + total_excluding_tax?: number | null; /** @description The aggregate amounts calculated per tax rate for all line items. */ total_tax_amounts: components["schemas"]["invoice_tax_amount"][]; /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ - transfer_data?: Partial< - components["schemas"]["invoice_transfer_data"] - > | null; + transfer_data?: components["schemas"]["invoice_transfer_data"] | null; /** * Format: unix-time * @description Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. */ webhooks_delivered_at?: number | null; }; + /** invoice_installments_card */ + invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + enabled?: boolean | null; + }; /** InvoiceItemThresholdReason */ invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5539,12 +6845,12 @@ export interface components { invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ end: number; /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ start: number; }; @@ -5587,12 +6893,52 @@ export interface components { }; /** invoice_payment_method_options_card */ invoice_payment_method_options_card: { + installments?: components["schemas"]["invoice_installments_card"]; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ("any" | "automatic") | null; }; + /** invoice_payment_method_options_customer_balance */ + invoice_payment_method_options_customer_balance: { + bank_transfer?: components["schemas"]["invoice_payment_method_options_customer_balance_bank_transfer"]; + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: "bank_transfer" | null; + }; + /** invoice_payment_method_options_customer_balance_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components["schemas"]["invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer"]; + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + type?: string | null; + }; + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: "DE" | "ES" | "FR" | "IE" | "NL"; + }; + /** invoice_payment_method_options_konbini */ + invoice_payment_method_options_konbini: { [key: string]: unknown }; + /** invoice_payment_method_options_us_bank_account */ + invoice_payment_method_options_us_bank_account: { + financial_connections?: components["schemas"]["invoice_payment_method_options_us_bank_account_linked_account_options"]; + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ("balances" | "payment_method" | "transactions")[]; + }; /** InvoiceSettingCustomField */ invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5608,16 +6954,25 @@ export interface components { | null; /** @description ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. */ default_payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description Default footer to be displayed on invoices for this customer. */ footer?: string | null; + /** @description Default options for invoice PDF rendering for this customer. */ + rendering_options?: + | components["schemas"]["invoice_setting_rendering_options"] + | null; }; /** InvoiceSettingQuoteSetting */ invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number | null; }; + /** InvoiceSettingRenderingOptions */ + invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display?: string | null; + }; /** InvoiceSettingSubscriptionScheduleSetting */ invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5630,7 +6985,7 @@ export interface components { /** @description Whether this tax amount is inclusive or exclusive. */ inclusive: boolean; /** @description The tax rate that was applied to get this tax amount. */ - tax_rate: Partial & Partial; + tax_rate: string | components["schemas"]["tax_rate"]; }; /** InvoiceThresholdReason */ invoice_threshold_reason: { @@ -5644,7 +6999,7 @@ export interface components { /** @description The amount in %s that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. */ amount?: number | null; /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** * InvoiceItem @@ -5662,9 +7017,10 @@ export interface components { /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description The ID of the customer who will be billed when this invoice item is billed. */ - customer: Partial & - Partial & - Partial; + customer: + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -5675,15 +7031,11 @@ export interface components { /** @description If true, discounts will apply to this invoice item. Always false for prorations. */ discountable: boolean; /** @description The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ - discounts?: - | (Partial & Partial)[] - | null; + discounts?: (string | components["schemas"]["discount"])[] | null; /** @description Unique identifier for the object. */ id: string; /** @description The ID of the invoice this invoice item belongs to. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (string | components["schemas"]["invoice"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -5695,19 +7047,21 @@ export interface components { object: "invoiceitem"; period: components["schemas"]["invoice_line_item_period"]; /** @description The price of the invoice item. */ - price?: Partial | null; + price?: components["schemas"]["price"] | null; /** @description Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. */ proration: boolean; /** @description Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. */ quantity: number; /** @description The subscription that this invoice item has been created for, if any. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (string | components["schemas"]["subscription"]) | null; /** @description The subscription item that this invoice item has been created for, if any. */ subscription_item?: string; /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: components["schemas"]["tax_rate"][] | null; + /** @description ID of the test clock this invoice item belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) + | null; /** @description Unit amount (in the `currency` specified) of the invoice item. */ unit_amount?: number | null; /** @@ -5716,27 +7070,62 @@ export interface components { */ unit_amount_decimal?: string | null; }; + /** InvoicesFromInvoice */ + invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + action: string; + /** @description The invoice that was cloned. */ + invoice: string | components["schemas"]["invoice"]; + }; + /** InvoicesLineItemsCreditedItems */ + invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + invoice: string; + /** @description Credited invoice line items */ + invoice_line_items: string[]; + }; + /** InvoicesLineItemsProrationDetails */ + invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items?: + | components["schemas"]["invoices_line_items_credited_items"] + | null; + }; /** InvoicesPaymentMethodOptions */ invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ - acss_debit?: Partial< - components["schemas"]["invoice_payment_method_options_acss_debit"] - > | null; + acss_debit?: + | components["schemas"]["invoice_payment_method_options_acss_debit"] + | null; /** @description If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. */ - bancontact?: Partial< - components["schemas"]["invoice_payment_method_options_bancontact"] - > | null; + bancontact?: + | components["schemas"]["invoice_payment_method_options_bancontact"] + | null; /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ - card?: Partial< - components["schemas"]["invoice_payment_method_options_card"] - > | null; + card?: + | components["schemas"]["invoice_payment_method_options_card"] + | null; + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + customer_balance?: + | components["schemas"]["invoice_payment_method_options_customer_balance"] + | null; + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini?: + | components["schemas"]["invoice_payment_method_options_konbini"] + | null; + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + us_bank_account?: + | components["schemas"]["invoice_payment_method_options_us_bank_account"] + | null; }; /** InvoicesPaymentSettings */ invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + default_mandate?: string | null; /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ - payment_method_options?: Partial< - components["schemas"]["invoices_payment_method_options"] - > | null; + payment_method_options?: + | components["schemas"]["invoices_payment_method_options"] + | null; /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ payment_method_types?: | ( @@ -5748,12 +7137,18 @@ export interface components { | "bancontact" | "boleto" | "card" + | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay" )[] | null; @@ -5761,13 +7156,14 @@ export interface components { /** InvoicesResourceInvoiceTaxID */ invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -5779,10 +7175,12 @@ export interface components { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -5802,6 +7200,7 @@ export interface components { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -5834,38 +7233,6 @@ export interface components { */ voided_at?: number | null; }; - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean; - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: Partial & Partial; - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number; - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string; - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean; - /** @description Unique identifier for the object. */ - id: string; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "issuer_fraud_record"; - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number; - }; /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5878,9 +7245,9 @@ export interface components { /** @description The total amount that was authorized or rejected. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: Partial< - components["schemas"]["issuing_authorization_amount_details"] - > | null; + amount_details?: + | components["schemas"]["issuing_authorization_amount_details"] + | null; /** @description Whether the authorization has been approved. */ approved: boolean; /** @@ -5898,8 +7265,7 @@ export interface components { card: components["schemas"]["issuing.card"]; /** @description The cardholder to whom this authorization belongs. */ cardholder?: - | (Partial & - Partial) + | (string | components["schemas"]["issuing.cardholder"]) | null; /** * Format: unix-time @@ -5925,9 +7291,9 @@ export interface components { */ object: "issuing.authorization"; /** @description 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?: + | components["schemas"]["issuing_authorization_pending_request"] + | null; /** @description History of every time `pending_request` was approved/denied, either by you directly or by Stripe (e.g. based on your `spending_controls`). If the merchant changes the authorization by performing an [incremental authorization](https://stripe.com/docs/issuing/purchases/authorizations), you can look at this field to see the previous requests for the authorization. */ request_history: components["schemas"]["issuing_authorization_request"][]; /** @@ -5937,6 +7303,8 @@ export interface components { status: "closed" | "pending" | "reversed"; /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ transactions: components["schemas"]["issuing.transaction"][]; + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + treasury?: components["schemas"]["issuing_authorization_treasury"] | null; verification_data: components["schemas"]["issuing_authorization_verification_data"]; /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null; @@ -5952,14 +7320,14 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: ("lost" | "stolen") | null; + cancellation_reason?: ("design_rejected" | "lost" | "stolen") | null; cardholder: components["schemas"]["issuing.cardholder"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ currency: string; /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ cvc?: string; @@ -5967,6 +7335,8 @@ export interface components { exp_month: number; /** @description The expiration year of the card. */ exp_year: number; + /** @description The financial account this card is attached to. */ + financial_account?: string | null; /** @description Unique identifier for the object. */ id: string; /** @description The last 4 digits of the card number. */ @@ -5983,20 +7353,16 @@ export interface components { */ object: "issuing.card"; /** @description The latest card that replaces this card, if any. */ - replaced_by?: - | (Partial & Partial) - | null; + replaced_by?: (string | components["schemas"]["issuing.card"]) | null; /** @description The card this card replaces, if any. */ - replacement_for?: - | (Partial & Partial) - | null; + replacement_for?: (string | components["schemas"]["issuing.card"]) | null; /** * @description The reason why the previous card needed to be replaced. * @enum {string|null} */ replacement_reason?: ("damaged" | "expired" | "lost" | "stolen") | null; /** @description Where and how the card will be shipped. */ - shipping?: Partial | null; + shipping?: components["schemas"]["issuing_card_shipping"] | null; spending_controls: components["schemas"]["issuing_card_authorization_controls"]; /** * @description Whether authorizations can be approved on this card. @@ -6009,7 +7375,7 @@ export interface components { */ type: "physical" | "virtual"; /** @description Information relating to digital wallets (like Apple Pay and Google Pay). */ - wallets?: Partial | null; + wallets?: components["schemas"]["issuing_card_wallets"] | null; }; /** * IssuingCardholder @@ -6020,9 +7386,7 @@ export interface components { "issuing.cardholder": { billing: components["schemas"]["issuing_cardholder_address"]; /** @description Additional information about a `company` cardholder. */ - company?: Partial< - components["schemas"]["issuing_cardholder_company"] - > | null; + company?: components["schemas"]["issuing_cardholder_company"] | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -6033,9 +7397,9 @@ export interface components { /** @description Unique identifier for the object. */ id: string; /** @description Additional information about an `individual` cardholder. */ - individual?: Partial< - components["schemas"]["issuing_cardholder_individual"] - > | null; + individual?: + | components["schemas"]["issuing_cardholder_individual"] + | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -6051,9 +7415,9 @@ export interface components { phone_number?: string | null; requirements: components["schemas"]["issuing_cardholder_requirements"]; /** @description Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. */ - spending_controls?: Partial< - components["schemas"]["issuing_cardholder_authorization_controls"] - > | null; + spending_controls?: + | components["schemas"]["issuing_cardholder_authorization_controls"] + | null; /** * @description Specifies whether to permit authorizations on this cardholder's cards. * @enum {string} @@ -6072,7 +7436,7 @@ export interface components { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ "issuing.dispute": { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number; /** @description List of balance transactions associated with the dispute. */ balance_transactions?: @@ -6103,8 +7467,9 @@ export interface components { */ status: "expired" | "lost" | "submitted" | "unsubmitted" | "won"; /** @description The transaction being disputed. */ - transaction: Partial & - Partial; + transaction: string | components["schemas"]["issuing.transaction"]; + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components["schemas"]["issuing_dispute_treasury"] | null; }; /** * IssuingSettlement @@ -6165,25 +7530,22 @@ export interface components { /** @description The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: Partial< - components["schemas"]["issuing_transaction_amount_details"] - > | null; + amount_details?: + | components["schemas"]["issuing_transaction_amount_details"] + | null; /** @description The `Authorization` object that led to this transaction. */ authorization?: - | (Partial & - Partial) + | (string | components["schemas"]["issuing.authorization"]) | null; /** @description ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** @description The card used to make this transaction. */ - card: Partial & Partial; + card: string | components["schemas"]["issuing.card"]; /** @description The cardholder to whom this transaction belongs. */ cardholder?: - | (Partial & - Partial) + | (string | components["schemas"]["issuing.cardholder"]) | null; /** * Format: unix-time @@ -6193,9 +7555,7 @@ export interface components { /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description If you've disputed the transaction, the ID of the dispute. */ - dispute?: - | (Partial & Partial) - | null; + dispute?: (string | components["schemas"]["issuing.dispute"]) | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -6213,9 +7573,11 @@ export interface components { */ object: "issuing.transaction"; /** @description Additional purchase information that is optionally provided by the merchant. */ - purchase_details?: Partial< - components["schemas"]["issuing_transaction_purchase_details"] - > | null; + purchase_details?: + | components["schemas"]["issuing_transaction_purchase_details"] + | null; + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components["schemas"]["issuing_transaction_treasury"] | null; /** * @description The nature of the transaction. * @enum {string} @@ -6256,9 +7618,9 @@ export interface components { /** @description The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: Partial< - components["schemas"]["issuing_authorization_amount_details"] - > | null; + amount_details?: + | components["schemas"]["issuing_authorization_amount_details"] + | null; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. */ @@ -6273,9 +7635,9 @@ export interface components { /** @description The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. */ amount: number; /** @description Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ - amount_details?: Partial< - components["schemas"]["issuing_authorization_amount_details"] - > | null; + amount_details?: + | components["schemas"]["issuing_authorization_amount_details"] + | null; /** @description Whether this request was approved. */ approved: boolean; /** @@ -6308,6 +7670,15 @@ export interface components { | "webhook_declined" | "webhook_timeout"; }; + /** IssuingAuthorizationTreasury */ + issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: string[]; + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: string[]; + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction?: string | null; + }; /** IssuingAuthorizationVerificationData */ issuing_authorization_verification_data: { /** @@ -6966,6 +8337,8 @@ export interface components { * @enum {string|null} */ carrier?: ("dhl" | "fedex" | "royal_mail" | "usps") | null; + /** @description Additional information that may be required for clearing customs. */ + customs?: components["schemas"]["issuing_card_shipping_customs"] | null; /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6973,6 +8346,10 @@ export interface components { eta?: number | null; /** @description Recipient name. */ name: string; + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + phone_number?: string | null; + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + require_signature?: boolean | null; /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -7002,9 +8379,14 @@ export interface components { */ type: "bulk" | "individual"; }; + /** IssuingCardShippingCustoms */ + issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + eori_number?: string | null; + }; /** IssuingCardSpendingLimit */ issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -7925,24 +9307,22 @@ export interface components { /** IssuingCardholderIdDocument */ issuing_cardholder_id_document: { /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: (Partial & Partial) | null; + back?: (string | components["schemas"]["file"]) | null; /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: (Partial & Partial) | null; + front?: (string | components["schemas"]["file"]) | null; }; /** IssuingCardholderIndividual */ issuing_cardholder_individual: { /** @description The date of birth of this cardholder. */ - dob?: Partial< - components["schemas"]["issuing_cardholder_individual_dob"] - > | null; + dob?: components["schemas"]["issuing_cardholder_individual_dob"] | null; /** @description The first name of this cardholder. */ first_name: string; /** @description The last name of this cardholder. */ last_name: string; /** @description Government-issued ID document for this cardholder. */ - verification?: Partial< - components["schemas"]["issuing_cardholder_verification"] - > | null; + verification?: + | components["schemas"]["issuing_cardholder_verification"] + | null; }; /** IssuingCardholderIndividualDOB */ issuing_cardholder_individual_dob: { @@ -7975,7 +9355,7 @@ export interface components { }; /** IssuingCardholderSpendingLimit */ issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -8285,15 +9665,13 @@ export interface components { /** IssuingCardholderVerification */ issuing_cardholder_verification: { /** @description An identifying document, either a passport or local ID card. */ - document?: Partial< - components["schemas"]["issuing_cardholder_id_document"] - > | null; + document?: components["schemas"]["issuing_cardholder_id_document"] | null; }; /** IssuingDisputeCanceledEvidence */ issuing_dispute_canceled_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** * Format: unix-time @@ -8333,20 +9711,14 @@ export interface components { issuing_dispute_duplicate_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. */ - card_statement?: - | (Partial & Partial) - | null; + card_statement?: (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. */ - cash_receipt?: - | (Partial & Partial) - | null; + cash_receipt?: (string | components["schemas"]["file"]) | null; /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. */ - check_image?: - | (Partial & Partial) - | null; + check_image?: (string | components["schemas"]["file"]) | null; /** @description Explanation of why the cardholder is disputing this transaction. */ explanation?: string | null; /** @description Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. */ @@ -8378,7 +9750,7 @@ export interface components { issuing_dispute_fraudulent_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** @description Explanation of why the cardholder is disputing this transaction. */ explanation?: string | null; @@ -8387,7 +9759,7 @@ export interface components { issuing_dispute_merchandise_not_as_described_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** @description Explanation of why the cardholder is disputing this transaction. */ explanation?: string | null; @@ -8413,7 +9785,7 @@ export interface components { issuing_dispute_not_received_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** * Format: unix-time @@ -8434,7 +9806,7 @@ export interface components { issuing_dispute_other_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** @description Explanation of why the cardholder is disputing this transaction. */ explanation?: string | null; @@ -8450,7 +9822,7 @@ export interface components { issuing_dispute_service_not_as_described_evidence: { /** @description (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. */ additional_documentation?: - | (Partial & Partial) + | (string | components["schemas"]["file"]) | null; /** * Format: unix-time @@ -8467,6 +9839,13 @@ export interface components { */ received_at?: number | null; }; + /** IssuingDisputeTreasury */ + issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal?: string | null; + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: string; + }; /** IssuingTransactionAmountDetails */ issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8529,17 +9908,13 @@ export interface components { /** IssuingTransactionPurchaseDetails */ issuing_transaction_purchase_details: { /** @description Information about the flight that was purchased with this transaction. */ - flight?: Partial< - components["schemas"]["issuing_transaction_flight_data"] - > | null; + flight?: components["schemas"]["issuing_transaction_flight_data"] | null; /** @description Information about fuel that was purchased with this transaction. */ - fuel?: Partial< - components["schemas"]["issuing_transaction_fuel_data"] - > | null; + fuel?: components["schemas"]["issuing_transaction_fuel_data"] | null; /** @description Information about lodging that was purchased with this transaction. */ - lodging?: Partial< - components["schemas"]["issuing_transaction_lodging_data"] - > | null; + lodging?: + | components["schemas"]["issuing_transaction_lodging_data"] + | null; /** @description The line items in the purchase. */ receipt?: | components["schemas"]["issuing_transaction_receipt_data"][] @@ -8558,13 +9933,24 @@ export interface components { /** @description The unit cost of the item in cents. */ unit_cost?: number | null; }; + /** IssuingTransactionTreasury */ + issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + received_credit?: string | null; + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + received_debit?: string | null; + }; /** * LineItem * @description A line item. */ item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: number; /** @description Total before any discounts or taxes are applied. */ amount_subtotal: number; + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: number; /** @description Total after discounts and taxes. */ amount_total: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8581,7 +9967,16 @@ export interface components { */ object: "item"; /** @description The price used to generate the line item. */ - price?: Partial | null; + price?: components["schemas"]["price"] | null; + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + product?: + | string + | components["schemas"]["product"] + | components["schemas"]["deleted_product"]; /** @description The quantity of products being purchased. */ quantity?: number | null; /** @description The taxes applied to the line item. */ @@ -8591,13 +9986,11 @@ export interface components { legal_entity_company: { address?: components["schemas"]["address"]; /** @description The Kana variation of the company's primary address (Japan only). */ - address_kana?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; + address_kana?: components["schemas"]["legal_entity_japan_address"] | null; /** @description The Kanji variation of the company's primary address (Japan only). */ - address_kanji?: Partial< - components["schemas"]["legal_entity_japan_address"] - > | null; + address_kanji?: + | components["schemas"]["legal_entity_japan_address"] + | null; /** @description Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). */ directors_provided?: boolean; /** @description Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. */ @@ -8611,9 +10004,9 @@ export interface components { /** @description Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). */ owners_provided?: boolean; /** @description This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. */ - ownership_declaration?: Partial< - components["schemas"]["legal_entity_ubo_declaration"] - > | null; + ownership_declaration?: + | components["schemas"]["legal_entity_ubo_declaration"] + | null; /** @description The company's phone number (used for verification). */ phone?: string | null; /** @@ -8648,9 +10041,9 @@ export interface components { /** @description Whether the company's business VAT number was provided. */ vat_id_provided?: boolean; /** @description Information on the verification state of the company. */ - verification?: Partial< - components["schemas"]["legal_entity_company_verification"] - > | null; + verification?: + | components["schemas"]["legal_entity_company_verification"] + | null; }; /** LegalEntityCompanyVerification */ legal_entity_company_verification: { @@ -8659,13 +10052,13 @@ export interface components { /** LegalEntityCompanyVerificationDocument */ legal_entity_company_verification_document: { /** @description The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - back?: (Partial & Partial) | null; + back?: (string | components["schemas"]["file"]) | null; /** @description A user-displayable string describing the verification state of this document. */ details?: string | null; /** @description One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. */ details_code?: string | null; /** @description The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. */ - front?: (Partial & Partial) | null; + front?: (string | components["schemas"]["file"]) | null; }; /** LegalEntityDOB */ legal_entity_dob: { @@ -8696,9 +10089,9 @@ export interface components { /** LegalEntityPersonVerification */ legal_entity_person_verification: { /** @description A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. */ - additional_document?: Partial< - components["schemas"]["legal_entity_person_verification_document"] - > | null; + additional_document?: + | components["schemas"]["legal_entity_person_verification_document"] + | null; /** @description A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". */ details?: string | null; /** @description One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. */ @@ -8710,13 +10103,13 @@ export interface components { /** LegalEntityPersonVerificationDocument */ legal_entity_person_verification_document: { /** @description The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - back?: (Partial & Partial) | null; + back?: (string | components["schemas"]["file"]) | null; /** @description A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". */ details?: string | null; /** @description One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. */ details_code?: string | null; /** @description The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. */ - front?: (Partial & Partial) | null; + front?: (string | components["schemas"]["file"]) | null; }; /** LegalEntityUBODeclaration */ legal_entity_ubo_declaration: { @@ -8734,6 +10127,8 @@ export interface components { line_item: { /** @description The amount, in %s. */ amount: number; + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8745,9 +10140,7 @@ export interface components { /** @description If true, discounts will apply to this line item. Always false for prorations. */ discountable: boolean; /** @description The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. */ - discounts?: - | (Partial & Partial)[] - | null; + discounts?: (string | components["schemas"]["discount"])[] | null; /** @description Unique identifier for the object. */ id: string; /** @description The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. */ @@ -8763,9 +10156,13 @@ export interface components { object: "line_item"; period: components["schemas"]["invoice_line_item_period"]; /** @description The price of the line item. */ - price?: Partial | null; + price?: components["schemas"]["price"] | null; /** @description Whether this is a proration. */ proration: boolean; + /** @description Additional details for proration line items */ + proration_details?: + | components["schemas"]["invoices_line_items_proration_details"] + | null; /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ quantity?: number | null; /** @description The subscription that the invoice item pertains to, if any. */ @@ -8781,6 +10178,11 @@ export interface components { * @enum {string} */ type: "invoiceitem" | "subscription"; + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null; }; /** LineItemsDiscountAmount */ line_items_discount_amount: { @@ -8794,6 +10196,18 @@ export interface components { amount: number; rate: components["schemas"]["tax_rate"]; }; + /** linked_account_options_us_bank_account */ + linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string; + }; /** LoginLink */ login_link: { /** @@ -8826,8 +10240,7 @@ export interface components { */ object: "mandate"; /** @description ID of the payment method associated with this mandate. */ - payment_method: Partial & - Partial; + payment_method: string | components["schemas"]["payment_method"]; payment_method_details: components["schemas"]["mandate_payment_method_details"]; single_use?: components["schemas"]["mandate_single_use"]; /** @@ -8875,17 +10288,50 @@ export interface components { /** @description The URL that will contain the mandate that the customer has signed. */ url: string; }; + /** mandate_blik */ + mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null; + off_session?: components["schemas"]["mandate_options_off_session_details_blik"]; + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ("off_session" | "on_session") | null; + }; + /** mandate_link */ + mandate_link: { [key: string]: unknown }; /** mandate_multi_use */ mandate_multi_use: { [key: string]: unknown }; + /** mandate_options_off_session_details_blik */ + mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + amount?: number | null; + /** @description Currency of each recurring payment. */ + currency?: string | null; + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + interval?: ("day" | "month" | "week" | "year") | null; + /** @description Frequency indicator of each recurring payment. */ + interval_count?: number | null; + }; /** mandate_payment_method_details */ mandate_payment_method_details: { acss_debit?: components["schemas"]["mandate_acss_debit"]; au_becs_debit?: components["schemas"]["mandate_au_becs_debit"]; bacs_debit?: components["schemas"]["mandate_bacs_debit"]; + blik?: components["schemas"]["mandate_blik"]; card?: components["schemas"]["card_mandate_payment_method_details"]; + link?: components["schemas"]["mandate_link"]; sepa_debit?: components["schemas"]["mandate_sepa_debit"]; /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ type: string; + us_bank_account?: components["schemas"]["mandate_us_bank_account"]; }; /** mandate_sepa_debit */ mandate_sepa_debit: { @@ -8901,6 +10347,8 @@ export interface components { /** @description On a single use mandate, the currency of the payment. */ currency: string; }; + /** mandate_us_bank_account */ + mandate_us_bank_account: { [key: string]: unknown }; /** networks */ networks: { /** @description All available networks for the card. */ @@ -8932,26 +10380,37 @@ export interface components { user_agent?: string | null; }; /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number; - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null; - /** @description ID of the Connect Application that created the order. */ - application?: string | null; - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null; - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: - | (Partial & Partial) + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + amount_subtotal: number; + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + amount_total: number; + /** @description ID of the Connect application that created the Order, if any. */ + application?: (string | components["schemas"]["application"]) | null; + automatic_tax?: components["schemas"]["orders_v2_resource_automatic_tax"]; + /** @description Customer billing details associated with the order. */ + billing_details?: + | components["schemas"]["orders_v2_resource_billing_details"] | null; + /** @description The fields on the Order that can be updated from the client */ + client_permissions?: + | components["schemas"]["orders_v2_resource_client_permissions"] + | null; + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + client_secret?: string | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8959,36 +10418,29 @@ export interface components { created: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; - /** @description The email address of the customer placing the order. */ - email?: string | null; - /** @description External coupon code to load for this order. */ - external_coupon_code?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components["schemas"]["discount"])[] | null; /** @description Unique identifier for the object. */ id: string; - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components["schemas"]["order_item"][]; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null; - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: "order"; + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + ip_address?: string | null; /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. */ - returns?: { + line_items?: { /** @description Details about each object. */ - data: components["schemas"]["order_return"][]; + data: components["schemas"]["item"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -8998,90 +10450,406 @@ export interface components { object: "list"; /** @description The URL where this list can be accessed. */ url: string; - } | null; - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null; - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: Partial | null; - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components["schemas"]["shipping_method"][] | null; - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string; - /** @description The timestamps at which the order status was updated. */ - status_transitions?: Partial< - components["schemas"]["status_transitions"] - > | null; + }; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null; /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "order"; + payment: components["schemas"]["orders_v2_resource_payment"]; + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: + | components["schemas"]["orders_v2_resource_shipping_cost"] + | null; + /** @description Customer shipping information associated with the order. */ + shipping_details?: + | components["schemas"]["orders_v2_resource_shipping_details"] + | null; + /** + * @description The overall status of the order. + * @enum {string} */ - updated?: number | null; - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string; + status: "canceled" | "complete" | "open" | "processing" | "submitted"; + tax_details?: components["schemas"]["orders_v2_resource_tax_details"]; + total_details: components["schemas"]["orders_v2_resource_total_details"]; }; - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string; + /** orders_payment_method_options_afterpay_clearpay */ + orders_payment_method_options_afterpay_clearpay: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - object: "order_item"; - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: (Partial & Partial) | null; - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null; - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string; + capture_method?: "automatic" | "manual"; + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + reference?: string | null; + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: "none"; }; - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number; + /** OrdersV2ResourceAutomaticPaymentMethods */ + orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + enabled: boolean; + }; + /** OrdersV2ResourceAutomaticTax */ + orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + enabled: boolean; /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} */ - created: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description Unique identifier for the object. */ - id: string; - /** @description The items included in this order return. */ - items: components["schemas"]["order_item"][]; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; + status?: ("complete" | "failed" | "requires_location_inputs") | null; + }; + /** OrdersV2ResourceBillingDetails */ + orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + address?: components["schemas"]["address"] | null; + /** @description Email address for the order. */ + email?: string | null; + /** @description Full name for the order. */ + name?: string | null; + /** @description Billing phone number for the order (including extension). */ + phone?: string | null; + }; + /** OrdersV2ResourceCardPaymentMethodOptions */ + orders_v2_resource_card_payment_method_options: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: "automatic" | "manual"; + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - object: "order_return"; - /** @description The order that this return includes items from. */ - order?: - | (Partial & Partial) + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** OrdersV2ResourceClientPermissions */ + orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + billing_details?: ("allow" | "disallow") | null; + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + promotion_codes?: ("allow" | "disallow") | null; + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + shipping_details?: ("allow" | "disallow") | null; + }; + /** OrdersV2ResourcePayment */ + orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + payment_intent?: + | (string | components["schemas"]["payment_intent"]) | null; - /** @description The ID of the refund issued for this return. */ - refund?: - | (Partial & Partial) + /** @description Settings describing how the order should configure generated PaymentIntents. */ + settings?: + | components["schemas"]["orders_v2_resource_payment_settings"] + | null; + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + status?: + | ( + | "canceled" + | "complete" + | "not_required" + | "processing" + | "requires_action" + | "requires_capture" + | "requires_confirmation" + | "requires_payment_method" + ) + | null; + }; + /** OrdersV2ResourcePaymentMethodOptions */ + orders_v2_resource_payment_method_options: { + acss_debit?: components["schemas"]["payment_intent_payment_method_options_acss_debit"]; + afterpay_clearpay?: components["schemas"]["orders_payment_method_options_afterpay_clearpay"]; + alipay?: components["schemas"]["payment_method_options_alipay"]; + bancontact?: components["schemas"]["payment_method_options_bancontact"]; + card?: components["schemas"]["orders_v2_resource_card_payment_method_options"]; + customer_balance?: components["schemas"]["payment_method_options_customer_balance"]; + ideal?: components["schemas"]["payment_method_options_ideal"]; + klarna?: components["schemas"]["payment_method_options_klarna"]; + link?: components["schemas"]["payment_intent_payment_method_options_link"]; + oxxo?: components["schemas"]["payment_method_options_oxxo"]; + p24?: components["schemas"]["payment_method_options_p24"]; + paypal?: components["schemas"]["payment_method_options_paypal"]; + sepa_debit?: components["schemas"]["payment_intent_payment_method_options_sepa_debit"]; + sofort?: components["schemas"]["payment_method_options_sofort"]; + wechat_pay?: components["schemas"]["payment_method_options_wechat_pay"]; + }; + /** OrdersV2ResourcePaymentSettings */ + orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null; + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + automatic_payment_methods?: + | components["schemas"]["orders_v2_resource_automatic_payment_methods"] + | null; + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + payment_method_options?: + | components["schemas"]["orders_v2_resource_payment_method_options"] + | null; + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | "acss_debit" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "card" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "link" + | "oxxo" + | "p24" + | "sepa_debit" + | "sofort" + | "wechat_pay" + )[] + | null; + /** @description The URL to redirect the customer to after they authenticate their payment. */ + return_url?: string | null; + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null; + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + transfer_data?: + | components["schemas"]["orders_v2_resource_transfer_data"] | null; }; + /** OrdersV2ResourceShippingCost */ + orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number; + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number; + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number; + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components["schemas"]["shipping_rate"]) | null; + /** @description The taxes applied to the shipping rate. */ + taxes?: components["schemas"]["line_items_tax_amount"][]; + }; + /** OrdersV2ResourceShippingDetails */ + orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + address?: components["schemas"]["address"] | null; + /** @description Recipient name. */ + name?: string | null; + /** @description Recipient phone (including extension). */ + phone?: string | null; + }; + /** OrdersV2ResourceTaxDetails */ + orders_v2_resource_tax_details: { + /** + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt: "exempt" | "none" | "reverse"; + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + tax_ids: components["schemas"]["orders_v2_resource_tax_details_resource_tax_id"][]; + }; + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + orders_v2_resource_tax_details_resource_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` + * @enum {string} + */ + type: + | "ae_trn" + | "au_abn" + | "au_arn" + | "bg_uic" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "es_cif" + | "eu_oss_vat" + | "eu_vat" + | "gb_vat" + | "ge_vat" + | "hk_br" + | "hu_tin" + | "id_npwp" + | "il_vat" + | "in_gst" + | "is_vat" + | "jp_cn" + | "jp_rn" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "nz_gst" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "th_vat" + | "tw_vat" + | "ua_vat" + | "unknown" + | "us_ein" + | "za_vat"; + /** @description The value of the tax ID. */ + value?: string | null; + }; + /** OrdersV2ResourceTotalDetails */ + orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + amount_discount: number; + /** @description This is the sum of all the shipping amounts. */ + amount_shipping?: number | null; + /** @description This is the sum of all the tax amounts. */ + amount_tax: number; + breakdown?: components["schemas"]["orders_v2_resource_total_details_api_resource_breakdown"]; + }; + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + discounts: components["schemas"]["line_items_discount_amount"][]; + /** @description The aggregated tax amounts by rate. */ + taxes: components["schemas"]["line_items_tax_amount"][]; + }; + /** OrdersV2ResourceTransferData */ + orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + amount?: number | null; + /** @description ID of the Connected account receiving the transfer. */ + destination: string | components["schemas"]["account"]; + }; + /** OutboundPaymentsPaymentMethodDetails */ + outbound_payments_payment_method_details: { + billing_details: components["schemas"]["treasury_shared_resource_billing_details"]; + financial_account?: components["schemas"]["outbound_payments_payment_method_details_financial_account"]; + /** + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} + */ + type: "financial_account" | "us_bank_account"; + us_bank_account?: components["schemas"]["outbound_payments_payment_method_details_us_bank_account"]; + }; + /** outbound_payments_payment_method_details_financial_account */ + outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ + id: string; + /** + * @description The rails used to send funds. + * @enum {string} + */ + network: "stripe"; + }; + /** outbound_payments_payment_method_details_us_bank_account */ + outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ("company" | "individual") | null; + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ("checking" | "savings") | null; + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** @description Last four digits of the bank account number. */ + last4?: string | null; + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: "ach" | "us_domestic_wire"; + /** @description Routing number of the bank account. */ + routing_number?: string | null; + }; + /** OutboundTransfersPaymentMethodDetails */ + outbound_transfers_payment_method_details: { + billing_details: components["schemas"]["treasury_shared_resource_billing_details"]; + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + type: "us_bank_account"; + us_bank_account?: components["schemas"]["outbound_transfers_payment_method_details_us_bank_account"]; + }; + /** outbound_transfers_payment_method_details_us_bank_account */ + outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ("company" | "individual") | null; + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ("checking" | "savings") | null; + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** @description Last four digits of the bank account number. */ + last4?: string | null; + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: "ach" | "us_domestic_wire"; + /** @description Routing number of the bank account. */ + routing_number?: string | null; + }; /** PackageDimensions */ package_dimensions: { /** @description Height, in inches. */ @@ -9093,11 +10861,25 @@ export interface components { /** @description Width, in inches. */ width: number; }; + /** PaymentFlowsAmountDetails */ + payment_flows_amount_details: { + tip?: components["schemas"]["payment_flows_amount_details_resource_tip"]; + }; + /** PaymentFlowsAmountDetailsResourceTip */ + payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + amount?: number; + }; /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ enabled: boolean; }; + /** PaymentFlowsInstallmentOptions */ + payment_flows_installment_options: { + enabled: boolean; + plan?: components["schemas"]["payment_method_details_card_installments_plan"]; + }; /** PaymentFlowsPrivatePaymentMethodsAlipay */ payment_flows_private_payment_methods_alipay: { [key: string]: unknown }; /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -9137,18 +10919,17 @@ export interface components { amount: number; /** @description Amount that can be captured from this PaymentIntent. */ amount_capturable?: number; + amount_details?: components["schemas"]["payment_flows_amount_details"]; /** @description Amount that was collected by this PaymentIntent. */ amount_received?: number; /** @description ID of the Connect application that created the PaymentIntent. */ - application?: - | (Partial & Partial) - | null; + application?: (string | components["schemas"]["application"]) | null; /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ application_fee_amount?: number | null; /** @description Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) */ - automatic_payment_methods?: Partial< - components["schemas"]["payment_flows_automatic_payment_methods_payment_intent"] - > | null; + automatic_payment_methods?: + | components["schemas"]["payment_flows_automatic_payment_methods_payment_intent"] + | null; /** * Format: unix-time * @description Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. @@ -9194,9 +10975,9 @@ export interface components { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ client_secret?: string | null; /** @enum {string} */ @@ -9216,57 +10997,49 @@ 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) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** @description Unique identifier for the object. */ id: string; /** @description ID of the invoice that created this PaymentIntent, if it exists. */ - invoice?: - | (Partial & Partial) - | null; + invoice?: (string | components["schemas"]["invoice"]) | null; /** @description The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. */ - last_payment_error?: Partial | null; + last_payment_error?: components["schemas"]["api_errors"] | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. For more information, see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). */ metadata?: { [key: string]: string }; /** @description If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. */ - next_action?: Partial< - components["schemas"]["payment_intent_next_action"] - > | null; + next_action?: components["schemas"]["payment_intent_next_action"] | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ object: "payment_intent"; /** @description The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** @description ID of the payment method used in this PaymentIntent. */ payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description Payment-method-specific configuration for this PaymentIntent. */ - payment_method_options?: Partial< - components["schemas"]["payment_intent_payment_method_options"] - > | null; + payment_method_options?: + | components["schemas"]["payment_intent_payment_method_options"] + | null; /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ payment_method_types: string[]; /** @description If present, this property tells you about the processing state of the payment. */ - processing?: Partial< - components["schemas"]["payment_intent_processing"] - > | null; + processing?: components["schemas"]["payment_intent_processing"] | null; /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string | null; /** @description ID of the review associated with this PaymentIntent, if any. */ - review?: - | (Partial & Partial) - | null; + review?: (string | components["schemas"]["review"]) | null; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9277,7 +11050,7 @@ export interface components { */ setup_future_usage?: ("off_session" | "on_session") | null; /** @description Shipping information for this PaymentIntent. */ - shipping?: Partial | null; + shipping?: components["schemas"]["shipping"] | null; /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ statement_descriptor?: string | null; /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ @@ -9295,17 +11068,25 @@ export interface components { | "requires_payment_method" | "succeeded"; /** @description The data with which to automatically create a Transfer when the payment is finalized. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_data?: Partial | null; + transfer_data?: components["schemas"]["transfer_data"] | null; /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ transfer_group?: string | null; }; /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown }; + payment_intent_card_processing: { + customer_notification?: components["schemas"]["payment_intent_processing_customer_notification"]; + }; /** PaymentIntentNextAction */ payment_intent_next_action: { alipay_handle_redirect?: components["schemas"]["payment_intent_next_action_alipay_handle_redirect"]; boleto_display_details?: components["schemas"]["payment_intent_next_action_boleto"]; + card_await_notification?: components["schemas"]["payment_intent_next_action_card_await_notification"]; + display_bank_transfer_instructions?: components["schemas"]["payment_intent_next_action_display_bank_transfer_instructions"]; + konbini_display_details?: components["schemas"]["payment_intent_next_action_konbini"]; oxxo_display_details?: components["schemas"]["payment_intent_next_action_display_oxxo_details"]; + paynow_display_qr_code?: components["schemas"]["payment_intent_next_action_paynow_display_qr_code"]; + pix_display_qr_code?: components["schemas"]["payment_intent_next_action_pix_display_qr_code"]; + promptpay_display_qr_code?: components["schemas"]["payment_intent_next_action_promptpay_display_qr_code"]; redirect_to_url?: components["schemas"]["payment_intent_next_action_redirect_to_url"]; /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ type: string; @@ -9341,6 +11122,38 @@ export interface components { /** @description The URL to the downloadable boleto voucher PDF. */ pdf?: string | null; }; + /** PaymentIntentNextActionCardAwaitNotification */ + payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: number | null; + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + customer_approval_required?: boolean | null; + }; + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining?: number | null; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null; + /** @description A list of financial addresses that can be used to fund the customer balance */ + financial_addresses?: components["schemas"]["funding_instructions_bank_transfer_financial_address"][]; + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url?: string | null; + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference?: string | null; + /** + * @description Type of bank transfer + * @enum {string} + */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; /** PaymentIntentNextActionDisplayOxxoDetails */ payment_intent_next_action_display_oxxo_details: { /** @@ -9353,6 +11166,97 @@ export interface components { /** @description OXXO reference number. */ number?: string | null; }; + /** payment_intent_next_action_konbini */ + payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + expires_at: number; + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url?: string | null; + stores: components["schemas"]["payment_intent_next_action_konbini_stores"]; + }; + /** payment_intent_next_action_konbini_familymart */ + payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + confirmation_number?: string; + /** @description The payment code. */ + payment_code: string; + }; + /** payment_intent_next_action_konbini_lawson */ + payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + confirmation_number?: string; + /** @description The payment code. */ + payment_code: string; + }; + /** payment_intent_next_action_konbini_ministop */ + payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + confirmation_number?: string; + /** @description The payment code. */ + payment_code: string; + }; + /** payment_intent_next_action_konbini_seicomart */ + payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + confirmation_number?: string; + /** @description The payment code. */ + payment_code: string; + }; + /** payment_intent_next_action_konbini_stores */ + payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + familymart?: + | components["schemas"]["payment_intent_next_action_konbini_familymart"] + | null; + /** @description Lawson instruction details. */ + lawson?: + | components["schemas"]["payment_intent_next_action_konbini_lawson"] + | null; + /** @description Ministop instruction details. */ + ministop?: + | components["schemas"]["payment_intent_next_action_konbini_ministop"] + | null; + /** @description Seicomart instruction details. */ + seicomart?: + | components["schemas"]["payment_intent_next_action_konbini_seicomart"] + | null; + }; + /** PaymentIntentNextActionPaynowDisplayQrCode */ + payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string; + /** @description The image_url_png string used to render QR code */ + image_url_png: string; + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string; + }; + /** PaymentIntentNextActionPixDisplayQrCode */ + payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data?: string; + /** @description The date (unix timestamp) when the PIX expires. */ + expires_at?: number; + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url?: string; + /** @description The image_url_png string used to render png QR code */ + image_url_png?: string; + /** @description The image_url_svg string used to render svg QR code */ + image_url_svg?: string; + }; + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string; + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: string; + /** @description The image_url_png string used to render QR code, can be used as */ + image_url_png: string; + /** @description The image_url_svg string used to render QR code, can be used as */ + image_url_svg: string; + }; /** PaymentIntentNextActionRedirectToUrl */ payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -9369,6 +11273,11 @@ export interface components { arrival_date: number; /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string; + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ("amounts" | "descriptor_code") | null; }; /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -9389,9 +11298,9 @@ export interface components { nonce_str: string; /** @description package is static value */ package: string; - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ partner_id: string; - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ prepay_id: string; /** @description A signature */ sign: string; @@ -9400,125 +11309,114 @@ export interface components { }; /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ native_url: string; }; /** PaymentIntentPaymentMethodOptions */ payment_intent_payment_method_options: { - acss_debit?: Partial< - components["schemas"]["payment_intent_payment_method_options_acss_debit"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - afterpay_clearpay?: Partial< - components["schemas"]["payment_method_options_afterpay_clearpay"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - alipay?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - au_becs_debit?: Partial< - components["schemas"]["payment_intent_payment_method_options_au_becs_debit"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - bacs_debit?: Partial< - components["schemas"]["payment_method_options_bacs_debit"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - bancontact?: Partial< - components["schemas"]["payment_method_options_bancontact"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - boleto?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - card?: Partial< - components["schemas"]["payment_intent_payment_method_options_card"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - card_present?: Partial< - components["schemas"]["payment_method_options_card_present"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - eps?: Partial< - components["schemas"]["payment_intent_payment_method_options_eps"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - fpx?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - giropay?: Partial< - components["schemas"]["payment_method_options_giropay"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - grabpay?: Partial< - components["schemas"]["payment_method_options_grabpay"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - ideal?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - interac_present?: Partial< - components["schemas"]["payment_method_options_interac_present"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - klarna?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - oxxo?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - p24?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - sepa_debit?: Partial< - components["schemas"]["payment_intent_payment_method_options_sepa_debit"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - sofort?: Partial & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; - wechat_pay?: Partial< - components["schemas"]["payment_method_options_wechat_pay"] - > & - Partial< - components["schemas"]["payment_intent_type_specific_payment_method_options_client"] - >; + acss_debit?: + | components["schemas"]["payment_intent_payment_method_options_acss_debit"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + affirm?: + | components["schemas"]["payment_method_options_affirm"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + afterpay_clearpay?: + | components["schemas"]["payment_method_options_afterpay_clearpay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + alipay?: + | components["schemas"]["payment_method_options_alipay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + au_becs_debit?: + | components["schemas"]["payment_intent_payment_method_options_au_becs_debit"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + bacs_debit?: + | components["schemas"]["payment_method_options_bacs_debit"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + bancontact?: + | components["schemas"]["payment_method_options_bancontact"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + blik?: + | components["schemas"]["payment_intent_payment_method_options_blik"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + boleto?: + | components["schemas"]["payment_method_options_boleto"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + card?: + | components["schemas"]["payment_intent_payment_method_options_card"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + card_present?: + | components["schemas"]["payment_method_options_card_present"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + customer_balance?: + | components["schemas"]["payment_method_options_customer_balance"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + eps?: + | components["schemas"]["payment_intent_payment_method_options_eps"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + fpx?: + | components["schemas"]["payment_method_options_fpx"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + giropay?: + | components["schemas"]["payment_method_options_giropay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + grabpay?: + | components["schemas"]["payment_method_options_grabpay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + ideal?: + | components["schemas"]["payment_method_options_ideal"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + interac_present?: + | components["schemas"]["payment_method_options_interac_present"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + klarna?: + | components["schemas"]["payment_method_options_klarna"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + konbini?: + | components["schemas"]["payment_method_options_konbini"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + link?: + | components["schemas"]["payment_intent_payment_method_options_link"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + oxxo?: + | components["schemas"]["payment_method_options_oxxo"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + p24?: + | components["schemas"]["payment_method_options_p24"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + paynow?: + | components["schemas"]["payment_method_options_paynow"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + pix?: + | components["schemas"]["payment_method_options_pix"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + promptpay?: + | components["schemas"]["payment_method_options_promptpay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + sepa_debit?: + | components["schemas"]["payment_intent_payment_method_options_sepa_debit"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + sofort?: + | components["schemas"]["payment_method_options_sofort"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + us_bank_account?: + | components["schemas"]["payment_intent_payment_method_options_us_bank_account"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; + wechat_pay?: + | components["schemas"]["payment_method_options_wechat_pay"] + | components["schemas"]["payment_intent_type_specific_payment_method_options_client"]; }; /** payment_intent_payment_method_options_acss_debit */ payment_intent_payment_method_options_acss_debit: { mandate_options?: components["schemas"]["payment_intent_payment_method_options_mandate_options_acss_debit"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; /** * @description Bank account verification method. * @enum {string} @@ -9527,18 +11425,37 @@ export interface components { }; /** payment_intent_payment_method_options_au_becs_debit */ payment_intent_payment_method_options_au_becs_debit: { - [key: string]: unknown; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; }; + /** payment_intent_payment_method_options_blik */ + payment_intent_payment_method_options_blik: { [key: string]: unknown }; /** payment_intent_payment_method_options_card */ payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; /** * @description Installment details for this payment (Mexico only). * * 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?: + | components["schemas"]["payment_method_options_card_installments"] + | null; + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: + | components["schemas"]["payment_method_options_card_mandate_options"] + | null; /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9571,9 +11488,42 @@ export interface components { * @enum {string} */ setup_future_usage?: "none" | "off_session" | "on_session"; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string; + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string; }; /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown }; + payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_intent_payment_method_options_link */ + payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session"; + }; /** payment_intent_payment_method_options_mandate_options_acss_debit */ payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9598,6 +11548,33 @@ export interface components { /** payment_intent_payment_method_options_sepa_debit */ payment_intent_payment_method_options_sepa_debit: { mandate_options?: components["schemas"]["payment_intent_payment_method_options_mandate_options_sepa_debit"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_intent_payment_method_options_us_bank_account */ + payment_intent_payment_method_options_us_bank_account: { + financial_connections?: components["schemas"]["linked_account_options_us_bank_account"]; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; /** PaymentIntentProcessing */ payment_intent_processing: { @@ -9608,8 +11585,24 @@ export interface components { */ type: "card"; }; + /** PaymentIntentProcessingCustomerNotification */ + payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + approval_requested?: boolean | null; + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + completes_at?: number | null; + }; /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; + installments?: components["schemas"]["payment_flows_installment_options"]; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9619,6 +11612,11 @@ export interface components { * @enum {string} */ setup_future_usage?: "none" | "off_session" | "on_session"; + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant" | "microdeposits"; }; /** * PaymentLink @@ -9644,6 +11642,17 @@ export interface components { * @enum {string} */ billing_address_collection: "auto" | "required"; + /** @description When set, provides configuration to gather active consent from customers. */ + consent_collection?: + | components["schemas"]["payment_links_resource_consent_collection"] + | null; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + customer_creation: "always" | "if_required"; /** @description Unique identifier for the object. */ id: string; /** @@ -9673,24 +11682,67 @@ export interface components { */ object: "payment_link"; /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ - on_behalf_of?: - | (Partial & Partial) + on_behalf_of?: (string | components["schemas"]["account"]) | null; + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data?: + | components["schemas"]["payment_links_resource_payment_intent_data"] | null; + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + payment_method_collection: "always" | "if_required"; /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: "card"[] | null; + payment_method_types?: + | ( + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | null; phone_number_collection: components["schemas"]["payment_links_resource_phone_number_collection"]; /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: Partial< - components["schemas"]["payment_links_resource_shipping_address_collection"] - > | null; + shipping_address_collection?: + | components["schemas"]["payment_links_resource_shipping_address_collection"] + | null; + /** @description The shipping rate options applied to the session. */ + shipping_options: components["schemas"]["payment_links_resource_shipping_option"][]; + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + submit_type: "auto" | "book" | "donate" | "pay"; /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ - subscription_data?: Partial< - components["schemas"]["payment_links_resource_subscription_data"] - > | null; + subscription_data?: + | components["schemas"]["payment_links_resource_subscription_data"] + | null; + tax_id_collection: components["schemas"]["payment_links_resource_tax_id_collection"]; /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ - transfer_data?: Partial< - components["schemas"]["payment_links_resource_transfer_data"] - > | null; + transfer_data?: + | components["schemas"]["payment_links_resource_transfer_data"] + | null; /** @description The public URL that can be shared with customers. */ url: string; }; @@ -9719,6 +11771,32 @@ export interface components { /** @description The URL the customer will be redirected to after the purchase is complete. */ url: string; }; + /** PaymentLinksResourceConsentCollection */ + payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + promotions?: ("auto" | "none") | null; + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + terms_of_service?: ("none" | "required") | null; + }; + /** PaymentLinksResourcePaymentIntentData */ + payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + capture_method?: ("automatic" | "manual") | null; + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + setup_future_usage?: ("off_session" | "on_session") | null; + }; /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9967,34 +12045,50 @@ export interface components { | "ZZ" )[]; }; + /** PaymentLinksResourceShippingOption */ + payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number; + /** @description The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: string | components["schemas"]["shipping_rate"]; + }; /** PaymentLinksResourceSubscriptionData */ payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null; /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days?: number | null; }; + /** PaymentLinksResourceTaxIdCollection */ + payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + enabled: boolean; + }; /** PaymentLinksResourceTransferData */ payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ amount?: number | null; /** @description The connected account receiving the transfer. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to * Customer objects to store instrument details for future payments. * * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). */ payment_method: { acss_debit?: components["schemas"]["payment_method_acss_debit"]; + affirm?: components["schemas"]["payment_method_affirm"]; afterpay_clearpay?: components["schemas"]["payment_method_afterpay_clearpay"]; alipay?: components["schemas"]["payment_flows_private_payment_methods_alipay"]; au_becs_debit?: components["schemas"]["payment_method_au_becs_debit"]; bacs_debit?: components["schemas"]["payment_method_bacs_debit"]; bancontact?: components["schemas"]["payment_method_bancontact"]; billing_details: components["schemas"]["billing_details"]; + blik?: components["schemas"]["payment_method_blik"]; boleto?: components["schemas"]["payment_method_boleto"]; card?: components["schemas"]["payment_method_card"]; card_present?: components["schemas"]["payment_method_card_present"]; @@ -10004,9 +12098,8 @@ export interface components { */ created: number; /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ - customer?: - | (Partial & Partial) - | null; + customer?: (string | components["schemas"]["customer"]) | null; + customer_balance?: components["schemas"]["payment_method_customer_balance"]; eps?: components["schemas"]["payment_method_eps"]; fpx?: components["schemas"]["payment_method_fpx"]; giropay?: components["schemas"]["payment_method_giropay"]; @@ -10016,6 +12109,8 @@ export interface components { ideal?: components["schemas"]["payment_method_ideal"]; interac_present?: components["schemas"]["payment_method_interac_present"]; klarna?: components["schemas"]["payment_method_klarna"]; + konbini?: components["schemas"]["payment_method_konbini"]; + link?: components["schemas"]["payment_method_link"]; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -10027,6 +12122,10 @@ export interface components { object: "payment_method"; oxxo?: components["schemas"]["payment_method_oxxo"]; p24?: components["schemas"]["payment_method_p24"]; + paynow?: components["schemas"]["payment_method_paynow"]; + pix?: components["schemas"]["payment_method_pix"]; + promptpay?: components["schemas"]["payment_method_promptpay"]; + radar_options?: components["schemas"]["radar_radar_options"]; sepa_debit?: components["schemas"]["payment_method_sepa_debit"]; sofort?: components["schemas"]["payment_method_sofort"]; /** @@ -10035,14 +12134,17 @@ export interface components { */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" | "card" | "card_present" + | "customer_balance" | "eps" | "fpx" | "giropay" @@ -10050,11 +12152,18 @@ export interface components { | "ideal" | "interac_present" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; + us_bank_account?: components["schemas"]["payment_method_us_bank_account"]; wechat_pay?: components["schemas"]["payment_method_wechat_pay"]; }; /** payment_method_acss_debit */ @@ -10070,6 +12179,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null; }; + /** payment_method_affirm */ + payment_method_affirm: { [key: string]: unknown }; /** payment_method_afterpay_clearpay */ payment_method_afterpay_clearpay: { [key: string]: unknown }; /** payment_method_au_becs_debit */ @@ -10092,6 +12203,8 @@ export interface components { }; /** payment_method_bancontact */ payment_method_bancontact: { [key: string]: unknown }; + /** payment_method_blik */ + payment_method_blik: { [key: string]: unknown }; /** payment_method_boleto */ payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -10102,9 +12215,7 @@ export interface components { /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand: string; /** @description Checks on Card address and CVC if provided. */ - checks?: Partial< - components["schemas"]["payment_method_card_checks"] - > | null; + checks?: components["schemas"]["payment_method_card_checks"] | null; /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ country?: string | null; /** @description Two-digit number representing the card's expiration month. */ @@ -10120,21 +12231,19 @@ export interface components { /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ funding: string; /** @description Details of the original PaymentMethod that created this object. */ - generated_from?: Partial< - components["schemas"]["payment_method_card_generated_card"] - > | null; + generated_from?: + | components["schemas"]["payment_method_card_generated_card"] + | null; /** @description The last four digits of the card. */ last4: string; /** @description Contains information about card networks that can be used to process the payment. */ - networks?: Partial | null; + networks?: components["schemas"]["networks"] | null; /** @description 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?: + | components["schemas"]["three_d_secure_usage"] + | null; /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: Partial< - components["schemas"]["payment_method_card_wallet"] - > | null; + wallet?: components["schemas"]["payment_method_card_wallet"] | null; }; /** payment_method_card_checks */ payment_method_card_checks: { @@ -10150,13 +12259,11 @@ export interface components { /** @description The charge that created this object. */ charge?: string | null; /** @description Transaction-specific details of the payment method used in the payment. */ - payment_method_details?: Partial< - components["schemas"]["card_generated_from_payment_method_details"] - > | null; - /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ - setup_attempt?: - | (Partial & Partial) + payment_method_details?: + | components["schemas"]["card_generated_from_payment_method_details"] | null; + /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ + setup_attempt?: (string | components["schemas"]["setup_attempt"]) | null; }; /** payment_method_card_present */ payment_method_card_present: { [key: string]: unknown }; @@ -10193,40 +12300,45 @@ export interface components { /** payment_method_card_wallet_masterpass */ payment_method_card_wallet_masterpass: { /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: Partial | null; + billing_address?: components["schemas"]["address"] | null; /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ email?: string | null; /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ name?: string | null; /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: Partial | null; + shipping_address?: components["schemas"]["address"] | null; }; /** payment_method_card_wallet_samsung_pay */ payment_method_card_wallet_samsung_pay: { [key: string]: unknown }; /** payment_method_card_wallet_visa_checkout */ payment_method_card_wallet_visa_checkout: { /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: Partial | null; + billing_address?: components["schemas"]["address"] | null; /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ email?: string | null; /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ name?: string | null; /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: Partial | null; + shipping_address?: components["schemas"]["address"] | null; }; + /** payment_method_customer_balance */ + payment_method_customer_balance: { [key: string]: unknown }; /** payment_method_details */ payment_method_details: { ach_credit_transfer?: components["schemas"]["payment_method_details_ach_credit_transfer"]; ach_debit?: components["schemas"]["payment_method_details_ach_debit"]; acss_debit?: components["schemas"]["payment_method_details_acss_debit"]; + affirm?: components["schemas"]["payment_method_details_affirm"]; afterpay_clearpay?: components["schemas"]["payment_method_details_afterpay_clearpay"]; alipay?: components["schemas"]["payment_flows_private_payment_methods_alipay_details"]; au_becs_debit?: components["schemas"]["payment_method_details_au_becs_debit"]; bacs_debit?: components["schemas"]["payment_method_details_bacs_debit"]; bancontact?: components["schemas"]["payment_method_details_bancontact"]; + blik?: components["schemas"]["payment_method_details_blik"]; boleto?: components["schemas"]["payment_method_details_boleto"]; card?: components["schemas"]["payment_method_details_card"]; card_present?: components["schemas"]["payment_method_details_card_present"]; + customer_balance?: components["schemas"]["payment_method_details_customer_balance"]; eps?: components["schemas"]["payment_method_details_eps"]; fpx?: components["schemas"]["payment_method_details_fpx"]; giropay?: components["schemas"]["payment_method_details_giropay"]; @@ -10234,9 +12346,14 @@ export interface components { ideal?: components["schemas"]["payment_method_details_ideal"]; interac_present?: components["schemas"]["payment_method_details_interac_present"]; klarna?: components["schemas"]["payment_method_details_klarna"]; + konbini?: components["schemas"]["payment_method_details_konbini"]; + link?: components["schemas"]["payment_method_details_link"]; multibanco?: components["schemas"]["payment_method_details_multibanco"]; oxxo?: components["schemas"]["payment_method_details_oxxo"]; p24?: components["schemas"]["payment_method_details_p24"]; + paynow?: components["schemas"]["payment_method_details_paynow"]; + pix?: components["schemas"]["payment_method_details_pix"]; + promptpay?: components["schemas"]["payment_method_details_promptpay"]; 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"]; @@ -10246,6 +12363,7 @@ export interface components { * It contains information specific to the payment method. */ type: string; + us_bank_account?: components["schemas"]["payment_method_details_us_bank_account"]; wechat?: components["schemas"]["payment_method_details_wechat"]; wechat_pay?: components["schemas"]["payment_method_details_wechat_pay"]; }; @@ -10293,6 +12411,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null; }; + /** payment_method_details_affirm */ + payment_method_details_affirm: { [key: string]: unknown }; /** payment_method_details_afterpay_clearpay */ payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -10330,11 +12450,11 @@ export interface components { bic?: string | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ generated_sepa_debit?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ generated_sepa_debit_mandate?: - | (Partial & Partial) + | (string | components["schemas"]["mandate"]) | null; /** @description Last four characters of the IBAN. */ iban_last4?: string | null; @@ -10350,6 +12470,8 @@ export interface components { */ verified_name?: string | null; }; + /** payment_method_details_blik */ + payment_method_details_blik: { [key: string]: unknown }; /** payment_method_details_boleto */ payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -10360,9 +12482,9 @@ export interface components { /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null; /** @description Check results by Card networks on Card address and CVC at time of payment. */ - checks?: Partial< - components["schemas"]["payment_method_details_card_checks"] - > | null; + checks?: + | components["schemas"]["payment_method_details_card_checks"] + | null; /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ country?: string | null; /** @description Two-digit number representing the card's expiration month. */ @@ -10382,21 +12504,21 @@ 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?: + | components["schemas"]["payment_method_details_card_installments"] + | null; /** @description The last four digits of the card. */ last4?: string | null; + /** @description ID of the mandate used to make this payment or created by it. */ + mandate?: string | null; /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null; /** @description Populated if this transaction used 3D Secure authentication. */ - three_d_secure?: Partial< - components["schemas"]["three_d_secure_details"] - > | null; + three_d_secure?: components["schemas"]["three_d_secure_details"] | null; /** @description If this Card is part of a card wallet, this contains the details of the card wallet. */ - wallet?: Partial< - components["schemas"]["payment_method_details_card_wallet"] - > | null; + wallet?: + | components["schemas"]["payment_method_details_card_wallet"] + | null; }; /** payment_method_details_card_checks */ payment_method_details_card_checks: { @@ -10410,9 +12532,9 @@ export interface components { /** payment_method_details_card_installments */ payment_method_details_card_installments: { /** @description Installment plan selected for the payment. */ - plan?: Partial< - components["schemas"]["payment_method_details_card_installments_plan"] - > | null; + plan?: + | components["schemas"]["payment_method_details_card_installments_plan"] + | null; }; /** payment_method_details_card_installments_plan */ payment_method_details_card_installments_plan: { @@ -10436,287 +12558,297 @@ export interface components { amount_authorized?: number | null; /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null; - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null; - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null; - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null; - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number; - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number; /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null; - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null; - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null; - /** @description The last four digits of the card. */ - last4?: string | null; - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null; - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null; - /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: - | ( - | "contact_emv" - | "contactless_emv" - | "contactless_magstripe_mode" - | "magnetic_stripe_fallback" - | "magnetic_stripe_track2" - ) - | null; - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: Partial< - components["schemas"]["payment_method_details_card_present_receipt"] - > | null; - }; - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: "checking" | "credit" | "prepaid" | "unknown"; - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null; - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null; - /** @description Identifier for this transaction. */ - authorization_code?: string | null; - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null; - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null; - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null; - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null; - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null; - }; - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components["schemas"]["payment_method_details_card_wallet_amex_express_checkout"]; - apple_pay?: components["schemas"]["payment_method_details_card_wallet_apple_pay"]; - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null; - google_pay?: components["schemas"]["payment_method_details_card_wallet_google_pay"]; - masterpass?: components["schemas"]["payment_method_details_card_wallet_masterpass"]; - samsung_pay?: components["schemas"]["payment_method_details_card_wallet_samsung_pay"]; - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: - | "amex_express_checkout" - | "apple_pay" - | "google_pay" - | "masterpass" - | "samsung_pay" - | "visa_checkout"; - visa_checkout?: components["schemas"]["payment_method_details_card_wallet_visa_checkout"]; - }; - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { - [key: string]: unknown; - }; - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown }; - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown }; - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: Partial | null; - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null; - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null; - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: Partial | null; - }; - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown }; - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: Partial | null; - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null; - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null; - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: Partial | null; - }; - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | "arzte_und_apotheker_bank" - | "austrian_anadi_bank_ag" - | "bank_austria" - | "bankhaus_carl_spangler" - | "bankhaus_schelhammer_und_schattera_ag" - | "bawag_psk_ag" - | "bks_bank_ag" - | "brull_kallmus_bank_ag" - | "btv_vier_lander_bank" - | "capital_bank_grawe_gruppe_ag" - | "dolomitenbank" - | "easybank_ag" - | "erste_bank_und_sparkassen" - | "hypo_alpeadriabank_international_ag" - | "hypo_bank_burgenland_aktiengesellschaft" - | "hypo_noe_lb_fur_niederosterreich_u_wien" - | "hypo_oberosterreich_salzburg_steiermark" - | "hypo_tirol_bank_ag" - | "hypo_vorarlberg_bank_ag" - | "marchfelder_bank" - | "oberbank_ag" - | "raiffeisen_bankengruppe_osterreich" - | "schoellerbank_ag" - | "sparda_bank_wien" - | "volksbank_gruppe" - | "volkskreditbank_ag" - | "vr_bank_braunau" - ) - | null; - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null; - }; - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | "affin_bank" - | "agrobank" - | "alliance_bank" - | "ambank" - | "bank_islam" - | "bank_muamalat" - | "bank_rakyat" - | "bsn" - | "cimb" - | "deutsche_bank" - | "hong_leong_bank" - | "hsbc" - | "kfh" - | "maybank2e" - | "maybank2u" - | "ocbc" - | "pb_enterprise" - | "public_bank" - | "rhb" - | "standard_chartered" - | "uob"; - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null; - }; - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null; - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null; - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null; - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null; - }; - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null; - }; - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | "abn_amro" - | "asn_bank" - | "bunq" - | "handelsbanken" - | "ing" - | "knab" - | "moneyou" - | "rabobank" - | "regiobank" - | "revolut" - | "sns_bank" - | "triodos_bank" - | "van_lanschot" - ) - | null; - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | "ABNANL2A" - | "ASNBNL21" - | "BUNQNL2A" - | "FVLBNL22" - | "HANDNL2A" - | "INGBNL2A" - | "KNABNL2H" - | "MOYONL21" - | "RABONL2U" - | "RBRBNL21" - | "REVOLT21" - | "SNSBNL2A" - | "TRIONL2U" - ) - | null; - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: - | (Partial & Partial) - | null; - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: - | (Partial & Partial) - | null; - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null; - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - verified_name?: string | null; - }; - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null; + capture_before?: number; + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null; + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null; + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null; + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number; + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number; + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null; + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null; + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null; + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + incremental_authorization_supported: boolean; + /** @description The last four digits of the card. */ + last4?: string | null; + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null; + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: boolean; + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: + | ( + | "contact_emv" + | "contactless_emv" + | "contactless_magstripe_mode" + | "magnetic_stripe_fallback" + | "magnetic_stripe_track2" + ) + | null; + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: + | components["schemas"]["payment_method_details_card_present_receipt"] + | null; + }; + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: "checking" | "credit" | "prepaid" | "unknown"; + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null; + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null; + /** @description Identifier for this transaction. */ + authorization_code?: string | null; + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null; + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null; + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null; + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null; + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null; + }; + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components["schemas"]["payment_method_details_card_wallet_amex_express_checkout"]; + apple_pay?: components["schemas"]["payment_method_details_card_wallet_apple_pay"]; + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null; + google_pay?: components["schemas"]["payment_method_details_card_wallet_google_pay"]; + masterpass?: components["schemas"]["payment_method_details_card_wallet_masterpass"]; + samsung_pay?: components["schemas"]["payment_method_details_card_wallet_samsung_pay"]; + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: + | "amex_express_checkout" + | "apple_pay" + | "google_pay" + | "masterpass" + | "samsung_pay" + | "visa_checkout"; + visa_checkout?: components["schemas"]["payment_method_details_card_wallet_visa_checkout"]; + }; + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { + [key: string]: unknown; + }; + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown }; + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown }; + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components["schemas"]["address"] | null; + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null; + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null; + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components["schemas"]["address"] | null; + }; + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown }; + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components["schemas"]["address"] | null; + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null; + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null; + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components["schemas"]["address"] | null; + }; + /** payment_method_details_customer_balance */ + payment_method_details_customer_balance: { [key: string]: unknown }; + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | "arzte_und_apotheker_bank" + | "austrian_anadi_bank_ag" + | "bank_austria" + | "bankhaus_carl_spangler" + | "bankhaus_schelhammer_und_schattera_ag" + | "bawag_psk_ag" + | "bks_bank_ag" + | "brull_kallmus_bank_ag" + | "btv_vier_lander_bank" + | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" + | "dolomitenbank" + | "easybank_ag" + | "erste_bank_und_sparkassen" + | "hypo_alpeadriabank_international_ag" + | "hypo_bank_burgenland_aktiengesellschaft" + | "hypo_noe_lb_fur_niederosterreich_u_wien" + | "hypo_oberosterreich_salzburg_steiermark" + | "hypo_tirol_bank_ag" + | "hypo_vorarlberg_bank_ag" + | "marchfelder_bank" + | "oberbank_ag" + | "raiffeisen_bankengruppe_osterreich" + | "schoellerbank_ag" + | "sparda_bank_wien" + | "volksbank_gruppe" + | "volkskreditbank_ag" + | "vr_bank_braunau" + ) + | null; + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null; + }; + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob"; + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null; + }; + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null; + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null; + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null; + }; + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null; + }; + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot" + ) + | null; + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | "ABNANL2A" + | "ASNBNL21" + | "BUNQNL2A" + | "FVLBNL22" + | "HANDNL2A" + | "INGBNL2A" + | "KNABNL2H" + | "MOYONL21" + | "RABONL2U" + | "RBRBNL21" + | "REVOLT21" + | "SNSBNL2A" + | "TRIONL2U" + ) + | null; + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: + | (string | components["schemas"]["payment_method"]) + | null; + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: + | (string | components["schemas"]["mandate"]) + | null; + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null; + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null; + }; + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null; /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ cardholder_name?: string | null; /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10757,9 +12889,9 @@ export interface components { ) | null; /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: Partial< - components["schemas"]["payment_method_details_interac_present_receipt"] - > | null; + receipt?: + | components["schemas"]["payment_method_details_interac_present_receipt"] + | null; }; /** payment_method_details_interac_present_receipt */ payment_method_details_interac_present_receipt: { @@ -10794,10 +12926,27 @@ export interface components { payment_method_category?: string | null; /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ preferred_locale?: string | null; }; + /** payment_method_details_konbini */ + payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store?: + | components["schemas"]["payment_method_details_konbini_store"] + | null; + }; + /** payment_method_details_konbini_store */ + payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + chain?: ("familymart" | "lawson" | "ministop" | "seicomart") | null; + }; + /** payment_method_details_link */ + payment_method_details_link: { [key: string]: unknown }; /** payment_method_details_multibanco */ payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10854,6 +13003,21 @@ export interface components { */ verified_name?: string | null; }; + /** payment_method_details_paynow */ + payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + reference?: string | null; + }; + /** payment_method_details_pix */ + payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + bank_transaction_id?: string | null; + }; + /** payment_method_details_promptpay */ + payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + reference?: string | null; + }; /** payment_method_details_sepa_debit */ payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10881,11 +13045,11 @@ export interface components { country?: string | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ generated_sepa_debit?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ generated_sepa_debit_mandate?: - | (Partial & Partial) + | (string | components["schemas"]["mandate"]) | null; /** @description Last four characters of the IBAN. */ iban_last4?: string | null; @@ -10905,6 +13069,27 @@ export interface components { }; /** payment_method_details_stripe_account */ payment_method_details_stripe_account: { [key: string]: unknown }; + /** payment_method_details_us_bank_account */ + payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ("company" | "individual") | null; + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ("checking" | "savings") | null; + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null; + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** @description Last four digits of the bank account number. */ + last4?: string | null; + /** @description Routing number of the bank account. */ + routing_number?: string | null; + }; /** payment_method_details_wechat */ payment_method_details_wechat: { [key: string]: unknown }; /** payment_method_details_wechat_pay */ @@ -10917,7 +13102,7 @@ export interface components { /** payment_method_eps */ payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ bank?: @@ -10932,6 +13117,7 @@ export interface components { | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" @@ -11035,22 +13221,82 @@ export interface components { /** payment_method_klarna */ payment_method_klarna: { /** @description The customer's date of birth, if provided. */ - dob?: Partial< - components["schemas"]["payment_flows_private_payment_methods_klarna_dob"] - > | null; + dob?: + | components["schemas"]["payment_flows_private_payment_methods_klarna_dob"] + | null; + }; + /** payment_method_konbini */ + payment_method_konbini: { [key: string]: unknown }; + /** payment_method_link */ + payment_method_link: { + /** @description Account owner's email address. */ + email?: string | null; + /** @description Token used for persistent Link logins. */ + persistent_token?: string; + }; + /** payment_method_options_affirm */ + payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; }; /** payment_method_options_afterpay_clearpay */ payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ reference?: string | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; }; /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown }; + payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session"; + }; /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown }; + payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; /** payment_method_options_bancontact */ payment_method_options_bancontact: { /** @@ -11058,11 +13304,29 @@ export interface components { * @enum {string} */ preferred_language: "de" | "en" | "fr" | "nl"; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session"; }; /** payment_method_options_boleto */ payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session" | "on_session"; }; /** payment_method_options_card_installments */ payment_method_options_card_installments: { @@ -11073,58 +13337,314 @@ export interface components { /** @description Whether Installments are enabled for this PaymentIntent. */ enabled: boolean; /** @description Installment plan selected for this PaymentIntent. */ - plan?: Partial< - components["schemas"]["payment_method_details_card_installments_plan"] - > | null; + plan?: + | components["schemas"]["payment_method_details_card_installments_plan"] + | null; + }; + /** payment_method_options_card_mandate_options */ + payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number; + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: "fixed" | "maximum"; + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null; + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null; + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null; + /** @description Unique identifier for the mandate or subscription. */ + reference: string; + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number; + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: "india"[] | null; }; /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown }; + payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + request_extended_authorization?: boolean | null; + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + request_incremental_authorization_support?: boolean | null; + }; + /** payment_method_options_customer_balance */ + payment_method_options_customer_balance: { + bank_transfer?: components["schemas"]["payment_method_options_customer_balance_bank_transfer"]; + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: "bank_transfer" | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_method_options_customer_balance_bank_transfer */ + payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components["schemas"]["payment_method_options_customer_balance_eu_bank_account"]; + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: + | ( + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer" + ) + | null; + }; + /** payment_method_options_customer_balance_eu_bank_account */ + payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: "DE" | "ES" | "FR" | "IE" | "NL"; + }; /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown }; + payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown }; + payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown }; + payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown }; + payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session"; + }; /** payment_method_options_interac_present */ payment_method_options_interac_present: { [key: string]: unknown }; /** payment_method_options_klarna */ payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ preferred_locale?: string | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_method_options_konbini */ + payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number?: string | null; + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null; + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: number | null; + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description?: string | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; }; /** payment_method_options_oxxo */ payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; }; /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown }; - /** payment_method_options_sofort */ - payment_method_options_sofort: { + payment_method_options_p24: { /** - * @description Preferred language of the SOFORT authorization page that the customer is redirected to. - * @enum {string|null} + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} */ - preferred_language?: - | ("de" | "en" | "es" | "fr" | "it" | "nl" | "pl") - | null; + setup_future_usage?: "none"; }; - /** payment_method_options_wechat_pay */ - payment_method_options_wechat_pay: { - /** @description The app ID registered with WeChat Pay. Only required when client is ios or android. */ - app_id?: string | null; + /** payment_method_options_paynow */ + payment_method_options_paynow: { /** - * @description The client type that the end customer will pay from - * @enum {string|null} + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} */ - client?: ("android" | "ios" | "web") | null; + setup_future_usage?: "none"; }; - /** payment_method_oxxo */ - payment_method_oxxo: { [key: string]: unknown }; - /** payment_method_p24 */ - payment_method_p24: { + /** payment_method_options_paypal */ + payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "manual"; + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale?: string | null; + }; + /** payment_method_options_pix */ + payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds?: number | null; + /** @description The timestamp at which the Pix expires. */ + expires_at?: number | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_method_options_promptpay */ + payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_method_options_sofort */ + payment_method_options_sofort: { + /** + * @description Preferred language of the SOFORT authorization page that the customer is redirected to. + * @enum {string|null} + */ + preferred_language?: + | ("de" | "en" | "es" | "fr" | "it" | "nl" | "pl") + | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none" | "off_session"; + }; + /** payment_method_options_wechat_pay */ + payment_method_options_wechat_pay: { + /** @description The app ID registered with WeChat Pay. Only required when client is ios or android. */ + app_id?: string | null; + /** + * @description The client type that the end customer will pay from + * @enum {string|null} + */ + client?: ("android" | "ios" | "web") | null; + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: "none"; + }; + /** payment_method_oxxo */ + payment_method_oxxo: { [key: string]: unknown }; + /** payment_method_p24 */ + payment_method_p24: { /** * @description The customer's bank, if provided. * @enum {string|null} @@ -11159,6 +13679,12 @@ export interface components { ) | null; }; + /** payment_method_paynow */ + payment_method_paynow: { [key: string]: unknown }; + /** payment_method_pix */ + payment_method_pix: { [key: string]: unknown }; + /** payment_method_promptpay */ + payment_method_promptpay: { [key: string]: unknown }; /** payment_method_sepa_debit */ payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -11170,9 +13696,9 @@ export interface components { /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ fingerprint?: string | null; /** @description Information about the object that generated this PaymentMethod. */ - generated_from?: Partial< - components["schemas"]["sepa_debit_generated_from"] - > | null; + generated_from?: + | components["schemas"]["sepa_debit_generated_from"] + | null; /** @description Last four characters of the IBAN. */ last4?: string | null; }; @@ -11181,14 +13707,39 @@ export interface components { /** @description Two-letter ISO code representing the country the bank account is located in. */ country?: string | null; }; + /** payment_method_us_bank_account */ + payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ("company" | "individual") | null; + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ("checking" | "savings") | null; + /** @description The name of the bank. */ + bank_name?: string | null; + /** @description The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account?: string | null; + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null; + /** @description Last four digits of the bank account number. */ + last4?: string | null; + /** @description Contains information about US bank account networks that can be used. */ + networks?: components["schemas"]["us_bank_account_networks"] | null; + /** @description Routing number of the bank account. */ + routing_number?: string | null; + }; /** payment_method_wechat_pay */ payment_method_wechat_pay: { [key: string]: unknown }; /** PaymentPagesCheckoutSessionAfterExpiration */ payment_pages_checkout_session_after_expiration: { /** @description When set, configuration used to recover the Checkout Session on expiry. */ - recovery?: Partial< - components["schemas"]["payment_pages_checkout_session_after_expiration_recovery"] - > | null; + recovery?: + | components["schemas"]["payment_pages_checkout_session_after_expiration_recovery"] + | null; }; /** PaymentPagesCheckoutSessionAfterExpirationRecovery */ payment_pages_checkout_session_after_expiration_recovery: { @@ -11226,6 +13777,11 @@ export interface components { * @enum {string|null} */ promotions?: ("opt_in" | "opt_out") | null; + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + terms_of_service?: "accepted" | null; }; /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -11235,23 +13791,32 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: "auto" | null; + promotions?: ("auto" | "none") | null; + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + terms_of_service?: ("none" | "required") | null; }; /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address?: components["schemas"]["address"] | null; /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email?: string | null; - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name?: string | null; + /** @description The customer's phone number after a completed Checkout Session. */ phone?: string | null; /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ tax_exempt?: ("exempt" | "none" | "reverse") | null; - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: | components["schemas"]["payment_pages_checkout_session_tax_id"][] | null; @@ -11507,24 +14072,37 @@ export interface components { | "ZZ" )[]; }; + /** PaymentPagesCheckoutSessionShippingCost */ + payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number; + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number; + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number; + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components["schemas"]["shipping_rate"]) | null; + /** @description The taxes applied to the shipping rate. */ + taxes?: components["schemas"]["line_items_tax_amount"][]; + }; /** PaymentPagesCheckoutSessionShippingOption */ payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ shipping_amount: number; /** @description The shipping rate. */ - shipping_rate: Partial & - Partial; + shipping_rate: string | components["schemas"]["shipping_rate"]; }; /** PaymentPagesCheckoutSessionTaxID */ payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -11536,10 +14114,12 @@ export interface components { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -11559,6 +14139,7 @@ export interface components { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -11575,28 +14156,27 @@ export interface components { }; /** PaymentPagesCheckoutSessionTotalDetails */ payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number; - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null; - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number; breakdown?: components["schemas"]["payment_pages_checkout_session_total_details_resource_breakdown"]; }; /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components["schemas"]["line_items_discount_amount"][]; - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components["schemas"]["line_items_tax_amount"][]; }; /** Polymorphic */ - payment_source: Partial & - Partial & - Partial & - Partial & - Partial & - Partial; + payment_source: + | components["schemas"]["account"] + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"]; /** * Payout * @description A `Payout` object is created when you receive funds from Stripe, or when you @@ -11620,8 +14200,7 @@ export interface components { automatic: boolean; /** @description ID of the balance transaction that describes the impact of this payout on your account balance. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** * Format: unix-time @@ -11634,16 +14213,17 @@ export interface components { description?: string | null; /** @description ID of the bank account or card the payout was sent to. */ destination?: - | (Partial & - Partial & - Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["deleted_bank_account"] + | components["schemas"]["deleted_card"] + ) | null; /** @description If the payout failed or was canceled, this will be the ID of the balance transaction that reversed the initial balance transaction, and puts the funds from the failed payout back in your balance. */ failure_balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** @description Error code explaining reason for payout failure if available. See [Types of payout failures](https://stripe.com/docs/api#payout_failures) for a list of failure codes. */ failure_code?: string | null; @@ -11663,13 +14243,9 @@ export interface components { */ object: "payout"; /** @description If the payout reverses another, this is the ID of the original payout. */ - original_payout?: - | (Partial & Partial) - | null; + original_payout?: (string | components["schemas"]["payout"]) | null; /** @description If the payout was reversed, this is the ID of the payout that reverses this payout. */ - reversed_by?: - | (Partial & Partial) - | null; + reversed_by?: (string | components["schemas"]["payout"]) | null; /** @description The source balance this payout came from. One of `card`, `fpx`, or `bank_account`. */ source_type: string; /** @description Extra information about a payout to be displayed on the user's bank statement. */ @@ -11708,12 +14284,10 @@ export interface components { /** @description The account the person is associated with. */ 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?: components["schemas"]["legal_entity_japan_address"] | null; + address_kanji?: + | components["schemas"]["legal_entity_japan_address"] + | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -11730,15 +14304,17 @@ export interface components { first_name_kanji?: string | null; /** @description A list of alternate names or aliases that the person is known by. */ full_name_aliases?: string[]; - future_requirements?: Partial< - components["schemas"]["person_future_requirements"] - > | null; + future_requirements?: + | components["schemas"]["person_future_requirements"] + | null; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string | null; /** @description Unique identifier for the object. */ id: string; /** @description Whether the person's `id_number` was provided. */ id_number_provided?: boolean; + /** @description Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided?: boolean; /** @description The person's last name. */ last_name?: string | null; /** @description The Kana variation of the person's last name (Japan only). */ @@ -11763,10 +14339,9 @@ export interface components { * @enum {string} */ political_exposure?: "existing" | "none"; + registered_address?: components["schemas"]["address"]; relationship?: components["schemas"]["person_relationship"]; - requirements?: Partial< - components["schemas"]["person_requirements"] - > | null; + requirements?: components["schemas"]["person_requirements"] | null; /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ ssn_last_4_provided?: boolean; verification?: components["schemas"]["legal_entity_person_verification"]; @@ -11882,9 +14457,11 @@ export interface components { object: "plan"; /** @description The product whose pricing this plan determines. */ product?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["product"] + | components["schemas"]["deleted_product"] + ) | null; /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ tiers?: components["schemas"]["plan_tier"][]; @@ -11894,9 +14471,7 @@ export interface components { */ tiers_mode?: ("graduated" | "volume") | null; /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_usage?: Partial< - components["schemas"]["transform_usage"] - > | null; + transform_usage?: components["schemas"]["transform_usage"] | null; /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ trial_period_days?: number | null; /** @@ -11945,9 +14520,9 @@ export interface components { /** @description The messaging shown to customers in the portal. */ headline?: string | null; /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string; + privacy_policy_url?: string | null; /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string; + terms_of_service_url?: string | null; }; /** PortalCustomerUpdate */ portal_customer_update: { @@ -11976,6 +14551,17 @@ export interface components { /** @description Whether the feature is enabled. */ enabled: boolean; }; + /** PortalLoginPage */ + portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + enabled: boolean; + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + url?: string | null; + }; /** PortalPaymentMethodUpdate */ portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -12065,6 +14651,12 @@ export interface components { created: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: components["schemas"]["currency_option"]; + }; + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components["schemas"]["custom_unit_amount"] | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12081,11 +14673,12 @@ export interface components { */ object: "price"; /** @description The ID of the product this price is associated with. */ - product: Partial & - Partial & - Partial; + product: + | string + | components["schemas"]["product"] + | components["schemas"]["deleted_product"]; /** @description The recurring components of a price such as `interval` and `usage_type`. */ - recurring?: Partial | null; + recurring?: components["schemas"]["recurring"] | null; /** * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. * @enum {string|null} @@ -12099,9 +14692,7 @@ export interface components { */ tiers_mode?: ("graduated" | "volume") | null; /** @description Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. */ - transform_quantity?: Partial< - components["schemas"]["transform_quantity"] - > | null; + transform_quantity?: components["schemas"]["transform_quantity"] | null; /** * @description One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. * @enum {string} @@ -12153,6 +14744,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: (string | components["schemas"]["price"]) | null; /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string | null; /** @description Unique identifier for the object. */ @@ -12163,7 +14756,7 @@ export interface components { livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string }; - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string; /** * @description String representing the object's type. Objects of the same type share the same value. @@ -12171,17 +14764,13 @@ export interface components { */ object: "product"; /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: Partial< - components["schemas"]["package_dimensions"] - > | null; + package_dimensions?: components["schemas"]["package_dimensions"] | null; /** @description Whether this product is shipped (i.e., physical goods). */ shippable?: boolean | null; /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ statement_descriptor?: string | null; - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: - | (Partial & Partial) - | null; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: (string | components["schemas"]["tax_code"]) | null; /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string | null; /** @@ -12194,7 +14783,7 @@ export interface components { }; /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ promotion_code: { @@ -12210,9 +14799,11 @@ export interface components { created: number; /** @description The customer that this promotion code can be used by. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** * Format: unix-time @@ -12236,8 +14827,17 @@ export interface components { /** @description Number of times this promotion code has been used. */ times_redeemed: number; }; + /** PromotionCodeCurrencyOption */ + promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: number; + }; /** PromotionCodesResourceRestrictions */ promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: components["schemas"]["promotion_code_currency_option"]; + }; /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ first_time_transaction: boolean; /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -12255,6 +14855,14 @@ export interface components { amount_subtotal: number; /** @description Total after discounts and taxes are applied. */ amount_total: number; + /** @description ID of the Connect Application that created the quote. */ + application?: + | ( + | string + | components["schemas"]["application"] + | components["schemas"]["deleted_application"] + ) + | null; /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ application_fee_amount?: number | null; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -12275,18 +14883,18 @@ export interface components { currency?: string | null; /** @description The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description The tax rates applied to this quote. */ - default_tax_rates?: (Partial & - Partial)[]; + default_tax_rates?: (string | components["schemas"]["tax_rate"])[]; /** @description A description that will be displayed on the quote PDF. */ description?: string | null; /** @description The discounts applied to this quote. */ - discounts: (Partial & - Partial)[]; + discounts: (string | components["schemas"]["discount"])[]; /** * Format: unix-time * @description The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. @@ -12295,23 +14903,23 @@ export interface components { /** @description A footer that will be displayed on the quote PDF. */ footer?: string | null; /** @description Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. */ - from_quote?: Partial< - components["schemas"]["quotes_resource_from_quote"] - > | null; + from_quote?: components["schemas"]["quotes_resource_from_quote"] | null; /** @description A header that will be displayed on the quote PDF. */ header?: string | null; /** @description Unique identifier for the object. */ id: string; /** @description The invoice that was created from this quote. */ invoice?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["invoice"] + | components["schemas"]["deleted_invoice"] + ) | null; /** @description All invoices will be billed using the specified settings. */ - invoice_settings?: Partial< - components["schemas"]["invoice_setting_quote_setting"] - > | null; + invoice_settings?: + | components["schemas"]["invoice_setting_quote_setting"] + | null; /** * QuotesResourceListLineItems * @description A list of items the customer is being quoted for. @@ -12341,9 +14949,7 @@ export interface components { */ object: "quote"; /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** * @description The status of the quote. * @enum {string} @@ -12351,20 +14957,21 @@ export interface components { status: "accepted" | "canceled" | "draft" | "open"; status_transitions: components["schemas"]["quotes_resource_status_transitions"]; /** @description The subscription that was created or updated from this quote. */ - subscription?: - | (Partial & Partial) - | null; + subscription?: (string | components["schemas"]["subscription"]) | null; subscription_data: components["schemas"]["quotes_resource_subscription_data"]; /** @description The subscription schedule that was created or updated from this quote. */ subscription_schedule?: - | (Partial & - Partial) + | (string | components["schemas"]["subscription_schedule"]) + | null; + /** @description ID of the test clock this quote belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) | null; total_details: components["schemas"]["quotes_resource_total_details"]; /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ - transfer_data?: Partial< - components["schemas"]["quotes_resource_transfer_data"] - > | null; + transfer_data?: + | components["schemas"]["quotes_resource_transfer_data"] + | null; }; /** QuotesResourceAutomaticTax */ quotes_resource_automatic_tax: { @@ -12379,9 +14986,7 @@ export interface components { /** QuotesResourceComputed */ quotes_resource_computed: { /** @description The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. */ - recurring?: Partial< - components["schemas"]["quotes_resource_recurring"] - > | null; + recurring?: components["schemas"]["quotes_resource_recurring"] | null; upfront: components["schemas"]["quotes_resource_upfront"]; }; /** QuotesResourceFromQuote */ @@ -12389,7 +14994,7 @@ export interface components { /** @description Whether this quote is a revision of a different quote. */ is_revision: boolean; /** @description The quote that was cloned. */ - quote: Partial & Partial; + quote: string | components["schemas"]["quote"]; }; /** QuotesResourceRecurring */ quotes_resource_recurring: { @@ -12426,6 +15031,8 @@ export interface components { }; /** QuotesResourceSubscriptionData */ quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null; /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -12436,19 +15043,19 @@ export interface components { }; /** QuotesResourceTotalDetails */ quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number; - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null; - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number; breakdown?: components["schemas"]["quotes_resource_total_details_resource_breakdown"]; }; /** QuotesResourceTotalDetailsResourceBreakdown */ quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components["schemas"]["line_items_discount_amount"][]; - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components["schemas"]["line_items_tax_amount"][]; }; /** QuotesResourceTransferData */ @@ -12458,7 +15065,7 @@ export interface components { /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. */ amount_percent?: number | null; /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** QuotesResourceUpfront */ quotes_resource_upfront: { @@ -12496,7 +15103,7 @@ export interface components { /** @description An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. */ actionable: boolean; /** @description ID of the charge this early fraud warning is for, optionally expanded. */ - charge: Partial & Partial; + charge: string | components["schemas"]["charge"]; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12514,8 +15121,7 @@ export interface components { */ object: "radar.early_fraud_warning"; /** @description ID of the Payment Intent this early fraud warning is for, optionally expanded. */ - payment_intent?: Partial & - Partial; + payment_intent?: string | components["schemas"]["payment_intent"]; }; /** * RadarListList @@ -12605,6 +15211,14 @@ export interface components { /** @description The identifier of the value list this item belongs to. */ value_list: string; }; + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + session?: string; + }; /** RadarReviewResourceLocation */ radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -12629,68 +15243,15 @@ export interface components { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null; }; - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: Partial | null; - /** CardList */ - cards?: { - data: components["schemas"]["card"][]; - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: "list"; - /** @description The URL where this list can be accessed. */ - url: string; - } | null; - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number; - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: - | (Partial & Partial) - | null; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null; - email?: string | null; - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ id: string; - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string }; - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: - | (Partial & Partial) - | null; - /** @description Full, legal name of the recipient. */ - name?: string | null; /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - object: "recipient"; - rolled_back_from?: Partial & - Partial; - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string; + network: "stripe"; }; /** Recurring */ recurring: { @@ -12727,13 +15288,10 @@ export interface components { amount: number; /** @description Balance transaction that describes the impact on your account balance. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** @description ID of the charge that was refunded. */ - charge?: - | (Partial & Partial) - | null; + charge?: (string | components["schemas"]["charge"]) | null; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12744,14 +15302,18 @@ export interface components { /** @description An arbitrary string attached to the object. Often useful for displaying to users. (Available on non-card refunds only) */ description?: string; /** @description If the refund failed, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. */ - failure_balance_transaction?: Partial & - Partial; + failure_balance_transaction?: + | string + | components["schemas"]["balance_transaction"]; /** @description If the refund failed, the reason for refund failure if known. Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, or `unknown`. */ failure_reason?: string; /** @description Unique identifier for the object. */ id: string; + /** @description Email to which refund instructions, if required, are sent to. */ + instructions_email?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null; + next_action?: components["schemas"]["refund_next_action"]; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12759,7 +15321,7 @@ export interface components { object: "refund"; /** @description ID of the PaymentIntent that was refunded. */ payment_intent?: - | (Partial & Partial) + | (string | components["schemas"]["payment_intent"]) | null; /** * @description Reason for the refund, either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). @@ -12777,16 +15339,32 @@ export interface components { receipt_number?: string | null; /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ source_transfer_reversal?: - | (Partial & - Partial) + | (string | components["schemas"]["transfer_reversal"]) | null; - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ status?: string | null; /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ transfer_reversal?: - | (Partial & - Partial) + | (string | components["schemas"]["transfer_reversal"]) + | null; + }; + /** RefundNextAction */ + refund_next_action: { + /** @description Contains the refund details. */ + display_details?: + | components["schemas"]["refund_next_action_display_details"] | null; + /** @description Type of the next action to perform. */ + type: string; + }; + /** RefundNextActionDisplayDetails */ + refund_next_action_display_details: { + email_sent: components["schemas"]["email_sent"]; + /** + * Format: unix-time + * @description The expiry timestamp. + */ + expires_at: number; }; /** * reporting_report_run @@ -12826,7 +15404,7 @@ export interface components { * @description The file object representing the result of the report run (populated when * `status=succeeded`). */ - result?: Partial | null; + result?: components["schemas"]["file"] | null; /** * @description Status of this report run. This will be `pending` when the run is initially created. * When the run finishes, this will be set to `succeeded` and the `result` field will be populated. @@ -12909,9 +15487,7 @@ export interface components { /** @description The ZIP or postal code of the card used, if applicable. */ billing_zip?: string | null; /** @description The charge associated with this review. */ - charge?: - | (Partial & Partial) - | null; + charge?: (string | components["schemas"]["charge"]) | null; /** * @description The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. * @enum {string|null} @@ -12935,9 +15511,9 @@ export interface components { /** @description The IP address where the payment originated. */ ip_address?: string | null; /** @description Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. */ - ip_address_location?: Partial< - components["schemas"]["radar_review_resource_location"] - > | null; + ip_address_location?: + | components["schemas"]["radar_review_resource_location"] + | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @@ -12953,14 +15529,11 @@ export interface components { */ opened_reason: "manual" | "rule"; /** @description The PaymentIntent ID associated with this review, if one exists. */ - payment_intent?: Partial & - Partial; + payment_intent?: string | components["schemas"]["payment_intent"]; /** @description The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. */ reason: string; /** @description Information related to the browsing session of the user who initiated the payment. */ - session?: Partial< - components["schemas"]["radar_review_resource_session"] - > | null; + session?: components["schemas"]["radar_review_resource_session"] | null; }; /** RadarRule */ rule: { @@ -12991,7 +15564,7 @@ export interface components { data_load_time: number; error?: components["schemas"]["sigma_scheduled_query_run_error"]; /** @description The file object representing the results of the query. */ - file?: Partial | null; + file?: components["schemas"]["file"] | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -13018,16 +15591,22 @@ export interface components { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean; }; + /** SecretServiceResourceScope */ + secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + type: "account" | "user"; + /** @description The user ID, if type is set to "user" */ + user?: string; + }; /** sepa_debit_generated_from */ sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ - charge?: - | (Partial & Partial) - | null; + charge?: (string | components["schemas"]["charge"]) | null; /** @description The ID of the SetupAttempt that generated this PaymentMethod, if any. */ - setup_attempt?: - | (Partial & Partial) - | null; + setup_attempt?: (string | components["schemas"]["setup_attempt"]) | null; }; /** * PaymentFlowsSetupIntentSetupAttempt @@ -13038,9 +15617,13 @@ export interface components { */ setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ - application?: - | (Partial & Partial) - | null; + application?: (string | components["schemas"]["application"]) | null; + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -13048,10 +15631,18 @@ export interface components { created: number; /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ customer?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[] | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -13062,18 +15653,14 @@ export interface components { */ object: "setup_attempt"; /** @description The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** @description ID of the payment method used with this SetupAttempt. */ - payment_method: Partial & - Partial; + payment_method: string | components["schemas"]["payment_method"]; payment_method_details: components["schemas"]["setup_attempt_payment_method_details"]; /** @description The error encountered during this attempt to confirm the SetupIntent, if any. */ - setup_error?: Partial | null; + setup_error?: components["schemas"]["api_errors"] | null; /** @description ID of the SetupIntent that this attempt belongs to. */ - setup_intent: Partial & - Partial; + setup_intent: string | components["schemas"]["setup_intent"]; /** @description Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. */ status: string; /** @description The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. */ @@ -13085,14 +15672,17 @@ export interface components { au_becs_debit?: components["schemas"]["setup_attempt_payment_method_details_au_becs_debit"]; bacs_debit?: components["schemas"]["setup_attempt_payment_method_details_bacs_debit"]; bancontact?: components["schemas"]["setup_attempt_payment_method_details_bancontact"]; + blik?: components["schemas"]["setup_attempt_payment_method_details_blik"]; boleto?: components["schemas"]["setup_attempt_payment_method_details_boleto"]; card?: components["schemas"]["setup_attempt_payment_method_details_card"]; card_present?: components["schemas"]["setup_attempt_payment_method_details_card_present"]; ideal?: components["schemas"]["setup_attempt_payment_method_details_ideal"]; + link?: components["schemas"]["setup_attempt_payment_method_details_link"]; sepa_debit?: components["schemas"]["setup_attempt_payment_method_details_sepa_debit"]; sofort?: components["schemas"]["setup_attempt_payment_method_details_sofort"]; /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ type: string; + us_bank_account?: components["schemas"]["setup_attempt_payment_method_details_us_bank_account"]; }; /** setup_attempt_payment_method_details_acss_debit */ setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown }; @@ -13112,11 +15702,11 @@ export interface components { bic?: string | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit_mandate?: - | (Partial & Partial) + | (string | components["schemas"]["mandate"]) | null; /** @description Last four characters of the IBAN. */ iban_last4?: string | null; @@ -13132,20 +15722,20 @@ export interface components { */ verified_name?: string | null; }; + /** setup_attempt_payment_method_details_blik */ + setup_attempt_payment_method_details_blik: { [key: string]: unknown }; /** setup_attempt_payment_method_details_boleto */ setup_attempt_payment_method_details_boleto: { [key: string]: unknown }; /** setup_attempt_payment_method_details_card */ setup_attempt_payment_method_details_card: { /** @description Populated if this authorization used 3D Secure authentication. */ - three_d_secure?: Partial< - components["schemas"]["three_d_secure_details"] - > | null; + three_d_secure?: components["schemas"]["three_d_secure_details"] | null; }; /** setup_attempt_payment_method_details_card_present */ setup_attempt_payment_method_details_card_present: { /** @description The ID of the Card PaymentMethod which was generated by this SetupAttempt. */ generated_card?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; }; /** setup_attempt_payment_method_details_ideal */ @@ -13194,11 +15784,11 @@ export interface components { | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit_mandate?: - | (Partial & Partial) + | (string | components["schemas"]["mandate"]) | null; /** @description Last four characters of the IBAN. */ iban_last4?: string | null; @@ -13208,6 +15798,8 @@ export interface components { */ verified_name?: string | null; }; + /** setup_attempt_payment_method_details_link */ + setup_attempt_payment_method_details_link: { [key: string]: unknown }; /** setup_attempt_payment_method_details_sepa_debit */ setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown }; /** setup_attempt_payment_method_details_sofort */ @@ -13220,11 +15812,11 @@ export interface components { bic?: string | null; /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. */ generated_sepa_debit_mandate?: - | (Partial & Partial) + | (string | components["schemas"]["mandate"]) | null; /** @description Last four characters of the IBAN. */ iban_last4?: string | null; @@ -13240,6 +15832,10 @@ export interface components { */ verified_name?: string | null; }; + /** setup_attempt_payment_method_details_us_bank_account */ + setup_attempt_payment_method_details_us_bank_account: { + [key: string]: unknown; + }; /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -13267,9 +15863,13 @@ export interface components { */ setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ - application?: - | (Partial & Partial) - | null; + application?: (string | components["schemas"]["application"]) | null; + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -13280,7 +15880,7 @@ export interface components { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, 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; /** @@ -13294,55 +15894,53 @@ 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) + | ( + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"] + ) | null; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[] | null; /** @description Unique identifier for the object. */ id: string; /** @description The error encountered in the previous SetupIntent confirmation. */ - last_setup_error?: Partial | null; + last_setup_error?: components["schemas"]["api_errors"] | null; /** @description The most recent SetupAttempt for this SetupIntent. */ - latest_attempt?: - | (Partial & Partial) - | null; + latest_attempt?: (string | components["schemas"]["setup_attempt"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description ID of the multi use Mandate generated by the SetupIntent. */ - mandate?: - | (Partial & Partial) - | null; + mandate?: (string | components["schemas"]["mandate"]) | null; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null; /** @description If present, this property tells you what actions you need to take in order for your customer to continue payment setup. */ - next_action?: Partial< - components["schemas"]["setup_intent_next_action"] - > | null; + next_action?: components["schemas"]["setup_intent_next_action"] | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ object: "setup_intent"; /** @description The account (if any) for which the setup is intended. */ - on_behalf_of?: - | (Partial & Partial) - | null; + on_behalf_of?: (string | components["schemas"]["account"]) | null; /** @description ID of the payment method used with this SetupIntent. */ payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description Payment-method-specific configuration for this SetupIntent. */ - payment_method_options?: Partial< - components["schemas"]["setup_intent_payment_method_options"] - > | null; + payment_method_options?: + | components["schemas"]["setup_intent_payment_method_options"] + | null; /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. */ payment_method_types: string[]; /** @description ID of the single_use Mandate generated by the SetupIntent. */ - single_use_mandate?: - | (Partial & Partial) - | null; + single_use_mandate?: (string | components["schemas"]["mandate"]) | null; /** * @description [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. * @enum {string} @@ -13386,12 +15984,30 @@ export interface components { arrival_date: number; /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string; + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ("amounts" | "descriptor_code") | null; }; /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { - acss_debit?: components["schemas"]["setup_intent_payment_method_options_acss_debit"]; + acss_debit?: + | components["schemas"]["setup_intent_payment_method_options_acss_debit"] + | components["schemas"]["setup_intent_type_specific_payment_method_options_client"]; + blik?: + | components["schemas"]["setup_intent_payment_method_options_blik"] + | components["schemas"]["setup_intent_type_specific_payment_method_options_client"]; card?: components["schemas"]["setup_intent_payment_method_options_card"]; - sepa_debit?: components["schemas"]["setup_intent_payment_method_options_sepa_debit"]; + link?: + | components["schemas"]["setup_intent_payment_method_options_link"] + | components["schemas"]["setup_intent_type_specific_payment_method_options_client"]; + sepa_debit?: + | components["schemas"]["setup_intent_payment_method_options_sepa_debit"] + | components["schemas"]["setup_intent_type_specific_payment_method_options_client"]; + us_bank_account?: + | components["schemas"]["setup_intent_payment_method_options_us_bank_account"] + | components["schemas"]["setup_intent_type_specific_payment_method_options_client"]; }; /** setup_intent_payment_method_options_acss_debit */ setup_intent_payment_method_options_acss_debit: { @@ -13407,14 +16023,80 @@ export interface components { */ verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** setup_intent_payment_method_options_blik */ + setup_intent_payment_method_options_blik: { + mandate_options?: components["schemas"]["setup_intent_payment_method_options_mandate_options_blik"]; + }; /** setup_intent_payment_method_options_card */ setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: + | components["schemas"]["setup_intent_payment_method_options_card_mandate_options"] + | null; + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: + | ( + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa" + ) + | null; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ("any" | "automatic" | "challenge_only") | null; }; + /** setup_intent_payment_method_options_card_mandate_options */ + setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number; + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: "fixed" | "maximum"; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null; + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null; + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null; + /** @description Unique identifier for the mandate or subscription. */ + reference: string; + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number; + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: "india"[] | null; + }; + /** setup_intent_payment_method_options_link */ + setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null; + }; /** setup_intent_payment_method_options_mandate_options_acss_debit */ setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -13434,6 +16116,20 @@ export interface components { */ transaction_type?: ("business" | "personal") | null; }; + /** setup_intent_payment_method_options_mandate_options_blik */ + setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null; + off_session?: components["schemas"]["mandate_options_off_session_details_blik"]; + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ("off_session" | "on_session") | null; + }; /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown; @@ -13442,37 +16138,40 @@ export interface components { setup_intent_payment_method_options_sepa_debit: { mandate_options?: components["schemas"]["setup_intent_payment_method_options_mandate_options_sepa_debit"]; }; + /** setup_intent_payment_method_options_us_bank_account */ + setup_intent_payment_method_options_us_bank_account: { + financial_connections?: components["schemas"]["linked_account_options_us_bank_account"]; + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; /** Shipping */ shipping: { address?: components["schemas"]["address"]; /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null; /** @description Recipient name. */ - name?: string | null; + name?: string; /** @description Recipient phone (including extension). */ phone?: string | null; /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ tracking_number?: string | null; }; - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: Partial< - components["schemas"]["delivery_estimate"] - > | null; - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string; - /** @description Unique identifier for the object. */ - id: string; - }; /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -13483,9 +16182,9 @@ export interface components { */ created: number; /** @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - delivery_estimate?: Partial< - components["schemas"]["shipping_rate_delivery_estimate"] - > | null; + delivery_estimate?: + | components["schemas"]["shipping_rate_delivery_estimate"] + | null; /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ display_name?: string | null; fixed_amount?: components["schemas"]["shipping_rate_fixed_amount"]; @@ -13505,26 +16204,34 @@ export interface components { * @enum {string|null} */ tax_behavior?: ("exclusive" | "inclusive" | "unspecified") | null; - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: - | (Partial & Partial) - | null; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: (string | components["schemas"]["tax_code"]) | null; /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. * @enum {string} */ type: "fixed_amount"; }; + /** ShippingRateCurrencyOption */ + shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number; + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior: "exclusive" | "inclusive" | "unspecified"; + }; /** ShippingRateDeliveryEstimate */ shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ - maximum?: Partial< - components["schemas"]["shipping_rate_delivery_estimate_bound"] - > | null; + maximum?: + | components["schemas"]["shipping_rate_delivery_estimate_bound"] + | null; /** @description The lower bound of the estimated range. If empty, represents no lower bound. */ - minimum?: Partial< - components["schemas"]["shipping_rate_delivery_estimate_bound"] - > | null; + minimum?: + | components["schemas"]["shipping_rate_delivery_estimate_bound"] + | null; }; /** ShippingRateDeliveryEstimateBound */ shipping_rate_delivery_estimate_bound: { @@ -13542,6 +16249,10 @@ export interface components { amount: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: components["schemas"]["shipping_rate_currency_option"]; + }; }; /** SigmaScheduledQueryRunError */ sigma_scheduled_query_run_error: { @@ -13556,8 +16267,6 @@ export interface components { * the `size: large`, `color: red` version of that shirt. * * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). */ sku: { /** @description Whether the SKU is available for purchase. */ @@ -13586,13 +16295,11 @@ export interface components { */ object: "sku"; /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: Partial< - components["schemas"]["package_dimensions"] - > | null; + package_dimensions?: components["schemas"]["package_dimensions"] | null; /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ price: number; /** @description The ID of the product this SKU is associated with. The product must be currently active. */ - product: Partial & Partial; + product: string | components["schemas"]["product"]; /** * Format: unix-time * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. @@ -13659,7 +16366,7 @@ export interface components { */ object: "source"; /** @description Information about the owner of the payment instrument that may be used or required by particular source types. */ - owner?: Partial | null; + owner?: components["schemas"]["source_owner"] | null; p24?: components["schemas"]["source_type_p24"]; receiver?: components["schemas"]["source_receiver_flow"]; redirect?: components["schemas"]["source_redirect_flow"]; @@ -13788,7 +16495,7 @@ export interface components { /** SourceOwner */ source_owner: { /** @description Owner's address. */ - address?: Partial | null; + address?: components["schemas"]["address"] | null; /** @description Owner's email address. */ email?: string | null; /** @description Owner's full name. */ @@ -13796,7 +16503,7 @@ export interface components { /** @description Owner's phone number (including extension). */ phone?: string | null; /** @description Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - verified_address?: Partial | null; + verified_address?: components["schemas"]["address"] | null; /** @description Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ verified_email?: string | null; /** @description Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. */ @@ -14134,29 +16841,6 @@ export interface components { qr_code_url?: string | null; statement_descriptor?: string; }; - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null; - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null; - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null; - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null; - }; /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -14164,18 +16848,26 @@ export interface components { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ subscription: { + /** @description ID of the Connect Application that created the subscription. */ + application?: + | ( + | string + | components["schemas"]["application"] + | components["schemas"]["deleted_application"] + ) + | null; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ application_fee_percent?: number | null; automatic_tax: components["schemas"]["subscription_automatic_tax"]; /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: + | components["schemas"]["subscription_billing_thresholds"] + | null; /** * Format: unix-time * @description A date in the future at which the subscription will automatically get canceled @@ -14198,6 +16890,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -14209,28 +16903,31 @@ export interface components { */ current_period_start: number; /** @description ID of the customer who owns the subscription. */ - customer: Partial & - Partial & - Partial; + customer: + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"]; /** @description Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. */ days_until_due?: number | null; /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_source?: - | (Partial & - Partial & - Partial & - Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"] + ) | null; /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ default_tax_rates?: components["schemas"]["tax_rate"][] | null; + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string | null; /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ - discount?: Partial | null; + discount?: components["schemas"]["discount"] | null; /** * Format: unix-time * @description If the subscription has ended, the date the subscription ended. @@ -14256,9 +16953,7 @@ export interface components { url: string; }; /** @description The most recent invoice this subscription has generated. */ - latest_invoice?: - | (Partial & Partial) - | null; + latest_invoice?: (string | components["schemas"]["invoice"]) | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -14274,29 +16969,28 @@ export interface components { */ object: "subscription"; /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial< - components["schemas"]["subscriptions_resource_pause_collection"] - > | null; + pause_collection?: + | components["schemas"]["subscriptions_resource_pause_collection"] + | null; /** @description Payment settings passed on to invoices created by the subscription. */ - payment_settings?: Partial< - components["schemas"]["subscriptions_resource_payment_settings"] - > | null; + payment_settings?: + | components["schemas"]["subscriptions_resource_payment_settings"] + | null; /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: Partial< - components["schemas"]["subscription_pending_invoice_item_interval"] - > | null; + pending_invoice_item_interval?: + | components["schemas"]["subscription_pending_invoice_item_interval"] + | null; /** @description You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). */ pending_setup_intent?: - | (Partial & Partial) + | (string | components["schemas"]["setup_intent"]) | null; /** @description If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. */ - pending_update?: Partial< - components["schemas"]["subscriptions_resource_pending_update"] - > | null; + pending_update?: + | components["schemas"]["subscriptions_resource_pending_update"] + | null; /** @description The schedule attached to the subscription */ schedule?: - | (Partial & - Partial) + | (string | components["schemas"]["subscription_schedule"]) | null; /** * Format: unix-time @@ -14323,10 +17017,14 @@ export interface components { | "past_due" | "trialing" | "unpaid"; + /** @description ID of the test clock this subscription belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) + | null; /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: Partial< - components["schemas"]["subscription_transfer_data"] - > | null; + transfer_data?: + | components["schemas"]["subscription_transfer_data"] + | null; /** * Format: unix-time * @description If the subscription has a trial, the end of that trial. @@ -14357,9 +17055,9 @@ export interface components { */ subscription_item: { /** @description 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?: + | components["schemas"]["subscription_item_billing_thresholds"] + | null; /** @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; /** @description Unique identifier for the object. */ @@ -14387,6 +17085,24 @@ export interface components { /** subscription_payment_method_options_card */ subscription_payment_method_options_card: { mandate_options?: components["schemas"]["invoice_mandate_options_card"]; + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + network?: + | ( + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa" + ) + | null; /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -14410,6 +17126,14 @@ export interface components { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + application?: + | ( + | string + | components["schemas"]["application"] + | components["schemas"]["deleted_application"] + ) + | null; /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -14426,13 +17150,14 @@ export interface components { */ created: number; /** @description 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?: + | components["schemas"]["subscription_schedule_current_phase"] + | null; /** @description ID of the customer who owns the subscription schedule. */ - customer: Partial & - Partial & - Partial; + customer: + | string + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"]; default_settings: components["schemas"]["subscription_schedules_resource_default_settings"]; /** * @description Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` and `cancel`. @@ -14465,8 +17190,10 @@ export interface components { */ status: "active" | "canceled" | "completed" | "not_started" | "released"; /** @description ID of the subscription managed by the subscription schedule. */ - subscription?: - | (Partial & Partial) + subscription?: (string | components["schemas"]["subscription"]) | null; + /** @description ID of the test clock this subscription schedule belongs to. */ + test_clock?: + | (string | components["schemas"]["test_helpers.test_clock"]) | null; }; /** @@ -14475,9 +17202,10 @@ export interface components { */ subscription_schedule_add_invoice_item: { /** @description ID of the price used to generate the invoice item. */ - price: Partial & - Partial & - Partial; + price: + | string + | components["schemas"]["price"] + | components["schemas"]["deleted_price"]; /** @description The quantity of the invoice item. */ quantity?: number | null; /** @description The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. */ @@ -14489,13 +17217,14 @@ export interface components { */ subscription_schedule_configuration_item: { /** @description Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_item_billing_thresholds"] - > | null; + billing_thresholds?: + | components["schemas"]["subscription_item_billing_thresholds"] + | null; /** @description ID of the price to which the customer should be subscribed. */ - price: Partial & - Partial & - Partial; + price: + | string + | components["schemas"]["price"] + | components["schemas"]["deleted_price"]; /** @description Quantity of the plan to which the customer should be subscribed. */ quantity?: number; /** @description The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. */ @@ -14519,7 +17248,7 @@ export interface components { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ add_invoice_items: components["schemas"]["subscription_schedule_add_invoice_item"][]; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ application_fee_percent?: number | null; @@ -14530,9 +17259,9 @@ export interface components { */ billing_cycle_anchor?: ("automatic" | "phase_start") | null; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: + | components["schemas"]["subscription_billing_thresholds"] + | null; /** * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. * @enum {string|null} @@ -14540,27 +17269,35 @@ export interface components { collection_method?: ("charge_automatically" | "send_invoice") | null; /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: - | (Partial & - Partial & - Partial) + | ( + | string + | components["schemas"]["coupon"] + | components["schemas"]["deleted_coupon"] + ) | null; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; /** @description 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) + | (string | components["schemas"]["payment_method"]) | null; /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components["schemas"]["tax_rate"][] | null; + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null; /** * Format: unix-time * @description The end of this phase of the subscription schedule. */ end_date: number; /** @description The invoice settings applicable during this phase. */ - invoice_settings?: Partial< - components["schemas"]["invoice_setting_subscription_schedule_setting"] - > | null; + invoice_settings?: + | components["schemas"]["invoice_setting_subscription_schedule_setting"] + | null; /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ items: components["schemas"]["subscription_schedule_configuration_item"][]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + metadata?: { [key: string]: string } | null; /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -14572,9 +17309,9 @@ export interface components { */ start_date: number; /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: Partial< - components["schemas"]["subscription_transfer_data"] - > | null; + transfer_data?: + | components["schemas"]["subscription_transfer_data"] + | null; /** * Format: unix-time * @description When the trial ends within the phase. @@ -14592,9 +17329,9 @@ export interface components { */ billing_cycle_anchor: "automatic" | "phase_start"; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ - billing_thresholds?: Partial< - components["schemas"]["subscription_billing_thresholds"] - > | null; + billing_thresholds?: + | components["schemas"]["subscription_billing_thresholds"] + | null; /** * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. * @enum {string|null} @@ -14602,16 +17339,18 @@ export interface components { collection_method?: ("charge_automatically" | "send_invoice") | null; /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: - | (Partial & Partial) + | (string | components["schemas"]["payment_method"]) | null; + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null; /** @description The subscription schedule's default invoice settings. */ - invoice_settings?: Partial< - components["schemas"]["invoice_setting_subscription_schedule_setting"] - > | null; + invoice_settings?: + | components["schemas"]["invoice_setting_subscription_schedule_setting"] + | null; /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ - transfer_data?: Partial< - components["schemas"]["subscription_transfer_data"] - > | null; + transfer_data?: + | components["schemas"]["subscription_transfer_data"] + | null; }; /** SubscriptionSchedulesResourceDefaultSettingsAutomaticTax */ subscription_schedules_resource_default_settings_automatic_tax: { @@ -14623,7 +17362,7 @@ export interface components { /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ amount_percent?: number | null; /** @description The account where funds from the payment will be transferred to upon payment success. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** * SubscriptionsResourcePauseCollection @@ -14645,24 +17384,36 @@ export interface components { /** SubscriptionsResourcePaymentMethodOptions */ subscriptions_resource_payment_method_options: { /** @description This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. */ - acss_debit?: Partial< - components["schemas"]["invoice_payment_method_options_acss_debit"] - > | null; + acss_debit?: + | components["schemas"]["invoice_payment_method_options_acss_debit"] + | null; /** @description This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. */ - bancontact?: Partial< - components["schemas"]["invoice_payment_method_options_bancontact"] - > | null; + bancontact?: + | components["schemas"]["invoice_payment_method_options_bancontact"] + | null; /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ - card?: Partial< - components["schemas"]["subscription_payment_method_options_card"] - > | null; + card?: + | components["schemas"]["subscription_payment_method_options_card"] + | null; + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance?: + | components["schemas"]["invoice_payment_method_options_customer_balance"] + | null; + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini?: + | components["schemas"]["invoice_payment_method_options_konbini"] + | null; + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account?: + | components["schemas"]["invoice_payment_method_options_us_bank_account"] + | null; }; /** SubscriptionsResourcePaymentSettings */ subscriptions_resource_payment_settings: { /** @description Payment-method-specific configuration to provide to invoices created by the subscription. */ - payment_method_options?: Partial< - components["schemas"]["subscriptions_resource_payment_method_options"] - > | null; + payment_method_options?: + | components["schemas"]["subscriptions_resource_payment_method_options"] + | null; /** @description The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ payment_method_types?: | ( @@ -14674,15 +17425,26 @@ export interface components { | "bancontact" | "boleto" | "card" + | "customer_balance" | "fpx" | "giropay" | "grabpay" | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay" )[] | null; + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + save_default_payment_method?: ("off" | "on_subscription") | null; }; /** * SubscriptionsResourcePendingUpdate @@ -14692,7 +17454,7 @@ export interface components { subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number | null; /** @@ -14712,7 +17474,7 @@ export interface components { }; /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -14765,9 +17527,7 @@ export interface components { */ created: number; /** @description ID of the customer. */ - customer?: - | (Partial & Partial) - | null; + customer?: (string | components["schemas"]["customer"]) | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -14778,13 +17538,14 @@ export interface components { */ object: "tax_id"; /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ type: | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -14796,10 +17557,12 @@ export interface components { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -14819,6 +17582,7 @@ export interface components { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -14828,9 +17592,7 @@ export interface components { /** @description Value of the tax ID. */ value: string; /** @description Tax ID verification information. */ - verification?: Partial< - components["schemas"]["tax_id_verification"] - > | null; + verification?: components["schemas"]["tax_id_verification"] | null; }; /** tax_id_verification */ tax_id_verification: { @@ -14891,6 +17653,26 @@ export interface components { | ("gst" | "hst" | "jct" | "pst" | "qst" | "rst" | "sales_tax" | "vat") | null; }; + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + "terminal.configuration": { + bbpos_wisepos_e?: components["schemas"]["terminal_configuration_configuration_resource_device_type_specific_config"]; + /** @description Unique identifier for the object. */ + id: string; + /** @description Whether this Configuration is the default for your account */ + is_account_default?: boolean | null; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "terminal.configuration"; + tipping?: components["schemas"]["terminal_configuration_configuration_resource_tipping"]; + verifone_p400?: components["schemas"]["terminal_configuration_configuration_resource_device_type_specific_config"]; + }; /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14916,6 +17698,8 @@ export interface components { */ "terminal.location": { address: components["schemas"]["address"]; + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string; /** @description The display name of the location. */ display_name: string; /** @description Unique identifier for the object. */ @@ -14937,13 +17721,23 @@ export interface components { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ "terminal.reader": { + /** @description The most recent action performed by the reader. */ + action?: + | components["schemas"]["terminal_reader_reader_resource_reader_action"] + | null; /** @description The current software version of the reader. */ device_sw_version?: string | null; /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - device_type: "bbpos_chipper2x" | "bbpos_wisepos_e" | "verifone_P400"; + device_type: + | "bbpos_chipper2x" + | "bbpos_wisepad3" + | "bbpos_wisepos_e" + | "simulated_wisepos_e" + | "stripe_m2" + | "verifone_P400"; /** @description Unique identifier for the object. */ id: string; /** @description The local IP address of the reader. */ @@ -14953,10 +17747,7 @@ export interface components { /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description The location identifier of the reader. */ - location?: - | (Partial & - Partial) - | null; + location?: (string | components["schemas"]["terminal.location"]) | null; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string }; /** @@ -14969,38 +17760,169 @@ export interface components { /** @description The networking status of the reader. */ status?: string | null; }; + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + fixed_amounts?: number[] | null; + /** @description Percentages displayed when collecting a tip */ + percentages?: number[] | null; + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold?: number; + }; + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + splashscreen?: string | components["schemas"]["file"]; + }; + /** TerminalConfigurationConfigurationResourceTipping */ + terminal_configuration_configuration_resource_tipping: { + aud?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + cad?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + chf?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + czk?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + dkk?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + eur?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + gbp?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + hkd?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + myr?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + nok?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + nzd?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + sek?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + sgd?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + usd?: components["schemas"]["terminal_configuration_configuration_resource_currency_specific_config"]; + }; + /** + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader + */ + terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description List of line items in the cart. */ + line_items: components["schemas"]["terminal_reader_reader_resource_line_item"][]; + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax?: number | null; + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: number; + }; /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number; - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean; - card: components["schemas"]["card"]; + /** @description Description of the line item. */ + description: string; + /** @description The quantity of the line item. */ + quantity: number; + }; + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + skip_tipping?: boolean; + }; + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + payment_intent: string | components["schemas"]["payment_intent"]; + process_config?: components["schemas"]["terminal_reader_reader_resource_process_config"]; + }; + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string; + /** @description Most recent SetupIntent processed by the reader. */ + setup_intent: string | components["schemas"]["setup_intent"]; + }; + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + failure_code?: string | null; + /** @description Detailed failure message, only set if status is `failed`. */ + failure_message?: string | null; + process_payment_intent?: components["schemas"]["terminal_reader_reader_resource_process_payment_intent_action"]; + process_setup_intent?: components["schemas"]["terminal_reader_reader_resource_process_setup_intent_action"]; + set_reader_display?: components["schemas"]["terminal_reader_reader_resource_set_reader_display_action"]; + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + status: "failed" | "in_progress" | "succeeded"; + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + type: + | "process_payment_intent" + | "process_setup_intent" + | "set_reader_display"; + }; + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + cart?: + | components["schemas"]["terminal_reader_reader_resource_cart"] + | null; + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + type: "cart"; + }; + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + "test_helpers.test_clock": { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + deletes_after: number; + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; + /** @description The custom name supplied at creation. */ + name?: string | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "three_d_secure"; - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null; - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string; + object: "test_helpers.test_clock"; + /** + * @description The status of the Test Clock. + * @enum {string} + */ + status: "advancing" | "internal_failure" | "ready"; }; /** three_d_secure_details */ three_d_secure_details: { @@ -15018,6 +17940,7 @@ export interface components { | ( | "attempt_acknowledged" | "authenticated" + | "exempted" | "failed" | "not_supported" | "processing_error" @@ -15112,8 +18035,7 @@ export interface components { amount: number; /** @description ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** * Format: unix-time @@ -15141,7 +18063,8 @@ export interface components { * @enum {string} */ object: "topup"; - source: components["schemas"]["source"]; + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + source?: components["schemas"]["source"] | null; /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ statement_descriptor?: string | null; /** @@ -15172,8 +18095,7 @@ export interface components { amount_reversed: number; /** @description Balance transaction that describes the impact of this transfer on your account balance. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** * Format: unix-time @@ -15185,12 +18107,9 @@ export interface components { /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; /** @description ID of the Stripe account the transfer was sent to. */ - destination?: - | (Partial & Partial) - | null; + destination?: (string | components["schemas"]["account"]) | null; /** @description If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. */ - destination_payment?: Partial & - Partial; + destination_payment?: string | components["schemas"]["charge"]; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -15222,11 +18141,9 @@ export interface components { /** @description Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. */ reversed: boolean; /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ - source_transaction?: - | (Partial & Partial) - | null; + source_transaction?: (string | components["schemas"]["charge"]) | null; /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null; + source_type?: string; /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null; }; @@ -15239,7 +18156,7 @@ export interface components { * reporting, and where funds from the payment will be transferred to upon * payment success. */ - destination: Partial & Partial; + destination: string | components["schemas"]["account"]; }; /** * TransferReversal @@ -15262,8 +18179,7 @@ export interface components { amount: number; /** @description Balance transaction that describes the impact on your account balance. */ balance_transaction?: - | (Partial & - Partial) + | (string | components["schemas"]["balance_transaction"]) | null; /** * Format: unix-time @@ -15274,7 +18190,7 @@ export interface components { currency: string; /** @description Linked payment refund for the transfer reversal. */ destination_payment_refund?: - | (Partial & Partial) + | (string | components["schemas"]["refund"]) | null; /** @description Unique identifier for the object. */ id: string; @@ -15286,11 +18202,9 @@ export interface components { */ object: "transfer_reversal"; /** @description ID of the refund responsible for the transfer reversal. */ - source_refund?: - | (Partial & Partial) - | null; + source_refund?: (string | components["schemas"]["refund"]) | null; /** @description ID of the transfer that was reversed. */ - transfer: Partial & Partial; + transfer: string | components["schemas"]["transfer"]; }; /** TransferSchedule */ transfer_schedule: { @@ -15324,85 +18238,231 @@ export interface components { round: "down" | "up"; }; /** - * UsageRecord - * @description Usage records allow you to report customer usage and metrics to Stripe for - * metered billing of subscription prices. - * - * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. */ - usage_record: { + "treasury.credit_reversal": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description The FinancialAccount to reverse funds from. */ + financial_account: string; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; /** @description Unique identifier for the object. */ id: string; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string }; + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: "ach" | "stripe"; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "usage_record"; - /** @description The usage quantity for the specified date. */ - quantity: number; - /** @description The ID of the subscription item this usage record contains data for. */ - subscription_item: string; + object: "treasury.credit_reversal"; + /** @description The ReceivedCredit being reversed. */ + received_credit: string; + /** + * @description Status of the CreditReversal + * @enum {string} + */ + status: "canceled" | "posted" | "processing"; + status_transitions: components["schemas"]["treasury_received_credits_resource_status_transitions"]; + /** @description The Transaction associated with this object. */ + transaction?: + | (string | components["schemas"]["treasury.transaction"]) + | null; + }; + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + "treasury.debit_reversal": { + /** @description Amount (in cents) transferred. */ + amount: number; /** * Format: unix-time - * @description The timestamp when this usage occurred. + * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ - timestamp: number; + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description The FinancialAccount to reverse funds from. */ + financial_account?: string | null; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description Other flows linked to a DebitReversal. */ + linked_flows?: + | components["schemas"]["treasury_received_debits_resource_debit_reversal_linked_flows"] + | null; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string }; + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: "ach" | "card"; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.debit_reversal"; + /** @description The ReceivedDebit being reversed. */ + received_debit: string; + /** + * @description Status of the DebitReversal + * @enum {string} + */ + status: "failed" | "processing" | "succeeded"; + status_transitions: components["schemas"]["treasury_received_debits_resource_status_transitions"]; + /** @description The Transaction associated with this object. */ + transaction?: + | (string | components["schemas"]["treasury.transaction"]) + | null; }; - /** UsageRecordSummary */ - usage_record_summary: { + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + "treasury.financial_account": { + /** @description The array of paths to active Features in the Features hash. */ + active_features?: ( + | "card_issuing" + | "deposit_insurance" + | "financial_addresses.aba" + | "inbound_transfers.ach" + | "intra_stripe_flows" + | "outbound_payments.ach" + | "outbound_payments.us_domestic_wire" + | "outbound_transfers.ach" + | "outbound_transfers.us_domestic_wire" + | "remote_deposit_capture" + )[]; + balance: components["schemas"]["treasury_financial_accounts_resource_balance"]; + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + features?: components["schemas"]["treasury.financial_account_features"]; + /** @description The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: components["schemas"]["treasury_financial_accounts_resource_financial_address"][]; /** @description Unique identifier for the object. */ id: string; - /** @description The invoice in which this usage period has been billed for. */ - invoice?: string | null; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null; /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "usage_record_summary"; - period: components["schemas"]["period"]; - /** @description The ID of the subscription item this summary is describing. */ - subscription_item: string; - /** @description The total usage within this usage period. */ - total_usage: number; + object: "treasury.financial_account"; + /** @description The array of paths to pending Features in the Features hash. */ + pending_features?: ( + | "card_issuing" + | "deposit_insurance" + | "financial_addresses.aba" + | "inbound_transfers.ach" + | "intra_stripe_flows" + | "outbound_payments.ach" + | "outbound_payments.us_domestic_wire" + | "outbound_transfers.ach" + | "outbound_transfers.us_domestic_wire" + | "remote_deposit_capture" + )[]; + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions?: + | components["schemas"]["treasury_financial_accounts_resource_platform_restrictions"] + | null; + /** @description The array of paths to restricted Features in the Features hash. */ + restricted_features?: ( + | "card_issuing" + | "deposit_insurance" + | "financial_addresses.aba" + | "inbound_transfers.ach" + | "intra_stripe_flows" + | "outbound_payments.ach" + | "outbound_payments.us_domestic_wire" + | "outbound_transfers.ach" + | "outbound_transfers.us_domestic_wire" + | "remote_deposit_capture" + )[]; + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + status: "closed" | "open"; + status_details: components["schemas"]["treasury_financial_accounts_resource_status_details"]; + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + supported_currencies: string[]; }; - /** verification_session_redaction */ - verification_session_redaction: { + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + "treasury.financial_account_features": { + card_issuing?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + deposit_insurance?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + financial_addresses?: components["schemas"]["treasury_financial_accounts_resource_financial_addresses_features"]; + inbound_transfers?: components["schemas"]["treasury_financial_accounts_resource_inbound_transfers"]; + intra_stripe_flows?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; /** - * @description Indicates whether this object and its related objects have been redacted or not. + * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - status: "processing" | "redacted"; + object: "treasury.financial_account_features"; + outbound_payments?: components["schemas"]["treasury_financial_accounts_resource_outbound_payments"]; + outbound_transfers?: components["schemas"]["treasury_financial_accounts_resource_outbound_transfers"]; }; /** - * NotificationWebhookEndpoint - * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be - * notified about events that happen in your Stripe account or connected - * accounts. - * - * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. - * - * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. */ - webhook_endpoint: { - /** @description The API version events are rendered as for this webhook endpoint. */ - api_version?: string | null; - /** @description The ID of the associated Connect application. */ - application?: string | null; + "treasury.inbound_transfer": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: boolean; /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number; - /** @description An optional description of what the webhook is used for. */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null; - /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ - enabled_events: string[]; + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details?: + | components["schemas"]["treasury_inbound_transfers_resource_failure_details"] + | null; + /** @description The FinancialAccount that received the funds. */ + financial_account: string; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; /** @description Unique identifier for the object. */ id: string; + linked_flows: components["schemas"]["treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows"]; /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -15411,101 +18471,1014 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: "webhook_endpoint"; - /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ - secret?: string; - /** @description The status of the webhook. It can be `enabled` or `disabled`. */ - status: string; - /** @description The URL of the webhook endpoint. */ - url: string; - }; - }; -} - -export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": components["schemas"]["three_d_secure"]; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; + object: "treasury.inbound_transfer"; + /** @description The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: string; + /** @description Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details?: + | components["schemas"]["inbound_transfers"] + | null; + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned?: boolean | null; + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: string; + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + status: "canceled" | "failed" | "processing" | "succeeded"; + status_transitions: components["schemas"]["treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions"]; + /** @description The Transaction associated with this object. */ + transaction?: + | (string | components["schemas"]["treasury.transaction"]) + | null; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number; - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string; - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string; - /** @description The customer associated with this 3D secure authentication. */ - customer?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string; - }; - }; + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + "treasury.outbound_payment": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer?: string | null; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + destination_payment_method?: string | null; + /** @description Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details?: + | components["schemas"]["outbound_payments_payment_method_details"] + | null; + /** @description Details about the end user. */ + end_user_details?: + | components["schemas"]["treasury_outbound_payments_resource_outbound_payment_resource_end_user_details"] + | null; + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number; + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string }; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.outbound_payment"; + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details?: + | components["schemas"]["treasury_outbound_payments_resource_returned_status"] + | null; + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: string; + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: "canceled" | "failed" | "posted" | "processing" | "returned"; + status_transitions: components["schemas"]["treasury_outbound_payments_resource_outbound_payment_resource_status_transitions"]; + /** @description The Transaction associated with this object. */ + transaction: string | components["schemas"]["treasury.transaction"]; }; - }; - /**

Retrieves a 3D Secure object.

*/ - Get3dSecureThreeDSecure: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; - path: { - three_d_secure: string; - }; + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + "treasury.outbound_transfer": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null; + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method?: string | null; + destination_payment_method_details: components["schemas"]["outbound_transfers_payment_method_details"]; + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number; + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string }; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.outbound_transfer"; + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details?: + | components["schemas"]["treasury_outbound_transfers_resource_returned_details"] + | null; + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: string; + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: "canceled" | "failed" | "posted" | "processing" | "returned"; + status_transitions: components["schemas"]["treasury_outbound_transfers_resource_status_transitions"]; + /** @description The Transaction associated with this object. */ + transaction: string | components["schemas"]["treasury.transaction"]; }; - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": components["schemas"]["three_d_secure"]; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + "treasury.received_credit": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string; + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + failure_code?: ("account_closed" | "account_frozen" | "other") | null; + /** @description The FinancialAccount that received the funds. */ + financial_account?: string | null; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; + /** @description Unique identifier for the object. */ + id: string; + initiating_payment_method_details: components["schemas"]["treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details"]; + linked_flows: components["schemas"]["treasury_received_credits_resource_linked_flows"]; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description The rails used to send the funds. + * @enum {string} + */ + network: "ach" | "card" | "stripe" | "us_domestic_wire"; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.received_credit"; + /** @description Details describing when a ReceivedCredit may be reversed. */ + reversal_details?: + | components["schemas"]["treasury_received_credits_resource_reversal_details"] + | null; + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + status: "failed" | "succeeded"; + /** @description The Transaction associated with this object. */ + transaction?: + | (string | components["schemas"]["treasury.transaction"]) + | null; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { [key: string]: unknown }; - }; + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + "treasury.received_debit": { + /** @description Amount (in cents) transferred. */ + amount: number; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string; + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + failure_code?: + | ("account_closed" | "account_frozen" | "insufficient_funds" | "other") + | null; + /** @description The FinancialAccount that funds were pulled from. */ + financial_account?: string | null; + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null; + /** @description Unique identifier for the object. */ + id: string; + initiating_payment_method_details?: components["schemas"]["treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details"]; + linked_flows: components["schemas"]["treasury_received_debits_resource_linked_flows"]; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + network: "ach" | "card" | "stripe"; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.received_debit"; + /** @description Details describing when a ReceivedDebit might be reversed. */ + reversal_details?: + | components["schemas"]["treasury_received_debits_resource_reversal_details"] + | null; + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + status: "failed" | "succeeded"; + /** @description The Transaction associated with this object. */ + transaction?: + | (string | components["schemas"]["treasury.transaction"]) + | null; }; - }; - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[]; - }; + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + "treasury.transaction": { + /** @description Amount (in cents) transferred. */ + amount: number; + balance_impact: components["schemas"]["treasury_transactions_resource_balance_impact"]; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string; + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + entries?: { + /** @description Details about each object. */ + data: components["schemas"]["treasury.transaction_entry"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + } | null; + /** @description The FinancialAccount associated with this object. */ + financial_account: string; + /** @description ID of the flow that created the Transaction. */ + flow?: string | null; + /** @description Details of the flow that created the Transaction. */ + flow_details?: + | components["schemas"]["treasury_transactions_resource_flow_details"] + | null; + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + flow_type: + | "credit_reversal" + | "debit_reversal" + | "inbound_transfer" + | "issuing_authorization" + | "other" + | "outbound_payment" + | "outbound_transfer" + | "received_credit" + | "received_debit"; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.transaction"; + /** + * @description Status of the Transaction. + * @enum {string} + */ + status: "open" | "posted" | "void"; + status_transitions: components["schemas"]["treasury_transactions_resource_abstract_transaction_resource_status_transitions"]; }; - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": components["schemas"]["account"]; - }; - }; - /** Error response. */ - default: { + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + "treasury.transaction_entry": { + balance_impact: components["schemas"]["treasury_transactions_resource_balance_impact"]; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + effective_at: number; + /** @description The FinancialAccount associated with this object. */ + financial_account: string; + /** @description Token of the flow associated with the TransactionEntry. */ + flow?: string | null; + /** @description Details of the flow associated with the TransactionEntry. */ + flow_details?: + | components["schemas"]["treasury_transactions_resource_flow_details"] + | null; + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + flow_type: + | "credit_reversal" + | "debit_reversal" + | "inbound_transfer" + | "issuing_authorization" + | "other" + | "outbound_payment" + | "outbound_transfer" + | "received_credit" + | "received_debit"; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "treasury.transaction_entry"; + /** @description The Transaction associated with this object. */ + transaction: string | components["schemas"]["treasury.transaction"]; + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + type: + | "credit_reversal" + | "credit_reversal_posting" + | "debit_reversal" + | "inbound_transfer" + | "inbound_transfer_return" + | "issuing_authorization_hold" + | "issuing_authorization_release" + | "other" + | "outbound_payment" + | "outbound_payment_cancellation" + | "outbound_payment_failure" + | "outbound_payment_posting" + | "outbound_payment_return" + | "outbound_transfer" + | "outbound_transfer_cancellation" + | "outbound_transfer_failure" + | "outbound_transfer_posting" + | "outbound_transfer_return" + | "received_credit" + | "received_debit"; + }; + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name: string; + /** @description The account number. */ + account_number?: string | null; + /** @description The last four characters of the account number. */ + account_number_last4: string; + /** @description Name of the bank. */ + bank_name: string; + /** @description Routing number for the account. */ + routing_number: string; + }; + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + cash: { [key: string]: number }; + /** @description Funds not spendable yet, but will become available at a later time. */ + inbound_pending: { [key: string]: number }; + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: { [key: string]: number }; + }; + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + reasons: ("account_rejected" | "closed_by_platform" | "other")[]; + }; + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + treasury_financial_accounts_resource_financial_address: { + aba?: components["schemas"]["treasury_financial_accounts_resource_aba_record"]; + /** @description The list of networks that the address supports */ + supported_networks?: ("ach" | "us_domestic_wire")[]; + /** + * @description The type of financial address + * @enum {string} + */ + type: "aba"; + }; + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + treasury_financial_accounts_resource_financial_addresses_features: { + aba?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + }; + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_inbound_transfers: { + ach?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + }; + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + treasury_financial_accounts_resource_outbound_payments: { + ach?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + us_domestic_wire?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + }; + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_outbound_transfers: { + ach?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + us_domestic_wire?: components["schemas"]["treasury_financial_accounts_resource_toggle_settings"]; + }; + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + inbound_flows?: ("restricted" | "unrestricted") | null; + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + outbound_flows?: ("restricted" | "unrestricted") | null; + }; + /** TreasuryFinancialAccountsResourceStatusDetails */ + treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + closed?: + | components["schemas"]["treasury_financial_accounts_resource_closed_status_details"] + | null; + }; + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + requested: boolean; + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + status: "active" | "pending" | "restricted"; + /** @description Additional details; includes at least one entry when the status is not `active`. */ + status_details: components["schemas"]["treasury_financial_accounts_resource_toggles_setting_status_details"][]; + }; + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + code: + | "activating" + | "capability_not_requested" + | "financial_account_closed" + | "rejected_other" + | "rejected_unsupported_business" + | "requirements_past_due" + | "requirements_pending_verification" + | "restricted_by_platform" + | "restricted_other"; + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + resolution?: + | ("contact_stripe" | "provide_information" | "remove_restriction") + | null; + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + restriction?: "inbound_flows" | "outbound_flows"; + }; + /** TreasuryInboundTransfersResourceFailureDetails */ + treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + code: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "debit_not_authorized" + | "incorrect_account_holder_address" + | "incorrect_account_holder_name" + | "incorrect_account_holder_tax_id" + | "insufficient_funds" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + }; + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + received_debit?: string | null; + }; + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + canceled_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + failed_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + succeeded_at?: number | null; + }; + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + ip_address?: string | null; + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: boolean; + }; + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + canceled_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + failed_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + posted_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + returned_at?: number | null; + }; + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "declined" + | "incorrect_account_holder_name" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + /** @description The Transaction associated with this object. */ + transaction: string | components["schemas"]["treasury.transaction"]; + }; + /** TreasuryOutboundTransfersResourceReturnedDetails */ + treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "declined" + | "incorrect_account_holder_name" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + /** @description The Transaction associated with this object. */ + transaction: string | components["schemas"]["treasury.transaction"]; + }; + /** TreasuryOutboundTransfersResourceStatusTransitions */ + treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + canceled_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + failed_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + posted_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + returned_at?: number | null; + }; + /** TreasuryReceivedCreditsResourceLinkedFlows */ + treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal?: string | null; + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null; + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction?: string | null; + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + source_flow?: string | null; + /** @description The expandable object of the source flow. */ + source_flow_details?: + | components["schemas"]["treasury_received_credits_resource_source_flows_details"] + | null; + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type?: string | null; + }; + /** TreasuryReceivedCreditsResourceReversalDetails */ + treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + deadline?: number | null; + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + restricted_reason?: + | ( + | "already_reversed" + | "deadline_passed" + | "network_restricted" + | "other" + | "source_flow_restricted" + ) + | null; + }; + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + treasury_received_credits_resource_source_flows_details: { + credit_reversal?: components["schemas"]["treasury.credit_reversal"]; + outbound_payment?: components["schemas"]["treasury.outbound_payment"]; + payout?: components["schemas"]["payout"]; + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + type: "credit_reversal" | "other" | "outbound_payment" | "payout"; + }; + /** TreasuryReceivedCreditsResourceStatusTransitions */ + treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + posted_at?: number | null; + }; + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute?: string | null; + }; + /** TreasuryReceivedDebitsResourceLinkedFlows */ + treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal?: string | null; + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer?: string | null; + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null; + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction?: string | null; + }; + /** TreasuryReceivedDebitsResourceReversalDetails */ + treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + deadline?: number | null; + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + restricted_reason?: + | ( + | "already_reversed" + | "deadline_passed" + | "network_restricted" + | "other" + | "source_flow_restricted" + ) + | null; + }; + /** TreasuryReceivedDebitsResourceStatusTransitions */ + treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + completed_at?: number | null; + }; + /** TreasurySharedResourceBillingDetails */ + treasury_shared_resource_billing_details: { + address: components["schemas"]["address"]; + /** @description Email address. */ + email?: string | null; + /** @description Full name. */ + name?: string | null; + }; + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + balance?: "payments"; + billing_details: components["schemas"]["treasury_shared_resource_billing_details"]; + financial_account?: components["schemas"]["received_payment_method_details_financial_account"]; + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card?: string; + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + type: + | "balance" + | "financial_account" + | "issuing_card" + | "stripe" + | "us_bank_account"; + us_bank_account?: components["schemas"]["treasury_shared_resource_initiating_payment_method_details_us_bank_account"]; + }; + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + bank_name?: string | null; + /** @description The last four digits of the bank account number. */ + last4?: string | null; + /** @description The routing number for the bank account. */ + routing_number?: string | null; + }; + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + posted_at?: number | null; + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + void_at?: number | null; + }; + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + cash: number; + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: number; + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: number; + }; + /** TreasuryTransactionsResourceFlowDetails */ + treasury_transactions_resource_flow_details: { + credit_reversal?: components["schemas"]["treasury.credit_reversal"]; + debit_reversal?: components["schemas"]["treasury.debit_reversal"]; + inbound_transfer?: components["schemas"]["treasury.inbound_transfer"]; + issuing_authorization?: components["schemas"]["issuing.authorization"]; + outbound_payment?: components["schemas"]["treasury.outbound_payment"]; + outbound_transfer?: components["schemas"]["treasury.outbound_transfer"]; + received_credit?: components["schemas"]["treasury.received_credit"]; + received_debit?: components["schemas"]["treasury.received_debit"]; + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + type: + | "credit_reversal" + | "debit_reversal" + | "inbound_transfer" + | "issuing_authorization" + | "other" + | "outbound_payment" + | "outbound_transfer" + | "received_credit" + | "received_debit"; + }; + /** us_bank_account_networks */ + us_bank_account_networks: { + /** @description The preferred network. */ + preferred?: string | null; + /** @description All supported networks. */ + supported: ("ach" | "us_domestic_wire")[]; + }; + /** + * UsageRecord + * @description Usage records allow you to report customer usage and metrics to Stripe for + * metered billing of subscription prices. + * + * Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). + */ + usage_record: { + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "usage_record"; + /** @description The usage quantity for the specified date. */ + quantity: number; + /** @description The ID of the subscription item this usage record contains data for. */ + subscription_item: string; + /** + * Format: unix-time + * @description The timestamp when this usage occurred. + */ + timestamp: number; + }; + /** UsageRecordSummary */ + usage_record_summary: { + /** @description Unique identifier for the object. */ + id: string; + /** @description The invoice in which this usage period has been billed for. */ + invoice?: string | null; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "usage_record_summary"; + period: components["schemas"]["period"]; + /** @description The ID of the subscription item this summary is describing. */ + subscription_item: string; + /** @description The total usage within this usage period. */ + total_usage: number; + }; + /** verification_session_redaction */ + verification_session_redaction: { + /** + * @description Indicates whether this object and its related objects have been redacted or not. + * @enum {string} + */ + status: "processing" | "redacted"; + }; + /** + * NotificationWebhookEndpoint + * @description You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be + * notified about events that happen in your Stripe account or connected + * accounts. + * + * Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + * + * Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + */ + webhook_endpoint: { + /** @description The API version events are rendered as for this webhook endpoint. */ + api_version?: string | null; + /** @description The ID of the associated Connect application. */ + application?: string | null; + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number; + /** @description An optional description of what the webhook is used for. */ + description?: string | null; + /** @description The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. */ + enabled_events: string[]; + /** @description Unique identifier for the object. */ + id: string; + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string }; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "webhook_endpoint"; + /** @description The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). Only returned at creation. */ + secret?: string; + /** @description The status of the webhook. It can be `enabled` or `disabled`. */ + status: string; + /** @description The URL of the webhook endpoint. */ + url: string; + }; + }; +} + +export interface operations { + /**

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"]; }; @@ -15543,20 +19516,21 @@ export interface operations { /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** * business_profile_specs * @description Business information about the account. @@ -15576,7 +19550,7 @@ export interface operations { }; support_email?: string; support_phone?: string; - support_url?: Partial & Partial<"">; + support_url?: string | ""; url?: string; }; /** @@ -15598,6 +19572,10 @@ export interface operations { requested?: boolean; }; /** capability_param */ + affirm_payments?: { + requested?: boolean; + }; + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean; }; @@ -15614,6 +19592,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + bank_transfer_payments?: { + requested?: boolean; + }; + /** capability_param */ + blik_payments?: { + requested?: boolean; + }; + /** capability_param */ boleto_payments?: { requested?: boolean; }; @@ -15658,10 +19644,18 @@ export interface operations { requested?: boolean; }; /** capability_param */ + konbini_payments?: { + requested?: boolean; + }; + /** capability_param */ legacy_payments?: { requested?: boolean; }; /** capability_param */ + link_payments?: { + requested?: boolean; + }; + /** capability_param */ oxxo_payments?: { requested?: boolean; }; @@ -15670,6 +19664,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + paynow_payments?: { + requested?: boolean; + }; + /** capability_param */ + promptpay_payments?: { + requested?: boolean; + }; + /** capability_param */ sepa_debit_payments?: { requested?: boolean; }; @@ -15689,6 +19691,14 @@ export interface operations { transfers?: { requested?: boolean; }; + /** capability_param */ + treasury?: { + requested?: boolean; + }; + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean; + }; }; /** * company_specs @@ -15814,7 +19824,7 @@ export interface operations { email?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string; /** * individual_specs @@ -15850,27 +19860,38 @@ export interface operations { state?: string; town?: string; }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; email?: string; first_name?: string; first_name_kana?: string; first_name_kanji?: string; - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; gender?: string; id_number?: string; + id_number_secondary?: string; last_name?: string; last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; phone?: string; /** @enum {string} */ political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; ssn_last_4?: string; /** person_verification_specs */ verification?: { @@ -15887,7 +19908,7 @@ export interface operations { }; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * settings_specs_update * @description Options for customizing how the account functions within Stripe. @@ -15918,6 +19939,8 @@ export interface operations { cvc_failure?: boolean; }; statement_descriptor_prefix?: string; + statement_descriptor_prefix_kana?: string | ""; + statement_descriptor_prefix_kanji?: string | ""; }; /** payments_settings_specs */ payments?: { @@ -15930,7 +19953,7 @@ export interface operations { debit_negative_balances?: boolean; /** transfer_schedule_specs */ schedule?: { - delay_days?: Partial<"minimum"> & Partial; + delay_days?: "minimum" | number; /** @enum {string} */ interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; @@ -15946,6 +19969,16 @@ export interface operations { }; statement_descriptor?: string; }; + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + }; }; /** * tos_acceptance_specs @@ -16012,20 +20045,21 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ default_for_currency?: boolean; /** @description Specifies which fields in the response should be expanded. */ @@ -16130,7 +20164,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; }; @@ -16286,8 +20320,10 @@ export interface operations { content: { "application/json": { /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; + data: ( + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + )[]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -16333,20 +20369,21 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ default_for_currency?: boolean; /** @description Specifies which fields in the response should be expanded. */ @@ -16451,7 +20488,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; }; @@ -16511,8 +20548,6 @@ export interface operations { account: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string; }; }; }; @@ -16628,12 +20663,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -16663,11 +20699,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -16677,7 +20715,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -16686,6 +20724,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16694,7 +20744,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -16815,12 +20865,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -16850,11 +20901,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -16864,7 +20917,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -16873,6 +20926,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16881,7 +20946,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -17045,12 +21110,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -17080,11 +21146,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -17094,7 +21162,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -17103,6 +21171,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -17111,7 +21191,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -17232,12 +21312,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -17267,11 +21348,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -17281,7 +21364,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -17290,6 +21373,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -17298,7 +21393,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -17396,13 +21491,14 @@ export interface operations { GetAccounts: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -17469,20 +21565,21 @@ export interface operations { /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** * business_profile_specs * @description Business information about the account. @@ -17502,7 +21599,7 @@ export interface operations { }; support_email?: string; support_phone?: string; - support_url?: Partial & Partial<"">; + support_url?: string | ""; url?: string; }; /** @@ -17524,6 +21621,10 @@ export interface operations { requested?: boolean; }; /** capability_param */ + affirm_payments?: { + requested?: boolean; + }; + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean; }; @@ -17540,6 +21641,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + bank_transfer_payments?: { + requested?: boolean; + }; + /** capability_param */ + blik_payments?: { + requested?: boolean; + }; + /** capability_param */ boleto_payments?: { requested?: boolean; }; @@ -17584,10 +21693,18 @@ export interface operations { requested?: boolean; }; /** capability_param */ + konbini_payments?: { + requested?: boolean; + }; + /** capability_param */ legacy_payments?: { requested?: boolean; }; /** capability_param */ + link_payments?: { + requested?: boolean; + }; + /** capability_param */ oxxo_payments?: { requested?: boolean; }; @@ -17596,6 +21713,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + paynow_payments?: { + requested?: boolean; + }; + /** capability_param */ + promptpay_payments?: { + requested?: boolean; + }; + /** capability_param */ sepa_debit_payments?: { requested?: boolean; }; @@ -17615,6 +21740,14 @@ export interface operations { transfers?: { requested?: boolean; }; + /** capability_param */ + treasury?: { + requested?: boolean; + }; + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean; + }; }; /** * company_specs @@ -17700,7 +21833,7 @@ export interface operations { }; }; }; - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ country?: string; /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ default_currency?: string; @@ -17742,7 +21875,7 @@ export interface operations { email?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string; /** * individual_specs @@ -17778,27 +21911,38 @@ export interface operations { state?: string; town?: string; }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; email?: string; first_name?: string; first_name_kana?: string; first_name_kanji?: string; - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; gender?: string; id_number?: string; + id_number_secondary?: string; last_name?: string; last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; phone?: string; /** @enum {string} */ political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; ssn_last_4?: string; /** person_verification_specs */ verification?: { @@ -17815,7 +21959,7 @@ export interface operations { }; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * settings_specs * @description Options for customizing how the account functions within Stripe. @@ -17846,6 +21990,8 @@ export interface operations { cvc_failure?: boolean; }; statement_descriptor_prefix?: string; + statement_descriptor_prefix_kana?: string | ""; + statement_descriptor_prefix_kanji?: string | ""; }; /** payments_settings_specs */ payments?: { @@ -17858,7 +22004,7 @@ export interface operations { debit_negative_balances?: boolean; /** transfer_schedule_specs */ schedule?: { - delay_days?: Partial<"minimum"> & Partial; + delay_days?: "minimum" | number; /** @enum {string} */ interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; @@ -17874,6 +22020,16 @@ export interface operations { }; statement_descriptor?: string; }; + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + }; }; /** * tos_acceptance_specs @@ -17957,20 +22113,21 @@ export interface operations { /** @description An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. */ account_token?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** * business_profile_specs * @description Business information about the account. @@ -17990,7 +22147,7 @@ export interface operations { }; support_email?: string; support_phone?: string; - support_url?: Partial & Partial<"">; + support_url?: string | ""; url?: string; }; /** @@ -18012,6 +22169,10 @@ export interface operations { requested?: boolean; }; /** capability_param */ + affirm_payments?: { + requested?: boolean; + }; + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean; }; @@ -18028,6 +22189,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + bank_transfer_payments?: { + requested?: boolean; + }; + /** capability_param */ + blik_payments?: { + requested?: boolean; + }; + /** capability_param */ boleto_payments?: { requested?: boolean; }; @@ -18072,10 +22241,18 @@ export interface operations { requested?: boolean; }; /** capability_param */ + konbini_payments?: { + requested?: boolean; + }; + /** capability_param */ legacy_payments?: { requested?: boolean; }; /** capability_param */ + link_payments?: { + requested?: boolean; + }; + /** capability_param */ oxxo_payments?: { requested?: boolean; }; @@ -18084,6 +22261,14 @@ export interface operations { requested?: boolean; }; /** capability_param */ + paynow_payments?: { + requested?: boolean; + }; + /** capability_param */ + promptpay_payments?: { + requested?: boolean; + }; + /** capability_param */ sepa_debit_payments?: { requested?: boolean; }; @@ -18103,6 +22288,14 @@ export interface operations { transfers?: { requested?: boolean; }; + /** capability_param */ + treasury?: { + requested?: boolean; + }; + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean; + }; }; /** * company_specs @@ -18228,7 +22421,7 @@ export interface operations { email?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string; /** * individual_specs @@ -18264,27 +22457,38 @@ export interface operations { state?: string; town?: string; }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; email?: string; first_name?: string; first_name_kana?: string; first_name_kanji?: string; - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; gender?: string; id_number?: string; + id_number_secondary?: string; last_name?: string; last_name_kana?: string; last_name_kanji?: string; maiden_name?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; phone?: string; /** @enum {string} */ political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; ssn_last_4?: string; /** person_verification_specs */ verification?: { @@ -18301,7 +22505,7 @@ export interface operations { }; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * settings_specs_update * @description Options for customizing how the account functions within Stripe. @@ -18332,6 +22536,8 @@ export interface operations { cvc_failure?: boolean; }; statement_descriptor_prefix?: string; + statement_descriptor_prefix_kana?: string | ""; + statement_descriptor_prefix_kanji?: string | ""; }; /** payments_settings_specs */ payments?: { @@ -18344,7 +22550,7 @@ export interface operations { debit_negative_balances?: boolean; /** transfer_schedule_specs */ schedule?: { - delay_days?: Partial<"minimum"> & Partial; + delay_days?: "minimum" | number; /** @enum {string} */ interval?: "daily" | "manual" | "monthly" | "weekly"; monthly_anchor?: number; @@ -18360,6 +22566,16 @@ export interface operations { }; statement_descriptor?: string; }; + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + }; }; /** * tos_acceptance_specs @@ -18434,20 +22650,21 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ default_for_currency?: boolean; /** @description Specifies which fields in the response should be expanded. */ @@ -18554,7 +22771,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; }; @@ -18719,8 +22936,10 @@ export interface operations { content: { "application/json": { /** @description The list contains all external accounts that have been attached to the Stripe account. These may be bank accounts or cards. */ - data: (Partial & - Partial)[]; + data: ( + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + )[]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -18771,20 +22990,21 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. */ default_for_currency?: boolean; /** @description Specifies which fields in the response should be expanded. */ @@ -18891,7 +23111,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; }; @@ -18956,8 +23176,6 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string; }; }; }; @@ -19080,12 +23298,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -19115,11 +23334,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -19129,7 +23350,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -19138,6 +23359,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19146,7 +23379,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -19268,12 +23501,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -19303,11 +23537,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -19317,7 +23553,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -19326,6 +23562,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19334,7 +23582,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -19506,12 +23754,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -19541,11 +23790,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -19555,7 +23806,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -19564,6 +23815,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19572,7 +23835,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -19694,12 +23957,13 @@ export interface operations { town?: string; }; /** @description The person's date of birth. */ - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; /** * person_documents_specs * @description Documents that may be submitted to satisfy various informational requests. @@ -19729,11 +23993,13 @@ export interface operations { /** @description The Kanji variation of the person's first name (Japan only). */ first_name_kanji?: string; /** @description A list of alternate names or aliases that the person is known by. */ - full_name_aliases?: Partial & Partial<"">; + full_name_aliases?: string[] | ""; /** @description The person's gender (International regulations require either "male" or "female"). */ gender?: string; /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string; + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string; /** @description The person's last name. */ last_name?: string; /** @description The Kana variation of the person's last name (Japan only). */ @@ -19743,7 +24009,7 @@ export interface operations { /** @description The person's maiden name. */ maiden_name?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. */ nationality?: string; /** @description A [person token](https://stripe.com/docs/connect/account-tokens), used to securely provide details to the person. */ @@ -19752,6 +24018,18 @@ export interface operations { phone?: string; /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string; + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19760,7 +24038,7 @@ export interface operations { director?: boolean; executive?: boolean; owner?: boolean; - percent_ownership?: Partial & Partial<"">; + percent_ownership?: number | ""; representative?: boolean; title?: string; }; @@ -19986,13 +24264,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -20098,7 +24377,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -20248,7 +24527,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ amount?: number; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; @@ -20258,68 +24537,24 @@ export interface operations { }; }; }; - /** - *

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

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

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

- * - *

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

- */ - GetBalanceHistory: { + /**

List all secrets stored on the given scope.

*/ + GetAppsSecrets: { parameters: { query: { - 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; + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; - /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ - type?: string; }; }; responses: { @@ -20327,7 +24562,218 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["balance_transaction"][]; + data: components["schemas"]["apps.secret"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Create or replace a secret in the secret store.

*/ + PostAppsSecrets: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["apps.secret"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number; + /** @description A name for the secret that's unique within the scope. */ + name: string; + /** @description The plaintext secret value to be stored. */ + payload: string; + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; + }; + }; + }; + }; + /**

Deletes a secret from the secret store by name and scope.

*/ + PostAppsSecretsDelete: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["apps.secret"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description A name for the secret that's unique within the scope. */ + name: string; + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; + }; + }; + }; + }; + /**

Finds a secret in the secret store by name and scope.

*/ + GetAppsSecretsFind: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A name for the secret that's unique within the scope. */ + name: string; + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: "account" | "user"; + user?: string; + }; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["apps.secret"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /** + *

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

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

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

+ * + *

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

+ */ + GetBalanceHistory: { + parameters: { + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. */ + payout?: string; + /** Only returns the original transaction. */ + source?: string; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + /** Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. */ + type?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["balance_transaction"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -20396,13 +24842,14 @@ export interface operations { GetBalanceTransactions: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -20561,11 +25008,11 @@ export interface operations { */ business_profile: { headline?: string; - privacy_policy_url: string; - terms_of_service_url: string; + privacy_policy_url?: string; + terms_of_service_url?: string; }; /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: Partial & Partial<"">; + default_return_url?: string | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @@ -20575,10 +25022,9 @@ export interface operations { features: { /** customer_update_creation_param */ customer_update?: { - allowed_updates: Partial< - ("address" | "email" | "phone" | "shipping" | "tax_id")[] - > & - Partial<"">; + allowed_updates?: + | ("address" | "email" | "phone" | "shipping" | "tax_id")[] + | ""; enabled: boolean; }; /** invoice_list_param */ @@ -20594,19 +25040,18 @@ export interface operations { /** subscription_cancellation_reason_creation_param */ cancellation_reason?: { enabled: boolean; - options: Partial< - ( - | "customer_service" - | "low_quality" - | "missing_features" - | "other" - | "switched_service" - | "too_complex" - | "too_expensive" - | "unused" - )[] - > & - Partial<"">; + options: + | ( + | "customer_service" + | "low_quality" + | "missing_features" + | "other" + | "switched_service" + | "too_complex" + | "too_expensive" + | "unused" + )[] + | ""; }; enabled: boolean; /** @enum {string} */ @@ -20623,18 +25068,16 @@ export interface operations { }; /** subscription_update_creation_param */ subscription_update?: { - default_allowed_updates: Partial< - ("price" | "promotion_code" | "quantity")[] - > & - Partial<"">; + default_allowed_updates: + | ("price" | "promotion_code" | "quantity")[] + | ""; enabled: boolean; - products: Partial< - { - prices: string[]; - product: string; - }[] - > & - Partial<"">; + products: + | { + prices: string[]; + product: string; + }[] + | ""; /** @enum {string} */ proration_behavior?: | "always_invoice" @@ -20642,6 +25085,13 @@ export interface operations { | "none"; }; }; + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean; + }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; }; @@ -20711,11 +25161,11 @@ export interface operations { */ business_profile?: { headline?: string; - privacy_policy_url?: string; - terms_of_service_url?: string; + privacy_policy_url?: string | ""; + terms_of_service_url?: string | ""; }; /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ - default_return_url?: Partial & Partial<"">; + default_return_url?: string | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @@ -20725,10 +25175,9 @@ export interface operations { features?: { /** customer_update_updating_param */ customer_update?: { - allowed_updates?: Partial< - ("address" | "email" | "phone" | "shipping" | "tax_id")[] - > & - Partial<"">; + allowed_updates?: + | ("address" | "email" | "phone" | "shipping" | "tax_id")[] + | ""; enabled?: boolean; }; /** invoice_list_param */ @@ -20744,19 +25193,18 @@ export interface operations { /** subscription_cancellation_reason_updating_param */ cancellation_reason?: { enabled: boolean; - options?: Partial< - ( - | "customer_service" - | "low_quality" - | "missing_features" - | "other" - | "switched_service" - | "too_complex" - | "too_expensive" - | "unused" - )[] - > & - Partial<"">; + options?: + | ( + | "customer_service" + | "low_quality" + | "missing_features" + | "other" + | "switched_service" + | "too_complex" + | "too_expensive" + | "unused" + )[] + | ""; }; enabled?: boolean; /** @enum {string} */ @@ -20773,18 +25221,16 @@ export interface operations { }; /** subscription_update_updating_param */ subscription_update?: { - default_allowed_updates?: Partial< - ("price" | "promotion_code" | "quantity")[] - > & - Partial<"">; + default_allowed_updates?: + | ("price" | "promotion_code" | "quantity")[] + | ""; enabled?: boolean; - products?: Partial< - { - prices: string[]; - product: string; - }[] - > & - Partial<"">; + products?: + | { + prices: string[]; + product: string; + }[] + | ""; /** @enum {string} */ proration_behavior?: | "always_invoice" @@ -20792,8 +25238,15 @@ export interface operations { | "none"; }; }; + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean; + }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -20883,93 +25336,19 @@ export interface operations { }; }; }; - /**

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

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

Retrieves the Bitcoin receiver with the given ID.

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

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { + /**

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: { - /** Only return transactions for the customer specified by this customer ID. */ + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** Only return charges for the customer specified by this customer ID. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; @@ -20977,11 +25356,12 @@ 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 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; - }; - path: { - receiver: string; + /** Only return charges for this transfer group. */ + transfer_group?: string; }; }; responses: { @@ -20989,115 +25369,7 @@ export interface operations { 200: { content: { "application/json": { - /** @description Details about each object. */ - data: components["schemas"]["bitcoin_transaction"][]; - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: "list"; - /** @description The URL where this list can be accessed. */ - url: string; - }; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; - }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { [key: string]: unknown }; - }; - }; - }; - /**

List bitcoin transacitons for a given receiver.

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

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

*/ - GetCharges: { - parameters: { - query: { - created?: 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"][]; + data: components["schemas"]["charge"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -21145,45 +25417,54 @@ export interface operations { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number; application_fee?: number; - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ application_fee_amount?: number; /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ capture?: boolean; /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: 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; - /** @enum {string} */ - object?: "card"; - }> & - Partial; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { [key: string]: string }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + } + | string; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string; /** @description The ID of an existing customer that will be charged in this request. */ customer?: string; /** @description An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. */ description?: string; - destination?: Partial<{ - account: string; - amount?: number; - }> & - Partial; + destination?: + | { + account: string; + amount?: number; + } + | string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ on_behalf_of?: string; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string; /** @@ -21225,6 +25506,57 @@ export interface operations { }; }; }; + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetChargesSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["charge"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /**

Retrieves the details of a 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: { @@ -21295,7 +25627,7 @@ export interface operations { user_report: "" | "fraudulent" | "safe"; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. */ receipt_email?: string; /** @@ -21468,7 +25800,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ submit?: boolean; }; @@ -21543,8 +25875,9 @@ export interface operations { amount?: number; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + instructions_email?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; payment_intent?: string; /** @enum {string} */ reason?: "duplicate" | "fraudulent" | "requested_by_customer"; @@ -21627,11 +25960,23 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description A positive integer representing how much to refund. */ amount?: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Customer whose customer balance to refund from. */ + customer?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: "customer_balance"; payment_intent?: string; /** @enum {string} */ reason?: "duplicate" | "fraudulent" | "requested_by_customer"; @@ -21700,7 +26045,7 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -21709,6 +26054,12 @@ export interface operations { GetCheckoutSessions: { parameters: { query: { + /** Only return the Checkout Sessions for the Customer specified. */ + customer?: string; + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details?: { + 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. */ @@ -21812,8 +26163,12 @@ export interface operations { */ consent_collection?: { /** @enum {string} */ - promotions?: "auto"; + promotions?: "auto" | "none"; + /** @enum {string} */ + terms_of_service?: "none" | "required"; }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -21834,7 +26189,8 @@ export interface operations { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -21869,7 +26225,7 @@ export interface operations { expand?: string[]; /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ expires_at?: number; /** @@ -21877,7 +26233,7 @@ export interface operations { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ line_items?: { /** adjustable_quantity_params */ @@ -21886,7 +26242,6 @@ export interface operations { maximum?: number; minimum?: number; }; - description?: string; dynamic_tax_rates?: string[]; price?: string; /** price_data_with_product_data */ @@ -22008,6 +26363,16 @@ export interface operations { }; transfer_group?: string; }; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -22019,7 +26384,7 @@ export interface operations { currency?: "cad" | "usd"; /** mandate_options_param */ mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; + custom_mandate_url?: string | ""; default_for?: ("invoice" | "subscription")[]; interval_description?: string; /** @enum {string} */ @@ -22028,26 +26393,183 @@ export interface operations { transaction_type?: "business" | "personal"; }; /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** @enum {string} */ verification_method?: "automatic" | "instant" | "microdeposits"; }; /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ boleto?: { expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean; + }; + /** @enum {string} */ + setup_future_usage?: "off_session" | "on_session"; + statement_descriptor_suffix_kana?: string; + statement_descriptor_suffix_kanji?: string; + }; + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; }; /** payment_method_options_param */ oxxo?: { expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number; + }; + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + /** @enum {string} */ + verification_method?: "automatic" | "instant"; }; /** payment_method_options_param */ wechat_pay?: { app_id?: string; /** @enum {string} */ client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; }; }; /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -22057,23 +26579,31 @@ export interface operations { */ payment_method_types?: ( | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" | "card" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay" )[]; /** @@ -22365,6 +26895,13 @@ export interface operations { fixed_amount?: { amount: number; currency: string; + currency_options?: { + [key: string]: { + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }; + }; }; metadata?: { [key: string]: string }; /** @enum {string} */ @@ -22389,11 +26926,7 @@ export interface operations { subscription_data?: { application_fee_percent?: number; default_tax_rates?: string[]; - items?: { - plan: string; - quantity?: number; - tax_rates?: string[]; - }[]; + description?: string; metadata?: { [key: string]: string }; /** transfer_data_specs */ transfer_data?: { @@ -22617,13 +27150,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -22699,6 +27233,12 @@ export interface operations { }; /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ currency?: string; + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number; + }; + }; /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -22713,7 +27253,7 @@ export interface operations { /** @description A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. */ max_redemptions?: number; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ name?: string; /** @description A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). */ @@ -22782,10 +27322,16 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number; + }; + }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. */ name?: string; }; @@ -22902,9 +27448,9 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ amount?: number; - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ credit_amount?: number; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; @@ -22916,7 +27462,7 @@ export interface operations { description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; /** @enum {string} */ type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; @@ -22927,7 +27473,7 @@ export interface operations { memo?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ out_of_band_amount?: number; /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -22940,7 +27486,7 @@ export interface operations { | "product_unsatisfactory"; /** @description ID of an existing refund to link this credit note to. */ refund?: string; - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number; }; }; @@ -22950,9 +27496,9 @@ export interface operations { GetCreditNotesPreview: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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[]; @@ -22964,7 +27510,7 @@ export interface operations { description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; /** @enum {string} */ type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; @@ -22975,7 +27521,7 @@ export interface operations { memo?: string; /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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?: @@ -22985,7 +27531,7 @@ export interface operations { | "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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number; }; }; @@ -23013,9 +27559,9 @@ export interface operations { GetCreditNotesPreviewLines: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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; @@ -23031,7 +27577,7 @@ export interface operations { description?: string; invoice_line_item?: string; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; /** @enum {string} */ type: "custom_line_item" | "invoice_line_item"; unit_amount?: number; @@ -23042,7 +27588,7 @@ export interface operations { memo?: string; /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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?: @@ -23052,7 +27598,7 @@ export interface operations { | "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. */ + /** The integer amount in cents (or local equivalent) 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; @@ -23238,13 +27784,14 @@ export interface operations { GetCustomers: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. */ email?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -23255,6 +27802,8 @@ 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; + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock?: string; }; }; responses: { @@ -23308,17 +27857,29 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The customer's address. */ - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + /** @description An integer amount in cents (or local equivalent) 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; + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; + }; coupon?: string; /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ description?: string; @@ -23333,18 +27894,26 @@ export interface operations { * @description Default invoice settings for this customer. */ invoice_settings?: { - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; + custom_fields?: + | { + name: string; + value: string; + }[] + | ""; default_payment_method?: string; footer?: string; + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: + | "" + | "exclude_tax" + | "include_inclusive_tax"; + } + | ""; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The customer's full name or business name. */ name?: string; /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -23357,27 +27926,28 @@ export interface operations { /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ promotion_code?: string; /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; source?: string; /** * tax_param * @description Tax details about the customer. */ tax?: { - ip_address?: Partial & Partial<"">; + ip_address?: string | ""; }; /** * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. @@ -23391,6 +27961,7 @@ export interface operations { | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -23402,10 +27973,12 @@ export interface operations { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -23425,6 +27998,7 @@ export interface operations { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -23432,10 +28006,63 @@ export interface operations { | "za_vat"; value: string; }[]; + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string; }; }; }; }; + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetCustomersSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["customer"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /**

Retrieves a Customer object.

*/ GetCustomersCustomer: { parameters: { @@ -23451,8 +28078,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": + | components["schemas"]["customer"] + | components["schemas"]["deleted_customer"]; }; }; /** Error response. */ @@ -23497,48 +28125,62 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The customer's address. */ - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ balance?: number; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: 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; - /** @enum {string} */ - object?: "card"; - }> & - Partial; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { [key: string]: string }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + } + | string; + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; + }; coupon?: string; /** @description ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string; @@ -23567,18 +28209,26 @@ export interface operations { * @description Default invoice settings for this customer. */ invoice_settings?: { - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; + custom_fields?: + | { + name: string; + value: string; + }[] + | ""; default_payment_method?: string; footer?: string; + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: + | "" + | "exclude_tax" + | "include_inclusive_tax"; + } + | ""; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The customer's full name or business name. */ name?: string; /** @description The sequence to be used on the customer's next invoice. Defaults to 1. */ @@ -23590,35 +28240,34 @@ export interface operations { /** @description The API ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. */ promotion_code?: string; /** @description The customer's shipping information. Appears on invoices emailed to this customer. */ - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; source?: string; /** * tax_param * @description Tax details about the customer. */ tax?: { - ip_address?: Partial & Partial<"">; + ip_address?: string | ""; }; /** * @description The customer's tax exemption. One of `none`, `exempt`, or `reverse`. * @enum {string} */ tax_exempt?: "" | "exempt" | "none" | "reverse"; - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: Partial<"now"> & Partial; }; }; }; @@ -23723,7 +28372,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ amount: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ currency: string; @@ -23732,7 +28381,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -23799,7 +28448,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -23886,36 +28535,38 @@ export interface operations { /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ alipay_account?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: 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; - /** @enum {string} */ - object?: "card"; - }> & - Partial; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { [key: string]: string }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + } + | string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -23970,9 +28621,10 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial & - Partial; + "application/json": + | components["schemas"]["card"] + | components["schemas"]["bank_account"] + | components["schemas"]["source"]; }; }; /** Error response. */ @@ -24011,7 +28663,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; /** owner */ @@ -24045,8 +28697,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": + | components["schemas"]["payment_source"] + | components["schemas"]["deleted_payment_source"]; }; }; /** Error response. */ @@ -24183,36 +28836,38 @@ export interface operations { /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ alipay_account?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: 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; - /** @enum {string} */ - object?: "card"; - }> & - Partial; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { [key: string]: string }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + } + | string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -24267,9 +28922,10 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial & - Partial; + "application/json": + | components["schemas"]["card"] + | components["schemas"]["bank_account"] + | components["schemas"]["source"]; }; }; /** Error response. */ @@ -24308,7 +28964,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; /** owner */ @@ -24342,8 +28998,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": + | components["schemas"]["payment_source"] + | components["schemas"]["deleted_payment_source"]; }; }; /** Error response. */ @@ -24362,6 +29019,156 @@ export interface operations { }; }; }; + /**

Retrieves a customer’s cash balance.

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

Changes the settings on a customer’s cash balance.

*/ + PostCustomersCustomerCashBalance: { + parameters: { + path: { + customer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["cash_balance"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: "automatic" | "manual"; + }; + }; + }; + }; + }; + /**

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

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

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactionsTransaction: { + 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_cash_balance_transaction"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; GetCustomersCustomerDiscount: { parameters: { path: { @@ -24419,6 +29226,69 @@ export interface operations { }; }; }; + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + PostCustomersCustomerFundingInstructions: { + parameters: { + path: { + customer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["funding_instructions"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: "bank_transfer"; + }; + }; + }; + }; /**

Returns a list of PaymentMethods for a given Customer

*/ GetCustomersCustomerPaymentMethods: { parameters: { @@ -24437,23 +29307,32 @@ export interface operations { /** A required filter on the list, based on the object `type` field. */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" | "card" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; }; }; @@ -24488,6 +29367,38 @@ export interface operations { }; }; }; + /**

Retrieves a PaymentMethod object for a given Customer.

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

List sources for a specified customer.

*/ GetCustomersCustomerSources: { parameters: { @@ -24513,11 +29424,11 @@ export interface operations { content: { "application/json": { /** @description Details about each object. */ - data: (Partial & - Partial & - Partial & - Partial & - Partial)[]; + data: ( + | components["schemas"]["bank_account"] + | components["schemas"]["card"] + | components["schemas"]["source"] + )[]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -24576,36 +29487,38 @@ export interface operations { /** @description A token returned by [Stripe.js](https://stripe.com/docs/js) representing the user’s Alipay account details. */ alipay_account?: string; /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ - bank_account?: Partial<{ - account_holder_name?: string; - /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; - country: string; - currency?: string; - /** @enum {string} */ - object?: "bank_account"; - routing_number?: string; - }> & - Partial; + bank_account?: + | { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + country: string; + currency?: string; + /** @enum {string} */ + object?: "bank_account"; + routing_number?: string; + } + | string; /** @description A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). */ - card?: 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; - /** @enum {string} */ - object?: "card"; - }> & - Partial; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + cvc?: string; + exp_month: number; + exp_year: number; + metadata?: { [key: string]: string }; + name?: string; + number: string; + /** @enum {string} */ + object?: "card"; + } + | string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -24660,9 +29573,10 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial & - Partial; + "application/json": + | components["schemas"]["card"] + | components["schemas"]["bank_account"] + | components["schemas"]["source"]; }; }; /** Error response. */ @@ -24701,7 +29615,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Cardholder name. */ name?: string; /** owner */ @@ -24735,8 +29649,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": + | components["schemas"]["payment_source"] + | components["schemas"]["deleted_payment_source"]; }; }; /** Error response. */ @@ -24861,7 +29776,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string; /** one_time_price_data */ @@ -24875,13 +29790,13 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ application_fee_percent?: number; /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean; @@ -24893,15 +29808,16 @@ export interface operations { backdate_start_date?: number; /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** * Format: unix-time * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -24916,6 +29832,8 @@ export interface operations { collection_method?: "charge_automatically" | "send_invoice"; /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string; + /** @description Three-letter [ISO currency 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 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ days_until_due?: number; /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24923,15 +29841,16 @@ export interface operations { /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_source?: string; /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A list of up to 20 subscription items, each with an attached price. */ items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; metadata?: { [key: string]: string }; price?: string; /** recurring_price_data */ @@ -24951,10 +29870,10 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -24979,68 +29898,124 @@ export interface operations { payment_settings?: { /** payment_method_options */ payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - amount?: number; - /** @enum {string} */ - amount_type?: "fixed" | "maximum"; - description?: string; - }; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number; + /** @enum {string} */ + amount_type?: "fixed" | "maximum"; + description?: string; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + /** @enum {string} */ + save_default_payment_method?: "off" | "on_subscription"; }; /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: Partial<{ - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } + | ""; /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -25053,7 +30028,7 @@ export interface operations { destination: string; }; /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: Partial<"now"> & Partial; + trial_end?: "now" | number; /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ trial_from_plan?: boolean; /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ @@ -25119,7 +30094,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string; /** one_time_price_data */ @@ -25133,13 +30108,13 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ application_fee_percent?: number; /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean; @@ -25150,13 +30125,14 @@ export interface operations { */ billing_cycle_anchor?: "now" | "unchanged"; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: Partial & Partial<"">; + cancel_at?: number | ""; /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ cancel_at_period_end?: boolean; /** @@ -25173,19 +30149,20 @@ export interface operations { /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_source?: string; /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A list of up to 20 subscription items, each with an attached price. */ items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; price?: string; /** recurring_price_data */ price_data?: { @@ -25204,20 +30181,21 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial<{ - /** @enum {string} */ - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - /** Format: unix-time */ - resumes_at?: number; - }> & - Partial<"">; + pause_collection?: + | { + /** @enum {string} */ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + /** Format: unix-time */ + resumes_at?: number; + } + | ""; /** * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. * @@ -25240,70 +30218,124 @@ export interface operations { payment_settings?: { /** payment_method_options */ payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - amount?: number; - /** @enum {string} */ - amount_type?: "fixed" | "maximum"; - description?: string; - }; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number; + /** @enum {string} */ + amount_type?: "fixed" | "maximum"; + description?: string; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + /** @enum {string} */ + save_default_payment_method?: "off" | "on_subscription"; }; /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: Partial<{ - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } + | ""; /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -25313,13 +30345,14 @@ export interface operations { */ proration_date?: number; /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: Partial<{ - amount_percent?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount_percent?: number; + destination: string; + } + | ""; /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: Partial<"now"> & Partial; + trial_end?: "now" | number; /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ trial_from_plan?: boolean; }; @@ -25502,13 +30535,14 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ type: | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -25520,10 +30554,12 @@ export interface operations { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -25543,6 +30579,7 @@ export interface operations { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -25620,13 +30657,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -25765,7 +30803,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). */ submit?: boolean; }; @@ -25869,13 +30907,14 @@ export interface operations { GetEvents: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. */ delivery_success?: boolean; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -26034,13 +31073,14 @@ export interface operations { GetFileLinks: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26060,6 +31100,7 @@ export interface operations { 200: { content: { "application/json": { + /** @description Details about each object. */ data: components["schemas"]["file_link"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; @@ -26112,10 +31153,10 @@ export interface operations { * @description A future timestamp after which the link will no longer be usable. */ expires_at?: number; - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ file: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -26178,9 +31219,9 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. */ - expires_at?: Partial<"now"> & Partial & Partial<"">; + expires_at?: "now" | number | ""; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -26189,13 +31230,14 @@ export interface operations { GetFiles: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26217,7 +31259,8 @@ export interface operations { | "pci_document" | "selfie" | "sigma_scheduled_query" - | "tax_document_user_upload"; + | "tax_document_user_upload" + | "terminal_reader_splashscreen"; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -26288,7 +31331,7 @@ export interface operations { create: boolean; /** Format: unix-time */ expires_at?: number; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; /** * @description The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. @@ -26303,7 +31346,8 @@ export interface operations { | "dispute_evidence" | "identity_document" | "pci_document" - | "tax_document_user_upload"; + | "tax_document_user_upload" + | "terminal_reader_splashscreen"; }; }; }; @@ -26339,29 +31383,25 @@ export interface operations { }; }; }; - /**

List all verification reports.

*/ - GetIdentityVerificationReports: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetFinancialConnectionsAccounts: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string; + 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; + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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 VerificationReports of this type */ - type?: "document" | "id_number"; - /** Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. */ - verification_session?: string; }; }; responses: { @@ -26369,7 +31409,8 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["identity.verification_report"][]; + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -26395,22 +31436,221 @@ export interface operations { }; }; }; - /**

Retrieves an existing VerificationReport

*/ - GetIdentityVerificationReportsReport: { + /**

Retrieves the details of an Financial Connections Account.

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

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

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

Lists all owners for a given Account

*/ + GetFinancialConnectionsAccountsAccountOwners: { + 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; + /** The ID of the ownership object to fetch owners from. */ + ownership: string; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account_owner"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostFinancialConnectionsAccountsAccountRefresh: { + parameters: { path: { - report: string; + account: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["identity.verification_report"]; + "application/json": components["schemas"]["financial_connections.account"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description The list of account features that you would like to refresh. */ + features: ("balance" | "ownership")[]; + }; + }; + }; + }; + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostFinancialConnectionsSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["financial_connections.session"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string; + customer?: string; + /** @enum {string} */ + type: "account" | "customer"; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[]; + }; + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string; + }; + }; + }; + }; + /**

Retrieves the details of a Financial Connections Session

*/ + GetFinancialConnectionsSessionsSession: { + 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"]["financial_connections.session"]; }; }; /** Error response. */ @@ -26426,17 +31666,18 @@ export interface operations { }; }; }; - /**

Returns a list of VerificationSessions

*/ - GetIdentityVerificationSessions: { + /**

List all verification reports.

*/ + GetIdentityVerificationReports: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -26445,8 +31686,10 @@ 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; - /** Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ - status?: "canceled" | "processing" | "requires_input" | "verified"; + /** Only return VerificationReports of this type */ + type?: "document" | "id_number"; + /** Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. */ + verification_session?: string; }; }; responses: { @@ -26454,7 +31697,93 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["identity.verification_session"][]; + data: components["schemas"]["identity.verification_report"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Retrieves an existing VerificationReport

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

Returns a list of VerificationSessions

*/ + GetIdentityVerificationSessions: { + parameters: { + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + /** Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). */ + status?: "canceled" | "processing" | "requires_input" | "verified"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["identity.verification_session"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -26516,13 +31845,18 @@ export interface operations { * @description A set of options for the session’s verification checks. */ options?: { - document?: Partial<{ - allowed_types?: ("driving_license" | "id_card" | "passport")[]; - require_id_number?: boolean; - require_live_capture?: boolean; - require_matching_selfie?: boolean; - }> & - Partial<"">; + document?: + | { + allowed_types?: ( + | "driving_license" + | "id_card" + | "passport" + )[]; + require_id_number?: boolean; + require_live_capture?: boolean; + require_matching_selfie?: boolean; + } + | ""; }; /** @description The URL that the user will be redirected to upon completing the verification flow. */ return_url?: string; @@ -26609,13 +31943,18 @@ export interface operations { * @description A set of options for the session’s verification checks. */ options?: { - document?: Partial<{ - allowed_types?: ("driving_license" | "id_card" | "passport")[]; - require_id_number?: boolean; - require_live_capture?: boolean; - require_matching_selfie?: boolean; - }> & - Partial<"">; + document?: + | { + allowed_types?: ( + | "driving_license" + | "id_card" + | "passport" + )[]; + require_id_number?: boolean; + require_live_capture?: boolean; + require_matching_selfie?: boolean; + } + | ""; }; /** * @description The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. @@ -26714,13 +32053,14 @@ export interface operations { GetInvoiceitems: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -26787,7 +32127,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ amount?: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string; @@ -26798,22 +32138,21 @@ export interface operations { /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. */ discountable?: boolean; /** @description The coupons to redeem into discounts for the invoice item or invoice line item. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. */ invoice?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -26842,11 +32181,11 @@ export interface operations { subscription?: string; /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: string[]; - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number; /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string; }; @@ -26908,27 +32247,26 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ amount?: number; /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ description?: string; /** @description Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. */ discountable?: boolean; /** @description The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -26954,12 +32292,12 @@ export interface operations { /** @description Non-negative integer. The quantity of units for the invoice item. */ quantity?: number; /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ - tax_rates?: Partial & Partial<"">; - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + tax_rates?: string[] | ""; + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number; /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string; }; @@ -26999,22 +32337,24 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return invoices for the customer specified by this customer ID. */ customer?: string; - due_date?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + due_date?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -27060,7 +32400,7 @@ export interface operations { }; }; }; - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ PostInvoices: { responses: { /** Successful response. */ @@ -27080,8 +32420,8 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: Partial & Partial<"">; - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + account_tax_ids?: string[] | ""; + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number; /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ auto_advance?: boolean; @@ -27097,16 +32437,17 @@ export interface operations { * @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string; /** @description A list of up to 4 custom fields to be displayed on the invoice. */ - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; + custom_fields?: + | { + name: string; + value: string; + }[] + | ""; /** @description The ID of the customer who will be billed. */ - customer: string; + customer?: string; /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ days_until_due?: number; /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -27118,13 +32459,12 @@ export interface operations { /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ description?: string; /** @description The coupons to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** * Format: unix-time * @description The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. @@ -27134,8 +32474,17 @@ export interface operations { expand?: string[]; /** @description Footer to be displayed on the invoice. */ footer?: string; + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: { + /** @enum {string} */ + action: "revision"; + invoice: string; + }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ on_behalf_of?: string; /** @@ -27143,53 +32492,128 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string; /** payment_method_options */ payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: + | { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } + | ""; + }; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + }; + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + pending_invoice_items_behavior?: + | "exclude" + | "include" + | "include_and_require"; + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; - }; + amount_tax_display?: + | "" + | "exclude_tax" + | "include_inclusive_tax"; + } + | ""; /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string; - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ subscription?: string; /** * transfer_data_specs @@ -27203,6 +32627,57 @@ export interface operations { }; }; }; + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetInvoicesSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["invoice"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /** *

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

* @@ -27219,36 +32694,40 @@ export interface operations { }; /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string; /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string; /** Details about the customer you want to invoice or overrides for an existing customer. */ customer_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; /** tax_param */ tax?: { - ip_address?: Partial & Partial<"">; + ip_address?: string | ""; }; /** @enum {string} */ tax_exempt?: "" | "exempt" | "none" | "reverse"; @@ -27258,6 +32737,7 @@ export interface operations { | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -27269,10 +32749,12 @@ export interface operations { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -27292,6 +32774,7 @@ export interface operations { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -27301,13 +32784,12 @@ export interface operations { }[]; }; /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** List of invoice items to add or update in the upcoming invoice preview. */ @@ -27316,15 +32798,14 @@ export interface operations { currency?: string; description?: string; discountable?: boolean; - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; invoiceitem?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** period */ period?: { /** Format: unix-time */ @@ -27344,7 +32825,7 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; unit_amount?: number; /** Format: decimal */ unit_amount_decimal?: string; @@ -27354,26 +32835,26 @@ 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; + subscription_billing_cycle_anchor?: ("now" | "unchanged") | number; /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ - subscription_cancel_at?: Partial & Partial<"">; + subscription_cancel_at?: number | ""; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ subscription_cancel_at_period_end?: boolean; /** This simulates the subscription being canceled or expired immediately. */ subscription_cancel_now?: boolean; /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: Partial & Partial<"">; + subscription_default_tax_rates?: string[] | ""; /** A list of up to 20 subscription items, each with an attached price. */ subscription_items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; price?: string; /** recurring_price_data */ price_data?: { @@ -27392,15 +32873,9 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: | "always_invoice" | "create_prorations" @@ -27410,7 +32885,7 @@ export interface operations { /** Date a subscription is intended to start (can be future or past) */ subscription_start_date?: number; /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: Partial<"now"> & Partial; + subscription_trial_end?: "now" | number; /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ subscription_trial_from_plan?: boolean; }; @@ -27445,36 +32920,40 @@ export interface operations { }; /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string; /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string; /** Details about the customer you want to invoice or overrides for an existing customer. */ customer_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - name: string; - phone?: string; - }> & - Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; /** tax_param */ tax?: { - ip_address?: Partial & Partial<"">; + ip_address?: string | ""; }; /** @enum {string} */ tax_exempt?: "" | "exempt" | "none" | "reverse"; @@ -27484,6 +32963,7 @@ export interface operations { | "ae_trn" | "au_abn" | "au_arn" + | "bg_uic" | "br_cnpj" | "br_cpf" | "ca_bn" @@ -27495,10 +32975,12 @@ export interface operations { | "ch_vat" | "cl_tin" | "es_cif" + | "eu_oss_vat" | "eu_vat" | "gb_vat" | "ge_vat" | "hk_br" + | "hu_tin" | "id_npwp" | "il_vat" | "in_gst" @@ -27518,6 +33000,7 @@ export interface operations { | "sa_vat" | "sg_gst" | "sg_uen" + | "si_tin" | "th_vat" | "tw_vat" | "ua_vat" @@ -27527,13 +33010,12 @@ export interface operations { }[]; }; /** The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the customer or subscription. This only works for coupons directly applied to the invoice. To apply a coupon to a subscription, you must use the `coupon` parameter instead. Pass an empty string to avoid inheriting any discounts. To preview the upcoming invoice for a subscription that hasn't been created, use `coupon` instead. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -27544,15 +33026,14 @@ export interface operations { currency?: string; description?: string; discountable?: boolean; - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; invoiceitem?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** period */ period?: { /** Format: unix-time */ @@ -27572,7 +33053,7 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; unit_amount?: number; /** Format: decimal */ unit_amount_decimal?: string; @@ -27586,26 +33067,26 @@ 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; + subscription_billing_cycle_anchor?: ("now" | "unchanged") | number; /** Timestamp indicating when the subscription should be scheduled to cancel. Will prorate if within the current period and prorations have been enabled using `proration_behavior`. */ - subscription_cancel_at?: Partial & Partial<"">; + subscription_cancel_at?: number | ""; /** Boolean indicating whether this subscription should cancel at the end of the current period. */ subscription_cancel_at_period_end?: boolean; /** This simulates the subscription being canceled or expired immediately. */ subscription_cancel_now?: boolean; /** If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. */ - subscription_default_tax_rates?: Partial & Partial<"">; + subscription_default_tax_rates?: string[] | ""; /** A list of up to 20 subscription items, each with an attached price. */ subscription_items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; clear_usage?: boolean; deleted?: boolean; id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; price?: string; /** recurring_price_data */ price_data?: { @@ -27624,15 +33105,9 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: | "always_invoice" | "create_prorations" @@ -27642,7 +33117,7 @@ export interface operations { /** Date a subscription is intended to start (can be future or past) */ subscription_start_date?: number; /** If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. */ - subscription_trial_end?: Partial<"now"> & Partial; + subscription_trial_end?: "now" | number; /** Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ subscription_trial_from_plan?: boolean; }; @@ -27742,8 +33217,8 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ - account_tax_ids?: Partial & Partial<"">; - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + account_tax_ids?: string[] | ""; + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number; /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ auto_advance?: boolean; @@ -27760,13 +33235,12 @@ export interface operations { */ collection_method?: "charge_automatically" | "send_invoice"; /** @description A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. */ - custom_fields?: Partial< - { - name: string; - value: string; - }[] - > & - Partial<"">; + custom_fields?: + | { + name: string; + value: string; + }[] + | ""; /** @description The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. */ days_until_due?: number; /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -27774,17 +33248,16 @@ export interface operations { /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ default_source?: string; /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ description?: string; /** @description The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** * Format: unix-time * @description The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. @@ -27795,66 +33268,134 @@ export interface operations { /** @description Footer to be displayed on the invoice. */ footer?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ - on_behalf_of?: Partial & Partial<"">; + on_behalf_of?: string | ""; /** * payment_settings * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string; /** payment_method_options */ payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: + | { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } + | ""; + }; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + }; + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; - }; + amount_tax_display?: + | "" + | "exclude_tax" + | "include_inclusive_tax"; + } + | ""; /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string; /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ - transfer_data?: Partial<{ - amount?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount?: number; + destination: string; + } + | ""; }; }; }; @@ -28029,6 +33570,8 @@ export interface operations { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ forgive?: boolean; + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string; /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ off_session?: boolean; /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -28105,88 +33648,6 @@ export interface operations { }; }; }; - /**

Returns a list of issuer fraud records.

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

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

- * - *

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

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

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

*/ GetIssuingAuthorizations: { parameters: { @@ -28196,13 +33657,14 @@ export interface operations { /** Only return authorizations that belong 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; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -28304,7 +33766,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -28338,7 +33800,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -28370,7 +33832,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -28380,13 +33842,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return cardholders that have the given email address. */ email?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -28505,7 +33968,7 @@ export interface operations { }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ name: string; /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ phone_number?: string; @@ -30422,13 +35885,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Only return cards that have the given expiration month. */ @@ -30505,6 +35969,7 @@ export interface operations { currency: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + financial_account?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** @description The card this is meant to be a replacement for (if any). */ @@ -30528,7 +35993,13 @@ export interface operations { postal_code: string; state?: string; }; + /** customs_param */ + customs?: { + eori_number?: string; + }; name: string; + phone_number?: string; + require_signature?: boolean; /** @enum {string} */ service?: "express" | "priority" | "standard"; /** @enum {string} */ @@ -31498,7 +36969,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * encrypted_pin_param * @description The desired new PIN for this card. @@ -32407,13 +37878,14 @@ export interface operations { parameters: { query: { /** Select Issuing disputes that were created during the given date interval. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -32478,67 +37950,75 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number; /** * evidence_param * @description Evidence provided for the dispute. */ evidence?: { - canceled?: Partial<{ - additional_documentation?: Partial & Partial<"">; - canceled_at?: Partial & Partial<"">; - cancellation_policy_provided?: Partial & Partial<"">; - cancellation_reason?: string; - expected_at?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: Partial & Partial<"">; - }> & - Partial<"">; - duplicate?: Partial<{ - additional_documentation?: Partial & Partial<"">; - card_statement?: Partial & Partial<"">; - cash_receipt?: Partial & Partial<"">; - check_image?: Partial & Partial<"">; - explanation?: string; - original_transaction?: string; - }> & - Partial<"">; - fraudulent?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - }> & - Partial<"">; - merchandise_not_as_described?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - received_at?: Partial & Partial<"">; - return_description?: string; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: Partial & Partial<"">; - }> & - Partial<"">; - not_received?: Partial<{ - additional_documentation?: Partial & Partial<"">; - expected_at?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }> & - Partial<"">; - other?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }> & - Partial<"">; + canceled?: + | { + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_policy_provided?: boolean | ""; + cancellation_reason?: string; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + } + | ""; + duplicate?: + | { + additional_documentation?: string | ""; + card_statement?: string | ""; + cash_receipt?: string | ""; + check_image?: string | ""; + explanation?: string; + original_transaction?: string; + } + | ""; + fraudulent?: + | { + additional_documentation?: string | ""; + explanation?: string; + } + | ""; + merchandise_not_as_described?: + | { + additional_documentation?: string | ""; + explanation?: string; + received_at?: number | ""; + return_description?: string; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + } + | ""; + not_received?: + | { + additional_documentation?: string | ""; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + } + | ""; + other?: + | { + additional_documentation?: string | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + } + | ""; /** @enum {string} */ reason?: | "canceled" @@ -32548,21 +38028,29 @@ export interface operations { | "not_received" | "other" | "service_not_as_described"; - service_not_as_described?: Partial<{ - additional_documentation?: Partial & Partial<"">; - canceled_at?: Partial & Partial<"">; - cancellation_reason?: string; - explanation?: string; - received_at?: Partial & Partial<"">; - }> & - Partial<"">; + service_not_as_described?: + | { + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_reason?: string; + explanation?: string; + received_at?: number | ""; + } + | ""; }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string; + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string; + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string; + }; }; }; }; @@ -32622,67 +38110,75 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number; /** * evidence_param * @description Evidence provided for the dispute. */ evidence?: { - canceled?: Partial<{ - additional_documentation?: Partial & Partial<"">; - canceled_at?: Partial & Partial<"">; - cancellation_policy_provided?: Partial & Partial<"">; - cancellation_reason?: string; - expected_at?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: Partial & Partial<"">; - }> & - Partial<"">; - duplicate?: Partial<{ - additional_documentation?: Partial & Partial<"">; - card_statement?: Partial & Partial<"">; - cash_receipt?: Partial & Partial<"">; - check_image?: Partial & Partial<"">; - explanation?: string; - original_transaction?: string; - }> & - Partial<"">; - fraudulent?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - }> & - Partial<"">; - merchandise_not_as_described?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - received_at?: Partial & Partial<"">; - return_description?: string; - /** @enum {string} */ - return_status?: "" | "merchant_rejected" | "successful"; - returned_at?: Partial & Partial<"">; - }> & - Partial<"">; - not_received?: Partial<{ - additional_documentation?: Partial & Partial<"">; - expected_at?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }> & - Partial<"">; - other?: Partial<{ - additional_documentation?: Partial & Partial<"">; - explanation?: string; - product_description?: string; - /** @enum {string} */ - product_type?: "" | "merchandise" | "service"; - }> & - Partial<"">; + canceled?: + | { + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_policy_provided?: boolean | ""; + cancellation_reason?: string; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + } + | ""; + duplicate?: + | { + additional_documentation?: string | ""; + card_statement?: string | ""; + cash_receipt?: string | ""; + check_image?: string | ""; + explanation?: string; + original_transaction?: string; + } + | ""; + fraudulent?: + | { + additional_documentation?: string | ""; + explanation?: string; + } + | ""; + merchandise_not_as_described?: + | { + additional_documentation?: string | ""; + explanation?: string; + received_at?: number | ""; + return_description?: string; + /** @enum {string} */ + return_status?: "" | "merchant_rejected" | "successful"; + returned_at?: number | ""; + } + | ""; + not_received?: + | { + additional_documentation?: string | ""; + expected_at?: number | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + } + | ""; + other?: + | { + additional_documentation?: string | ""; + explanation?: string; + product_description?: string; + /** @enum {string} */ + product_type?: "" | "merchandise" | "service"; + } + | ""; /** @enum {string} */ reason?: | "canceled" @@ -32692,19 +38188,20 @@ export interface operations { | "not_received" | "other" | "service_not_as_described"; - service_not_as_described?: Partial<{ - additional_documentation?: Partial & Partial<"">; - canceled_at?: Partial & Partial<"">; - cancellation_reason?: string; - explanation?: string; - received_at?: Partial & Partial<"">; - }> & - Partial<"">; + service_not_as_described?: + | { + additional_documentation?: string | ""; + canceled_at?: number | ""; + cancellation_reason?: string; + explanation?: string; + received_at?: number | ""; + } + | ""; }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -32736,7 +38233,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -32746,13 +38243,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -32866,13 +38364,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -32974,27 +38473,82 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; }; - /**

Retrieves a Mandate object.

*/ - GetMandatesMandate: { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostLinkAccountSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["financial_connections.session"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string; + customer?: string; + /** @enum {string} */ + type: "account" | "customer"; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[]; + }; + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string; + }; + }; + }; + }; + /**

Retrieves the details of a Financial Connections Session

*/ + GetLinkAccountSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - mandate: string; + session: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["mandate"]; + "application/json": components["schemas"]["financial_connections.session"]; }; }; /** Error response. */ @@ -33010,26 +38564,23 @@ export interface operations { }; }; }; - /**

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

*/ - GetOrderReturns: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetLinkedAccounts: { parameters: { query: { - /** Date this return was created. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string; + 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 order to retrieve returns for. */ - order?: string; + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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; }; @@ -33039,7 +38590,8 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["order_return"][]; + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -33065,22 +38617,166 @@ export interface operations { }; }; }; - /**

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

Retrieves the details of an Financial Connections Account.

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

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

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

Lists all owners for a given Account

*/ + GetLinkedAccountsAccountOwners: { + 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; + /** The ID of the ownership object to fetch owners from. */ + ownership: string; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["financial_connections.account_owner"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostLinkedAccountsAccountRefresh: { + parameters: { + path: { + account: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["financial_connections.account"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description The list of account features that you would like to refresh. */ + features: ("balance" | "ownership")[]; + }; + }; + }; + }; + /**

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. */ @@ -33100,61 +38796,16 @@ export interface operations { GetOrders: { parameters: { query: { - /** Date this order was created. */ - 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. */ 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; - }> & - 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[]; }; }; responses: { @@ -33188,7 +38839,7 @@ export interface operations { }; }; }; - /**

Creates a new order object.

*/ + /**

Creates a new open order object.

*/ PostOrders: { responses: { /** Successful response. */ @@ -33207,44 +38858,453 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string; + /** + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean; + }; + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + } + | ""; + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. + */ + client_permissions?: { + /** @enum {string} */ + billing_details?: "allow" | "disallow"; + /** @enum {string} */ + promotion_codes?: "allow" | "disallow"; + /** @enum {string} */ + shipping_details?: "allow" | "disallow"; + }; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ + /** @description The customer associated with this order. */ customer?: string; - /** @description The email address of the customer placing the order. */ - email?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: + | { + coupon?: string; + discount?: string; + promotion_code?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number; - currency?: string; + /** @description The IP address of the purchaser for this order. */ + ip_address?: string; + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: { description?: string; - parent?: string; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; + price?: string; + /** price_data_with_optional_product */ + price_data?: { + currency?: string; + product?: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + product?: string; + /** product_upsert_data */ + product_data?: { + description?: string; + id: string; + images?: string[] | ""; + metadata?: { [key: string]: string } | ""; + name: string; + package_dimensions?: + | { + height: number; + length: number; + weight: number; + width: number; + } + | ""; + shippable?: boolean; + tax_code?: string; + url?: string | ""; + }; quantity?: number; - /** @enum {string} */ - type?: "discount" | "shipping" | "sku" | "tax"; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** create_params */ + settings: { + application_fee_amount?: number; + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + }; + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none" | "off_session" | "on_session"; + }; + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: + | "da-DK" + | "de-AT" + | "de-CH" + | "de-DE" + | "en-AT" + | "en-AU" + | "en-BE" + | "en-CA" + | "en-CH" + | "en-DE" + | "en-DK" + | "en-ES" + | "en-FI" + | "en-FR" + | "en-GB" + | "en-IE" + | "en-IT" + | "en-NL" + | "en-NO" + | "en-NZ" + | "en-PL" + | "en-PT" + | "en-SE" + | "en-US" + | "es-ES" + | "es-US" + | "fi-FI" + | "fr-BE" + | "fr-CA" + | "fr-CH" + | "fr-FR" + | "it-CH" + | "it-IT" + | "nb-NO" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sv-FI" + | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + oxxo?: { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + }; + /** payment_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + }; + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + preferred_language?: + | "" + | "de" + | "en" + | "es" + | "fr" + | "it" + | "nl" + | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + }; + /** payment_method_options_param */ + wechat_pay?: { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + }; + }; + payment_method_types?: ( + | "acss_debit" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "card" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "link" + | "oxxo" + | "p24" + | "sepa_debit" + | "sofort" + | "wechat_pay" + )[]; + return_url?: string; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + /** transfer_data */ + transfer_data?: { + amount?: number; + destination: string; + }; }; - name: string; - phone?: string; + }; + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string; + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + }; + display_name: string; + /** fixed_amount */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: { + amount: number; + /** @enum {string} */ + tax_behavior?: + | "exclusive" + | "inclusive" + | "unspecified"; + }; + }; + }; + metadata?: { [key: string]: string }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_code?: string; + /** @enum {string} */ + type?: "fixed_amount"; + }; + } + | ""; + /** @description Shipping details for the order. */ + shipping_details?: + | { + /** validated_optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; + /** + * tax_details + * @description Additional tax details about the purchaser to be used for this order. + */ + tax_details?: { + /** @enum {string} */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + tax_ids?: { + /** @enum {string} */ + type: + | "ae_trn" + | "au_abn" + | "au_arn" + | "bg_uic" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "es_cif" + | "eu_oss_vat" + | "eu_vat" + | "gb_vat" + | "ge_vat" + | "hk_br" + | "hu_tin" + | "id_npwp" + | "il_vat" + | "in_gst" + | "is_vat" + | "jp_cn" + | "jp_rn" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "nz_gst" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "th_vat" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "za_vat"; + value: string; + }[]; }; }; }; @@ -33305,33 +39365,479 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string; + /** + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean; + }; + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + email?: string; + name?: string; + phone?: string; + } + | ""; + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. + */ + client_permissions?: { + /** @enum {string} */ + billing_details?: "allow" | "disallow"; + /** @enum {string} */ + promotion_codes?: "allow" | "disallow"; + /** @enum {string} */ + shipping_details?: "allow" | "disallow"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description The customer associated with this order. */ + customer?: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: + | { + coupon?: string; + discount?: string; + promotion_code?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description The IP address of the purchaser for this order. */ + ip_address?: string; + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + description?: string; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; + id?: string; + price?: string; + /** price_data_with_optional_product */ + price_data?: { + currency?: string; + product?: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + product?: string; + /** product_upsert_data */ + product_data?: { + description?: string; + id: string; + images?: string[] | ""; + metadata?: { [key: string]: string } | ""; + name: string; + package_dimensions?: + | { + height: number; + length: number; + weight: number; + width: number; + } + | ""; + shippable?: boolean; + tax_code?: string; + url?: string | ""; + }; + quantity?: number; + tax_rates?: string[] | ""; + }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string; + metadata?: { [key: string]: string } | ""; + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** update_params */ + settings: { + application_fee_amount?: number | ""; + /** update_params */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + card?: + | { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: + | "none" + | "off_session" + | "on_session"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + klarna?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: + | "da-DK" + | "de-AT" + | "de-CH" + | "de-DE" + | "en-AT" + | "en-AU" + | "en-BE" + | "en-CA" + | "en-CH" + | "en-DE" + | "en-DK" + | "en-ES" + | "en-FI" + | "en-FR" + | "en-GB" + | "en-IE" + | "en-IT" + | "en-NL" + | "en-NO" + | "en-NZ" + | "en-PL" + | "en-PT" + | "en-SE" + | "en-US" + | "es-ES" + | "es-US" + | "fi-FI" + | "fr-BE" + | "fr-CA" + | "fr-CH" + | "fr-FR" + | "it-CH" + | "it-IT" + | "nb-NO" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sv-FI" + | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + link?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + oxxo?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + p24?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } + | ""; + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + sofort?: + | { + /** @enum {string} */ + preferred_language?: + | "" + | "de" + | "en" + | "es" + | "fr" + | "it" + | "nl" + | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + wechat_pay?: + | { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + }; + payment_method_types?: ( + | "acss_debit" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "card" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "link" + | "oxxo" + | "p24" + | "sepa_debit" + | "sofort" + | "wechat_pay" + )[]; + return_url?: string | ""; + statement_descriptor?: string; + statement_descriptor_suffix?: string; + transfer_data?: + | { + amount?: number; + destination: string; + } + | ""; + }; + }; + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string; + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: "business_day" | "day" | "hour" | "month" | "week"; + value: number; + }; + }; + display_name: string; + /** fixed_amount */ + fixed_amount?: { + amount: number; + currency: string; + currency_options?: { + [key: string]: { + amount: number; + /** @enum {string} */ + tax_behavior?: + | "exclusive" + | "inclusive" + | "unspecified"; + }; + }; + }; + metadata?: { [key: string]: string }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tax_code?: string; + /** @enum {string} */ + type?: "fixed_amount"; + }; + } + | ""; + /** @description Shipping details for the order. */ + shipping_details?: + | { + /** validated_optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + name: string; + phone?: string; + } + | ""; /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - shipping?: { - carrier: string; - tracking_number: string; + tax_details?: { + /** @enum {string} */ + tax_exempt?: "" | "exempt" | "none" | "reverse"; + tax_ids?: { + /** @enum {string} */ + type: + | "ae_trn" + | "au_abn" + | "au_arn" + | "bg_uic" + | "br_cnpj" + | "br_cpf" + | "ca_bn" + | "ca_gst_hst" + | "ca_pst_bc" + | "ca_pst_mb" + | "ca_pst_sk" + | "ca_qst" + | "ch_vat" + | "cl_tin" + | "es_cif" + | "eu_oss_vat" + | "eu_vat" + | "gb_vat" + | "ge_vat" + | "hk_br" + | "hu_tin" + | "id_npwp" + | "il_vat" + | "in_gst" + | "is_vat" + | "jp_cn" + | "jp_rn" + | "kr_brn" + | "li_uid" + | "mx_rfc" + | "my_frp" + | "my_itn" + | "my_sst" + | "no_vat" + | "nz_gst" + | "ru_inn" + | "ru_kpp" + | "sa_vat" + | "sg_gst" + | "sg_uen" + | "si_tin" + | "th_vat" + | "tw_vat" + | "ua_vat" + | "us_ein" + | "za_vat"; + value: string; + }[]; }; - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: "canceled" | "created" | "fulfilled" | "paid" | "returned"; }; }; }; }; - /**

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

*/ - PostOrdersIdPay: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + PostOrdersIdCancel: { parameters: { path: { id: string; @@ -33354,24 +39860,63 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number; - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string; - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string }; - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string; }; }; }; }; - /**

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

*/ - PostOrdersIdReturns: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Reopens a submitted order.

*/ + PostOrdersIdReopen: { parameters: { path: { id: string; @@ -33381,7 +39926,7 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["order_return"]; + "application/json": components["schemas"]["order"]; }; }; /** Error response. */ @@ -33396,18 +39941,38 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description List of items to return. */ - items?: Partial< - { - amount?: number; - description?: string; - parent?: string; - quantity?: number; - /** @enum {string} */ - type?: "discount" | "shipping" | "sku" | "tax"; - }[] - > & - Partial<"">; + }; + }; + }; + }; + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + PostOrdersIdSubmit: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["order"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number; }; }; }; @@ -33417,13 +39982,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return PaymentIntents for the customer specified by this customer ID. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -33558,7 +40124,7 @@ export interface operations { /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: Partial & Partial<"one_off" | "recurring">; + off_session?: boolean | ("one_off" | "recurring"); /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ on_behalf_of?: string; /** @@ -33581,6 +40147,8 @@ export interface operations { transit_number: string; }; /** param */ + affirm?: { [key: string]: unknown }; + /** param */ afterpay_clearpay?: { [key: string]: unknown }; /** param */ alipay?: { [key: string]: unknown }; @@ -33598,24 +40166,29 @@ export interface operations { bancontact?: { [key: string]: unknown }; /** billing_details_inner_params */ billing_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - email?: Partial & Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; name?: string; phone?: string; }; /** param */ + blik?: { [key: string]: unknown }; + /** param */ boleto?: { tax_id: string; }; /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ eps?: { /** @enum {string} */ bank?: @@ -33629,6 +40202,7 @@ export interface operations { | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" @@ -33706,6 +40280,10 @@ export interface operations { year: number; }; }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; metadata?: { [key: string]: string }; /** param */ oxxo?: { [key: string]: unknown }; @@ -33740,6 +40318,16 @@ export interface operations { | "volkswagen_bank"; }; /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ sepa_debit?: { iban: string; }; @@ -33751,23 +40339,42 @@ export interface operations { /** @enum {string} */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; /** param */ wechat_pay?: { [key: string]: unknown }; }; @@ -33776,143 +40383,400 @@ export interface operations { * @description Payment-method-specific configuration for this PaymentIntent. */ payment_method_options?: { - acss_debit?: Partial<{ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; - interval_description?: string; - /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - afterpay_clearpay?: Partial<{ - reference?: string; - }> & - Partial<"">; - alipay?: Partial<{ [key: string]: unknown }> & Partial<"">; - au_becs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bacs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - boleto?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - card?: Partial<{ - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - interval: "month"; + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; /** @enum {string} */ - type: "fixed_count"; - }> & - Partial<"">; - }; - /** @enum {string} */ - network?: - | "amex" - | "cartes_bancaires" - | "diners" - | "discover" - | "interac" - | "jcb" - | "mastercard" - | "unionpay" - | "unknown" - | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }> & - Partial<"">; - card_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - eps?: Partial<{ [key: string]: unknown }> & Partial<"">; - fpx?: Partial<{ [key: string]: unknown }> & Partial<"">; - giropay?: Partial<{ [key: string]: unknown }> & Partial<"">; - grabpay?: Partial<{ [key: string]: unknown }> & Partial<"">; - ideal?: Partial<{ [key: string]: unknown }> & Partial<"">; - interac_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - klarna?: Partial<{ - /** @enum {string} */ - preferred_locale?: - | "da-DK" - | "de-AT" - | "de-DE" - | "en-AT" - | "en-BE" - | "en-DE" - | "en-DK" - | "en-ES" - | "en-FI" - | "en-FR" - | "en-GB" - | "en-IE" - | "en-IT" - | "en-NL" - | "en-NO" - | "en-SE" - | "en-US" - | "es-ES" - | "es-US" - | "fi-FI" - | "fr-BE" - | "fr-FR" - | "it-IT" - | "nb-NO" - | "nl-BE" - | "nl-NL" - | "sv-FI" - | "sv-SE"; - }> & - Partial<"">; - oxxo?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - p24?: Partial<{ - tos_shown_and_accepted?: boolean; - }> & - Partial<"">; - sepa_debit?: Partial<{ - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown }; - }> & - Partial<"">; - sofort?: Partial<{ - /** @enum {string} */ - preferred_language?: - | "" - | "de" - | "en" - | "es" - | "fr" - | "it" - | "nl" - | "pl"; - }> & - Partial<"">; - wechat_pay?: Partial<{ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - }> & - Partial<"">; + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + affirm?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + blik?: + | { + code?: string; + } + | ""; + boleto?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + card?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: + | { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } + | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + } + | ""; + card_present?: + | { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + eps?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + interac_present?: { [key: string]: unknown } | ""; + klarna?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: + | "da-DK" + | "de-AT" + | "de-CH" + | "de-DE" + | "en-AT" + | "en-AU" + | "en-BE" + | "en-CA" + | "en-CH" + | "en-DE" + | "en-DK" + | "en-ES" + | "en-FI" + | "en-FR" + | "en-GB" + | "en-IE" + | "en-IT" + | "en-NL" + | "en-NO" + | "en-NZ" + | "en-PL" + | "en-PT" + | "en-SE" + | "en-US" + | "es-ES" + | "es-US" + | "fi-FI" + | "fr-BE" + | "fr-CA" + | "fr-CH" + | "fr-FR" + | "it-CH" + | "it-IT" + | "nb-NO" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sv-FI" + | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + konbini?: + | { + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + link?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + oxxo?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + p24?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } + | ""; + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + pix?: + | { + expires_after_seconds?: number; + /** Format: unix-time */ + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + sofort?: + | { + /** @enum {string} */ + preferred_language?: + | "" + | "de" + | "en" + | "es" + | "fr" + | "it" + | "nl" + | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + wechat_pay?: + | { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[]; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string; /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ @@ -33966,6 +40830,57 @@ export interface operations { }; }; }; + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPaymentIntentsSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["payment_intent"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /** *

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

* @@ -34040,7 +40955,12 @@ export interface operations { /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number; /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: Partial & Partial<"">; + application_fee_amount?: number | ""; + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "automatic" | "manual"; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string; /** @@ -34056,7 +40976,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ payment_method?: string; /** @@ -34073,6 +40993,8 @@ export interface operations { transit_number: string; }; /** param */ + affirm?: { [key: string]: unknown }; + /** param */ afterpay_clearpay?: { [key: string]: unknown }; /** param */ alipay?: { [key: string]: unknown }; @@ -34090,24 +41012,29 @@ export interface operations { bancontact?: { [key: string]: unknown }; /** billing_details_inner_params */ billing_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - email?: Partial & Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; name?: string; phone?: string; }; /** param */ + blik?: { [key: string]: unknown }; + /** param */ boleto?: { tax_id: string; }; /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ eps?: { /** @enum {string} */ bank?: @@ -34121,6 +41048,7 @@ export interface operations { | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" @@ -34198,6 +41126,10 @@ export interface operations { year: number; }; }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; metadata?: { [key: string]: string }; /** param */ oxxo?: { [key: string]: unknown }; @@ -34232,6 +41164,16 @@ export interface operations { | "volkswagen_bank"; }; /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ sepa_debit?: { iban: string; }; @@ -34243,23 +41185,42 @@ export interface operations { /** @enum {string} */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; /** param */ wechat_pay?: { [key: string]: unknown }; }; @@ -34268,145 +41229,395 @@ export interface operations { * @description Payment-method-specific configuration for this PaymentIntent. */ payment_method_options?: { - acss_debit?: Partial<{ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; - interval_description?: string; - /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - afterpay_clearpay?: Partial<{ - reference?: string; - }> & - Partial<"">; - alipay?: Partial<{ [key: string]: unknown }> & Partial<"">; - au_becs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bacs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - boleto?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - card?: Partial<{ - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - interval: "month"; + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; /** @enum {string} */ - type: "fixed_count"; - }> & - Partial<"">; - }; - /** @enum {string} */ - network?: - | "amex" - | "cartes_bancaires" - | "diners" - | "discover" - | "interac" - | "jcb" - | "mastercard" - | "unionpay" - | "unknown" - | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }> & - Partial<"">; - card_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - eps?: Partial<{ [key: string]: unknown }> & Partial<"">; - fpx?: Partial<{ [key: string]: unknown }> & Partial<"">; - giropay?: Partial<{ [key: string]: unknown }> & Partial<"">; - grabpay?: Partial<{ [key: string]: unknown }> & Partial<"">; - ideal?: Partial<{ [key: string]: unknown }> & Partial<"">; - interac_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - klarna?: Partial<{ - /** @enum {string} */ - preferred_locale?: - | "da-DK" - | "de-AT" - | "de-DE" - | "en-AT" - | "en-BE" - | "en-DE" - | "en-DK" - | "en-ES" - | "en-FI" - | "en-FR" - | "en-GB" - | "en-IE" - | "en-IT" - | "en-NL" - | "en-NO" - | "en-SE" - | "en-US" - | "es-ES" - | "es-US" - | "fi-FI" - | "fr-BE" - | "fr-FR" - | "it-IT" - | "nb-NO" - | "nl-BE" - | "nl-NL" - | "sv-FI" - | "sv-SE"; - }> & - Partial<"">; - oxxo?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - p24?: Partial<{ - tos_shown_and_accepted?: boolean; - }> & - Partial<"">; - sepa_debit?: Partial<{ - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown }; - }> & - Partial<"">; - sofort?: Partial<{ - /** @enum {string} */ - preferred_language?: - | "" - | "de" - | "en" - | "es" - | "fr" - | "it" - | "nl" - | "pl"; - }> & - Partial<"">; - wechat_pay?: Partial<{ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - }> & - Partial<"">; + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + affirm?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + blik?: + | { + code?: string; + } + | ""; + boleto?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + card?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: + | { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } + | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + } + | ""; + card_present?: + | { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + eps?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + interac_present?: { [key: string]: unknown } | ""; + klarna?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: + | "da-DK" + | "de-AT" + | "de-CH" + | "de-DE" + | "en-AT" + | "en-AU" + | "en-BE" + | "en-CA" + | "en-CH" + | "en-DE" + | "en-DK" + | "en-ES" + | "en-FI" + | "en-FR" + | "en-GB" + | "en-IE" + | "en-IT" + | "en-NL" + | "en-NO" + | "en-NZ" + | "en-PL" + | "en-PT" + | "en-SE" + | "en-US" + | "es-ES" + | "es-US" + | "fi-FI" + | "fr-BE" + | "fr-CA" + | "fr-CH" + | "fr-FR" + | "it-CH" + | "it-IT" + | "nb-NO" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sv-FI" + | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + konbini?: + | { + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + link?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + oxxo?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + p24?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } + | ""; + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + pix?: + | { + expires_after_seconds?: number; + /** Format: unix-time */ + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + sofort?: + | { + /** @enum {string} */ + preferred_language?: + | "" + | "de" + | "en" + | "es" + | "fr" + | "it" + | "nl" + | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + wechat_pay?: + | { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[]; /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: Partial & Partial<"">; + receipt_email?: string | ""; /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -34419,22 +41630,23 @@ export interface operations { */ setup_future_usage?: "" | "off_session" | "on_session"; /** @description Shipping information for this PaymentIntent. */ - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }> & - Partial<"">; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } + | ""; /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ statement_descriptor?: string; /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ @@ -34452,10 +41664,54 @@ export interface operations { }; }; }; + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + PostPaymentIntentsIntentApplyCustomerBalance: { + parameters: { + path: { + intent: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["payment_intent"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; /** *

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

* - *

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

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ PostPaymentIntentsIntentCancel: { parameters: { @@ -34597,6 +41853,11 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: "automatic" | "manual"; /** @description The client secret of the PaymentIntent. */ client_secret?: string; /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ @@ -34606,36 +41867,37 @@ export interface operations { /** @description ID of the mandate to be used for this payment. */ mandate?: string; /** @description This hash contains details about the Mandate to create */ - mandate_data?: Partial<{ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: { [key: string]: unknown }; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; - }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }> & - Partial<{ - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string; - user_agent?: string; + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: { [key: string]: unknown }; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; + }; + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string; + user_agent?: string; + }; + /** @enum {string} */ + type: "online"; }; - /** @enum {string} */ - type: "online"; }; - }>; /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ - off_session?: Partial & Partial<"one_off" | "recurring">; + off_session?: boolean | ("one_off" | "recurring"); /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ payment_method?: string; /** @@ -34652,6 +41914,8 @@ export interface operations { transit_number: string; }; /** param */ + affirm?: { [key: string]: unknown }; + /** param */ afterpay_clearpay?: { [key: string]: unknown }; /** param */ alipay?: { [key: string]: unknown }; @@ -34669,24 +41933,29 @@ export interface operations { bancontact?: { [key: string]: unknown }; /** billing_details_inner_params */ billing_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - email?: Partial & Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; name?: string; phone?: string; }; /** param */ + blik?: { [key: string]: unknown }; + /** param */ boleto?: { tax_id: string; }; /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ eps?: { /** @enum {string} */ bank?: @@ -34700,6 +41969,7 @@ export interface operations { | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" @@ -34777,6 +42047,10 @@ export interface operations { year: number; }; }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; metadata?: { [key: string]: string }; /** param */ oxxo?: { [key: string]: unknown }; @@ -34811,6 +42085,16 @@ export interface operations { | "volkswagen_bank"; }; /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ sepa_debit?: { iban: string; }; @@ -34822,23 +42106,42 @@ export interface operations { /** @enum {string} */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; /** param */ wechat_pay?: { [key: string]: unknown }; }; @@ -34847,145 +42150,402 @@ export interface operations { * @description Payment-method-specific configuration for this PaymentIntent. */ payment_method_options?: { - acss_debit?: Partial<{ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; - interval_description?: string; - /** @enum {string} */ - payment_schedule?: "combined" | "interval" | "sporadic"; - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - afterpay_clearpay?: Partial<{ - reference?: string; - }> & - Partial<"">; - alipay?: Partial<{ [key: string]: unknown }> & Partial<"">; - au_becs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bacs_debit?: Partial<{ [key: string]: unknown }> & Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - boleto?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - card?: Partial<{ - cvc_token?: string; - /** installments_param */ - installments?: { - enabled?: boolean; - plan?: Partial<{ - count: number; + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | ""; + interval_description?: string; + /** @enum {string} */ + payment_schedule?: "combined" | "interval" | "sporadic"; + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; /** @enum {string} */ - interval: "month"; + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; /** @enum {string} */ - type: "fixed_count"; - }> & - Partial<"">; - }; - /** @enum {string} */ - network?: - | "amex" - | "cartes_bancaires" - | "diners" - | "discover" - | "interac" - | "jcb" - | "mastercard" - | "unionpay" - | "unknown" - | "visa"; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - /** @enum {string} */ - setup_future_usage?: "" | "none" | "off_session" | "on_session"; - }> & - Partial<"">; - card_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - eps?: Partial<{ [key: string]: unknown }> & Partial<"">; - fpx?: Partial<{ [key: string]: unknown }> & Partial<"">; - giropay?: Partial<{ [key: string]: unknown }> & Partial<"">; - grabpay?: Partial<{ [key: string]: unknown }> & Partial<"">; - ideal?: Partial<{ [key: string]: unknown }> & Partial<"">; - interac_present?: Partial<{ [key: string]: unknown }> & Partial<"">; - klarna?: Partial<{ - /** @enum {string} */ - preferred_locale?: - | "da-DK" - | "de-AT" - | "de-DE" - | "en-AT" - | "en-BE" - | "en-DE" - | "en-DK" - | "en-ES" - | "en-FI" - | "en-FR" - | "en-GB" - | "en-IE" - | "en-IT" - | "en-NL" - | "en-NO" - | "en-SE" - | "en-US" - | "es-ES" - | "es-US" - | "fi-FI" - | "fr-BE" - | "fr-FR" - | "it-IT" - | "nb-NO" - | "nl-BE" - | "nl-NL" - | "sv-FI" - | "sv-SE"; - }> & - Partial<"">; - oxxo?: Partial<{ - expires_after_days?: number; - }> & - Partial<"">; - p24?: Partial<{ - tos_shown_and_accepted?: boolean; - }> & - Partial<"">; - sepa_debit?: Partial<{ - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown }; - }> & - Partial<"">; - sofort?: Partial<{ - /** @enum {string} */ - preferred_language?: - | "" - | "de" - | "en" - | "es" - | "fr" - | "it" - | "nl" - | "pl"; - }> & - Partial<"">; - wechat_pay?: Partial<{ - app_id?: string; - /** @enum {string} */ - client: "android" | "ios" | "web"; - }> & - Partial<"">; + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + affirm?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + reference?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + blik?: + | { + code?: string; + } + | ""; + boleto?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + card?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + cvc_token?: string; + /** installments_param */ + installments?: { + enabled?: boolean; + plan?: + | { + count: number; + /** @enum {string} */ + interval: "month"; + /** @enum {string} */ + type: "fixed_count"; + } + | ""; + }; + /** mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + statement_descriptor_suffix_kana?: string | ""; + statement_descriptor_suffix_kanji?: string | ""; + } + | ""; + card_present?: + | { + request_extended_authorization?: boolean; + request_incremental_authorization_support?: boolean; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string; + }; + requested_address_types?: ( + | "iban" + | "sepa" + | "sort_code" + | "spei" + | "zengin" + )[]; + /** @enum {string} */ + type: + | "eu_bank_transfer" + | "gb_bank_transfer" + | "jp_bank_transfer" + | "mx_bank_transfer"; + }; + /** @enum {string} */ + funding_type?: "bank_transfer"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + eps?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + interac_present?: { [key: string]: unknown } | ""; + klarna?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + /** @enum {string} */ + preferred_locale?: + | "da-DK" + | "de-AT" + | "de-CH" + | "de-DE" + | "en-AT" + | "en-AU" + | "en-BE" + | "en-CA" + | "en-CH" + | "en-DE" + | "en-DK" + | "en-ES" + | "en-FI" + | "en-FR" + | "en-GB" + | "en-IE" + | "en-IT" + | "en-NL" + | "en-NO" + | "en-NZ" + | "en-PL" + | "en-PT" + | "en-SE" + | "en-US" + | "es-ES" + | "es-US" + | "fi-FI" + | "fr-BE" + | "fr-CA" + | "fr-CH" + | "fr-FR" + | "it-CH" + | "it-IT" + | "nb-NO" + | "nl-BE" + | "nl-NL" + | "pl-PL" + | "pt-PT" + | "sv-FI" + | "sv-SE"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + konbini?: + | { + confirmation_number?: string; + expires_after_days?: number | ""; + expires_at?: number | ""; + product_description?: string; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + link?: + | { + /** @enum {string} */ + capture_method?: "" | "manual"; + persistent_token?: string; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + oxxo?: + | { + expires_after_days?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + p24?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + tos_shown_and_accepted?: boolean; + } + | ""; + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + pix?: + | { + expires_after_seconds?: number; + /** Format: unix-time */ + expires_at?: number; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + } + | ""; + sofort?: + | { + /** @enum {string} */ + preferred_language?: + | "" + | "de" + | "en" + | "es" + | "fr" + | "it" + | "nl" + | "pl"; + /** @enum {string} */ + setup_future_usage?: "" | "none" | "off_session"; + } + | ""; + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + setup_future_usage?: + | "" + | "none" + | "off_session" + | "on_session"; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + wechat_pay?: + | { + app_id?: string; + /** @enum {string} */ + client: "android" | "ios" | "web"; + /** @enum {string} */ + setup_future_usage?: "none"; + } + | ""; }; - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[]; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: Partial & Partial<"">; + receipt_email?: string | ""; /** * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. @@ -35004,30 +42564,104 @@ export interface operations { */ setup_future_usage?: "" | "off_session" | "on_session"; /** @description Shipping information for this PaymentIntent. */ - shipping?: Partial<{ - /** optional_fields_address */ - address: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - carrier?: string; - name: string; - phone?: string; - tracking_number?: string; - }> & - Partial<"">; + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + carrier?: string; + name: string; + phone?: string; + tracking_number?: string; + } + | ""; /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean; }; }; }; }; - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + PostPaymentIntentsIntentIncrementAuthorization: { + parameters: { + path: { + intent: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["payment_intent"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number; + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; + /** @description 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; + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number; + }; + }; + }; + }; + }; + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { parameters: { path: { intent: string; @@ -35054,6 +42688,8 @@ export interface operations { amounts?: number[]; /** @description The client secret of the PaymentIntent. */ client_secret?: string; + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; }; @@ -35160,10 +42796,27 @@ export interface operations { * @enum {string} */ billing_address_collection?: "auto" | "required"; + /** + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: "auto" | "none"; + /** @enum {string} */ + terms_of_service?: "none" | "required"; + }; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string; + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: "always" | "if_required"; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { + line_items: { /** adjustable_quantity_params */ adjustable_quantity?: { enabled: boolean; @@ -35177,8 +42830,53 @@ export interface operations { metadata?: { [key: string]: string }; /** @description The account on behalf of which to charge. */ on_behalf_of?: string; - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: "card"[]; + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + /** @enum {string} */ + capture_method?: "automatic" | "manual"; + /** @enum {string} */ + setup_future_usage?: "off_session" | "on_session"; + }; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ( + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[]; /** * phone_number_collection_params * @description Controls phone number collection settings during checkout. @@ -35433,13 +43131,30 @@ export interface operations { | "ZZ" )[]; }; + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: { + shipping_rate?: string; + }[]; + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: "auto" | "book" | "donate" | "pay"; /** * subscription_data_params * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ subscription_data?: { + description?: string; trial_period_days?: number; }; + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean; + }; /** * transfer_data_params * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. @@ -35539,6 +43254,11 @@ export interface operations { * @enum {string} */ billing_address_collection?: "auto" | "required"; + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: "always" | "if_required"; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ @@ -35554,251 +43274,289 @@ export interface operations { }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string }; - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: Partial<"card"[]> & Partial<"">; + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: "always" | "if_required"; + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "card" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: Partial<{ - 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" - )[]; - }> & - Partial<"">; + 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" + )[]; + } + | ""; }; }; }; @@ -35852,11 +43610,11 @@ export interface operations { }; }; }; - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ GetPaymentMethods: { parameters: { query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ + /** 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; @@ -35869,23 +43627,32 @@ export interface operations { /** A required filter on the list, based on the object `type` field. */ type: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" | "card" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; }; }; @@ -35952,6 +43719,11 @@ export interface operations { institution_number: string; transit_number: string; }; + /** + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + */ + affirm?: { [key: string]: unknown }; /** * param * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. @@ -35988,19 +43760,25 @@ export interface operations { * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. */ billing_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - email?: Partial & Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; name?: string; phone?: string; }; + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: { [key: string]: unknown }; /** * param * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. @@ -36009,17 +43787,23 @@ export interface operations { tax_id: string; }; /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: Partial<{ - cvc?: string; - exp_month: number; - exp_year: number; - number: string; - }> & - Partial<{ - token: string; - }>; + card?: + | { + cvc?: string; + exp_month: number; + exp_year: number; + number: string; + } + | { + token: string; + }; /** @description The `Customer` to whom the original PaymentMethod is attached. */ customer?: string; + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: { [key: string]: unknown }; /** * param * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -36037,6 +43821,7 @@ export interface operations { | "brull_kallmus_bank_ag" | "btv_vier_lander_bank" | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" | "dolomitenbank" | "easybank_ag" | "erste_bank_und_sparkassen" @@ -36134,6 +43919,16 @@ export interface operations { year: number; }; }; + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: { [key: string]: unknown }; + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** @@ -36176,6 +43971,28 @@ export interface operations { }; /** @description The PaymentMethod to share. */ payment_method?: string; + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: { [key: string]: unknown }; + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: { [key: string]: unknown }; + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: { [key: string]: unknown }; + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string; + }; /** * param * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -36197,24 +44014,46 @@ export interface operations { */ type?: | "acss_debit" + | "affirm" | "afterpay_clearpay" | "alipay" | "au_becs_debit" | "bacs_debit" | "bancontact" + | "blik" | "boleto" | "card" + | "customer_balance" | "eps" | "fpx" | "giropay" | "grabpay" | "ideal" | "klarna" + | "konbini" + | "link" | "oxxo" | "p24" + | "paynow" + | "pix" + | "promptpay" | "sepa_debit" | "sofort" + | "us_bank_account" | "wechat_pay"; + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; /** * param * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. @@ -36224,7 +44063,7 @@ export interface operations { }; }; }; - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ GetPaymentMethodsPaymentMethod: { parameters: { query: { @@ -36284,16 +44123,17 @@ export interface operations { * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. */ billing_details?: { - address?: Partial<{ - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }> & - Partial<"">; - email?: Partial & Partial<"">; + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; name?: string; phone?: string; }; @@ -36307,8 +44147,21 @@ export interface operations { }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; + /** + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + }; }; }; }; @@ -36318,9 +44171,11 @@ export interface operations { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -36357,7 +44212,7 @@ export interface operations { }; }; }; - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ PostPaymentMethodsPaymentMethodDetach: { parameters: { path: { @@ -36391,20 +44246,22 @@ export interface operations { GetPayouts: { parameters: { query: { - arrival_date?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + arrival_date?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** The ID of an external account - only return payouts sent to this external account. */ destination?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -36561,7 +44418,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -36639,13 +44496,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -36716,7 +44574,7 @@ export interface operations { * @enum {string} */ aggregate_usage?: "last_during_period" | "last_ever" | "max" | "sum"; - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ amount?: number; /** * Format: decimal @@ -36742,19 +44600,20 @@ export interface operations { /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ interval_count?: number; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description 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; - tax_code?: string; - unit_label?: string; - }> & - Partial; + product?: + | { + active?: boolean; + id?: string; + metadata?: { [key: string]: string }; + name: string; + statement_descriptor?: string; + tax_code?: string; + unit_label?: string; + } + | string; /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ tiers?: { flat_amount?: number; @@ -36763,7 +44622,7 @@ export interface operations { unit_amount?: number; /** Format: decimal */ unit_amount_decimal?: string; - up_to: Partial<"inf"> & Partial; + up_to: "inf" | number; }[]; /** * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. @@ -36850,7 +44709,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description A brief description of the plan, hidden from customers. */ nickname?: string; /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ @@ -36895,13 +44754,14 @@ export interface operations { /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ active?: boolean; /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return prices for the given currency. */ currency?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -36987,6 +44847,42 @@ export interface operations { billing_scheme?: "per_unit" | "tiered"; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: { + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + }[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + }; + /** + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ @@ -37040,7 +44936,7 @@ export interface operations { unit_amount?: number; /** Format: decimal */ unit_amount_decimal?: string; - up_to: Partial<"inf"> & Partial; + up_to: "inf" | number; }[]; /** * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. @@ -37058,17 +44954,68 @@ export interface operations { /** @enum {string} */ round: "down" | "up"; }; - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ unit_amount?: number; /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string; }; }; }; }; + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPricesSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["price"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /**

Retrieves the price with the given ID.

*/ GetPricesPrice: { parameters: { @@ -37126,12 +45073,40 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Whether the price can be used for new purchases. Defaults to `true`. */ active?: boolean; + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: + | { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: { + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + }[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + } + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ lookup_key?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description A brief description of the price, hidden from customers. */ nickname?: string; /** @@ -37152,18 +45127,19 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ expand?: string[]; - /** Only return products with the given IDs. */ + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ 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; @@ -37228,6 +45204,49 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Whether the product is currently available for purchase. Defaults to `true`. */ active?: boolean; + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string; + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean; + maximum?: number; + minimum?: number; + preset?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + tiers?: { + flat_amount?: number; + /** Format: decimal */ + flat_amount_decimal?: string; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + up_to: "inf" | number; + }[]; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + }; + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string; /** @description Specifies which fields in the response should be expanded. */ @@ -37238,7 +45257,7 @@ export interface operations { images?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string; /** * package_dimensions_specs @@ -37259,7 +45278,7 @@ export interface operations { * It must contain at least one letter. */ statement_descriptor?: string; - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: string; /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string; @@ -37269,6 +45288,57 @@ export interface operations { }; }; }; + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetProductsSearch: { + parameters: { + 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; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["product"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /**

Retrieves the details of an existing 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: { @@ -37326,24 +45396,27 @@ export interface operations { "application/x-www-form-urlencoded": { /** @description Whether the product is available for purchase. */ active?: boolean; + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string; /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: Partial & Partial<"">; + images?: string[] | ""; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + metadata?: { [key: string]: string } | ""; + /** @description The product's name, meant to be displayable to the customer. */ name?: string; /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: Partial<{ - height: number; - length: number; - weight: number; - width: number; - }> & - Partial<"">; + package_dimensions?: + | { + height: number; + length: number; + weight: number; + width: number; + } + | ""; /** @description Whether this product is shipped (i.e., physical goods). */ shippable?: boolean; /** @@ -37353,12 +45426,12 @@ export interface operations { * It must contain at least one letter. May only be set if `type=service`. */ statement_descriptor?: string; - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: Partial & Partial<"">; + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | ""; /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ unit_label?: string; /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string; + url?: string | ""; }; }; }; @@ -37401,13 +45474,14 @@ export interface operations { /** Only return promotion codes for this coupon. */ coupon?: string; /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return promotion codes that are restricted to this customer. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -37494,6 +45568,11 @@ export interface operations { * @description Settings that restrict the redemption of the promotion code. */ restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number; + }; + }; first_time_transaction?: boolean; minimum_amount?: number; minimum_amount_currency?: string; @@ -37562,7 +45641,18 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number; + }; + }; + }; }; }; }; @@ -37583,6 +45673,8 @@ export interface operations { starting_after?: string; /** The status of the quote. */ status?: "accepted" | "canceled" | "draft" | "open"; + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock?: string; }; }; responses: { @@ -37636,9 +45728,9 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: Partial & Partial<"">; + application_fee_amount?: number | ""; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: Partial & Partial<"">; + application_fee_percent?: number | ""; /** * automatic_tax_param * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. @@ -37654,17 +45746,16 @@ export interface operations { /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ customer?: string; /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ description?: string; /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @@ -37711,29 +45802,31 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** @description The account on behalf of which to charge. */ - on_behalf_of?: Partial & Partial<"">; + on_behalf_of?: string | ""; /** * subscription_data_create_params * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. */ subscription_data?: { - effective_date?: Partial<"current_period_end"> & - Partial & - Partial<"">; - trial_period_days?: Partial & Partial<"">; + description?: string; + effective_date?: "current_period_end" | number | ""; + trial_period_days?: number | ""; }; + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string; /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: Partial<{ - amount?: number; - amount_percent?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount?: number; + amount_percent?: number; + destination: string; + } + | ""; }; }; }; @@ -37794,9 +45887,9 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: Partial & Partial<"">; + application_fee_amount?: number | ""; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: Partial & Partial<"">; + application_fee_percent?: number | ""; /** * automatic_tax_param * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. @@ -37812,17 +45905,16 @@ export interface operations { /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ customer?: string; /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; /** @description A description that will be displayed on the quote PDF. */ description?: string; /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: Partial< - { - coupon?: string; - discount?: string; - }[] - > & - Partial<"">; + discounts?: + | { + coupon?: string; + discount?: string; + }[] + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @@ -37862,29 +45954,29 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; /** @description The account on behalf of which to charge. */ - on_behalf_of?: Partial & Partial<"">; + on_behalf_of?: string | ""; /** * subscription_data_update_params * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. */ subscription_data?: { - effective_date?: Partial<"current_period_end"> & - Partial & - Partial<"">; - trial_period_days?: Partial & Partial<"">; + description?: string; + effective_date?: "current_period_end" | number | ""; + trial_period_days?: number | ""; }; /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: Partial<{ - amount?: number; - amount_percent?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount?: number; + amount_percent?: number; + destination: string; + } + | ""; }; }; }; @@ -38201,13 +46293,14 @@ export interface operations { GetRadarValueListItems: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -38348,13 +46441,14 @@ 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -38534,28 +46628,30 @@ export interface operations { }; }; }; - /**

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

*/ - GetRecipients: { + /**

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: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + /** Only return refunds for the charge specified by this charge ID. */ + charge?: string; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number; + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent?: string; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; - type?: "corporation" | "individual"; - /** Only return recipients that are verified or unverified. */ - verified?: boolean; }; }; responses: { @@ -38563,7 +46659,7 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["recipient"][]; + data: components["schemas"]["refund"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -38589,16 +46685,13 @@ export interface operations { }; }; }; - /** - *

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

Create a refund.

*/ + PostRefunds: { responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["recipient"]; + "application/json": components["schemas"]["refund"]; }; }; /** Error response. */ @@ -38611,45 +46704,49 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string; - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string; - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string; - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string; + /** @description A positive integer representing how much to refund. */ + amount?: number; + charge?: string; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; + /** @description Customer whose customer balance to refund from. */ + customer?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string; - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string; - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string; + metadata?: { [key: string]: string } | ""; + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: "customer_balance"; + payment_intent?: string; + /** @enum {string} */ + reason?: "duplicate" | "fraudulent" | "requested_by_customer"; + refund_application_fee?: boolean; + reverse_transfer?: boolean; }; }; }; }; - /**

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

*/ - GetRecipientsId: { + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - id: string; + refund: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": components["schemas"]["refund"]; }; }; /** Error response. */ @@ -38666,23 +46763,21 @@ export interface operations { }; }; /** - *

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

+ *

Updates the specified refund 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.

+ *

This request only accepts metadata as an argument.

*/ - PostRecipientsId: { + PostRefundsRefund: { parameters: { path: { - id: string; + refund: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["recipient"]; + "application/json": components["schemas"]["refund"]; }; }; /** Error response. */ @@ -38695,40 +46790,30 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string; - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string; - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string; - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string; - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string; - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string; + metadata?: { [key: string]: string } | ""; }; }; }; }; - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + PostRefundsRefundCancel: { parameters: { path: { - id: string; + refund: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["deleted_recipient"]; + "application/json": components["schemas"]["refund"]; }; }; /** Error response. */ @@ -38740,31 +46825,31 @@ export interface operations { }; requestBody: { content: { - "application/x-www-form-urlencoded": { [key: string]: unknown }; + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; }; }; }; - /**

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

Returns a list of Report Runs, with the most recent appearing first.

*/ + GetReportingReportRuns: { 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ expand?: string[]; /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number; - /** Only return refunds for the PaymentIntent specified by this ID. */ - payment_intent?: string; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string; }; @@ -38774,160 +46859,7 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["refund"][]; - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean; - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: "list"; - /** @description The URL where this list can be accessed. */ - url: string; - }; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; - }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { [key: string]: unknown }; - }; - }; - }; - /**

Create a refund.

*/ - PostRefunds: { - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": components["schemas"]["refund"]; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; - }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - amount?: number; - charge?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - payment_intent?: string; - /** @enum {string} */ - reason?: "duplicate" | "fraudulent" | "requested_by_customer"; - refund_application_fee?: boolean; - reverse_transfer?: boolean; - }; - }; - }; - }; - /**

Retrieves the details of an existing refund.

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

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

- * - *

This request only accepts metadata as an argument.

- */ - PostRefundsRefund: { - parameters: { - path: { - refund: string; - }; - }; - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": components["schemas"]["refund"]; - }; - }; - /** Error response. */ - default: { - content: { - "application/json": components["schemas"]["error"]; - }; - }; - }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - }; - }; - }; - }; - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { - 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; - }; - }; - responses: { - /** Successful response. */ - 200: { - content: { - "application/json": { - data: components["schemas"]["reporting.report_run"][]; + data: components["schemas"]["reporting.report_run"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -39731,13 +47663,14 @@ export interface operations { GetReviews: { parameters: { query: { - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -39849,13 +47782,14 @@ export interface operations { * 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; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -39906,14 +47840,21 @@ export interface operations { GetSetupIntents: { parameters: { query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: 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; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return SetupIntents for the customer specified by this customer ID. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -39983,6 +47924,12 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ confirm?: boolean; /** @@ -39995,6 +47942,12 @@ export interface operations { description?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[]; /** * secret_key_param * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). @@ -40021,6 +47974,250 @@ export interface operations { on_behalf_of?: string; /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: { [key: string]: unknown }; + /** param */ + afterpay_clearpay?: { [key: string]: unknown }; + /** param */ + alipay?: { [key: string]: unknown }; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: { [key: string]: unknown }; + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: { [key: string]: unknown }; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | "arzte_und_apotheker_bank" + | "austrian_anadi_bank_ag" + | "bank_austria" + | "bankhaus_carl_spangler" + | "bankhaus_schelhammer_und_schattera_ag" + | "bawag_psk_ag" + | "bks_bank_ag" + | "brull_kallmus_bank_ag" + | "btv_vier_lander_bank" + | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" + | "dolomitenbank" + | "easybank_ag" + | "erste_bank_und_sparkassen" + | "hypo_alpeadriabank_international_ag" + | "hypo_bank_burgenland_aktiengesellschaft" + | "hypo_noe_lb_fur_niederosterreich_u_wien" + | "hypo_oberosterreich_salzburg_steiermark" + | "hypo_tirol_bank_ag" + | "hypo_vorarlberg_bank_ag" + | "marchfelder_bank" + | "oberbank_ag" + | "raiffeisen_bankengruppe_osterreich" + | "schoellerbank_ag" + | "sparda_bank_wien" + | "volksbank_gruppe" + | "volkskreditbank_ag" + | "vr_bank_braunau"; + }; + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob"; + }; + /** param */ + giropay?: { [key: string]: unknown }; + /** param */ + grabpay?: { [key: string]: unknown }; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot"; + }; + /** param */ + interac_present?: { [key: string]: unknown }; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; + metadata?: { [key: string]: string }; + /** param */ + oxxo?: { [key: string]: unknown }; + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | "alior_bank" + | "bank_millennium" + | "bank_nowy_bfg_sa" + | "bank_pekao_sa" + | "banki_spbdzielcze" + | "blik" + | "bnp_paribas" + | "boz" + | "citi_handlowy" + | "credit_agricole" + | "envelobank" + | "etransfer_pocztowy24" + | "getin_bank" + | "ideabank" + | "ing" + | "inteligo" + | "mbank_mtransfer" + | "nest_przelew" + | "noble_pay" + | "pbac_z_ipko" + | "plus_bank" + | "santander_przelew24" + | "tmobile_usbugi_bankowe" + | "toyota_bank" + | "volkswagen_bank"; + }; + /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; + }; + /** @enum {string} */ + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: { [key: string]: unknown }; + }; /** * payment_method_options_param * @description Payment-method-specific configuration for this SetupIntent. @@ -40032,7 +48229,7 @@ export interface operations { currency?: "cad" | "usd"; /** setup_intent_payment_method_options_mandate_options_param */ mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; + custom_mandate_url?: string | ""; default_for?: ("invoice" | "subscription")[]; interval_description?: string; /** @enum {string} */ @@ -40043,16 +48240,72 @@ export interface operations { /** @enum {string} */ verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; /** setup_intent_param */ card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; /** @enum {string} */ request_three_d_secure?: "any" | "automatic"; }; /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown }; }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; }; /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ payment_method_types?: string[]; @@ -40138,6 +48391,12 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean; /** * @description ID of the Customer this SetupIntent belongs to, if one exists. * @@ -40148,10 +48407,260 @@ export interface operations { description?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ("inbound" | "outbound")[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: { [key: string]: unknown }; + /** param */ + afterpay_clearpay?: { [key: string]: unknown }; + /** param */ + alipay?: { [key: string]: unknown }; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: { [key: string]: unknown }; + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: { [key: string]: unknown }; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | "arzte_und_apotheker_bank" + | "austrian_anadi_bank_ag" + | "bank_austria" + | "bankhaus_carl_spangler" + | "bankhaus_schelhammer_und_schattera_ag" + | "bawag_psk_ag" + | "bks_bank_ag" + | "brull_kallmus_bank_ag" + | "btv_vier_lander_bank" + | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" + | "dolomitenbank" + | "easybank_ag" + | "erste_bank_und_sparkassen" + | "hypo_alpeadriabank_international_ag" + | "hypo_bank_burgenland_aktiengesellschaft" + | "hypo_noe_lb_fur_niederosterreich_u_wien" + | "hypo_oberosterreich_salzburg_steiermark" + | "hypo_tirol_bank_ag" + | "hypo_vorarlberg_bank_ag" + | "marchfelder_bank" + | "oberbank_ag" + | "raiffeisen_bankengruppe_osterreich" + | "schoellerbank_ag" + | "sparda_bank_wien" + | "volksbank_gruppe" + | "volkskreditbank_ag" + | "vr_bank_braunau"; + }; + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob"; + }; + /** param */ + giropay?: { [key: string]: unknown }; + /** param */ + grabpay?: { [key: string]: unknown }; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot"; + }; + /** param */ + interac_present?: { [key: string]: unknown }; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; + metadata?: { [key: string]: string }; + /** param */ + oxxo?: { [key: string]: unknown }; + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | "alior_bank" + | "bank_millennium" + | "bank_nowy_bfg_sa" + | "bank_pekao_sa" + | "banki_spbdzielcze" + | "blik" + | "bnp_paribas" + | "boz" + | "citi_handlowy" + | "credit_agricole" + | "envelobank" + | "etransfer_pocztowy24" + | "getin_bank" + | "ideabank" + | "ing" + | "inteligo" + | "mbank_mtransfer" + | "nest_przelew" + | "noble_pay" + | "pbac_z_ipko" + | "plus_bank" + | "santander_przelew24" + | "tmobile_usbugi_bankowe" + | "toyota_bank" + | "volkswagen_bank"; + }; + /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; + }; + /** @enum {string} */ + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: { [key: string]: unknown }; + }; /** * payment_method_options_param * @description Payment-method-specific configuration for this SetupIntent. @@ -40163,7 +48672,7 @@ export interface operations { currency?: "cad" | "usd"; /** setup_intent_payment_method_options_mandate_options_param */ mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; + custom_mandate_url?: string | ""; default_for?: ("invoice" | "subscription")[]; interval_description?: string; /** @enum {string} */ @@ -40174,16 +48683,72 @@ export interface operations { /** @enum {string} */ verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; /** setup_intent_param */ card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; /** @enum {string} */ request_three_d_secure?: "any" | "automatic"; }; /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown }; }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; }; /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ payment_method_types?: string[]; @@ -40276,36 +48841,281 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description This hash contains details about the Mandate to create */ - mandate_data?: Partial<{ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number; - /** offline_param */ - offline?: { [key: string]: unknown }; - /** online_param */ - online?: { - ip_address: string; - user_agent: string; - }; - /** @enum {string} */ - type: "offline" | "online"; - }; - }> & - Partial<{ - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string; - user_agent?: string; + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number; + /** offline_param */ + offline?: { [key: string]: unknown }; + /** online_param */ + online?: { + ip_address: string; + user_agent: string; + }; + /** @enum {string} */ + type: "offline" | "online"; + }; + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string; + user_agent?: string; + }; + /** @enum {string} */ + type: "online"; }; - /** @enum {string} */ - type: "online"; }; - }>; /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ payment_method?: string; + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string; + institution_number: string; + transit_number: string; + }; + /** param */ + affirm?: { [key: string]: unknown }; + /** param */ + afterpay_clearpay?: { [key: string]: unknown }; + /** param */ + alipay?: { [key: string]: unknown }; + /** param */ + au_becs_debit?: { + account_number: string; + bsb_number: string; + }; + /** param */ + bacs_debit?: { + account_number?: string; + sort_code?: string; + }; + /** param */ + bancontact?: { [key: string]: unknown }; + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + /** param */ + blik?: { [key: string]: unknown }; + /** param */ + boleto?: { + tax_id: string; + }; + /** param */ + customer_balance?: { [key: string]: unknown }; + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | "arzte_und_apotheker_bank" + | "austrian_anadi_bank_ag" + | "bank_austria" + | "bankhaus_carl_spangler" + | "bankhaus_schelhammer_und_schattera_ag" + | "bawag_psk_ag" + | "bks_bank_ag" + | "brull_kallmus_bank_ag" + | "btv_vier_lander_bank" + | "capital_bank_grawe_gruppe_ag" + | "deutsche_bank_ag" + | "dolomitenbank" + | "easybank_ag" + | "erste_bank_und_sparkassen" + | "hypo_alpeadriabank_international_ag" + | "hypo_bank_burgenland_aktiengesellschaft" + | "hypo_noe_lb_fur_niederosterreich_u_wien" + | "hypo_oberosterreich_salzburg_steiermark" + | "hypo_tirol_bank_ag" + | "hypo_vorarlberg_bank_ag" + | "marchfelder_bank" + | "oberbank_ag" + | "raiffeisen_bankengruppe_osterreich" + | "schoellerbank_ag" + | "sparda_bank_wien" + | "volksbank_gruppe" + | "volkskreditbank_ag" + | "vr_bank_braunau"; + }; + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | "affin_bank" + | "agrobank" + | "alliance_bank" + | "ambank" + | "bank_islam" + | "bank_muamalat" + | "bank_rakyat" + | "bsn" + | "cimb" + | "deutsche_bank" + | "hong_leong_bank" + | "hsbc" + | "kfh" + | "maybank2e" + | "maybank2u" + | "ocbc" + | "pb_enterprise" + | "public_bank" + | "rhb" + | "standard_chartered" + | "uob"; + }; + /** param */ + giropay?: { [key: string]: unknown }; + /** param */ + grabpay?: { [key: string]: unknown }; + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | "abn_amro" + | "asn_bank" + | "bunq" + | "handelsbanken" + | "ing" + | "knab" + | "moneyou" + | "rabobank" + | "regiobank" + | "revolut" + | "sns_bank" + | "triodos_bank" + | "van_lanschot"; + }; + /** param */ + interac_present?: { [key: string]: unknown }; + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number; + month: number; + year: number; + }; + }; + /** param */ + konbini?: { [key: string]: unknown }; + /** param */ + link?: { [key: string]: unknown }; + metadata?: { [key: string]: string }; + /** param */ + oxxo?: { [key: string]: unknown }; + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | "alior_bank" + | "bank_millennium" + | "bank_nowy_bfg_sa" + | "bank_pekao_sa" + | "banki_spbdzielcze" + | "blik" + | "bnp_paribas" + | "boz" + | "citi_handlowy" + | "credit_agricole" + | "envelobank" + | "etransfer_pocztowy24" + | "getin_bank" + | "ideabank" + | "ing" + | "inteligo" + | "mbank_mtransfer" + | "nest_przelew" + | "noble_pay" + | "pbac_z_ipko" + | "plus_bank" + | "santander_przelew24" + | "tmobile_usbugi_bankowe" + | "toyota_bank" + | "volkswagen_bank"; + }; + /** param */ + paynow?: { [key: string]: unknown }; + /** param */ + pix?: { [key: string]: unknown }; + /** param */ + promptpay?: { [key: string]: unknown }; + /** radar_options */ + radar_options?: { + session?: string; + }; + /** param */ + sepa_debit?: { + iban: string; + }; + /** param */ + sofort?: { + /** @enum {string} */ + country: "AT" | "BE" | "DE" | "ES" | "IT" | "NL"; + }; + /** @enum {string} */ + type: + | "acss_debit" + | "affirm" + | "afterpay_clearpay" + | "alipay" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "blik" + | "boleto" + | "customer_balance" + | "eps" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "klarna" + | "konbini" + | "link" + | "oxxo" + | "p24" + | "paynow" + | "pix" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + /** param */ + wechat_pay?: { [key: string]: unknown }; + }; /** * payment_method_options_param * @description Payment-method-specific configuration for this SetupIntent. @@ -40317,7 +49127,7 @@ export interface operations { currency?: "cad" | "usd"; /** setup_intent_payment_method_options_mandate_options_param */ mandate_options?: { - custom_mandate_url?: Partial & Partial<"">; + custom_mandate_url?: string | ""; default_for?: ("invoice" | "subscription")[]; interval_description?: string; /** @enum {string} */ @@ -40328,16 +49138,72 @@ export interface operations { /** @enum {string} */ verification_method?: "automatic" | "instant" | "microdeposits"; }; + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string; + }; /** setup_intent_param */ card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number; + /** @enum {string} */ + amount_type: "fixed" | "maximum"; + currency: string; + description?: string; + /** Format: unix-time */ + end_date?: number; + /** @enum {string} */ + interval: "day" | "month" | "sporadic" | "week" | "year"; + interval_count?: number; + reference: string; + /** Format: unix-time */ + start_date: number; + supported_types?: "india"[]; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; /** @enum {string} */ request_three_d_secure?: "any" | "automatic"; }; /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string; + }; + /** setup_intent_payment_method_options_param */ sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown }; }; + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + return_url?: string; + }; + /** networks_options_param */ + networks?: { + requested?: ("ach" | "us_domestic_wire")[]; + }; + /** @enum {string} */ + verification_method?: "automatic" | "instant" | "microdeposits"; + }; }; /** * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. @@ -40377,6 +49243,8 @@ export interface operations { amounts?: number[]; /** @description The client secret of the SetupIntent. */ client_secret?: string; + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; }; @@ -40390,13 +49258,14 @@ export interface operations { /** Only return shipping rates that are active or inactive. */ active?: boolean; /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return shipping rates for the given currency. */ currency?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -40488,6 +49357,13 @@ export interface operations { fixed_amount?: { amount: number; currency: string; + currency_options?: { + [key: string]: { + amount: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }; + }; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; @@ -40496,7 +49372,7 @@ export interface operations { * @enum {string} */ tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: string; /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -40566,14 +49442,32 @@ export interface operations { active?: boolean; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - }; - }; - }; - }; - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: { + amount?: number; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }; + }; + }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + }; + }; + }; + }; + /**

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. */ @@ -40780,8 +49674,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial & - Partial; + "application/json": + | components["schemas"]["sku"] + | components["schemas"]["deleted_sku"]; }; }; /** Error response. */ @@ -40847,15 +49742,16 @@ export interface operations { value?: "" | "in_stock" | "limited" | "out_of_stock"; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: Partial<{ - height: number; - length: number; - weight: number; - width: number; - }> & - Partial<"">; + package_dimensions?: + | { + height: number; + length: number; + weight: number; + width: number; + } + | ""; /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ price?: number; /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ @@ -40950,7 +49846,7 @@ export interface operations { type?: "offline" | "online"; user_agent?: string; }; - amount?: Partial & Partial<"">; + amount?: number | ""; currency?: string; /** @enum {string} */ interval?: "one_time" | "scheduled" | "variable"; @@ -41133,7 +50029,7 @@ export interface operations { type?: "offline" | "online"; user_agent?: string; }; - amount?: Partial & Partial<"">; + amount?: number | ""; currency?: string; /** @enum {string} */ interval?: "one_time" | "scheduled" | "variable"; @@ -41146,7 +50042,7 @@ export interface operations { | "stripe_email"; }; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** * owner * @description Information about the owner of the payment instrument that may be used or required by particular source types. @@ -41411,10 +50307,11 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -41456,11 +50353,7 @@ export interface operations { unit_amount_decimal?: string; }; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -41474,7 +50367,7 @@ export interface operations { /** @description The identifier of the subscription to modify. */ subscription: string; /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }; }; }; @@ -41535,14 +50428,15 @@ export interface operations { content: { "application/x-www-form-urlencoded": { /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -41582,11 +50476,7 @@ export interface operations { unit_amount_decimal?: string; }; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -41598,7 +50488,7 @@ export interface operations { /** @description The quantity you'd like to apply to the subscription item you're creating. */ quantity?: number; /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }; }; }; @@ -41630,11 +50520,7 @@ export interface operations { /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ clear_usage?: boolean; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -41741,7 +50627,7 @@ export interface operations { /** @description The usage quantity for the specified timestamp. */ quantity: number; /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: Partial<"now"> & Partial; + timestamp?: "now" | number; }; }; }; @@ -41751,29 +50637,32 @@ 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; - }> & - Partial; + canceled_at?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + completed_at?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return subscription schedules that were created during the given date interval. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return subscription schedules for the given customer. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -41783,13 +50672,14 @@ 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; - }> & - Partial; + released_at?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** Only return subscription schedules that have not started yet. */ scheduled?: boolean; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ @@ -41860,23 +50750,26 @@ export interface operations { }; /** @enum {string} */ billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; default_payment_method?: string; + description?: string; /** subscription_schedules_param */ invoice_settings?: { days_until_due?: number; }; - transfer_data?: Partial<{ - amount_percent?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount_percent?: number; + destination: string; + } + | ""; }; /** * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. @@ -41888,7 +50781,7 @@ export interface operations { /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ from_subscription?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ phases?: { add_invoice_items?: { @@ -41904,7 +50797,7 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; application_fee_percent?: number; /** automatic_tax_config */ @@ -41913,16 +50806,19 @@ export interface operations { }; /** @enum {string} */ billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; coupon?: string; + currency?: string; default_payment_method?: string; - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; + description?: string; /** Format: unix-time */ end_date?: number; /** subscription_schedules_param */ @@ -41930,10 +50826,11 @@ export interface operations { days_until_due?: number; }; items: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; price?: string; /** recurring_price_data */ price_data?: { @@ -41952,9 +50849,10 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; iterations?: number; + metadata?: { [key: string]: string }; /** @enum {string} */ proration_behavior?: | "always_invoice" @@ -41970,7 +50868,7 @@ export interface operations { trial_end?: number; }[]; /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: Partial & Partial<"now">; + start_date?: number | "now"; }; }; }; @@ -42042,23 +50940,26 @@ export interface operations { }; /** @enum {string} */ billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; default_payment_method?: string; + description?: string; /** subscription_schedules_param */ invoice_settings?: { days_until_due?: number; }; - transfer_data?: Partial<{ - amount_percent?: number; - destination: string; - }> & - Partial<"">; + transfer_data?: + | { + amount_percent?: number; + destination: string; + } + | ""; }; /** * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. @@ -42068,7 +50969,7 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ phases?: { add_invoice_items?: { @@ -42084,7 +50985,7 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; application_fee_percent?: number; /** automatic_tax_config */ @@ -42093,26 +50994,29 @@ export interface operations { }; /** @enum {string} */ billing_cycle_anchor?: "automatic" | "phase_start"; - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** @enum {string} */ collection_method?: "charge_automatically" | "send_invoice"; coupon?: string; default_payment_method?: string; - default_tax_rates?: Partial & Partial<"">; - end_date?: Partial & Partial<"now">; + default_tax_rates?: string[] | ""; + description?: string; + end_date?: number | "now"; /** subscription_schedules_param */ invoice_settings?: { days_until_due?: number; }; items: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; price?: string; /** recurring_price_data */ price_data?: { @@ -42131,25 +51035,26 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; iterations?: number; + metadata?: { [key: string]: string }; /** @enum {string} */ proration_behavior?: | "always_invoice" | "create_prorations" | "none"; - start_date?: Partial & Partial<"now">; + start_date?: number | "now"; /** transfer_data_specs */ transfer_data?: { amount_percent?: number; destination: string; }; trial?: boolean; - trial_end?: Partial & Partial<"now">; + trial_end?: number | "now"; }[]; /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -42229,27 +51134,30 @@ 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; - }> & - 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; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + current_period_end?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + current_period_start?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** The ID of the customer whose subscriptions will be retrieved. */ customer?: string; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ @@ -42273,6 +51181,8 @@ export interface operations { | "past_due" | "trialing" | "unpaid"; + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock?: string; }; }; responses: { @@ -42306,7 +51216,15 @@ export interface operations { }; }; }; - /**

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

*/ + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ PostSubscriptions: { responses: { /** Successful response. */ @@ -42325,7 +51243,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string; /** one_time_price_data */ @@ -42339,13 +51257,13 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ application_fee_percent?: number; /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean; @@ -42357,15 +51275,16 @@ export interface operations { backdate_start_date?: number; /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number; /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; /** * Format: unix-time * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. @@ -42380,6 +51299,8 @@ export interface operations { collection_method?: "charge_automatically" | "send_invoice"; /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string; /** @description The identifier of the customer to subscribe. */ customer: string; /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ @@ -42389,15 +51310,18 @@ export interface operations { /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_source?: string; /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: Partial & Partial<"">; + default_tax_rates?: string[] | ""; + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description A list of up to 20 subscription items, each with an attached price. */ items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; + billing_thresholds?: + | { + usage_gte: number; + } + | ""; metadata?: { [key: string]: string }; price?: string; /** recurring_price_data */ @@ -42417,10 +51341,10 @@ export interface operations { unit_amount_decimal?: string; }; quantity?: number; - tax_rates?: Partial & Partial<"">; + tax_rates?: string[] | ""; }[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ off_session?: boolean; /** @@ -42445,68 +51369,124 @@ export interface operations { payment_settings?: { /** payment_method_options */ payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - amount?: number; - /** @enum {string} */ - amount_type?: "fixed" | "maximum"; - description?: string; - }; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number; + /** @enum {string} */ + amount_type?: "fixed" | "maximum"; + description?: string; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + /** @enum {string} */ + save_default_payment_method?: "off" | "on_subscription"; }; /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: Partial<{ - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } + | ""; /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string; /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: "always_invoice" | "create_prorations" | "none"; @@ -42519,7 +51499,7 @@ export interface operations { destination: string; }; /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: Partial<"now"> & Partial; + trial_end?: "now" | number; /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ trial_from_plan?: boolean; /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ @@ -42528,22 +51508,42 @@ export interface operations { }; }; }; - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetSubscriptionsSearch: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; - }; - path: { - subscription_exposed_id: string; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string; + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["subscription"]; + "application/json": { + data: components["schemas"]["subscription"][]; + has_more: boolean; + next_page?: string | null; + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: "search_result"; + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number; + url: string; + }; }; }; /** Error response. */ @@ -42559,9 +51559,13 @@ export interface operations { }; }; }; - /**

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

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; }; @@ -42582,222 +51586,309 @@ export interface operations { }; requestBody: { content: { - "application/x-www-form-urlencoded": { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string; - /** one_time_price_data */ - price_data?: { - currency: string; - product: string; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number; - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean; - }; - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: "now" | "unchanged"; - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: Partial<{ - amount_gte?: number; - reset_billing_cycle_anchor?: boolean; - }> & - Partial<"">; - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: Partial & Partial<"">; - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean; - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: "charge_automatically" | "send_invoice"; - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string; - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number; - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string; - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string; - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: Partial & Partial<"">; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: Partial<{ - usage_gte: number; - }> & - Partial<"">; - clear_usage?: boolean; - deleted?: boolean; - id?: string; - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - price?: string; - /** recurring_price_data */ - price_data?: { - currency: string; - product: string; - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }; - /** @enum {string} */ - tax_behavior?: "exclusive" | "inclusive" | "unspecified"; - unit_amount?: number; - /** Format: decimal */ - unit_amount_decimal?: string; - }; - quantity?: number; - tax_rates?: Partial & Partial<"">; - }[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean; - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: Partial<{ - /** @enum {string} */ - behavior: "keep_as_draft" | "mark_uncollectible" | "void"; - /** Format: unix-time */ - resumes_at?: number; - }> & - Partial<"">; - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: - | "allow_incomplete" - | "default_incomplete" - | "error_if_incomplete" - | "pending_if_incomplete"; - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: "business" | "personal"; - }; - /** @enum {string} */ - verification_method?: "automatic" | "instant" | "microdeposits"; - }> & - Partial<"">; - bancontact?: Partial<{ - /** @enum {string} */ - preferred_language?: "de" | "en" | "fr" | "nl"; - }> & - Partial<"">; - card?: Partial<{ - /** mandate_options_param */ - mandate_options?: { - amount?: number; - /** @enum {string} */ - amount_type?: "fixed" | "maximum"; - description?: string; - }; - /** @enum {string} */ - request_three_d_secure?: "any" | "automatic"; - }> & - Partial<"">; - }; - payment_method_types?: Partial< - ( - | "ach_credit_transfer" - | "ach_debit" - | "acss_debit" - | "au_becs_debit" - | "bacs_debit" - | "bancontact" - | "boleto" - | "card" - | "fpx" - | "giropay" - | "grabpay" - | "ideal" - | "sepa_debit" - | "sofort" - | "wechat_pay" - )[] - > & - Partial<"">; - }; - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: Partial<{ - /** @enum {string} */ - interval: "day" | "month" | "week" | "year"; - interval_count?: number; - }> & - Partial<"">; - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string; - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: "always_invoice" | "create_prorations" | "none"; - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number; - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: Partial<{ - amount_percent?: number; - destination: string; - }> & - Partial<"">; - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: Partial<"now"> & Partial; - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean; - }; + "application/x-www-form-urlencoded": { [key: string]: unknown }; }; }; }; - /** - *

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

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

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["subscription"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string; + /** one_time_price_data */ + price_data?: { + currency: string; + product: string; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: string[] | ""; + }[]; + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number; + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean; + }; + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: "now" | "unchanged"; + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number; + reset_billing_cycle_anchor?: boolean; + } + | ""; + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | ""; + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean; + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: "charge_automatically" | "send_invoice"; + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string; + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number; + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string; + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string; + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | ""; + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number; + } + | ""; + clear_usage?: boolean; + deleted?: boolean; + id?: string; + metadata?: { [key: string]: string } | ""; + price?: string; + /** recurring_price_data */ + price_data?: { + currency: string; + product: string; + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + }; + /** @enum {string} */ + tax_behavior?: "exclusive" | "inclusive" | "unspecified"; + unit_amount?: number; + /** Format: decimal */ + unit_amount_decimal?: string; + }; + quantity?: number; + tax_rates?: string[] | ""; + }[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean; + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: "keep_as_draft" | "mark_uncollectible" | "void"; + /** Format: unix-time */ + resumes_at?: number; + } + | ""; + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: + | "allow_incomplete" + | "default_incomplete" + | "error_if_incomplete" + | "pending_if_incomplete"; + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: "business" | "personal"; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + bancontact?: + | { + /** @enum {string} */ + preferred_language?: "de" | "en" | "fr" | "nl"; + } + | ""; + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number; + /** @enum {string} */ + amount_type?: "fixed" | "maximum"; + description?: string; + }; + /** @enum {string} */ + network?: + | "amex" + | "cartes_bancaires" + | "diners" + | "discover" + | "interac" + | "jcb" + | "mastercard" + | "unionpay" + | "unknown" + | "visa"; + /** @enum {string} */ + request_three_d_secure?: "any" | "automatic"; + } + | ""; + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string; + }; + type?: string; + }; + funding_type?: string; + } + | ""; + konbini?: { [key: string]: unknown } | ""; + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ( + | "balances" + | "ownership" + | "payment_method" + | "transactions" + )[]; + }; + /** @enum {string} */ + verification_method?: + | "automatic" + | "instant" + | "microdeposits"; + } + | ""; + }; + payment_method_types?: + | ( + | "ach_credit_transfer" + | "ach_debit" + | "acss_debit" + | "au_becs_debit" + | "bacs_debit" + | "bancontact" + | "boleto" + | "card" + | "customer_balance" + | "fpx" + | "giropay" + | "grabpay" + | "ideal" + | "konbini" + | "link" + | "paynow" + | "promptpay" + | "sepa_debit" + | "sofort" + | "us_bank_account" + | "wechat_pay" + )[] + | ""; + /** @enum {string} */ + save_default_payment_method?: "off" | "on_subscription"; + }; + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: "day" | "month" | "week" | "year"; + interval_count?: number; + } + | ""; + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string; + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: "always_invoice" | "create_prorations" | "none"; + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number; + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number; + destination: string; + } + | ""; + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: "now" | number; + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean; + }; + }; + }; + }; + /** + *

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

+ * + *

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

+ * + *

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

+ */ + DeleteSubscriptionsSubscriptionExposedId: { parameters: { path: { subscription_exposed_id: string; @@ -42857,7 +51948,7 @@ export interface operations { }; }; }; - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ GetTaxCodes: { parameters: { query: { @@ -42940,13 +52031,14 @@ export interface operations { /** Optional flag to filter by tax rates that are either active or inactive (archived). */ active?: boolean; /** Optional range for filtering created date. */ - created?: Partial<{ - gt?: number; - gte?: number; - lt?: number; - lte?: number; - }> & - Partial; + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ @@ -43114,7 +52206,7 @@ export interface operations { /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ jurisdiction?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ state?: string; /** @@ -43134,6 +52226,374 @@ export interface operations { }; }; }; + /**

Returns a list of Configuration objects.

*/ + GetTerminalConfigurations: { + 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[]; + /** if present, only return the account default or non-default configurations. */ + is_account_default?: boolean; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["terminal.configuration"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Creates a new Configuration object.

*/ + PostTerminalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["terminal.configuration"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: { + splashscreen?: string | ""; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + } + | ""; + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: string | ""; + }; + }; + }; + }; + }; + /**

Retrieves a Configuration object.

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

Updates a new Configuration object.

*/ + PostTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": + | components["schemas"]["terminal.configuration"] + | components["schemas"]["deleted_terminal.configuration"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: + | { + splashscreen?: string | ""; + } + | ""; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[]; + percentages?: number[]; + smart_tip_threshold?: number; + }; + } + | ""; + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: + | { + splashscreen?: string | ""; + } + | ""; + }; + }; + }; + }; + /**

Deletes a Configuration object.

*/ + DeleteTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["deleted_terminal.configuration"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; /**

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: { @@ -43240,12 +52700,14 @@ export interface operations { postal_code?: string; state?: string; }; + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string; /** @description A name for the location. */ display_name: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -43265,7 +52727,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["terminal.location"]; + "application/json": + | components["schemas"]["terminal.location"] + | components["schemas"]["deleted_terminal.location"]; }; }; /** Error response. */ @@ -43292,7 +52756,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["terminal.location"]; + "application/json": + | components["schemas"]["terminal.location"] + | components["schemas"]["deleted_terminal.location"]; }; }; /** Error response. */ @@ -43317,12 +52783,14 @@ export interface operations { postal_code?: string; state?: string; }; + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string; /** @description A name for the location. */ display_name?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -43359,7 +52827,13 @@ export interface operations { parameters: { query: { /** Filters readers by device type */ - device_type?: "bbpos_chipper2x" | "bbpos_wisepos_e" | "verifone_P400"; + device_type?: + | "bbpos_chipper2x" + | "bbpos_wisepad3" + | "bbpos_wisepos_e" + | "simulated_wisepos_e" + | "stripe_m2" + | "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. */ @@ -43432,7 +52906,7 @@ export interface operations { /** @description The location to assign the reader to. */ location?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description A code generated by the reader used for registering to an account. */ registration_code: string; }; @@ -43454,10 +52928,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial< - components["schemas"]["terminal.reader"] - > & - Partial; + "application/json": + | components["schemas"]["terminal.reader"] + | components["schemas"]["deleted_terminal.reader"]; }; }; /** Error response. */ @@ -43484,10 +52957,9 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": Partial< - components["schemas"]["terminal.reader"] - > & - Partial; + "application/json": + | components["schemas"]["terminal.reader"] + | components["schemas"]["deleted_terminal.reader"]; }; }; /** Error response. */ @@ -43505,7 +52977,7 @@ export interface operations { /** @description The new label of the reader. */ label?: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; }; }; }; @@ -43537,16 +53009,2189 @@ export interface operations { }; }; }; + /**

Cancels the current reader action.

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

Initiates a payment flow on a Reader.

*/ + PostTerminalReadersReaderProcessPaymentIntent: { + 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": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description PaymentIntent ID */ + payment_intent: string; + /** + * process_config + * @description Configuration overrides + */ + process_config?: { + skip_tipping?: boolean; + }; + }; + }; + }; + }; + /**

Initiates a setup intent flow on a Reader.

*/ + PostTerminalReadersReaderProcessSetupIntent: { + 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": { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description SetupIntent ID */ + setup_intent: string; + }; + }; + }; + }; + /**

Sets reader display to show cart details.

*/ + PostTerminalReadersReaderSetReaderDisplay: { + 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": { + /** + * cart + * @description Cart + */ + cart?: { + currency: string; + line_items: { + amount: number; + description: string; + quantity: number; + }[]; + tax?: number; + total: number; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * @description Type + * @enum {string} + */ + type: "cart"; + }; + }; + }; + }; + /**

Create an incoming testmode bank transfer

*/ + PostTestHelpersCustomersCustomerFundCashBalance: { + parameters: { + path: { + customer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["customer_cash_balance_transaction"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + reference?: string; + }; + }; + }; + }; + /**

Updates the shipping status of the specified Issuing Card object to delivered.

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

Updates the shipping status of the specified Issuing Card object to failure.

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

Updates the shipping status of the specified Issuing Card object to returned.

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

Updates the shipping status of the specified Issuing Card object to shipped.

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

Expire a refund with a status of requires_action.

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

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { + 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": { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * @description Simulated payment type + * @enum {string} + */ + type?: "card_present"; + }; + }; + }; + }; + /**

Returns a list of your test clocks.

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

Creates a new test clock that can be attached to new customers and quotes.

*/ + PostTestHelpersTestClocks: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["test_helpers.test_clock"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + frozen_time: number; + /** @description The name for this test clock. */ + name?: string; + }; + }; + }; + }; + /**

Retrieves a test clock.

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

Deletes a test clock.

*/ + DeleteTestHelpersTestClocksTestClock: { + parameters: { + path: { + test_clock: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["deleted_test_helpers.test_clock"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + PostTestHelpersTestClocksTestClockAdvance: { + parameters: { + path: { + test_clock: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["test_helpers.test_clock"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + frozen_time: number; + }; + }; + }; + }; + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdFail: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.inbound_transfer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * failure_details_params + * @description Details about a failed InboundTransfer. + */ + failure_details?: { + /** @enum {string} */ + code?: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "debit_not_authorized" + | "incorrect_account_holder_address" + | "incorrect_account_holder_name" + | "incorrect_account_holder_tax_id" + | "insufficient_funds" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + }; + }; + }; + }; + }; + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

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

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

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

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

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

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

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

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.outbound_payment"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * returned_details_params + * @description Optional hash to set the the return code. + */ + returned_details?: { + /** @enum {string} */ + code?: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "declined" + | "incorrect_account_holder_name" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + }; + }; + }; + }; + }; + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

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

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

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

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { + parameters: { + path: { + outbound_transfer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.outbound_transfer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: + | "account_closed" + | "account_frozen" + | "bank_account_restricted" + | "bank_ownership_changed" + | "declined" + | "incorrect_account_holder_name" + | "invalid_account_number" + | "invalid_currency" + | "no_account" + | "other"; + }; + }; + }; + }; + }; + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedCredits: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.received_credit"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description The FinancialAccount to send funds to. */ + financial_account: string; + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: "us_bank_account"; + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string; + account_number?: string; + routing_number?: string; + }; + }; + /** + * @description The rails used for the object. + * @enum {string} + */ + network: "ach" | "us_domestic_wire"; + }; + }; + }; + }; + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedDebits: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.received_debit"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description The FinancialAccount to pull funds from. */ + financial_account: string; + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: "us_bank_account"; + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string; + account_number?: string; + routing_number?: string; + }; + }; + /** + * @description The rails used for the object. + * @enum {string} + */ + network: "ach"; + }; + }; + }; + }; + /** + *

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

+ */ + PostTokens: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["token"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * connect_js_account_token_specs + * @description Information for the account this token will represent. + */ + account?: { + /** @enum {string} */ + business_type?: + | "company" + | "government_entity" + | "individual" + | "non_profit"; + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + directors_provided?: boolean; + executives_provided?: boolean; + name?: string; + name_kana?: string; + name_kanji?: string; + owners_provided?: boolean; + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number; + ip?: string; + user_agent?: string; + }; + ownership_declaration_shown_and_signed?: boolean; + phone?: string; + registration_number?: string; + /** @enum {string} */ + structure?: + | "" + | "free_zone_establishment" + | "free_zone_llc" + | "government_instrumentality" + | "governmental_unit" + | "incorporated_non_profit" + | "limited_liability_partnership" + | "llc" + | "multi_member_llc" + | "private_company" + | "private_corporation" + | "private_partnership" + | "public_company" + | "public_corporation" + | "public_partnership" + | "single_member_llc" + | "sole_establishment" + | "sole_proprietorship" + | "tax_exempt_government_instrumentality" + | "unincorporated_association" + | "unincorporated_non_profit"; + tax_id?: string; + tax_id_registrar?: string; + vat_id?: string; + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string; + front?: string; + }; + }; + }; + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; + email?: string; + first_name?: string; + first_name_kana?: string; + first_name_kanji?: string; + full_name_aliases?: string[] | ""; + gender?: string; + id_number?: string; + id_number_secondary?: string; + last_name?: string; + last_name_kana?: string; + last_name_kanji?: string; + maiden_name?: string; + metadata?: { [key: string]: string } | ""; + phone?: string; + /** @enum {string} */ + political_exposure?: "existing" | "none"; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + ssn_last_4?: string; + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; + }; + }; + tos_shown_and_accepted?: boolean; + }; + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string; + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number: string; + /** @enum {string} */ + account_type?: "checking" | "futsu" | "savings" | "toza"; + country: string; + currency?: string; + routing_number?: string; + }; + card?: + | { + address_city?: string; + address_country?: string; + address_line1?: string; + address_line2?: string; + address_state?: string; + address_zip?: string; + currency?: string; + cvc?: string; + exp_month: string; + exp_year: string; + name?: string; + number: string; + } + | string; + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string; + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + cvc_update?: { + cvc: string; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** japan_address_kana_specs */ + address_kana?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + town?: string; + }; + dob?: + | { + day: number; + month: number; + year: number; + } + | ""; + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[]; + }; + /** documents_param */ + passport?: { + files?: string[]; + }; + /** documents_param */ + visa?: { + files?: string[]; + }; + }; + email?: string; + first_name?: string; + first_name_kana?: string; + first_name_kanji?: string; + full_name_aliases?: string[] | ""; + gender?: string; + id_number?: string; + id_number_secondary?: string; + last_name?: string; + last_name_kana?: string; + last_name_kanji?: string; + maiden_name?: string; + metadata?: { [key: string]: string } | ""; + nationality?: string; + phone?: string; + political_exposure?: string; + /** address_specs */ + registered_address?: { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + }; + /** relationship_specs */ + relationship?: { + director?: boolean; + executive?: boolean; + owner?: boolean; + percent_ownership?: number | ""; + representative?: boolean; + title?: string; + }; + ssn_last_4?: string; + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string; + front?: string; + }; + /** person_verification_document_specs */ + document?: { + back?: string; + front?: string; + }; + }; + }; + /** + * pii_token_specs + * @description The PII this token will represent. + */ + pii?: { + id_number?: string; + }; + }; + }; + }; + }; + /**

Retrieves the token with the given ID.

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

Returns a list of top-ups.

*/ + GetTopups: { + parameters: { + query: { + /** A positive integer representing how much to transfer. */ + amount?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + status?: "canceled" | "failed" | "pending" | "succeeded"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["topup"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Top up the balance of an account

*/ + PostTopups: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["topup"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer representing how much to transfer. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string; + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string; + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string; + }; + }; + }; + }; + /**

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

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

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

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["topup"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + }; + }; + }; + }; + /**

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

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

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

*/ + GetTransfers: { + parameters: { + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** Only return transfers for the destination specified by this account ID. */ + destination?: string; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + /** Only return transfers with the specified transfer group. */ + transfer_group?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["transfer"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

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

*/ + PostTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["transfer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + amount?: number; + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string; + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string; + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: "bank_account" | "card" | "fpx"; + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string; + }; + }; + }; + }; + /**

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

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

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.

+ *

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.

*/ - PostTokens: { + PostTransfersIdReversals: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["transfer_reversal"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number; + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean; + }; + }; + }; + }; + /**

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

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

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

+ * + *

This request accepts only metadata as an argument.

+ */ + PostTransfersTransfer: { + parameters: { + path: { + transfer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["transfer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + }; + }; + }; + }; + /**

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

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

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

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string; + transfer: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["transfer_reversal"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | ""; + }; + }; + }; + }; + /**

Returns a list of CreditReversals.

*/ + GetTreasuryCreditReversals: { + 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[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; + /** 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 CreditReversals for the ReceivedCredit ID. */ + received_credit?: 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 CreditReversals for a given status. */ + status?: "canceled" | "posted" | "processing"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.credit_reversal"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + PostTreasuryCreditReversals: { responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["token"]; + "application/json": components["schemas"]["treasury.credit_reversal"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; + /** @description The ReceivedCredit to reverse. */ + received_credit: string; + }; + }; + }; + }; + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

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

Returns a list of DebitReversals.

*/ + GetTreasuryDebitReversals: { + 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[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; + /** 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 DebitReversals for the ReceivedDebit ID. */ + received_debit?: string; + /** Only return DebitReversals for a given resolution. */ + resolution?: "lost" | "won"; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 DebitReversals for a given status. */ + status?: "canceled" | "completed" | "processing"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.debit_reversal"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + PostTreasuryDebitReversals: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.debit_reversal"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; + /** @description The ReceivedDebit to reverse. */ + received_debit: string; + }; + }; + }; + }; + /**

Retrieves a DebitReversal object.

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

Returns a list of FinancialAccounts.

*/ + GetTreasuryFinancialAccounts: { + parameters: { + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** An object ID cursor for use in pagination. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** A limit ranging from 1 to 100 (defaults to 10). */ + limit?: number; + /** An object ID cursor for use in pagination. */ + starting_after?: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + data: components["schemas"]["treasury.financial_account"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + PostTreasuryFinancialAccounts: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.financial_account"]; }; }; /** Error response. */ @@ -43559,330 +55204,223 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. */ - account?: { - /** @enum {string} */ - business_type?: - | "company" - | "government_entity" - | "individual" - | "non_profit"; - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - directors_provided?: boolean; - executives_provided?: boolean; - name?: string; - name_kana?: string; - name_kanji?: string; - owners_provided?: boolean; - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number; - ip?: string; - user_agent?: string; + features?: { + /** access */ + card_issuing?: { + requested: boolean; + }; + /** access */ + deposit_insurance?: { + requested: boolean; + }; + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean; }; - ownership_declaration_shown_and_signed?: boolean; - phone?: string; - registration_number?: string; - /** @enum {string} */ - structure?: - | "" - | "free_zone_establishment" - | "free_zone_llc" - | "government_instrumentality" - | "governmental_unit" - | "incorporated_non_profit" - | "limited_liability_partnership" - | "llc" - | "multi_member_llc" - | "private_company" - | "private_corporation" - | "private_partnership" - | "public_company" - | "public_corporation" - | "public_partnership" - | "single_member_llc" - | "sole_establishment" - | "sole_proprietorship" - | "tax_exempt_government_instrumentality" - | "unincorporated_association" - | "unincorporated_non_profit"; - tax_id?: string; - tax_id_registrar?: string; - vat_id?: string; - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string; - front?: string; - }; + }; + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean; }; }; - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; + /** access */ + intra_stripe_flows?: { + requested: boolean; + }; + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean; }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; + /** access */ + us_domestic_wire?: { + requested: boolean; }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; + }; + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean; }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - email?: string; - first_name?: string; - first_name_kana?: string; - first_name_kanji?: string; - full_name_aliases?: Partial & Partial<"">; - 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; - /** @enum {string} */ - political_exposure?: "existing" | "none"; - ssn_last_4?: string; - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; - }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; - }; + /** access */ + us_domestic_wire?: { + requested: boolean; }; }; - tos_shown_and_accepted?: boolean; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; /** - * token_create_bank_account - * @description The bank account this token will represent. + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. */ - bank_account?: { - account_holder_name?: string; + platform_restrictions?: { /** @enum {string} */ - account_holder_type?: "company" | "individual"; - account_number: string; + inbound_flows?: "restricted" | "unrestricted"; /** @enum {string} */ - account_type?: "checking" | "futsu" | "savings" | "toza"; - 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; - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string; - /** - * cvc_params - * @description The updated CVC value this token will represent. - */ - cvc_update?: { - cvc: string; + outbound_flows?: "restricted" | "unrestricted"; }; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** - * person_token_specs - * @description Information for the person this token will represent. - */ - person?: { - /** address_specs */ - address?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - }; - /** japan_address_kana_specs */ - address_kana?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string; - country?: string; - line1?: string; - line2?: string; - postal_code?: string; - state?: string; - town?: string; - }; - dob?: Partial<{ - day: number; - month: number; - year: number; - }> & - Partial<"">; - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[]; - }; - /** documents_param */ - passport?: { - files?: string[]; - }; - /** documents_param */ - visa?: { - files?: string[]; - }; - }; - email?: string; - first_name?: string; - first_name_kana?: string; - first_name_kanji?: string; - full_name_aliases?: Partial & Partial<"">; - 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<"">; - nationality?: string; - phone?: string; - political_exposure?: string; - /** relationship_specs */ - relationship?: { - director?: boolean; - executive?: boolean; - owner?: boolean; - percent_ownership?: Partial & Partial<"">; - representative?: boolean; - title?: string; + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: string[]; + }; + }; + }; + }; + /**

Retrieves the details of a FinancialAccount.

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

Updates the details of a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccount: { + parameters: { + path: { + financial_account: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.financial_account"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean; }; - ssn_last_4?: string; - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string; - front?: string; + /** access */ + deposit_insurance?: { + requested: boolean; + }; + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean; }; - /** person_verification_document_specs */ - document?: { - back?: string; - front?: string; + }; + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean; + }; + }; + /** access */ + intra_stripe_flows?: { + requested: boolean; + }; + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; + }; + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; }; }; }; + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string }; /** - * pii_token_specs - * @description The PII this token will represent. + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. */ - pii?: { - id_number?: string; + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: "restricted" | "unrestricted"; + /** @enum {string} */ + outbound_flows?: "restricted" | "unrestricted"; }; }; }; }; }; - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccountFeatures: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - token: string; + financial_account: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["token"]; + "application/json": components["schemas"]["treasury.financial_account_features"]; }; }; /** Error response. */ @@ -43898,36 +55436,121 @@ export interface operations { }; }; }; - /**

Returns a list of top-ups.

*/ - GetTopups: { + /**

Updates the Features associated with a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccountFeatures: { + parameters: { + path: { + financial_account: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.financial_account_features"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + */ + card_issuing?: { + requested: boolean; + }; + /** + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + */ + deposit_insurance?: { + requested: boolean; + }; + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. + */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean; + }; + }; + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean; + }; + }; + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + intra_stripe_flows?: { + requested: boolean; + }; + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; + }; + /** + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean; + }; + /** access */ + us_domestic_wire?: { + requested: boolean; + }; + }; + }; + }; + }; + }; + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryInboundTransfers: { parameters: { query: { - /** A positive integer representing how much to transfer. */ - 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; - }> & - 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[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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"; + /** Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status?: "canceled" | "failed" | "processing" | "succeeded"; }; }; responses: { @@ -43935,7 +55558,8 @@ export interface operations { 200: { content: { "application/json": { - data: components["schemas"]["topup"][]; + /** @description Details about each object. */ + data: components["schemas"]["treasury.inbound_transfer"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -43961,13 +55585,13 @@ export interface operations { }; }; }; - /**

Top up the balance of an account

*/ - PostTopups: { + /**

Creates an InboundTransfer.

*/ + PostTreasuryInboundTransfers: { responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["topup"]; + "application/json": components["schemas"]["treasury.inbound_transfer"]; }; }; /** Error response. */ @@ -43980,7 +55604,7 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ amount: number; /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; @@ -43988,34 +55612,34 @@ export interface operations { description?: string; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description The FinancialAccount to send funds to. */ + financial_account: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string; - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + metadata?: { [key: string]: string }; + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string; + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ statement_descriptor?: string; - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string; }; }; }; }; - /**

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

*/ - GetTopupsTopup: { + /**

Retrieves the details of an existing InboundTransfer.

*/ + GetTreasuryInboundTransfersId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - topup: string; + id: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["topup"]; + "application/json": components["schemas"]["treasury.inbound_transfer"]; }; }; /** Error response. */ @@ -44031,18 +55655,95 @@ export interface operations { }; }; }; - /**

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

*/ - PostTopupsTopup: { + /**

Cancels an InboundTransfer.

*/ + PostTreasuryInboundTransfersInboundTransferCancel: { parameters: { path: { - topup: string; + inbound_transfer: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["topup"]; + "application/json": components["schemas"]["treasury.inbound_transfer"]; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; + }; + }; + }; + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundPayments: { + parameters: { + query: { + /** Only return OutboundPayments sent to this customer. */ + customer?: string; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status?: "canceled" | "failed" | "posted" | "processing" | "returned"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.outbound_payment"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Creates an OutboundPayment.

*/ + PostTreasuryOutboundPayments: { + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.outbound_payment"]; }; }; /** Error response. */ @@ -44055,28 +55756,127 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string; + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + customer?: string; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string; + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + destination_payment_method?: string; + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + destination_payment_method_data?: { + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string; + country?: string; + line1?: string; + line2?: string; + postal_code?: string; + state?: string; + } + | ""; + email?: string | ""; + name?: string; + phone?: string; + }; + financial_account?: string; + metadata?: { [key: string]: string }; + /** @enum {string} */ + type: "financial_account" | "us_bank_account"; + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: "company" | "individual"; + account_number?: string; + /** @enum {string} */ + account_type?: "checking" | "savings"; + financial_connections_account?: string; + routing_number?: string; + }; + }; + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: "ach" | "us_domestic_wire"; + } + | ""; + }; + /** + * end_user_details_params + * @description End user details. + */ + end_user_details?: { + ip_address?: string; + present: boolean; + }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description The FinancialAccount to pull funds from. */ + financial_account: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string }; + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ + statement_descriptor?: string; }; }; }; }; - /**

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

*/ - PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

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

Cancel an OutboundPayment.

*/ + PostTreasuryOutboundPaymentsIdCancel: { + parameters: { + path: { + id: string; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": components["schemas"]["treasury.outbound_payment"]; }; }; /** Error response. */ @@ -44095,29 +55895,22 @@ export interface operations { }; }; }; - /**

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

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundTransfers: { parameters: { query: { - 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. */ ending_before?: string; /** Specifies which fields in the response should be expanded. */ expand?: string[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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; + /** Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status?: "canceled" | "failed" | "posted" | "processing" | "returned"; }; }; responses: { @@ -44126,7 +55919,7 @@ export interface operations { content: { "application/json": { /** @description Details about each object. */ - data: components["schemas"]["transfer"][]; + data: components["schemas"]["treasury.outbound_transfer"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -44152,13 +55945,13 @@ export interface operations { }; }; }; - /**

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

Creates an OutboundTransfer.

*/ + PostTreasuryOutboundTransfers: { responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["transfer"]; + "application/json": components["schemas"]["treasury.outbound_transfer"]; }; }; /** Error response. */ @@ -44171,46 +55964,124 @@ export interface operations { requestBody: { content: { "application/x-www-form-urlencoded": { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number; - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + /** @description Amount (in cents) to be transferred. */ + amount: number; + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string; /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string; - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string; + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string; + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: "ach" | "us_domestic_wire"; + } + | ""; + }; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; + /** @description The FinancialAccount to pull funds from. */ + financial_account: string; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string }; - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string; - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: "bank_account" | "card" | "fpx"; - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string; + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: 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: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

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

An OutboundTransfer can be canceled if the funds have not yet been paid out.

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

Returns a list of ReceivedCredits.

*/ + GetTreasuryReceivedCredits: { 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[]; + /** The FinancialAccount that received the funds. */ + financial_account: string; /** 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 ReceivedCredits described by the flow. */ + linked_flows?: { + /** @enum {string} */ + source_flow_type: + | "credit_reversal" + | "other" + | "outbound_payment" + | "payout"; + }; /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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; + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status?: "failed" | "succeeded"; }; }; responses: { @@ -44219,7 +56090,7 @@ export interface operations { content: { "application/json": { /** @description Details about each object. */ - data: components["schemas"]["transfer_reversal"][]; + data: components["schemas"]["treasury.received_credit"][]; /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean; /** @@ -44245,15 +56116,13 @@ export interface operations { }; }; }; - /** - *

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

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + GetTreasuryReceivedCreditsId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + }; path: { id: string; }; @@ -44262,7 +56131,7 @@ export interface operations { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["transfer_reversal"]; + "application/json": components["schemas"]["treasury.received_credit"]; }; }; /** Error response. */ @@ -44274,37 +56143,76 @@ export interface operations { }; requestBody: { content: { - "application/x-www-form-urlencoded": { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number; - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean; + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Returns a list of ReceivedDebits.

*/ + GetTreasuryReceivedDebits: { + 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[]; + /** The FinancialAccount that funds were pulled from. */ + financial_account: string; + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status?: "failed" | "succeeded"; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.received_debit"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; }; }; }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; }; - /**

Retrieves the details of an existing 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: { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + GetTreasuryReceivedDebitsId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[]; }; path: { - transfer: string; + id: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["transfer"]; + "application/json": components["schemas"]["treasury.received_debit"]; }; }; /** Error response. */ @@ -44320,22 +56228,59 @@ export interface operations { }; }; }; - /** - *

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

Retrieves a list of TransactionEntry objects.

*/ + GetTreasuryTransactionEntries: { parameters: { - path: { - transfer: string; + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + effective_at?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by?: "created" | "effective_at"; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 TransactionEntries associated with this Transaction. */ + transaction?: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["transfer"]; + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.transaction_entry"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; }; }; /** Error response. */ @@ -44347,19 +56292,12 @@ export interface operations { }; requestBody: { content: { - "application/x-www-form-urlencoded": { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string; - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - }; + "application/x-www-form-urlencoded": { [key: string]: unknown }; }; }; }; - /**

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

Retrieves a TransactionEntry object.

*/ + GetTreasuryTransactionEntriesId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ @@ -44367,14 +56305,13 @@ export interface operations { }; path: { id: string; - transfer: string; }; }; responses: { /** Successful response. */ 200: { content: { - "application/json": components["schemas"]["transfer_reversal"]; + "application/json": components["schemas"]["treasury.transaction_entry"]; }; }; /** Error response. */ @@ -44390,23 +56327,93 @@ export interface operations { }; }; }; - /** - *

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

Retrieves a list of Transaction objects.

*/ + GetTreasuryTransactions: { + parameters: { + query: { + created?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string; + /** Specifies which fields in the response should be expanded. */ + expand?: string[]; + /** Returns objects associated with this FinancialAccount. */ + financial_account: string; + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by?: "created" | "posted_at"; + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string; + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status?: "open" | "posted" | "void"; + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions?: { + posted_at?: + | { + gt?: number; + gte?: number; + lt?: number; + lte?: number; + } + | number; + }; + }; + }; + responses: { + /** Successful response. */ + 200: { + content: { + "application/json": { + /** @description Details about each object. */ + data: components["schemas"]["treasury.transaction"][]; + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean; + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: "list"; + /** @description The URL where this list can be accessed. */ + url: string; + }; + }; + }; + /** Error response. */ + default: { + content: { + "application/json": components["schemas"]["error"]; + }; + }; + }; + requestBody: { + content: { + "application/x-www-form-urlencoded": { [key: string]: unknown }; + }; + }; + }; + /**

Retrieves the details of an existing Transaction.

*/ + GetTreasuryTransactionsId: { 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"]; + "application/json": components["schemas"]["treasury.transaction"]; }; }; /** Error response. */ @@ -44418,12 +56425,7 @@ export interface operations { }; requestBody: { content: { - "application/x-www-form-urlencoded": { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[]; - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; - }; + "application/x-www-form-urlencoded": { [key: string]: unknown }; }; }; }; @@ -44591,7 +56593,8 @@ export interface operations { | "2019-11-05" | "2019-12-03" | "2020-03-02" - | "2020-08-27"; + | "2020-08-27" + | "2022-08-01"; /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: boolean; /** @description An optional description of what the webhook is used for. */ @@ -44611,7 +56614,9 @@ export interface operations { | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" + | "billing_portal.session.created" | "capability.updated" + | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" @@ -44654,7 +56659,13 @@ export interface operations { | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" + | "customer_cash_balance_transaction.created" | "file.created" + | "financial_connections.account.created" + | "financial_connections.account.deactivated" + | "financial_connections.account.disconnected" + | "financial_connections.account.reactivated" + | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -44693,13 +56704,10 @@ export interface operations { | "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.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" @@ -44768,21 +56776,54 @@ export interface operations { | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" + | "terminal.reader.action_failed" + | "terminal.reader.action_succeeded" + | "test_helpers.test_clock.advancing" + | "test_helpers.test_clock.created" + | "test_helpers.test_clock.deleted" + | "test_helpers.test_clock.internal_failure" + | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" - | "transfer.failed" - | "transfer.paid" | "transfer.reversed" | "transfer.updated" + | "treasury.credit_reversal.created" + | "treasury.credit_reversal.posted" + | "treasury.debit_reversal.completed" + | "treasury.debit_reversal.created" + | "treasury.debit_reversal.initial_credit_granted" + | "treasury.financial_account.closed" + | "treasury.financial_account.created" + | "treasury.financial_account.features_status_updated" + | "treasury.inbound_transfer.canceled" + | "treasury.inbound_transfer.created" + | "treasury.inbound_transfer.failed" + | "treasury.inbound_transfer.succeeded" + | "treasury.outbound_payment.canceled" + | "treasury.outbound_payment.created" + | "treasury.outbound_payment.expected_arrival_date_updated" + | "treasury.outbound_payment.failed" + | "treasury.outbound_payment.posted" + | "treasury.outbound_payment.returned" + | "treasury.outbound_transfer.canceled" + | "treasury.outbound_transfer.created" + | "treasury.outbound_transfer.expected_arrival_date_updated" + | "treasury.outbound_transfer.failed" + | "treasury.outbound_transfer.posted" + | "treasury.outbound_transfer.returned" + | "treasury.received_credit.created" + | "treasury.received_credit.failed" + | "treasury.received_credit.succeeded" + | "treasury.received_debit.created" )[]; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The URL of the webhook endpoint. */ url: string; }; @@ -44863,7 +56904,9 @@ export interface operations { | "balance.available" | "billing_portal.configuration.created" | "billing_portal.configuration.updated" + | "billing_portal.session.created" | "capability.updated" + | "cash_balance.funds_available" | "charge.captured" | "charge.dispute.closed" | "charge.dispute.created" @@ -44906,7 +56949,13 @@ export interface operations { | "customer.tax_id.deleted" | "customer.tax_id.updated" | "customer.updated" + | "customer_cash_balance_transaction.created" | "file.created" + | "financial_connections.account.created" + | "financial_connections.account.deactivated" + | "financial_connections.account.disconnected" + | "financial_connections.account.reactivated" + | "financial_connections.account.refreshed_balance" | "identity.verification_session.canceled" | "identity.verification_session.created" | "identity.verification_session.processing" @@ -44945,13 +56994,10 @@ export interface operations { | "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.partially_funded" | "payment_intent.payment_failed" | "payment_intent.processing" | "payment_intent.requires_action" @@ -45020,21 +57066,54 @@ export interface operations { | "subscription_schedule.updated" | "tax_rate.created" | "tax_rate.updated" + | "terminal.reader.action_failed" + | "terminal.reader.action_succeeded" + | "test_helpers.test_clock.advancing" + | "test_helpers.test_clock.created" + | "test_helpers.test_clock.deleted" + | "test_helpers.test_clock.internal_failure" + | "test_helpers.test_clock.ready" | "topup.canceled" | "topup.created" | "topup.failed" | "topup.reversed" | "topup.succeeded" | "transfer.created" - | "transfer.failed" - | "transfer.paid" | "transfer.reversed" | "transfer.updated" + | "treasury.credit_reversal.created" + | "treasury.credit_reversal.posted" + | "treasury.debit_reversal.completed" + | "treasury.debit_reversal.created" + | "treasury.debit_reversal.initial_credit_granted" + | "treasury.financial_account.closed" + | "treasury.financial_account.created" + | "treasury.financial_account.features_status_updated" + | "treasury.inbound_transfer.canceled" + | "treasury.inbound_transfer.created" + | "treasury.inbound_transfer.failed" + | "treasury.inbound_transfer.succeeded" + | "treasury.outbound_payment.canceled" + | "treasury.outbound_payment.created" + | "treasury.outbound_payment.expected_arrival_date_updated" + | "treasury.outbound_payment.failed" + | "treasury.outbound_payment.posted" + | "treasury.outbound_payment.returned" + | "treasury.outbound_transfer.canceled" + | "treasury.outbound_transfer.created" + | "treasury.outbound_transfer.expected_arrival_date_updated" + | "treasury.outbound_transfer.failed" + | "treasury.outbound_transfer.posted" + | "treasury.outbound_transfer.returned" + | "treasury.received_credit.created" + | "treasury.received_credit.failed" + | "treasury.received_credit.succeeded" + | "treasury.received_debit.created" )[]; /** @description Specifies which fields in the response should be expanded. */ expand?: string[]; /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: Partial<{ [key: string]: string }> & Partial<"">; + metadata?: { [key: string]: string } | ""; /** @description The URL of the webhook endpoint. */ url?: string; }; diff --git a/test/bin/expected/paths-enum.ts b/test/bin/expected/paths-enum.ts index b613340c7..10c4946fb 100644 --- a/test/bin/expected/paths-enum.ts +++ b/test/bin/expected/paths-enum.ts @@ -5,7 +5,9 @@ export interface paths { "/pet": { + /** Update an existing pet by Id */ put: operations["updatePet"]; + /** Add a new pet to the store */ post: operations["addPet"]; }; "/pet/findByStatus": { @@ -13,13 +15,14 @@ export interface paths { get: operations["findPetsByStatus"]; }; "/pet/findByTags": { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations["deletePet"]; }; "/pet/{petId}/uploadImage": { @@ -30,22 +33,21 @@ export interface paths { get: operations["getInventory"]; }; "/store/order": { + /** Place a new order in the store */ post: operations["placeOrder"]; }; "/store/order/{orderId}": { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations["getOrderById"]; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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": { + /** Creates list of users with given input array */ post: operations["createUsersWithListInput"]; }; "/user/login": { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number; - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number; /** Format: date-time */ shipDate?: string; /** * @description Order Status + * @example approved * @enum {string} */ status?: "placed" | "approved" | "delivered"; - /** @default false */ complete?: boolean; }; + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number; + /** @example fehguy */ + username?: string; + address?: components["schemas"]["Address"][]; + }; + Address: { + /** @example 437 Lytton */ + street?: string; + /** @example Palo Alto */ + city?: string; + /** @example CA */ + state?: string; + /** @example 94301 */ + zip?: string; + }; Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number; + /** @example Dogs */ name?: string; }; User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; + /** @example theUser */ username?: string; + /** @example John */ firstName?: string; + /** @example James */ lastName?: string; + /** @example john@email.com */ email?: string; + /** @example 12345 */ password?: string; + /** @example 12345 */ phone?: string; /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number; }; @@ -108,11 +153,14 @@ export interface components { name?: string; }; Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - category?: components["schemas"]["Category"]; /** @example doggie */ name: string; + category?: components["schemas"]["Category"]; photoUrls: string[]; tags?: components["schemas"]["Tag"][]; /** @@ -128,11 +176,34 @@ export interface components { message?: string; }; }; + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; + /** List of user object */ + UserArray: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + }; } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid ID supplied */ 400: unknown; /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid input */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ("available" | "pending" | "sold")[]; + status?: "available" | "pending" | "sold"; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid status value */ 400: unknown; }; }; - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[]; + tags?: string[]; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"]; "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; }; }; /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number; }; + query: { + /** Name of pet that needs to be updated */ + name?: string; + /** Status of pet that needs to be updated */ + status?: string; + }; }; responses: { /** Invalid input */ 405: unknown; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Updated name of the pet */ - name?: string; - /** @description Updated status of the pet */ - status?: string; - }; - }; - }; }; + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { }; }; responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown; - /** Pet not found */ - 404: unknown; }; }; uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number; }; + query: { + /** Additional Metadata */ + additionalMetadata?: string; + }; }; responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { }; requestBody: { content: { - "multipart/form-data": { - /** @description Additional data to pass to server */ - additionalMetadata?: string; - /** - * Format: binary - * @description file to upload - */ - file?: string; - }; + "application/octet-stream": string; }; }; }; @@ -302,30 +374,31 @@ export interface operations { }; }; }; + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; }; }; - /** Invalid Order */ - 400: unknown; + /** Invalid input */ + 405: unknown; }; - /** order placed for purchasing the pet */ requestBody: { content: { - "*/*": components["schemas"]["Order"]; + "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; + "application/x-www-form-urlencoded": components["schemas"]["Order"]; }; }; }; - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number; }; }; @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; }; }; /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown; }; }; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown; - }; - /** Created user object */ - requestBody: { - content: { - "*/*": components["schemas"]["User"]; + default: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; }; }; - }; - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown; - }; - /** List of user object */ + /** Created user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; + }; /** successful operation */ default: unknown; }; - /** List of user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"][]; }; }; }; @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string; + username?: string; /** The password for login in clear text */ - password: string; + password?: string; }; }; responses: { @@ -423,6 +498,7 @@ export interface operations { }; }; logoutUser: { + parameters: {}; responses: { /** successful operation */ default: unknown; @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["User"]; "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; }; }; /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string; }; }; responses: { - /** Invalid user supplied */ - 400: unknown; - /** User not found */ - 404: unknown; + /** successful operation */ + default: unknown; }; - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - "*/*": components["schemas"]["User"]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; @@ -503,7 +579,6 @@ export enum ApiPaths { getOrderById = "/store/order/:orderId", deleteOrder = "/store/order/:orderId", createUser = "/user", - createUsersWithArrayInput = "/user/createWithArray", createUsersWithListInput = "/user/createWithList", loginUser = "/user/login", logoutUser = "/user/logout", diff --git a/test/bin/expected/prettier-js.ts b/test/bin/expected/prettier-js.ts index a0c0ff3f1..1af6c687b 100644 --- a/test/bin/expected/prettier-js.ts +++ b/test/bin/expected/prettier-js.ts @@ -5,7 +5,9 @@ export interface paths { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } @@ -108,11 +153,14 @@ export interface components { name?: string } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { message?: string } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export interface operations { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/bin/expected/prettier-json.ts b/test/bin/expected/prettier-json.ts index a0c0ff3f1..1af6c687b 100644 --- a/test/bin/expected/prettier-json.ts +++ b/test/bin/expected/prettier-json.ts @@ -5,7 +5,9 @@ export interface paths { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } @@ -108,11 +153,14 @@ export interface components { name?: string } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { message?: string } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export interface operations { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/bin/expected/specs/no-response.ts b/test/bin/expected/specs/no-response.ts new file mode 100644 index 000000000..59eff7eba --- /dev/null +++ b/test/bin/expected/specs/no-response.ts @@ -0,0 +1,21 @@ +/** + * This file was auto-generated by openapi-typescript. + * Do not make direct changes to the file. + */ + +export interface paths { + "/test": { + get: { + responses: { + /** OK */ + 200: unknown; + }; + }; + }; +} + +export interface components {} + +export interface operations {} + +export interface external {} diff --git a/test/bin/expected/specs/petstore.ts b/test/bin/expected/specs/petstore.ts index 681b80868..bf0eeef6b 100644 --- a/test/bin/expected/specs/petstore.ts +++ b/test/bin/expected/specs/petstore.ts @@ -5,7 +5,9 @@ export interface paths { "/pet": { + /** Update an existing pet by Id */ put: operations["updatePet"]; + /** Add a new pet to the store */ post: operations["addPet"]; }; "/pet/findByStatus": { @@ -13,13 +15,14 @@ export interface paths { get: operations["findPetsByStatus"]; }; "/pet/findByTags": { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations["deletePet"]; }; "/pet/{petId}/uploadImage": { @@ -30,22 +33,21 @@ export interface paths { get: operations["getInventory"]; }; "/store/order": { + /** Place a new order in the store */ post: operations["placeOrder"]; }; "/store/order/{orderId}": { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations["getOrderById"]; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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": { + /** Creates list of users with given input array */ post: operations["createUsersWithListInput"]; }; "/user/login": { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number; - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number; /** Format: date-time */ shipDate?: string; /** * @description Order Status + * @example approved * @enum {string} */ status?: "placed" | "approved" | "delivered"; - /** @default false */ complete?: boolean; }; + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number; + /** @example fehguy */ + username?: string; + address?: components["schemas"]["Address"][]; + }; + Address: { + /** @example 437 Lytton */ + street?: string; + /** @example Palo Alto */ + city?: string; + /** @example CA */ + state?: string; + /** @example 94301 */ + zip?: string; + }; Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number; + /** @example Dogs */ name?: string; }; User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; + /** @example theUser */ username?: string; + /** @example John */ firstName?: string; + /** @example James */ lastName?: string; + /** @example john@email.com */ email?: string; + /** @example 12345 */ password?: string; + /** @example 12345 */ phone?: string; /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number; }; @@ -108,11 +153,14 @@ export interface components { name?: string; }; Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - category?: components["schemas"]["Category"]; /** @example doggie */ name: string; + category?: components["schemas"]["Category"]; photoUrls: string[]; tags?: components["schemas"]["Tag"][]; /** @@ -128,11 +176,34 @@ export interface components { message?: string; }; }; + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; + /** List of user object */ + UserArray: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + }; } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid ID supplied */ 400: unknown; /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid input */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ("available" | "pending" | "sold")[]; + status?: "available" | "pending" | "sold"; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid status value */ 400: unknown; }; }; - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[]; + tags?: string[]; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"]; "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; }; }; /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number; }; + query: { + /** Name of pet that needs to be updated */ + name?: string; + /** Status of pet that needs to be updated */ + status?: string; + }; }; responses: { /** Invalid input */ 405: unknown; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Updated name of the pet */ - name?: string; - /** @description Updated status of the pet */ - status?: string; - }; - }; - }; }; + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { }; }; responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown; - /** Pet not found */ - 404: unknown; }; }; uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number; }; + query: { + /** Additional Metadata */ + additionalMetadata?: string; + }; }; responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { }; requestBody: { content: { - "multipart/form-data": { - /** @description Additional data to pass to server */ - additionalMetadata?: string; - /** - * Format: binary - * @description file to upload - */ - file?: string; - }; + "application/octet-stream": string; }; }; }; @@ -302,30 +374,31 @@ export interface operations { }; }; }; + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; }; }; - /** Invalid Order */ - 400: unknown; + /** Invalid input */ + 405: unknown; }; - /** order placed for purchasing the pet */ requestBody: { content: { - "*/*": components["schemas"]["Order"]; + "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; + "application/x-www-form-urlencoded": components["schemas"]["Order"]; }; }; }; - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number; }; }; @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; }; }; /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown; }; }; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown; - }; - /** Created user object */ - requestBody: { - content: { - "*/*": components["schemas"]["User"]; + default: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; }; }; - }; - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown; - }; - /** List of user object */ + /** Created user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; + }; /** successful operation */ default: unknown; }; - /** List of user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"][]; }; }; }; @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string; + username?: string; /** The password for login in clear text */ - password: string; + password?: string; }; }; responses: { @@ -423,6 +498,7 @@ export interface operations { }; }; logoutUser: { + parameters: {}; responses: { /** successful operation */ default: unknown; @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["User"]; "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; }; }; /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string; }; }; responses: { - /** Invalid user supplied */ - 400: unknown; - /** User not found */ - 404: unknown; + /** successful operation */ + default: unknown; }; - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - "*/*": components["schemas"]["User"]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; diff --git a/test/bin/expected/stdin.ts b/test/bin/expected/stdin.ts index 681b80868..bf0eeef6b 100644 --- a/test/bin/expected/stdin.ts +++ b/test/bin/expected/stdin.ts @@ -5,7 +5,9 @@ export interface paths { "/pet": { + /** Update an existing pet by Id */ put: operations["updatePet"]; + /** Add a new pet to the store */ post: operations["addPet"]; }; "/pet/findByStatus": { @@ -13,13 +15,14 @@ export interface paths { get: operations["findPetsByStatus"]; }; "/pet/findByTags": { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations["deletePet"]; }; "/pet/{petId}/uploadImage": { @@ -30,22 +33,21 @@ export interface paths { get: operations["getInventory"]; }; "/store/order": { + /** Place a new order in the store */ post: operations["placeOrder"]; }; "/store/order/{orderId}": { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations["getOrderById"]; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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": { + /** Creates list of users with given input array */ post: operations["createUsersWithListInput"]; }; "/user/login": { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number; - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number; /** Format: date-time */ shipDate?: string; /** * @description Order Status + * @example approved * @enum {string} */ status?: "placed" | "approved" | "delivered"; - /** @default false */ complete?: boolean; }; + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number; + /** @example fehguy */ + username?: string; + address?: components["schemas"]["Address"][]; + }; + Address: { + /** @example 437 Lytton */ + street?: string; + /** @example Palo Alto */ + city?: string; + /** @example CA */ + state?: string; + /** @example 94301 */ + zip?: string; + }; Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number; + /** @example Dogs */ name?: string; }; User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; + /** @example theUser */ username?: string; + /** @example John */ firstName?: string; + /** @example James */ lastName?: string; + /** @example john@email.com */ email?: string; + /** @example 12345 */ password?: string; + /** @example 12345 */ phone?: string; /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number; }; @@ -108,11 +153,14 @@ export interface components { name?: string; }; Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - category?: components["schemas"]["Category"]; /** @example doggie */ name: string; + category?: components["schemas"]["Category"]; photoUrls: string[]; tags?: components["schemas"]["Tag"][]; /** @@ -128,11 +176,34 @@ export interface components { message?: string; }; }; + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; + /** List of user object */ + UserArray: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + }; } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid ID supplied */ 400: unknown; /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid input */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ("available" | "pending" | "sold")[]; + status?: "available" | "pending" | "sold"; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid status value */ 400: unknown; }; }; - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[]; + tags?: string[]; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"]; "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; }; }; /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number; }; + query: { + /** Name of pet that needs to be updated */ + name?: string; + /** Status of pet that needs to be updated */ + status?: string; + }; }; responses: { /** Invalid input */ 405: unknown; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Updated name of the pet */ - name?: string; - /** @description Updated status of the pet */ - status?: string; - }; - }; - }; }; + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { }; }; responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown; - /** Pet not found */ - 404: unknown; }; }; uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number; }; + query: { + /** Additional Metadata */ + additionalMetadata?: string; + }; }; responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { }; requestBody: { content: { - "multipart/form-data": { - /** @description Additional data to pass to server */ - additionalMetadata?: string; - /** - * Format: binary - * @description file to upload - */ - file?: string; - }; + "application/octet-stream": string; }; }; }; @@ -302,30 +374,31 @@ export interface operations { }; }; }; + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; }; }; - /** Invalid Order */ - 400: unknown; + /** Invalid input */ + 405: unknown; }; - /** order placed for purchasing the pet */ requestBody: { content: { - "*/*": components["schemas"]["Order"]; + "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; + "application/x-www-form-urlencoded": components["schemas"]["Order"]; }; }; }; - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number; }; }; @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; }; }; /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown; }; }; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown; - }; - /** Created user object */ - requestBody: { - content: { - "*/*": components["schemas"]["User"]; + default: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; }; }; - }; - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown; - }; - /** List of user object */ + /** Created user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; + }; /** successful operation */ default: unknown; }; - /** List of user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"][]; }; }; }; @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string; + username?: string; /** The password for login in clear text */ - password: string; + password?: string; }; }; responses: { @@ -423,6 +498,7 @@ export interface operations { }; }; logoutUser: { + parameters: {}; responses: { /** successful operation */ default: unknown; @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["User"]; "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; }; }; /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string; }; }; responses: { - /** Invalid user supplied */ - 400: unknown; - /** User not found */ - 404: unknown; + /** successful operation */ + default: unknown; }; - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - "*/*": components["schemas"]["User"]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; diff --git a/test/bin/expected/stdout.ts b/test/bin/expected/stdout.ts index 681b80868..bf0eeef6b 100644 --- a/test/bin/expected/stdout.ts +++ b/test/bin/expected/stdout.ts @@ -5,7 +5,9 @@ export interface paths { "/pet": { + /** Update an existing pet by Id */ put: operations["updatePet"]; + /** Add a new pet to the store */ post: operations["addPet"]; }; "/pet/findByStatus": { @@ -13,13 +15,14 @@ export interface paths { get: operations["findPetsByStatus"]; }; "/pet/findByTags": { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations["deletePet"]; }; "/pet/{petId}/uploadImage": { @@ -30,22 +33,21 @@ export interface paths { get: operations["getInventory"]; }; "/store/order": { + /** Place a new order in the store */ post: operations["placeOrder"]; }; "/store/order/{orderId}": { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations["getOrderById"]; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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": { + /** Creates list of users with given input array */ post: operations["createUsersWithListInput"]; }; "/user/login": { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number; - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number; /** Format: date-time */ shipDate?: string; /** * @description Order Status + * @example approved * @enum {string} */ status?: "placed" | "approved" | "delivered"; - /** @default false */ complete?: boolean; }; + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number; + /** @example fehguy */ + username?: string; + address?: components["schemas"]["Address"][]; + }; + Address: { + /** @example 437 Lytton */ + street?: string; + /** @example Palo Alto */ + city?: string; + /** @example CA */ + state?: string; + /** @example 94301 */ + zip?: string; + }; Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number; + /** @example Dogs */ name?: string; }; User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; + /** @example theUser */ username?: string; + /** @example John */ firstName?: string; + /** @example James */ lastName?: string; + /** @example john@email.com */ email?: string; + /** @example 12345 */ password?: string; + /** @example 12345 */ phone?: string; /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number; }; @@ -108,11 +153,14 @@ export interface components { name?: string; }; Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number; - category?: components["schemas"]["Category"]; /** @example doggie */ name: string; + category?: components["schemas"]["Category"]; photoUrls: string[]; tags?: components["schemas"]["Tag"][]; /** @@ -128,11 +176,34 @@ export interface components { message?: string; }; }; + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; + /** List of user object */ + UserArray: { + content: { + "application/json": components["schemas"]["User"][]; + }; + }; + }; } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid ID supplied */ 400: unknown; /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; + }; + }; /** Invalid input */ 405: unknown; }; - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { "application/json": components["schemas"]["Pet"]; "application/xml": components["schemas"]["Pet"]; + "application/x-www-form-urlencoded": components["schemas"]["Pet"]; }; }; }; @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ("available" | "pending" | "sold")[]; + status?: "available" | "pending" | "sold"; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid status value */ 400: unknown; }; }; - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[]; + tags?: string[]; }; }; responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"][]; "application/json": components["schemas"]["Pet"][]; + "application/xml": components["schemas"]["Pet"][]; }; }; /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Pet"]; "application/json": components["schemas"]["Pet"]; + "application/xml": components["schemas"]["Pet"]; }; }; /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number; }; + query: { + /** Name of pet that needs to be updated */ + name?: string; + /** Status of pet that needs to be updated */ + status?: string; + }; }; responses: { /** Invalid input */ 405: unknown; }; - requestBody: { - content: { - "application/x-www-form-urlencoded": { - /** @description Updated name of the pet */ - name?: string; - /** @description Updated status of the pet */ - status?: string; - }; - }; - }; }; + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { }; }; responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown; - /** Pet not found */ - 404: unknown; }; }; uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number; }; + query: { + /** Additional Metadata */ + additionalMetadata?: string; + }; }; responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { }; requestBody: { content: { - "multipart/form-data": { - /** @description Additional data to pass to server */ - additionalMetadata?: string; - /** - * Format: binary - * @description file to upload - */ - file?: string; - }; + "application/octet-stream": string; }; }; }; @@ -302,30 +374,31 @@ export interface operations { }; }; }; + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; }; }; - /** Invalid Order */ - 400: unknown; + /** Invalid input */ + 405: unknown; }; - /** order placed for purchasing the pet */ requestBody: { content: { - "*/*": components["schemas"]["Order"]; + "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; + "application/x-www-form-urlencoded": components["schemas"]["Order"]; }; }; }; - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number; }; }; @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["Order"]; "application/json": components["schemas"]["Order"]; + "application/xml": components["schemas"]["Order"]; }; }; /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown; }; }; - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown; - }; - /** Created user object */ - requestBody: { - content: { - "*/*": components["schemas"]["User"]; + default: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; }; }; - }; - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown; - }; - /** List of user object */ + /** Created user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + }; + }; /** successful operation */ default: unknown; }; - /** List of user object */ requestBody: { content: { - "*/*": components["schemas"]["User"][]; + "application/json": components["schemas"]["User"][]; }; }; }; @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string; + username?: string; /** The password for login in clear text */ - password: string; + password?: string; }; }; responses: { @@ -423,6 +498,7 @@ export interface operations { }; }; logoutUser: { + parameters: {}; responses: { /** successful operation */ default: unknown; @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - "application/xml": components["schemas"]["User"]; "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; }; }; /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string; }; }; responses: { - /** Invalid user supplied */ - 400: unknown; - /** User not found */ - 404: unknown; + /** successful operation */ + default: unknown; }; - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - "*/*": components["schemas"]["User"]; + "application/json": components["schemas"]["User"]; + "application/xml": components["schemas"]["User"]; + "application/x-www-form-urlencoded": components["schemas"]["User"]; }; }; }; diff --git a/test/bin/specs/petstore.yaml b/test/bin/specs/petstore.yaml index 3998f5dc4..070830d8d 100644 --- a/test/bin/specs/petstore.yaml +++ b/test/bin/specs/petstore.yaml @@ -1,23 +1,29 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: - title: Swagger Petstore - description: - "This is a sample server Petstore server. You can find out more about Swagger - at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For - this sample, you can use the api key `special-key` to test the authorization filters." + title: Swagger Petstore - OpenAPI 3.0 + description: |- + This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about + Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach! + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in OAS3. + + _If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_ + + Some useful links: + - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) + - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml) termsOfService: http://swagger.io/terms/ contact: email: apiteam@swagger.io license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - version: 1.0.0 + version: 1.0.11 externalDocs: description: Find out more about Swagger url: http://swagger.io servers: - - url: https://petstore.swagger.io/v2 - - url: http://petstore.swagger.io/v2 + - url: https://petstore3.swagger.io/api/v3 tags: - name: pet description: Everything about your Pets @@ -26,67 +32,87 @@ tags: url: http://swagger.io - name: store description: Access to Petstore orders - - name: user - description: Operations about user externalDocs: description: Find out more about our store url: http://swagger.io + - name: user + description: Operations about user paths: /pet: put: tags: - pet summary: Update an existing pet + description: Update an existing pet by Id operationId: updatePet requestBody: - description: Pet object that needs to be added to the store + description: Update an existent pet in the store content: application/json: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' application/xml: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' required: true responses: - 400: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Pet not found - content: {} - 405: + '405': description: Validation exception - content: {} security: - petstore_auth: - write:pets - read:pets - x-codegen-request-body-name: body post: tags: - pet summary: Add a new pet to the store + description: Add a new pet to the store operationId: addPet requestBody: - description: Pet object that needs to be added to the store + description: Create a new pet in the store content: application/json: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' application/xml: schema: - $ref: "#/components/schemas/Pet" + $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' required: true responses: - 405: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '405': description: Invalid input - content: {} security: - petstore_auth: - write:pets - read:pets - x-codegen-request-body-name: body /pet/findByStatus: get: tags: @@ -98,35 +124,31 @@ paths: - name: status in: query description: Status values that need to be considered for filter - required: true - style: form + required: false explode: true schema: - type: array - items: - type: string - default: available - enum: - - available - - pending - - sold + type: string + default: available + enum: + - available + - pending + - sold responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: type: array items: - $ref: "#/components/schemas/Pet" - application/json: + $ref: '#/components/schemas/Pet' + application/xml: schema: type: array items: - $ref: "#/components/schemas/Pet" - 400: + $ref: '#/components/schemas/Pet' + '400': description: Invalid status value - content: {} security: - petstore_auth: - write:pets @@ -136,39 +158,34 @@ paths: tags: - pet summary: Finds Pets by tags - description: - Muliple tags can be provided with comma separated strings. Use tag1, - tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - name: tags in: query description: Tags to filter by - required: true - style: form + required: false explode: true schema: type: array items: type: string responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: type: array items: - $ref: "#/components/schemas/Pet" - application/json: + $ref: '#/components/schemas/Pet' + application/xml: schema: type: array items: - $ref: "#/components/schemas/Pet" - 400: + $ref: '#/components/schemas/Pet' + '400': description: Invalid tag value - content: {} - deprecated: true security: - petstore_auth: - write:pets @@ -189,27 +206,29 @@ paths: type: integer format: int64 responses: - 200: + '200': description: successful operation content: - application/xml: - schema: - $ref: "#/components/schemas/Pet" application/json: schema: - $ref: "#/components/schemas/Pet" - 400: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Pet not found - content: {} security: - api_key: [] + - petstore_auth: + - write:pets + - read:pets post: tags: - pet summary: Updates a pet in the store with form data + description: '' operationId: updatePetWithForm parameters: - name: petId @@ -219,21 +238,19 @@ paths: schema: type: integer format: int64 - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - type: string - description: Updated name of the pet - status: - type: string - description: Updated status of the pet + - name: name + in: query + description: Name of pet that needs to be updated + schema: + type: string + - name: status + in: query + description: Status of pet that needs to be updated + schema: + type: string responses: - 405: + '405': description: Invalid input - content: {} security: - petstore_auth: - write:pets @@ -242,10 +259,13 @@ paths: tags: - pet summary: Deletes a pet + description: delete a pet operationId: deletePet parameters: - name: api_key in: header + description: '' + required: false schema: type: string - name: petId @@ -256,12 +276,8 @@ paths: type: integer format: int64 responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} + '400': + description: Invalid pet value security: - petstore_auth: - write:pets @@ -271,6 +287,7 @@ paths: tags: - pet summary: uploads an image + description: '' operationId: uploadFile parameters: - name: petId @@ -280,25 +297,25 @@ paths: schema: type: integer format: int64 + - name: additionalMetadata + in: query + description: Additional Metadata + required: false + schema: + type: string requestBody: content: - multipart/form-data: + application/octet-stream: schema: - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary + type: string + format: binary responses: - 200: + '200': description: successful operation content: application/json: schema: - $ref: "#/components/schemas/ApiResponse" + $ref: '#/components/schemas/ApiResponse' security: - petstore_auth: - write:pets @@ -311,7 +328,7 @@ paths: description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + '200': description: successful operation content: application/json: @@ -327,70 +344,62 @@ paths: tags: - store summary: Place an order for a pet + description: Place a new order in the store operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: - "*/*": + application/json: schema: - $ref: "#/components/schemas/Order" - required: true + $ref: '#/components/schemas/Order' + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Order' responses: - 200: + '200': description: successful operation content: - application/xml: - schema: - $ref: "#/components/schemas/Order" application/json: schema: - $ref: "#/components/schemas/Order" - 400: - description: Invalid Order - content: {} - x-codegen-request-body-name: body + $ref: '#/components/schemas/Order' + '405': + description: Invalid input /store/order/{orderId}: get: tags: - store summary: Find purchase order by ID - description: - For valid response try integer IDs with value >= 1 and <= 10. Other - values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. operationId: getOrderById parameters: - name: orderId in: path - description: ID of pet that needs to be fetched + description: ID of order that needs to be fetched required: true schema: - maximum: 10.0 - minimum: 1.0 type: integer format: int64 responses: - 200: + '200': description: successful operation content: - application/xml: - schema: - $ref: "#/components/schemas/Order" application/json: schema: - $ref: "#/components/schemas/Order" - 400: + $ref: '#/components/schemas/Order' + application/xml: + schema: + $ref: '#/components/schemas/Order' + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Order not found - content: {} delete: tags: - store summary: Delete purchase order by ID - description: - For valid response try integer IDs with positive integer value. Negative - or non-integer values will generate API errors + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - name: orderId @@ -398,16 +407,13 @@ paths: description: ID of the order that needs to be deleted required: true schema: - minimum: 1.0 type: integer format: int64 responses: - 400: + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Order not found - content: {} /user: post: tags: @@ -418,76 +424,73 @@ paths: requestBody: description: Created user object content: - "*/*": + application/json: schema: - $ref: "#/components/schemas/User" - required: true - responses: - default: - description: successful operation - content: {} - x-codegen-request-body-name: body - /user/createWithArray: - post: - tags: - - user - summary: Creates list of users with given input array - operationId: createUsersWithArrayInput - requestBody: - description: List of user object - content: - "*/*": + $ref: '#/components/schemas/User' + application/xml: schema: - type: array - items: - $ref: "#/components/schemas/User" - required: true + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' responses: default: description: successful operation - content: {} - x-codegen-request-body-name: body + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' /user/createWithList: post: tags: - user summary: Creates list of users with given input array + description: Creates list of users with given input array operationId: createUsersWithListInput requestBody: - description: List of user object content: - "*/*": + application/json: schema: type: array items: - $ref: "#/components/schemas/User" - required: true + $ref: '#/components/schemas/User' responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' default: description: successful operation - content: {} - x-codegen-request-body-name: body /user/login: get: tags: - user summary: Logs user into the system + description: '' operationId: loginUser parameters: - name: username in: query description: The user name for login - required: true + required: false schema: type: string - name: password in: query description: The password for login in clear text - required: true + required: false schema: type: string responses: - 200: + '200': description: successful operation headers: X-Rate-Limit: @@ -507,76 +510,75 @@ paths: application/json: schema: type: string - 400: + '400': description: Invalid username/password supplied - content: {} /user/logout: get: tags: - user summary: Logs out current logged in user session + description: '' operationId: logoutUser + parameters: [] responses: default: description: successful operation - content: {} /user/{username}: get: tags: - user summary: Get user by user name + description: '' operationId: getUserByName parameters: - name: username in: path - description: "The name that needs to be fetched. Use user1 for testing. " + description: 'The name that needs to be fetched. Use user1 for testing. ' required: true schema: type: string responses: - 200: + '200': description: successful operation content: - application/xml: - schema: - $ref: "#/components/schemas/User" application/json: schema: - $ref: "#/components/schemas/User" - 400: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + '400': description: Invalid username supplied - content: {} - 404: + '404': description: User not found - content: {} put: tags: - user - summary: Updated user + summary: Update user description: This can only be done by the logged in user. operationId: updateUser parameters: - name: username in: path - description: name that need to be updated + description: name that need to be deleted required: true schema: type: string requestBody: - description: Updated user object + description: Update an existent user in the store content: - "*/*": + application/json: schema: - $ref: "#/components/schemas/User" - required: true + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' responses: - 400: - description: Invalid user supplied - content: {} - 404: - description: User not found - content: {} - x-codegen-request-body-name: body + default: + description: successful operation delete: tags: - user @@ -591,12 +593,10 @@ paths: schema: type: string responses: - 400: + '400': description: Invalid username supplied - content: {} - 404: + '404': description: User not found - content: {} components: schemas: Order: @@ -605,61 +605,110 @@ components: id: type: integer format: int64 + example: 10 petId: type: integer format: int64 + example: 198772 quantity: type: integer format: int32 + example: 7 shipDate: type: string format: date-time status: type: string description: Order Status + example: approved enum: - placed - approved - delivered complete: type: boolean - default: false xml: - name: Order + name: order + Customer: + type: object + properties: + id: + type: integer + format: int64 + example: 100000 + username: + type: string + example: fehguy + address: + type: array + xml: + name: addresses + wrapped: true + items: + $ref: '#/components/schemas/Address' + xml: + name: customer + Address: + type: object + properties: + street: + type: string + example: 437 Lytton + city: + type: string + example: Palo Alto + state: + type: string + example: CA + zip: + type: string + example: '94301' + xml: + name: address Category: type: object properties: id: type: integer format: int64 + example: 1 name: type: string + example: Dogs xml: - name: Category + name: category User: type: object properties: id: type: integer format: int64 + example: 10 username: type: string + example: theUser firstName: type: string + example: John lastName: type: string + example: James email: type: string + example: john@email.com password: type: string + example: '12345' phone: type: string + example: '12345' userStatus: type: integer description: User Status format: int32 + example: 1 xml: - name: User + name: user Tag: type: object properties: @@ -669,7 +718,7 @@ components: name: type: string xml: - name: Tag + name: tag Pet: required: - name @@ -679,25 +728,26 @@ components: id: type: integer format: int64 - category: - $ref: "#/components/schemas/Category" + example: 10 name: type: string example: doggie + category: + $ref: '#/components/schemas/Category' photoUrls: type: array xml: - name: photoUrl wrapped: true items: type: string + xml: + name: photoUrl tags: type: array xml: - name: tag wrapped: true items: - $ref: "#/components/schemas/Tag" + $ref: '#/components/schemas/Tag' status: type: string description: pet status in the store @@ -706,7 +756,7 @@ components: - pending - sold xml: - name: Pet + name: pet ApiResponse: type: object properties: @@ -717,12 +767,32 @@ components: type: string message: type: string + xml: + name: '##default' + requestBodies: + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' securitySchemes: petstore_auth: type: oauth2 flows: implicit: - authorizationUrl: http://petstore.swagger.io/oauth/dialog + authorizationUrl: https://petstore3.swagger.io/oauth/authorize scopes: write:pets: modify pets in your account read:pets: read your pets diff --git a/test/v2/specs/stripe.yaml b/test/v2/specs/stripe.yaml index 85fd8cb56..ebb4ac64e 100644 --- a/test/v2/specs/stripe.yaml +++ b/test/v2/specs/stripe.yaml @@ -43419,4 +43419,4 @@ produces: - application/json schemes: - https -swagger: '2.0' \ No newline at end of file +swagger: '2.0' diff --git a/test/v3/expected/github.additional.ts b/test/v3/expected/github.additional.ts index b66a28272..3c6888208 100644 --- a/test/v3/expected/github.additional.ts +++ b/test/v3/expected/github.additional.ts @@ -8,29 +8,146 @@ export interface paths { /** Get Hypermedia links to resources accessible in GitHub's REST API */ get: operations['meta/root'] } + '/admin/hooks': { + get: operations['enterprise-admin/list-global-webhooks'] + post: operations['enterprise-admin/create-global-webhook'] + } + '/admin/hooks/{hook_id}': { + get: operations['enterprise-admin/get-global-webhook'] + delete: operations['enterprise-admin/delete-global-webhook'] + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + patch: operations['enterprise-admin/update-global-webhook'] + } + '/admin/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + post: operations['enterprise-admin/ping-global-webhook'] + } + '/admin/keys': { + get: operations['enterprise-admin/list-public-keys'] + } + '/admin/keys/{key_ids}': { + delete: operations['enterprise-admin/delete-public-key'] + } + '/admin/ldap/teams/{team_id}/mapping': { + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + patch: operations['enterprise-admin/update-ldap-mapping-for-team'] + } + '/admin/ldap/teams/{team_id}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-team'] + } + '/admin/ldap/users/{username}/mapping': { + patch: operations['enterprise-admin/update-ldap-mapping-for-user'] + } + '/admin/ldap/users/{username}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-user'] + } + '/admin/organizations': { + post: operations['enterprise-admin/create-org'] + } + '/admin/organizations/{org}': { + patch: operations['enterprise-admin/update-org-name'] + } + '/admin/pre-receive-environments': { + get: operations['enterprise-admin/list-pre-receive-environments'] + post: operations['enterprise-admin/create-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}': { + get: operations['enterprise-admin/get-pre-receive-environment'] + /** + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ + */ + delete: operations['enterprise-admin/delete-pre-receive-environment'] + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + patch: operations['enterprise-admin/update-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + post: operations['enterprise-admin/start-pre-receive-environment-download'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + get: operations['enterprise-admin/get-download-status-for-pre-receive-environment'] + } + '/admin/pre-receive-hooks': { + get: operations['enterprise-admin/list-pre-receive-hooks'] + post: operations['enterprise-admin/create-pre-receive-hook'] + } + '/admin/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook'] + delete: operations['enterprise-admin/delete-pre-receive-hook'] + patch: operations['enterprise-admin/update-pre-receive-hook'] + } + '/admin/tokens': { + /** Lists personal access tokens for all users, including admin users. */ + get: operations['enterprise-admin/list-personal-access-tokens'] + } + '/admin/tokens/{token_id}': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + delete: operations['enterprise-admin/delete-personal-access-token'] + } + '/admin/users': { + /** + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. + * + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. + */ + post: operations['enterprise-admin/create-user'] + } + '/admin/users/{username}': { + /** + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. + * + * You can delete any user account except your own. + */ + delete: operations['enterprise-admin/delete-user'] + patch: operations['enterprise-admin/update-username-for-user'] + } + '/admin/users/{username}/authorizations': { + post: operations['enterprise-admin/create-impersonation-o-auth-token'] + delete: operations['enterprise-admin/delete-impersonation-o-auth-token'] + } '/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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`. */ + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] } @@ -38,7 +155,7 @@ export interface paths { /** * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/list-webhook-deliveries'] } @@ -46,7 +163,7 @@ export interface paths { /** * Returns a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-webhook-delivery'] } @@ -54,13 +171,13 @@ export interface paths { /** * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ post: operations['apps/redeliver-webhook-delivery'] } '/app/installations': { /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. */ @@ -70,13 +187,13 @@ export interface paths { /** * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ delete: operations['apps/delete-installation'] } @@ -84,37 +201,37 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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 Enterprise Server 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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"]`. + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). */ @@ -122,44 +239,44 @@ export interface paths { } '/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. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). */ delete: operations['apps/delete-authorization'] } '/applications/{client_id}/token': { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + /** 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/enterprise-server@3.6/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. */ + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ patch: operations['apps/reset-token'] } '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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'] } '/apps/{app_slug}': { /** * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ @@ -167,39 +284,39 @@ export interface paths { } '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * You can only send one of these scope keys at a time. */ @@ -212,9 +329,75 @@ export interface paths { get: operations['codes-of-conduct/get-conduct-code'] } '/emojis': { - /** Lists all the emojis available to use on GitHub. */ + /** Lists all the emojis available to use on GitHub Enterprise Server. */ get: operations['emojis/get'] } + '/enterprise/announcement': { + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + get: operations['enterprise-admin/get-announcement'] + /** Removes the global announcement banner in your enterprise. */ + delete: operations['enterprise-admin/remove-announcement'] + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + patch: operations['enterprise-admin/set-announcement'] + } + '/enterprise/settings/license': { + get: operations['enterprise-admin/get-license-information'] + } + '/enterprise/stats/all': { + get: operations['enterprise-admin/get-all-stats'] + } + '/enterprise/stats/comments': { + get: operations['enterprise-admin/get-comment-stats'] + } + '/enterprise/stats/gists': { + get: operations['enterprise-admin/get-gist-stats'] + } + '/enterprise/stats/hooks': { + get: operations['enterprise-admin/get-hooks-stats'] + } + '/enterprise/stats/issues': { + get: operations['enterprise-admin/get-issue-stats'] + } + '/enterprise/stats/milestones': { + get: operations['enterprise-admin/get-milestone-stats'] + } + '/enterprise/stats/orgs': { + get: operations['enterprise-admin/get-org-stats'] + } + '/enterprise/stats/pages': { + get: operations['enterprise-admin/get-pages-stats'] + } + '/enterprise/stats/pulls': { + get: operations['enterprise-admin/get-pull-request-stats'] + } + '/enterprise/stats/repos': { + get: operations['enterprise-admin/get-repo-stats'] + } + '/enterprise/stats/users': { + get: operations['enterprise-admin/get-user-stats'] + } + '/enterprises/{enterprise}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-enterprise'] + } + '/enterprises/{enterprise}/actions/cache/usage-policy': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy-for-enterprise'] + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + patch: operations['actions/set-actions-cache-usage-policy-for-enterprise'] + } '/enterprises/{enterprise}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. @@ -271,6 +454,25 @@ export interface paths { */ put: operations['enterprise-admin/set-allowed-actions-enterprise'] } + '/enterprises/{enterprise}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-enterprise'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-enterprise'] + } '/enterprises/{enterprise}/actions/runner-groups': { /** * Lists all self-hosted runner groups for an enterprise. @@ -472,46 +674,19 @@ export interface paths { '/enterprises/{enterprise}/secret-scanning/alerts': { /** * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ get: operations['secret-scanning/list-alerts-for-enterprise'] } - '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-actions-billing-ghe'] - } '/enterprises/{enterprise}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - get: operations['billing/get-github-advanced-security-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-packages-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * The authenticated user must be an enterprise admin. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['billing/get-shared-storage-billing-ghe'] + get: operations['billing/get-github-advanced-security-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. */ @@ -519,17 +694,17 @@ export interface paths { } '/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: + * GitHub Enterprise Server 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) + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server. * - * **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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ get: operations['activity/get-feeds'] } @@ -547,7 +722,7 @@ export interface paths { /** * 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. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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'] } @@ -558,7 +733,7 @@ export interface paths { '/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. */ + /** Allows you to update a gist's description and to update, delete, or 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': { @@ -575,12 +750,11 @@ export interface paths { } '/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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ put: operations['gists/star'] delete: operations['gists/unstar'] } @@ -588,13 +762,13 @@ export interface paths { 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). */ + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/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. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ get: operations['gitignore/get-template'] } @@ -602,7 +776,7 @@ export interface paths { /** * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ get: operations['apps/list-repos-accessible-to-installation'] } @@ -610,9 +784,9 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ delete: operations['apps/revoke-installation-access-token'] } @@ -626,7 +800,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list'] } @@ -643,60 +817,7 @@ export interface paths { /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ post: operations['markdown/render-raw'] } - '/marketplace_listing/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account'] - } - '/marketplace_listing/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans'] - } - '/marketplace_listing/plans/{plan_id}/accounts': { - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan'] - } - '/marketplace_listing/stubbed/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - '/marketplace_listing/stubbed/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans-stubbed'] - } - '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan-stubbed'] - } '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ get: operations['meta/get'] } '/networks/{owner}/{repo}/events': { @@ -705,16 +826,18 @@ export interface paths { '/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`. */ + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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}': { + /** Gets information about a notification thread. */ get: operations['activity/get-thread'] + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ 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). + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/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. */ @@ -724,10 +847,10 @@ export interface paths { * * 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. + * 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/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ delete: operations['activity/delete-thread-subscription'] } '/octocat': { @@ -736,9 +859,9 @@ export interface paths { } '/organizations': { /** - * Lists all organizations, in the order that they were created on GitHub. + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * **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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ get: operations['orgs/list'] } @@ -747,32 +870,43 @@ export interface paths { * List the custom repository roles available in this organization. In order to see custom * repository roles in an organization, the authenticated user must be an organization owner. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - get: operations['orgs/list-custom-roles'] - } - '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + get: operations['orgs/list-custom-roles'] } '/orgs/{org}': { /** * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server 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). + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-org'] + } + '/orgs/{org}/actions/cache/usage-by-repository': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-by-repo-for-org'] + } '/orgs/{org}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. @@ -838,14 +972,16 @@ export interface paths { '/orgs/{org}/actions/permissions/workflow': { /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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-default-workflow-permissions-organization'] /** * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ @@ -853,10 +989,7 @@ export interface paths { } '/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'] @@ -871,26 +1004,17 @@ export interface paths { } '/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'] @@ -905,70 +1029,43 @@ export interface paths { */ 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. + * 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. + * 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'] @@ -1171,58 +1268,37 @@ export interface paths { '/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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': { /** - * 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)." + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ get: operations['orgs/get-audit-log'] } - '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - get: operations['orgs/list-blocked-users'] - } - '/orgs/{org}/blocks/{username}': { - get: operations['orgs/check-blocked-user'] - put: operations['orgs/block-user'] - delete: operations['orgs/unblock-user'] - } '/orgs/{org}/code-scanning/alerts': { /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * * GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/list-alerts-for-org'] } - '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations['orgs/list-saml-sso-authorizations'] - } - '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations['orgs/remove-saml-sso-authorization'] - } '/orgs/{org}/dependabot/secrets': { /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-org-secrets'] @@ -1318,13 +1394,13 @@ export interface paths { '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/set-selected-repos-for-org-secret'] } '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ delete: operations['dependabot/remove-selected-repo-from-org-secret'] } '/orgs/{org}/events': { @@ -1334,22 +1410,18 @@ export interface paths { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/external-idp-group-info-for-org'] } '/orgs/{org}/external-groups': { /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/list-external-idp-groups-for-org'] } - '/orgs/{org}/failed_invitations': { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations['orgs/list-failed-invitations'] - } '/orgs/{org}/hooks': { get: operations['orgs/list-webhooks'] /** Here's how you can create a hook that posts payloads in JSON format: */ @@ -1389,14 +1461,14 @@ export interface paths { post: operations['orgs/redeliver-webhook-delivery'] } '/orgs/{org}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-org-installation'] } @@ -1404,36 +1476,6 @@ export interface paths { /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ get: operations['orgs/list-app-installations'] } - '/orgs/{org}/interaction-limits': { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-org'] - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations['interactions/set-restrictions-for-org'] - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations['interactions/remove-restrictions-for-org'] - } - '/orgs/{org}/invitations': { - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['orgs/create-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}': { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations['orgs/cancel-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}/teams': { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations['orgs/list-invitation-teams'] - } '/orgs/{org}/issues': { /** * List issues in an organization assigned to the authenticated user. @@ -1441,7 +1483,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-org'] } @@ -1461,7 +1503,7 @@ export interface paths { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -1496,114 +1538,31 @@ export interface paths { */ get: operations['migrations/get-status-for-org'] } - '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations['migrations/delete-archive-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations['migrations/unlock-repo-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - get: operations['migrations/list-repos-for-org'] - } '/orgs/{org}/outside_collaborators': { /** List all users who are outside collaborators of an organization. */ get: operations['orgs/list-outside-collaborators'] } '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ put: operations['orgs/convert-member-to-outside-collaborator'] /** Removing a user from this list will remove them from all the organization's repositories. */ delete: operations['orgs/remove-outside-collaborator'] } - '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-organization'] - } - '/orgs/{org}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-org'] } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-org'] + /** Removes any overrides for this hook at the org level for this org. */ + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-org'] + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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': { @@ -1615,7 +1574,7 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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'] @@ -1628,7 +1587,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -1639,56 +1598,23 @@ export interface paths { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ get: operations['secret-scanning/list-alerts-for-org'] } - '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-actions-billing-org'] - } '/orgs/{org}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - get: operations['billing/get-github-advanced-security-billing-org'] - } - '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-packages-billing-org'] - } - '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-shared-storage-billing-org'] - } - '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. * - * 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 total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['teams/list-idp-groups-for-org'] + get: operations['billing/get-github-advanced-security-billing-org'] } '/orgs/{org}/teams': { /** Lists all teams in an organization that are visible to the authenticated user. */ @@ -1702,7 +1628,7 @@ export interface paths { } '/orgs/{org}/teams/{team_slug}': { /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ @@ -1724,15 +1650,15 @@ export interface paths { } '/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -1740,19 +1666,19 @@ export interface paths { } '/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/). + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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}`. */ @@ -1760,15 +1686,15 @@ export interface paths { } '/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -1776,19 +1702,19 @@ export interface paths { } '/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/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ @@ -1796,13 +1722,13 @@ export interface paths { } '/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ get: operations['reactions/list-for-team-discussion-comment-in-org'] /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -1812,19 +1738,19 @@ export interface paths { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ get: operations['reactions/list-for-team-discussion-in-org'] /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -1834,32 +1760,30 @@ export interface paths { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['reactions/delete-for-team-discussion'] } '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ delete: operations['teams/unlink-external-idp-group-from-team-for-org'] /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ patch: operations['teams/link-external-idp-group-to-team-for-org'] } - '/orgs/{org}/teams/{team_slug}/invitations': { - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations['teams/list-pending-invitations-in-org'] - } '/orgs/{org}/teams/{team_slug}/members': { /** * Team members will include the members of child teams. @@ -1879,7 +1803,7 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ get: operations['teams/get-membership-for-user-in-org'] /** @@ -1887,7 +1811,7 @@ export interface paths { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -1901,7 +1825,7 @@ export interface paths { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -1947,7 +1871,7 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -1955,7 +1879,7 @@ export interface paths { */ 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)." + * 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/enterprise-server@3.6/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}`. * @@ -1969,24 +1893,6 @@ export interface paths { */ delete: operations['teams/remove-repo-in-org'] } - '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } '/orgs/{org}/teams/{team_slug}/teams': { /** * Lists the child teams of the team specified by `{team_slug}`. @@ -2049,14 +1955,6 @@ export interface paths { */ get: operations['rate-limit/get'] } - '/reactions/{reaction_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations['reactions/delete-legacy'] - } '/repos/{owner}/{repo}': { /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ get: operations['repos/get'] @@ -2067,7 +1965,7 @@ export interface paths { * 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ patch: operations['repos/update'] } '/repos/{owner}/{repo}/actions/artifacts': { @@ -2089,6 +1987,28 @@ export interface paths { */ get: operations['actions/download-artifact'] } + '/repos/{owner}/{repo}/actions/cache/usage': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage'] + } + '/repos/{owner}/{repo}/actions/cache/usage-policy': { + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy'] + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + patch: operations['actions/set-actions-cache-usage-policy'] + } '/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'] @@ -2102,12 +2022,15 @@ export interface paths { */ get: operations['actions/download-job-logs-for-workflow-run'] } + '/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun': { + /** Re-run a job and its dependent jobs in 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. */ + post: operations['actions/re-run-job-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. + * 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'] /** @@ -2119,6 +2042,24 @@ export interface paths { */ put: operations['actions/set-github-actions-permissions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/access': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations['actions/get-workflow-access-to-repository'] + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations['actions/set-workflow-access-to-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)." @@ -2137,6 +2078,24 @@ export interface paths { */ put: operations['actions/set-allowed-actions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-repository'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-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'] @@ -2242,7 +2201,7 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/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. */ @@ -2262,14 +2221,6 @@ export interface paths { /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/get-reviews-for-run'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - post: operations['actions/approve-workflow-run'] - } '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/list-workflow-run-artifacts'] @@ -2284,7 +2235,7 @@ export interface paths { get: operations['actions/get-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { @@ -2301,7 +2252,7 @@ export interface paths { 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { @@ -2325,7 +2276,7 @@ export interface paths { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ post: operations['actions/review-pending-deployments-for-run'] } @@ -2333,13 +2284,9 @@ export interface paths { /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ post: operations['actions/re-run-workflow'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-run-usage'] + '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations['actions/re-run-workflow-failed-jobs'] } '/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. */ @@ -2469,20 +2416,12 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). * * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. */ get: operations['actions/list-workflow-runs'] } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-usage'] - } '/repos/{owner}/{repo}/assignees': { /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ get: operations['issues/list-assignees'] @@ -2521,12 +2460,6 @@ export interface paths { */ delete: operations['repos/delete-autolink'] } - '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - delete: operations['repos/disable-automated-security-fixes'] - } '/repos/{owner}/{repo}/branches': { get: operations['repos/list-branches'] } @@ -2757,7 +2690,7 @@ export interface paths { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -2803,7 +2736,7 @@ export interface paths { } '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ @@ -2813,12 +2746,12 @@ export interface paths { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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}': { @@ -2839,7 +2772,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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. */ @@ -2847,16 +2780,16 @@ export interface paths { } '/repos/{owner}/{repo}/code-scanning/alerts': { /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ get: operations['code-scanning/list-alerts-for-repo'] } @@ -2949,8 +2882,7 @@ export interface paths { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -3021,33 +2953,20 @@ export interface paths { /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/get-sarif'] } - '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-in-repository-for-authenticated-user'] + '/repos/{owner}/{repo}/codeowners/errors': { /** - * Creates a codespace owned by the authenticated user in the specified repository. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/repo-machines-for-authenticated-user'] + get: operations['repos/codeowners-errors'] } '/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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. * @@ -3069,17 +2988,23 @@ export interface paths { */ get: operations['repos/check-collaborator'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} * ``` * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). * - * 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). + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. * * **Rate limits** * @@ -3094,7 +3019,7 @@ export interface paths { } '/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/). + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). * * Comments are ordered by ascending ID. */ @@ -3106,16 +3031,16 @@ export interface paths { 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). */ + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ post: operations['reactions/create-for-commit-comment'] } '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + * Delete a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ delete: operations['reactions/delete-for-commit-comment'] } @@ -3166,12 +3091,12 @@ export interface paths { /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['repos/create-commit-comment'] } '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ get: operations['repos/list-pull-requests-associated-with-commit'] } '/repos/{owner}/{repo}/commits/{ref}': { @@ -3180,9 +3105,9 @@ export interface paths { * * **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. + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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. + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/enterprise-server@3.6/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** * @@ -3252,28 +3177,11 @@ export interface paths { */ get: operations['repos/list-commit-statuses-for-ref'] } - '/repos/{owner}/{repo}/community/profile': { - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations['repos/get-community-profile-metrics'] - } '/repos/{owner}/{repo}/compare/{basehead}': { /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * The response 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/enterprise-server@3.6/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. * @@ -3319,16 +3227,21 @@ export interface paths { * 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 + * Files and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/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 + * type](https://docs.github.com/enterprise-server@3.6/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). + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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. + * API](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -3350,7 +3263,11 @@ export interface paths { * 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. */ + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ put: operations['repos/create-or-update-file-contents'] /** * Deletes a file in a repository. @@ -3360,6 +3277,8 @@ export interface paths { * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ delete: operations['repos/delete-file'] } @@ -3463,13 +3382,17 @@ export interface paths { /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ delete: operations['dependabot/delete-repo-secret'] } + '/repos/{owner}/{repo}/dependency-graph/compare/{basehead}': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations['dependency-graph/diff-range'] + } '/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 + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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 @@ -3481,7 +3404,7 @@ export interface paths { * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will * return a failure response. * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. @@ -3525,7 +3448,7 @@ export interface paths { * * 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)." + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ delete: operations['repos/delete-deployment'] } @@ -3545,7 +3468,7 @@ export interface paths { } '/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)." + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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. * @@ -3560,28 +3483,68 @@ export interface paths { } '/repos/{owner}/{repo}/environments': { /** - * Get all environments for a repository. + * Lists the 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. */ + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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 name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." * * **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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository 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}/environments/{environment_name}/deployment-branch-policies': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies'] + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations['repos/create-deployment-branch-policy'] + } + '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}': { + /** + * Gets a deployment branch policy for an environment. + * + * 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-deployment-branch-policy'] + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations['repos/update-deployment-branch-policy'] + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations['repos/delete-deployment-branch-policy'] + } '/repos/{owner}/{repo}/events': { get: operations['activity/list-repo-events'] } @@ -3590,7 +3553,7 @@ export interface paths { /** * Create a fork for the authenticated user. * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ post: operations['repos/create-fork'] } @@ -3616,7 +3579,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3651,7 +3614,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3681,7 +3644,7 @@ export interface paths { * * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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`. */ @@ -3691,7 +3654,7 @@ export interface paths { /** * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". */ get: operations['git/get-ref'] } @@ -3705,7 +3668,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. * * **Signature verification object** * @@ -3775,7 +3738,9 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. */ post: operations['git/create-tree'] } @@ -3784,10 +3749,14 @@ export interface paths { * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ get: operations['git/get-tree'] } '/repos/{owner}/{repo}/hooks': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ get: operations['repos/list-webhooks'] /** * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can @@ -3829,7 +3798,7 @@ export interface paths { post: operations['repos/redeliver-webhook-delivery'] } '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ post: operations['repos/ping-webhook'] } '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { @@ -3840,90 +3809,14 @@ export interface paths { */ post: operations['repos/test-push-webhook'] } - '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - delete: operations['migrations/cancel-import'] - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - patch: operations['migrations/update-import'] - } - '/repos/{owner}/{repo}/import/authors': { - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations['migrations/get-commit-authors'] - } - '/repos/{owner}/{repo}/import/authors/{author_id}': { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations['migrations/map-commit-author'] - } - '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - get: operations['migrations/get-large-files'] - } - '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - patch: operations['migrations/set-lfs-preference'] - } '/repos/{owner}/{repo}/installation': { /** * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] @@ -3939,13 +3832,13 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-repo'] /** * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create'] } @@ -3959,16 +3852,16 @@ export interface paths { 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). */ + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ post: operations['reactions/create-for-issue-comment'] } '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * Delete a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ delete: operations['reactions/delete-for-issue-comment'] } @@ -3980,17 +3873,17 @@ export interface paths { } '/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 + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/get'] /** Issue owners and users with push access can edit an issue. */ @@ -4005,7 +3898,7 @@ export interface paths { '/repos/{owner}/{repo}/issues/{issue_number}/comments': { /** Issue Comments are ordered by ascending ID. */ get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create-comment'] } '/repos/{owner}/{repo}/issues/{issue_number}/events': { @@ -4026,23 +3919,23 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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). */ + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ post: operations['reactions/create-for-issue'] } '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ delete: operations['reactions/delete-for-issue'] } @@ -4080,7 +3973,7 @@ export interface paths { /** * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ get: operations['licenses/get-for-repo'] } @@ -4104,17 +3997,18 @@ export interface paths { get: operations['issues/list-labels-for-milestone'] } '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ + /** Lists all notifications for the current user in the specified repository. */ 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`. */ + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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). */ + /** Updates information for a GitHub Enterprise Server 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)." */ + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ post: operations['repos/create-pages-site'] + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ delete: operations['repos/delete-pages-site'] } '/repos/{owner}/{repo}/pages/builds': { @@ -4132,20 +4026,25 @@ export interface paths { '/repos/{owner}/{repo}/pages/builds/{build_id}': { get: operations['repos/get-pages-build'] } - '/repos/{owner}/{repo}/pages/health': { + '/repos/{owner}/{repo}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-repo'] + } + '/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-repo'] /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * Deletes any overridden enforcement on this repository for the specified hook. * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + * Responds with effective values inherited from owner and/or global level. */ - get: operations['repos/get-pages-health-check'] + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-repo'] + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-repo'] } '/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. */ + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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': { @@ -4156,9 +4055,7 @@ export interface paths { * * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ post: operations['pulls/create'] } @@ -4175,16 +4072,16 @@ export interface paths { 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). */ + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ post: operations['reactions/create-for-pull-request-review-comment'] } '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ delete: operations['reactions/delete-for-pull-request-comment'] } @@ -4194,9 +4091,9 @@ export interface paths { * * 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)". + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Server 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: * @@ -4204,7 +4101,7 @@ export interface paths { * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ get: operations['pulls/get'] /** @@ -4214,25 +4111,17 @@ export interface paths { */ patch: operations['pulls/update'] } - '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-pr-for-authenticated-user'] - } '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ get: operations['pulls/list-review-comments'] /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * 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/enterprise-server@3.6/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. + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-review-comment'] } @@ -4240,12 +4129,12 @@ export interface paths { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-reply-for-review-comment'] } '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ get: operations['pulls/list-commits'] } '/repos/{owner}/{repo}/pulls/{pull_number}/files': { @@ -4254,12 +4143,13 @@ export interface paths { } '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ put: operations['pulls/merge'] } '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/request-reviewers'] delete: operations['pulls/remove-requested-reviewers'] } @@ -4267,11 +4157,11 @@ export interface paths { /** The list of reviews returns in chronological order. */ get: operations['pulls/list-reviews'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." * - * **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. + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. */ @@ -4288,10 +4178,11 @@ export interface paths { 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. */ + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ post: operations['pulls/submit-review'] } '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { @@ -4302,7 +4193,7 @@ export interface paths { /** * 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. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme'] } @@ -4310,13 +4201,13 @@ export interface paths { /** * Gets the README from a repository directory. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme-in-directory'] } '/repos/{owner}/{repo}/releases': { /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * 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/enterprise-server@3.6/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. */ @@ -4324,19 +4215,19 @@ export interface paths { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-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. */ + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ get: operations['repos/get-release-asset'] delete: operations['repos/delete-release-asset'] /** Users with push access to the repository can edit a release asset. */ patch: operations['repos/update-release-asset'] } '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ post: operations['repos/generate-release-notes'] } '/repos/{owner}/{repo}/releases/latest': { @@ -4352,7 +4243,7 @@ export interface paths { 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). */ + /** **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/enterprise-server@3.6/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'] @@ -4362,8 +4253,8 @@ export interface paths { '/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. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * @@ -4371,25 +4262,41 @@ export interface paths { * * `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, + * GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, * you'll still need to pass your authentication to be able to upload an asset. * * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. * * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ post: operations['repos/upload-release-asset'] } '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + get: operations['reactions/list-for-release'] + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ post: operations['reactions/create-for-release'] } + '/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + delete: operations['reactions/delete-for-release'] + } + '/repos/{owner}/{repo}/replicas/caches': { + /** Lists the status of each repository cache replica. */ + get: operations['repos/list-cache-info'] + } '/repos/{owner}/{repo}/secret-scanning/alerts': { /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4397,13 +4304,17 @@ export interface paths { } '/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. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` 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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -4411,7 +4322,9 @@ export interface paths { } '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4421,7 +4334,7 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-stargazers-for-repo'] } @@ -4478,14 +4391,34 @@ export interface paths { } '/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. */ + /** 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/enterprise-server@3.6/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). */ + /** 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/enterprise-server@3.6/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}/tags/protection': { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations['repos/list-tag-protection'] + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations['repos/create-tag-protection'] + } + '/repos/{owner}/{repo}/tags/protection/{tag_protection_id}': { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations['repos/delete-tag-protection'] + } '/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 @@ -4502,50 +4435,27 @@ export interface paths { get: operations['repos/get-all-topics'] put: operations['repos/replace-all-topics'] } - '/repos/{owner}/{repo}/traffic/clones': { - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-clones'] - } - '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations['repos/get-top-paths'] - } - '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - get: operations['repos/get-top-referrers'] - } - '/repos/{owner}/{repo}/traffic/views': { - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-views'] - } '/repos/{owner}/{repo}/transfer': { /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ post: operations['repos/transfer'] } - '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - delete: operations['repos/disable-vulnerability-alerts'] - } '/repos/{owner}/{repo}/zipball/{ref}': { /** * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ 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`. + * 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. If the repository is not public, 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/enterprise-server@3.6/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: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -4558,7 +4468,7 @@ export interface paths { * * Note: * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ get: operations['repos/list-public'] } @@ -4688,20 +4598,20 @@ export interface paths { * * 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 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 Enterprise Server. 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: + * 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 Enterprise Server 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 is granted access by the IdP and is not a member of the GitHub Enterprise Server 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. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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. + * 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ get: operations['enterprise-admin/list-provisioned-identities-enterprise'] /** @@ -4750,65 +4660,11 @@ export interface paths { */ 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). + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4829,10 +4685,10 @@ export interface paths { } '/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). + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * metadata](https://docs.github.com/enterprise-server@3.6/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: * @@ -4842,10 +4698,10 @@ export interface paths { } '/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). + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. * @@ -4859,9 +4715,9 @@ export interface paths { } '/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). + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4873,9 +4729,9 @@ export interface paths { } '/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). + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4887,9 +4743,9 @@ export interface paths { } '/search/topics': { /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * 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/enterprise-server@3.6/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: * @@ -4901,9 +4757,9 @@ export interface paths { } '/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). + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * * For example, if you're looking for a list of popular users, you might try this query: * @@ -4913,11 +4769,85 @@ export interface paths { */ get: operations['search/users'] } + '/setup/api/configcheck': { + /** + * This endpoint allows you to check the status of the most recent configuration process: + * + * Note that you may need to wait several seconds after you start a process before you can check its status. + * + * The different statuses are: + * + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | + */ + get: operations['enterprise-admin/get-configuration-status'] + } + '/setup/api/configure': { + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + post: operations['enterprise-admin/start-configuration-process'] + } + '/setup/api/maintenance': { + /** Check your installation's maintenance status: */ + get: operations['enterprise-admin/get-maintenance-status'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/enable-or-disable-maintenance-mode'] + } + '/setup/api/settings': { + /** + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). + * + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + get: operations['enterprise-admin/get-settings'] + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + * + * **Notes:** + * + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + */ + put: operations['enterprise-admin/set-settings'] + } + '/setup/api/settings/authorized-keys': { + get: operations['enterprise-admin/get-all-authorized-ssh-keys'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/add-authorized-ssh-key'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + delete: operations['enterprise-admin/remove-authorized-ssh-key'] + } + '/setup/api/start': { + /** + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. + * + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. + * + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: + * + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/create-enterprise-server-license'] + } + '/setup/api/upgrade': { + /** + * This API upgrades your license and also triggers the configuration process. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/upgrade-license'] + } '/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * * To delete a team, the authenticated user must be an organization owner or team maintainer. * @@ -4925,7 +4855,7 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) endpoint. * * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * @@ -4935,115 +4865,107 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-legacy'] } '/teams/{team_id}/discussions/{discussion_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * **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/enterprise-server@3.6/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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * **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/enterprise-server@3.6/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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ post: operations['reactions/create-for-team-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/reactions': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ post: operations['reactions/create-for-team-discussion-legacy'] } - '/teams/{team_id}/invitations': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - get: operations['teams/list-pending-invitations-legacy'] - } '/teams/{team_id}/members': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * * Team members will include the members of child teams. */ @@ -5053,7 +4975,7 @@ export interface paths { /** * 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. + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5061,33 +4983,33 @@ export interface paths { /** * 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. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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. + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-member-legacy'] } '/teams/{team_id}/memberships/{username}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. * * Team members will include the members of child teams. * @@ -5096,17 +5018,17 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. * @@ -5114,19 +5036,19 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-membership-for-user-legacy'] } '/teams/{team_id}/projects': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * * Lists the organization projects for a team. */ @@ -5134,72 +5056,54 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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: + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. */ delete: operations['teams/remove-repo-legacy'] } - '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } '/teams/{team_id}/teams': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ get: operations['teams/list-child-legacy'] } '/user': { @@ -5212,218 +5116,6 @@ export interface paths { /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ patch: operations['users/update-authenticated'] } - '/user/blocks': { - /** List the users you've blocked on your personal account. */ - get: operations['users/list-blocked-by-authenticated-user'] - } - '/user/blocks/{username}': { - get: operations['users/check-blocked'] - put: operations['users/block'] - delete: operations['users/unblock'] - } - '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-for-authenticated-user'] - } - '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-secrets-for-authenticated-user'] - } - '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - get: operations['codespaces/get-public-key-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - patch: operations['codespaces/update-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/export-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-export-details-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/start-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/stop-for-authenticated-user'] - } - '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } '/user/emails': { /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-emails-for-authenticated-user'] @@ -5443,7 +5135,7 @@ export interface paths { '/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)." + * 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/enterprise-server@3.6/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. */ @@ -5452,22 +5144,22 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-gpg-key-for-authenticated-user'] } '/user/gpg_keys/{gpg_key_id}': { - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-gpg-key-for-authenticated-user'] } '/user/installations': { /** * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -5481,7 +5173,7 @@ export interface paths { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5491,24 +5183,16 @@ export interface paths { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ put: operations['apps/add-repo-to-installation-for-authenticated-user'] /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] } - '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - get: operations['interactions/get-restrictions-for-authenticated-user'] - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } '/user/issues': { /** * List issues across owned and member repositories assigned to the authenticated user. @@ -5516,30 +5200,22 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-public-ssh-key-for-authenticated-user'] } '/user/keys/{key_id}': { - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-public-ssh-key-for-authenticated-user'] } - '/user/marketplace_purchases': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user'] - } - '/user/marketplace_purchases/stubbed': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } '/user/memberships/orgs': { get: operations['orgs/list-memberships-for-authenticated-user'] } @@ -5553,19 +5229,6 @@ export interface paths { /** 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: @@ -5591,12 +5254,6 @@ export interface paths { * 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. */ @@ -5612,85 +5269,12 @@ export interface paths { */ get: operations['orgs/list-for-authenticated-user'] } - '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}': { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-version-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-version-for-authenticated-user'] - } '/user/projects': { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. 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-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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-public-emails-for-authenticated-user'] } '/user/repos': { @@ -5705,7 +5289,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -5724,13 +5308,13 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 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)." */ + /** 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/enterprise-server@3.6/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'] } @@ -5739,14 +5323,14 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/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. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ get: operations['users/list'] } @@ -5754,11 +5338,11 @@ export interface paths { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ get: operations['users/get-by-username'] } @@ -5809,7 +5393,7 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-user-installation'] } @@ -5821,90 +5405,10 @@ export interface paths { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ get: operations['orgs/list-for-user'] } - '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-user'] - } '/users/{username}/projects': { get: operations['projects/list-for-user'] } @@ -5919,41 +5423,17 @@ export interface paths { /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ get: operations['repos/list-for-user'] } - '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-actions-billing-user'] - } - '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-packages-billing-user'] - } - '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-shared-storage-billing-user'] + '/users/{username}/site_admin': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['enterprise-admin/promote-user-to-be-site-administrator'] + /** You can demote any user account except your own. */ + delete: operations['enterprise-admin/demote-site-administrator'] } '/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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-repos-starred-by-user'] } @@ -5961,6 +5441,18 @@ export interface paths { /** Lists repositories a user is watching. */ get: operations['activity/list-repos-watched-by-user'] } + '/users/{username}/suspended': { + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['enterprise-admin/suspend-user'] + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + delete: operations['enterprise-admin/unsuspend-user'] + } '/zen': { /** Get a random sentence from the Zen of GitHub */ get: operations['meta/get-zen'] @@ -5969,6 +5461,349 @@ export interface paths { export interface components { schemas: { + root: { + /** Format: uri-template */ + current_user_url: string + /** Format: uri-template */ + current_user_authorizations_html_url: string + /** Format: uri-template */ + authorizations_url: string + /** Format: uri-template */ + code_search_url: string + /** Format: uri-template */ + commit_search_url: string + /** Format: uri-template */ + emails_url: string + /** Format: uri-template */ + emojis_url: string + /** Format: uri-template */ + events_url: string + /** Format: uri-template */ + feeds_url: string + /** Format: uri-template */ + followers_url: string + /** Format: uri-template */ + following_url: string + /** Format: uri-template */ + gists_url: string + /** Format: uri-template */ + hub_url: string + /** Format: uri-template */ + issue_search_url: string + /** Format: uri-template */ + issues_url: string + /** Format: uri-template */ + keys_url: string + /** Format: uri-template */ + label_search_url: string + /** Format: uri-template */ + notifications_url: string + /** Format: uri-template */ + organization_url: string + /** Format: uri-template */ + organization_repositories_url: string + /** Format: uri-template */ + organization_teams_url: string + /** Format: uri-template */ + public_gists_url: string + /** Format: uri-template */ + rate_limit_url: string + /** Format: uri-template */ + repository_url: string + /** Format: uri-template */ + repository_search_url: string + /** Format: uri-template */ + current_user_repositories_url: string + /** Format: uri-template */ + starred_url: string + /** Format: uri-template */ + starred_gists_url: string + /** Format: uri-template */ + topic_search_url?: string + /** Format: uri-template */ + user_url: string + /** Format: uri-template */ + user_organizations_url: string + /** Format: uri-template */ + user_repositories_url: string + /** Format: uri-template */ + user_search_url: string + } & { [key: string]: unknown } + 'global-hook': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + secret?: string + } & { [key: string]: unknown } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } & { [key: string]: unknown } + 'global-hook-2': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + } & { [key: string]: unknown } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } & { [key: string]: unknown } + 'public-key-full': { + id: number + key: string + user_id: number | null + repository_id: number | null + url: string + title: string + read_only: boolean + verified: boolean + /** Format: date-time */ + created_at: string + } & { + last_used: unknown + } & { [key: string]: unknown } + 'ldap-mapping-team': { + ldap_dn?: string + 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?: unknown | null + } & { [key: string]: unknown } + /** + * Ldap Private User + * @description Ldap Private User + */ + 'ldap-mapping-user': { + ldap_dn?: string + /** @example octocat */ + login: string + /** @example 1 */ + id: number + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** @example User */ + type: string + site_admin: boolean + /** @example monalisa octocat */ + name: string | null + /** @example GitHub */ + company: string | null + /** @example https://github.com/blog */ + blog: string | null + /** @example San Francisco */ + location: string | null + /** + * Format: email + * @example octocat@github.com + */ + email: string | null + hireable: boolean | null + /** @example There once was... */ + bio: string | null + /** @example monalisa */ + twitter_username?: string | null + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string + /** @example 81 */ + private_gists: number + /** @example 100 */ + total_private_repos: number + /** @example 100 */ + owned_private_repos: number + /** @example 10000 */ + disk_usage: number + /** @example 8 */ + collaborators: number + /** @example true */ + two_factor_authentication: boolean + plan?: { + collaborators: number + name: string + space: number + private_repos: number + } & { [key: string]: unknown } + /** Format: date-time */ + suspended_at?: string | null + business_plus?: boolean + } & { [key: string]: unknown } + /** + * Organization Simple + * @description Organization Simple + */ + 'organization-simple': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + } & { [key: string]: unknown } + 'pre-receive-environment': { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } & { [key: string]: unknown } + } & { [key: string]: unknown } + 'pre-receive-environment-download-status': { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } & { [key: string]: unknown } + 'pre-receive-hook': { + id?: number + name?: string + enforcement?: string + script?: string + script_repository?: { + id?: number + full_name?: string + url?: string + html_url?: string + } & { [key: string]: unknown } + environment?: { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } & { [key: string]: unknown } + } & { [key: string]: unknown } + allow_downstream_configuration?: boolean + } & { [key: string]: unknown } /** * Simple User * @description Simple User @@ -6041,178 +5876,469 @@ export interface components { } & { [key: string]: unknown }) | null /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } */ - integration: { + 'app-permissions': { /** - * @description Unique identifier of the GitHub app - * @example 37 + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} */ - id: number + actions?: 'read' | 'write' /** - * @description The slug name of the GitHub app - * @example probot-owners + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} */ - slug?: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] + administration?: 'read' | 'write' /** - * @description The name of the GitHub app - * @example Probot Owners + * @description The level of permission to grant the access token for checks on code. + * @enum {string} */ - name: string - /** @example The description of the app. */ - description: string | null + checks?: 'read' | 'write' /** - * Format: uri - * @example https://example.com + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} */ - external_url: string + contents?: 'read' | 'write' /** - * Format: uri - * @example https://github.com/apps/super-ci + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} */ - html_url: string + deployments?: 'read' | 'write' /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} */ - created_at: string + environments?: 'read' | 'write' /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} */ - updated_at: string + issues?: 'read' | 'write' /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} */ - permissions: { - issues?: string - checks?: string - metadata?: string - contents?: string - deployments?: string - } & { [key: string]: string } + metadata?: 'read' | 'write' /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} */ - events: string[] + packages?: 'read' | 'write' /** - * @description The number of installations associated with the GitHub app - * @example 5 + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} */ - installations_count?: number - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - } & { [key: string]: unknown } - /** - * Basic Error - * @description Basic Error - */ - 'basic-error': { - message?: string - documentation_url?: string - url?: string - status?: string - } & { [key: string]: unknown } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - 'validation-error-simple': { - message: string - documentation_url: string - errors?: string[] - } & { [key: string]: unknown } - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - 'webhook-config-url': string - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - 'webhook-config-content-type': string - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - 'webhook-config-secret': string - 'webhook-config-insecure-ssl': (string | number) & { [key: string]: unknown } - /** - * Webhook Configuration - * @description 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]: unknown } - /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. - */ - 'hook-delivery-item': { + pages?: 'read' | 'write' /** - * @description Unique identifier of the webhook delivery. - * @example 42 + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} */ - id: number + pull_requests?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} */ - guid: string + repository_hooks?: 'read' | 'write' /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} */ - delivered_at: string + repository_projects?: 'read' | 'write' | 'admin' /** - * @description Whether the webhook delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} */ - redelivery: boolean + secret_scanning_alerts?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} */ - duration: number + secrets?: 'read' | 'write' /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} */ - status: string + security_events?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} */ - status_code: number + single_file?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} */ - event: string + statuses?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} + */ + vulnerability_alerts?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} + */ + workflows?: 'write' + /** + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} + */ + members?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} + */ + organization_administration?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} + */ + organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: 'read' | 'write' + } & { [key: string]: unknown } + /** + * Simple User + * @description Simple User + */ + 'simple-user': { + name?: string | null + email?: string | null + /** @example octocat */ + login: string + /** @example 1 */ + id: number + /** @example MDQ6VXNlcjE= */ + node_id: string + /** + * Format: uri + * @example https://github.com/images/error/octocat_happy.gif + */ + avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null + /** + * Format: uri + * @example https://api.github.com/users/octocat + */ + url: string + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/followers + */ + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions + */ + subscriptions_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/orgs + */ + organizations_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string + /** + * Format: uri + * @example https://api.github.com/users/octocat/received_events + */ + received_events_url: string + /** @example User */ + type: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + } & { [key: string]: unknown } + /** Scoped Installation */ + 'nullable-scoped-installation': + | ({ + permissions: components['schemas']['app-permissions'] + /** + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} + */ + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** @example true */ + has_multiple_single_files?: boolean + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] + /** + * Format: uri + * @example https://api.github.com/users/octocat/repos + */ + repositories_url: string + account: components['schemas']['simple-user'] + } & { [key: string]: unknown }) + | null + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number + /** Format: uri */ + url: string + /** @description 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 + /** Format: uri */ + url: string + } & { [key: string]: unknown } + note: string | null + /** Format: uri */ + note_url: string | null + /** Format: date-time */ + updated_at: string + /** Format: date-time */ + created_at: string + fingerprint: string | null + user?: components['schemas']['nullable-simple-user'] + installation?: components['schemas']['nullable-scoped-installation'] + /** Format: date-time */ + expires_at: string | null + } & { [key: string]: unknown } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { + /** + * @description Unique identifier of the GitHub app + * @example 37 + */ + id: number + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** @example MDExOkludGVncmF0aW9uMQ== */ + node_id: string + owner: components['schemas']['nullable-simple-user'] + /** + * @description The name of the GitHub app + * @example Probot Owners + */ + name: string + /** @example The description of the app. */ + description: string | null + /** + * Format: uri + * @example https://example.com + */ + external_url: string + /** + * Format: uri + * @example https://github.com/apps/super-ci + */ + html_url: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + created_at: string + /** + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 + */ + updated_at: string + /** + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } + */ + permissions: { + issues?: string + checks?: string + metadata?: string + contents?: string + deployments?: string + } & { [key: string]: string } + /** + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] + */ + events: string[] + /** + * @description The number of installations associated with the GitHub app + * @example 5 + */ + installations_count?: number + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + } & { [key: string]: unknown } + /** + * Basic Error + * @description Basic Error + */ + 'basic-error': { + message?: string + documentation_url?: string + url?: string + status?: string + } & { [key: string]: unknown } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + 'validation-error-simple': { + message: string + documentation_url: string + errors?: string[] + } & { [key: string]: unknown } + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + 'webhook-config-url': string + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + 'webhook-config-content-type': string + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + 'webhook-config-secret': string + 'webhook-config-insecure-ssl': (string | number) & { [key: string]: unknown } + /** + * Webhook Configuration + * @description 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]: unknown } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + 'hook-delivery-item': { + /** + * @description Unique identifier of the webhook delivery. + * @example 42 + */ + id: number + /** + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + */ + guid: string + /** + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z + */ + delivered_at: string + /** + * @description Whether the webhook delivery is a redelivery. + * @example false + */ + redelivery: boolean + /** + * @description Time spent delivering. + * @example 0.03 + */ + duration: number + /** + * @description Describes the response returned after attempting the delivery. + * @example failed to connect + */ + status: string + /** + * @description Status code received when delivery was made. + * @example 502 + */ + status_code: number + /** + * @description The event that triggered the delivery. + * @example issues + */ + event: string /** * @description The type of activity for the event that triggered the delivery. * @example opened @@ -6336,75 +6462,6 @@ export interface components { payload: string | null } & { [key: string]: unknown } } & { [key: string]: unknown } - /** - * Simple User - * @description Simple User - */ - 'simple-user': { - name?: string | null - email?: string | null - /** @example octocat */ - login: string - /** @example 1 */ - id: number - /** @example MDQ6VXNlcjE= */ - node_id: string - /** - * Format: uri - * @example https://github.com/images/error/octocat_happy.gif - */ - avatar_url: string - /** @example 41d064eb2195891e12d0413f63227ea7 */ - gravatar_id: string | null - /** - * Format: uri - * @example https://api.github.com/users/octocat - */ - url: string - /** - * Format: uri - * @example https://github.com/octocat - */ - html_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/followers - */ - followers_url: string - /** @example https://api.github.com/users/octocat/following{/other_user} */ - following_url: string - /** @example https://api.github.com/users/octocat/gists{/gist_id} */ - gists_url: string - /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ - starred_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/subscriptions - */ - subscriptions_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/orgs - */ - organizations_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repos_url: string - /** @example https://api.github.com/users/octocat/events{/privacy} */ - events_url: string - /** - * Format: uri - * @example https://api.github.com/users/octocat/received_events - */ - received_events_url: string - /** @example User */ - type: string - site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - } & { [key: string]: unknown } /** * Enterprise * @description An enterprise account @@ -6453,219 +6510,57 @@ export interface components { avatar_url: string } & { [key: string]: unknown } /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } + * Installation + * @description Installation */ - 'app-permissions': { - /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} - */ - actions?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} - */ - administration?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} - */ - checks?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} - */ - contents?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} - */ - deployments?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} - */ - environments?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} - */ - issues?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} - */ - metadata?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} - */ - packages?: 'read' | 'write' + installation: { /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} + * @description The ID of the installation. + * @example 1 */ - pages?: 'read' | 'write' + id: number + account: ((components['schemas']['simple-user'] | components['schemas']['enterprise']) & { [key: string]: unknown }) | null /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. + * @description Describe whether all repositories have been selected or there's a selection involved * @enum {string} */ - pull_requests?: 'read' | 'write' + repository_selection: 'all' | 'selected' /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://api.github.com/installations/1/access_tokens */ - repository_hooks?: 'read' | 'write' + access_tokens_url: string /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * Format: uri + * @example https://api.github.com/installation/repositories */ - repository_projects?: 'read' | 'write' | 'admin' + repositories_url: string /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://github.com/organizations/github/settings/installations/1 */ - secret_scanning_alerts?: 'read' | 'write' + html_url: string + /** @example 1 */ + app_id: number + /** @description The ID of the user or organization this token is being scoped to. */ + target_id: number + /** @example Organization */ + target_type: string + permissions: components['schemas']['app-permissions'] + events: string[] + /** Format: date-time */ + created_at: string + /** Format: date-time */ + updated_at: string + /** @example config.yaml */ + single_file_name: string | null + /** @example true */ + has_multiple_single_files?: boolean /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} - */ - secrets?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} - */ - security_events?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} - */ - single_file?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} - */ - statuses?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} - */ - vulnerability_alerts?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} - */ - workflows?: 'write' - /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} - */ - members?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_administration?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_hooks?: 'read' | 'write' - /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} - */ - organization_plan?: 'read' - /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} - */ - organization_projects?: 'read' | 'write' | 'admin' - /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_packages?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_secrets?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_self_hosted_runners?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} - */ - organization_user_blocking?: 'read' | 'write' - /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} - */ - team_discussions?: 'read' | 'write' - } & { [key: string]: unknown } - /** - * Installation - * @description Installation - */ - installation: { - /** - * @description The ID of the installation. - * @example 1 - */ - id: number - account: ((components['schemas']['simple-user'] | components['schemas']['enterprise']) & { [key: string]: unknown }) | null - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** - * Format: uri - * @example https://api.github.com/installations/1/access_tokens - */ - access_tokens_url: string - /** - * Format: uri - * @example https://api.github.com/installation/repositories - */ - repositories_url: string - /** - * Format: uri - * @example https://github.com/organizations/github/settings/installations/1 - */ - html_url: string - /** @example 1 */ - app_id: number - /** @description The ID of the user or organization this token is being scoped to. */ - target_id: number - /** @example Organization */ - target_type: string - permissions: components['schemas']['app-permissions'] - events: string[] - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - /** @example config.yaml */ - single_file_name: string | null - /** @example true */ - has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] */ single_file_paths?: string[] /** @example github-actions */ @@ -6886,7 +6781,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -7066,6 +6964,41 @@ export interface components { allow_auto_merge?: boolean delete_branch_on_merge?: boolean allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' allow_merge_commit?: boolean subscribers_count?: number network_count?: number @@ -7090,6 +7023,52 @@ export interface components { * @example false */ delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether to allow merge commits for pull requests. * @default true @@ -7098,6 +7077,11 @@ export interface components { allow_merge_commit?: boolean /** @description Whether to allow forking this repo */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -7105,6 +7089,8 @@ export interface components { master_branch?: string /** @example "2020-07-09T00:17:42Z" */ starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean } & { [key: string]: unknown } /** * Installation Token @@ -7165,66 +7151,6 @@ export interface components { scopes: string[] user?: components['schemas']['nullable-simple-user'] } & { [key: string]: unknown } - /** Scoped Installation */ - 'nullable-scoped-installation': - | ({ - permissions: components['schemas']['app-permissions'] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** @example true */ - has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repositories_url: string - account: components['schemas']['simple-user'] - } & { [key: string]: unknown }) - | null - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - authorization: { - id: number - /** Format: uri */ - url: string - /** @description 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 - /** Format: uri */ - url: string - } & { [key: string]: unknown } - note: string | null - /** Format: uri */ - note_url: string | null - /** Format: date-time */ - updated_at: string - /** Format: date-time */ - created_at: string - fingerprint: string | null - user?: components['schemas']['nullable-simple-user'] - installation?: components['schemas']['nullable-scoped-installation'] - /** Format: date-time */ - expires_at: string | null - } & { [key: string]: unknown } /** * Code Of Conduct * @description Code Of Conduct @@ -7294,12 +7220,137 @@ export interface components { html_url: string | null } & { [key: string]: unknown } /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @description The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + * @example Very **important** announcement about _nothing_. + */ + 'announcement-message': string + /** + * Format: date-time + * @description The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + * @example "2021-01-01T00:00:00.000-07:00" + */ + 'announcement-expiration': string | null + /** + * Enterprise Announcement + * @description Enterprise global announcement + */ + announcement: { + announcement: components['schemas']['announcement-message'] + expires_at?: components['schemas']['announcement-expiration'] + } & { [key: string]: unknown } + 'license-info': { + seats?: (string | number) & { [key: string]: unknown } + seats_used?: number + seats_available?: (string | number) & { [key: string]: unknown } + kind?: string + days_until_expiration?: number + expire_at?: string + } & { [key: string]: unknown } + /** Repository Enterprise Stats */ + 'enterprise-repository-overview': { + total_repos: number + root_repos: number + fork_repos: number + org_repos: number + total_pushes: number + total_wikis: number + } & { [key: string]: unknown } + /** Hooks Enterprise Stats */ + 'enterprise-hook-overview': { + total_hooks: number + active_hooks: number + inactive_hooks: number + } & { [key: string]: unknown } + /** Enterprise Pages Stats */ + 'enterprise-page-overview': { + total_pages: number + } & { [key: string]: unknown } + /** Enterprise Organization Stats */ + 'enterprise-organization-overview': { + total_orgs: number + disabled_orgs: number + total_teams: number + total_team_members: number + } & { [key: string]: unknown } + /** Enterprise User Stats */ + 'enterprise-user-overview': { + total_users: number + admin_users: number + suspended_users: number + } & { [key: string]: unknown } + /** Enterprise Pull Request Stats */ + 'enterprise-pull-request-overview': { + total_pulls: number + merged_pulls: number + mergeable_pulls: number + unmergeable_pulls: number + } & { [key: string]: unknown } + /** Enterprise Issue Stats */ + 'enterprise-issue-overview': { + total_issues: number + open_issues: number + closed_issues: number + } & { [key: string]: unknown } + /** Enterprise Milestone Stats */ + 'enterprise-milestone-overview': { + total_milestones: number + open_milestones: number + closed_milestones: number + } & { [key: string]: unknown } + /** Enterprise Gist Stats */ + 'enterprise-gist-overview': { + total_gists: number + private_gists: number + public_gists: number + } & { [key: string]: unknown } + /** Enterprise Comment Stats */ + 'enterprise-comment-overview': { + total_commit_comments: number + total_gist_comments: number + total_issue_comments: number + total_pull_request_comments: number + } & { [key: string]: unknown } + 'enterprise-overview': { + repos?: components['schemas']['enterprise-repository-overview'] + hooks?: components['schemas']['enterprise-hook-overview'] + pages?: components['schemas']['enterprise-page-overview'] + orgs?: components['schemas']['enterprise-organization-overview'] + users?: components['schemas']['enterprise-user-overview'] + pulls?: components['schemas']['enterprise-pull-request-overview'] + issues?: components['schemas']['enterprise-issue-overview'] + milestones?: components['schemas']['enterprise-milestone-overview'] + gists?: components['schemas']['enterprise-gist-overview'] + comments?: components['schemas']['enterprise-comment-overview'] + } & { [key: string]: unknown } + 'actions-cache-usage-org-enterprise': { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number + } & { [key: string]: unknown } + /** + * Actions cache usage policy for an enterprise + * @description GitHub Actions cache usage policy for an enterprise. + */ + 'actions-cache-usage-policy-enterprise': { + /** + * @description For repositories in an enterprise, the default size limit for the sum of all caches in a repository, in gigabytes. + * @example 10 + */ + repo_cache_size_limit_in_gb?: number + /** + * @description For repositories in an enterprise, the maximum value that can be set as the limit for the sum of all caches in a repository, in gigabytes. + * @example 15 + */ + max_repo_cache_size_limit_in_gb?: number + } & { [key: string]: unknown } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-organizations': 'all' | 'none' | 'selected' /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @description The permissions policy that controls the actions that are allowed to run. * @enum {string} */ 'allowed-actions': 'all' | 'local_only' | 'selected' @@ -7312,52 +7363,26 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } & { [key: string]: unknown } - /** - * Organization Simple - * @description Organization Simple - */ - 'organization-simple': { - /** @example github */ - login: string - /** @example 1 */ - id: number - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** @example A great organization */ - description: string | null - } & { [key: string]: unknown } 'selected-actions': { /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed?: boolean - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed?: boolean + github_owned_allowed: boolean /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed?: string[] + patterns_allowed: string[] + } & { [key: string]: unknown } + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + 'actions-can-approve-pull-request-reviews': boolean + 'actions-get-default-workflow-permissions': { + default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + } & { [key: string]: unknown } + 'actions-set-default-workflow-permissions': { + default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] } & { [key: string]: unknown } 'runner-groups-enterprise': { id: number @@ -7367,6 +7392,18 @@ export interface components { selected_organizations_url?: string runners_url: string allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } & { [key: string]: unknown } /** * Self hosted runner label @@ -7521,6 +7558,11 @@ export interface components { * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ 'alert-created-at': string + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'nullable-alert-updated-at': string | null /** * Format: uri * @description The REST API URL of the alert resource. @@ -7532,636 +7574,260 @@ export interface components { */ 'alert-html-url': string /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. * @enum {string} */ 'secret-scanning-alert-state': 'open' | 'resolved' /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null /** - * Repository - * @description A git repository - */ - 'nullable-repository': - | ({ - /** - * @description Unique identifier of the repository - * @example 42 - */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** - * @description The name of the repository. - * @example Team Environment - */ - name: string - /** @example octocat/Hello-World */ - full_name: string - license: components['schemas']['nullable-license-simple'] - organization?: components['schemas']['nullable-simple-user'] - forks: number - permissions?: { - admin: boolean - pull: boolean - triage?: boolean - push: boolean - maintain?: boolean - } & { [key: string]: unknown } - owner: components['schemas']['simple-user'] - /** - * @description Whether the repository is private or public. - * @default false - */ - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string - /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World - */ - mirror_url: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - hooks_url: string - /** - * Format: uri - * @example https://svn.github.com/octocat/Hello-World - */ - svn_url: string - /** - * Format: uri - * @example https://github.com - */ - homepage: string | null - language: string | null - /** @example 9 */ - forks_count: number - /** @example 80 */ - stargazers_count: number - /** @example 80 */ - watchers_count: number - /** @example 108 */ - size: number - /** - * @description The default branch of the repository. - * @example master - */ - default_branch: string - /** @example 0 */ - open_issues_count: number - /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true - */ - is_template?: boolean - topics?: string[] - /** - * @description Whether issues are enabled. - * @default true - * @example true - */ - has_issues: boolean - /** - * @description Whether projects are enabled. - * @default true - * @example true - */ - has_projects: boolean - /** - * @description Whether the wiki is enabled. - * @default true - * @example true - */ - has_wiki: boolean - has_pages: boolean - /** - * @description Whether downloads are enabled. - * @default true - * @example true - */ - has_downloads: boolean - /** - * @description Whether the repository is archived. - * @default false - */ - archived: boolean - /** @description Returns whether or not this repository disabled. */ - disabled: boolean - /** - * @description The repository visibility: public, private, or internal. - * @default public - */ - visibility?: string - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at: string | null - /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - 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]: unknown } - 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 - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } & { [key: string]: unknown } - allow_rebase_merge?: boolean - temp_clone_token?: string - allow_squash_merge?: boolean - allow_auto_merge?: boolean - delete_branch_on_merge?: boolean - allow_update_branch?: boolean - allow_merge_commit?: boolean - subscribers_count?: number - network_count?: number - } & { [key: string]: unknown }) - | null - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - subscribers_count?: number - network_count?: number - open_issues: number - watchers: number - master_branch?: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - } & { [key: string]: unknown }) - | null - /** - * Minimal Repository - * @description Minimal Repository + * Simple Repository + * @description Simple Repository */ - 'minimal-repository': { - /** @example 1296269 */ + 'simple-repository': { + /** + * @description A unique identifier of the repository. + * @example 1296269 + */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ node_id: string - /** @example Hello-World */ + /** + * @description The name of the repository. + * @example Hello-World + */ name: string - /** @example octocat/Hello-World */ + /** + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World + */ full_name: string owner: components['schemas']['simple-user'] + /** @description Whether the repository is private. */ private: boolean /** * Format: uri + * @description The URL to view the repository on GitHub.com. * @example https://github.com/octocat/Hello-World */ html_url: string - /** @example This your first repo! */ + /** + * @description The repository description. + * @example This your first repo! + */ description: string | null + /** @description Whether the repository is a fork. */ fork: boolean /** * Format: uri + * @description The URL to get more information about the repository from the GitHub API. * @example https://api.github.com/repos/octocat/Hello-World */ url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ contents_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors */ contributors_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments */ deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads */ downloads_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events */ events_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks */ forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ labels_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages */ languages_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges */ merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ releases_url: string - ssh_url?: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers */ stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ statuses_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers */ subscribers_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription */ subscription_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags */ tags_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams */ teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + */ trees_url: string - clone_url?: string - mirror_url?: string | null /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks */ 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } & { [key: string]: unknown } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: - | ({ - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } & { [key: string]: unknown }) - | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number - /** @example 0 */ - watchers?: number - allow_forking?: boolean } & { [key: string]: unknown } 'organization-secret-scanning-alert': { number?: components['schemas']['alert-number'] created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['nullable-alert-updated-at'] url?: components['schemas']['alert-url'] html_url?: components['schemas']['alert-html-url'] /** @@ -8179,25 +7845,22 @@ export interface components { resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string /** @description The secret that was detected. */ secret?: string - repository?: components['schemas']['minimal-repository'] - } & { [key: string]: unknown } - 'actions-billing-usage': { - /** @description The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number - /** @description The amount of free GitHub Actions minutes available. */ - included_minutes: number - minutes_used_breakdown: { - /** @description Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number - /** @description Total minutes used on macOS runner machines. */ - MACOS?: number - /** @description Total minutes used on Windows runner machines. */ - WINDOWS?: number - } & { [key: string]: unknown } + repository?: components['schemas']['simple-repository'] + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null } & { [key: string]: unknown } 'advanced-security-active-committers-user': { user_login: string @@ -8214,24 +7877,10 @@ export interface components { 'advanced-security-active-committers': { /** @example 25 */ total_advanced_security_committers?: number + /** @example 2 */ + total_count?: number repositories: components['schemas']['advanced-security-active-committers-repository'][] } & { [key: string]: unknown } - 'packages-billing-usage': { - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number - /** @description Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number - } & { [key: string]: unknown } - 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number - } & { [key: string]: unknown } /** * Actor * @description Actor @@ -8406,7 +8055,7 @@ export interface components { * @example OWNER * @enum {string} */ - author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + 'author-association': 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' /** Reaction Rollup */ 'reaction-rollup': { /** Format: uri */ @@ -8453,6 +8102,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -8517,7 +8172,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown } /** @@ -8559,7 +8214,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown } @@ -8892,7 +8547,7 @@ export interface components { * @example 2011-04-18T23:23:56Z */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } & { [key: string]: unknown } /** * Gist Commit @@ -9046,157 +8701,240 @@ export interface components { featured: boolean } & { [key: string]: unknown } /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan + * Api Overview + * @description Api Overview */ - 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - url: string + 'api-overview': { + /** @example true */ + verifiable_password_authentication: boolean /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts + * @example [ + * "13.65.0.0/16", + * "157.55.204.33/32", + * "2a01:111:f403:f90c::/62" + * ] */ - accounts_url: string - /** @example 1313 */ - id: number - /** @example 3 */ - number: number - /** @example Pro */ - name: string - /** @example A professional-grade CI solution */ - description: string - /** @example 1099 */ - monthly_price_in_cents: number - /** @example 11870 */ - yearly_price_in_cents: number - /** @example flat-rate */ - price_model: string - /** @example true */ - has_free_trial: boolean - unit_name: string | null - /** @example published */ - state: string + packages?: string[] /** * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" + * "192.168.7.15/32", + * "192.168.7.16/32" * ] */ - bullets: string[] + dependabot?: string[] + /** @example 3.6.0 */ + installed_version?: string } & { [key: string]: unknown } /** - * Marketplace Purchase - * @description Marketplace Purchase + * Minimal Repository + * @description Minimal Repository */ - 'marketplace-purchase': { - url: string - type: string + 'minimal-repository': { + /** @example 1296269 */ id: number - login: string - organization_billing_email?: string - email?: string | null - marketplace_pending_change?: - | ({ - is_installed?: boolean - effective_date?: string - unit_count?: number | null - id?: number - plan?: components['schemas']['marketplace-listing-plan'] - } & { [key: string]: unknown }) - | 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]: unknown } - } & { [key: string]: unknown } - /** - * Api Overview - * @description Api Overview - */ - 'api-overview': { - /** @example true */ - verifiable_password_authentication: boolean - ssh_key_fingerprints?: { - SHA256_RSA?: string - SHA256_DSA?: string - SHA256_ECDSA?: string - SHA256_ED25519?: string - } & { [key: string]: unknown } + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example Hello-World */ + name: string + /** @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + private: boolean /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] + * Format: uri + * @example https://github.com/octocat/Hello-World */ - ssh_keys?: string[] + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean /** - * @example [ - * "127.0.0.1/32" - * ] + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World */ - hooks?: string[] + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string /** - * @example [ - * "127.0.0.1/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors */ - web?: string[] + contributors_url: string /** - * @example [ - * "127.0.0.1/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments */ - api?: string[] + deployments_url: string /** - * @example [ - * "127.0.0.1/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads */ - git?: string[] + downloads_url: string /** - * @example [ - * "13.65.0.0/16", - * "157.55.204.33/32", - * "2a01:111:f403:f90c::/62" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events */ - packages?: string[] + events_url: string /** - * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks */ - pages?: string[] + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages */ - importer?: string[] + languages_url: string /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges */ - actions?: string[] + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + ssh_url?: string /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers */ - dependabot?: string[] + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + clone_url?: string + mirror_url?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + svn_url?: string + homepage?: string | null + language?: string | null + forks_count?: number + stargazers_count?: number + watchers_count?: number + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + 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 + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + permissions?: { + admin?: boolean + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } & { [key: string]: unknown } + /** @example admin */ + role_name?: string + temp_clone_token?: string + delete_branch_on_merge?: boolean + subscribers_count?: number + network_count?: number + code_of_conduct?: components['schemas']['code-of-conduct'] + license?: + | ({ + key?: string + name?: string + spdx_id?: string + url?: string + node_id?: string + } & { [key: string]: unknown }) + | null + /** @example 0 */ + forks?: number + /** @example 0 */ + open_issues?: number + /** @example 0 */ + watchers?: number + allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } & { [key: string]: unknown } /** * Thread @@ -9254,47 +8992,11 @@ export interface components { * @description Custom repository roles created by organization administrators */ 'organization-custom-repository-role': { + /** @description The unique identifier of the custom role. */ id: number + /** @description The name of the custom role. */ name: string } & { [key: string]: unknown } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - groups?: ({ - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - updated_at: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } /** * Organization Full * @description Organization Full @@ -9420,11 +9122,34 @@ export interface components { members_can_create_private_pages?: boolean /** @example false */ members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean /** Format: date-time */ updated_at: string } & { [key: string]: unknown } /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + 'actions-cache-usage-by-repository': { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number + } & { [key: string]: unknown } + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-repositories': 'all' | 'none' | 'selected' @@ -9435,21 +9160,6 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } & { [key: string]: unknown } - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - 'actions-can-approve-pull-request-reviews': boolean - 'actions-get-default-workflow-permissions': { - default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - } & { [key: string]: unknown } - 'actions-set-default-workflow-permissions': { - default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - } & { [key: string]: unknown } 'runner-groups-org': { id: number name: string @@ -9461,6 +9171,18 @@ export interface components { inherited: boolean inherited_allows_public_repositories?: boolean allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } & { [key: string]: unknown } /** * Actions Secret for an Organization @@ -9516,6 +9238,10 @@ export interface components { * @description An object without any properties. */ 'empty-object': { [key: string]: unknown } + /** @description The name of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-name': string + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + 'code-scanning-analysis-tool-guid': string | null /** * @description State of a code scanning alert. * @enum {string} @@ -9535,17 +9261,19 @@ export interface components { * Format: date-time * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-fixed-at': string | null + 'alert-fixed-at': string | null /** * Format: date-time * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-dismissed-at': string | null + 'alert-dismissed-at': string | null /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description The dismissal comment associated with the dismissal of the alert. */ + 'code-scanning-alert-dismissed-comment': string | null 'code-scanning-alert-rule': { /** @description A unique identifier for the rule used to detect the alert. */ id?: string | null @@ -9569,13 +9297,11 @@ export interface components { tags?: string[] | null /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ help?: string | null + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null } & { [key: string]: unknown } - /** @description The name of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-name': string /** @description The version of the tool used to generate the code scanning analysis. */ 'code-scanning-analysis-tool-version': string | null - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - 'code-scanning-analysis-tool-guid': string | null 'code-scanning-analysis-tool': { name?: components['schemas']['code-scanning-analysis-tool-name'] version?: components['schemas']['code-scanning-analysis-tool-version'] @@ -9631,82 +9357,15 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] - repository: components['schemas']['minimal-repository'] - } & { [key: string]: unknown } - /** - * Credential Authorization - * @description Credential Authorization - */ - 'credential-authorization': { - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - login: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - credential_type: string - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - token_last_eight?: string - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - credential_authorized_at: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - scopes?: string[] - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - fingerprint?: string - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - credential_accessed_at: string | null - /** @example 12345678 */ - authorized_credential_id: number | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - authorized_credential_title?: string | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - authorized_credential_note?: string | null - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - authorized_credential_expires_at?: string | null + repository: components['schemas']['simple-repository'] } & { [key: string]: unknown } /** * Dependabot Secret for an Organization @@ -9835,586 +9494,178 @@ export interface components { } & { [key: string]: unknown })[] } & { [key: string]: unknown } /** - * Organization Invitation - * @description Organization Invitation - */ - 'organization-invitation': { - id: number - login: string | null - email: string | null - role: string - created_at: string - failed_at?: string | null - failed_reason?: string | null - inviter: components['schemas']['simple-user'] - team_count: number - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - node_id: string - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - invitation_teams_url: string - } & { [key: string]: unknown } - /** - * Org Hook - * @description Org Hook + * ExternalGroups + * @description A list of external groups available to be connected to a team */ - 'org-hook': { - /** @example 1 */ - id: number - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1 - */ - url: string - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1/pings - */ - ping_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/hooks/1/deliveries - */ - deliveries_url?: string - /** @example web */ - name: string + 'external-groups': { /** + * @description An array of external groups available to be mapped to a team * @example [ - * "push", - * "pull_request" + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } * ] */ - events: string[] - /** @example true */ - active: boolean - config: { - /** @example "http://example.com/2" */ - url?: string - /** @example "0" */ - insecure_ssl?: string - /** @example "form" */ - content_type?: string - /** @example "********" */ - secret?: string - } & { [key: string]: unknown } - /** - * Format: date-time - * @example 2011-09-06T20:39:23Z - */ - updated_at: string - /** - * Format: date-time - * @example 2011-09-06T17:26:27Z - */ - created_at: string - type: string - } & { [key: string]: unknown } - /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} - */ - 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' - /** - * Interaction Limits - * @description Interaction limit settings. - */ - 'interaction-limit-response': { - limit: components['schemas']['interaction-group'] - /** @example repository */ - origin: string - /** - * Format: date-time - * @example 2018-08-17T04:18:39Z - */ - expires_at: string - } & { [key: string]: unknown } - /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * Interaction Restrictions - * @description 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]: unknown } - /** - * Team Simple - * @description Groups of organization members that gives permissions on specified repositories. - */ - 'nullable-team-simple': - | ({ - /** - * @description Unique identifier of the team - * @example 1 - */ - id: number - /** @example MDQ6VGVhbTE= */ - node_id: string - /** - * Format: uri - * @description URL for the team - * @example https://api.github.com/organizations/1/team/1 - */ - url: string - /** @example https://api.github.com/organizations/1/team/1/members{/member} */ - members_url: string - /** - * @description Name of the team - * @example Justice League - */ - name: string - /** - * @description Description of the team - * @example A great team. - */ - description: string | null - /** - * @description Permission that the team will have for its repositories - * @example admin - */ - permission: string - /** - * @description The level of privacy this team should have - * @example closed - */ - privacy?: string - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - /** - * Format: uri - * @example https://api.github.com/organizations/1/team/1/repos - */ - repositories_url: string - /** @example justice-league */ - slug: string - /** - * @description Distinguished Name (DN) that team maps to within LDAP environment - * @example uid=example,ou=users,dc=github,dc=com - */ - ldap_dn?: string - } & { [key: string]: unknown }) - | null - /** - * Team - * @description 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 - permissions?: { - pull: boolean - triage: boolean - push: boolean - maintain: boolean - admin: boolean - } & { [key: string]: unknown } - /** Format: uri */ - url: string - /** - * Format: uri - * @example https://github.com/orgs/rails/teams/core - */ - html_url: string - members_url: string - /** Format: uri */ - repositories_url: string - parent: components['schemas']['nullable-team-simple'] - } & { [key: string]: unknown } - /** - * Org Membership - * @description Org Membership - */ - 'org-membership': { - /** - * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt - */ - url: string - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - state: 'active' | 'pending' - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - role: 'admin' | 'member' | 'billing_manager' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - organization_url: string - organization: components['schemas']['organization-simple'] - user: components['schemas']['nullable-simple-user'] - permissions?: { - can_create_repository: boolean - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** - * Migration - * @description A migration. - */ - migration: { - /** @example 79 */ - id: number - owner: components['schemas']['nullable-simple-user'] - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - guid: string - /** @example pending */ - state: string - /** @example true */ - lock_repositories: boolean - exclude_metadata: boolean - exclude_git_data: boolean - exclude_attachments: boolean - exclude_releases: boolean - exclude_owner_projects: boolean - repositories: components['schemas']['repository'][] - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - url: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - created_at: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - updated_at: string - node_id: string - /** Format: uri */ - archive_url?: string - exclude?: unknown[] - } & { [key: string]: unknown } - /** - * Minimal Repository - * @description Minimal Repository - */ - 'nullable-minimal-repository': - | ({ - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } & { [key: string]: unknown } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: - | ({ - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } & { [key: string]: unknown }) - | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number - /** @example 0 */ - watchers?: number - allow_forking?: boolean - } & { [key: string]: unknown }) - | null + groups?: ({ + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } /** - * Package - * @description A software package + * Org Hook + * @description Org Hook */ - package: { + 'org-hook': { + /** @example 1 */ + id: number /** - * @description Unique identifier of the package. - * @example 1 + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1 */ - id: number + url: string + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/pings + */ + ping_url: string /** - * @description The name of the package. - * @example super-linter + * Format: uri + * @example https://api.github.com/orgs/octocat/hooks/1/deliveries */ + deliveries_url?: string + /** @example web */ name: string /** - * @example docker - * @enum {string} + * @example [ + * "push", + * "pull_request" + * ] */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - html_url: string + events: string[] + /** @example true */ + active: boolean + config: { + /** @example "http://example.com/2" */ + url?: string + /** @example "0" */ + insecure_ssl?: string + /** @example "form" */ + content_type?: string + /** @example "********" */ + secret?: string + } & { [key: string]: unknown } /** - * @description The number of versions of the package. - * @example 1 + * Format: date-time + * @example 2011-09-06T20:39:23Z */ - version_count: number + updated_at: string /** - * @example private - * @enum {string} + * Format: date-time + * @example 2011-09-06T17:26:27Z */ - visibility: 'private' | 'public' - owner?: components['schemas']['nullable-simple-user'] - repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ created_at: string - /** Format: date-time */ - updated_at: string + type: string } & { [key: string]: unknown } /** - * Package Version - * @description A version of a software package + * Org Membership + * @description Org Membership */ - 'package-version': { + 'org-membership': { /** - * @description Unique identifier of the package version. - * @example 1 + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: 'active' | 'pending' + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: 'admin' | 'member' | 'billing_manager' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat */ + organization_url: string + organization: components['schemas']['organization-simple'] + user: components['schemas']['nullable-simple-user'] + permissions?: { + can_create_repository: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * Migration + * @description A migration. + */ + migration: { + /** @example 79 */ id: number + owner: components['schemas']['nullable-simple-user'] + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string + /** @example pending */ + state: string + /** @example true */ + lock_repositories: boolean + exclude_metadata: boolean + exclude_git_data: boolean + exclude_attachments: boolean + exclude_releases: boolean + exclude_owner_projects: boolean + org_metadata_only: boolean + repositories: components['schemas']['repository'][] /** - * @description The name of the package version. - * @example latest + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 */ - name: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - package_html_url: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - html_url?: string - /** @example MIT */ - license?: string - description?: string /** * Format: date-time - * @example 2011-04-10T20:09:31Z + * @example 2015-07-06T15:33:38-07:00 */ created_at: string /** * Format: date-time - * @example 2014-03-03T18:58:10Z + * @example 2015-07-06T15:33:38-07:00 */ updated_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - deleted_at?: string - /** Package Version Metadata */ - metadata?: { - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** Container Metadata */ - container?: { - tags: string[] - } & { [key: string]: unknown } - /** Docker Metadata */ - docker?: { - tag?: string[] - } & { - tags: unknown - } & { [key: string]: unknown } - } & { [key: string]: unknown } + node_id: string + /** Format: uri */ + archive_url?: string + exclude?: unknown[] + } & { [key: string]: unknown } + 'org-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string + allow_downstream_configuration?: boolean } & { [key: string]: unknown } /** * Project @@ -10482,52 +9733,225 @@ export interface components { private?: boolean } & { [key: string]: unknown } /** - * GroupMapping - * @description External Groups to be mapped to a team for membership + * Team Simple + * @description Groups of organization members that gives permissions on specified repositories. + */ + 'nullable-team-simple': + | ({ + /** + * @description Unique identifier of the team + * @example 1 + */ + id: number + /** @example MDQ6VGVhbTE= */ + node_id: string + /** + * Format: uri + * @description URL for the team + * @example https://api.github.com/organizations/1/team/1 + */ + url: string + /** @example https://api.github.com/organizations/1/team/1/members{/member} */ + members_url: string + /** + * @description Name of the team + * @example Justice League + */ + name: string + /** + * @description Description of the team + * @example A great team. + */ + description: string | null + /** + * @description Permission that the team will have for its repositories + * @example admin + */ + permission: string + /** + * @description The level of privacy this team should have + * @example closed + */ + privacy?: string + /** + * Format: uri + * @example https://github.com/orgs/rails/teams/core + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/organizations/1/team/1/repos + */ + repositories_url: string + /** @example justice-league */ + slug: string + /** + * @description Distinguished Name (DN) that team maps to within LDAP environment + * @example uid=example,ou=users,dc=github,dc=com + */ + ldap_dn?: string + } & { [key: string]: unknown }) + | null + /** + * Team + * @description Groups of organization members that gives permissions on specified repositories. */ - 'group-mapping': { + team: { + id: number + node_id: string + name: string + slug: string + description: string | null + privacy?: string + permission: string + permissions?: { + pull: boolean + triage: boolean + push: boolean + maintain: boolean + admin: boolean + } & { [key: string]: unknown } + /** Format: uri */ + url: string /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] + * Format: uri + * @example https://github.com/orgs/rails/teams/core */ - groups?: ({ - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - group_name: string - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - group_description: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - synced_at?: string | null - } & { [key: string]: unknown })[] + html_url: string + members_url: string + /** Format: uri */ + repositories_url: string + parent: components['schemas']['nullable-team-simple'] + } & { [key: string]: unknown } + /** + * Team Organization + * @description Team Organization + */ + 'team-organization': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string + /** + * Format: uri + * @example https://api.github.com/orgs/github + */ + url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/repos + */ + repos_url: string + /** + * Format: uri + * @example https://api.github.com/orgs/github/events + */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + /** @example github */ + name?: string + /** @example GitHub */ + company?: string + /** + * Format: uri + * @example https://github.com/blog + */ + blog?: string + /** @example San Francisco */ + location?: string + /** + * Format: email + * @example octocat@github.com + */ + email?: string + /** @example github */ + twitter_username?: string | null + /** @example true */ + is_verified?: boolean + /** @example true */ + has_organization_projects: boolean + /** @example true */ + has_repository_projects: boolean + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** + * Format: uri + * @example https://github.com/octocat + */ + html_url: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** @example Organization */ + type: string + /** @example 100 */ + total_private_repos?: number + /** @example 100 */ + owned_private_repos?: number + /** @example 81 */ + private_gists?: number | null + /** @example 10000 */ + disk_usage?: number | null + /** @example 8 */ + collaborators?: number | null + /** + * Format: email + * @example org@example.com + */ + billing_email?: string | null + plan?: { + name: string + space: number + private_repos: number + filled_seats?: number + seats?: number + } & { [key: string]: unknown } + default_repository_permission?: string | null + /** @example true */ + members_can_create_repositories?: boolean | null + /** @example true */ + two_factor_requirement_enabled?: boolean | null + /** @example all */ + members_allowed_repository_creation_type?: string + /** @example true */ + members_can_create_public_repositories?: boolean + /** @example true */ + members_can_create_private_repositories?: boolean + /** @example true */ + members_can_create_internal_repositories?: boolean + /** @example true */ + members_can_create_pages?: boolean + /** @example true */ + members_can_create_public_pages?: boolean + /** @example true */ + members_can_create_private_pages?: boolean + /** @example false */ + members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean + /** Format: date-time */ + updated_at: string } & { [key: string]: unknown } /** * Full Team @@ -10594,7 +10018,7 @@ export interface components { * @example 2017-08-17T12:37:15Z */ updated_at: string - organization: components['schemas']['organization-full'] + organization: components['schemas']['team-organization'] /** * @description Distinguished Name (DN) that team maps to within LDAP environment * @example uid=example,ou=users,dc=github,dc=com @@ -10801,6 +10225,506 @@ export interface components { admin: boolean } & { [key: string]: unknown } } & { [key: string]: unknown } + /** + * Repository + * @description A git repository + */ + 'nullable-repository': + | ({ + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + /** @example octocat/Hello-World */ + full_name: string + license: components['schemas']['nullable-license-simple'] + organization?: components['schemas']['nullable-simple-user'] + forks: number + permissions?: { + admin: boolean + pull: boolean + triage?: boolean + push: boolean + maintain?: boolean + } & { [key: string]: unknown } + owner: components['schemas']['simple-user'] + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + language: string | null + /** @example 9 */ + forks_count: number + /** @example 80 */ + stargazers_count: number + /** @example 80 */ + watchers_count: number + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ + size: number + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** @example 0 */ + open_issues_count: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + topics?: string[] + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + has_pages: boolean + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + 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]: unknown } + 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 + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } & { [key: string]: unknown } + allow_rebase_merge?: boolean + temp_clone_token?: string + allow_squash_merge?: boolean + allow_auto_merge?: boolean + delete_branch_on_merge?: boolean + allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + allow_merge_commit?: boolean + subscribers_count?: number + network_count?: number + } & { [key: string]: unknown }) + | null + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean + subscribers_count?: number + network_count?: number + open_issues: number + watchers: number + master_branch?: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean + } & { [key: string]: unknown }) + | null /** * Team Repository * @description A team's access to a repository. @@ -11095,6 +11019,12 @@ export interface components { * @example false */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -11249,6 +11179,22 @@ export interface components { */ html_url: string | null } & { [key: string]: unknown } + 'security-and-analysis': + | ({ + advanced_security?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } & { [key: string]: unknown } + secret_scanning?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } & { [key: string]: unknown } + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | null /** * Full Repository * @description Full Repository @@ -11416,7 +11362,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** @example master */ default_branch: string @@ -11485,7 +11434,51 @@ export interface components { /** @example true */ allow_merge_commit?: boolean /** @example true */ + allow_update_branch?: boolean + /** @example false */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** @example true */ allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean /** @example 42 */ subscribers_count: number /** @example 0 */ @@ -11504,18 +11497,7 @@ export interface components { */ anonymous_access_enabled?: boolean code_of_conduct?: components['schemas']['code-of-conduct-simple'] - security_and_analysis?: - | ({ - advanced_security?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } & { [key: string]: unknown } - secret_scanning?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } & { [key: string]: unknown } - } & { [key: string]: unknown }) - | null + security_and_analysis?: components['schemas']['security-and-analysis'] } & { [key: string]: unknown } /** * Artifact @@ -11548,6 +11530,31 @@ export interface components { expires_at: string | null /** Format: date-time */ updated_at: string | null + workflow_run?: + | ({ + /** @example 10 */ + id?: number + /** @example 42 */ + repository_id?: number + /** @example 42 */ + head_repository_id?: number + /** @example main */ + head_branch?: string + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string + } & { [key: string]: unknown }) + | null + } & { [key: string]: unknown } + /** + * Actions cache usage policy for repository + * @description GitHub Actions cache usage policy for repository. + */ + 'actions-cache-usage-policy-for-repository': { + /** + * @description The size limit for the sum of all caches, in gigabytes. + * @example 14 + */ + repo_cache_size_limit_in_gb: number } & { [key: string]: unknown } /** * Job @@ -11591,8 +11598,9 @@ export interface components { /** * @description The outcome of the job. * @example success + * @enum {string|null} */ - conclusion: string | null + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -11682,6 +11690,23 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } & { [key: string]: unknown } + 'actions-workflow-access-to-repository': { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: 'none' | 'organization' | 'enterprise' + } & { [key: string]: unknown } + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + 'referenced-workflow': { + path: string + sha: string + ref?: string + } & { [key: string]: unknown } /** Pull Request Minimal */ 'pull-request-minimal': { id: number @@ -11761,10 +11786,15 @@ export interface components { /** @example master */ head_branch: string | null /** - * @description The SHA of the head commit that points to the version of the worflow being run. + * @description The SHA of the head commit that points to the version of the workflow being run. * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ head_sha: string + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string /** * @description The auto incrementing run number for the workflow run. * @example 106 @@ -11775,6 +11805,7 @@ export interface components { * @example 1 */ run_attempt?: number + referenced_workflows?: components['schemas']['referenced-workflow'][] | null /** @example push */ event: string /** @example completed */ @@ -11798,6 +11829,8 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string + actor?: components['schemas']['simple-user'] + triggering_actor?: components['schemas']['simple-user'] /** * Format: date-time * @description The start time of the latest run. Resets on re-run. @@ -11848,6 +11881,8 @@ export interface components { head_repository: components['schemas']['minimal-repository'] /** @example 5 */ head_repository_id?: number + } & { + display_title: unknown } & { [key: string]: unknown } /** * Environment Approval @@ -11899,7 +11934,7 @@ export interface components { comment: string } & { [key: string]: unknown } /** - * @description The type of reviewer. Must be one of: `User` or `Team` + * @description The type of reviewer. * @example User * @enum {string} */ @@ -12021,39 +12056,6 @@ export interface components { production_environment?: boolean performed_via_github_app?: components['schemas']['nullable-integration'] } & { [key: string]: unknown } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - 'workflow-run-usage': { - billable: { - UBUNTU?: { - total_ms: number - jobs: number - job_runs?: ({ - job_id: number - duration_ms: number - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - MACOS?: { - total_ms: number - jobs: number - job_runs?: ({ - job_id: number - duration_ms: number - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - WINDOWS?: { - total_ms: number - jobs: number - job_runs?: ({ - job_id: number - duration_ms: number - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - } & { [key: string]: unknown } - run_duration_ms?: number - } & { [key: string]: unknown } /** * Actions Secret * @description Set secrets for GitHub Actions. @@ -12109,23 +12111,6 @@ export interface components { */ deleted_at?: string } & { [key: string]: unknown } - /** - * Workflow Usage - * @description Workflow Usage - */ - 'workflow-usage': { - billable: { - UBUNTU?: { - total_ms?: number - } & { [key: string]: unknown } - MACOS?: { - total_ms?: number - } & { [key: string]: unknown } - WINDOWS?: { - total_ms?: number - } & { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } /** * Autolink reference * @description An autolink reference. @@ -12187,6 +12172,8 @@ export interface components { users?: components['schemas']['simple-user'][] /** @description The list of teams with review dismissal access. */ teams?: components['schemas']['team'][] + /** @description The list of apps with review dismissal access. */ + apps?: components['schemas']['integration'][] /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ url?: string /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ @@ -12194,15 +12181,15 @@ export interface components { /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ teams_url?: string } & { [key: string]: unknown } - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: - | ({ - /** @description The list of users allowed to bypass pull request requirements. */ - users?: components['schemas']['simple-user'][] - /** @description The list of teams allowed to bypass pull request requirements. */ - teams?: components['schemas']['team'][] - } & { [key: string]: unknown }) - | null + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of users allowed to bypass pull request requirements. */ + users?: components['schemas']['simple-user'][] + /** @description The list of teams allowed to bypass pull request requirements. */ + teams?: components['schemas']['team'][] + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components['schemas']['integration'][] + } & { [key: string]: unknown } /** @example true */ dismiss_stale_reviews: boolean /** @example true */ @@ -12332,6 +12319,9 @@ export interface components { allow_deletions?: { enabled?: boolean } & { [key: string]: unknown } + block_creations?: { + enabled?: boolean + } & { [key: string]: unknown } required_conversation_resolution?: { enabled?: boolean } & { [key: string]: unknown } @@ -12569,10 +12559,12 @@ export interface components { teams_url: string users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } & { [key: string]: unknown } bypass_pull_request_allowances?: { users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } & { [key: string]: unknown } } & { [key: string]: unknown } required_signatures?: { @@ -12602,6 +12594,9 @@ export interface components { required_conversation_resolution?: { enabled?: boolean } + block_creations?: { + enabled: boolean + } } & { [key: string]: unknown } /** * Deployment @@ -12863,10 +12858,11 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule-summary'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] @@ -12879,16 +12875,17 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] 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]: unknown } /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * @enum {string} */ 'code-scanning-alert-set-state': 'open' | 'dismissed' @@ -12952,7 +12949,7 @@ export interface components { */ confirm_delete_url: string | null } & { [key: string]: unknown } - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/sarif-support-for-code-scanning)." */ 'code-scanning-analysis-sarif-file': string 'code-scanning-sarifs-receipt': { id?: components['schemas']['code-scanning-analysis-sarif-id'] @@ -12977,224 +12974,50 @@ export interface components { errors?: string[] | null } & { [key: string]: unknown } /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'nullable-codespace-machine': - | ({ - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - } & { [key: string]: unknown }) - | null - /** - * Codespace - * @description A codespace. + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file */ - codespace: { - /** @example 1 */ - id: number - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - name: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - environment_id: string | null - owner: components['schemas']['simple-user'] - billable_owner: components['schemas']['simple-user'] - repository: components['schemas']['minimal-repository'] - machine: components['schemas']['nullable-codespace-machine'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - prebuild: boolean | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - last_used_at: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL for this codespace. - */ - url: string - /** @description Details about the codespace's git repository. */ - git_status: { + 'codeowners-errors': { + errors: ({ /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 + * @description The line number where this errors occurs. + * @example 7 */ - ahead?: number + line: number /** - * @description The number of commits the local repository is behind the remote. - * @example 0 + * @description The column number where this errors occurs. + * @example 3 */ - behind?: number - /** @description Whether the local repository has unpushed changes. */ - has_unpushed_changes?: boolean - /** @description Whether the local repository has uncommitted changes. */ - has_uncommitted_changes?: boolean + column: number /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main + * @description The contents of the line where the error occurs. + * @example * user */ - ref?: string - } & { [key: string]: unknown } - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - idle_timeout_minutes: number | null - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - web_url: string - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - machines_url: string - /** - * Format: uri - * @description API URL to start this codespace. - */ - start_url: string - /** - * Format: uri - * @description API URL to stop this codespace. - */ - stop_url: string - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - pulls_url: string | null - recent_folders: string[] - runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - allowed_port_privacy_settings?: string[] | null - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null + source?: string + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string + } & { [key: string]: unknown })[] } & { [key: string]: unknown } /** * Collaborator @@ -13270,7 +13093,7 @@ export interface components { admin: boolean } & { [key: string]: unknown } /** @example admin */ - role_name: string + role_name?: string } & { [key: string]: unknown } /** * Repository Invitation @@ -13382,7 +13205,7 @@ export interface components { admin: boolean } & { [key: string]: unknown } /** @example admin */ - role_name: string + role_name?: string } & { [key: string]: unknown }) | null /** @@ -13416,7 +13239,7 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown } /** @@ -13442,7 +13265,7 @@ export interface components { * Auto merge * @description The status of auto merging a pull request. */ - auto_merge: + 'auto-merge': | ({ enabled_by: components['schemas']['simple-user'] /** @@ -13586,8 +13409,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } & { [key: string]: unknown } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -13602,7 +13425,7 @@ export interface components { state: string context: string /** Format: uri */ - target_url: string + target_url: string | null required?: boolean | null /** Format: uri */ avatar_url: string | null @@ -13638,72 +13461,13 @@ export interface components { id: number node_id: string state: string - description: string - target_url: string + description: string | null + target_url: string | null context: string created_at: string updated_at: string creator: components['schemas']['nullable-simple-user'] } & { [key: string]: unknown } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'nullable-code-of-conduct-simple': - | ({ - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - } & { [key: string]: unknown }) - | null - /** Community Health File */ - 'nullable-community-health-file': - | ({ - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - } & { [key: string]: unknown }) - | null - /** - * Community Profile - * @description Community Profile - */ - 'community-profile': { - /** @example 100 */ - health_percentage: number - /** @example My first repository on GitHub! */ - description: string | null - /** @example example.com */ - documentation: string | null - files: { - code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - code_of_conduct_file: components['schemas']['nullable-community-health-file'] - license: components['schemas']['nullable-license-simple'] - contributing: components['schemas']['nullable-community-health-file'] - readme: components['schemas']['nullable-community-health-file'] - issue_template: components['schemas']['nullable-community-health-file'] - pull_request_template: components['schemas']['nullable-community-health-file'] - } & { [key: string]: unknown } - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - updated_at: string | null - /** @example true */ - content_reports_enabled?: boolean - } & { [key: string]: unknown } /** * Commit Comparison * @description Commit Comparison @@ -13809,7 +13573,8 @@ export interface components { * @description A list of directory items */ 'content-directory': ({ - type: string + /** @enum {string} */ + type: 'dir' | 'file' | 'submodule' | 'symlink' size: number name: string path: string @@ -13837,7 +13602,8 @@ export interface components { * @description Content File */ 'content-file': { - type: string + /** @enum {string} */ + type: 'file' encoding: string size: number name: string @@ -13870,7 +13636,8 @@ export interface components { * @description An object describing a symlink */ 'content-symlink': { - type: string + /** @enum {string} */ + type: 'symlink' target: string size: number name: string @@ -13894,11 +13661,12 @@ export interface components { } & { [key: string]: unknown } } & { [key: string]: unknown } /** - * Symlink Content - * @description An object describing a symlink + * Submodule Content + * @description An object describing a submodule */ 'content-submodule': { - type: string + /** @enum {string} */ + type: 'submodule' /** Format: uri */ submodule_git_url: string size: number @@ -14028,6 +13796,38 @@ export interface components { /** Format: date-time */ updated_at: string } & { [key: string]: unknown } + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + 'dependency-graph-diff': ({ + /** @enum {string} */ + change_type: 'added' | 'removed' + /** @example path/to/package-lock.json */ + manifest: string + /** @example npm */ + ecosystem: string + /** @example @actions/core */ + name: string + /** @example 1.0.0 */ + version: string + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null + /** @example MIT */ + license: string | null + /** @example https://github.com/github/actions */ + source_repository_url: string | null + vulnerabilities: ({ + /** @example critical */ + severity: string + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string + /** @example A summary of the advisory. */ + advisory_summary: string + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown })[] /** * Deployment Status * @description The status of a deployment. @@ -14110,7 +13910,7 @@ export interface components { */ 'wait-timer': number /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: + 'deployment-branch-policy-settings': | ({ /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ protected_branches: boolean @@ -14183,7 +13983,36 @@ export interface components { type: string } & { [key: string]: unknown }) ) & { [key: string]: unknown })[] - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } & { [key: string]: unknown } + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + 'deployment-branch-policy': { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string + } & { [key: string]: unknown } + /** Deployment branch policy name pattern */ + 'deployment-branch-policy-name-pattern': { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string } & { [key: string]: unknown } /** * Short Blob @@ -14500,86 +14329,6 @@ export interface components { deliveries_url?: string last_response: components['schemas']['hook-response'] } & { [key: string]: unknown } - /** - * Import - * @description A repository import from an external source. - */ - import: { - vcs: string | null - use_lfs?: boolean - /** @description The URL of the originating repository. */ - vcs_url: string - svc_root?: string - tfvc_project?: string - /** @enum {string} */ - status: - | 'auth' - | 'error' - | 'none' - | 'detecting' - | 'choose' - | 'auth_failed' - | 'importing' - | 'mapping' - | 'waiting_to_push' - | 'pushing' - | 'complete' - | 'setup' - | 'unknown' - | 'detection_found_multiple' - | 'detection_found_nothing' - | 'detection_needs_auth' - status_text?: string | null - 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]: unknown })[] - message?: string - authors_count?: number | null - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - /** Format: uri */ - authors_url: string - /** Format: uri */ - repository_url: string - svn_root?: string - } & { [key: string]: unknown } - /** - * Porter Author - * @description Porter Author - */ - 'porter-author': { - id: number - remote_id: string - remote_name: string - email: string - name: string - /** Format: uri */ - url: string - /** Format: uri */ - import_url: string - } & { [key: string]: unknown } - /** - * Porter Large File - * @description Porter Large File - */ - 'porter-large-file': { - ref_name: string - path: string - oid: string - size: number - } & { [key: string]: unknown } /** * Issue * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. @@ -14613,6 +14362,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -14677,7 +14432,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown }) | null @@ -14762,7 +14517,7 @@ export interface components { 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'] + author_association?: components['schemas']['author-association'] lock_reason?: string | null performed_via_github_app?: components['schemas']['nullable-integration'] } & { [key: string]: unknown } @@ -15162,7 +14917,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown } @@ -15316,7 +15071,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } & { [key: string]: unknown } /** * Pull Request Review Comment @@ -15354,12 +15109,12 @@ export interface components { */ path: string /** - * @description The line index in the diff to which the comment applies. + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. * @example 1 */ position: number /** - * @description The index of the original line in the diff to which the comment applies. + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. * @example 4 */ original_position: number @@ -15406,7 +15161,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: { /** @@ -15519,6 +15274,22 @@ export interface components { performed_via_github_app: components['schemas']['nullable-integration'] assignee: components['schemas']['simple-user'] } & { [key: string]: unknown } + /** + * State Change Issue Event + * @description State Change Issue Event + */ + 'state-change-issue-event': { + 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 + performed_via_github_app: components['schemas']['nullable-integration'] + state_reason?: string | null + } & { [key: string]: unknown } /** * Timeline Event * @description Timeline Event @@ -15545,6 +15316,7 @@ export interface components { | components['schemas']['timeline-commit-commented-event'] | components['schemas']['timeline-assigned-issue-event'] | components['schemas']['timeline-unassigned-issue-event'] + | components['schemas']['state-change-issue-event'] ) & { [key: string]: unknown } /** * Deploy Key @@ -15755,6 +15527,12 @@ export interface components { * @example https://example.com */ html_url?: string + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ('legacy' | 'workflow') | null source?: components['schemas']['pages-source-hash'] /** * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. @@ -15800,73 +15578,11 @@ export interface components { /** @example queued */ status: string } & { [key: string]: unknown } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - 'pages-health-check': { - domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } & { [key: string]: unknown } - alt_domain?: - | ({ - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } & { [key: string]: unknown }) - | null + 'repository-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string } & { [key: string]: unknown } /** * Team Simple @@ -16194,6 +15910,7 @@ export interface components { updated_at: string allow_forking?: boolean is_template?: boolean + web_commit_signoff_required?: boolean } & { [key: string]: unknown }) | null sha: string @@ -16368,6 +16085,7 @@ export interface components { /** Format: date-time */ updated_at: string allow_forking?: boolean + web_commit_signoff_required?: boolean } & { [key: string]: unknown } sha: string user: { @@ -16409,8 +16127,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } & { [key: string]: unknown } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -16506,7 +16224,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } & { [key: string]: unknown } /** * Legacy Review Comment @@ -16561,7 +16279,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: components['schemas']['link'] html: components['schemas']['link'] @@ -16683,11 +16401,6 @@ export interface components { body_html?: string body_text?: string mentions_count?: number - /** - * Format: uri - * @description The URL of the release discussion. - */ - discussion_url?: string reactions?: components['schemas']['reaction-rollup'] } & { [key: string]: unknown } /** @@ -16706,6 +16419,7 @@ export interface components { 'secret-scanning-alert': { number?: components['schemas']['alert-number'] created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['alert-updated-at'] url?: components['schemas']['alert-url'] html_url?: components['schemas']['alert-html-url'] /** @@ -16723,8 +16437,21 @@ export interface components { resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string /** @description The secret that was detected. */ secret?: string + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null } & { [key: string]: unknown } /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ 'secret-scanning-location-commit': { @@ -16884,6 +16611,22 @@ export interface components { tarball_url: string node_id: string } & { [key: string]: unknown } + /** + * Tag protection + * @description Tag protection + */ + 'tag-protection': { + /** @example 2 */ + id?: number + /** @example 2011-01-26T19:01:12Z */ + created_at?: string + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string + /** @example true */ + enabled?: boolean + /** @example v1.* */ + pattern: string + } & { [key: string]: unknown } /** * Topic * @description A topic aggregates entities that are related to a subject. @@ -16891,61 +16634,6 @@ export interface components { topic: { names: string[] } & { [key: string]: unknown } - /** Traffic */ - traffic: { - /** Format: date-time */ - timestamp: string - uniques: number - count: number - } & { [key: string]: unknown } - /** - * Clone Traffic - * @description Clone Traffic - */ - 'clone-traffic': { - /** @example 173 */ - count: number - /** @example 128 */ - uniques: number - clones: components['schemas']['traffic'][] - } & { [key: string]: unknown } - /** - * Content Traffic - * @description Content Traffic - */ - 'content-traffic': { - /** @example /github/hubot */ - path: string - /** @example github/hubot: A customizable life embetterment robot. */ - title: string - /** @example 3542 */ - count: number - /** @example 2225 */ - uniques: number - } & { [key: string]: unknown } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - 'referrer-traffic': { - /** @example Google */ - referrer: string - /** @example 4 */ - count: number - /** @example 3 */ - uniques: number - } & { [key: string]: unknown } - /** - * View Traffic - * @description View Traffic - */ - 'view-traffic': { - /** @example 14850 */ - count: number - /** @example 3782 */ - uniques: number - views: components['schemas']['traffic'][] - } & { [key: string]: unknown } 'scim-group-list-enterprise': { schemas: string[] totalResults: number @@ -17042,125 +16730,6 @@ export interface components { location?: string } & { [key: string]: unknown } } & { [key: string]: unknown } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - 'scim-user': { - /** @description SCIM schema used. */ - schemas: string[] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - id: string - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - externalId: string | null - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string | null - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string | null - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string | null - familyName: string | null - formatted?: string | null - } & { [key: string]: unknown } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: ({ - value: string - primary?: boolean - } & { [key: string]: unknown })[] - /** - * @description The active status of the User. - * @example true - */ - active: boolean - meta: { - /** @example User */ - resourceType?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - location?: string - } & { [key: string]: unknown } - /** @description The ID of the organization. */ - organization_id?: number - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - operations?: ({ - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: (string | { [key: string]: unknown } | unknown[]) & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description associated groups */ - groups?: ({ - value?: string - display?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - /** - * SCIM User List - * @description SCIM User List - */ - 'scim-user-list': { - /** @description SCIM schema used. */ - schemas: string[] - /** @example 3 */ - totalResults: number - /** @example 10 */ - itemsPerPage: number - /** @example 1 */ - startIndex: number - Resources: components['schemas']['scim-user'][] - } & { [key: string]: unknown } /** Search Result Text Matches */ 'search-result-text-matches': ({ object_url?: string @@ -17279,6 +16848,7 @@ export interface components { description?: string | null } & { [key: string]: unknown })[] state: string + state_reason?: string | null assignee: components['schemas']['nullable-simple-user'] milestone: components['schemas']['nullable-milestone'] comments: number @@ -17303,7 +16873,7 @@ export interface components { } & { [key: string]: unknown } body?: string score: number - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] draft?: boolean repository?: components['schemas']['repository'] body_html?: string @@ -17450,6 +17020,8 @@ export interface components { delete_branch_on_merge?: boolean allow_forking?: boolean is_template?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } & { [key: string]: unknown } /** * Topic Search Result Item @@ -17546,6 +17118,163 @@ export interface components { /** Format: date-time */ suspended_at?: string | null } & { [key: string]: unknown } + 'configuration-status': { + status?: string + progress?: ({ + status: string + key: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + 'maintenance-status': { + status?: string + scheduled_time?: string + connection_services?: ({ + name: string + number: number + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + 'enterprise-settings': { + enterprise?: { + private_mode?: boolean + public_pages?: boolean + subdomain_isolation?: boolean + signup_enabled?: boolean + github_hostname?: string + identicons_host?: string + http_proxy?: string | null + auth_mode?: string + expire_sessions?: boolean + admin_password?: string | null + configuration_id?: number + configuration_run_count?: number + avatar?: { + enabled?: boolean + uri?: string + } & { [key: string]: unknown } + customer?: { + name?: string + email?: string + uuid?: string + secret_key_data?: string + public_key_data?: string + } & { [key: string]: unknown } + license?: { + seats?: number + evaluation?: boolean + perpetual?: boolean + unlimited_seating?: boolean + support_key?: string + ssh_allowed?: boolean + cluster_support?: boolean + expire_at?: string + } & { [key: string]: unknown } + github_ssl?: { + enabled?: boolean + cert?: string | null + key?: string | null + } & { [key: string]: unknown } + ldap?: { + host?: string | null + port?: number + base?: unknown[] + uid?: string | null + bind_dn?: string | null + password?: string | null + method?: string + search_strategy?: string + user_groups?: unknown[] + admin_group?: string | null + virtual_attribute_enabled?: boolean + recursive_group_search?: boolean + posix_support?: boolean + user_sync_emails?: boolean + user_sync_keys?: boolean + user_sync_interval?: number + team_sync_interval?: number + sync_enabled?: boolean + reconciliation?: { + user?: string | null + org?: string | null + } & { [key: string]: unknown } + profile?: { + uid?: string + name?: string | null + mail?: string | null + key?: string | null + } & { [key: string]: unknown } + } & { [key: string]: unknown } + cas?: { + url?: string | null + } & { [key: string]: unknown } + saml?: { + sso_url?: string | null + certificate?: string | null + certificate_path?: string | null + issuer?: string | null + idp_initiated_sso?: boolean + disable_admin_demote?: boolean + } & { [key: string]: unknown } + github_oauth?: { + client_id?: string + client_secret?: string + organization_name?: string + organization_team?: string + } & { [key: string]: unknown } + smtp?: { + enabled?: boolean + address?: string + authentication?: string + port?: string + domain?: string + username?: string + user_name?: string + enable_starttls_auto?: boolean + password?: string + 'discard-to-noreply-address'?: boolean + support_address?: string + support_address_type?: string + noreply_address?: string + } & { [key: string]: unknown } + ntp?: { + primary_server?: string + secondary_server?: string + } & { [key: string]: unknown } + timezone?: string | null + snmp?: { + enabled?: boolean + community?: string + } & { [key: string]: unknown } + syslog?: { + enabled?: boolean + server?: string | null + protocol_name?: string + } & { [key: string]: unknown } + assets?: string | null + pages?: { + enabled?: boolean + } & { [key: string]: unknown } + collectd?: { + enabled?: boolean + server?: string | null + port?: number + encryption?: string | null + username?: string | null + password?: string | null + } & { [key: string]: unknown } + mapping?: { + enabled?: boolean + tileserver?: string | null + basemap?: string + token?: string | null + } & { [key: string]: unknown } + load_balancer?: string | null + } & { [key: string]: unknown } + run_list?: string[] + } & { [key: string]: unknown } + 'ssh-key': { + key?: string + 'pretty-print'?: string + } & { [key: string]: unknown } /** * Private User * @description Private User @@ -17669,84 +17398,6 @@ export interface components { business_plus?: boolean ldap_dn?: string } & { [key: string]: unknown } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - 'codespaces-secret': { - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - name: string - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - selected_repositories_url: string - } & { [key: string]: unknown } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - 'codespaces-user-public-key': { - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - } & { [key: string]: unknown } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - 'codespace-export-details': { - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - state?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - completed_at?: string | null - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - branch?: string | null - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - sha?: string | null - /** - * @description Id for the export details - * @example latest - */ - id?: string - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - export_url?: string - } & { [key: string]: unknown } /** * Email * @description Email @@ -17771,6 +17422,8 @@ export interface components { 'gpg-key': { /** @example 3 */ id: number + /** @example Octocat's GPG Key */ + name?: string | null primary_key_id: number | null /** @example 3262EFF25BA0D270 */ key_id: string @@ -17779,7 +17432,7 @@ export interface components { /** * @example [ * { - * "email": "mastahyeti@users.noreply.github.com", + * "email": "octocat@users.noreply.github.com", * "verified": true * } * ] @@ -17802,7 +17455,8 @@ export interface components { * "can_encrypt_storage": true, * "can_certify": false, * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null + * "expires_at": null, + * "revoked": false * } * ] */ @@ -17820,6 +17474,7 @@ export interface components { created_at?: string expires_at?: string | null raw_key?: string | null + revoked?: boolean } & { [key: string]: unknown })[] /** @example true */ can_sign: boolean @@ -17834,6 +17489,8 @@ export interface components { created_at: string /** Format: date-time */ expires_at: string | null + /** @example true */ + revoked: boolean raw_key: string | null } & { [key: string]: unknown } /** @@ -17850,47 +17507,6 @@ export interface components { verified: boolean read_only: boolean } & { [key: string]: unknown } - /** Marketplace Account */ - 'marketplace-account': { - /** Format: uri */ - url: string - id: number - type: string - node_id?: string - login: string - /** Format: email */ - email?: string | null - /** Format: email */ - organization_billing_email?: string | null - } & { [key: string]: unknown } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - 'user-marketplace-purchase': { - /** @example monthly */ - billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - next_billing_date: string | null - unit_count: number | null - /** @example true */ - on_free_trial: boolean - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - updated_at: string | null - account: components['schemas']['marketplace-account'] - plan: components['schemas']['marketplace-listing-plan'] - } & { [key: string]: unknown } /** * Starred Repository * @description Starred Repository @@ -17926,7 +17542,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed_simple: { content: { 'application/json': components['schemas']['validation-error-simple'] @@ -17939,7 +17555,7 @@ export interface components { 'application/scim+json': components['schemas']['scim-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed: { content: { 'application/json': components['schemas']['validation-error'] @@ -17951,15 +17567,6 @@ export interface components { 'application/json': { [key: string]: unknown } } } - /** Preview header missing */ - preview_header_missing: { - content: { - 'application/json': { - message: string - documentation_url: string - } & { [key: string]: unknown } - } - } /** Forbidden */ forbidden: { content: { @@ -18052,7 +17659,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + /** 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'] @@ -18062,72 +17669,59 @@ export interface components { found: unknown /** A header with no content is returned. */ no_content: 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: { - /** @description Results per page (max 100) */ + /** @description The number of results per page (max 100). */ 'per-page': number + /** @description Page number of the results to fetch. */ + page: number + /** @description The unique identifier of the hook. */ + 'hook-id': number + /** @description The direction to sort the results by. */ + direction: 'asc' | 'desc' + /** @description The unique identifier of the key. */ + 'key-ids': string + /** @description The unique identifier of the team. */ + 'team-id': number + /** @description The handle for the GitHub user account. */ + username: string + /** @description The organization name. The name is not case sensitive. */ + org: string + /** @description The unique identifier of the pre-receive environment. */ + 'pre-receive-environment-id': number + /** @description The unique identifier of the pre-receive hook. */ + 'pre-receive-hook-id': number + /** @description The unique identifier of the token. */ + 'token-id': number /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor: string 'delivery-id': number - /** @description Page number of the results to fetch. */ - page: number /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since: string - /** @description installation_id parameter */ + /** @description The unique identifier of the installation. */ 'installation-id': number - /** @description grant_id parameter */ + /** @description The unique identifier of the grant. */ 'grant-id': number - /** @description The client ID of your GitHub app. */ + /** @description The client ID of the GitHub app. */ 'client-id': string 'app-slug': string - /** @description authorization_id parameter */ + /** @description The client ID of the OAuth app. */ + 'oauth-client-id': string + /** @description The unique identifier of the authorization. */ 'authorization-id': number /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: string - /** @description Unique identifier of an organization. */ + /** @description The unique identifier of the organization. */ 'org-id': number + /** @description Only return runner groups that are allowed to be used by this organization. */ + 'visible-to-organization': string /** @description Unique identifier of the self-hosted runner group. */ 'runner-group-id': number /** @description Unique identifier of the self-hosted runner. */ 'runner-id': number /** @description The name of a self-hosted runner's custom label. */ 'runner-label-name': string - /** @description 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). */ + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ 'audit-log-phrase': string /** * @description The event types to include: @@ -18139,9 +17733,9 @@ export interface components { * The default is `web`. */ 'audit-log-include': 'web' | 'git' | 'all' - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ 'audit-log-before': string /** * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. @@ -18153,31 +17747,27 @@ export interface components { 'secret-scanning-alert-state': 'open' | 'resolved' /** * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ 'secret-scanning-alert-secret-type': string /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ 'secret-scanning-alert-resolution': string - /** @description A 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. */ + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + 'secret-scanning-alert-sort': 'created' | 'updated' + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ 'pagination-before': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ 'pagination-after': string - /** @description gist_id parameter */ + /** @description The unique identifier of the gist. */ 'gist-id': string - /** @description comment_id parameter */ + /** @description The unique identifier of the comment. */ 'comment-id': number /** @description A list of comma separated label names. Example: `bug,ui,@high` */ labels: string - /** @description One of `asc` (ascending) or `desc` (descending). */ - direction: 'asc' | 'desc' - /** @description account_id parameter */ - 'account-id': number - /** @description plan_id parameter */ - 'plan-id': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: 'created' | 'updated' + /** @description The account owner of the repository. The name is not case sensitive. */ owner: string + /** @description The name of the repository. The name is not case sensitive. */ repo: string /** @description If `true`, show notifications marked as read. */ all: boolean @@ -18185,45 +17775,41 @@ export interface components { participating: boolean /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ before: string - /** @description thread_id parameter */ + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ 'thread-id': number /** @description An organization ID. Only return organizations with an ID greater than this ID. */ 'since-org': number - org: string - /** @description team_slug parameter */ - 'team-slug': string + /** @description The unique identifier of the repository. */ 'repository-id': number - /** @description secret_name parameter */ + /** @description Only return runner groups that are allowed to be used by this repository. */ + 'visible-to-repository': string + /** @description The name of the secret. */ 'secret-name': string - username: string - /** @description group_id parameter */ + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The unique identifier of the group. */ 'group-id': number - 'hook-id': number - /** @description invitation_id parameter */ - 'invitation-id': number - /** @description migration_id parameter */ + /** @description The unique identifier of the migration. */ 'migration-id': number - /** @description repo_name parameter */ - 'repo-name': string - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - 'package-visibility': 'public' | 'private' | 'internal' - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description The name of the package. */ - 'package-name': string - /** @description Unique identifier of the package version. */ - 'package-version-id': number + /** @description The slug of the team name. */ + 'team-slug': string + /** @description The number that identifies the discussion. */ 'discussion-number': number + /** @description The number that identifies the comment. */ 'comment-number': number + /** @description The unique identifier of the reaction. */ 'reaction-id': number + /** @description The unique identifier of the project. */ 'project-id': number - /** @description card_id parameter */ + /** @description The unique identifier of the card. */ 'card-id': number - /** @description column_id parameter */ + /** @description The unique identifier of the column. */ 'column-id': number - /** @description artifact_id parameter */ + /** @description The unique identifier of the artifact. */ 'artifact-id': number - /** @description job_id parameter */ + /** @description The unique identifier of the job. */ 'job-id': number /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ actor: string @@ -18231,7 +17817,7 @@ export interface components { 'workflow-run-branch': string /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event: string - /** @description 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)." */ + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ 'workflow-run-status': | 'completed' | 'action_required' @@ -18246,61 +17832,64 @@ export interface components { | 'queued' | 'requested' | 'waiting' - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created: string /** @description If `true` pull requests are omitted from the response (empty array). */ 'exclude-pull-requests': boolean /** @description Returns workflow runs with the `check_suite_id` that you specify. */ 'workflow-run-check-suite-id': number - /** @description The id of the workflow run. */ + /** @description The unique identifier of the workflow run. */ 'run-id': number /** @description The attempt number of the workflow run. */ 'attempt-number': number /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ 'workflow-id': (number | string) & { [key: string]: unknown } - /** @description autolink_id parameter */ + /** @description The unique identifier of the autolink. */ 'autolink-id': number /** @description The name of the branch. */ branch: string - /** @description check_run_id parameter */ + /** @description The unique identifier of the check run. */ 'check-run-id': number - /** @description check_suite_id parameter */ + /** @description The unique identifier of the check suite. */ 'check-suite-id': number /** @description Returns check runs with the specified `name`. */ 'check-name': string - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + /** @description Returns check runs with the specified `status`. */ status: 'queued' | 'in_progress' | 'completed' - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ 'git-ref': components['schemas']['code-scanning-ref'] /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ 'alert-number': components['schemas']['alert-number'] - /** @description commit_sha parameter */ + /** @description The SHA of the commit. */ 'commit-sha': string + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + 'manifest-path': string /** @description deployment_id parameter */ 'deployment-id': number - /** @description The name of the environment */ + /** @description The name of the environment. */ 'environment-name': string - /** @description A user ID. Only return users with an ID greater than this ID. */ - 'since-user': number - /** @description issue_number parameter */ + /** @description The unique identifier of the branch policy. */ + 'branch-policy-id': number + /** @description The unique identifier of the invitation. */ + 'invitation-id': number + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: 'created' | 'updated' + /** @description The number that identifies the issue. */ 'issue-number': number - /** @description key_id parameter */ + /** @description The unique identifier of the key. */ 'key-id': number - /** @description milestone_number parameter */ + /** @description The number that identifies the milestone. */ 'milestone-number': number + /** @description The number that identifies the pull request. */ 'pull-number': number - /** @description review_id parameter */ + /** @description The unique identifier of the review. */ 'review-id': number - /** @description asset_id parameter */ + /** @description The unique identifier of the asset. */ 'asset-id': number - /** @description release_id parameter */ + /** @description The unique identifier of the release. */ 'release-id': number - /** @description Must be one of: `day`, `week`. */ - per: '' | 'day' | 'week' + /** @description The unique identifier of the tag protection. */ + 'tag-protection-id': number /** @description A repository ID. Only return repositories with an ID greater than this ID. */ 'since-repo': number /** @description Used for pagination: the index of the first result to return. */ @@ -18309,19 +17898,14 @@ export interface components { count: number /** @description Identifier generated by the GitHub SCIM endpoint. */ 'scim-group-id': string - /** @description scim_user_id parameter */ + /** @description The unique identifier of the SCIM user. */ 'scim-user-id': string /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order: 'desc' | 'asc' - 'team-id': number - /** @description ID of the Repository to filter on */ - 'repository-id-in-query': number - /** @description The name of the codespace. */ - 'codespace-name': string - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - 'export-id': string - /** @description gpg_key_id parameter */ + /** @description The unique identifier of the GPG key. */ 'gpg-key-id': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + 'since-user': number } headers: { link?: string @@ -18341,628 +17925,160 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': { - /** Format: uri-template */ - current_user_url: string - /** Format: uri-template */ - current_user_authorizations_html_url: string - /** Format: uri-template */ - authorizations_url: string - /** Format: uri-template */ - code_search_url: string - /** Format: uri-template */ - commit_search_url: string - /** Format: uri-template */ - emails_url: string - /** Format: uri-template */ - emojis_url: string - /** Format: uri-template */ - events_url: string - /** Format: uri-template */ - feeds_url: string - /** Format: uri-template */ - followers_url: string - /** Format: uri-template */ - following_url: string - /** Format: uri-template */ - gists_url: string - /** Format: uri-template */ - hub_url: string - /** Format: uri-template */ - issue_search_url: string - /** Format: uri-template */ - issues_url: string - /** Format: uri-template */ - keys_url: string - /** Format: uri-template */ - label_search_url: string - /** Format: uri-template */ - notifications_url: string - /** Format: uri-template */ - organization_url: string - /** Format: uri-template */ - organization_repositories_url: string - /** Format: uri-template */ - organization_teams_url: string - /** Format: uri-template */ - public_gists_url: string - /** Format: uri-template */ - rate_limit_url: string - /** Format: uri-template */ - repository_url: string - /** Format: uri-template */ - repository_search_url: string - /** Format: uri-template */ - current_user_repositories_url: string - /** Format: uri-template */ - starred_url: string - /** Format: uri-template */ - starred_gists_url: string - /** Format: uri-template */ - topic_search_url?: string - /** Format: uri-template */ - user_url: string - /** Format: uri-template */ - user_organizations_url: string - /** Format: uri-template */ - user_repositories_url: string - /** Format: uri-template */ - user_search_url: string - } & { [key: string]: unknown } - } - } - } - } - /** - * 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 | null - pem: string - } & { [key: string]: unknown }) & { [key: string]: unknown } - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - } - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/update-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - 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]: unknown } - } - } - } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/list-webhook-deliveries': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-delivery': { - parameters: { - path: { - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery'] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/redeliver-webhook-delivery': { - parameters: { - path: { - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - * - * The permissions the installation has are included under the `permissions` key. - */ - 'apps/list-installations': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - outdated?: string - } - } - responses: { - /** The permissions the installation has are included under the `permissions` key. */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['installation'][] - } - } - } - } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - /** - * Uninstalls a GitHub App on a user, organization, or business account. If you prefer to temporarily suspend an app's access to your account's resources, then we recommend the "[Suspend an app installation](https://docs.github.com/rest/reference/apps/#suspend-an-app-installation)" endpoint. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/delete-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access. To restrict the access to specific repositories, you can provide the `repository_ids` when creating the token. When you omit `repository_ids`, the response does not contain the `repositories` key. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/create-installation-access-token': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['installation-token'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository names that the token should have access to */ - repositories?: string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] - } & { [key: string]: unknown } - } - } - } - /** - * Suspends a GitHub App on a user, organization, or business account, which blocks the app from accessing the account's resources. When a GitHub App is suspended, the app's access to the GitHub API or webhook events is blocked for that account. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/suspend-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Removes a GitHub App installation suspension. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/unsuspend-installation': { - parameters: { - path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * You can use this API to list the set of OAuth applications that have been granted access to your account. Unlike the [list your authorizations](https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations) API, this API does not manage individual tokens. This API will return one entry for each OAuth application that has been granted access to your account, regardless of the number of tokens an application has generated for your user. The list of OAuth applications returned matches what is shown on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). The `scopes` returned are the union of scopes authorized for the application. For example, if an application has one token with `repo` scope and another token with `user` scope, the grant will return `["repo", "user"]`. - */ - 'oauth-authorizations/list-grants': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['application-grant'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ - 'oauth-authorizations/get-grant': { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['application-grant'] + 'application/json': components['schemas']['root'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations/) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for your user. Once deleted, the application has no access to your account and is no longer listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - 'oauth-authorizations/delete-grant': { - parameters: { - path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. - * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). - */ - 'apps/delete-authorization': { - parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string - } & { [key: string]: unknown } - } } } - /** 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': { + 'enterprise-admin/list-global-webhooks': { parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['global-hook'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string - } & { [key: string]: unknown } - } } } - /** 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'] - } - } + 'enterprise-admin/create-global-webhook': { responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 201: { + content: { + 'application/json': components['schemas']['global-hook'] + } + } } requestBody: { content: { 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + /** @description Must be passed as "web". */ + name: string + /** @description Key/value pairs to provide settings for this webhook. */ + config: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } & { [key: string]: unknown } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean } & { [key: string]: unknown } } } } - /** 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': { + 'enterprise-admin/get-global-webhook': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['global-hook'] } } - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string - } & { [key: string]: unknown } + } + 'enterprise-admin/delete-global-webhook': { + parameters: { + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } + responses: { + /** Response */ + 204: never + } } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/scope-token': { + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + 'enterprise-admin/update-global-webhook': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['global-hook-2'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } & { [key: string]: unknown } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] + active?: boolean } & { [key: string]: unknown } } } } - /** - * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/get-by-slug': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + 'enterprise-admin/ping-global-webhook': { parameters: { path: { - app_slug: components['parameters']['app-slug'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] + 204: never } } - /** **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': { + 'enterprise-admin/list-public-keys': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'accessed' + /** Only show public keys accessed after the given time. */ + since?: string } } responses: { @@ -18970,623 +18086,417 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['authorization'][] + 'application/json': components['schemas']['public-key-full'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** - * **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - * - * **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - * - * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). - */ - 'oauth-authorizations/create-authorization': { - parameters: {} + 'enterprise-admin/delete-public-key': { + parameters: { + path: { + /** The unique identifier of the key. */ + key_ids: components['parameters']['key-ids'] + } + } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 204: never + } + } + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + 'enterprise-admin/update-ldap-mapping-for-team': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + } + responses: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['ldap-mapping-team'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description The OAuth app client key for which to create the token. */ - client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } & { [key: string]: unknown } } } } - /** - * **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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-team': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } - } - /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + status?: string + } & { [key: string]: unknown } } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string - } & { [key: string]: unknown } - } } } - /** - * **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': { + 'enterprise-admin/update-ldap-mapping-for-user': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - fingerprint: string + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ + /** Response */ 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'] + 'application/json': components['schemas']['ldap-mapping-user'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } & { [key: string]: unknown } } } } - /** **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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-user': { parameters: { path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + status?: string + } & { [key: string]: unknown } } } - 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'] - } - } + 'enterprise-admin/create-org': { responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 201: { + content: { + 'application/json': components['schemas']['organization-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's username. */ + login: string + /** @description The login of the user who will manage this organization. */ + admin: string + /** @description The organization's display name. */ + profile_name?: string + } & { [key: string]: unknown } + } } } - /** - * **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': { + 'enterprise-admin/update-org-name': { parameters: { path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + message?: string + url?: string + } & { [key: string]: unknown } } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** @description A list of scopes to add to this authorization. */ - add_scopes?: string[] - /** @description A list of scopes to remove from this authorization. */ - remove_scopes?: string[] - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + /** @description The organization's new name. */ + login: string } & { [key: string]: unknown } } } } - 'codes-of-conduct/get-all-codes-of-conduct': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'][] - } - } - 304: components['responses']['not_modified'] - } - } - 'codes-of-conduct/get-conduct-code': { + 'enterprise-admin/list-pre-receive-environments': { parameters: { - path: { - key: string + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-of-conduct'] + 'application/json': components['schemas']['pre-receive-environment'][] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] } } - /** Lists all the emojis available to use on GitHub. */ - 'emojis/get': { - parameters: {} + 'enterprise-admin/create-pre-receive-environment': { responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': { [key: string]: string } + 'application/json': components['schemas']['pre-receive-environment'] } } - 304: components['responses']['not_modified'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new pre-receive environment's name. */ + name: string + /** @description URL from which to download a tarball of this environment. */ + image_url: string + } & { [key: string]: unknown } + } } } - /** - * 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': { + 'enterprise-admin/get-pre-receive-environment': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-enterprise-permissions'] + 'application/json': components['schemas']['pre-receive-environment'] } } } } /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ */ - 'enterprise-admin/set-github-actions-permissions-enterprise': { + 'enterprise-admin/delete-pre-receive-environment': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_organizations: components['schemas']['enabled-organizations'] - allowed_actions?: components['schemas']['allowed-actions'] - } & { [key: string]: unknown } + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: ({ + resource?: string + code?: string + message?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } } } } - /** - * 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': { + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + 'enterprise-admin/update-pre-receive-environment': { 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'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + /** Client Errors */ + 422: { content: { 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] + message?: string + errors?: ({ + resource?: string + code?: string + message?: string + } & { [key: string]: unknown })[] } & { [key: string]: unknown } } } } - } - /** - * Replaces the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." - * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } - responses: { - /** Response */ - 204: never - } requestBody: { content: { 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[] + /** @description This pre-receive environment's new name. */ + name?: string + /** @description URL from which to download a tarball of this environment. */ + image_url?: string } & { [key: string]: unknown } } } } /** - * 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)." + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Removes an organization from the list of selected organizations that are enabled for GitHub Actions in an enterprise. To use this endpoint, the enterprise permission policy for `enabled_organizations` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - org_id: components['parameters']['org-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * Gets the selected actions that are allowed in an enterprise. To use this endpoint, the enterprise permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an enterprise](#set-github-actions-permissions-for-an-enterprise)." + * The possible error messages are: * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ */ - 'enterprise-admin/get-allowed-actions-enterprise': { + 'enterprise-admin/start-pre-receive-environment-download': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 200: { + 202: { + content: { + 'application/json': components['schemas']['pre-receive-environment-download-status'] + } + } + /** Client Errors */ + 422: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': { + message?: string + errors?: ({ + resource?: string + code?: string + message?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } } } } } - /** - * 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': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + 'enterprise-admin/get-download-status-for-pre-receive-environment': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment-download-status'] + } } } } - /** - * Lists all self-hosted runner groups for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + 'enterprise-admin/list-pre-receive-hooks': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property to sort the results by. */ + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-enterprise'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['pre-receive-hook'][] } } } } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - } + 'enterprise-admin/create-pre-receive-hook': { responses: { /** Response */ 201: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['pre-receive-hook'] } } } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ + /** @description The name of the hook. */ name: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + /** @description The script that the hook runs. */ + script: string + /** @description The GitHub repository where the script is kept. */ + script_repository: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment: { [key: string]: unknown } + /** @description The state of enforcement for this hook. default: `disabled` */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. default: `false` */ + allow_downstream_configuration?: boolean } & { [key: string]: unknown } } } } - /** - * Gets a specific self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + 'enterprise-admin/get-pre-receive-hook': { 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['pre-receive-hook'] } } } } - /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + 'enterprise-admin/delete-pre-receive-hook': { 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { @@ -19594,63 +18504,45 @@ export interface operations { 204: never } } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + 'enterprise-admin/update-pre-receive-hook': { 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['pre-receive-hook'] } } } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ + /** @description The name of the hook. */ name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + /** @description The script that the hook runs. */ + script?: string + /** @description The GitHub repository where the script is kept. */ + script_repository?: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment?: { [key: string]: unknown } + /** @description The state of enforcement for this hook. */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. */ + allow_downstream_configuration?: boolean } & { [key: string]: unknown } } } } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Lists personal access tokens for all users, including admin users. */ + 'enterprise-admin/list-personal-access-tokens': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -19659,77 +18551,67 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['authorization'][] } } } } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + 'enterprise-admin/delete-personal-access-token': { 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'] + /** The unique identifier of the token. */ + token_id: components['parameters']['token-id'] } } responses: { /** Response */ 204: never } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: number[] - } & { [key: string]: unknown } - } - } } /** - * 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)." + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. */ - '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'] - } - } + 'enterprise-admin/create-user': { responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['simple-user'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The user's username. */ + login: string + /** + * @description **Required for built-in authentication.** The user's email + * address. This parameter can be omitted when using CAS, LDAP, or SAML. + * For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." + */ + email?: string + } & { [key: string]: unknown } + } } } /** - * 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)." + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You can delete any user account except your own. */ - 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + 'enterprise-admin/delete-user': { 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { @@ -19737,81 +18619,68 @@ export interface operations { 204: never } } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + 'enterprise-admin/update-username-for-user': { 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - headers: {} + 202: { content: { 'application/json': { - total_count: number - runners: components['schemas']['runner'][] + message?: string + url?: string } & { [key: string]: unknown } } } } + requestBody: { + content: { + 'application/json': { + /** @description The user's new username. */ + login: string + } & { [key: string]: unknown } + } + } } - /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { + 'enterprise-admin/create-impersonation-o-auth-token': { 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ - 204: never + /** Response when getting an existing impersonation OAuth token */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** Response when creating a new impersonation OAuth token */ + 201: { + content: { + 'application/json': components['schemas']['authorization'] + } + } } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** @description A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + scopes?: string[] } & { [key: string]: unknown } } } } - /** - * Adds a self-hosted runner to a runner group configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. - */ - 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + 'enterprise-admin/delete-impersonation-o-auth-token': { 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { @@ -19820,1051 +18689,1160 @@ export interface operations { } } /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + '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/enterprise-server@3.6/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: { - /** 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'] + code: string } } responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['integration'] & + ({ + client_id: string + client_secret: string + webhook_secret: string | null + pem: string + } & { [key: string]: unknown }) & { [key: string]: unknown } + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * Lists all self-hosted runners configured for an enterprise. + * 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 authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access 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'] - } - } + 'apps/get-webhook-config-for-app': { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count?: number - runners?: components['schemas']['runner'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['webhook-config'] } } } } /** - * Lists binaries for the runner application that you can download and run. + * 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 authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access 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'] - } - } + 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-application'][] + '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]: unknown } + } + } } /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token - * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/create-registration-token-for-enterprise': { + 'apps/list-webhook-deliveries': { parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['hook-delivery-item'][] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. + * Returns a delivery for the webhook configured for a GitHub App. * - * ``` - * ./config.sh remove --token TOKEN - * ``` + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/create-remove-token-for-enterprise': { + 'apps/get-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Gets a specific self-hosted runner configured in an enterprise. + * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + 'apps/redeliver-webhook-delivery': { 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'] + delivery_id: components['parameters']['delivery-id'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner'] - } - } + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * The permissions the installation has are included under the `permissions` key. */ - 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { + 'apps/list-installations': { 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'] + query: { + /** The number of 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: { - /** Response */ - 204: never + /** The permissions the installation has are included under the `permissions` key. */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['installation'][] + } + } } } /** - * Lists all labels for a self-hosted runner configured in an enterprise. + * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { + 'apps/get-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['installation'] + } + } 404: components['responses']['not_found'] } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. + * 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + 'apps/delete-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** Response */ + 204: never 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } & { [key: string]: unknown } - } } } /** - * Add custom labels to a self-hosted runner configured in an enterprise. + * 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 authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + 'apps/create-installation-access-token': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['installation-token'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] + /** @description List of repository names that the token should have access to */ + repositories?: string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] } & { [key: string]: unknown } } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. + * 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 Enterprise Server API or webhook events is blocked for that account. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + 'apps/suspend-installation': { 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'] + path: { + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] + /** Response */ + 204: never 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } } /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Removes a GitHub App installation suspension. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + 'apps/unsuspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** Response */ + 204: never 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } } - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - 'enterprise-admin/get-audit-log': { + /** + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: { - 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['audit-log-event'][] + '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'] } } - /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - */ - 'secret-scanning/list-alerts-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] + 'application/json': components['schemas']['application-grant'] } } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * The authenticated user must be an enterprise admin. + * 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). */ - 'billing/get-github-actions-billing-ghe': { + 'oauth-authorizations/delete-grant': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] + } + } + responses: { + /** 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/enterprise-server@3.6/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 the GitHub app. */ + client_id: components['parameters']['client-id'] + } + } + responses: { + /** Response */ + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } & { [key: string]: unknown } + } + } + } + /** 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/enterprise-server@3.6/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 the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-billing-usage'] + 'application/json': components['schemas']['authorization'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The access_token of the OAuth application. */ + access_token: string + } & { [key: string]: unknown } + } } } - /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - 'billing/get-github-advanced-security-billing-ghe': { + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-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 */ + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } & { [key: string]: unknown } + } + } + } + /** 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/enterprise-server@3.6/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 the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { - /** Success */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['advanced-security-active-committers'] + 'application/json': components['schemas']['authorization'] } } - 403: components['responses']['code_scanning_forbidden_read'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The access_token of the OAuth application. */ + access_token: string + } & { [key: string]: unknown } + } } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - 'billing/get-github-packages-billing-ghe': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['packages-billing-usage'] + 'application/json': components['schemas']['authorization'] } } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } & { [key: string]: unknown } + } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * **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`). * - * The authenticated user must be an enterprise admin. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'billing/get-shared-storage-billing-ghe': { + 'apps/get-by-slug': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + app_slug: components['parameters']['app-slug'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['combined-billing-usage'] + 'application/json': components['schemas']['integration'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** 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': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['authorization'][] } } 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 503: components['responses']['service_unavailable'] + 404: components['responses']['not_found'] } } /** - * 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: + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * * **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. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/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/enterprise-server@3.6/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 Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * - * **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. + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ - 'activity/get-feeds': { + 'oauth-authorizations/create-authorization': { parameters: {} responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['feed'] + 'application/json': components['schemas']['authorization'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description The OAuth app client key for which to create the token. */ + client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } & { [key: string]: unknown } + } } } - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - 'gists/list': { + /** + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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'] + path: { + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] } } responses: { - /** Response */ + /** if returning an existing token */ 200: { - headers: {} + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': components['schemas']['authorization'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] } } 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } & { [key: string]: unknown } + } } } /** - * Allows you to add a new gist with one or more files. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ - 'gists/create': { - parameters: {} + 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { + parameters: { + path: { + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-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']['gist-simple'] + 'application/json': components['schemas']['authorization'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string /** - * @description Description of the gist - * @example Example Ruby script + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] */ - description?: string + scopes?: string[] | null /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } + * @description A note to remind you what the OAuth token is for. + * @example Update all gems */ - files: { - [key: string]: { - /** @description Content of the file */ - content: string - } & { [key: string]: unknown } - } - public?: (boolean | ('true' | 'false')) & { [key: string]: unknown } + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string } & { [key: string]: unknown } } } } - /** - * 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': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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'] + path: { + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': components['schemas']['authorization'] } } 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } } - /** List the authenticated user's starred gists: */ - 'gists/list-starred': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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'] + path: { + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[] + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[] + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } & { [key: string]: unknown } } } + } + 'codes-of-conduct/get-all-codes-of-conduct': { + parameters: {} responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': components['schemas']['code-of-conduct'][] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - 'gists/get': { + 'codes-of-conduct/get-conduct-code': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + key: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['gist-simple'] + 'application/json': components['schemas']['code-of-conduct'] } } 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'] - } - } + /** Lists all the emojis available to use on GitHub Enterprise Server. */ + 'emojis/get': { + parameters: {} responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': { [key: string]: string } + } + } 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'] + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + 'enterprise-admin/get-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } } } + } + /** Removes the global announcement banner in your enterprise. */ + 'enterprise-admin/remove-announcement': { + responses: { + /** Response */ + 204: never + } + } + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + 'enterprise-admin/set-announcement': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['gist-simple'] + 'application/json': components['schemas']['announcement'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | ({ - /** - * @description Description of the gist - * @example Example Ruby script - */ - description?: string - /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } - */ - files?: { [key: string]: { [key: string]: unknown } } - } & { [key: string]: unknown }) - | null + 'application/json': components['schemas']['announcement'] } } } - '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'] - } - } + 'enterprise-admin/get-license-information': { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-comment'][] + 'application/json': components['schemas']['license-info'] } } - 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'] - } - } + 'enterprise-admin/get-all-stats': { responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['gist-comment'] + 'application/json': components['schemas']['enterprise-overview'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } & { [key: string]: unknown } - } } } - 'gists/get-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } + 'enterprise-admin/get-comment-stats': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['gist-comment'] + 'application/json': components['schemas']['enterprise-comment-overview'] } } - 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'] - } - } + 'enterprise-admin/get-gist-stats': { responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/update-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + 200: { + content: { + 'application/json': components['schemas']['enterprise-gist-overview'] + } } } + } + 'enterprise-admin/get-hooks-stats': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['gist-comment'] + 'application/json': components['schemas']['enterprise-hook-overview'] } } - 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } & { [key: string]: unknown } + } + 'enterprise-admin/get-issue-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-issue-overview'] + } } } } - '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'] + 'enterprise-admin/get-milestone-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-milestone-overview'] + } } } + } + 'enterprise-admin/get-org-stats': { responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['gist-commit'][] + 'application/json': components['schemas']['enterprise-organization-overview'] } } - 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'] + 'enterprise-admin/get-pages-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-page-overview'] + } } } + } + 'enterprise-admin/get-pull-request-stats': { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-simple'][] + 'application/json': components['schemas']['enterprise-pull-request-overview'] } } - 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'] + 'enterprise-admin/get-repo-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-repository-overview'] + } } } + } + 'enterprise-admin/get-user-stats': { responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['base-gist'] + 'application/json': components['schemas']['enterprise-user-overview'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'gists/check-is-starred': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'actions/get-actions-cache-usage-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response if gist is starred */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - 404: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] } } } } - /** 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': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-policy-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] + } + } } } - 'gists/unstar': { + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/set-actions-cache-usage-policy-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] + } } } - 'gists/get-revision': { + /** + * 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: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - sha: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } - 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[] + 'application/json': components['schemas']['actions-enterprise-permissions'] } } - 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. + * 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. */ - 'gitignore/get-template': { + 'enterprise-admin/set-github-actions-permissions-enterprise': { parameters: { path: { - name: string + /** 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']['gitignore-template'] - } + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_organizations: components['schemas']['enabled-organizations'] + allowed_actions?: components['schemas']['allowed-actions'] + } & { [key: string]: unknown } } - 304: components['responses']['not_modified'] } } /** - * List repositories that an app installation can access. + * 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 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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'apps/list-repos-accessible-to-installation': { + '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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20873,377 +19851,357 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { 'application/json': { total_count: number - repositories: components['schemas']['repository'][] - /** @example selected */ - repository_selection?: string + organizations: components['schemas']['organization-simple'][] } & { [key: string]: unknown } } } - 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. + * 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 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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'apps/revoke-installation-access-token': { - parameters: {} + 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } responses: { /** Response */ 204: never } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[] + } & { [key: string]: unknown } + } + } } /** - * 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. - * + * 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)." * - * **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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'issues/list': { + 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { parameters: { - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - collab?: boolean - orgs?: boolean - owned?: boolean - pulls?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } 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'] + 204: never } } - 'licenses/get-all-commonly-used': { + /** + * 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: { - query: { - featured?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['license-simple'][] - } - } - 304: components['responses']['not_modified'] + 204: never } } - 'licenses/get': { + /** + * 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: { - license: string + /** 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']['license'] + 'application/json': components['schemas']['selected-actions'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'markdown/render': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: { - 'Content-Length'?: string - } - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] - } - requestBody: { - content: { - 'application/json': { - /** @description The Markdown text to render in HTML. */ - text: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - mode?: 'markdown' | 'gfm' - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - context?: string - } & { [key: string]: unknown } + /** + * 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'] } } - } - /** 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'] + 204: never } requestBody: { content: { - 'text/plain': string - 'text/x-markdown': string + 'application/json': components['schemas']['selected-actions'] } } } /** - * 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. + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." * - * 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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'apps/get-subscription-plan-for-account': { + 'actions/get-github-actions-default-workflow-permissions-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response */ + /** Success response */ 200: { content: { - 'application/json': components['schemas']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } } } /** - * Lists all plans that are part of your GitHub Marketplace listing. + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." * - * 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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'apps/list-plans': { + 'actions/set-github-actions-default-workflow-permissions-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] - } + /** Success response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } - 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. + * Lists all self-hosted runner groups for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-accounts-for-plan': { + 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { parameters: { path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components['parameters']['visible-to-organization'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': { + total_count: number + runner_groups: components['schemas']['runner-groups-enterprise'][] + } & { [key: string]: unknown } } } - 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. + * Creates a new self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/get-subscription-plan-for-account-stubbed': { + 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['marketplace-purchase'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: unknown + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} + */ + visibility?: 'selected' | 'all' + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } & { [key: string]: unknown } + } } } /** - * Lists all plans that are part of your GitHub Marketplace listing. + * Gets a specific self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-plans-stubbed': { + 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 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. + * Deletes a self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-accounts-for-plan-stubbed': { + 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { 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'] + /** 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: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-purchase'][] - } - } - 401: components['responses']['requires_authentication'] + 204: never } } /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'meta/get': { - parameters: {} + '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']['api-overview'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name?: string + /** + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } & { [key: string]: unknown } + } } } - 'activity/list-public-events-for-repo-network': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21253,941 +20211,842 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } & { [key: string]: unknown } } } - 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': { + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { - 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'][] - } + 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'] } - 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]: unknown } - } - } - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } requestBody: { content: { 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. - */ - last_read_at?: string - /** @description Whether the notification has been read. */ - read?: boolean + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[] } & { [key: string]: unknown } } } } - 'activity/get-thread': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } } - 'activity/mark-thread-as-read': { + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] + /** Response */ + 204: never } } /** - * 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). + * Lists the self-hosted runners that are in a specific enterprise group. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'activity/get-thread-subscription-for-authenticated-user': { + 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** 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: { + /** The number of results per page (max 100). */ + per_page?: 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-subscription'] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } & { [key: string]: unknown } } } - 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. + * Replaces the list of self-hosted runners that are part of an enterprise runner group. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'activity/set-thread-subscription': { + 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** 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']['thread-subscription'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } requestBody: { content: { 'application/json': { - /** - * @description Whether to block all notifications from a thread. - * @default false - */ - ignored?: boolean + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } & { [key: string]: unknown } } } } - /** 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': { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never - 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. + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'orgs/list': { + 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { 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'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['organization-simple'][] - } - } - 304: components['responses']['not_modified'] + 204: never } } /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. + * Lists all self-hosted runners configured for an enterprise. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'orgs/list-custom-roles': { + 'enterprise-admin/list-self-hosted-runners-for-enterprise': { parameters: { path: { - organization_id: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response - list of custom role names */ + /** Response */ 200: { + headers: {} content: { 'application/json': { - /** - * @description The number of custom roles in this organization - * @example 3 - */ total_count?: number - custom_roles?: components['schemas']['organization-custom-repository-role'][] + runners?: components['schemas']['runner'][] } & { [key: string]: unknown } } } } } /** - * Lists a connection between a team and an external group. + * Lists binaries for the runner application that you can download and run. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'teams/list-linked-external-idp-groups-to-team-for-org': { + 'enterprise-admin/list-runner-applications-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** 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']['external-groups'] + 'application/json': components['schemas']['runner-application'][] } } } } /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. * - * 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." + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` */ - 'orgs/get': { + 'enterprise-admin/create-registration-token-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['organization-full'] + 'application/json': components['schemas']['authentication-token'] } } - 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). + * 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. * - * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` */ - 'orgs/update': { + 'enterprise-admin/create-remove-token-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** 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']['organization-full'] - } - } - 409: components['responses']['conflict'] - /** Validation failed */ - 422: { + 201: { content: { - 'application/json': (components['schemas']['validation-error'] | components['schemas']['validation-error-simple']) & { - [key: string]: unknown - } - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string - /** @description The company name. */ - company?: string - /** @description The publicly visible email address. */ - email?: string - /** @description The Twitter username of the company. */ - twitter_username?: string - /** @description The location. */ - location?: string - /** @description The shorthand name of the company. */ - name?: string - /** @description The description of the company. */ - description?: string - /** @description Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_repositories?: boolean - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_public_pages?: boolean - /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false - */ - members_can_fork_private_repositories?: boolean - /** @example "http://github.blog" */ - blog?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['authentication-token'] + } } } } /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + * Gets a specific self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/get-github-actions-permissions-organization': { + 'enterprise-admin/get-self-hosted-runner-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** 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']['actions-organization-permissions'] + 'application/json': components['schemas']['runner'] } } } } /** - * 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. + * 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:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/set-github-actions-permissions-organization': { + 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never } - requestBody: { - content: { - 'application/json': { - enabled_repositories: components['schemas']['enabled-repositories'] - allowed_actions?: components['schemas']['allowed-actions'] - } & { [key: string]: unknown } - } - } } /** - * 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)." + * Lists all labels for a self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/list-selected-repositories-enabled-github-actions-organization': { + 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { 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'] + /** 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': { - total_count: number - repositories: components['schemas']['repository'][] - } & { [key: string]: unknown } - } - } + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] } } /** - * 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)." + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/set-selected-repositories-enabled-github-actions-organization': { + 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[] + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] } & { [key: string]: unknown } } } } /** - * 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)." + * Add custom labels to a self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/enable-selected-repository-github-actions-organization': { + 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } - } - /** - * 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'] + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } & { [key: string]: unknown } } } - responses: { - /** Response */ - 204: never - } } /** - * Gets the selected actions that are allowed in an organization. To use this endpoint, the organization permission policy for `allowed_actions` must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)."" + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/get-allowed-actions-organization': { + 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** 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']['selected-actions'] - } - } + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * 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. + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. * - * 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. + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'actions/set-allowed-actions-organization': { + 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] } } responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-default-workflow-permissions-organization': { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + 'enterprise-admin/get-audit-log': { parameters: { path: { - org: components['parameters']['org'] + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + 'application/json': components['schemas']['audit-log-event'][] } } } } /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ - 'actions/set-github-actions-default-workflow-permissions-organization': { + 'secret-scanning/list-alerts-for-enterprise': { parameters: { path: { - org: components['parameters']['org'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-secret-scanning-alert'][] + } } + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * 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 the GitHub Advanced Security active committers for an enterprise per repository. * - * Lists all self-hosted runner groups configured in an organization and inherited from an enterprise. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - 'actions/list-self-hosted-runner-groups-for-org': { + 'billing/get-github-advanced-security-billing-ghe': { parameters: { path: { - org: components['parameters']['org'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Success */ 200: { content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-org'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['advanced-security-active-committers'] } } + 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * 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': { + /** 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: { - path: { - org: components['parameters']['org'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['event'][] } } - } - requestBody: { - content: { - 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean - } & { [key: string]: unknown } - } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 503: components['responses']['service_unavailable'] } } /** - * 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)." + * GitHub Enterprise Server 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: * - * Gets a specific self-hosted runner group for an organization. + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ - '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'] - } - } + 'activity/get-feeds': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['feed'] } } } } - /** - * 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': { + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + 'gists/list': { parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['base-gist'][] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * 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. + * Allows you to add a new gist with one or more files. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ - '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'] - } - } + 'gists/create': { + parameters: {} responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['runner-groups-org'] + '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 Name of the runner group. */ - name: string /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} + * @description Description of the gist + * @example Example Ruby script */ - visibility?: 'selected' | 'all' | 'private' + description?: string /** - * @description Whether the runner group can be used by `public` repositories. - * @default false + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } */ - allows_public_repositories?: boolean + files: { + [key: string]: { + /** @description Content of the file */ + content: string + } & { [key: string]: unknown } + } + public?: (boolean | ('true' | 'false')) & { [key: string]: unknown } } & { [key: string]: unknown } } } } /** - * 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. + * List public gists sorted by most recently updated to least recently updated. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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. */ - 'actions/list-repo-access-to-self-hosted-runner-group-in-org': { + 'gists/list-public': { parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + } + } + 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'] + /** The number of results per page (max 100). */ 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']['minimal-repository'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['base-gist'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * 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': { + 'gists/get': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: number[] - } & { [key: string]: unknown } + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/delete': { 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'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + /** Allows you to update a gist's description and to update, delete, or 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: { - 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'] + /** The unique identifier of the gist. */ + 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'] } - responses: { - /** Response */ - 204: never + requestBody: { + content: { + 'application/json': + | ({ + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: { [key: string]: unknown } } + } & { [key: string]: unknown }) + | null + } } } - /** - * 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': { + 'gists/list-comments': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22198,361 +21057,305 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['gist-comment'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/create-comment': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 204: never + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['gist-comment'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string } & { [key: string]: unknown } } } } - /** - * 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': { + 'gists/get-comment': { 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'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['gist-comment'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/delete-comment': { 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'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/update-comment': { 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'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['gist-comment'] } } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string + } & { [key: string]: unknown } + } } } - /** - * 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': { + 'gists/list-commits': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per 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']['runner-application'][] + 'application/json': components['schemas']['gist-commit'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/list-forks': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['gist-simple'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/fork': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['authentication-token'] + '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'] } } - /** - * 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': { + 'gists/check-is-starred': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Response */ - 200: { + /** Response if gist is starred */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + 404: { content: { - 'application/json': components['schemas']['runner'] + 'application/json': { [key: string]: unknown } } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'gists/star': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists all labels for a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/list-labels-for-self-hosted-runner-for-org': { + 'gists/unstar': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/set-custom-labels-for-self-hosted-runner-for-org': { + 'gists/get-revision': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + sha: string } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } & { [key: string]: unknown } + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** - * Add custom labels to a self-hosted runner configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/add-custom-labels-to-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + 'gitignore/get-all-templates': { + parameters: {} responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } & { [key: string]: unknown } + /** Response */ + 200: { + content: { + 'application/json': string[] + } } + 304: components['responses']['not_modified'] } } /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ - 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { + 'gitignore/get-template': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + name: string } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gitignore-template'] + } + } + 304: components['responses']['not_modified'] } } /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * List repositories that an app installation can access. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/remove-custom-label-from-self-hosted-runner-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] - } - } - responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** Lists 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': { + 'apps/list-repos-accessible-to-installation': { parameters: { - path: { - org: components['parameters']['org'] - } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22565,733 +21368,613 @@ export interface operations { content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-actions-secret'][] + repositories: components['schemas']['repository'][] + /** @example selected */ + repository_selection?: string } & { [key: string]: unknown } } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** 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'] - } - } + /** + * 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + */ + 'apps/revoke-installation-access-token': { + parameters: {} responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-actions-secret'] - } - } + 204: never } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * 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) - * ``` + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'actions/create-or-update-org-secret': { + 'issues/list': { parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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 + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['issue'][] } } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] - } & { [key: string]: unknown } - } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + 'licenses/get-all-commonly-used': { parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + query: { + featured?: boolean + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['license-simple'][] + } + } + 304: components['responses']['not_modified'] } } - /** 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': { + 'licenses/get': { parameters: { path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + license: string } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['license'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** 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'] - } - } + 'markdown/render': { + parameters: {} responses: { /** Response */ - 204: never + 200: { + headers: { + 'Content-Length'?: string + } + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] } requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] + /** @description The Markdown text to render in HTML. */ + text: string + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: 'markdown' | 'gfm' + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string } & { [key: string]: unknown } } } } - /** 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 - } - } + /** 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: { - /** No Content when repository was added to the selected list */ - 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown + /** Response */ + 200: { + headers: {} + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] } - } - /** 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 + requestBody: { + content: { + 'text/plain': string + 'text/x-markdown': string } } + } + 'meta/get': { + parameters: {} responses: { - /** Response when repository was removed from the selected list */ - 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['api-overview'] + } + } + 304: components['responses']['not_modified'] } } - /** - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - */ - 'orgs/get-audit-log': { + 'activity/list-public-events-for-repo-network': { parameters: { path: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } 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) */ + /** The number of results 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']['audit-log-event'][] + '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 the users blocked by an organization. */ - 'orgs/list-blocked-users': { + /** List all notifications for the current user, sorted by most recently updated. */ + 'activity/list-notifications-for-authenticated-user': { parameters: { - path: { - org: components['parameters']['org'] + 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'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 50). */ + per_page?: number } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['thread'][] } } - 415: components['responses']['preview_header_missing'] + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } } - 'orgs/check-blocked-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-notifications-as-read': { + parameters: {} responses: { - /** If the user is blocked: */ - 204: never - /** If the user is not blocked: */ - 404: { + /** Response */ + 202: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': { + message?: string + } & { [key: string]: unknown } } } + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * Format: date-time + * @description Describes the last point that notifications were checked. 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 + /** @description Whether the notification has been read. */ + read?: boolean + } & { [key: string]: unknown } + } } } - 'orgs/block-user': { + /** Gets information about a notification thread. */ + 'activity/get-thread': { parameters: { path: { - org: components['parameters']['org'] - username: components['parameters']['username'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['thread'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - 'orgs/unblock-user': { + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ + 'activity/mark-thread-as-read': { parameters: { path: { - org: components['parameters']['org'] - username: components['parameters']['username'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { - /** Response */ - 204: never + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). * - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * 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. */ - 'code-scanning/list-alerts-for-org': { + 'activity/get-thread-subscription-for-authenticated-user': { parameters: { path: { - org: components['parameters']['org'] - } - query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - sort?: 'created' | 'updated' + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['code-scanning-organization-alert-items'][] + 'application/json': components['schemas']['thread-subscription'] } } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * 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. * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ - 'orgs/list-saml-sso-authorizations': { + 'activity/set-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - login?: string + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['credential-authorization'][] + 'application/json': components['schemas']['thread-subscription'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean + } & { [key: string]: unknown } + } } } - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - 'orgs/remove-saml-sso-authorization': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + 'activity/delete-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - credential_id: number + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-org-secrets': { + /** Get the octocat as ASCII art */ + 'meta/get-octocat': { 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'] + /** The words to show in Octocat's speech bubble */ + s?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['organization-dependabot-secret'][] - } & { [key: string]: unknown } + 'application/octocat-stream': string } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-public-key': { + /** + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. + * + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. + */ + 'orgs/list': { parameters: { - path: { - org: components['parameters']['org'] + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components['parameters']['since-org'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - content: { - 'application/json': components['schemas']['dependabot-public-key'] + headers: { + Link?: string } - } - } - } - /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { content: { - 'application/json': components['schemas']['organization-dependabot-secret'] + 'application/json': components['schemas']['organization-simple'][] } } + 304: components['responses']['not_modified'] } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - 'dependabot/create-or-update-org-secret': { + 'orgs/list-custom-roles': { parameters: { path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the organization. */ + organization_id: string } } responses: { - /** Response when creating a secret */ - 201: { + /** Response - list of custom role names */ + 200: { content: { - 'application/json': components['schemas']['empty-object'] - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] - } & { [key: string]: unknown } - } - } - } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/delete-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + 'application/json': { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number + custom_roles?: components['schemas']['organization-custom-repository-role'][] + } & { [key: string]: unknown } + } } } - responses: { - /** Response */ - 204: never - } } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-selected-repos-for-org-secret': { + /** + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + * + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." + */ + 'orgs/get': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['organization-full'] } } + 404: components['responses']['not_found'] } } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/set-selected-repos-for-org-secret': { + /** + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 409: components['responses']['conflict'] + /** Validation failed */ + 422: { + content: { + 'application/json': (components['schemas']['validation-error'] | components['schemas']['validation-error-simple']) & { + [key: string]: unknown + } + } + } } requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] + /** @description Billing email address. This address is not publicized. */ + billing_email?: string + /** @description The company name. */ + company?: string + /** @description The publicly visible email address. */ + email?: string + /** @description The Twitter username of the company. */ + twitter_username?: string + /** @description The location. */ + location?: string + /** @description The shorthand name of the company. */ + name?: string + /** @description The description of the company. */ + description?: string + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean + /** @description 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+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean + /** + * @description Specifies which types of repositories non-admin organization members can create. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean + /** @example "http://github.blog" */ + blog?: string } & { [key: string]: unknown } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/add-selected-repo-to-org-secret': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number } } responses: { - /** No Content when repository was added to the selected list */ - 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown - } - } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/remove-selected-repo-from-org-secret': { - parameters: { - path: { - org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } } } - responses: { - /** Response when repository was removed from the selected list */ - 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown - } } - 'activity/list-public-org-events': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-by-repo-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23300,96 +21983,77 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['event'][] + 'application/json': { + total_count: number + repository_cache_usages: components['schemas']['actions-cache-usage-by-repository'][] + } & { [key: string]: unknown } } } } } /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * 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. */ - 'teams/external-idp-group-info-for-org': { + 'actions/get-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** group_id parameter */ - group_id: components['parameters']['group-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['external-group'] + 'application/json': components['schemas']['actions-organization-permissions'] } } } } /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * 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 can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * 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. */ - 'teams/list-external-idp-groups-for-org': { + 'actions/set-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list to groups containing the text in the group name */ - display_name?: string - } } responses: { /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['external-groups'] - } - } - } - } - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - 'orgs/list-failed-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } + 204: never } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } + requestBody: { + content: { + 'application/json': { + enabled_repositories: components['schemas']['enabled-repositories'] + allowed_actions?: components['schemas']['allowed-actions'] + } & { [key: string]: unknown } } - 404: components['responses']['not_found'] } } - 'orgs/list-webhooks': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23398,358 +22062,438 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['org-hook'][] + 'application/json': { + total_count: number + repositories: components['schemas']['repository'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] } } - /** Here's how you can create a hook that posts payloads in JSON format: */ - 'orgs/create-webhook': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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'] + 204: never } requestBody: { content: { 'application/json': { - /** @description Must be passed as "web". */ - name: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ - config: { - 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'] - /** @example "kdaigle" */ - username?: string - /** @example "password" */ - password?: string - } & { [key: string]: unknown } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[] } & { [key: string]: unknown } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['org-hook'] - } - } - 404: components['responses']['not_found'] + 204: never } } - 'orgs/delete-webhook': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] } } - /** Updates a webhook configured in an organization. When you update a webhook, the `secret` will be overwritten. If you previously had a `secret` set, you must provide the same `secret` or set a new `secret` or the secret will be removed. If you are only updating individual webhook `config` properties, use "[Update a webhook configuration for an organization](/rest/reference/orgs#update-a-webhook-configuration-for-an-organization)." */ - 'orgs/update-webhook': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['org-hook'] + 'application/json': components['schemas']['selected-actions'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ - config?: { - 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]: unknown } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - /** @example "web" */ - name?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['selected-actions'] } } } /** - * 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)." + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + * 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. */ - 'orgs/get-webhook-config-for-org': { + 'actions/get-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } } } /** - * 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)." + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. + * 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. */ - 'orgs/update-webhook-config-for-org': { + 'actions/set-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown } 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'] - } + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - /** Returns a list of webhook deliveries for a webhook configured in an organization. */ - 'orgs/list-webhook-deliveries': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components['parameters']['visible-to-repository'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook-delivery-item'][] + 'application/json': { + total_count: number + runner_groups: components['schemas']['runner-groups-org'][] + } & { [key: string]: unknown } } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** Returns a delivery for a webhook configured in an organization. */ - 'orgs/get-webhook-delivery': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['runner-groups-org'] } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } & { [key: string]: unknown } + } } } - /** Redeliver a delivery for a webhook configured in an organization. */ - 'orgs/redeliver-webhook-delivery': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['runner-groups-org'] + } + } } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'orgs/ping-webhook': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - hook_id: components['parameters']['hook-id'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] } } /** - * Enables an authenticated GitHub App to find the organization's installation information. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * 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. */ - 'apps/get-org-installation': { + 'actions/update-self-hosted-runner-group-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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']['installation'] + 'application/json': components['schemas']['runner-groups-org'] } } } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } & { [key: string]: unknown } + } + } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - headers: {} content: { 'application/json': { total_count: number - installations: components['schemas']['installation'][] + repositories: components['schemas']['minimal-repository'][] } & { [key: string]: unknown } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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']['interaction-limit-response'] | { [key: string]: unknown }) & { [key: string]: unknown } - } + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[] + } & { [key: string]: unknown } } } } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - 'interactions/set-restrictions-for-org': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } + 204: never } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { @@ -23757,14 +22501,20 @@ export interface operations { 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23775,135 +22525,93 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] } } /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'orgs/create-invitation': { + 'actions/set-self-hosted-runners-in-group-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ - 201: { - content: { - 'application/json': components['schemas']['organization-invitation'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 204: never } requestBody: { content: { 'application/json': { - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - invitee_id?: number - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - email?: string - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } & { [key: string]: unknown } } } } /** - * 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). + * 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. */ - 'orgs/cancel-invitation': { + 'actions/add-self-hosted-runner-to-group-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never - 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] + 204: never } } /** - * List issues in an organization assigned to the authenticated user. + * Lists all self-hosted runners configured in an organization. * - * **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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'issues/list-for-org': { + 'actions/list-self-hosted-runners-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23914,333 +22622,267 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } & { [key: string]: unknown } } } - 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['runner-application'][] } } - /** Response if requester is not an organization member */ - 302: never - 422: components['responses']['validation_failed'] - } - } - /** Check if a user is, publicly or privately, a member of the organization. */ - 'orgs/check-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if requester is an organization member and user is a member */ - 204: never - /** Response if requester is not an organization member */ - 302: never - /** Not Found if requester is an organization member and user is not a member */ - 404: unknown } } - /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ - 'orgs/remove-member': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } } } - /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ - 'orgs/get-membership-for-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['org-membership'] + 'application/json': components['schemas']['authentication-token'] } } - 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** + * Gets a specific self-hosted runner configured in an organization. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/set-membership-for-user': { + 'actions/get-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['org-membership'] + 'application/json': components['schemas']['runner'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The role to give the user in the organization. Can be one of: - * \* `admin` - The user will become an owner of the organization. - * \* `member` - The user will become a non-owner member of the organization. - * @default member - * @enum {string} - */ - role?: 'admin' | 'member' - } & { [key: string]: unknown } - } } } /** - * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. + * 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. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/remove-membership-for-user': { + 'actions/delete-self-hosted-runner-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** Lists the most recent migrations. */ - 'migrations/list-for-org': { + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Exclude attributes from the API response to improve performance */ - exclude?: 'repositories'[] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['migration'][] - } - } + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] } } - /** Initiates the generation of a migration archive. */ - 'migrations/start-for-org': { + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/set-custom-labels-for-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['migration'] - } - } + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description A list of arrays indicating which repositories should be migrated. */ - repositories: string[] - /** - * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. - * @default false - * @example true - */ - lock_repositories?: boolean - /** - * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). - * @default false - * @example true - */ - exclude_attachments?: boolean - /** - * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). - * @default false - * @example true - */ - exclude_releases?: boolean - /** - * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. - * @default false - * @example true - */ - exclude_owner_projects?: boolean - exclude?: 'repositories'[] + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] } & { [key: string]: unknown } } } } /** - * Fetches the status of a migration. - * - * The `state` of a migration can be one of the following values: + * Add custom labels to a self-hosted runner configured in an organization. * - * * `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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'migrations/get-status-for-org': { + 'actions/add-custom-labels-to-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Exclude attributes from the API response to improve performance */ - exclude?: 'repositories'[] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-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'] - } - } + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } - } - /** 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'] + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } & { [key: string]: unknown } } } - 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': { + /** + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels_readonly'] 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': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** List all the repositories for this organization migration. */ - 'migrations/list-repos-for-org': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24251,328 +22893,375 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': { + total_count: number + secrets: components['schemas']['organization-actions-secret'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] } } - /** List all users who are outside collaborators of an organization. */ - 'orgs/list-outside-collaborators': { + /** 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: { + /** The organization name. The name is not case sensitive. */ 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: { + 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['organization-actions-secret'] } } } } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ - 'orgs/convert-member-to-outside-collaborator': { + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'actions/create-or-update-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** User is getting converted asynchronously */ - 202: { + /** Response when creating a secret */ + 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } - /** User was converted */ + /** Response when updating a secret */ 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ - 403: unknown - 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[] + } & { [key: string]: unknown } + } } } - /** Removing a user from this list will remove them from all the organization's repositories. */ - 'orgs/remove-outside-collaborator': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 204: never - /** Unprocessable Entity if user is a member of the organization */ - 422: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } - } - } } } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-organization': { + /** 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: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'][] + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } & { [key: string]: unknown } } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-organization': { + /** 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/enterprise-server@3.6/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: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] + } & { [key: string]: unknown } } } } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-org': { + /** 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/enterprise-server@3.6/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: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number } } responses: { - /** Response */ + /** No Content when repository was added to the selected list */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + /** Conflict when visibility type is not set to selected */ + 409: unknown } } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-org': { + /** 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/enterprise-server@3.6/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: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** package token */ - token?: string + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number } } responses: { - /** Response */ + /** Response when repository was removed from the selected list */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + /** Conflict when visibility type not set to selected */ + 409: unknown } } /** - * Returns all package versions for a package owned by an organization. + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * 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. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ - 'packages/get-all-package-versions-for-package-owned-by-org': { + 'orgs/get-audit-log': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'][] + 'application/json': components['schemas']['audit-log-event'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } /** - * Gets a specific package version in an organization. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * - * 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. + * GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'packages/get-package-version-for-organization': { + 'code-scanning/list-alerts-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + } + 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'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['package-version'] + 'application/json': components['schemas']['code-scanning-organization-alert-items'][] } } - } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - /** 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': { + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-org-secrets': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24583,103 +23272,172 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project'][] + 'application/json': { + total_count: number + secrets: components['schemas']['organization-dependabot-secret'][] + } & { [key: string]: unknown } } } - 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': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-public-key': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['dependabot-public-key'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the project. */ - name: string - /** @description The description of the project. */ - body?: string - } & { [key: string]: unknown } - } } } - /** Members of an organization can choose to have their membership publicized or not. */ - 'orgs/list-public-members': { + /** Gets a single organization secret without revealing its encrypted value. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['organization-dependabot-secret'] } } } } - 'orgs/check-public-membership-for-user': { - parameters: { - path: { - org: components['parameters']['org'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a public member */ - 204: never - /** Not Found if user is not a public member */ - 404: unknown - } - } /** - * The user can publicize their own membership. (A user cannot publicize the membership for another user.) + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. * - * 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)." + * ```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) + * ``` */ - 'orgs/set-public-membership-for-authenticated-user': { + 'dependabot/create-or-update-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ 204: never - 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: string[] + } & { [key: string]: unknown } + } } } - 'orgs/remove-public-membership-for-authenticated-user': { + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/delete-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { @@ -24687,291 +23445,156 @@ export interface operations { 204: never } } - /** Lists repositories for the specified organization. */ - 'repos/list-for-org': { + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ - type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ - sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ - direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } & { [key: string]: unknown } } } } } - /** - * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-in-org': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/set-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] + 204: never } requestBody: { content: { 'application/json': { - /** @description The name of the repository. */ - name: string - /** @description A short description of the repository. */ - description?: string - /** @description A URL with more information about the repository. */ - homepage?: string - /** - * @description Whether the repository is private. - * @default false - */ - private?: boolean - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. - * @enum {string} - */ - visibility?: 'public' | 'private' | 'internal' - /** - * @description Either `true` to enable issues for this repository or `false` to disable them. - * @default true - */ - has_issues?: boolean - /** - * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - * @default true - */ - has_projects?: boolean - /** - * @description Either `true` to enable the wiki for this repository or `false` to disable it. - * @default true - */ - has_wiki?: boolean - /** - * @description Either `true` to make this repo available as a template repository or `false` to prevent it. - * @default false - */ - is_template?: boolean - /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ - team_id?: number - /** - * @description Pass `true` to create an initial commit with empty README. - * @default false - */ - auto_init?: boolean - /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ - gitignore_template?: string - /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ - license_template?: string - /** - * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - * @default true - */ - allow_squash_merge?: boolean - /** - * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - * @default true - */ - allow_merge_commit?: boolean - /** - * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - * @default true - */ - allow_rebase_merge?: boolean - /** - * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. - * @default false - */ - allow_auto_merge?: boolean - /** - * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. - * @default false - */ - delete_branch_on_merge?: boolean - } & { [key: string]: unknown } - } - } - } - /** - * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-alerts-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] - } + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] + } & { [key: string]: unknown } } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-actions-billing-org': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/add-selected-repo-to-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown } } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - 'billing/get-github-advanced-security-billing-org': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/remove-selected-repo-from-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number } } responses: { - /** Success */ - 200: { - content: { - 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-packages-billing-org': { + 'activity/list-public-org-events': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results 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']['packages-billing-usage'] + 'application/json': components['schemas']['event'][] } } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * Access tokens must have the `repo` or `admin:org` scope. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ - 'billing/get-shared-storage-billing-org': { + 'teams/external-idp-group-info-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the group. */ + group_id: components['parameters']['group-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['combined-billing-usage'] + 'application/json': components['schemas']['external-group'] } } } } /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server 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)." * - * 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)." + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ - 'teams/list-idp-groups-for-org': { + 'teams/list-external-idp-groups-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page token */ - page?: string + page?: number + /** Limits the list to groups containing the text in the group name */ + display_name?: string } } responses: { @@ -24981,19 +23604,19 @@ export interface operations { Link?: string } content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['external-groups'] } } } } - /** Lists all teams in an organization that are visible to the authenticated user. */ - 'teams/list': { + 'orgs/list-webhooks': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25004,330 +23627,362 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['org-hook'][] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - * - * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". - */ - 'teams/create': { + /** Here's how you can create a hook that posts payloads in JSON format: */ + 'orgs/create-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['org-hook'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ + /** @description Must be passed as "web". */ name: string - /** @description The description of the team. */ - description?: string - /** @description List GitHub IDs for organization members who will become team maintainers. */ - maintainers?: string[] - /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ - repo_names?: string[] + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "kdaigle" */ + username?: string + /** @example "password" */ + password?: string + } & { [key: string]: unknown } /** - * @description The level of privacy this team should have. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * Default: `secret` - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * Default for child team: `closed` - * @enum {string} + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] */ - privacy?: 'secret' | 'closed' + events?: string[] /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * @default pull - * @enum {string} + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true */ - permission?: 'pull' | 'push' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number + active?: boolean } & { [key: string]: unknown } } } } - /** - * 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': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['org-hook'] } } 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': { + 'orgs/delete-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - /** - * 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': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['org-hook'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ - name?: string - /** @description The description of the team. */ - description?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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]: unknown } /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] */ - privacy?: 'secret' | 'closed' + events?: string[] /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true */ - permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null + active?: boolean + /** @example "web" */ + name?: string } & { [key: string]: unknown } } } } /** - * 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/). + * 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)." * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. */ - 'teams/list-discussions-in-org': { + 'orgs/get-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - query: { - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Pinned discussions only filter */ - pinned?: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion'][] + 'application/json': components['schemas']['webhook-config'] } } } } /** - * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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)." * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + * Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. */ - 'teams/create-discussion-in-org': { + 'orgs/update-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['webhook-config'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title: string - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean + 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]: unknown } } } } - /** - * 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': { + /** Returns a list of webhook deliveries for a webhook configured in an organization. */ + 'orgs/list-webhook-deliveries': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['hook-delivery-item'][] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** Returns a delivery for a webhook configured in an organization. */ + 'orgs/get-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['hook-delivery'] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Redeliver a delivery for a webhook configured in an organization. */ + 'orgs/redeliver-webhook-delivery': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] + } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + 'orgs/ping-webhook': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * 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/). + * Enables an authenticated GitHub App to find the organization's installation information. * - * **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}`. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'teams/update-discussion-in-org': { + 'apps/get-org-installation': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + 'application/json': components['schemas']['installation'] } } } - requestBody: { - content: { - 'application/json': { - /** @description The discussion post's title. */ - title?: string - /** @description The discussion post's body text. */ - body?: string - } & { [key: string]: unknown } + } + /** 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + 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]: unknown } + } } } } /** - * 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/). + * List issues in an organization assigned 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}/discussions/{discussion_number}/comments`. + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'teams/list-discussion-comments-in-org': { + 'issues/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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). */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25338,372 +23993,485 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'][] + 'application/json': components['schemas']['issue'][] } } + 404: components['responses']['not_found'] } } - /** - * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. - */ - 'teams/create-discussion-comment-in-org': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] + } + query: { + /** Filter members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ + filter?: '2fa_disabled' | 'all' + /** Filter members returned by their role. */ + role?: 'all' | 'admin' | 'member' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['simple-user'][] } } + 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The discussion comment's body text. */ - body: string - } & { [key: string]: unknown } + } + /** Check if a user is, publicly or privately, a member of the organization. */ + 'orgs/check-membership-for-user': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response if requester is an organization member and user is a member */ + 204: never + /** Response if requester is not an organization member */ + 302: never + /** Not Found if requester is an organization member and user is not a member */ + 404: unknown + } + } + /** Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories. */ + 'orgs/remove-member': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + } + } + /** In order to get a user's membership with an organization, the authenticated user must be an organization member. The `state` parameter in the response can be used to identify the user's membership status. */ + 'orgs/get-membership-for-user': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['org-membership'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } } /** - * 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/). + * Only authenticated organization owners can add a member to the organization or update the member's role. * - * **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}`. + * * 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/enterprise-server@3.6/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. */ - 'teams/get-discussion-comment-in-org': { + 'orgs/set-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['org-membership'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The role to give the user in the organization. Can be one of: + * \* `admin` - The user will become an owner of the organization. + * \* `member` - The user will become a non-owner member of the organization. + * @default member + * @enum {string} + */ + role?: 'admin' | 'member' + } & { [key: string]: unknown } + } } } /** - * 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/). + * In order to remove a user's membership with an organization, the authenticated user must be an organization owner. * - * **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}`. + * 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. */ - 'teams/delete-discussion-comment-in-org': { + 'orgs/remove-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + /** Lists the most recent migrations. */ + 'migrations/list-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Exclude attributes from the API response to improve performance */ + exclude?: 'repositories'[] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['migration'][] + } + } + } + } + /** Initiates the generation of a migration archive. */ + 'migrations/start-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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: { + 201: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['migration'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description A list of arrays indicating which repositories should be migrated. */ + repositories: string[] + /** + * @description Indicates whether repositories should be locked (to prevent manipulation) while migrating data. + * @default false + * @example true + */ + lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean + /** + * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_attachments?: boolean + /** + * @description Indicates whether releases should be excluded from the migration (to reduce migration archive file size). + * @default false + * @example true + */ + exclude_releases?: boolean + /** + * @description Indicates whether projects owned by the organization or users should be excluded. from the migration. + * @default false + * @example true + */ + exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ + exclude?: 'repositories'[] } & { [key: string]: unknown } } } } /** - * 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/). + * Fetches the status of a migration. * - * **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`. + * 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. */ - 'reactions/list-for-team-discussion-comment-in-org': { + 'migrations/get-status-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The unique identifier of the migration. */ + migration_id: components['parameters']['migration-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 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'] + /** Exclude attributes from the API response to improve performance */ + exclude?: 'repositories'[] } } responses: { - /** Response */ + /** + * * `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: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['migration'] } } + 404: components['responses']['not_found'] } } - /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. - */ - 'reactions/create-for-team-discussion-comment-in-org': { + /** List all users who are outside collaborators of an organization. */ + 'orgs/list-outside-collaborators': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: '2fa_disabled' | 'all' + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['simple-user'][] } } - /** Response */ - 201: { + } + } + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 'orgs/convert-member-to-outside-collaborator': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** User is getting converted asynchronously */ + 202: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': { [key: string]: unknown } } } + /** User was converted */ + 204: never + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ + 403: unknown + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + async?: boolean } & { [key: string]: unknown } } } } - /** - * **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': { + /** Removing a user from this list will remove them from all the organization's repositories. */ + 'orgs/remove-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + /** Unprocessable Entity if user is a member of the organization */ + 422: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } & { [key: string]: unknown } + } + } } } - /** - * 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': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The sort order for the response collection. */ + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['org-pre-receive-hook'][] } } } } - /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. - */ - 'reactions/create-for-team-discussion-in-org': { + 'enterprise-admin/get-pre-receive-hook-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } & { [key: string]: unknown } - } - } } - /** - * **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': { + /** Removes any overrides for this hook at the org level for this org. */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * Deletes a connection between a team and an external group. - * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - */ - 'teams/unlink-external-idp-group-from-team-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + 200: { + content: { + 'application/json': components['schemas']['org-pre-receive-hook'] + } } } - responses: { - /** Response */ - 204: never - } } - /** - * Creates a connection between a team and an external group. Only one external group can be linked to a team. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/link-external-idp-group-to-team-for-org': { + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['external-group'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } requestBody: { content: { 'application/json': { - /** - * @description External Group Id - * @example 1 - */ - group_id: number + /** @description The state of enforcement for the hook on this repository. */ + enforcement?: string + /** @description Whether repositories can override enforcement. */ + allow_downstream_configuration?: boolean } & { [key: string]: unknown } } } } - /** - * 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': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** Indicates the state of the projects to return. */ + state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25714,32 +24482,53 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': components['schemas']['project'][] } } + 422: components['responses']['validation_failed_simple'] } } - /** - * 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': { + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the project. */ + name: string + /** @description The description of the project. */ + body?: string + } & { [key: string]: unknown } + } + } + } + /** Members of an organization can choose to have their membership publicized or not. */ + 'orgs/list-public-members': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25755,126 +24544,71 @@ export interface operations { } } } - /** - * Team members will include the members of child teams. - * - * To get a user's membership with a team, the team must be visible to the authenticated user. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. - * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - */ - 'teams/get-membership-for-user-in-org': { + 'orgs/check-public-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - /** if user has no team membership */ + /** Response if user is a public member */ + 204: never + /** Not Found if user is not a public member */ 404: unknown } } /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. - * - * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * The user can publicize their own membership. (A user cannot publicize the membership for another user.) * - * **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}`. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'teams/add-or-update-membership-for-user-in-org': { + 'orgs/set-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-membership'] - } - } - /** Forbidden if team synchronization is set up */ - 403: unknown - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' - } & { [key: string]: unknown } - } + 204: never + 403: components['responses']['forbidden'] } } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. - */ - 'teams/remove-membership-for-user-in-org': { + 'orgs/remove-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ 204: never - /** Forbidden if team synchronization is set up */ - 403: unknown } } - /** - * Lists the organization projects for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. - */ - 'teams/list-projects-in-org': { + /** Lists repositories for the specified organization. */ + 'repos/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' + /** The property to sort the results by. */ + sort?: 'created' | 'updated' | 'pushed' | 'full_name' + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ + direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25885,536 +24619,757 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team-project'][] + 'application/json': components['schemas']['minimal-repository'][] } } } } /** - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * Creates a new repository in the specified organization. The authenticated user must be a member of the organization. * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects/{project_id}`. - */ - 'teams/check-permissions-for-project-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown - } - } - /** - * Adds an organization project to a team. To add a project to a team or update the team's permission on a project, the authenticated user must have `admin` permissions for the project. The project and team must be part of the same organization. + * **OAuth scope requirements** * - * **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}`. + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - 'teams/add-or-update-project-permissions-in-org': { + 'repos/create-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['repository'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | ({ - /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * @enum {string} - */ - permission?: 'read' | 'write' | 'admin' - } & { [key: string]: unknown }) - | null + 'application/json': { + /** @description The name of the repository. */ + name: string + /** @description A short description of the repository. */ + description?: string + /** @description A URL with more information about the repository. */ + homepage?: string + /** + * @description Whether the repository is private. + * @default false + */ + private?: boolean + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`. Note: For GitHub Enterprise Server and GitHub AE, this endpoint will only list repositories available to all users on the enterprise. For more information, see "[Creating an internal repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" in the GitHub Help documentation. + * @enum {string} + */ + visibility?: 'public' | 'private' | 'internal' + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean + /** @description The id of the team that will be granted access to this repository. This is only valid when creating a repository in an organization. */ + team_id?: number + /** + * @description Pass `true` to create an initial commit with empty README. + * @default false + */ + auto_init?: boolean + /** @description Desired language or platform [.gitignore template](https://github.com/github/gitignore) to apply. Use the name of the template without the extension. For example, "Haskell". */ + gitignore_template?: string + /** @description Choose an [open source license template](https://choosealicense.com/) that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) as the `license_template` string. For example, "mit" or "mpl-2.0". */ + license_template?: string + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + } & { [key: string]: unknown } } } } /** - * 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. + * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * **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}`. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'teams/remove-project-in-org': { + 'secret-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - project_id: components['parameters']['project-id'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['organization-secret-scanning-alert'][] + } + } + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * Lists a team's repositories visible to the authenticated user. + * Gets the GitHub Advanced Security active committers for an organization per repository. * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + * + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ - 'teams/list-repos-in-org': { + 'billing/get-github-advanced-security-billing-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Success */ 200: { - headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['advanced-security-active-committers'] } } + 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * 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': { + /** Lists all teams in an organization that are visible to the authenticated user. */ + 'teams/list': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Alternative response with repository permissions */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['team-repository'] + 'application/json': components['schemas']['team'][] } } - /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ - 204: never - /** Not Found if team does not have permission for the repository */ - 404: unknown + 403: components['responses']['forbidden'] } } /** - * 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}`. + * To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." * - * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + * When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". */ - 'teams/add-or-update-repo-permissions-in-org': { + 'teams/create': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The name of the team. */ + name: string + /** @description The description of the team. */ + description?: string + /** @description List GitHub IDs for organization members who will become team maintainers. */ + maintainers?: string[] + /** @description The full name (e.g., "organization-name/repository-name") of repositories to add the team to. */ + repo_names?: string[] /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @default push + * @description The level of privacy this team should have. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * Default: `secret` + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * Default for child team: `closed` * @enum {string} */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." */ + ldap_dn?: string } & { [key: string]: unknown } } } } /** - * 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. + * Gets a team using the team's `slug`. GitHub Enterprise Server generates the `slug` from the team `name`. * - * **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}`. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}`. */ - 'teams/remove-repo-in-org': { + 'teams/get-by-name': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } + 404: components['responses']['not_found'] } } /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * To delete a team, the authenticated user must be an organization owner or team maintainer. * - * List IdP groups connected to a team on GitHub. + * 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 `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}`. */ - 'teams/list-idp-groups-in-org': { + 'teams/delete-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } + 204: never } } /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * 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. + * 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}/team-sync/group-mappings`. + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. */ - 'teams/create-or-update-idp-group-connections-in-org': { + 'teams/update-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } responses: { - /** Response */ + /** Response when the updated information already exists */ 200: { content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['team-full'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups?: ({ - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - } & { [key: string]: unknown })[] - } + /** @description The name of the team. */ + name?: string + /** @description The description of the team. */ + description?: string + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. When a team is nested, the `privacy` for parent teams cannot be `secret`. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null + } & { [key: string]: unknown } } } } /** - * Lists the child teams of the team specified by `{team_slug}`. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/teams`. + * **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-child-in-org': { + 'teams/list-discussions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Pinned discussions only filter */ + pinned?: string } } responses: { - /** if child teams exist */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['team-discussion'][] } } } } - 'projects/get-card': { + /** + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + */ + 'teams/create-discussion-in-org': { parameters: { path: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['project-card'] + 'application/json': components['schemas']['team-discussion'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion post's title. */ + title: string + /** @description The discussion post's body text. */ + body: string + /** + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false + */ + private?: boolean + } & { [key: string]: unknown } + } } } - 'projects/delete-card': { + /** + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { + 200: { content: { - 'application/json': { - message?: string - documentation_url?: string - errors?: string[] - } & { [key: string]: unknown } + 'application/json': components['schemas']['team-discussion'] } } - 404: components['responses']['not_found'] } } - 'projects/update-card': { + /** + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Edits the title and body text of a discussion post. Only the parameters you provide are updated. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['project-card'] + 'application/json': components['schemas']['team-discussion'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** - * @description The project card's note - * @example Update all gems - */ - note?: string | null - /** - * @description Whether or not the card is archived - * @example false - */ - archived?: boolean + /** @description The discussion post's title. */ + title?: string + /** @description The discussion post's body text. */ + body?: string } & { [key: string]: unknown } } } } - 'projects/move-card': { + /** + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** card_id parameter */ - card_id: components['parameters']['card-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['team-discussion-comment'][] } } - 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]: unknown })[] - } & { [key: string]: unknown } - } + } + } + /** + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + */ + 'teams/create-discussion-comment-in-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } - 422: components['responses']['validation_failed'] + } + responses: { /** Response */ - 503: { + 201: { content: { - 'application/json': { - code?: string - message?: string - documentation_url?: string - errors?: ({ - code?: string - message?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } + 'application/json': components['schemas']['team-discussion-comment'] } } } requestBody: { content: { 'application/json': { - /** - * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. - * @example bottom - */ - position: string - /** - * @description The unique identifier of the column the card should be moved to - * @example 42 - */ - column_id?: number + /** @description The discussion comment's body text. */ + body: string } & { [key: string]: unknown } } } } - 'projects/get-column': { + /** + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['project-column'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'projects/delete-column': { + /** + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - 'projects/update-column': { + /** + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['project-column'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string + /** @description The discussion comment's body text. */ + body: string } & { [key: string]: unknown } } } } - 'projects/list-cards': { + /** + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } 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) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26425,331 +25380,272 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project-card'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'projects/create-card': { - parameters: { - path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['project-card'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - /** Validation failed */ - 422: { - content: { - 'application/json': (components['schemas']['validation-error'] | components['schemas']['validation-error-simple']) & { - [key: string]: unknown - } - } - } - /** Response */ - 503: { - content: { - 'application/json': { - code?: string - message?: string - documentation_url?: string - errors?: ({ - code?: string - message?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } + 'application/json': components['schemas']['reaction'][] } } } - requestBody: { - content: { - 'application/json': ( - | ({ - /** - * @description The project card's note - * @example Update all gems - */ - note: string | null - } & { [key: string]: unknown }) - | ({ - /** - * @description The unique identifier of the content associated with the card - * @example 42 - */ - content_id: number - /** - * @description The piece of content associated with the card - * @example PullRequest - */ - content_type: string - } & { [key: string]: unknown }) - ) & { [key: string]: unknown } - } - } } - 'projects/move-column': { + /** + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + */ + 'reactions/create-for-team-discussion-comment-in-org': { parameters: { path: { - /** column_id parameter */ - column_id: components['parameters']['column-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { + /** Response when the reaction type has already been added to this team discussion comment */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } /** Response */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['reaction'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { /** - * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. - * @example last + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} */ - position: string + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } - /** 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': { + /** + * **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/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/delete-for-team-discussion-comment': { parameters: { path: { - project_id: components['parameters']['project-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['project'] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } } - /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ - 'projects/delete': { + /** + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { - project_id: components['parameters']['project-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Delete Success */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': { - message?: string - documentation_url?: string - errors?: string[] - } & { [key: string]: unknown } + 'application/json': components['schemas']['reaction'][] } } - 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': { + /** + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + */ + 'reactions/create-for-team-discussion-in-org': { parameters: { path: { - project_id: components['parameters']['project-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['reaction'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - /** Forbidden */ - 403: { + /** Response */ + 201: { content: { - 'application/json': { - message?: string - documentation_url?: string - errors?: string[] - } & { [key: string]: unknown } + 'application/json': components['schemas']['reaction'] } } - /** Not Found if the authenticated user does not have access to the project */ - 404: unknown - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { /** - * @description Name of the project - * @example Week One Sprint - */ - name?: string - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body?: string | null - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state?: string - /** - * @description The baseline permission that all organization members have on this project + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. * @enum {string} */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. */ - private?: boolean + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } - /** 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': { + /** + * **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/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'reactions/delete-for-team-discussion': { 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'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 204: never } } - /** 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': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-linked-external-idp-groups-to-team-for-org': { parameters: { path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | ({ - /** - * @description The permission to grant the collaborator. - * @default write - * @example write - * @enum {string} - */ - permission?: 'read' | 'write' | 'admin' - } & { [key: string]: unknown }) - | null + 200: { + content: { + 'application/json': components['schemas']['external-groups'] + } } } } - /** Removes a collaborator from an organization project. You must be an organization owner or a project `admin` to remove a collaborator. */ - 'projects/remove-collaborator': { + /** + * Deletes a connection between a team and an external group. + * + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + */ + 'teams/unlink-external-idp-group-from-team-for-org': { parameters: { path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - /** Returns the collaborator's permission level for an organization project. Possible values for the `permission` key: `admin`, `write`, `read`, `none`. You must be an organization owner or a project `admin` to review a user's permission level. */ - 'projects/get-permission-for-user': { + /** + * Creates a connection between a team and an external group. Only one external group can be linked to a team. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/link-external-idp-group-to-team-for-org': { parameters: { path: { - project_id: components['parameters']['project-id'] - username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['project-collaborator-permission'] + 'application/json': components['schemas']['external-group'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description External Group Id + * @example 1 + */ + group_id: number + } & { [key: string]: unknown } + } } } - 'projects/list-columns': { + /** + * 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: { - project_id: components['parameters']['project-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** Filters members returned by their role in the team. */ + role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26760,257 +25656,257 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project-column'][] + 'application/json': components['schemas']['simple-user'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - 'projects/create-column': { + /** + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). + */ + 'teams/get-membership-for-user-in-org': { parameters: { path: { - project_id: components['parameters']['project-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['project-column'] + 'application/json': components['schemas']['team-membership'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Name of the project column - * @example Remaining tasks - */ - name: string - } & { [key: string]: unknown } - } + /** if user has no team membership */ + 404: unknown } } /** - * **Note:** Accessing this endpoint does not count against your REST API rate limit. + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **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. + * 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ - 'rate-limit/get': { - parameters: {} + 'teams/add-or-update-membership-for-user-in-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['rate-limit-overview'] + 'application/json': components['schemas']['team-membership'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] + /** Forbidden if team synchronization is set up */ + 403: unknown + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown + } + requestBody: { + content: { + 'application/json': { + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' + } & { [key: string]: unknown } + } } } /** - * **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/). + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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). + * 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ - 'reactions/delete-legacy': { + 'teams/remove-membership-for-user-in-org': { parameters: { path: { - reaction_id: components['parameters']['reaction-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] + /** Forbidden if team synchronization is set up */ + 403: unknown } } - /** 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': { + /** + * 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['team-project'][] } } - 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. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. * - * If an organization owner has configured the organization to prevent members from deleting organization-owned - * repositories, you will get a `403 Forbidden` response. + * **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}`. */ - 'repos/delete': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 307: components['responses']['temporary_redirect'] - /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ - 403: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } - } - } - 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': { + 'teams/check-permissions-for-project-in-org': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['team-project'] } } - 307: components['responses']['temporary_redirect'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Not Found if project is not managed by this team */ + 404: unknown } - requestBody: { - content: { - 'application/json': { - /** @description The name of the repository. */ - name?: string - /** @description A short description of the repository. */ - description?: string - /** @description A URL with more information about the repository. */ - homepage?: string - /** - * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. - * @default false - */ - private?: boolean - /** - * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." - * @enum {string} - */ - visibility?: 'public' | 'private' | 'internal' - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ - security_and_analysis?: - | ({ - /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ - advanced_security?: { - /** @description Can be `enabled` or `disabled`. */ - status?: string - } & { [key: string]: unknown } - /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ - secret_scanning?: { - /** @description Can be `enabled` or `disabled`. */ - status?: string - } & { [key: string]: unknown } - } & { [key: string]: unknown }) - | null - /** - * @description Either `true` to enable issues for this repository or `false` to disable them. - * @default true - */ - has_issues?: boolean - /** - * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. - * @default true - */ - has_projects?: boolean - /** - * @description Either `true` to enable the wiki for this repository or `false` to disable it. - * @default true - */ - has_wiki?: boolean - /** - * @description Either `true` to make this repo available as a template repository or `false` to prevent it. - * @default false - */ - is_template?: boolean - /** @description Updates the default branch for this repository. */ - default_branch?: string - /** - * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. - * @default true - */ - allow_squash_merge?: boolean - /** - * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. - * @default true - */ - allow_merge_commit?: boolean - /** - * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. - * @default true - */ - allow_rebase_merge?: boolean - /** - * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. - * @default false - */ - allow_auto_merge?: boolean - /** - * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. - * @default false - */ - delete_branch_on_merge?: boolean - /** - * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. - * @default false - */ - archived?: boolean - /** - * @description Either `true` to allow private forks, or `false` to prevent private forks. - * @default false - */ - allow_forking?: boolean - } & { [key: string]: 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } & { [key: string]: unknown } + } + } + } + requestBody: { + content: { + 'application/json': + | ({ + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' + } & { [key: string]: unknown }) + | null } } } - /** 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': { + /** + * 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * Lists a team's repositories visible to the authenticated user. + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. + */ + 'teams/list-repos-in-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27021,682 +25917,1011 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - artifacts: components['schemas']['artifact'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['minimal-repository'][] } } } } - /** 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': { + /** + * 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] } } responses: { - /** Response */ + /** Alternative response with repository permissions */ 200: { content: { - 'application/json': components['schemas']['artifact'] + 'application/json': components['schemas']['team-repository'] } } + /** Response if team has permission for the repository. This is the response when the repository media type hasn't been provded in the Accept header. */ + 204: never + /** Not Found if team does not have permission for the repository */ + 404: unknown } } - /** 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': { + /** + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * + * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + * + * For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + */ + 'teams/add-or-update-repo-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] } } responses: { /** Response */ 204: never } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on 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. + * @default push + */ + permission?: string + } & { [key: string]: unknown } + } + } } /** - * 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. + * 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}`. */ - 'actions/download-artifact': { + 'teams/remove-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ - artifact_id: components['parameters']['artifact-id'] - archive_format: string } } responses: { /** Response */ - 302: never + 204: 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': { + /** + * 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** job_id parameter */ - job_id: components['parameters']['job-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + } + query: { + /** The number of 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']['job'] + 'application/json': components['schemas']['team'][] } } } } - /** - * 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': { + 'projects/get-card': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** job_id parameter */ - job_id: components['parameters']['job-id'] + /** The unique identifier of the card. */ + card_id: components['parameters']['card-id'] } } responses: { /** Response */ - 302: never + 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'] } } - /** - * 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': { + 'projects/delete-card': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the card. */ + card_id: components['parameters']['card-id'] } } responses: { /** Response */ - 200: { + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + /** Forbidden */ + 403: { content: { - 'application/json': components['schemas']['actions-repository-permissions'] + 'application/json': { + message?: string + documentation_url?: string + errors?: string[] + } & { [key: string]: unknown } } } + 404: components['responses']['not_found'] } } - /** - * 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': { + 'projects/update-card': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the card. */ + card_id: components['parameters']['card-id'] } } responses: { /** Response */ - 204: never + 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': { - enabled: components['schemas']['actions-enabled'] - allowed_actions?: components['schemas']['allowed-actions'] + /** + * @description The project card's note + * @example Update all gems + */ + note?: string | null + /** + * @description Whether or not the card is archived + * @example false + */ + archived?: boolean } & { [key: string]: unknown } } } } - /** - * 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': { + 'projects/move-card': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the card. */ + card_id: components['parameters']['card-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': { [key: string]: unknown } } } - } - } - /** - * 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'] + 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]: unknown })[] + } & { [key: string]: unknown } + } } - } - responses: { + 422: components['responses']['validation_failed'] /** Response */ - 204: never + 503: { + content: { + 'application/json': { + code?: string + message?: string + documentation_url?: string + errors?: ({ + code?: string + message?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } + } } requestBody: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': { + /** + * @description The position of the card in a column. Can be one of: `top`, `bottom`, or `after:` to place after the specified card. + * @example bottom + */ + position: string + /** + * @description The unique identifier of the column the card should be moved to + * @example 42 + */ + column_id?: number + } & { [key: string]: unknown } } } } - /** 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': { + 'projects/get-column': { 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'] + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } & { [key: string]: unknown } + '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'] } } - /** - * 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': { + 'projects/delete-column': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] + } + } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + 'projects/update-column': { + parameters: { + path: { + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-application'][] + 'application/json': components['schemas']['project-column'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string + } & { [key: string]: unknown } + } } } - /** - * 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': { + 'projects/list-cards': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] + } + query: { + /** Filters the project cards that are returned by the card's state. */ + archived_state?: 'all' | 'archived' | 'not_archived' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['project-card'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * 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': { + 'projects/create-card': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] } } responses: { /** Response */ 201: { content: { - 'application/json': components['schemas']['authentication-token'] + '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]: unknown + } + } + } + /** Response */ + 503: { + content: { + 'application/json': { + code?: string + message?: string + documentation_url?: string + errors?: ({ + code?: string + message?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } + } + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** + * @description The project card's note + * @example Update all gems + */ + note: string | null + } & { [key: string]: unknown }) + | ({ + /** + * @description The unique identifier of the content associated with the card + * @example 42 + */ + content_id: number + /** + * @description The piece of content associated with the card + * @example PullRequest + */ + content_type: string + } & { [key: string]: unknown }) + ) & { [key: string]: unknown } + } } } - /** - * 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': { + 'projects/move-column': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the column. */ + column_id: components['parameters']['column-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['runner'] + 'application/json': { [key: string]: unknown } } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The position of the column in a project. Can be one of: `first`, `last`, or `after:` to place after the specified column. + * @example last + */ + position: string + } & { [key: string]: unknown } + } } } - /** - * 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': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + path: { + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['project'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * Lists all labels for a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/list-labels-for-self-hosted-runner-for-repo': { + /** Deletes a project board. Returns a `404 Not Found` status if projects are disabled. */ + 'projects/delete': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** 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]: unknown } + } + } 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** 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]: unknown } + } + } + /** Not Found if the authenticated user does not have access to the project */ + 404: unknown + 410: components['responses']['gone'] 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** + * @description Name of the project + * @example Week One Sprint + */ + name?: string + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body?: string | null + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state?: string + /** + * @description The baseline permission that all organization members have on this project + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. */ + private?: boolean } & { [key: string]: unknown } } } } - /** - * Add custom labels to a self-hosted runner configured in a repository. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + } + query: { + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: 'outside' | 'direct' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } & { [key: string]: unknown } + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] + } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** - * Remove all custom labels from a self-hosted runner configured in a - * repository. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | ({ + /** + * @description The permission to grant the collaborator. + * @default write + * @example write + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' + } & { [key: string]: unknown }) + | null + } } } - /** - * Remove a custom label from a self-hosted runner configured - * in a repository. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `repo` scope to use this - * endpoint. - */ - 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - 200: components['responses']['actions_runner_labels'] + /** 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_simple'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** 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: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components['parameters']['actor'] - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components['parameters']['workflow-run-branch'] - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ - created?: components['parameters']['created'] - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - /** Returns workflow runs with the `check_suite_id` that you specify. */ - check_suite_id?: components['parameters']['workflow-run-check-suite-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - workflow_runs: components['schemas']['workflow-run'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['project-collaborator-permission'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + 'projects/list-columns': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } query: { - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['workflow-run'] + 'application/json': components['schemas']['project-column'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * 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': { + 'projects/create-column': { parameters: { path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 204: never + 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'] } - } - /** 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'] + requestBody: { + content: { + 'application/json': { + /** + * @description Name of the project column + * @example Remaining tasks + */ + name: string + } & { [key: string]: unknown } } } + } + /** + * **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']['environment-approvals'][] + 'application/json': components['schemas']['rate-limit-overview'] } } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/approve-workflow-run': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['full-repository'] } } + 301: components['responses']['moved_permanently'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } } - /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/list-workflow-run-artifacts': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: {} + 204: never + 307: components['responses']['temporary_redirect'] + /** If an organization owner has configured the organization to prevent members from deleting organization-owned repositories, a member will get this response: */ + 403: { content: { 'application/json': { - total_count: number - artifacts: components['schemas']['artifact'][] + message?: string + documentation_url?: string } & { [key: string]: unknown } } } + 404: components['responses']['not_found'] } } - /** - * Gets a specific workflow run attempt. Anyone with read access to the repository - * can use this endpoint. If the repository is private you must use an access token - * with the `repo` scope. GitHub Apps must have the `actions:read` permission to - * use this endpoint. - */ - 'actions/get-workflow-run-attempt': { + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ + 'repos/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] - } - query: { - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['workflow-run'] + 'application/json': components['schemas']['full-repository'] } } + 307: components['responses']['temporary_redirect'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the repository. */ + name?: string + /** @description A short description of the repository. */ + description?: string + /** @description A URL with more information about the repository. */ + homepage?: string + /** + * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * @default false + */ + private?: boolean + /** + * @description Can be `public` or `private`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `visibility` can also be `internal`." + * @enum {string} + */ + visibility?: 'public' | 'private' | 'internal' + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ + security_and_analysis?: + | ({ + /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ + advanced_security?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } & { [key: string]: unknown } + /** @description Use the `status` property to enable or disable secret scanning for this repository. For more information, see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." */ + secret_scanning?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } & { [key: string]: unknown } + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | null + /** + * @description Either `true` to enable issues for this repository or `false` to disable them. + * @default true + */ + has_issues?: boolean + /** + * @description Either `true` to enable projects for this repository or `false` to disable them. **Note:** If you're creating a repository in an organization that has disabled repository projects, the default is `false`, and if you pass `true`, the API returns an error. + * @default true + */ + has_projects?: boolean + /** + * @description Either `true` to enable the wiki for this repository or `false` to disable it. + * @default true + */ + has_wiki?: boolean + /** + * @description Either `true` to make this repo available as a template repository or `false` to prevent it. + * @default false + */ + is_template?: boolean + /** @description Updates the default branch for this repository. */ + default_branch?: string + /** + * @description Either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. + * @default true + */ + allow_squash_merge?: boolean + /** + * @description Either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. + * @default true + */ + allow_merge_commit?: boolean + /** + * @description Either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. + * @default true + */ + allow_rebase_merge?: boolean + /** + * @description Either `true` to allow auto-merge on pull requests, or `false` to disallow auto-merge. + * @default false + */ + allow_auto_merge?: boolean + /** + * @description Either `true` to allow automatically deleting head branches when pull requests are merged, or `false` to prevent automatic deletion. + * @default false + */ + delete_branch_on_merge?: boolean + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. + * @default false + */ + archived?: boolean + /** + * @description Either `true` to allow private forks, or `false` to prevent private forks. + * @default false + */ + allow_forking?: boolean + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean + } & { [key: string]: unknown } + } } } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ - 'actions/list-jobs-for-workflow-run-attempt': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27709,503 +26934,364 @@ export interface operations { content: { 'application/json': { total_count: number - jobs: components['schemas']['job'][] + artifacts: components['schemas']['artifact'][] } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] - } - } - /** - * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after - * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to - * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. - * GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/download-workflow-run-attempt-logs': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - /** The attempt number of the workflow run. */ - attempt_number: components['parameters']['attempt-number'] - } - } - responses: { - /** Response */ - 302: never } } - /** Cancels a workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ - 'actions/cancel-workflow-run': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the artifact. */ + artifact_id: components['parameters']['artifact-id'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['artifact'] } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the artifact. */ + artifact_id: components['parameters']['artifact-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - jobs: components['schemas']['job'][] - } & { [key: string]: unknown } - } - } + 204: never } } /** - * 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. + * 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-workflow-run-logs': { + 'actions/download-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the artifact. */ + artifact_id: components['parameters']['artifact-id'] + archive_format: string } } responses: { /** Response */ 302: never + 410: components['responses']['gone'] } } - /** 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': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 500: components['responses']['internal_error'] + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-by-repository'] + } + } } } /** - * 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. + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'actions/get-pending-deployments-for-run': { + 'actions/get-actions-cache-usage-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] } } } } /** - * 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. + * Sets GitHub Actions cache usage policy for a repository. + * 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/review-pending-deployments-for-run': { + 'actions/set-actions-cache-usage-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] - } - } + 204: never } requestBody: { content: { - 'application/json': { - /** - * @description The list of environment ids to approve or reject - * @example [ - * 161171787, - * 161171795 - * ] - */ - environment_ids: number[] - /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` - * @example approved - * @enum {string} - */ - state: 'approved' | 'rejected' - /** - * @description A comment to accompany the deployment review - * @example Ship it! - */ - comment: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['job'] } } } } /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. + * 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/get-workflow-run-usage': { + 'actions/download-job-logs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-run-usage'] - } - } + 302: never } } - /** 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': { + /** Re-run a job and its dependent jobs in 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/re-run-job-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { content: { - 'application/json': { - total_count: number - secrets: components['schemas']['actions-secret'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } + 403: components['responses']['forbidden'] } - } - /** 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'] - } + requestBody: { + content: { + 'application/json': + | ({ + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } & { [key: string]: unknown }) + | null } } } - /** 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-secret'] + 'application/json': components['schemas']['actions-repository-permissions'] } } } } /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the repository. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * 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. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/create-or-update-repo-secret': { + 'actions/set-github-actions-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] } } responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ + /** Response */ 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + enabled: components['schemas']['actions-enabled'] + allowed_actions?: components['schemas']['allowed-actions'] } & { [key: string]: unknown } } } } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** 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': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/get-workflow-access-to-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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]: unknown } + 'application/json': components['schemas']['actions-workflow-access-to-repository'] } } } } - /** 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': { + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/set-workflow-access-to-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] - } + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] } } } /** - * 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`. + * 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 `actions:write` permission to use this endpoint. + * 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/disable-workflow': { + 'actions/get-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] + } + } } } /** - * 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`. + * 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)." * - * 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)." + * 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. * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + * 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/create-workflow-dispatch': { + 'actions/set-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { @@ -28214,113 +27300,74 @@ export interface operations { } requestBody: { content: { - 'application/json': { - /** @description The git reference for the workflow. The reference can be a branch or tag name. */ - ref: string - /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ - inputs?: { [key: string]: string } - } & { [key: string]: unknown } - } - } - } - /** - * 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'] + 'application/json': components['schemas']['selected-actions'] } } - responses: { - /** Response */ - 204: never - } } /** - * List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. */ - 'actions/list-workflow-runs': { + 'actions/get-github-actions-default-workflow-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - query: { - /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ - actor?: components['parameters']['actor'] - /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ - branch?: components['parameters']['workflow-run-branch'] - /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ - event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ - status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ - created?: components['parameters']['created'] - /** If `true` pull requests are omitted from the response (empty array). */ - exclude_pull_requests?: components['parameters']['exclude-pull-requests'] - /** Returns workflow runs with the `check_suite_id` that you specify. */ - check_suite_id?: components['parameters']['workflow-run-check-suite-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - workflow_runs: components['schemas']['workflow-run'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } } } /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." * - * 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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. */ - 'actions/get-workflow-usage': { + 'actions/set-github-actions-default-workflow-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] - } + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ - 'issues/list-assignees': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28331,144 +27378,138 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } & { [key: string]: unknown } } } - 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. + * Lists binaries for the runner application that you can download and run. * - * Otherwise a `404` status code is returned. + * You must authenticate using an access token with the `repo` scope to use this endpoint. */ - 'issues/check-user-can-be-assigned': { + 'actions/list-runner-applications-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['runner-application'][] } } } } /** - * This returns a list of autolinks configured for the given repository. + * 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. * - * Information about autolinks are only available to repository administrators. + * #### 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 + * ``` */ - 'repos/list-autolinks': { + 'actions/create-registration-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['autolink'][] - } - } - } - } - /** Users with admin access to the repository can create an autolink. */ - 'repos/create-autolink': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['autolink'] + 'application/json': components['schemas']['authentication-token'] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ - key_prefix: string - /** @description The URL must contain for the reference number. */ - url_template: string - } & { [key: string]: unknown } - } } } /** - * This returns a single autolink reference by ID that was configured for the given repository. + * 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. * - * Information about autolinks are only available to repository administrators. + * #### 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 + * ``` */ - 'repos/get-autolink': { + 'actions/create-remove-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ - autolink_id: components['parameters']['autolink-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['autolink'] + 'application/json': components['schemas']['authentication-token'] } } - 404: components['responses']['not_found'] } } /** - * This deletes a single autolink reference by ID that was configured for the given repository. + * Gets a specific self-hosted runner configured in a repository. * - * Information about autolinks are only available to repository administrators. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. */ - 'repos/delete-autolink': { + 'actions/get-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ - autolink_id: components['parameters']['autolink-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } } } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/enable-automated-security-fixes': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { @@ -28476,1410 +27517,1166 @@ export interface operations { 204: never } } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/disable-automated-security-fixes': { + /** + * Lists all labels for a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] } } - 'repos/list-branches': { + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['short-branch'][] - } - } + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } & { [key: string]: unknown } + } } } - 'repos/get-branch': { + /** + * Add custom labels to a self-hosted runner configured in a repository. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-with-protection'] - } - } - 301: components['responses']['moved_permanently'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } & { [key: string]: unknown } + } } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-branch-protection': { + /** + * Remove all custom labels from a self-hosted runner configured in a + * repository. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. + */ + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-protection'] - } - } + 200: components['responses']['actions_runner_labels_readonly'] 404: components['responses']['not_found'] } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Protecting a branch requires admin or owner permissions to the repository. + * Remove a custom label from a self-hosted runner configured + * in a repository. Returns the remaining labels from the runner. * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * **Note**: The list of users, apps, and teams in total is limited to 100 items. + * You must authenticate using an access token with the `repo` scope to use this + * endpoint. */ - 'repos/update-branch-protection': { + 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['protected-branch'] - } - } - 403: components['responses']['forbidden'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed_simple'] } - requestBody: { - content: { - 'application/json': { - /** @description Require status checks to pass before merging. Set to `null` to disable. */ - required_status_checks: - | ({ - /** @description Require branches to be up to date before merging. */ - strict: boolean - /** - * @deprecated - * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. - */ - contexts: string[] - /** @description The list of status checks to require in order to merge into this branch. */ - checks?: ({ - /** @description The name of the required check */ - context: string - /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ - app_id?: number - } & { [key: string]: unknown })[] - } & { [key: string]: unknown }) - | null - /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ - enforce_admins: boolean | null - /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ - required_pull_request_reviews: - | ({ - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ - dismissal_restrictions?: { - /** @description The list of user `login`s with dismissal access */ - users?: string[] - /** @description The list of team `slug`s with dismissal access */ - teams?: string[] - } & { [key: string]: unknown } - /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - dismiss_stale_reviews?: boolean - /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ - require_code_owner_reviews?: boolean - /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ - required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: - | ({ - /** @description The list of user `login`s allowed to bypass pull request requirements. */ - users?: string[] - /** @description The list of team `slug`s allowed to bypass pull request requirements. */ - teams?: string[] - } & { [key: string]: unknown }) - | null - } & { [key: string]: unknown }) - | null - /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ - restrictions: - | ({ - /** @description The list of user `login`s with push access */ - users: string[] - /** @description The list of team `slug`s with push access */ - teams: string[] - /** @description The list of app `slug`s with push access */ - apps?: string[] - } & { [key: string]: unknown }) - | null - /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ - required_linear_history?: boolean - /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ - allow_force_pushes?: boolean | null - /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ - allow_deletions?: boolean - /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ - required_conversation_resolution?: boolean - } & { [key: string]: unknown } - } - } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/delete-branch-protection': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - } - } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-admin-branch-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components['parameters']['actor'] + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components['parameters']['workflow-run-branch'] + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components['parameters']['event'] + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components['parameters']['workflow-run-status'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components['parameters']['created'] + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components['parameters']['workflow-run-check-suite-id'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] + 'application/json': { + total_count: number + workflow_runs: components['schemas']['workflow-run'][] + } & { [key: string]: unknown } } } } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - */ - 'repos/set-admin-branch-protection': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] + } + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] + 'application/json': components['schemas']['workflow-run'] } } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + * Delete 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. */ - 'repos/delete-admin-branch-protection': { + 'actions/delete-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-pull-request-review-protection': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['protected-branch-pull-request-review'] + 'application/json': components['schemas']['environment-approvals'][] } } } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/delete-pull-request-review-protection': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - * - * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - */ - 'repos/update-pull-request-review-protection': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['protected-branch-pull-request-review'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ - dismissal_restrictions?: { - /** @description The list of user `login`s with dismissal access */ - users?: string[] - /** @description The list of team `slug`s with dismissal access */ - teams?: string[] + 'application/json': { + total_count: number + artifacts: components['schemas']['artifact'][] } & { [key: string]: unknown } - /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ - dismiss_stale_reviews?: boolean - /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ - require_code_owner_reviews?: boolean - /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ - required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ - bypass_pull_request_allowances?: - | ({ - /** @description The list of user `login`s allowed to bypass pull request requirements. */ - users?: string[] - /** @description The list of team `slug`s allowed to bypass pull request requirements. */ - teams?: string[] - } & { [key: string]: unknown }) - | null - } & { [key: string]: unknown } + } } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. - * - * **Note**: You must enable branch protection to require signed commits. + * Gets a specific workflow run attempt. Anyone with read access to the repository + * can use this endpoint. If the repository is private you must use an access token + * with the `repo` scope. GitHub Apps must have the `actions:read` permission to + * use this endpoint. */ - 'repos/get-commit-signature-protection': { + 'actions/get-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] + } + query: { + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] + 'application/json': components['schemas']['workflow-run'] } } - 404: components['responses']['not_found'] } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. - */ - 'repos/create-commit-signature-protection': { + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ + 'actions/list-jobs-for-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['protected-branch-admin-enforced'] + 'application/json': { + total_count: number + jobs: components['schemas']['job'][] + } & { [key: string]: unknown } } } 404: components['responses']['not_found'] } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + * Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + * 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + * the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + * GitHub Apps must have the `actions:read` permission to use this endpoint. */ - 'repos/delete-commit-signature-protection': { + 'actions/download-workflow-run-attempt-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] + /** The attempt number of the workflow run. */ + attempt_number: components['parameters']['attempt-number'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 302: never } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-status-checks-protection': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['status-check-policy'] + 'application/json': components['schemas']['empty-object'] } } - 404: components['responses']['not_found'] + 409: components['responses']['conflict'] } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/remove-status-check-protection': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ + 'actions/list-jobs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] + } + query: { + /** Filters jobs by their `completed_at` timestamp. `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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + jobs: components['schemas']['job'][] + } & { [key: string]: unknown } + } + } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + * 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. */ - 'repos/update-status-check-protection': { + 'actions/download-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['status-check-policy'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 302: never } - requestBody: { - content: { - 'application/json': { - /** @description Require branches to be up to date before merging. */ - strict?: boolean - /** - * @deprecated - * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. - */ - contexts?: string[] - /** @description The list of status checks to require in order to merge into this branch. */ - checks?: ({ - /** @description The name of the required check */ - context: string - /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ - app_id?: number - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } + } + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 500: components['responses']['internal_error'] + } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/get-all-status-check-contexts': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': string[] + 'application/json': components['schemas']['pending-deployment'][] } } - 404: components['responses']['not_found'] } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/set-status-check-contexts': { + /** + * Approve or reject pending deployments that are waiting on approval by a required reviewer. + * + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. + */ + 'actions/review-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': string[] + 'application/json': components['schemas']['deployment'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': ( - | ({ - /** @description contexts parameter */ - contexts: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } + 'application/json': { + /** + * @description The list of environment ids to approve or reject + * @example [ + * 161171787, + * 161171795 + * ] + */ + environment_ids: number[] + /** + * @description Whether to approve or reject deployment to the specified environments. + * @example approved + * @enum {string} + */ + state: 'approved' | 'rejected' + /** + * @description A comment to accompany the deployment review + * @example Ship it! + */ + comment: string + } & { [key: string]: unknown } } } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/add-status-check-contexts': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': string[] + 'application/json': components['schemas']['empty-object'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': ( + 'application/json': | ({ - /** @description contexts parameter */ - contexts: string[] + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } + | null } } } - /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'repos/remove-status-check-contexts': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + 'actions/re-run-workflow-failed-jobs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The unique identifier of the workflow run. */ + run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': string[] + 'application/json': components['schemas']['empty-object'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': ( + 'application/json': | ({ - /** @description contexts parameter */ - contexts: string[] + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } + | null } } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['branch-restriction-policy'] + 'application/json': { + total_count: number + secrets: components['schemas']['actions-secret'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Disables the ability to restrict who can push to this branch. - */ - 'repos/delete-access-restrictions': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] - } - } - responses: { - /** Response */ - 204: never } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - */ - 'repos/get-apps-with-access-to-protected-branch': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['integration'][] + 'application/json': components['schemas']['actions-public-key'] } } - 404: components['responses']['not_found'] } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/set-app-access-restrictions': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['integration'][] + 'application/json': components['schemas']['actions-secret'] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description apps parameter */ - apps: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * 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. * - * 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. + * #### Example encrypting a secret using Node.js * - * | 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. | + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'repos/add-app-access-restrictions': { + 'actions/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { + /** Response when creating a secret */ + 201: { content: { - 'application/json': components['schemas']['integration'][] + 'application/json': components['schemas']['empty-object'] } } - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { - 'application/json': ( - | ({ - /** @description apps parameter */ - apps: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + } & { [key: string]: unknown } } } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - * - * | Type | Description | - * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/remove-app-access-restrictions': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['integration'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description apps parameter */ - apps: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } + 204: never } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists the teams who have push access to this branch. The list includes child teams. - */ - 'repos/get-teams-with-access-to-protected-branch': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] + 'application/json': { + total_count: number + workflows: components['schemas']['workflow'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. - * - * | Type | Description | - * | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - * | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/set-team-access-restrictions': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** 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']['team'][] + 'application/json': components['schemas']['workflow'] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description teams parameter */ - teams: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified teams push access for this branch. You can also give push access to child teams. + * 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`. * - * | 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. | + * 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. */ - 'repos/add-team-access-restrictions': { + 'actions/disable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** 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']['team'][] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description teams parameter */ - teams: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } + 204: never } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * 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`. * - * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * 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)." * - * | 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. | + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." */ - 'repos/remove-team-access-restrictions': { + 'actions/create-workflow-dispatch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** 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']['team'][] - } - } - 422: components['responses']['validation_failed'] + 204: never } requestBody: { content: { - 'application/json': ( - | ({ - /** @description teams parameter */ - teams: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } + 'application/json': { + /** @description The git reference for the workflow. The reference can be a branch or tag name. */ + ref: string + /** @description Input keys and values configured in the workflow file. The maximum number of properties is 10. Any default properties configured in the workflow file will be used when `inputs` are omitted. */ + inputs?: { [key: string]: string } + } & { [key: string]: unknown } } } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * 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`. * - * Lists the people who have push access to this branch. + * 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. */ - 'repos/get-users-with-access-to-protected-branch': { + 'actions/enable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** 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']['simple-user'][] - } - } - 404: components['responses']['not_found'] + 204: never } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). * - * 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. | + * 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. */ - 'repos/set-user-access-restrictions': { + 'actions/list-workflow-runs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + /** The ID of the workflow. You can also pass the workflow file name as a string. */ + workflow_id: components['parameters']['workflow-id'] + } + query: { + /** Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ + actor?: components['parameters']['actor'] + /** Returns workflow runs associated with a branch. Use the name of the branch of the `push`. */ + branch?: components['parameters']['workflow-run-branch'] + /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ + event?: components['parameters']['event'] + /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ + status?: components['parameters']['workflow-run-status'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + created?: components['parameters']['created'] + /** If `true` pull requests are omitted from the response (empty array). */ + exclude_pull_requests?: components['parameters']['exclude-pull-requests'] + /** Returns workflow runs with the `check_suite_id` that you specify. */ + check_suite_id?: components['parameters']['workflow-run-check-suite-id'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + workflow_runs: components['schemas']['workflow-run'][] + } & { [key: string]: unknown } } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description users parameter */ - users: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } } } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Grants the specified people push access for this branch. - * - * | Type | Description | - * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | - */ - 'repos/add-user-access-restrictions': { + /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ + 'issues/list-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description users parameter */ - users: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } + 404: components['responses']['not_found'] } } /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Checks if a user has permission to be assigned to an issue in this repository. * - * Removes the ability of a user to push to this branch. + * If the `assignee` can be assigned to issues in the repository, a `204` header with no content is returned. * - * | 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. | + * Otherwise a `404` status code is returned. */ - 'repos/remove-user-access-restrictions': { + 'issues/check-user-can-be-assigned': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + assignee: string } } responses: { - /** Response */ - 200: { + /** 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']['simple-user'][] + 'application/json': components['schemas']['basic-error'] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description users parameter */ - users: string[] - } & { [key: string]: unknown }) - | string[] - ) & { [key: string]: unknown } - } } } /** - * 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: + * This returns a list of autolinks configured for the given repository. * - * * Users must have admin or owner permissions. - * * GitHub Apps must have the `administration:write` repository permission. + * Information about autolinks are only available to repository administrators. */ - 'repos/rename-branch': { + 'repos/list-autolinks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the branch. */ - branch: components['parameters']['branch'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['branch-with-protection'] + 'application/json': components['schemas']['autolink'][] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new name of the branch. */ - new_name: string - } & { [key: string]: unknown } - } } } - /** - * **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': { + /** Users with admin access to the repository can create an autolink. */ + 'repos/create-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['check-run'] + 'application/json': components['schemas']['autolink'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': ( - | ({ - /** @enum {undefined} */ - status: 'completed' - } & { - conclusion: unknown - } & { [key: string]: unknown }) - | ({ - /** @enum {undefined} */ - status?: 'queued' | 'in_progress' - } & { [key: string]: unknown }) - ) & { - /** @description The name of the check. For example, "code-coverage". */ - name: string - /** @description The SHA of the commit. */ - head_sha: string - /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ - details_url?: string - /** @description A reference for the run on the integrator's system. */ - external_id?: string - /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. - * @default queued - * @enum {string} - */ - status?: 'queued' | 'in_progress' | 'completed' - /** - * Format: date-time - * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. - * @enum {string} - */ - conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' + 'application/json': { + /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ + key_prefix: string + /** @description The URL must contain `` for the reference number. */ + url_template: string /** - * Format: date-time - * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true */ - completed_at?: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */ - output?: { - /** @description The title of the check run. */ - title: string - /** @description The summary of the check run. This parameter supports Markdown. */ - summary: string - /** @description The details of the check run. This parameter supports Markdown. */ - text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ - annotations?: ({ - /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ - path: string - /** @description The start line of the annotation. */ - start_line: number - /** @description The end line of the annotation. */ - end_line: number - /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - start_column?: number - /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - end_column?: number - /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. - * @enum {string} - */ - annotation_level: 'notice' | 'warning' | 'failure' - /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ - message: string - /** @description The title that represents the annotation. The maximum size is 255 characters. */ - title?: string - /** @description Details about this annotation. The maximum size is 64 KB. */ - raw_details?: string - } & { [key: string]: unknown })[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ - images?: ({ - /** @description The alternative text for the image. */ - alt: string - /** @description The full URL of the image. */ - image_url: string - /** @description A short image description. */ - caption?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ - actions?: ({ - /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ - label: string - /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ - description: string - /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ - identifier: string - } & { [key: string]: unknown })[] + is_alphanumeric?: boolean } & { [key: string]: unknown } } } } /** - * **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. + * This returns a single autolink reference by ID that was configured for the given repository. * - * 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. + * Information about autolinks are only available to repository administrators. */ - 'checks/get': { + 'repos/get-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] + /** The unique identifier of the autolink. */ + autolink_id: components['parameters']['autolink-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['check-run'] + 'application/json': components['schemas']['autolink'] } } + 404: components['responses']['not_found'] } } /** - * **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. + * This deletes a single autolink reference by ID that was configured for the given repository. * - * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + * Information about autolinks are only available to repository administrators. */ - 'checks/update': { + 'repos/delete-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] + /** The unique identifier of the autolink. */ + autolink_id: components['parameters']['autolink-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-run'] - } - } - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @enum {undefined} */ - status?: 'completed' - } & { - conclusion: unknown - } & { [key: string]: unknown }) - | ({ - /** @enum {undefined} */ - status?: 'queued' | 'in_progress' - } & { [key: string]: unknown }) - ) & { - /** @description The name of the check. For example, "code-coverage". */ - name?: string - /** @description The URL of the integrator's site that has the full details of the check. */ - details_url?: string - /** @description A reference for the run on the integrator's system. */ - external_id?: string - /** - * Format: date-time - * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. - * @enum {string} - */ - status?: 'queued' | 'in_progress' | 'completed' - /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. - * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. - * @enum {string} - */ - conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' - /** - * Format: date-time - * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - completed_at?: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */ - output?: { - /** @description **Required**. */ - title?: string - /** @description Can contain Markdown. */ - summary: string - /** @description Can contain Markdown. */ - text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ - annotations?: ({ - /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ - path: string - /** @description The start line of the annotation. */ - start_line: number - /** @description The end line of the annotation. */ - end_line: number - /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - start_column?: number - /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ - end_column?: number - /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. - * @enum {string} - */ - annotation_level: 'notice' | 'warning' | 'failure' - /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ - message: string - /** @description The title that represents the annotation. The maximum size is 255 characters. */ - title?: string - /** @description Details about this annotation. The maximum size is 64 KB. */ - raw_details?: string - } & { [key: string]: unknown })[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ - images?: ({ - /** @description The alternative text for the image. */ - alt: string - /** @description The full URL of the image. */ - image_url: string - /** @description A short image description. */ - caption?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ - actions?: ({ - /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ - label: string - /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ - description: string - /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ - identifier: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - } + 204: never + 404: components['responses']['not_found'] } } - /** 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': { + 'repos/list-branches': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] } query: { - /** Results per page (max 100) */ + /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ + protected?: boolean + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -29890,1781 +28687,1633 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['check-annotation'][] + 'application/json': components['schemas']['short-branch'][] } } + 404: components['responses']['not_found'] } } - /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - 'checks/rerequest-run': { + 'repos/get-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ - 403: { + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['branch-with-protection'] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - /** Validation error if the check run is not rerequestable */ - 422: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } } } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - 'checks/create-suite': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { - /** when the suite already existed */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['check-suite'] - } - } - /** Response when the suite was created */ - 201: { - content: { - 'application/json': components['schemas']['check-suite'] + 'application/json': components['schemas']['branch-protection'] } } - } - requestBody: { - content: { - 'application/json': { - /** @description The sha of the head commit. */ - head_sha: string - } & { [key: string]: unknown } - } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Protecting a branch requires admin or owner permissions to the repository. + * + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + * + * **Note**: The list of users, apps, and teams in total is limited to 100 items. + */ + 'repos/update-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['check-suite-preference'] + 'application/json': components['schemas']['protected-branch'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - auto_trigger_checks?: ({ - /** @description The `id` of the GitHub App. */ - app_id: number - /** - * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. - * @default true - */ - setting: boolean - } & { [key: string]: unknown })[] + /** @description Require status checks to pass before merging. Set to `null` to disable. */ + required_status_checks: + | ({ + /** @description Require branches to be up to date before merging. */ + strict: boolean + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts: string[] + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: ({ + /** @description The name of the required check */ + context: string + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number + } & { [key: string]: unknown })[] + } & { [key: string]: unknown }) + | null + /** @description Enforce all configured restrictions for administrators. Set to `true` to enforce required status checks for repository administrators. Set to `null` to disable. */ + enforce_admins: boolean | null + /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ + required_pull_request_reviews: + | ({ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[] + /** @description The list of team `slug`s with dismissal access */ + teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] + } & { [key: string]: unknown } + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) review them. */ + require_code_owner_reviews?: boolean + /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[] + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[] + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | null + /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ + restrictions: + | ({ + /** @description The list of user `login`s with push access */ + users: string[] + /** @description The list of team `slug`s with push access */ + teams: string[] + /** @description The list of app `slug`s with push access */ + apps?: string[] + } & { [key: string]: unknown }) + | null + /** @description Enforces a linear commit Git history, which prevents anyone from pushing merge commits to a branch. Set to `true` to enforce a linear commit history. Set to `false` to disable a linear commit Git history. Your repository must allow squash merging or rebase merging before you can enable a linear commit history. Default: `false`. For more information, see "[Requiring a linear commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" in the GitHub Help documentation. */ + required_linear_history?: boolean + /** @description Permits force pushes to the protected branch by anyone with write access to the repository. Set to `true` to allow force pushes. Set to `false` or `null` to block force pushes. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation." */ + allow_force_pushes?: boolean | null + /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ + allow_deletions?: boolean + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean + /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ + required_conversation_resolution?: boolean } & { [key: string]: unknown } } } } - /** - * **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': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/delete-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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]: unknown } - } + /** The name of the branch. */ + branch: components['parameters']['branch'] } } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + } } - /** - * 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': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['protected-branch-admin-enforced'] } } } } /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. */ - 'code-scanning/list-alerts-for-repo': { + 'repos/set-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-scanning-alert-items'][] + 'application/json': components['schemas']['protected-branch-admin-enforced'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **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`. + * Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. */ - 'code-scanning/get-alert': { + 'repos/delete-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] + 204: never 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - 'code-scanning/update-alert': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-scanning-alert'] + 'application/json': components['schemas']['protected-branch-pull-request-review'] } } - 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]: unknown } - } } } - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - 'code-scanning/list-alert-instances': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/delete-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-instance'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] + 204: never 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. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. * - * **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. + * **Note**: Passing new arrays of `users` and `teams` replaces their previous values. */ - 'code-scanning/list-recent-analyses': { + 'repos/update-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-scanning-analysis'][] + 'application/json': components['schemas']['protected-branch-pull-request-review'] } } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + dismissal_restrictions?: { + /** @description The list of user `login`s with dismissal access */ + users?: string[] + /** @description The list of team `slug`s with dismissal access */ + teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] + } & { [key: string]: unknown } + /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ + dismiss_stale_reviews?: boolean + /** @description Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) have reviewed. */ + require_code_owner_reviews?: boolean + /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ + required_approving_review_count?: number + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ + bypass_pull_request_allowances?: { + /** @description The list of user `login`s allowed to bypass pull request requirements. */ + users?: string[] + /** @description The list of team `slug`s allowed to bypass pull request requirements. */ + teams?: string[] + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } } } /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. * - * 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). + * **Note**: You must enable branch protection to require signed commits. */ - 'code-scanning/get-analysis': { + 'repos/get-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json+sarif': string - 'application/json': components['schemas']['code-scanning-analysis'] + 'application/json': components['schemas']['protected-branch-admin-enforced'] } } - 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + * 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. */ - 'code-scanning/delete-analysis': { + 'repos/create-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - query: { - /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - confirm_delete?: string | null + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-scanning-analysis-deletion'] + 'application/json': components['schemas']['protected-branch-admin-enforced'] } } - 400: components['responses']['bad_request'] - 403: components['responses']['code_scanning_forbidden_write'] 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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)." + * 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. */ - 'code-scanning/upload-sarif': { + 'repos/delete-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 202: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - 400: unknown - 403: components['responses']['code_scanning_forbidden_write'] + 204: never 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - 413: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - ref: components['schemas']['code-scanning-ref'] - sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string - } & { [key: string]: unknown } - } } } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'code-scanning/get-sarif': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-status-checks-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - sarif_id: string + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-scanning-sarifs-status'] + 'application/json': components['schemas']['status-check-policy'] } } - 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - 404: unknown - 503: components['responses']['service_unavailable'] + 404: components['responses']['not_found'] } } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-in-repository-for-authenticated-user': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/remove-status-check-protection': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } & { [key: string]: unknown } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + 204: never } } /** - * Creates a codespace owned by the authenticated user in the specified repository. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. */ - 'codespaces/create-with-repo-for-authenticated-user': { + 'repos/update-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['status-check-policy'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number + /** @description Require branches to be up to date before merging. */ + strict?: boolean + /** + * @deprecated + * @description **Deprecated**: The list of status checks to require in order to merge into this branch. If any of these checks have recently been set by a particular GitHub App, they will be required to come from that app in future for the branch to merge. Use `checks` instead of `contexts` for more fine-grained control. + */ + contexts?: string[] + /** @description The list of status checks to require in order to merge into this branch. */ + checks?: ({ + /** @description The name of the required check */ + context: string + /** @description The ID of the GitHub App that must provide this check. Omit this field to automatically select the GitHub App that has recently provided this check, or any app if it was not set by a GitHub App. Pass -1 to explicitly allow any app to set the status. */ + app_id?: number + } & { [key: string]: unknown })[] } & { [key: string]: unknown } } } } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/repo-machines-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Required. The location to check for available machines. */ - location: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } & { [key: string]: unknown } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/list-collaborators': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/get-all-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['collaborator'][] + 'application/json': string[] } } 404: components['responses']['not_found'] } } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/check-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a collaborator */ - 204: never - /** Not Found if user is not a collaborator */ - 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - 'repos/add-collaborator': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/set-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - username: components['parameters']['username'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { - /** Response when a new invitation is created */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['repository-invitation'] + 'application/json': string[] } } - /** Response when person is already a collaborator */ - 204: never - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - permissions?: string - } & { [key: string]: unknown } + 'application/json': ( + | ({ + /** @description The name of the status checks */ + contexts: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } } } } - 'repos/remove-collaborator': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/add-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - username: components['parameters']['username'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': string[] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The name of the status checks */ + contexts: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - 'repos/get-collaborator-permission-level': { + /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'repos/remove-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - username: components['parameters']['username'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { - /** if user has admin permissions */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-collaborator-permission'] + 'application/json': string[] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The name of the status checks */ + contexts: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** - * 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/). + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Comments are ordered by ascending ID. + * Lists who has access to this protected branch. + * + * **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. */ - 'repos/list-commit-comments-for-repo': { + 'repos/get-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit-comment'][] + 'application/json': components['schemas']['branch-restriction-policy'] } } + 404: components['responses']['not_found'] } } - 'repos/get-commit-comment': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Disables the ability to restrict who can push to this branch. + */ + 'repos/delete-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] + 204: never } } - 'repos/delete-commit-comment': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Lists the GitHub Apps that have push access to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + */ + 'repos/get-apps-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['integration'][] + } + } 404: components['responses']['not_found'] } } - 'repos/update-commit-comment': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/set-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['commit-comment'] + 'application/json': components['schemas']['integration'][] } } - 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** @description The contents of the comment */ - body: string - } & { [key: string]: unknown } + 'application/json': ( + | ({ + /** @description apps parameter */ + apps: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } } } } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - 'reactions/list-for-commit-comment': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/add-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['integration'][] } } - 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description apps parameter */ + apps: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - 'reactions/create-for-commit-comment': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + * + * | Type | Description | + * | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/remove-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { - /** Reaction exists */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['integration'][] } } - 415: components['responses']['preview_header_missing'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } & { [key: string]: unknown } + 'application/json': ( + | ({ + /** @description apps parameter */ + apps: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } } } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + * Lists the teams who have push access to this branch. The list includes child teams. */ - 'reactions/delete-for-commit-comment': { + 'repos/get-teams-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['team'][] + } + } + 404: components['responses']['not_found'] } } /** - * **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. | + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * These are the possible values for `reason` in the `verification` object: + * 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. * - * | 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. | + * | 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/list-commits': { + 'repos/set-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit'][] + 'application/json': components['schemas']['team'][] } } - 400: components['responses']['bad_request'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The slug values for teams */ + teams: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + * 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/list-branches-for-head-commit': { + 'repos/add-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['branch-short'][] + 'application/json': components['schemas']['team'][] } } 422: components['responses']['validation_failed'] } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The slug values for teams */ + teams: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } + } } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - 'repos/list-comments-for-commit': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Removes the ability of a team to push to this branch. You can also remove push access for child teams. + * + * | Type | Description | + * | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/remove-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit-comment'][] + 'application/json': components['schemas']['team'][] } } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The slug values for teams */ + teams: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** - * Create a comment for a commit using its `:commit_sha`. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * Lists the people who have push access to this branch. */ - 'repos/create-commit-comment': { + 'repos/get-users-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['commit-comment'] + 'application/json': components['schemas']['simple-user'][] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - /** @description Relative path of the file to comment on. */ - path?: string - /** @description Line index in the diff to comment on. */ - position?: number - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - line?: number - } & { [key: string]: unknown } - } + 404: components['responses']['not_found'] } } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - 'repos/list-pull-requests-associated-with-commit': { + /** + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. + * + * | Type | Description | + * | ------- | ----------------------------------------------------------------------------------------------------------------------------- | + * | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + */ + 'repos/set-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'][] + 'application/json': components['schemas']['simple-user'][] } } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The username for users */ + users: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** - * 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. | + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * These are the possible values for `reason` in the `verification` object: + * Grants the specified people push access for this branch. * - * | 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. | + * | 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/get-commit': { + 'repos/add-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['commit'] + 'application/json': components['schemas']['simple-user'][] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The username for users */ + users: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** - * **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. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * Lists 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. + * 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. | */ - 'checks/list-for-ref': { + 'repos/remove-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - app_id?: number + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - check_runs: components['schemas']['check-run'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['simple-user'][] } } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The username for users */ + users: string[] + } & { [key: string]: unknown }) + | string[] + ) & { [key: string]: unknown } + } } } /** - * **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`. + * Renames a branch in a repository. * - * 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. + * **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/enterprise-server@3.6/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. */ - 'checks/list-suites-for-ref': { + 'repos/rename-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the branch. */ + branch: components['parameters']['branch'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { content: { - 'application/json': { - total_count: number - check_suites: components['schemas']['check-suite'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['branch-with-protection'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The new name of the branch. */ + new_name: string + } & { [key: string]: unknown } + } } } /** - * 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. - * + * **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. * - * Additionally, a combined `state` is returned. The `state` is one of: + * 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. * - * * **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` + * 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. */ - 'repos/get-combined-status-for-ref': { + 'checks/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { + 201: { content: { - 'application/json': components['schemas']['combined-commit-status'] + 'application/json': components['schemas']['check-run'] } } - 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @enum {undefined} */ + status: 'completed' + } & { + conclusion: unknown + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: 'queued' | 'in_progress' + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name: string + /** @description The SHA of the commit. */ + head_sha: string + /** @description The URL of the integrator's site that has the full details of the check. If the integrator does not provide this, then the homepage of the GitHub app is used. */ + details_url?: string + /** @description A reference for the run on the integrator's system. */ + external_id?: string + /** + * @description The current status. + * @default queued + * @enum {string} + */ + status?: 'queued' | 'in_progress' | 'completed' + /** + * Format: date-time + * @description The time that the check run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string + /** @description 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/enterprise-server@3.6/rest/reference/checks#output-object) description. */ + output?: { + /** @description The title of the check run. */ + title: string + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + summary: string + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ + text?: string + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + annotations?: ({ + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string + /** @description The start line of the annotation. */ + start_line: number + /** @description The end line of the annotation. */ + end_line: number + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: 'notice' | 'warning' | 'failure' + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string + } & { [key: string]: unknown })[] + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) description for details. */ + images?: ({ + /** @description The alternative text for the image. */ + alt: string + /** @description The full URL of the image. */ + image_url: string + /** @description A short image description. */ + caption?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: ({ + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } } } /** - * 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. + * **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. * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + * 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. */ - 'repos/list-commit-statuses-for-ref': { + 'checks/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['status'][] + 'application/json': components['schemas']['check-run'] } } - 301: components['responses']['moved_permanently'] } } /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. + * **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. * - * `content_reports_enabled` is only returned for organization-owned repositories. + * Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. */ - 'repos/get-community-profile-metrics': { + 'checks/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['community-profile'] + 'application/json': components['schemas']['check-run'] } } } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @enum {undefined} */ + status?: 'completed' + } & { + conclusion: unknown + } & { [key: string]: unknown }) + | ({ + /** @enum {undefined} */ + status?: 'queued' | 'in_progress' + } & { [key: string]: unknown }) + ) & { + /** @description The name of the check. For example, "code-coverage". */ + name?: string + /** @description The URL of the integrator's site that has the full details of the check. */ + details_url?: string + /** @description A reference for the run on the integrator's system. */ + external_id?: string + /** + * Format: date-time + * @description This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + started_at?: string + /** + * @description The current status. + * @enum {string} + */ + status?: 'queued' | 'in_progress' | 'completed' + /** + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. + * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. + * @enum {string} + */ + conclusion?: 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'success' | 'skipped' | 'stale' | 'timed_out' + /** + * Format: date-time + * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + completed_at?: string + /** @description 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/enterprise-server@3.6/rest/reference/checks#output-object-1) description. */ + output?: { + /** @description **Required**. */ + title?: string + /** @description Can contain Markdown. */ + summary: string + /** @description Can contain Markdown. */ + text?: string + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ + annotations?: ({ + /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ + path: string + /** @description The start line of the annotation. */ + start_line: number + /** @description The end line of the annotation. */ + end_line: number + /** @description The start column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + start_column?: number + /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ + end_column?: number + /** + * @description The level of the annotation. + * @enum {string} + */ + annotation_level: 'notice' | 'warning' | 'failure' + /** @description A short description of the feedback for these lines of code. The maximum size is 64 KB. */ + message: string + /** @description The title that represents the annotation. The maximum size is 255 characters. */ + title?: string + /** @description Details about this annotation. The maximum size is 64 KB. */ + raw_details?: string + } & { [key: string]: unknown })[] + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ + images?: ({ + /** @description The alternative text for the image. */ + alt: string + /** @description The full URL of the image. */ + image_url: string + /** @description A short image description. */ + caption?: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ + actions?: ({ + /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ + label: string + /** @description A short explanation of what this action would do. The maximum size is 40 characters. */ + description: string + /** @description A reference for the action on the integrator's system. The maximum size is 20 characters. */ + identifier: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } + } } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/compare-commits': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - basehead: string + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['commit-comparison'] + 'application/json': components['schemas']['check-annotation'][] } } - 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. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * - * 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. + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ - 'repos/get-content': { + 'checks/rerequest-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } } responses: { /** Response */ - 200: { + 201: { 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]: unknown } + 'application/json': { [key: string]: unknown } + } + } + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + 'application/json': components['schemas']['basic-error'] } } - 302: components['responses']['found'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } } } - /** Creates a new file or replaces an existing file in a repository. */ - 'repos/create-or-update-file-contents': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { - /** Response */ + /** Response when the suite already exists */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - /** Response */ + /** Response when the suite was created */ 201: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The new file content, using Base64 encoding. */ - content: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string - } & { [key: string]: unknown } - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string - } & { [key: string]: unknown } + /** @description The sha of the head commit. */ + head_sha: string } & { [key: string]: unknown } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite-preference'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The blob SHA of the file being replaced. */ - sha: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description object containing information about the committer. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } & { [key: string]: unknown } - /** @description object containing information about the author. */ - author?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } & { [key: string]: unknown } + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: ({ + /** @description The `id` of the GitHub App. */ + app_id: number + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean + } & { [key: string]: unknown })[] } & { [key: string]: unknown } } } } /** - * 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. + * **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`. * - * 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. + * 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. */ - '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'] + 'checks/get-suite': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { - /** if repository contains content */ + /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['contributor'][] + 'application/json': components['schemas']['check-suite'] } } - /** Response if repository is empty */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/list-repo-secrets': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } query: { - /** Results per page (max 100) */ + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -31677,653 +30326,689 @@ export interface operations { content: { 'application/json': { total_count: number - secrets: components['schemas']['dependabot-secret'][] + check_runs: components['schemas']['check-run'][] } & { [key: string]: unknown } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-public-key': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + 'application/json': { [key: string]: unknown } } } } } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-secret': { + /** + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + 'code-scanning/list-alerts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + } + 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'] + /** The number of 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'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-secret'] + 'application/json': components['schemas']['code-scanning-alert-items'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * **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`. */ - 'dependabot/create-or-update-repo-secret': { + 'code-scanning/get-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['code-scanning-alert'] } } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - } & { [key: string]: unknown } - } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/delete-repo-secret': { + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + 'code-scanning/update-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 */ - 204: never + 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'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] + } & { [key: string]: unknown } + } } } - /** Simple filtering of deployments is available via query parameters: */ - 'repos/list-deployments': { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alert-instances': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { - /** The SHA recorded at creation time. */ - sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - environment?: string | null - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of 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: { - headers: {} content: { - 'application/json': components['schemas']['deployment'][] + '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'] } } /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts + * 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. * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. + * 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. * - * #### 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. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * #### 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`. + * **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. */ - 'repos/create-deployment': { + 'code-scanning/list-recent-analyses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number of 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 */ - 201: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['code-scanning-analysis'][] } } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - ref: string - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - task?: string - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - auto_merge?: boolean - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - required_contexts?: string[] - payload?: ({ [key: string]: unknown } | string) & { [key: string]: unknown } - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - environment?: string - /** - * @description Short description of the deployment. - * @default - */ - description?: string | null - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - transient_environment?: boolean - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - production_environment?: boolean - } & { [key: string]: unknown } - } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - 'repos/get-deployment': { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + 'code-scanning/get-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** 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']['deployment'] + 'application/json': components['schemas']['code-scanning-analysis'] + 'application/json+sarif': { [key: string]: unknown } } } + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. * - * To set a deployment as inactive, you must: + * 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. * - * * 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. + * 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` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. * - * 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)." + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. */ - 'repos/delete-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** Users with pull access can view deployment statuses for a deployment: */ - 'repos/list-deployment-statuses': { + 'code-scanning/delete-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['deployment-status'][] + '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'] } } /** - * Users with `push` access can create deployment statuses for a given deployment. + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. * - * 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. + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." */ - 'repos/create-deployment-status': { + 'code-scanning/upload-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } + } + responses: { + /** Response */ + 202: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-receipt'] } } - 422: components['responses']['validation_failed'] + /** Bad Request if the sarif field is invalid */ + 400: unknown + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + 413: unknown + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + ref: components['schemas']['code-scanning-ref'] + sarif: components['schemas']['code-scanning-analysis-sarif-file'] /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ */ - environment?: 'production' | 'staging' | 'qa' + checkout_uri?: string /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - environment_url?: string - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean + started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string } & { [key: string]: unknown } } } } - /** Users with pull access can view a deployment status for a deployment: */ - 'repos/get-deployment-status': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + 'code-scanning/get-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - status_id: number + /** The SARIF ID obtained after uploading. */ + sarif_id: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-status'] } } - 404: components['responses']['not_found'] + 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * 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. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - 'repos/create-dispatch-event': { + 'repos/codeowners-errors': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string + } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A custom webhook event name. */ - event_type: string - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { [key: string]: unknown } - } & { [key: string]: unknown } + 200: { + content: { + 'application/json': components['schemas']['codeowners-errors'] + } } + /** Resource not found */ + 404: unknown } } /** - * Get all environments for a repository. + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * - * 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. + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ - 'repos/get-all-environments': { + 'repos/list-collaborators': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: 'outside' | 'direct' | 'all' + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: 'pull' | 'triage' | 'push' | 'maintain' | 'admin' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of environments in this repository - * @example 5 - */ - total_count?: number - environments?: components['schemas']['environment'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['collaborator'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/check-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } + /** Response if user is a collaborator */ + 204: never + /** Not Found if user is not a collaborator */ + 404: unknown } } /** - * 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)." + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * **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)." + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." * - * You must authenticate using an access token with the repo scope to use this endpoint. + * 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/enterprise-server@3.6/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. */ - 'repos/create-or-update-environment': { + 'repos/add-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } 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: { + /** Response when a new invitation is created */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-invitation'] } } + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - wait_timer?: components['schemas']['wait-timer'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: - | ({ - type?: components['schemas']['deployment-reviewer-type'] - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number - } & { [key: string]: unknown })[] - | null - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - } | null + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** + * @default push + */ + permission?: string + } & { [key: string]: unknown } } } } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - 'repos/delete-an-environment': { + 'repos/remove-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Default response */ + /** Response */ 204: never } } - 'activity/list-repo-events': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + 'repos/get-collaborator-permission-level': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ + /** if user has admin permissions */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['repository-collaborator-permission'] } } + 404: components['responses']['not_found'] } } - 'repos/list-forks': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + 'repos/list-commit-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32334,202 +31019,172 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['commit-comment'][] } } - 400: components['responses']['bad_request'] } } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - 'repos/create-fork': { + 'repos/get-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['commit-comment'] } } - 400: components['responses']['bad_request'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': - | ({ - /** @description Optional parameter to specify the organization name if forking into an organization. */ - organization?: string - } & { [key: string]: unknown }) - | null + } + 'repos/delete-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } - 'git/create-blob': { + 'repos/update-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['short-blob'] + 'application/json': components['schemas']['commit-comment'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new blob's content. */ - content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - encoding?: string + /** @description The contents of the comment */ + body: string } & { [key: string]: unknown } } } } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - 'git/get-blob': { + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ + 'reactions/list-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - file_sha: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['blob'] + 'application/json': components['schemas']['reaction'][] } } - 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': { + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + 'reactions/create-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] } + } + /** Reaction created */ + 201: { content: { - 'application/json': components['schemas']['git-commit'] + 'application/json': components['schemas']['reaction'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message */ - message: string - /** @description The SHA of the tree object this commit points to */ - tree: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - parents?: string[] - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name: string - /** @description The email of the author (or committer) of the commit */ - email: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } & { [key: string]: unknown } - /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } & { [key: string]: unknown } - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - signature?: string + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * **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/enterprise-server@3.6/rest/reference/repos#comments). + */ + 'reactions/delete-for-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32559,44 +31214,26 @@ export interface operations { * | `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': { + 'repos/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string } query: { - /** Results per page (max 100) */ + /** 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 + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32607,152 +31244,83 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['git-ref'][] + 'application/json': components['schemas']['commit'][] } } + 400: components['responses']['bad_request'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] } } /** - * 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. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **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)". + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - 'git/get-ref': { + 'repos/list-branches-for-head-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } 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': { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string - /** @description The SHA1 value for this reference. */ - sha: string - /** @example "refs/heads/newbranch" */ - key?: string - } & { [key: string]: unknown } - } - } - } - 'git/delete-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - } - responses: { - /** Response */ - 204: never + 'application/json': components['schemas']['branch-short'][] + } + } 422: components['responses']['validation_failed'] } } - 'git/update-ref': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + 'repos/list-comments-for-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['commit-comment'][] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The SHA1 value to set this reference to */ - sha: string - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - force?: boolean - } & { [key: string]: unknown } - } } } /** - * 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: + * Create a comment for a commit using its `:commit_sha`. * - * | 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. | + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'git/create-tag': { + 'repos/create-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { @@ -32762,42 +31330,64 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - tag: string - /** @description The tag message. */ - message: string - /** @description The SHA of the git object this is tagging. */ - object: string - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - type: 'commit' | 'tree' | 'blob' - /** @description An object with information about the individual creating the tag. */ - tagger?: { - /** @description The name of the author of the tag */ - name: string - /** @description The email of the author of the tag */ - email: string - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } & { [key: string]: unknown } + /** @description The contents of the comment. */ + body: string + /** @description Relative path of the file to comment on. */ + path?: string + /** @description Line index in the diff to comment on. */ + position?: number + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number } & { [key: string]: unknown } } } } + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + 'repos/list-pull-requests-associated-with-commit': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-simple'][] + } + } + } + } /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: @@ -32827,125 +31417,139 @@ export interface operations { * | `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': { + 'repos/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tag_sha: string + /** ref parameter */ + ref: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * **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. * - * 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)." + * 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. */ - 'git/create-tree': { + 'checks/list-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + app_id?: number } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['git-tree'] + 'application/json': { + total_count: number + check_runs: components['schemas']['check-run'][] + } & { [key: string]: unknown } } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: ({ - /** @description The file referenced in the tree. */ - path?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - type?: 'blob' | 'tree' | 'commit' - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null - /** - * @description 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]: unknown })[] - /** - * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. - * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. - */ - base_tree?: string - } & { [key: string]: unknown } - } } } /** - * Returns a single tree using the SHA1 value for that tree. + * **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`. * - * 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. + * 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. */ - 'git/get-tree': { + 'checks/list-suites-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tree_sha: string + /** ref parameter */ + ref: 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 + /** Filters check suites by GitHub App `id`. */ + app_id?: number + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** The number of results per page (max 100). */ + per_page?: 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-tree'] + 'application/json': { + total_count: number + check_suites: components['schemas']['check-suite'][] + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'repos/list-webhooks': { + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + 'repos/get-combined-status-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32954,408 +31558,540 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['hook'][] + 'application/json': components['schemas']['combined-commit-status'] } } 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. + * 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/create-webhook': { + 'repos/list-commit-statuses-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['status'][] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - 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'] - /** @example "abc" */ - token?: string - /** @example "sha256" */ - digest?: string - } & { [key: string]: unknown } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - } | null - } + 301: components['responses']['moved_permanently'] } } - /** 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': { + /** + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'repos/compare-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['commit-comparison'] } } 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } - 'repos/delete-webhook': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/vnd.github.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]: unknown } + } + } + 302: components['responses']['found'] + 403: components['responses']['forbidden'] 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': { + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + 'repos/create-or-update-file-contents': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['file-commit'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['file-commit'] } } 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description 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'] - /** @example "bar@example.com" */ - address?: string - /** @example "The Serious Room" */ - room?: string + /** @description The commit message. */ + message: string + /** @description The new file content, using Base64 encoding. */ + content: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string + } & { [key: string]: unknown } + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string } & { [key: string]: unknown } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - add_events?: string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - remove_events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean } & { [key: string]: unknown } } } } /** - * 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)." + * Deletes a file in a repository. * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'repos/get-webhook-config-for-repo': { + 'repos/delete-file': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['file-commit'] } } + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The commit message. */ + message: string + /** @description The blob SHA of the file being deleted. */ + sha: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } & { [key: string]: unknown } + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } } } /** - * 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)." + * 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. * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + * 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/update-webhook-config-for-repo': { + 'repos/list-contributors': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + } + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string + /** The number of 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']['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'] + 'application/json': components['schemas']['contributor'][] } } + /** Response if repository is empty */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - 'repos/list-webhook-deliveries': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/list-repo-secrets': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['hook-delivery-item'][] + 'application/json': { + total_count: number + secrets: components['schemas']['dependabot-secret'][] + } & { [key: string]: unknown } } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** Returns a delivery for a webhook configured in a repository. */ - 'repos/get-webhook-delivery': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['dependabot-public-key'] } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - 'repos/redeliver-webhook-delivery': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'repos/ping-webhook': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - 'repos/test-push-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + 200: { + content: { + 'application/json': components['schemas']['dependabot-secret'] + } } } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } } /** - * View the progress of an import. + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); * - * **Import status** + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` * - * This section includes details about the possible values of the `status` field of the Import Progress response. + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. * - * An import that does not have errors will progress through these steps: + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); * - * * `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. + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); * - * If there are problems, you will see one of these in the `status` field: + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * #### Example encrypting a secret using Ruby * - * **The project_choices field** + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. * - * 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. + * ```ruby + * require "rbnacl" + * require "base64" * - * **Git LFS related fields** + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") * - * * `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. + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - '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': { + 'dependabot/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ + /** Response when creating a secret */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['empty-object'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The URL of the originating repository. */ - vcs_url: string - /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} - */ - vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the username to provide to `vcs_url`. */ - vcs_username?: string - /** @description If authentication is required, the password to provide to `vcs_url`. */ - vcs_password?: string - /** @description For a tfvc import, the name of the project that is being imported. */ - tfvc_project?: string + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string } & { [key: string]: unknown } } } } - /** Stop an import for a repository. */ - 'migrations/cancel-import': { + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { @@ -33363,324 +32099,402 @@ export interface operations { 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': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + 'dependency-graph/diff-range': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components['parameters']['manifest-path'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['dependency-graph-diff'] } } - } - requestBody: { - content: { - 'application/json': - | ({ - /** @description The username to provide to the originating repository. */ - vcs_username?: string - /** @description The password to provide to the originating repository. */ - vcs_password?: string - /** @example "git" */ - vcs?: string - /** @example "project1" */ - tfvc_project?: string - } & { [key: string]: unknown }) - | null - } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + /** Simple filtering of deployments is available via query parameters: */ + 'repos/list-deployments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] + /** The SHA recorded at creation time. */ + sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['porter-author'][] + 'application/json': components['schemas']['deployment'][] } } - 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': { + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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/enterprise-server@3.6/rest/commits/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - author_id: number } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['porter-author'] + 'application/json': components['schemas']['deployment'] } } - 404: components['responses']['not_found'] + /** Merged branch response */ + 202: { + content: { + 'application/json': { + message?: string + } & { [key: string]: unknown } + } + } + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new Git author email. */ - email?: string - /** @description The new Git author name. */ - name?: string - } - } - } - } - /** List files larger than 100MB found during the import */ - 'migrations/get-large-files': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['porter-large-file'][] - } + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string + /** + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean + /** @description The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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]: unknown } | string) & { [key: string]: unknown } + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + transient_environment?: boolean + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean + } & { [key: string]: unknown } } } } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - 'migrations/set-lfs-preference': { + 'repos/get-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['deployment'] } } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} - */ - use_lfs: 'opt_in' | 'opt_out' - } & { [key: string]: unknown } - } + 404: components['responses']['not_found'] } } /** - * 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. + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. * - * 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. + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ - 'apps/get-repo-installation': { + 'repos/delete-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['installation'] - } - } - 301: components['responses']['moved_permanently'] + 204: never 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** 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': { + /** Users with pull access can view deployment statuses for a deployment: */ + 'repos/list-deployment-statuses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': (components['schemas']['interaction-limit-response'] | { [key: string]: unknown }) & { [key: string]: unknown } + 'application/json': components['schemas']['deployment-status'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['interaction-limit-response'] + 'application/json': components['schemas']['deployment-status'] } } - /** Response */ - 409: unknown + 422: components['responses']['validation_failed'] } 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'] + 'application/json': { + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean + } & { [key: string]: unknown } } } - responses: { - /** Response */ - 204: never - /** Response */ - 409: unknown - } } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - 'repos/list-invitations': { + /** Users with pull access can view a deployment status for a deployment: */ + 'repos/get-deployment-status': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + status_id: number } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['repository-invitation'][] + 'application/json': components['schemas']['deployment-status'] } } + 404: components['responses']['not_found'] } } - 'repos/delete-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/update-invitation': { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + 'repos/create-dispatch-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } + 204: never + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. - * @enum {string} - */ - permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown } } & { [key: string]: unknown } } } } /** - * List issues in a repository. + * Lists the environments for 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. + * 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. */ - 'issues/list-for-repo': { + 'repos/get-all-environments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33689,241 +32503,264 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number + environments?: components['schemas']['environment'][] + } & { [key: string]: unknown } } } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'issues/create': { + 'repos/get-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['environment'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the issue. */ - title: (string | number) & { [key: string]: unknown } - /** @description The contents of the issue. */ - body?: string - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - assignee?: string | null - milestone?: ((string | number) & { [key: string]: unknown }) | null - /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: (( - | string - | ({ - id?: number - name?: string - description?: string | null - color?: string | null - } & { [key: string]: unknown }) - ) & { [key: string]: unknown })[] - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } & { [key: string]: unknown } - } } } - /** By default, Issue Comments are ordered by ascending ID. */ - 'issues/list-comments-for-repo': { + /** + * 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-or-update-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['environment'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** 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'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | ({ + type?: components['schemas']['deployment-reviewer-type'] + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number + } & { [key: string]: unknown })[] + | null + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } | null + } } } - 'issues/get-comment': { + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + 'repos/delete-an-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue-comment'] - } - } - 404: components['responses']['not_found'] + /** Default response */ + 204: never } } - 'issues/delete-comment': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number + branch_policies: components['schemas']['deployment-branch-policy'][] + } & { [key: string]: unknown } + } + } } } - 'issues/update-comment': { + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 422: components['responses']['validation_failed'] + /** Response if the same branch name pattern already exists */ + 303: never + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown } requestBody: { content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - 'reactions/list-for-issue-comment': { + /** + * Gets a deployment branch policy for an environment. + * + * 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-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 404: components['responses']['not_found'] } } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - 'reactions/create-for-issue-comment': { + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/update-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { - /** Reaction exists */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } & { [key: string]: unknown } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } /** - * **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`. + * Deletes a deployment branch policy for an environment. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ - 'reactions/delete-for-issue-comment': { + 'repos/delete-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { @@ -33931,14 +32768,16 @@ export interface operations { 204: never } } - 'issues/list-events-for-repo': { + 'activity/list-repo-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33947,216 +32786,181 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-event'][] + 'application/json': components['schemas']['event'][] } } - 422: components['responses']['validation_failed'] } } - 'issues/get-event': { + 'repos/list-forks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - event_id: number + } + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['minimal-repository'][] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 400: components['responses']['bad_request'] } } /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * Create a fork for 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. + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ - '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': { + 'repos/create-fork': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['full-repository'] } } - 301: components['responses']['moved_permanently'] + 400: components['responses']['bad_request'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { - 'application/json': { - /** @description The title of the issue. */ - title?: ((string | number) & { [key: string]: unknown }) | null - /** @description The contents of the issue. */ - body?: string | null - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - milestone?: ((string | number) & { [key: string]: unknown }) | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: (( - | string - | ({ - id?: number - name?: string - description?: string | null - color?: string | null - } & { [key: string]: unknown }) - ) & { [key: string]: unknown })[] - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } & { [key: string]: unknown } + 'application/json': + | ({ + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string + } & { [key: string]: unknown }) + | null } } } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - 'issues/add-assignees': { + 'git/create-blob': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 201: { - content: { - 'application/json': components['schemas']['issue'] + headers: { + Location?: string } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] - } & { [key: string]: unknown } - } - } - } - /** 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'] + 'application/json': components['schemas']['short-blob'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The new blob's content. */ + content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string } & { [key: string]: unknown } } } } - /** Issue Comments are ordered by ascending ID. */ - 'issues/list-comments': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + file_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['blob'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'issues/create-comment': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { @@ -34166,62 +32970,122 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['git-commit'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description The commit message */ + message: string + /** @description The SHA of the tree object this commit points to */ + tree: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[] + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string + /** @description The email of the author (or committer) of the commit */ + email: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } & { [key: string]: unknown } + /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } & { [key: string]: unknown } + /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ + signature?: string } & { [key: string]: unknown } } } } - 'issues/list-events': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-event-for-issue'][] + 'application/json': components['schemas']['git-commit'] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - 'issues/list-labels-on-issue': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** ref parameter */ + ref: string } } responses: { @@ -34229,309 +33093,369 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'][] } } - 410: components['responses']['gone'] } } - /** Removes any previous labels and sets the new labels for an issue. */ - 'issues/set-labels': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + 'git/get-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] } } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': ( - | ({ - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - labels?: string[] - } & { [key: string]: unknown }) - | string[] - | ({ - labels?: ({ - name: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown }) - | ({ - name: string - } & { [key: string]: unknown })[] - | string - ) & { [key: string]: unknown } - } + 404: components['responses']['not_found'] } } - 'issues/add-labels': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] } } - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': ( - | ({ - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - labels?: string[] - } & { [key: string]: unknown }) - | string[] - | ({ - labels?: ({ - name: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown }) - | ({ - name: string - } & { [key: string]: unknown })[] - | string - ) & { [key: string]: unknown } + 'application/json': { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string + /** @description The SHA1 value for this reference. */ + sha: string + /** @example "refs/heads/newbranch" */ + key?: string + } & { [key: string]: unknown } } } } - 'issues/remove-all-labels': { + 'git/delete-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } responses: { /** Response */ 204: never - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - /** 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': { + 'git/update-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - name: string + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] } } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The SHA1 value to set this reference to */ + sha: string + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean + } & { [key: string]: unknown } + } } } /** - * Users with push access can lock an issue or pull request's conversation. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. + * + * **Signature verification object** * - * 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 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. | */ - 'issues/lock': { + 'git/create-tag': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-tag'] + } + } 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | ({ - /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - * @enum {string} - */ - lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } & { [key: string]: unknown }) - | 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'] + 'application/json': { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string + /** @description The tag message. */ + message: string + /** @description The SHA of the git object this is tagging. */ + object: string + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: 'commit' | 'tree' | 'blob' + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string + /** @description The email of the author of the tag */ + email: string + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } } } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - 'reactions/list-for-issue': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + tag_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['git-tag'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - 'reactions/create-for-issue': { + /** + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + 'git/create-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['git-tree'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: ({ + /** @description The file referenced in the tree. */ + path?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: 'blob' | 'tree' | 'commit' + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null + /** + * @description 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]: unknown })[] /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + base_tree?: string } & { [key: string]: unknown } } } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * 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. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ - 'reactions/delete-for-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/list-events-for-timeline': { + 'git/get-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + tree_sha: string } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['timeline-issue-events'][] + 'application/json': components['schemas']['git-tree'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - 'repos/list-deploy-keys': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + 'repos/list-webhooks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34542,16 +33466,22 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['deploy-key'][] + 'application/json': components['schemas']['hook'][] } } + 404: components['responses']['not_found'] } } - /** You can create a read-only deploy key. */ - 'repos/create-deploy-key': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34562,101 +33492,101 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['hook'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A name for the key. */ - title?: string - /** @description The contents of the key. */ - key: string + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "abc" */ + token?: string + /** @example "sha256" */ + digest?: string + } & { [key: string]: unknown } /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] */ - read_only?: boolean - } & { [key: string]: unknown } + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } | null } } } - 'repos/get-deploy-key': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['hook'] } } 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': { + 'repos/delete-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never - } - } - 'issues/list-labels-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['label'][] - } - } 404: components['responses']['not_found'] } } - 'issues/create-label': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['hook'] } } 404: components['responses']['not_found'] @@ -34665,133 +33595,220 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - name: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "bar@example.com" */ + address?: string + /** @example "The Serious Room" */ + room?: string + } & { [key: string]: unknown } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean } & { [key: string]: unknown } } } } - 'issues/get-label': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['webhook-config'] } } - 404: components['responses']['not_found'] } } - 'issues/delete-label': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never + 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'] + } + } } } - 'issues/update-label': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + 'repos/list-webhook-deliveries': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['hook-delivery-item'][] } } - } - requestBody: { - content: { - 'application/json': { - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - new_name?: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string - } & { [key: string]: unknown } - } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** Returns a delivery for a webhook configured in a repository. */ + 'repos/get-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['language'] + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - 'repos/enable-lfs-for-repo': { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + 'repos/redeliver-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - 403: unknown + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - 'repos/disable-lfs-for-repo': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + 'repos/ping-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * This method returns the contents of the repository's license file, if one is detected. + * 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. * - * 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. + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` */ - 'licenses/get-for-repo': { + 'repos/test-push-webhook': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-repo-installation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34799,90 +33816,122 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['license-content'] + 'application/json': components['schemas']['installation'] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] } } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - 'repos/merge-upstream': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** The branch has been successfully synced with the upstream repository */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['merged-upstream'] + 'application/json': components['schemas']['repository-invitation'][] } } - /** The branch could not be synced because of a merge conflict */ - 409: unknown - /** The branch could not be synced for some other reason */ - 422: unknown } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string - } & { [key: string]: unknown } + } + 'repos/delete-invitation': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } + responses: { + /** Response */ + 204: never + } } - 'repos/merge': { + 'repos/update-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { - /** Successful Response (The resulting merge commit) */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['commit'] + 'application/json': components['schemas']['repository-invitation'] } } - /** Response when already merged */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - 404: unknown - /** Conflict when there is a merge conflict */ - 409: unknown - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - base: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - head: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - commit_message?: string + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' } & { [key: string]: unknown } } } } - 'issues/list-milestones': { + /** + * 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The state of the milestone. Either `open`, `closed`, or `all`. */ + /** 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. */ 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) */ + /** 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. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34893,16 +33942,25 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['milestone'][] + 'application/json': components['schemas']['issue'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/create-milestone': { + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'issues/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34913,149 +33971,156 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description The title of the issue. */ + title: (string | number) & { [key: string]: unknown } + /** @description The contents of the issue. */ + body?: string + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null + milestone?: ((string | number) & { [key: string]: unknown }) | null + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: (( + | string + | ({ + id?: number + name?: string + description?: string | null + color?: string | null + } & { [key: string]: unknown }) + ) & { [key: string]: unknown })[] + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] } & { [key: string]: unknown } } } } - 'issues/get-milestone': { + /** By default, Issue Comments are ordered by ascending ID. */ + 'issues/list-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + } + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['issue-comment'][] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/delete-milestone': { + 'issues/get-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['issue-comment'] + } + } 404: components['responses']['not_found'] } } - 'issues/update-milestone': { + 'issues/delete-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['milestone'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the milestone. */ - title?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string - } & { [key: string]: unknown } - } + 204: never } } - 'issues/list-labels-for-milestone': { + 'issues/update-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue-comment'] } } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment. */ + body: string + } & { [key: string]: unknown } + } } } - /** List all notifications for the current user. */ - 'activity/list-repo-notifications-for-authenticated-user': { + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ + 'reactions/list-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } 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) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35066,274 +34131,295 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + 'reactions/create-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 202: { + /** Reaction exists */ + 200: { content: { - 'application/json': { - message?: string - url?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['reaction'] } } - /** Reset Content */ - 205: unknown + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} */ - last_read_at?: string + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } - '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': { + /** + * **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/enterprise-server@3.6/rest/reference/issues#comments). + */ + 'reactions/delete-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ 204: never - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean - source?: ( - | ('gh-pages' | 'master' | 'master /docs') - | ({ - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - path: '/' | '/docs' - } & { [key: string]: unknown }) - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - } } } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - 'repos/create-pages-site': { + 'issues/list-events-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['issue-event'][] } } - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | ({ - /** @description The source branch and directory used to publish your Pages site. */ - source: { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - path?: '/' | '/docs' - } & { [key: string]: unknown } - } & { [key: string]: unknown }) - | null - } - } - } - 'repos/delete-pages-site': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } } - 'repos/list-pages-builds': { + 'issues/get-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + event_id: number } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['page-build'][] + 'application/json': components['schemas']['issue-event'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } /** - * 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. + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#issues) webhook. * - * 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. + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'repos/request-pages-build': { + 'issues/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page-build-status'] + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'repos/get-latest-pages-build': { + /** Issue owners and users with push access can edit an issue. */ + 'issues/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the issue. */ + title?: ((string | number) & { [key: string]: unknown }) | null + /** @description The contents of the issue. */ + body?: string | null + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'not_planned' | 'reopened') | null + milestone?: ((string | number) & { [key: string]: unknown }) | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: (( + | string + | ({ + id?: number + name?: string + description?: string | null + color?: string | null + } & { [key: string]: unknown }) + ) & { [key: string]: unknown })[] + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] + } & { [key: string]: unknown } + } } } - 'repos/get-pages-build': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + 'issues/add-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - build_id: number + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['issue'] } } } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] + } & { [key: string]: unknown } + } + } } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - 'repos/get-pages-health-check': { + /** Removes one or more assignees from an issue. */ + 'issues/remove-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pages-health-check'] + 'application/json': components['schemas']['issue'] } } - /** Empty response */ - 202: { - content: { - 'application/json': components['schemas']['empty-object'] - } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] + } & { [key: string]: unknown } } - /** Custom domains are not available for GitHub Pages */ - 400: unknown - 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - 422: unknown } } - /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/list-for-repo': { + /** Issue Comments are ordered by ascending ID. */ + 'issues/list-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35344,67 +34430,61 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project'][] + 'application/json': components['schemas']['issue-comment'][] } } - 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'issues/create-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['issue-comment'] } } - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the project. */ - name: string - /** @description The description of the project. */ - body?: string + /** @description The contents of the comment. */ + body: string } & { [key: string]: unknown } } } } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'pulls/list': { + 'issues/list-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35415,168 +34495,251 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'][] + 'application/json': components['schemas']['issue-event-for-issue'][] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] + 410: components['responses']['gone'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - 'pulls/create': { + 'issues/list-labels-on-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['label'][] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the new pull request. */ - title?: string - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean - /** @example 1 */ - issue?: number - } & { [key: string]: unknown } - } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** 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': { + /** Removes any previous labels and sets the new labels for an issue. */ + 'issues/set-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[] + } & { [key: string]: unknown }) + | string[] + | ({ + labels?: ({ + name: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown }) + | ({ + name: string + } & { [key: string]: unknown })[] + | string + ) & { [key: string]: unknown } + } } } - /** Provides details for a review comment. */ - 'pulls/get-review-comment': { + 'issues/add-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': ( + | ({ + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[] + } & { [key: string]: unknown }) + | string[] + | ({ + labels?: ({ + name: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown }) + | ({ + name: string + } & { [key: string]: unknown })[] + | string + ) & { [key: string]: unknown } + } } } - /** Deletes a review comment. */ - 'pulls/delete-review-comment': { + 'issues/remove-all-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Enables you to edit a review comment. */ - 'pulls/update-review-comment': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'issues/lock': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** @description The text of the reply to the review comment. */ - body: string - } & { [key: string]: unknown } + 'application/json': + | ({ + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' + } & { [key: string]: unknown }) + | null } } } - /** 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': { + /** Users with push access can unlock an issue's conversation. */ + 'issues/unlock': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ + 'reactions/list-for-issue': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + 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 a pull request review comment. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35591,26 +34754,29 @@ export interface operations { } } 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - 'reactions/create-for-pull-request-review-comment': { + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + 'reactions/create-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { - /** Reaction exists */ + /** Response */ 200: { content: { 'application/json': components['schemas']['reaction'] } } - /** Reaction created */ + /** Response */ 201: { content: { 'application/json': components['schemas']['reaction'] @@ -35622,7 +34788,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -35631,17 +34797,20 @@ export interface operations { } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/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 a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ - 'reactions/delete-for-pull-request-comment': { + 'reactions/delete-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -35650,147 +34819,147 @@ export interface operations { 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - 'pulls/get': { + 'issues/list-events-for-timeline': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['timeline-issue-events'][] } } - 304: components['responses']['not_modified'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + 410: components['responses']['gone'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - 'pulls/update': { + 'repos/list-deploy-keys': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['deploy-key'][] + } + } + } + } + /** You can create a read-only deploy key. */ + 'repos/create-deploy-key': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['deploy-key'] } } - 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the pull request. */ + /** @description A name for the key. */ title?: string - /** @description The contents of the pull request. */ - body?: string + /** @description The contents of the key. */ + key: string /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." */ - state?: 'open' | 'closed' - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean + read_only?: boolean } & { [key: string]: unknown } } } } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-pr-for-authenticated-user': { + 'repos/get-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['deploy-key'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } & { [key: string]: unknown } + } + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } + responses: { + /** Response */ + 204: never + } } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments': { + 'issues/list-labels-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35801,26 +34970,19 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 404: components['responses']['not_found'] } } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-review-comment': { + 'issues/create-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { @@ -35830,457 +34992,438 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The text of the review comment. */ - body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id?: string - /** @description The relative path to the file that necessitates a comment. */ - path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number - /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. - * @enum {string} - */ - start_side?: 'LEFT' | 'RIGHT' | 'side' - /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 - */ - in_reply_to?: number + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string } & { [key: string]: unknown } } } } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-reply-for-review-comment': { + 'issues/get-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string - } & { [key: string]: unknown } + } + 'issues/delete-label': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + name: string } } + responses: { + /** Response */ + 204: never + } } - /** 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': { + 'issues/update-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + name: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit'][] + 'application/json': components['schemas']['label'] } } } + requestBody: { + content: { + 'application/json': { + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string + } & { [key: string]: unknown } + } + } } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - 'pulls/list-files': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['language'] } } - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } - 'pulls/check-if-merged': { + 'repos/enable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response if pull request has been merged */ - 204: never - /** Not Found if pull request has not been merged */ - 404: unknown + 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/merge': { + 'repos/disable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** if merge was successful */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-merge-result'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - 405: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } - } - } - /** Conflict if sha was provided and pull request head did not match */ - 409: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | ({ - /** @description Title for the automatic commit message. */ - commit_title?: string - /** @description Extra detail to append to automatic commit message. */ - commit_message?: string - /** @description SHA that pull request head must match to allow merge. */ - sha?: string - /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. - * @enum {string} - */ - merge_method?: 'merge' | 'squash' | 'rebase' - } & { [key: string]: unknown }) - | null - } + /** Response */ + 204: never } } - 'pulls/list-requested-reviewers': { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + 'licenses/get-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 'application/json': components['schemas']['license-content'] } } } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/request-reviewers': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + 'repos/merge-upstream': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ - 201: { + /** The branch has been successfully synced with the upstream repository */ + 200: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': components['schemas']['merged-upstream'] } } - 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ + /** The branch could not be synced because of a merge conflict */ + 409: unknown + /** The branch could not be synced for some other reason */ 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be requested. */ - reviewers?: string[] - /** @description An array of team `slug`s that will be requested. */ - team_reviewers?: string[] + /** @description The name of the branch which should be updated to match upstream. */ + branch: string } & { [key: string]: unknown } } } } - 'pulls/remove-requested-reviewers': { + 'repos/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ - 200: { + /** Successful Response (The resulting merge commit) */ + 201: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': components['schemas']['commit'] } } + /** Response when already merged */ + 204: never + 403: components['responses']['forbidden'] + /** Not Found when the base or head does not exist */ + 404: unknown + /** Conflict when there is a merge conflict */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be removed. */ - reviewers: string[] - /** @description An array of team `slug`s that will be removed. */ - team_reviewers?: string[] + /** @description The name of the base branch that the head will be merged into. */ + base: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string } & { [key: string]: unknown } } } } - /** The list of reviews returns in chronological order. */ - 'pulls/list-reviews': { + 'issues/list-milestones': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } query: { - /** Results per page (max 100) */ + /** 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' + /** The number of 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. */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review'][] + 'application/json': components['schemas']['milestone'][] } } + 404: components['responses']['not_found'] } } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - 'pulls/create-review': { + 'issues/create-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - commit_id?: string - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - body?: string + /** @description The title of the milestone. */ + title: string /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: ({ - /** @description The relative path to the file that necessitates a review comment. */ - path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number - /** @description Text of the review comment. */ - body: string - /** @example 28 */ - line?: number - /** @example RIGHT */ - side?: string - /** @example 26 */ - start_line?: number - /** @example LEFT */ - start_side?: string - } & { [key: string]: unknown })[] + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string } & { [key: string]: unknown } } } } - 'pulls/get-review': { + 'issues/get-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } 404: components['responses']['not_found'] } } - /** Update the review summary comment with new text. */ - 'pulls/update-review': { + 'issues/delete-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + 'issues/update-milestone': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review. */ - body: string + /** @description The title of the milestone. */ + title?: string + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string } & { [key: string]: unknown } } } } - 'pulls/delete-pending-review': { + 'issues/list-labels-for-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['label'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } } - /** List comments for a specific pull request review. */ - 'pulls/list-comments-for-review': { + /** Lists all notifications for the current user in the specified repository. */ + 'activity/list-repo-notifications-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36291,489 +35434,638 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['review-comment'][] + 'application/json': components['schemas']['thread'][] } } - 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': { + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': { + message?: string + url?: string + } & { [key: string]: unknown } } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Reset Content */ + 205: unknown } requestBody: { content: { 'application/json': { - /** @description The message for the pull request review dismissal */ - message: string - /** @example "APPROVE" */ - event?: string + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string } & { [key: string]: unknown } } } } - 'pulls/submit-review': { + 'repos/get-pages': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 'application/json': components['schemas']['page'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + } + } + /** Updates information for a GitHub Enterprise Server 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 400: components['responses']['bad_request'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review */ - body?: string + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. * @enum {string} */ - event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + build_type?: 'legacy' | 'workflow' + source?: ( + | ('gh-pages' | 'master' | 'master /docs') + | ({ + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: '/' | '/docs' + } & { [key: string]: unknown }) + ) & { [key: string]: unknown } } & { [key: string]: unknown } } } } - /** 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': { + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ + 'repos/create-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 202: { + 201: { content: { - 'application/json': { - message?: string - url?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['page'] } } - 403: components['responses']['forbidden'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': | ({ - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: 'legacy' | 'workflow' + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: '/' | '/docs' + } & { [key: string]: unknown } } & { [key: string]: unknown }) | 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': { + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ + 'repos/delete-pages-site': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + } + 'repos/list-pages-builds': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['page-build'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } /** - * Gets the README from a repository directory. + * 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. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * 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/get-readme-in-directory': { + 'repos/request-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - dir: string } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['page-build-status'] + } + } + } + } + 'repos/get-latest-pages-build': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['page-build'] } } - 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': { + 'repos/get-pages-build': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + build_id: number + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['page-build'] + } + } + } + } + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository-pre-receive-hook'][] + } + } + } + } + 'enterprise-admin/get-pre-receive-hook-for-repo': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository-pre-receive-hook'] + } + } + } + } + /** + * Deletes any overridden enforcement on this repository for the specified hook. + * + * Responds with effective values inherited from owner and/or global level. + */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-repo': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { - /** Response */ + /** Responds with effective values inherited from owner and/or global level. */ 200: { - headers: {} content: { - 'application/json': components['schemas']['release'][] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 404: components['responses']['not_found'] } } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-release': { + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false + * @description The state of enforcement for the hook on this repository. + * @enum {string} */ - generate_release_notes?: boolean + enforcement?: 'enabled' | 'disabled' | 'testing' } & { [key: string]: unknown } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + } + query: { + /** Indicates the state of the projects to return. */ + state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'][] } } - 302: components['responses']['found'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'repos/delete-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** Response */ - 204: never + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } } - /** Users with push access to the repository can edit a release asset. */ - 'repos/update-release-asset': { + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'] } } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The file name of the asset. */ - name?: string - /** @description An alternate short description of the asset. Used in place of the filename. */ - label?: string - /** @example "uploaded" */ - state?: string + /** @description The name of the project. */ + name: string + /** @description The description of the project. */ + body?: string } & { [key: string]: unknown } } } } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - 'repos/generate-release-notes': { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'pulls/list': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** Name and body of generated release notes */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-notes-content'] + 'application/json': components['schemas']['pull-request-simple'][] } } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The tag name for the release. This can be an existing tag or a new one. */ - tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - target_commitish?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - previous_tag_name?: string - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - configuration_file_path?: string - } & { [key: string]: unknown } - } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } /** - * View the latest published full release for the repository. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ - 'repos/get-latest-release': { + 'pulls/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number + } & { [key: string]: unknown } + } } } - /** Get a published release with the specified tag. */ - 'repos/get-release-by-tag': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** tag parameter */ - tag: string + } + query: { + sort?: 'created' | 'updated' | 'created_at' + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - 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': { + /** Provides details for a review comment. */ + 'pulls/get-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-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). */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request-review-comment'] } } 404: components['responses']['not_found'] } } - /** Users with push access to the repository can delete a release. */ - 'repos/delete-release': { + /** Deletes a review comment. */ + 'pulls/delete-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - /** Users with push access to the repository can edit a release. */ - 'repos/update-release': { + /** Enables you to edit a review comment. */ + 'pulls/update-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['pull-request-review-comment'] } } } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string + /** @description The text of the reply to the review comment. */ + body: string } & { [key: string]: unknown } } } } - 'repos/list-release-assets': { + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ + 'reactions/list-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36784,68 +36076,22 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - 'repos/upload-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - name: string - label?: string - } - } - responses: { - /** Response for successful upload */ - 201: { - content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['reaction'][] } } - /** Response if you upload an asset with the same filename as another uploaded asset */ - 422: unknown - } - requestBody: { - content: { - '*/*': string - } + 404: components['responses']['not_found'] } } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - 'reactions/create-for-release': { + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + 'reactions/create-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -36867,135 +36113,146 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the pull request review comment. * @enum {string} */ - content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ - 'secret-scanning/list-alerts-for-repo': { + 'reactions/delete-for-pull-request-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } 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'] + 204: never } } /** - * 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 'secret-scanning/get-alert': { + 'pulls/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + * 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. */ - 'secret-scanning/update-alert': { + 'pulls/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } - /** 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'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - state: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** @description The title of the pull request. */ + title?: string + /** @description The contents of the pull request. */ + body?: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean } & { [key: string]: unknown } } } } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-locations-for-alert': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components['parameters']['sort'] + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { @@ -37003,342 +36260,530 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['secret-scanning-location'][] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] } } /** - * Lists the people that have starred the repository. + * 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/enterprise-server@3.6/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. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'activity/list-stargazers-for-repo': { + 'pulls/create-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { + headers: { + Location?: string + } content: { - 'application/json': (components['schemas']['simple-user'][] | components['schemas']['stargazer'][]) & { [key: string]: unknown } + 'application/json': components['schemas']['pull-request-review-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string + /** @description The relative path to the file that necessitates a comment. */ + path: string + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: 'LEFT' | 'RIGHT' | 'side' + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number + } & { [key: string]: unknown } + } + } } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 'repos/get-code-frequency-stats': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-reply-for-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 200: { + /** Response */ + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-comment'] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + } & { [key: string]: unknown } + } } } - /** 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': { + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ + 'pulls/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-activity'][] + 'application/json': components['schemas']['commit'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] } } - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 'repos/get-contributors-stats': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + 'pulls/list-files': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 503: components['responses']['service_unavailable'] + } + } + 'pulls/check-if-merged': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 200: { - content: { - 'application/json': components['schemas']['contributor-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + /** Response if pull request has been merged */ + 204: never + /** Not Found if pull request has not been merged */ + 404: unknown } } - /** - * 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** The array order is oldest week (index 0) to most recent week. */ + /** if merge was successful */ 200: { content: { - 'application/json': components['schemas']['participation-stats'] + 'application/json': components['schemas']['pull-request-merge-result'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } & { [key: string]: unknown } + } + } + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } & { [key: string]: unknown } + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | ({ + /** @description Title for the automatic commit message. */ + commit_title?: string + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string + /** @description SHA that pull request head must match to allow merge. */ + sha?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: 'merge' | 'squash' | 'rebase' + } & { [key: string]: unknown }) + | null + } } } - /** - * 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': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + 'pulls/list-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-request'] } } - 204: components['responses']['no_content'] } } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - 'repos/create-commit-status': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/request-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - sha: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['status'] + 'application/json': components['schemas']['pull-request-simple'] } } + 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown } requestBody: { content: { 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string - /** @description A short description of the status. */ - description?: string - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[] + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[] } & { [key: string]: unknown } } } } - /** Lists the people watching the specified repository. */ - 'activity/list-watchers-for-repo': { + 'pulls/remove-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['pull-request-simple'] } } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[] + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[] + } & { [key: string]: unknown } + } } } - 'activity/get-repo-subscription': { + /** The list of reviews returns in chronological order. */ + 'pulls/list-reviews': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if you subscribe to the repository */ + /** The list of reviews returns in chronological order. */ 200: { + headers: {} content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'][] } } - 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - 404: unknown } } - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - 'activity/set-repo-subscription': { + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description Determines if notifications should be received from this repository. */ - subscribed?: boolean - /** @description Determines if all notifications should be blocked from this repository. */ - ignored?: boolean + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. 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/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: ({ + /** @description The relative path to the file that necessitates a review comment. */ + path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number + /** @description Text of the review comment. */ + body: string + /** @example 28 */ + line?: number + /** @example RIGHT */ + side?: string + /** @example 26 */ + start_line?: number + /** @example LEFT */ + start_side?: string + } & { [key: string]: unknown })[] } & { [key: string]: unknown } } } } - /** 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': { + 'pulls/get-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] } } - 'repos/list-tags': { + /** Update the review summary comment with new text. */ + 'pulls/update-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['tag'][] + 'application/json': components['schemas']['pull-request-review'] } } + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review. */ + body: string + } & { [key: string]: unknown } + } } } - /** - * 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': { + 'pulls/delete-pending-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - ref: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 302: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - 'repos/list-teams': { + /** List comments for a specific pull request review. */ + 'pulls/list-comments-for-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -37349,188 +36794,304 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['review-comment'][] } } + 404: components['responses']['not_found'] } } - 'repos/get-all-topics': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The message for the pull request review dismissal */ + message: string + /** + * @example "DISMISS" + * @enum {string} + */ + event?: 'DISMISS' + } & { [key: string]: unknown } + } } } - 'repos/replace-all-topics': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ + 'pulls/submit-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The body text of the pull request review */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' } & { [key: string]: unknown } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['clone-traffic'] + 'application/json': { + message?: string + url?: string + } & { [key: string]: unknown } } } 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | ({ + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@3.6/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]: unknown }) + | null + } } } - /** Get the top 10 popular contents over the last 14 days. */ - 'repos/get-top-paths': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Get the top 10 referrers over the last 14 days. */ - 'repos/get-top-referrers': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme-in-directory': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + dir: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['referrer-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['view-traffic'] + 'application/json': components['schemas']['release'][] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - 'repos/transfer': { + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-release': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 202: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['minimal-repository'] + 'application/json': components['schemas']['release'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: number[] + /** @description The name of the tag. */ + tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean } & { [key: string]: unknown } } } } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/check-vulnerability-alerts': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + 302: components['responses']['found'] + 404: components['responses']['not_found'] } } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/enable-vulnerability-alerts': { + 'repos/delete-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { @@ -37538,437 +37099,360 @@ export interface operations { 204: never } } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/disable-vulnerability-alerts': { + /** Users with push access to the repository can edit a release asset. */ + 'repos/update-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - 'repos/download-zipball-archive': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - ref: string + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } } } - responses: { - /** Response */ - 302: never + requestBody: { + content: { + 'application/json': { + /** @description The file name of the asset. */ + name?: string + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string + /** @example "uploaded" */ + state?: string + } & { [key: string]: unknown } + } } } - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-using-template': { + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + 'repos/generate-release-notes': { parameters: { path: { - template_owner: string - template_repo: string + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - owner?: string - /** @description The name of the new repository. */ - name: string - /** @description A short description of the new repository. */ - description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - include_all_branches?: boolean - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - private?: boolean + /** Name and body of generated release notes */ + 200: { + content: { + 'application/json': components['schemas']['release-notes-content'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string } & { [key: string]: unknown } } } } /** - * Lists all public repositories in the order that they were created. + * View the latest published full release for the repository. * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * 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/list-public': { + 'repos/get-latest-release': { parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components['parameters']['since-repo'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['release'] } } - 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': { + /** Get a published release with the specified tag. */ + 'repos/get-release-by-tag': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** tag parameter */ + tag: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['actions-secret'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ + 'repos/get-release': { parameters: { path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ 200: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Users with push access to the repository can delete a release. */ + 'repos/delete-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-secret'] - } - } + 204: never } } - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-environment-secret': { + /** Users with push access to the repository can edit a release. */ + 'repos/update-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['release'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string + /** @description The name of the tag. */ + tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean } & { [key: string]: unknown } } } } - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Default response */ - 204: never - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/list-provisioned-groups-enterprise': { + 'repos/list-release-assets': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - /** attributes to exclude */ - excludedAttributes?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-group-list-enterprise'] + 'application/json': components['schemas']['release-asset'][] } } } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#create-a-release) to upload a release asset. * - * 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. + * 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 Enterprise Server 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 Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ - 'enterprise-admin/provision-and-invite-enterprise-group': { + 'repos/upload-release-asset': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + query: { + name: string + label?: string } } responses: { - /** Response */ + /** Response for successful upload */ 201: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['release-asset'] } } + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown } requestBody: { content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: ({ - /** @description The SCIM user ID for a user. */ - value: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } + '*/*': string } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/get-provisioning-information-for-enterprise-group': { + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + 'reactions/list-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Attributes to exclude. */ - excludedAttributes?: string + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** - * **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': { + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + 'reactions/create-for-release': { parameters: { path: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** Reaction exists */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'] } } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: ({ - /** @description The SCIM user ID for a user. */ - value: string - } & { [key: string]: unknown })[] + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' } & { [key: string]: unknown } } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-scim-group-from-enterprise': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + 'reactions/delete-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -37976,627 +37460,629 @@ export interface operations { 204: never } } + /** Lists the status of each repository cache replica. */ + 'repos/list-cache-info': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Status information for cache replicas */ + 200: { + headers: {} + content: { + 'application/json': ({ + host: string + location: string + git: { + /** @enum {string} */ + sync_status: 'offline' | 'inactive' | 'in_sync' | 'not_in_sync' + /** Format: date-time */ + last_sync: string + } & { [key: string]: unknown } + } & { [key: string]: unknown })[] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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). + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/update-attribute-for-enterprise-group': { + 'secret-scanning/list-alerts-for-repo': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['secret-scanning-alert'][] } } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: ({ - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } - } + /** Repository is public or secret scanning is disabled for the repository */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/list-provisioned-identities-enterprise': { + 'secret-scanning/get-alert': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - } - query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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']['scim-user-list-enterprise'] + 'application/json': components['schemas']['secret-scanning-alert'] } } + 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ - 'enterprise-admin/provision-and-invite-enterprise-user': { + 'secret-scanning/update-alert': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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 */ - 201: { + 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + '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': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } & { [key: string]: unknown } - /** @description List of user emails. */ - emails: ({ - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - } & { [key: string]: unknown })[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: ({ - value?: string - } & { [key: string]: unknown })[] + state: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] } & { [key: string]: unknown } } } } - /** **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': { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-locations-for-alert': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['secret-scanning-location'][] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **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`. + * Lists the people that have starred the repository. * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ - 'enterprise-admin/set-information-for-provisioned-enterprise-user': { + 'activity/list-stargazers-for-repo': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': (components['schemas']['simple-user'][] | components['schemas']['stargazer'][]) & { [key: string]: unknown } } } + 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } & { [key: string]: unknown } - /** @description List of user emails. */ - emails: ({ - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - } & { [key: string]: unknown })[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: ({ - value?: string - } & { [key: string]: unknown })[] - } & { [key: string]: unknown } + } + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 'repos/get-code-frequency-stats': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + 'application/json': components['schemas']['code-frequency-stat'][] + } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-user-from-enterprise': { + /** 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: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['commit-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } /** - * **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`. + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * * `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 */ - 'enterprise-admin/update-attribute-for-enterprise-user': { + 'repos/get-contributors-stats': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['contributor-activity'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { [key: string]: unknown }[] - } & { [key: string]: unknown } + } + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + } } /** - * 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. + * Each array contains the day number, hour number, and number of commits: * - * 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. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * 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. + * 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. */ - 'scim/list-provisioned-identities': { + 'repos/get-punch-card-stats': { 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 + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** 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/scim+json': components['schemas']['scim-user-list'] + 'application/json': components['schemas']['code-frequency-stat'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 204: components['responses']['no_content'] } } - /** Provision organization membership for a user, and send an activation email to the email address. */ - 'scim/provision-and-invite-user': { + /** + * 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: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + sha: string } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['status'] } } - 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': { /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe + * @description The state of the status. + * @enum {string} */ - displayName?: string + state: 'error' | 'failure' | 'pending' | 'success' /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - name: { - givenName: string - familyName: string - formatted?: string - } & { [key: string]: unknown } + target_url?: string | null + /** @description A short description of the status. */ + description?: string | null /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default */ - emails: ({ - value: string - primary?: boolean - type?: string - } & { [key: string]: unknown })[] - schemas?: string[] - externalId?: string - groups?: string[] - active?: boolean + context?: string } & { [key: string]: unknown } } } } - 'scim/get-provisioning-information-for-user': { + /** Lists the people watching the specified repository. */ + 'activity/list-watchers-for-repo': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['simple-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': { + 'activity/get-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + 404: unknown + } + } + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ + 'activity/set-repo-subscription': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['repository-subscription'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - externalId?: string - groups?: string[] - active?: boolean - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string - familyName: string - formatted?: string - } & { [key: string]: unknown } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: ({ - type?: string - value: string - primary?: boolean - } & { [key: string]: unknown })[] + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean } & { [key: string]: unknown } } } } - 'scim/delete-user-from-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ + 'activity/delete-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + } + } + 'repos/list-tags': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] + } + } } } /** - * 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`. + * This returns the tag protection states of a repository. * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * This information is only available to repository administrators. */ - 'scim/update-attribute-for-user': { + 'repos/list-tag-protection': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['tag-protection'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + 'repos/create-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { /** Response */ - 429: { + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['tag-protection'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - Operations: ({ - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: ( - | ({ - active?: boolean | null - userName?: string | null - externalId?: string | null - givenName?: string | null - familyName?: string | null - } & { [key: string]: unknown }) - | ({ - value?: string - primary?: boolean - } & { [key: string]: unknown })[] - | string - ) & { [key: string]: unknown } - } & { [key: string]: unknown })[] + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string } & { [key: string]: unknown } } } } /** - * 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. + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. */ - 'search/code': { + 'repos/delete-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the tag protection. */ + tag_protection_id: components['parameters']['tag-protection-id'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + 'repos/list-teams': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'indexed' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38605,260 +38091,209 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['code-search-result-item'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['team'][] } } - 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': { + 'repos/get-all-topics': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'author-date' | 'committer-date' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['commit-search-result-item'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['topic'] } } - 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'repos/replace-all-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). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: - | 'comments' - | 'reactions' - | 'reactions-+1' - | 'reactions--1' - | 'reactions-smile' - | 'reactions-thinking_face' - | 'reactions-heart' - | 'reactions-tada' - | 'interactions' - | 'created' - | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[] + } & { [key: string]: unknown } + } + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + 'repos/transfer': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['issue-search-result-item'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['minimal-repository'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[] + } & { [key: string]: unknown } + } } } /** - * 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` + * 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. * - * The labels that best match the query appear first in the search results. + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ - 'search/labels': { + 'repos/download-zipball-archive': { parameters: { - query: { - /** The id of the repository. */ - repository_id: number - /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'created' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['label-search-result-item'][] - } & { [key: string]: unknown } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 302: never } } /** - * 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). + * 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. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * **OAuth scope requirements** * - * `q=tetris+language:assembly&sort=stars&order=desc` + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * 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. + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - 'search/repos': { + 'repos/create-using-template': { parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + template_owner: string + template_repo: string } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['repo-search-result-item'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['repository'] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string + /** @description The name of the new repository. */ + name: string + /** @description A short description of the new repository. */ + description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean + } & { [key: string]: unknown } + } } } /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` + * Lists all public repositories in the order that they were created. * - * 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. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ - 'search/topics': { + 'repos/list-public': { parameters: { query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components['parameters']['since-repo'] + /** Specifies the types of repositories to return. This endpoint will only list repositories available to all users on the enterprise. */ + visibility?: 'all' | 'public' } } responses: { /** Response */ 200: { + headers: { + Link?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['topic-search-result-item'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['minimal-repository'][] } } 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** 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: { + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'followers' | 'repositories' | 'joined' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38867,215 +38302,312 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - incomplete_results: boolean - items: components['schemas']['user-search-result-item'][] + secrets: components['schemas']['actions-secret'][] } & { [key: string]: unknown } } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + 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']['team-full'] + 'application/json': components['schemas']['actions-public-key'] } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } } } /** - * **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. + * 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. * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * #### Example encrypting a secret using Node.js * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/update-legacy': { + 'actions/create-or-update-environment-secret': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - /** Response */ + /** Response when creating a secret */ 201: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['empty-object'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ - name: string - /** @description The description of the team. */ - description?: string - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string } & { [key: string]: 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 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Default 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: { - /** 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'] + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + /** attributes to exclude */ + excludedAttributes?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion'][] + 'application/json': components['schemas']['scim-group-list-enterprise'] } } } } /** - * **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/). + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title: string - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: ({ + /** @description The SCIM user ID for a user. */ + value: string + } & { [key: string]: unknown })[] } & { [key: string]: 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 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': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + query: { + /** Attributes to exclude. */ + excludedAttributes?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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. */ - 'teams/delete-discussion-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: ({ + /** @description The SCIM user ID for a user. */ + value: string + } & { [key: string]: unknown })[] + } & { [key: string]: unknown } + } + } + } + /** **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: { @@ -39084,246 +38616,308 @@ export interface operations { } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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). */ - 'teams/update-discussion-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title?: string - /** @description The discussion post's body text. */ - body?: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: ({ + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: unknown + } & { [key: string]: unknown })[] } & { [key: string]: 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 discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * **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 Enterprise Server. 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 Enterprise Server account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. * - * 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/). + * 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ - 'teams/list-discussion-comments-legacy': { + 'enterprise-admin/list-provisioned-identities-enterprise': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } 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'] + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'][] + 'application/json': components['schemas']['scim-user-list-enterprise'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * Provision enterprise membership for a user, and send organization invitation emails to the email address. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-comment-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } & { [key: string]: unknown } + /** @description List of user emails. */ + emails: ({ + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + } & { [key: string]: unknown })[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: ({ + value?: string + } & { [key: string]: unknown })[] } & { [key: string]: 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 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': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * 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`. * - * 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/). + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. */ - 'teams/update-discussion-comment-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } & { [key: string]: unknown } + /** @description List of user emails. */ + emails: ({ + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + } & { [key: string]: unknown })[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: ({ + value?: string + } & { [key: string]: unknown })[] } & { [key: string]: 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 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': { + /** **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: { - 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } + 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 "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * **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`. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` */ - 'reactions/create-for-team-discussion-comment-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: unknown }[] } & { [key: string]: 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 reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * 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/). + * 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. */ - 'reactions/list-for-team-discussion-legacy': { + 'search/code': { 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) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39332,57 +38926,94 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['code-search-result-item'][] + } & { [key: string]: unknown } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * `q=repo:octocat/Spoon-Knife+css` */ - 'reactions/create-for-team-discussion-legacy': { + 'search/commits': { parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['commit-search-result-item'][] + } & { [key: string]: unknown } } } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } & { [key: string]: unknown } - } + 304: components['responses']['not_modified'] } } /** - * **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. + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * - * 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:** 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)." */ - 'teams/list-pending-invitations-legacy': { + 'search/issues-and-pull-requests': { parameters: { - path: { - team_id: components['parameters']['team-id'] - } query: { - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39391,32 +39022,43 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['issue-search-result-item'][] + } & { [key: string]: unknown } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Team members will include the members of child teams. + * 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/enterprise-server@3.6/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. */ - 'teams/list-members-legacy': { + 'search/labels': { 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) */ + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39425,312 +39067,455 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['label-search-result-item'][] + } & { [key: string]: unknown } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } /** - * The "Get team member" endpoint (described below) is deprecated. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * To list members in a team, the team must be visible to the authenticated user. + * 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. */ - 'teams/get-member-legacy': { + 'search/repos': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if user is a member */ - 204: never - /** if user is not a member */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['repo-search-result-item'][] + } & { [key: string]: unknown } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * The "Add team member" endpoint (described below) is deprecated. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * 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: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * `q=ruby+is:featured` * - * 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)." + * 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. */ - 'teams/add-member-legacy': { + 'search/topics': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + q: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - 422: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['topic-search-result-item'][] + } & { [key: string]: unknown } + } + } + 304: components['responses']['not_modified'] } } /** - * The "Remove team member" endpoint (described below) is deprecated. + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * For example, if you're looking for a list of popular users, you might try this query: * - * 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. + * `q=tom+repos:%3E42+followers:%3E1000` * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 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. */ - 'teams/remove-member-legacy': { + 'search/users': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - /** Not Found if team synchronization is setup */ - 404: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['user-search-result-item'][] + } & { [key: string]: unknown } + } + } + 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 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. + * This endpoint allows you to check the status of the most recent configuration process: * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Note that you may need to wait several seconds after you start a process before you can check its status. * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. + * The different statuses are: * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | */ - 'teams/get-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/get-configuration-status': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['configuration-status'] + } } } + } + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + 'enterprise-admin/start-configuration-process': { + responses: { + /** Response */ + 202: unknown + } + } + /** Check your installation's maintenance status: */ + 'enterprise-admin/get-maintenance-status': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['maintenance-status'] } } - 404: components['responses']['not_found'] + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/enable-or-disable-maintenance-mode': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['maintenance-status'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description A JSON string with the attributes `enabled` and `when`. + * + * The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + * + * The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + */ + maintenance: string + } & { [key: string]: 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 membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + 'enterprise-admin/get-settings': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-settings'] + } + } + } + } + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). * - * 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. + * **Notes:** * - * 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. + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." */ - 'teams/add-or-update-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/set-settings': { + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings: string + } & { [key: string]: unknown } + } + } + } + 'enterprise-admin/get-all-authorized-ssh-keys': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/add-authorized-ssh-key': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string + } & { [key: string]: unknown } } } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/remove-authorized-ssh-key': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['ssh-key'][] } } - /** Forbidden if team synchronization is set up */ - 403: unknown - 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string } & { [key: string]: 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 [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. * - * 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. + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/remove-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } + 'enterprise-admin/create-enterprise-server-license': { responses: { /** Response */ - 204: never - /** if team synchronization is set up */ - 403: unknown + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your _.ghl_ license file. */ + license: string + /** @description You **must** provide a password _only if_ you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. */ + password?: string + /** @description An optional JSON string containing the installation settings. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings?: string + } & { [key: string]: 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. + * This API upgrades your license and also triggers the configuration process. * - * Lists the organization projects for a team. + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/list-projects-legacy': { + 'enterprise-admin/upgrade-license': { + responses: { + /** Response */ + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your new _.ghl_ license file. */ + license?: string + } & { [key: string]: 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 [Get a team by name](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ + 'teams/get-legacy': { parameters: { path: { + /** The unique identifier of the team. */ 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'][] + '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 [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * 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/check-permissions-for-project-legacy': { + 'teams/delete-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown + 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 [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) 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. + * 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/add-or-update-project-permissions-legacy': { + 'teams/update-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { + 201: { content: { - 'application/json': { - message?: string - documentation_url?: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The name of the team. */ + name: string + /** @description The description of the team. */ + description?: string + /** + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. + * @enum {string} + */ + privacy?: 'secret' | 'closed' /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull * @enum {string} */ - permission?: 'read' | 'write' | 'admin' + permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null } & { [key: string]: 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 [Remove a project from a team](https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-discussions) 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. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - 'teams/list-repos-legacy': { + 'teams/list-discussions-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39741,442 +39526,355 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['team-discussion'][] } } - 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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. * - * **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. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'teams/check-permissions-for-repo-legacy': { + 'teams/create-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { - /** Alternative response with extra repository information */ - 200: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['team-repository'] + 'application/json': components['schemas']['team-discussion'] } } - /** Response if repository is managed by this team */ - 204: never - /** Not Found if repository is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-or-update-repo-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The discussion post's title. */ + title: string + /** @description The discussion post's body text. */ + body: string /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false */ - permission?: 'pull' | 'push' | 'admin' + private?: boolean } & { [key: string]: 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 [Remove a repository from a team](https://docs.github.com/rest/reference/teams#remove-a-repository-from-a-team) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) 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. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-repo-legacy': { + 'teams/get-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 204: never + 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 [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. * - * List IdP groups connected to a team on GitHub. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/list-idp-groups-for-legacy': { + 'teams/delete-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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 [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. * - * 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. + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/create-or-update-idp-group-connections-legacy': { + 'teams/update-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['team-discussion'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: ({ - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - /** @example "caceab43fc9ffa20081c" */ - id?: string - /** @example "external-team-6c13e7288ef7" */ - name?: string - /** @example "moar cheese pleese" */ - description?: string - } & { [key: string]: unknown })[] - /** @example "I am not a timestamp" */ - synced_at?: string + /** @description The discussion post's title. */ + title?: string + /** @description The discussion post's body text. */ + body?: string } & { [key: string]: 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 child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - 'teams/list-child-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 [List discussion comments](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussion-comments-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** if child teams exist */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['team-discussion-comment'][] } } - 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. + * **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'users/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': (components['schemas']['private-user'] | components['schemas']['public-user']) & { [key: string]: unknown } - } + 'teams/create-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } - 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: { + 201: { content: { - 'application/json': components['schemas']['private-user'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - name?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - email?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - blog?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - twitter_username?: string | null - /** - * @description The new company of the user. - * @example Acme corporation - */ - company?: string - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - location?: string - /** @description The new hiring availability of the user. */ - hireable?: boolean - /** @description The new short biography of the user. */ - bio?: string + /** @description The discussion comment's body text. */ + body: string } & { [key: string]: unknown } } } } - /** List the users you've blocked on your personal account. */ - 'users/list-blocked-by-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'users/check-blocked': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } 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: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team-discussion-comment'] } } } } - 'users/block': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'users/unblock': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } & { [key: string]: unknown } + } } } /** - * Lists the authenticated user's codespaces. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-for-authenticated-user': { + 'reactions/list-for-team-discussion-comment-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - repository_id?: components['parameters']['repository-id-in-query'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['reaction'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ - 'codespaces/create-for-authenticated-user': { + 'reactions/create-for-team-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } + } responses: { - /** Response when the codespace was successfully created */ + /** Response */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['reaction'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } requestBody: { content: { - 'application/json': ( - | ({ - /** @description Repository id for this codespace */ - repository_id: number - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } & { [key: string]: unknown }) - | ({ - /** @description Pull request number for this codespace */ - pull_request: { - /** @description Pull request number */ - pull_request_number: number - /** @description Repository id for this codespace */ - repository_id: number - } & { [key: string]: unknown } - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } & { [key: string]: unknown }) - ) & { [key: string]: unknown } + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } & { [key: string]: unknown } } } } /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-secrets-for-authenticated-user': { + 'reactions/list-for-team-discussion-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40187,491 +39885,545 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['codespaces-secret'][] - } & { [key: string]: unknown } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - 'codespaces/get-public-key-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-user-public-key'] + 'application/json': components['schemas']['reaction'][] } } } } /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ - 'codespaces/get-secret-for-authenticated-user': { + 'reactions/create-for-team-discussion-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['codespaces-secret'] + 'application/json': components['schemas']['reaction'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } & { [key: string]: unknown } + } + } } /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * Team members will include the members of child teams. + */ + 'teams/list-members-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** Filters members returned by their role in the team. */ + role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ + per_page?: 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. * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. * - * #### Example encrypting a secret using Ruby + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/get-member-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** if user is a member */ + 204: never + /** if user is not a member */ + 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * - * ```ruby - * require "rbnacl" - * require "base64" + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/create-or-update-secret-for-authenticated-user': { + 'teams/add-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response after successfully creaing a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ + /** Response */ 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: string[] - } & { [key: string]: unknown } - } + 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown } } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - 'codespaces/delete-secret-for-authenticated-user': { + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + /** Not Found if team synchronization is setup */ + 404: unknown } } /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ - 'codespaces/list-repositories-for-secret-for-authenticated-user': { + 'teams/get-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['team-membership'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. */ - 'codespaces/set-repositories-for-secret-for-authenticated-user': { + 'teams/add-or-update-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repositories were added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: number[] + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' } & { [key: string]: unknown } } } } /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/add-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ - 'codespaces/remove-repository-for-secret-for-authenticated-user': { + 'teams/remove-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repository was removed from the selected list */ + /** Response */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** if team synchronization is set up */ + 403: unknown } } /** - * Gets information about a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Lists the organization projects for a team. */ - 'codespaces/get-for-authenticated-user': { + 'teams/list-projects-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['team-project'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Deletes a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. */ - 'codespaces/delete-for-authenticated-user': { + 'teams/check-permissions-for-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 202: components['responses']['accepted'] - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown } } /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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. */ - 'codespaces/update-for-authenticated-user': { + 'teams/add-or-update-project-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': { + message?: string + documentation_url?: string + } & { [key: string]: unknown } } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A valid machine to transition this codespace to. */ - machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - recent_folders?: string[] + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' } & { [key: string]: unknown } } } } /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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. */ - 'codespaces/export-for-authenticated-user': { + 'teams/remove-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 202: { - content: { - 'application/json': components['schemas']['codespace-export-details'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/get-export-details-for-authenticated-user': { + /** **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/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ + 'teams/list-repos-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - export_id: components['parameters']['export-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['minimal-repository'][] } } 404: components['responses']['not_found'] } } /** - * List the machine types a codespace can transition to use. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ - 'codespaces/codespace-machines-for-authenticated-user': { + 'teams/check-permissions-for-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** Alternative response with extra repository information */ 200: { content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } & { [key: string]: unknown } + 'application/json': components['schemas']['team-repository'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] + /** Response if repository is managed by this team */ + 204: never + /** Not Found if repository is not managed by this team */ + 404: unknown + } + } + /** + * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'teams/add-or-update-repo-permissions-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + } & { [key: string]: unknown } + } } } /** - * Starts a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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. */ - 'codespaces/start-for-authenticated-user': { + 'teams/remove-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } + 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 child teams`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ + 'teams/list-child-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - /** Payment required */ - 402: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team'][] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] } } /** - * Stops a user's codespace. + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. */ - 'codespaces/stop-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } + 'users/get-authenticated': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': (components['schemas']['private-user'] | components['schemas']['public-user']) & { [key: string]: unknown } } } + 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** Sets the visibility for your primary email addresses. */ - 'users/set-primary-email-visibility-for-authenticated-user': { + /** **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']['email'][] + 'application/json': components['schemas']['private-user'] } } 304: components['responses']['not_modified'] @@ -40684,10 +40436,39 @@ export interface operations { content: { 'application/json': { /** - * @description Denotes whether an email is publicly visible. - * @enum {string} + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj */ - visibility: 'public' | 'private' + twitter_username?: string | null + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string + /** @description The new hiring availability of the user. */ + hireable?: boolean + /** @description The new short biography of the user. */ + bio?: string } & { [key: string]: unknown } } } @@ -40696,7 +40477,7 @@ export interface operations { 'users/list-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40777,7 +40558,7 @@ export interface operations { 'users/list-followers-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40800,7 +40581,7 @@ export interface operations { 'users/list-followed-by-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40822,6 +40603,7 @@ export interface operations { 'users/check-person-is-followed-by-authenticated': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40840,13 +40622,14 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40863,6 +40646,7 @@ export interface operations { 'users/unfollow': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40875,11 +40659,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-gpg-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40899,7 +40683,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-gpg-key-for-authenticated-user': { parameters: {} responses: { @@ -40918,17 +40702,19 @@ export interface operations { requestBody: { content: { 'application/json': { + /** @description A descriptive name for the new key. */ + name?: string /** @description A GPG key in ASCII-armored format. */ armored_public_key: string } & { [key: string]: unknown } } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40945,11 +40731,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40966,7 +40752,7 @@ export interface operations { /** * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -40975,7 +40761,7 @@ export interface operations { 'apps/list-installations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40995,7 +40781,6 @@ export interface operations { 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] } } /** @@ -41003,18 +40788,18 @@ export interface operations { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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 */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41040,13 +40825,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/add-repo-to-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -41061,13 +40847,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/remove-repo-from-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -41079,74 +40866,30 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - 'interactions/get-restrictions-for-authenticated-user': { - responses: { - /** Default response */ - 200: { - content: { - 'application/json': (components['schemas']['interaction-limit-response'] | { [key: string]: unknown }) & { [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - 'interactions/set-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - 'interactions/remove-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 204: never - } - } /** * List issues across owned and member repositories assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-authenticated-user': { parameters: { query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41164,11 +40907,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-public-ssh-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41188,7 +40931,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-public-ssh-key-for-authenticated-user': { parameters: {} responses: { @@ -41218,11 +40961,11 @@ export interface operations { } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41239,11 +40982,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41256,57 +40999,12 @@ export interface operations { 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. */ + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ state?: 'active' | 'pending' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41329,6 +41027,7 @@ export interface operations { 'orgs/get-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41346,6 +41045,7 @@ export interface operations { 'orgs/update-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41376,7 +41076,7 @@ export interface operations { 'migrations/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41418,6 +41118,16 @@ export interface operations { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean /** * @description Do not include attachments in the migration * @example true @@ -41433,6 +41143,12 @@ export interface operations { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean /** * @description Exclude attributes from the API response to improve performance * @example [ @@ -41445,39 +41161,6 @@ export interface operations { } } } - /** - * 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: * @@ -41504,7 +41187,7 @@ export interface operations { 'migrations/get-archive-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } } @@ -41516,51 +41199,15 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - 'migrations/delete-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - 'migrations/unlock-repo-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists all the repositories for this user migration. */ 'migrations/list-repos-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41587,7 +41234,7 @@ export interface operations { 'orgs/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41606,221 +41253,7 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-authenticated-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/create-for-authenticated-user': { parameters: {} responses: { @@ -41833,7 +41266,6 @@ export interface operations { 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: { @@ -41853,11 +41285,11 @@ export interface operations { } } } - /** 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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ 'users/list-public-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41885,7 +41317,7 @@ export interface operations { 'repos/list-for-authenticated-user': { parameters: { query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + /** Limit results to repositories with the specified visibility. */ visibility?: 'all' | 'public' | 'private' /** * Comma-separated list of values. Can include: @@ -41894,17 +41326,13 @@ export interface operations { * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ + /** Limit results to repositories of the specified type. 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`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41932,7 +41360,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -42038,6 +41466,40 @@ export interface operations { * @example false */ delete_branch_on_merge?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether downloads are enabled. * @default true @@ -42058,7 +41520,7 @@ export interface operations { 'repos/list-invitations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42081,7 +41543,7 @@ export interface operations { 'repos/decline-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -42097,7 +41559,7 @@ export interface operations { 'repos/accept-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -42113,16 +41575,16 @@ export interface operations { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ '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). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42145,7 +41607,9 @@ export interface operations { 'activity/check-repo-is-starred-by-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42163,11 +41627,13 @@ export interface operations { } } } - /** 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'activity/star-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42183,7 +41649,9 @@ export interface operations { 'activity/unstar-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42200,7 +41668,7 @@ export interface operations { 'activity/list-watched-repos-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42219,11 +41687,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ 'teams/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42243,16 +41711,16 @@ export interface operations { } } /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -42272,15 +41740,16 @@ export interface operations { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ 'users/get-by-username': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42298,10 +41767,11 @@ export interface operations { 'activity/list-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42320,11 +41790,13 @@ export interface operations { 'activity/list-org-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42342,10 +41814,11 @@ export interface operations { 'activity/list-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42364,10 +41837,11 @@ export interface operations { 'users/list-followers-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42387,10 +41861,11 @@ export interface operations { 'users/list-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42409,6 +41884,7 @@ export interface operations { 'users/check-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] target_user: string } @@ -42424,12 +41900,13 @@ export interface operations { 'gists/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42450,10 +41927,11 @@ export interface operations { 'users/list-gpg-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42482,6 +41960,7 @@ export interface operations { 'users/get-context-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { @@ -42505,11 +41984,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-user-installation': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42526,10 +42006,11 @@ export interface operations { 'users/list-public-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42548,15 +42029,16 @@ export interface operations { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ 'orgs/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42572,240 +42054,16 @@ export interface operations { } } } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } 'projects/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42826,10 +42084,11 @@ export interface operations { 'activity/list-received-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42847,10 +42106,11 @@ export interface operations { 'activity/list-received-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42869,16 +42129,17 @@ export interface operations { 'repos/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Can be one of `all`, `owner`, `member`. */ + /** Limit results to repositories of the specified type. */ type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42894,88 +42155,49 @@ export interface operations { } } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-actions-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-packages-billing-user': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'enterprise-admin/promote-user-to-be-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } + 204: never } } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-shared-storage-billing-user': { + /** You can demote any user account except your own. */ + 'enterprise-admin/demote-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } + 204: never } } /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 'activity/list-repos-starred-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42995,10 +42217,11 @@ export interface operations { 'activity/list-repos-watched-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -43014,6 +42237,58 @@ export interface operations { } } } + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'enterprise-admin/suspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': + | ({ + /** @description The reason the user is being suspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } & { [key: string]: unknown }) + | null + } + } + } + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + 'enterprise-admin/unsuspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': + | ({ + /** @description The reason the user is being unsuspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } & { [key: string]: unknown }) + | null + } + } + } /** Get a random sentence from the Zen of GitHub */ 'meta/get-zen': { responses: { diff --git a/test/v3/expected/github.exported-type.ts b/test/v3/expected/github.exported-type.ts index 9186ed11c..0cf298bbd 100644 --- a/test/v3/expected/github.exported-type.ts +++ b/test/v3/expected/github.exported-type.ts @@ -8,29 +8,146 @@ export type paths = { /** Get Hypermedia links to resources accessible in GitHub's REST API */ get: operations['meta/root'] } + '/admin/hooks': { + get: operations['enterprise-admin/list-global-webhooks'] + post: operations['enterprise-admin/create-global-webhook'] + } + '/admin/hooks/{hook_id}': { + get: operations['enterprise-admin/get-global-webhook'] + delete: operations['enterprise-admin/delete-global-webhook'] + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + patch: operations['enterprise-admin/update-global-webhook'] + } + '/admin/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + post: operations['enterprise-admin/ping-global-webhook'] + } + '/admin/keys': { + get: operations['enterprise-admin/list-public-keys'] + } + '/admin/keys/{key_ids}': { + delete: operations['enterprise-admin/delete-public-key'] + } + '/admin/ldap/teams/{team_id}/mapping': { + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + patch: operations['enterprise-admin/update-ldap-mapping-for-team'] + } + '/admin/ldap/teams/{team_id}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-team'] + } + '/admin/ldap/users/{username}/mapping': { + patch: operations['enterprise-admin/update-ldap-mapping-for-user'] + } + '/admin/ldap/users/{username}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-user'] + } + '/admin/organizations': { + post: operations['enterprise-admin/create-org'] + } + '/admin/organizations/{org}': { + patch: operations['enterprise-admin/update-org-name'] + } + '/admin/pre-receive-environments': { + get: operations['enterprise-admin/list-pre-receive-environments'] + post: operations['enterprise-admin/create-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}': { + get: operations['enterprise-admin/get-pre-receive-environment'] + /** + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ + */ + delete: operations['enterprise-admin/delete-pre-receive-environment'] + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + patch: operations['enterprise-admin/update-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + post: operations['enterprise-admin/start-pre-receive-environment-download'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + get: operations['enterprise-admin/get-download-status-for-pre-receive-environment'] + } + '/admin/pre-receive-hooks': { + get: operations['enterprise-admin/list-pre-receive-hooks'] + post: operations['enterprise-admin/create-pre-receive-hook'] + } + '/admin/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook'] + delete: operations['enterprise-admin/delete-pre-receive-hook'] + patch: operations['enterprise-admin/update-pre-receive-hook'] + } + '/admin/tokens': { + /** Lists personal access tokens for all users, including admin users. */ + get: operations['enterprise-admin/list-personal-access-tokens'] + } + '/admin/tokens/{token_id}': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + delete: operations['enterprise-admin/delete-personal-access-token'] + } + '/admin/users': { + /** + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. + * + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. + */ + post: operations['enterprise-admin/create-user'] + } + '/admin/users/{username}': { + /** + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. + * + * You can delete any user account except your own. + */ + delete: operations['enterprise-admin/delete-user'] + patch: operations['enterprise-admin/update-username-for-user'] + } + '/admin/users/{username}/authorizations': { + post: operations['enterprise-admin/create-impersonation-o-auth-token'] + delete: operations['enterprise-admin/delete-impersonation-o-auth-token'] + } '/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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`. */ + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] } @@ -38,7 +155,7 @@ export type paths = { /** * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/list-webhook-deliveries'] } @@ -46,7 +163,7 @@ export type paths = { /** * Returns a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-webhook-delivery'] } @@ -54,13 +171,13 @@ export type paths = { /** * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ post: operations['apps/redeliver-webhook-delivery'] } '/app/installations': { /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. */ @@ -70,13 +187,13 @@ export type paths = { /** * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ delete: operations['apps/delete-installation'] } @@ -84,37 +201,37 @@ export type paths = { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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 Enterprise Server 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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"]`. + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). */ @@ -122,44 +239,44 @@ export type paths = { } '/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. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). */ delete: operations['apps/delete-authorization'] } '/applications/{client_id}/token': { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + /** 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/enterprise-server@3.6/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. */ + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ patch: operations['apps/reset-token'] } '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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'] } '/apps/{app_slug}': { /** * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ @@ -167,39 +284,39 @@ export type paths = { } '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * You can only send one of these scope keys at a time. */ @@ -212,9 +329,75 @@ export type paths = { get: operations['codes-of-conduct/get-conduct-code'] } '/emojis': { - /** Lists all the emojis available to use on GitHub. */ + /** Lists all the emojis available to use on GitHub Enterprise Server. */ get: operations['emojis/get'] } + '/enterprise/announcement': { + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + get: operations['enterprise-admin/get-announcement'] + /** Removes the global announcement banner in your enterprise. */ + delete: operations['enterprise-admin/remove-announcement'] + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + patch: operations['enterprise-admin/set-announcement'] + } + '/enterprise/settings/license': { + get: operations['enterprise-admin/get-license-information'] + } + '/enterprise/stats/all': { + get: operations['enterprise-admin/get-all-stats'] + } + '/enterprise/stats/comments': { + get: operations['enterprise-admin/get-comment-stats'] + } + '/enterprise/stats/gists': { + get: operations['enterprise-admin/get-gist-stats'] + } + '/enterprise/stats/hooks': { + get: operations['enterprise-admin/get-hooks-stats'] + } + '/enterprise/stats/issues': { + get: operations['enterprise-admin/get-issue-stats'] + } + '/enterprise/stats/milestones': { + get: operations['enterprise-admin/get-milestone-stats'] + } + '/enterprise/stats/orgs': { + get: operations['enterprise-admin/get-org-stats'] + } + '/enterprise/stats/pages': { + get: operations['enterprise-admin/get-pages-stats'] + } + '/enterprise/stats/pulls': { + get: operations['enterprise-admin/get-pull-request-stats'] + } + '/enterprise/stats/repos': { + get: operations['enterprise-admin/get-repo-stats'] + } + '/enterprise/stats/users': { + get: operations['enterprise-admin/get-user-stats'] + } + '/enterprises/{enterprise}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-enterprise'] + } + '/enterprises/{enterprise}/actions/cache/usage-policy': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy-for-enterprise'] + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + patch: operations['actions/set-actions-cache-usage-policy-for-enterprise'] + } '/enterprises/{enterprise}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. @@ -271,6 +454,25 @@ export type paths = { */ put: operations['enterprise-admin/set-allowed-actions-enterprise'] } + '/enterprises/{enterprise}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-enterprise'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-enterprise'] + } '/enterprises/{enterprise}/actions/runner-groups': { /** * Lists all self-hosted runner groups for an enterprise. @@ -472,46 +674,19 @@ export type paths = { '/enterprises/{enterprise}/secret-scanning/alerts': { /** * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ get: operations['secret-scanning/list-alerts-for-enterprise'] } - '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-actions-billing-ghe'] - } '/enterprises/{enterprise}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - get: operations['billing/get-github-advanced-security-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-packages-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * The authenticated user must be an enterprise admin. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['billing/get-shared-storage-billing-ghe'] + get: operations['billing/get-github-advanced-security-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. */ @@ -519,17 +694,17 @@ export type paths = { } '/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: + * GitHub Enterprise Server 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) + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server. * - * **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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ get: operations['activity/get-feeds'] } @@ -547,7 +722,7 @@ export type paths = { /** * 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. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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'] } @@ -558,7 +733,7 @@ export type paths = { '/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. */ + /** Allows you to update a gist's description and to update, delete, or 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': { @@ -575,12 +750,11 @@ export type paths = { } '/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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ put: operations['gists/star'] delete: operations['gists/unstar'] } @@ -588,13 +762,13 @@ export type paths = { 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). */ + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/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. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ get: operations['gitignore/get-template'] } @@ -602,7 +776,7 @@ export type paths = { /** * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ get: operations['apps/list-repos-accessible-to-installation'] } @@ -610,9 +784,9 @@ export type paths = { /** * 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. + * 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/enterprise-server@3.6/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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ delete: operations['apps/revoke-installation-access-token'] } @@ -626,7 +800,7 @@ export type paths = { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list'] } @@ -643,60 +817,7 @@ export type paths = { /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ post: operations['markdown/render-raw'] } - '/marketplace_listing/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account'] - } - '/marketplace_listing/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans'] - } - '/marketplace_listing/plans/{plan_id}/accounts': { - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan'] - } - '/marketplace_listing/stubbed/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - '/marketplace_listing/stubbed/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans-stubbed'] - } - '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan-stubbed'] - } '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ get: operations['meta/get'] } '/networks/{owner}/{repo}/events': { @@ -705,16 +826,18 @@ export type paths = { '/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`. */ + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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}': { + /** Gets information about a notification thread. */ get: operations['activity/get-thread'] + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ 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). + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/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. */ @@ -724,10 +847,10 @@ export type paths = { * * 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. + * 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/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ delete: operations['activity/delete-thread-subscription'] } '/octocat': { @@ -736,9 +859,9 @@ export type paths = { } '/organizations': { /** - * Lists all organizations, in the order that they were created on GitHub. + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * **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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ get: operations['orgs/list'] } @@ -747,32 +870,43 @@ export type paths = { * List the custom repository roles available in this organization. In order to see custom * repository roles in an organization, the authenticated user must be an organization owner. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - get: operations['orgs/list-custom-roles'] - } - '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + get: operations['orgs/list-custom-roles'] } '/orgs/{org}': { /** * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server 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). + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-org'] + } + '/orgs/{org}/actions/cache/usage-by-repository': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-by-repo-for-org'] + } '/orgs/{org}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. @@ -838,14 +972,16 @@ export type paths = { '/orgs/{org}/actions/permissions/workflow': { /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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-default-workflow-permissions-organization'] /** * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ @@ -853,10 +989,7 @@ export type paths = { } '/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'] @@ -871,26 +1004,17 @@ export type paths = { } '/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'] @@ -905,70 +1029,43 @@ export type paths = { */ 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. + * 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. + * 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'] @@ -1171,58 +1268,37 @@ export type paths = { '/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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': { /** - * 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)." + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ get: operations['orgs/get-audit-log'] } - '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - get: operations['orgs/list-blocked-users'] - } - '/orgs/{org}/blocks/{username}': { - get: operations['orgs/check-blocked-user'] - put: operations['orgs/block-user'] - delete: operations['orgs/unblock-user'] - } '/orgs/{org}/code-scanning/alerts': { /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * * GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/list-alerts-for-org'] } - '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations['orgs/list-saml-sso-authorizations'] - } - '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations['orgs/remove-saml-sso-authorization'] - } '/orgs/{org}/dependabot/secrets': { /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-org-secrets'] @@ -1318,13 +1394,13 @@ export type paths = { '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/set-selected-repos-for-org-secret'] } '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ delete: operations['dependabot/remove-selected-repo-from-org-secret'] } '/orgs/{org}/events': { @@ -1334,22 +1410,18 @@ export type paths = { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/external-idp-group-info-for-org'] } '/orgs/{org}/external-groups': { /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/list-external-idp-groups-for-org'] } - '/orgs/{org}/failed_invitations': { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations['orgs/list-failed-invitations'] - } '/orgs/{org}/hooks': { get: operations['orgs/list-webhooks'] /** Here's how you can create a hook that posts payloads in JSON format: */ @@ -1389,14 +1461,14 @@ export type paths = { post: operations['orgs/redeliver-webhook-delivery'] } '/orgs/{org}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-org-installation'] } @@ -1404,36 +1476,6 @@ export type paths = { /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ get: operations['orgs/list-app-installations'] } - '/orgs/{org}/interaction-limits': { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-org'] - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations['interactions/set-restrictions-for-org'] - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations['interactions/remove-restrictions-for-org'] - } - '/orgs/{org}/invitations': { - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['orgs/create-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}': { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations['orgs/cancel-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}/teams': { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations['orgs/list-invitation-teams'] - } '/orgs/{org}/issues': { /** * List issues in an organization assigned to the authenticated user. @@ -1441,7 +1483,7 @@ export type paths = { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-org'] } @@ -1461,7 +1503,7 @@ export type paths = { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -1496,114 +1538,31 @@ export type paths = { */ get: operations['migrations/get-status-for-org'] } - '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations['migrations/delete-archive-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations['migrations/unlock-repo-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - get: operations['migrations/list-repos-for-org'] - } '/orgs/{org}/outside_collaborators': { /** List all users who are outside collaborators of an organization. */ get: operations['orgs/list-outside-collaborators'] } '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ put: operations['orgs/convert-member-to-outside-collaborator'] /** Removing a user from this list will remove them from all the organization's repositories. */ delete: operations['orgs/remove-outside-collaborator'] } - '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-organization'] - } - '/orgs/{org}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-org'] } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-org'] + /** Removes any overrides for this hook at the org level for this org. */ + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-org'] + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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': { @@ -1615,7 +1574,7 @@ export type paths = { /** * 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)." + * 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/enterprise-server@3.6/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'] @@ -1628,7 +1587,7 @@ export type paths = { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -1639,56 +1598,23 @@ export type paths = { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ get: operations['secret-scanning/list-alerts-for-org'] } - '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-actions-billing-org'] - } '/orgs/{org}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - get: operations['billing/get-github-advanced-security-billing-org'] - } - '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-packages-billing-org'] - } - '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-shared-storage-billing-org'] - } - '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. * - * 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 total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['teams/list-idp-groups-for-org'] + get: operations['billing/get-github-advanced-security-billing-org'] } '/orgs/{org}/teams': { /** Lists all teams in an organization that are visible to the authenticated user. */ @@ -1702,7 +1628,7 @@ export type paths = { } '/orgs/{org}/teams/{team_slug}': { /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ @@ -1724,15 +1650,15 @@ export type paths = { } '/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -1740,19 +1666,19 @@ export type paths = { } '/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/). + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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}`. */ @@ -1760,15 +1686,15 @@ export type paths = { } '/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -1776,19 +1702,19 @@ export type paths = { } '/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/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ @@ -1796,13 +1722,13 @@ export type paths = { } '/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ get: operations['reactions/list-for-team-discussion-comment-in-org'] /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -1812,19 +1738,19 @@ export type paths = { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ get: operations['reactions/list-for-team-discussion-in-org'] /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -1834,32 +1760,30 @@ export type paths = { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['reactions/delete-for-team-discussion'] } '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ delete: operations['teams/unlink-external-idp-group-from-team-for-org'] /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ patch: operations['teams/link-external-idp-group-to-team-for-org'] } - '/orgs/{org}/teams/{team_slug}/invitations': { - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations['teams/list-pending-invitations-in-org'] - } '/orgs/{org}/teams/{team_slug}/members': { /** * Team members will include the members of child teams. @@ -1879,7 +1803,7 @@ export type paths = { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ get: operations['teams/get-membership-for-user-in-org'] /** @@ -1887,7 +1811,7 @@ export type paths = { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -1901,7 +1825,7 @@ export type paths = { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -1947,7 +1871,7 @@ export type paths = { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -1955,7 +1879,7 @@ export type paths = { */ 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)." + * 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/enterprise-server@3.6/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}`. * @@ -1969,24 +1893,6 @@ export type paths = { */ delete: operations['teams/remove-repo-in-org'] } - '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } '/orgs/{org}/teams/{team_slug}/teams': { /** * Lists the child teams of the team specified by `{team_slug}`. @@ -2049,14 +1955,6 @@ export type paths = { */ get: operations['rate-limit/get'] } - '/reactions/{reaction_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations['reactions/delete-legacy'] - } '/repos/{owner}/{repo}': { /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ get: operations['repos/get'] @@ -2067,7 +1965,7 @@ export type paths = { * 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ patch: operations['repos/update'] } '/repos/{owner}/{repo}/actions/artifacts': { @@ -2089,6 +1987,28 @@ export type paths = { */ get: operations['actions/download-artifact'] } + '/repos/{owner}/{repo}/actions/cache/usage': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage'] + } + '/repos/{owner}/{repo}/actions/cache/usage-policy': { + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy'] + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + patch: operations['actions/set-actions-cache-usage-policy'] + } '/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'] @@ -2102,12 +2022,15 @@ export type paths = { */ get: operations['actions/download-job-logs-for-workflow-run'] } + '/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun': { + /** Re-run a job and its dependent jobs in 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. */ + post: operations['actions/re-run-job-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. + * 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'] /** @@ -2119,6 +2042,24 @@ export type paths = { */ put: operations['actions/set-github-actions-permissions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/access': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations['actions/get-workflow-access-to-repository'] + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations['actions/set-workflow-access-to-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)." @@ -2137,6 +2078,24 @@ export type paths = { */ put: operations['actions/set-allowed-actions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-repository'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-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'] @@ -2242,7 +2201,7 @@ export type paths = { } '/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). + * 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/enterprise-server@3.6/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. */ @@ -2262,14 +2221,6 @@ export type paths = { /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/get-reviews-for-run'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - post: operations['actions/approve-workflow-run'] - } '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/list-workflow-run-artifacts'] @@ -2284,7 +2235,7 @@ export type paths = { get: operations['actions/get-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { @@ -2301,7 +2252,7 @@ export type paths = { 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { @@ -2325,7 +2276,7 @@ export type paths = { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ post: operations['actions/review-pending-deployments-for-run'] } @@ -2333,13 +2284,9 @@ export type paths = { /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ post: operations['actions/re-run-workflow'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-run-usage'] + '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations['actions/re-run-workflow-failed-jobs'] } '/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. */ @@ -2469,20 +2416,12 @@ export type paths = { } '/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). + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). * * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. */ get: operations['actions/list-workflow-runs'] } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-usage'] - } '/repos/{owner}/{repo}/assignees': { /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ get: operations['issues/list-assignees'] @@ -2521,12 +2460,6 @@ export type paths = { */ delete: operations['repos/delete-autolink'] } - '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - delete: operations['repos/disable-automated-security-fixes'] - } '/repos/{owner}/{repo}/branches': { get: operations['repos/list-branches'] } @@ -2757,7 +2690,7 @@ export type paths = { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -2803,7 +2736,7 @@ export type paths = { } '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ @@ -2813,12 +2746,12 @@ export type paths = { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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}': { @@ -2839,7 +2772,7 @@ export type paths = { } '/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. + * 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/enterprise-server@3.6/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. */ @@ -2847,16 +2780,16 @@ export type paths = { } '/repos/{owner}/{repo}/code-scanning/alerts': { /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ get: operations['code-scanning/list-alerts-for-repo'] } @@ -2949,8 +2882,7 @@ export type paths = { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -3021,33 +2953,20 @@ export type paths = { /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/get-sarif'] } - '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-in-repository-for-authenticated-user'] + '/repos/{owner}/{repo}/codeowners/errors': { /** - * Creates a codespace owned by the authenticated user in the specified repository. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/repo-machines-for-authenticated-user'] + get: operations['repos/codeowners-errors'] } '/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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. * @@ -3069,17 +2988,23 @@ export type paths = { */ get: operations['repos/check-collaborator'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} * ``` * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). * - * 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). + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. * * **Rate limits** * @@ -3094,7 +3019,7 @@ export type paths = { } '/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/). + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). * * Comments are ordered by ascending ID. */ @@ -3106,16 +3031,16 @@ export type paths = { 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). */ + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ post: operations['reactions/create-for-commit-comment'] } '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + * Delete a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ delete: operations['reactions/delete-for-commit-comment'] } @@ -3166,12 +3091,12 @@ export type paths = { /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['repos/create-commit-comment'] } '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ get: operations['repos/list-pull-requests-associated-with-commit'] } '/repos/{owner}/{repo}/commits/{ref}': { @@ -3180,9 +3105,9 @@ export type paths = { * * **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. + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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. + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/enterprise-server@3.6/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** * @@ -3252,28 +3177,11 @@ export type paths = { */ get: operations['repos/list-commit-statuses-for-ref'] } - '/repos/{owner}/{repo}/community/profile': { - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations['repos/get-community-profile-metrics'] - } '/repos/{owner}/{repo}/compare/{basehead}': { /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * The response 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/enterprise-server@3.6/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. * @@ -3319,16 +3227,21 @@ export type paths = { * 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 + * Files and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/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 + * type](https://docs.github.com/enterprise-server@3.6/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). + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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. + * API](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -3350,7 +3263,11 @@ export type paths = { * 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. */ + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ put: operations['repos/create-or-update-file-contents'] /** * Deletes a file in a repository. @@ -3360,6 +3277,8 @@ export type paths = { * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ delete: operations['repos/delete-file'] } @@ -3463,13 +3382,17 @@ export type paths = { /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ delete: operations['dependabot/delete-repo-secret'] } + '/repos/{owner}/{repo}/dependency-graph/compare/{basehead}': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations['dependency-graph/diff-range'] + } '/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 + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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 @@ -3481,7 +3404,7 @@ export type paths = { * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will * return a failure response. * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. @@ -3525,7 +3448,7 @@ export type paths = { * * 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)." + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ delete: operations['repos/delete-deployment'] } @@ -3545,7 +3468,7 @@ export type paths = { } '/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)." + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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. * @@ -3560,28 +3483,68 @@ export type paths = { } '/repos/{owner}/{repo}/environments': { /** - * Get all environments for a repository. + * Lists the 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. */ + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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 name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." * * **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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository 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}/environments/{environment_name}/deployment-branch-policies': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies'] + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations['repos/create-deployment-branch-policy'] + } + '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}': { + /** + * Gets a deployment branch policy for an environment. + * + * 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-deployment-branch-policy'] + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations['repos/update-deployment-branch-policy'] + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations['repos/delete-deployment-branch-policy'] + } '/repos/{owner}/{repo}/events': { get: operations['activity/list-repo-events'] } @@ -3590,7 +3553,7 @@ export type paths = { /** * Create a fork for the authenticated user. * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ post: operations['repos/create-fork'] } @@ -3616,7 +3579,7 @@ export type paths = { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3651,7 +3614,7 @@ export type paths = { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3681,7 +3644,7 @@ export type paths = { * * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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`. */ @@ -3691,7 +3654,7 @@ export type paths = { /** * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". */ get: operations['git/get-ref'] } @@ -3705,7 +3668,7 @@ export type paths = { } '/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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. * * **Signature verification object** * @@ -3775,7 +3738,9 @@ export type paths = { /** * 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)." + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. */ post: operations['git/create-tree'] } @@ -3784,10 +3749,14 @@ export type paths = { * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ get: operations['git/get-tree'] } '/repos/{owner}/{repo}/hooks': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ get: operations['repos/list-webhooks'] /** * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can @@ -3829,7 +3798,7 @@ export type paths = { post: operations['repos/redeliver-webhook-delivery'] } '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ post: operations['repos/ping-webhook'] } '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { @@ -3840,90 +3809,14 @@ export type paths = { */ post: operations['repos/test-push-webhook'] } - '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - delete: operations['migrations/cancel-import'] - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - patch: operations['migrations/update-import'] - } - '/repos/{owner}/{repo}/import/authors': { - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations['migrations/get-commit-authors'] - } - '/repos/{owner}/{repo}/import/authors/{author_id}': { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations['migrations/map-commit-author'] - } - '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - get: operations['migrations/get-large-files'] - } - '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - patch: operations['migrations/set-lfs-preference'] - } '/repos/{owner}/{repo}/installation': { /** * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] @@ -3939,13 +3832,13 @@ export type paths = { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-repo'] /** * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create'] } @@ -3959,16 +3852,16 @@ export type paths = { 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). */ + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ post: operations['reactions/create-for-issue-comment'] } '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * Delete a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ delete: operations['reactions/delete-for-issue-comment'] } @@ -3980,17 +3873,17 @@ export type paths = { } '/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 + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/get'] /** Issue owners and users with push access can edit an issue. */ @@ -4005,7 +3898,7 @@ export type paths = { '/repos/{owner}/{repo}/issues/{issue_number}/comments': { /** Issue Comments are ordered by ascending ID. */ get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create-comment'] } '/repos/{owner}/{repo}/issues/{issue_number}/events': { @@ -4026,23 +3919,23 @@ export type paths = { /** * 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)." + * 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/enterprise-server@3.6/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). */ + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ post: operations['reactions/create-for-issue'] } '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ delete: operations['reactions/delete-for-issue'] } @@ -4080,7 +3973,7 @@ export type paths = { /** * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ get: operations['licenses/get-for-repo'] } @@ -4104,17 +3997,18 @@ export type paths = { get: operations['issues/list-labels-for-milestone'] } '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ + /** Lists all notifications for the current user in the specified repository. */ 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`. */ + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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). */ + /** Updates information for a GitHub Enterprise Server 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)." */ + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ post: operations['repos/create-pages-site'] + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ delete: operations['repos/delete-pages-site'] } '/repos/{owner}/{repo}/pages/builds': { @@ -4132,20 +4026,25 @@ export type paths = { '/repos/{owner}/{repo}/pages/builds/{build_id}': { get: operations['repos/get-pages-build'] } - '/repos/{owner}/{repo}/pages/health': { + '/repos/{owner}/{repo}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-repo'] + } + '/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-repo'] /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * Deletes any overridden enforcement on this repository for the specified hook. * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + * Responds with effective values inherited from owner and/or global level. */ - get: operations['repos/get-pages-health-check'] + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-repo'] + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-repo'] } '/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. */ + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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': { @@ -4156,9 +4055,7 @@ export type paths = { * * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ post: operations['pulls/create'] } @@ -4175,16 +4072,16 @@ export type paths = { 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). */ + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ post: operations['reactions/create-for-pull-request-review-comment'] } '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ delete: operations['reactions/delete-for-pull-request-comment'] } @@ -4194,9 +4091,9 @@ export type paths = { * * 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)". + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Server 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: * @@ -4204,7 +4101,7 @@ export type paths = { * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ get: operations['pulls/get'] /** @@ -4214,25 +4111,17 @@ export type paths = { */ patch: operations['pulls/update'] } - '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-pr-for-authenticated-user'] - } '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ get: operations['pulls/list-review-comments'] /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * 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/enterprise-server@3.6/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. + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-review-comment'] } @@ -4240,12 +4129,12 @@ export type paths = { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-reply-for-review-comment'] } '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ get: operations['pulls/list-commits'] } '/repos/{owner}/{repo}/pulls/{pull_number}/files': { @@ -4254,12 +4143,13 @@ export type paths = { } '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ put: operations['pulls/merge'] } '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/request-reviewers'] delete: operations['pulls/remove-requested-reviewers'] } @@ -4267,11 +4157,11 @@ export type paths = { /** The list of reviews returns in chronological order. */ get: operations['pulls/list-reviews'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." * - * **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. + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. */ @@ -4288,10 +4178,11 @@ export type paths = { 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. */ + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ post: operations['pulls/submit-review'] } '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { @@ -4302,7 +4193,7 @@ export type paths = { /** * 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. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme'] } @@ -4310,13 +4201,13 @@ export type paths = { /** * Gets the README from a repository directory. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme-in-directory'] } '/repos/{owner}/{repo}/releases': { /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * 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/enterprise-server@3.6/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. */ @@ -4324,19 +4215,19 @@ export type paths = { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-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. */ + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ get: operations['repos/get-release-asset'] delete: operations['repos/delete-release-asset'] /** Users with push access to the repository can edit a release asset. */ patch: operations['repos/update-release-asset'] } '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ post: operations['repos/generate-release-notes'] } '/repos/{owner}/{repo}/releases/latest': { @@ -4352,7 +4243,7 @@ export type paths = { 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). */ + /** **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/enterprise-server@3.6/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'] @@ -4362,8 +4253,8 @@ export type paths = { '/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. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * @@ -4371,25 +4262,41 @@ export type paths = { * * `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, + * GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, * you'll still need to pass your authentication to be able to upload an asset. * * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. * * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ post: operations['repos/upload-release-asset'] } '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + get: operations['reactions/list-for-release'] + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ post: operations['reactions/create-for-release'] } + '/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + delete: operations['reactions/delete-for-release'] + } + '/repos/{owner}/{repo}/replicas/caches': { + /** Lists the status of each repository cache replica. */ + get: operations['repos/list-cache-info'] + } '/repos/{owner}/{repo}/secret-scanning/alerts': { /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4397,13 +4304,17 @@ export type paths = { } '/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. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` 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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -4411,7 +4322,9 @@ export type paths = { } '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4421,7 +4334,7 @@ export type paths = { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-stargazers-for-repo'] } @@ -4478,14 +4391,34 @@ export type paths = { } '/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. */ + /** 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/enterprise-server@3.6/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). */ + /** 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/enterprise-server@3.6/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}/tags/protection': { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations['repos/list-tag-protection'] + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations['repos/create-tag-protection'] + } + '/repos/{owner}/{repo}/tags/protection/{tag_protection_id}': { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations['repos/delete-tag-protection'] + } '/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 @@ -4502,50 +4435,27 @@ export type paths = { get: operations['repos/get-all-topics'] put: operations['repos/replace-all-topics'] } - '/repos/{owner}/{repo}/traffic/clones': { - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-clones'] - } - '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations['repos/get-top-paths'] - } - '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - get: operations['repos/get-top-referrers'] - } - '/repos/{owner}/{repo}/traffic/views': { - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-views'] - } '/repos/{owner}/{repo}/transfer': { /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ post: operations['repos/transfer'] } - '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - delete: operations['repos/disable-vulnerability-alerts'] - } '/repos/{owner}/{repo}/zipball/{ref}': { /** * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ 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`. + * 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. If the repository is not public, 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/enterprise-server@3.6/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: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -4558,7 +4468,7 @@ export type paths = { * * Note: * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ get: operations['repos/list-public'] } @@ -4688,20 +4598,20 @@ export type paths = { * * 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 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 Enterprise Server. 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: + * 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 Enterprise Server 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 is granted access by the IdP and is not a member of the GitHub Enterprise Server 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. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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. + * 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ get: operations['enterprise-admin/list-provisioned-identities-enterprise'] /** @@ -4750,65 +4660,11 @@ export type paths = { */ 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). + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4829,10 +4685,10 @@ export type paths = { } '/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). + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * metadata](https://docs.github.com/enterprise-server@3.6/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: * @@ -4842,10 +4698,10 @@ export type paths = { } '/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). + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. * @@ -4859,9 +4715,9 @@ export type paths = { } '/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). + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4873,9 +4729,9 @@ export type paths = { } '/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). + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4887,9 +4743,9 @@ export type paths = { } '/search/topics': { /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * 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/enterprise-server@3.6/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: * @@ -4901,9 +4757,9 @@ export type paths = { } '/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). + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * * For example, if you're looking for a list of popular users, you might try this query: * @@ -4913,11 +4769,85 @@ export type paths = { */ get: operations['search/users'] } + '/setup/api/configcheck': { + /** + * This endpoint allows you to check the status of the most recent configuration process: + * + * Note that you may need to wait several seconds after you start a process before you can check its status. + * + * The different statuses are: + * + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | + */ + get: operations['enterprise-admin/get-configuration-status'] + } + '/setup/api/configure': { + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + post: operations['enterprise-admin/start-configuration-process'] + } + '/setup/api/maintenance': { + /** Check your installation's maintenance status: */ + get: operations['enterprise-admin/get-maintenance-status'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/enable-or-disable-maintenance-mode'] + } + '/setup/api/settings': { + /** + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). + * + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + get: operations['enterprise-admin/get-settings'] + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + * + * **Notes:** + * + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + */ + put: operations['enterprise-admin/set-settings'] + } + '/setup/api/settings/authorized-keys': { + get: operations['enterprise-admin/get-all-authorized-ssh-keys'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/add-authorized-ssh-key'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + delete: operations['enterprise-admin/remove-authorized-ssh-key'] + } + '/setup/api/start': { + /** + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. + * + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. + * + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: + * + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/create-enterprise-server-license'] + } + '/setup/api/upgrade': { + /** + * This API upgrades your license and also triggers the configuration process. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/upgrade-license'] + } '/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * * To delete a team, the authenticated user must be an organization owner or team maintainer. * @@ -4925,7 +4855,7 @@ export type paths = { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) endpoint. * * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * @@ -4935,115 +4865,107 @@ export type paths = { } '/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. + * **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/enterprise-server@3.6/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-legacy'] } '/teams/{team_id}/discussions/{discussion_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * **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/enterprise-server@3.6/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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * **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/enterprise-server@3.6/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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ post: operations['reactions/create-for-team-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/reactions': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ post: operations['reactions/create-for-team-discussion-legacy'] } - '/teams/{team_id}/invitations': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - get: operations['teams/list-pending-invitations-legacy'] - } '/teams/{team_id}/members': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * * Team members will include the members of child teams. */ @@ -5053,7 +4975,7 @@ export type paths = { /** * 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. + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5061,33 +4983,33 @@ export type paths = { /** * 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. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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. + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-member-legacy'] } '/teams/{team_id}/memberships/{username}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. * * Team members will include the members of child teams. * @@ -5096,17 +5018,17 @@ export type paths = { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. * @@ -5114,19 +5036,19 @@ export type paths = { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-membership-for-user-legacy'] } '/teams/{team_id}/projects': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * * Lists the organization projects for a team. */ @@ -5134,72 +5056,54 @@ export type paths = { } '/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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: + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. */ delete: operations['teams/remove-repo-legacy'] } - '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } '/teams/{team_id}/teams': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ get: operations['teams/list-child-legacy'] } '/user': { @@ -5212,218 +5116,6 @@ export type paths = { /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ patch: operations['users/update-authenticated'] } - '/user/blocks': { - /** List the users you've blocked on your personal account. */ - get: operations['users/list-blocked-by-authenticated-user'] - } - '/user/blocks/{username}': { - get: operations['users/check-blocked'] - put: operations['users/block'] - delete: operations['users/unblock'] - } - '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-for-authenticated-user'] - } - '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-secrets-for-authenticated-user'] - } - '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - get: operations['codespaces/get-public-key-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - patch: operations['codespaces/update-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/export-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-export-details-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/start-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/stop-for-authenticated-user'] - } - '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } '/user/emails': { /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-emails-for-authenticated-user'] @@ -5443,7 +5135,7 @@ export type paths = { '/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)." + * 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/enterprise-server@3.6/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. */ @@ -5452,22 +5144,22 @@ export type paths = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-gpg-key-for-authenticated-user'] } '/user/gpg_keys/{gpg_key_id}': { - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-gpg-key-for-authenticated-user'] } '/user/installations': { /** * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -5481,7 +5173,7 @@ export type paths = { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5491,24 +5183,16 @@ export type paths = { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ put: operations['apps/add-repo-to-installation-for-authenticated-user'] /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] } - '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - get: operations['interactions/get-restrictions-for-authenticated-user'] - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } '/user/issues': { /** * List issues across owned and member repositories assigned to the authenticated user. @@ -5516,30 +5200,22 @@ export type paths = { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-public-ssh-key-for-authenticated-user'] } '/user/keys/{key_id}': { - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-public-ssh-key-for-authenticated-user'] } - '/user/marketplace_purchases': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user'] - } - '/user/marketplace_purchases/stubbed': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } '/user/memberships/orgs': { get: operations['orgs/list-memberships-for-authenticated-user'] } @@ -5553,19 +5229,6 @@ export type paths = { /** 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: @@ -5591,12 +5254,6 @@ export type paths = { * 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. */ @@ -5612,85 +5269,12 @@ export type paths = { */ get: operations['orgs/list-for-authenticated-user'] } - '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}': { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-version-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-version-for-authenticated-user'] - } '/user/projects': { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. 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-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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-public-emails-for-authenticated-user'] } '/user/repos': { @@ -5705,7 +5289,7 @@ export type paths = { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -5724,13 +5308,13 @@ export type paths = { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 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)." */ + /** 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/enterprise-server@3.6/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'] } @@ -5739,14 +5323,14 @@ export type paths = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/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. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ get: operations['users/list'] } @@ -5754,11 +5338,11 @@ export type paths = { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ get: operations['users/get-by-username'] } @@ -5809,7 +5393,7 @@ export type paths = { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-user-installation'] } @@ -5821,90 +5405,10 @@ export type paths = { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ get: operations['orgs/list-for-user'] } - '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-user'] - } '/users/{username}/projects': { get: operations['projects/list-for-user'] } @@ -5919,41 +5423,17 @@ export type paths = { /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ get: operations['repos/list-for-user'] } - '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-actions-billing-user'] - } - '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-packages-billing-user'] - } - '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-shared-storage-billing-user'] + '/users/{username}/site_admin': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['enterprise-admin/promote-user-to-be-site-administrator'] + /** You can demote any user account except your own. */ + delete: operations['enterprise-admin/demote-site-administrator'] } '/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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-repos-starred-by-user'] } @@ -5961,6 +5441,18 @@ export type paths = { /** Lists repositories a user is watching. */ get: operations['activity/list-repos-watched-by-user'] } + '/users/{username}/suspended': { + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['enterprise-admin/suspend-user'] + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + delete: operations['enterprise-admin/unsuspend-user'] + } '/zen': { /** Get a random sentence from the Zen of GitHub */ get: operations['meta/get-zen'] @@ -5969,13 +5461,142 @@ export type paths = { export type components = { schemas: { + root: { + /** Format: uri-template */ + current_user_url: string + /** Format: uri-template */ + current_user_authorizations_html_url: string + /** Format: uri-template */ + authorizations_url: string + /** Format: uri-template */ + code_search_url: string + /** Format: uri-template */ + commit_search_url: string + /** Format: uri-template */ + emails_url: string + /** Format: uri-template */ + emojis_url: string + /** Format: uri-template */ + events_url: string + /** Format: uri-template */ + feeds_url: string + /** Format: uri-template */ + followers_url: string + /** Format: uri-template */ + following_url: string + /** Format: uri-template */ + gists_url: string + /** Format: uri-template */ + hub_url: string + /** Format: uri-template */ + issue_search_url: string + /** Format: uri-template */ + issues_url: string + /** Format: uri-template */ + keys_url: string + /** Format: uri-template */ + label_search_url: string + /** Format: uri-template */ + notifications_url: string + /** Format: uri-template */ + organization_url: string + /** Format: uri-template */ + organization_repositories_url: string + /** Format: uri-template */ + organization_teams_url: string + /** Format: uri-template */ + public_gists_url: string + /** Format: uri-template */ + rate_limit_url: string + /** Format: uri-template */ + repository_url: string + /** Format: uri-template */ + repository_search_url: string + /** Format: uri-template */ + current_user_repositories_url: string + /** Format: uri-template */ + starred_url: string + /** Format: uri-template */ + starred_gists_url: string + /** Format: uri-template */ + topic_search_url?: string + /** Format: uri-template */ + user_url: string + /** Format: uri-template */ + user_organizations_url: string + /** Format: uri-template */ + user_repositories_url: string + /** Format: uri-template */ + user_search_url: string + } + 'global-hook': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + secret?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'global-hook-2': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'public-key-full': { + id: number + key: string + user_id: number | null + repository_id: number | null + url: string + title: string + read_only: boolean + verified: boolean + /** Format: date-time */ + created_at: string + } & { + last_used: unknown + } + 'ldap-mapping-team': { + ldap_dn?: string + 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?: unknown | null + } /** - * Simple User - * @description Simple User + * Ldap Private User + * @description Ldap Private User */ - 'nullable-simple-user': { - name?: string | null - email?: string | null + 'ldap-mapping-user': { + ldap_dn?: string /** @example octocat */ login: string /** @example 1 */ @@ -6035,304 +5656,384 @@ export type components = { /** @example User */ type: string site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - } | null + /** @example monalisa octocat */ + name: string | null + /** @example GitHub */ + company: string | null + /** @example https://github.com/blog */ + blog: string | null + /** @example San Francisco */ + location: string | null + /** + * Format: email + * @example octocat@github.com + */ + email: string | null + hireable: boolean | null + /** @example There once was... */ + bio: string | null + /** @example monalisa */ + twitter_username?: string | null + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string + /** @example 81 */ + private_gists: number + /** @example 100 */ + total_private_repos: number + /** @example 100 */ + owned_private_repos: number + /** @example 10000 */ + disk_usage: number + /** @example 8 */ + collaborators: number + /** @example true */ + two_factor_authentication: boolean + plan?: { + collaborators: number + name: string + space: number + private_repos: number + } + /** Format: date-time */ + suspended_at?: string | null + business_plus?: boolean + } /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + * Organization Simple + * @description Organization Simple */ - integration: { + 'organization-simple': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** - * @description Unique identifier of the GitHub app - * @example 37 + * Format: uri + * @example https://api.github.com/orgs/github */ - id: number + url: string /** - * @description The slug name of the GitHub app - * @example probot-owners + * Format: uri + * @example https://api.github.com/orgs/github/repos */ - slug?: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] + repos_url: string /** - * @description The name of the GitHub app - * @example Probot Owners + * Format: uri + * @example https://api.github.com/orgs/github/events */ - name: string - /** @example The description of the app. */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ description: string | null + } + 'pre-receive-environment': { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + 'pre-receive-environment-download-status': { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + 'pre-receive-hook': { + id?: number + name?: string + enforcement?: string + script?: string + script_repository?: { + id?: number + full_name?: string + url?: string + html_url?: string + } + environment?: { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + allow_downstream_configuration?: boolean + } + /** + * Simple User + * @description Simple User + */ + 'nullable-simple-user': { + name?: string | null + email?: string | null + /** @example octocat */ + login: string + /** @example 1 */ + id: number + /** @example MDQ6VXNlcjE= */ + node_id: string /** * Format: uri - * @example https://example.com + * @example https://github.com/images/error/octocat_happy.gif */ - external_url: string + avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null /** * Format: uri - * @example https://github.com/apps/super-ci + * @example https://api.github.com/users/octocat + */ + url: string + /** + * Format: uri + * @example https://github.com/octocat */ html_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/followers */ - created_at: string + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions */ - updated_at: string + subscriptions_url: string /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } + * Format: uri + * @example https://api.github.com/users/octocat/orgs */ - permissions: { - issues?: string - checks?: string - metadata?: string - contents?: string - deployments?: string - } & { [key: string]: string } + organizations_url: string /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] + * Format: uri + * @example https://api.github.com/users/octocat/repos */ - events: string[] + repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string /** - * @description The number of installations associated with the GitHub app - * @example 5 + * Format: uri + * @example https://api.github.com/users/octocat/received_events */ - installations_count?: number - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - } - /** - * Basic Error - * @description Basic Error - */ - 'basic-error': { - message?: string - documentation_url?: string - url?: string - status?: string - } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - 'validation-error-simple': { - message: string - documentation_url: string - errors?: string[] - } - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - 'webhook-config-url': string - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - 'webhook-config-content-type': string - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - 'webhook-config-secret': string - 'webhook-config-insecure-ssl': string | number - /** - * Webhook Configuration - * @description 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'] - } + received_events_url: string + /** @example User */ + type: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + } | null /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } */ - 'hook-delivery-item': { + 'app-permissions': { /** - * @description Unique identifier of the webhook delivery. - * @example 42 + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} */ - id: number + actions?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} */ - guid: string + administration?: 'read' | 'write' /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token for checks on code. + * @enum {string} */ - delivered_at: string + checks?: 'read' | 'write' /** - * @description Whether the webhook delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} */ - redelivery: boolean + contents?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} */ - duration: number + deployments?: 'read' | 'write' /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} */ - status: string + environments?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} */ - status_code: number + issues?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} */ - event: string + metadata?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} */ - action: string | null + packages?: 'read' | 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} */ - installation_id: number | null + pages?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} */ - repository_id: number | null - } - /** - * Scim Error - * @description Scim Error - */ - 'scim-error': { - message?: string | null - documentation_url?: string | null - detail?: string | null - status?: number - scimType?: string | null - schemas?: string[] - } - /** - * Validation Error - * @description 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) - }[] - } - /** - * Webhook delivery - * @description Delivery made by a webhook. - */ - 'hook-delivery': { + pull_requests?: 'read' | 'write' /** - * @description Unique identifier of the delivery. - * @example 42 + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} */ - id: number + repository_hooks?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} */ - guid: string + repository_projects?: 'read' | 'write' | 'admin' /** - * Format: date-time - * @description Time when the delivery was delivered. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} */ - delivered_at: string + secret_scanning_alerts?: 'read' | 'write' /** - * @description Whether the delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} */ - redelivery: boolean + secrets?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} */ - duration: number + security_events?: 'read' | 'write' /** - * @description Description of the status of the attempted delivery - * @example failed to connect + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} */ - status: string + single_file?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} */ - status_code: number + statuses?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} */ - event: string + vulnerability_alerts?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} */ - action: string | null + workflows?: 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} */ - installation_id: number | null + members?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} */ - repository_id: number | null + organization_administration?: 'read' | 'write' /** - * @description The URL target of the delivery. - * @example https://www.example.com + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} */ - url?: string - request: { - /** @description The request headers sent with the webhook delivery. */ - headers: { [key: string]: unknown } | null - /** @description The webhook payload. */ - payload: { [key: string]: unknown } | null - } - response: { - /** @description The response headers received when the delivery was made. */ - headers: { [key: string]: unknown } | null - /** @description The response payload received. */ - payload: string | null - } + organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: 'read' | 'write' } /** * Simple User @@ -6403,217 +6104,409 @@ export type components = { /** @example "2020-07-09T00:17:55Z" */ starred_at?: string } - /** - * Enterprise - * @description An enterprise account - */ - enterprise: { - /** @description A short description of the enterprise. */ - description?: string | null + /** Scoped Installation */ + 'nullable-scoped-installation': { + permissions: components['schemas']['app-permissions'] /** - * Format: uri - * @example https://github.com/enterprises/octo-business + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} */ - html_url: string + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** @example true */ + has_multiple_single_files?: boolean + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] /** * Format: uri - * @description The enterprise's website URL. + * @example https://api.github.com/users/octocat/repos */ - website_url?: string | null + repositories_url: string + account: components['schemas']['simple-user'] + } | null + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number + /** Format: uri */ + url: string + /** @description 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 + /** Format: uri */ + url: string + } + note: string | null + /** Format: uri */ + note_url: string | null + /** Format: date-time */ + updated_at: string + /** Format: date-time */ + created_at: string + fingerprint: string | null + user?: components['schemas']['nullable-simple-user'] + installation?: components['schemas']['nullable-scoped-installation'] + /** Format: date-time */ + expires_at: string | null + } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { /** - * @description Unique identifier of the enterprise - * @example 42 + * @description Unique identifier of the GitHub app + * @example 37 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** @example MDExOkludGVncmF0aW9uMQ== */ node_id: string + owner: components['schemas']['nullable-simple-user'] /** - * @description The name of the enterprise. - * @example Octo Business + * @description The name of the GitHub app + * @example Probot Owners */ name: string + /** @example The description of the app. */ + description: string | null /** - * @description The slug url identifier for the enterprise. - * @example octo-business + * Format: uri + * @example https://example.com */ - slug: string + external_url: string /** - * Format: date-time - * @example 2019-01-26T19:01:12Z + * Format: uri + * @example https://github.com/apps/super-ci */ - created_at: string | null + html_url: string /** * Format: date-time - * @example 2019-01-26T19:14:43Z + * @example 2017-07-08T16:18:44-04:00 */ - updated_at: string | null - /** Format: uri */ - avatar_url: string - } - /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } - */ - 'app-permissions': { + created_at: string /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 */ - actions?: 'read' | 'write' + updated_at: string /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } */ - administration?: 'read' | 'write' + permissions: { + issues?: string + checks?: string + metadata?: string + contents?: string + deployments?: string + } & { [key: string]: string } /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] */ - checks?: 'read' | 'write' + events: string[] /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description The number of installations associated with the GitHub app + * @example 5 */ - contents?: 'read' | 'write' + installations_count?: number + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + } + /** + * Basic Error + * @description Basic Error + */ + 'basic-error': { + message?: string + documentation_url?: string + url?: string + status?: string + } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + 'validation-error-simple': { + message: string + documentation_url: string + errors?: string[] + } + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + 'webhook-config-url': string + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + 'webhook-config-content-type': string + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + 'webhook-config-secret': string + 'webhook-config-insecure-ssl': string | number + /** + * Webhook Configuration + * @description 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'] + } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + 'hook-delivery-item': { /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the webhook delivery. + * @example 42 */ - deployments?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - environments?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z */ - issues?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the webhook delivery is a redelivery. + * @example false */ - metadata?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - packages?: 'read' | 'write' + duration: number /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} + * @description Describes the response returned after attempting the delivery. + * @example failed to connect */ - pages?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - pull_requests?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - repository_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - repository_projects?: 'read' | 'write' | 'admin' + action: string | null /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - secret_scanning_alerts?: 'read' | 'write' + installation_id: number | null /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - secrets?: 'read' | 'write' + repository_id: number | null + } + /** + * Scim Error + * @description Scim Error + */ + 'scim-error': { + message?: string | null + documentation_url?: string | null + detail?: string | null + status?: number + scimType?: string | null + schemas?: string[] + } + /** + * Validation Error + * @description 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) + }[] + } + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + 'hook-delivery': { /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the delivery. + * @example 42 */ - security_events?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - single_file?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z */ - statuses?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the delivery is a redelivery. + * @example false */ - vulnerability_alerts?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - workflows?: 'write' + duration: number /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} + * @description Description of the status of the attempted delivery + * @example failed to connect */ - members?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - organization_administration?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - organization_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - organization_plan?: 'read' + action: string | null /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - organization_projects?: 'read' | 'write' | 'admin' + installation_id: number | null /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - organization_packages?: 'read' | 'write' + repository_id: number | null /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The URL target of the delivery. + * @example https://www.example.com */ - organization_secrets?: 'read' | 'write' + url?: string + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null + } + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null + /** @description The response payload received. */ + payload: string | null + } + } + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://github.com/enterprises/octo-business */ - organization_self_hosted_runners?: 'read' | 'write' + html_url: string /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @description The enterprise's website URL. */ - organization_user_blocking?: 'read' | 'write' + website_url?: string | null /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the enterprise + * @example 42 */ - team_discussions?: 'read' | 'write' - } - /** - * Installation + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null + /** Format: uri */ + avatar_url: string + } + /** + * Installation * @description Installation */ installation: { @@ -6882,7 +6775,10 @@ export type components = { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -7061,6 +6957,41 @@ export type components = { allow_auto_merge?: boolean delete_branch_on_merge?: boolean allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' allow_merge_commit?: boolean subscribers_count?: number network_count?: number @@ -7084,6 +7015,52 @@ export type components = { * @example false */ delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether to allow merge commits for pull requests. * @default true @@ -7092,6 +7069,11 @@ export type components = { allow_merge_commit?: boolean /** @description Whether to allow forking this repo */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -7099,6 +7081,8 @@ export type components = { master_branch?: string /** @example "2020-07-09T00:17:42Z" */ starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean } /** * Installation Token @@ -7159,64 +7143,6 @@ export type components = { scopes: string[] user?: components['schemas']['nullable-simple-user'] } - /** Scoped Installation */ - 'nullable-scoped-installation': { - permissions: components['schemas']['app-permissions'] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** @example true */ - has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repositories_url: string - account: components['schemas']['simple-user'] - } | null - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - authorization: { - id: number - /** Format: uri */ - url: string - /** @description 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 - /** Format: uri */ - url: string - } - note: string | null - /** Format: uri */ - note_url: string | null - /** Format: date-time */ - updated_at: string - /** Format: date-time */ - created_at: string - fingerprint: string | null - user?: components['schemas']['nullable-simple-user'] - installation?: components['schemas']['nullable-scoped-installation'] - /** Format: date-time */ - expires_at: string | null - } /** * Code Of Conduct * @description Code Of Conduct @@ -7286,12 +7212,137 @@ export type components = { html_url: string | null } /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @description The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + * @example Very **important** announcement about _nothing_. + */ + 'announcement-message': string + /** + * Format: date-time + * @description The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + * @example "2021-01-01T00:00:00.000-07:00" + */ + 'announcement-expiration': string | null + /** + * Enterprise Announcement + * @description Enterprise global announcement + */ + announcement: { + announcement: components['schemas']['announcement-message'] + expires_at?: components['schemas']['announcement-expiration'] + } + 'license-info': { + seats?: string | number + seats_used?: number + seats_available?: string | number + kind?: string + days_until_expiration?: number + expire_at?: string + } + /** Repository Enterprise Stats */ + 'enterprise-repository-overview': { + total_repos: number + root_repos: number + fork_repos: number + org_repos: number + total_pushes: number + total_wikis: number + } + /** Hooks Enterprise Stats */ + 'enterprise-hook-overview': { + total_hooks: number + active_hooks: number + inactive_hooks: number + } + /** Enterprise Pages Stats */ + 'enterprise-page-overview': { + total_pages: number + } + /** Enterprise Organization Stats */ + 'enterprise-organization-overview': { + total_orgs: number + disabled_orgs: number + total_teams: number + total_team_members: number + } + /** Enterprise User Stats */ + 'enterprise-user-overview': { + total_users: number + admin_users: number + suspended_users: number + } + /** Enterprise Pull Request Stats */ + 'enterprise-pull-request-overview': { + total_pulls: number + merged_pulls: number + mergeable_pulls: number + unmergeable_pulls: number + } + /** Enterprise Issue Stats */ + 'enterprise-issue-overview': { + total_issues: number + open_issues: number + closed_issues: number + } + /** Enterprise Milestone Stats */ + 'enterprise-milestone-overview': { + total_milestones: number + open_milestones: number + closed_milestones: number + } + /** Enterprise Gist Stats */ + 'enterprise-gist-overview': { + total_gists: number + private_gists: number + public_gists: number + } + /** Enterprise Comment Stats */ + 'enterprise-comment-overview': { + total_commit_comments: number + total_gist_comments: number + total_issue_comments: number + total_pull_request_comments: number + } + 'enterprise-overview': { + repos?: components['schemas']['enterprise-repository-overview'] + hooks?: components['schemas']['enterprise-hook-overview'] + pages?: components['schemas']['enterprise-page-overview'] + orgs?: components['schemas']['enterprise-organization-overview'] + users?: components['schemas']['enterprise-user-overview'] + pulls?: components['schemas']['enterprise-pull-request-overview'] + issues?: components['schemas']['enterprise-issue-overview'] + milestones?: components['schemas']['enterprise-milestone-overview'] + gists?: components['schemas']['enterprise-gist-overview'] + comments?: components['schemas']['enterprise-comment-overview'] + } + 'actions-cache-usage-org-enterprise': { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number + } + /** + * Actions cache usage policy for an enterprise + * @description GitHub Actions cache usage policy for an enterprise. + */ + 'actions-cache-usage-policy-enterprise': { + /** + * @description For repositories in an enterprise, the default size limit for the sum of all caches in a repository, in gigabytes. + * @example 10 + */ + repo_cache_size_limit_in_gb?: number + /** + * @description For repositories in an enterprise, the maximum value that can be set as the limit for the sum of all caches in a repository, in gigabytes. + * @example 15 + */ + max_repo_cache_size_limit_in_gb?: number + } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-organizations': 'all' | 'none' | 'selected' /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @description The permissions policy that controls the actions that are allowed to run. * @enum {string} */ 'allowed-actions': 'all' | 'local_only' | 'selected' @@ -7304,52 +7355,26 @@ export type components = { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * Organization Simple - * @description Organization Simple - */ - 'organization-simple': { - /** @example github */ - login: string - /** @example 1 */ - id: number - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** @example A great organization */ - description: string | null - } 'selected-actions': { /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed?: boolean - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed?: boolean + github_owned_allowed: boolean /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed?: string[] + patterns_allowed: string[] + } + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + 'actions-can-approve-pull-request-reviews': boolean + 'actions-get-default-workflow-permissions': { + default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + } + 'actions-set-default-workflow-permissions': { + default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] } 'runner-groups-enterprise': { id: number @@ -7359,6 +7384,18 @@ export type components = { selected_organizations_url?: string runners_url: string allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Self hosted runner label @@ -7513,6 +7550,11 @@ export type components = { * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ 'alert-created-at': string + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'nullable-alert-updated-at': string | null /** * Format: uri * @description The REST API URL of the alert resource. @@ -7524,780 +7566,393 @@ export type components = { */ 'alert-html-url': string /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. * @enum {string} */ 'secret-scanning-alert-state': 'open' | 'resolved' /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null /** - * Repository - * @description A git repository + * Simple Repository + * @description Simple Repository */ - 'nullable-repository': { + 'simple-repository': { /** - * @description Unique identifier of the repository - * @example 42 + * @description A unique identifier of the repository. + * @example 1296269 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ node_id: string /** * @description The name of the repository. - * @example Team Environment + * @example Hello-World */ name: string - /** @example octocat/Hello-World */ - full_name: string - license: components['schemas']['nullable-license-simple'] - organization?: components['schemas']['nullable-simple-user'] - forks: number - permissions?: { - admin: boolean - pull: boolean - triage?: boolean - push: boolean - maintain?: boolean - } - owner: components['schemas']['simple-user'] /** - * @description Whether the repository is private or public. - * @default false + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + /** @description Whether the repository is private. */ private: boolean /** * Format: uri + * @description The URL to view the repository on GitHub.com. * @example https://github.com/octocat/Hello-World */ html_url: string - /** @example This your first repo! */ + /** + * @description The repository description. + * @example This your first repo! + */ description: string | null + /** @description Whether the repository is a fork. */ fork: boolean /** * Format: uri + * @description The URL to get more information about the repository from the GitHub API. * @example https://api.github.com/repos/octocat/Hello-World */ url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ contents_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors */ contributors_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments */ deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads */ downloads_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events */ events_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks */ forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ labels_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages */ languages_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges */ merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ releases_url: string - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers */ stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ statuses_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers */ subscribers_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription */ subscription_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags */ tags_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams */ teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - mirror_url: string | null + trees_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks */ hooks_url: string + } + 'organization-secret-scanning-alert': { + number?: components['schemas']['alert-number'] + created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['nullable-alert-updated-at'] + url?: components['schemas']['alert-url'] + html_url?: components['schemas']['alert-html-url'] /** * Format: uri - * @example https://svn.github.com/octocat/Hello-World + * @description The REST API URL of the code locations for this alert. */ - svn_url: string + locations_url?: string + state?: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] /** - * Format: uri - * @example https://github.com + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - homepage: string | null - language: string | null - /** @example 9 */ - forks_count: number - /** @example 80 */ - stargazers_count: number - /** @example 80 */ - watchers_count: number - /** @example 108 */ - size: number + resolved_at?: string | null + resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The type of secret that secret scanning detected. */ + secret_type?: string /** - * @description The default branch of the repository. - * @example master + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." */ - default_branch: string - /** @example 0 */ - open_issues_count: number + secret_type_display_name?: string + /** @description The secret that was detected. */ + secret?: string + repository?: components['schemas']['simple-repository'] + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - is_template?: boolean - topics?: string[] + push_protection_bypassed_at?: string | null + } + 'advanced-security-active-committers-user': { + user_login: string + /** @example 2021-11-03 */ + last_pushed_date: string + } + 'advanced-security-active-committers-repository': { + /** @example octocat/Hello-World */ + name: string + /** @example 25 */ + advanced_security_committers: number + advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] + } + 'advanced-security-active-committers': { + /** @example 25 */ + total_advanced_security_committers?: number + /** @example 2 */ + total_count?: number + repositories: components['schemas']['advanced-security-active-committers-repository'][] + } + /** + * Actor + * @description Actor + */ + actor: { + id: number + login: string + display_login?: string + gravatar_id: string | null + /** Format: uri */ + url: string + /** Format: uri */ + avatar_url: string + } + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + 'nullable-milestone': { /** - * @description Whether issues are enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 */ - has_issues: boolean + url: string /** - * @description Whether projects are enabled. - * @default true - * @example true + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 */ - has_projects: boolean + html_url: string /** - * @description Whether the wiki is enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels */ - has_wiki: boolean - has_pages: boolean + labels_url: string + /** @example 1002604 */ + id: number + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string /** - * @description Whether downloads are enabled. - * @default true - * @example true + * @description The number of the milestone. + * @example 42 */ - has_downloads: boolean + number: number /** - * @description Whether the repository is archived. - * @default false + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} */ - archived: boolean - /** @description Returns whether or not this repository disabled. */ - disabled: boolean + state: 'open' | 'closed' /** - * @description The repository visibility: public, private, or internal. - * @default public + * @description The title of the milestone. + * @example v1.0 */ - visibility?: string + title: string + /** @example Tracking milestone for version 1.0 */ + description: string | null + creator: components['schemas']['nullable-simple-user'] + /** @example 4 */ + open_issues: number + /** @example 8 */ + closed_issues: number /** * Format: date-time - * @example 2011-01-26T19:06:43Z + * @example 2011-04-10T20:09:31Z */ - pushed_at: string | null + created_at: string /** * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example 2014-03-03T18:58:10Z */ - created_at: string | null + updated_at: string /** * Format: date-time - * @example 2011-01-26T19:14:43Z + * @example 2013-02-12T13:22:01Z */ - updated_at: string | null + closed_at: string | null /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - 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 - } - 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 - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - allow_rebase_merge?: boolean - temp_clone_token?: string - allow_squash_merge?: boolean - allow_auto_merge?: boolean - delete_branch_on_merge?: boolean - allow_update_branch?: boolean - allow_merge_commit?: boolean - subscribers_count?: number - network_count?: number - } | null - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - subscribers_count?: number - network_count?: number - open_issues: number - watchers: number - master_branch?: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - } | null - /** - * Minimal Repository - * @description Minimal Repository - */ - 'minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number - /** @example 0 */ - watchers?: number - allow_forking?: boolean - } - 'organization-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'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - locations_url?: string - state?: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - resolved_at?: string | null - resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The type of secret that secret scanning detected. */ - secret_type?: string - /** @description The secret that was detected. */ - secret?: string - repository?: components['schemas']['minimal-repository'] - } - 'actions-billing-usage': { - /** @description The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number - /** @description The amount of free GitHub Actions minutes available. */ - included_minutes: number - minutes_used_breakdown: { - /** @description Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number - /** @description Total minutes used on macOS runner machines. */ - MACOS?: number - /** @description Total minutes used on Windows runner machines. */ - WINDOWS?: number - } - } - 'advanced-security-active-committers-user': { - user_login: string - /** @example 2021-11-03 */ - last_pushed_date: string - } - 'advanced-security-active-committers-repository': { - /** @example octocat/Hello-World */ - name: string - /** @example 25 */ - advanced_security_committers: number - advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] - } - 'advanced-security-active-committers': { - /** @example 25 */ - total_advanced_security_committers?: number - repositories: components['schemas']['advanced-security-active-committers-repository'][] - } - 'packages-billing-usage': { - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number - /** @description Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number - } - 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number - } - /** - * Actor - * @description Actor - */ - actor: { - id: number - login: string - display_login?: string - gravatar_id: string | null - /** Format: uri */ - url: string - /** Format: uri */ - avatar_url: string - } - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - 'nullable-milestone': { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - html_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - labels_url: string - /** @example 1002604 */ - id: number - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - number: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - title: string - /** @example Tracking milestone for version 1.0 */ - description: string | null - creator: components['schemas']['nullable-simple-user'] - /** @example 4 */ - open_issues: number - /** @example 8 */ - closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - closed_at: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z + * Format: date-time + * @example 2012-10-09T23:39:01Z */ due_on: string | null } | null @@ -8388,7 +8043,7 @@ export type components = { * @example OWNER * @enum {string} */ - author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + 'author-association': 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' /** Reaction Rollup */ 'reaction-rollup': { /** Format: uri */ @@ -8435,6 +8090,12 @@ export type components = { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -8499,7 +8160,7 @@ export type components = { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -8541,7 +8202,7 @@ export type components = { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -8870,7 +8531,7 @@ export type components = { * @example 2011-04-18T23:23:56Z */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Gist Commit @@ -9023,77 +8684,6 @@ export type components = { /** @example true */ featured: boolean } - /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan - */ - 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - url: string - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts - */ - accounts_url: string - /** @example 1313 */ - id: number - /** @example 3 */ - number: number - /** @example Pro */ - name: string - /** @example A professional-grade CI solution */ - description: string - /** @example 1099 */ - monthly_price_in_cents: number - /** @example 11870 */ - yearly_price_in_cents: number - /** @example flat-rate */ - price_model: string - /** @example true */ - has_free_trial: boolean - unit_name: string | null - /** @example published */ - state: string - /** - * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" - * ] - */ - bullets: string[] - } - /** - * Marketplace Purchase - * @description Marketplace Purchase - */ - 'marketplace-purchase': { - url: string - type: string - id: number - login: string - organization_billing_email?: string - email?: string | 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 - 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'] - } - } /** * Api Overview * @description Api Overview @@ -9101,42 +8691,6 @@ export type components = { 'api-overview': { /** @example true */ verifiable_password_authentication: boolean - ssh_key_fingerprints?: { - SHA256_RSA?: string - SHA256_DSA?: string - SHA256_ECDSA?: string - SHA256_ED25519?: string - } - /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] - */ - ssh_keys?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - hooks?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - web?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - api?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - git?: string[] /** * @example [ * "13.65.0.0/16", @@ -9147,32 +8701,222 @@ export type components = { packages?: string[] /** * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" + * "192.168.7.15/32", + * "192.168.7.16/32" * ] */ - pages?: string[] + dependabot?: string[] + /** @example 3.6.0 */ + installed_version?: string + } + /** + * Minimal Repository + * @description Minimal Repository + */ + 'minimal-repository': { + /** @example 1296269 */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example Hello-World */ + name: string + /** @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + private: boolean /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] + * Format: uri + * @example https://github.com/octocat/Hello-World */ - importer?: string[] + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors */ - actions?: string[] + contributors_url: string /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments */ - dependabot?: string[] + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + ssh_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + clone_url?: string + mirror_url?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + svn_url?: string + homepage?: string | null + language?: string | null + forks_count?: number + stargazers_count?: number + watchers_count?: number + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + 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 + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + permissions?: { + admin?: boolean + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + /** @example admin */ + role_name?: string + temp_clone_token?: string + delete_branch_on_merge?: boolean + subscribers_count?: number + network_count?: number + code_of_conduct?: components['schemas']['code-of-conduct'] + license?: { + key?: string + name?: string + spdx_id?: string + url?: string + node_id?: string + } | null + /** @example 0 */ + forks?: number + /** @example 0 */ + open_issues?: number + /** @example 0 */ + watchers?: number + allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Thread @@ -9230,47 +8974,11 @@ export type components = { * @description Custom repository roles created by organization administrators */ 'organization-custom-repository-role': { + /** @description The unique identifier of the custom role. */ id: number + /** @description The name of the custom role. */ name: string } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - groups?: { - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - updated_at: string - }[] - } /** * Organization Full * @description Organization Full @@ -9396,11 +9104,34 @@ export type components = { members_can_create_private_pages?: boolean /** @example false */ members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean /** Format: date-time */ updated_at: string } /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + 'actions-cache-usage-by-repository': { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number + } + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-repositories': 'all' | 'none' | 'selected' @@ -9411,21 +9142,6 @@ export type components = { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - 'actions-can-approve-pull-request-reviews': boolean - 'actions-get-default-workflow-permissions': { - default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - } - 'actions-set-default-workflow-permissions': { - default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - } 'runner-groups-org': { id: number name: string @@ -9437,6 +9153,18 @@ export type components = { inherited: boolean inherited_allows_public_repositories?: boolean allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Actions Secret for an Organization @@ -9492,6 +9220,10 @@ export type components = { * @description An object without any properties. */ 'empty-object': { [key: string]: unknown } + /** @description The name of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-name': string + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + 'code-scanning-analysis-tool-guid': string | null /** * @description State of a code scanning alert. * @enum {string} @@ -9511,17 +9243,19 @@ export type components = { * Format: date-time * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-fixed-at': string | null + 'alert-fixed-at': string | null /** * Format: date-time * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-dismissed-at': string | null + 'alert-dismissed-at': string | null /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description The dismissal comment associated with the dismissal of the alert. */ + 'code-scanning-alert-dismissed-comment': string | null 'code-scanning-alert-rule': { /** @description A unique identifier for the rule used to detect the alert. */ id?: string | null @@ -9545,13 +9279,11 @@ export type components = { tags?: string[] | null /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ help?: string | null + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null } - /** @description The name of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-name': string /** @description The version of the tool used to generate the code scanning analysis. */ 'code-scanning-analysis-tool-version': string | null - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - 'code-scanning-analysis-tool-guid': string | null 'code-scanning-analysis-tool': { name?: components['schemas']['code-scanning-analysis-tool-name'] version?: components['schemas']['code-scanning-analysis-tool-version'] @@ -9607,82 +9339,15 @@ export type components = { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] - repository: components['schemas']['minimal-repository'] - } - /** - * Credential Authorization - * @description Credential Authorization - */ - 'credential-authorization': { - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - login: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - credential_type: string - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - token_last_eight?: string - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - credential_authorized_at: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - scopes?: string[] - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - fingerprint?: string - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - credential_accessed_at: string | null - /** @example 12345678 */ - authorized_credential_id: number | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - authorized_credential_title?: string | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - authorized_credential_note?: string | null - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - authorized_credential_expires_at?: string | null + repository: components['schemas']['simple-repository'] } /** * Dependabot Secret for an Organization @@ -9811,23 +9476,42 @@ export type components = { }[] } /** - * Organization Invitation - * @description Organization Invitation + * ExternalGroups + * @description A list of external groups available to be connected to a team */ - 'organization-invitation': { - id: number - login: string | null - email: string | null - role: string - created_at: string - failed_at?: string | null - failed_reason?: string | null - inviter: components['schemas']['simple-user'] - team_count: number - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - node_id: string - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - invitation_teams_url: string + 'external-groups': { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string + }[] } /** * Org Hook @@ -9885,38 +9569,150 @@ export type components = { type: string } /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} + * Org Membership + * @description Org Membership */ - 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' + 'org-membership': { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: 'active' | 'pending' + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: 'admin' | 'member' | 'billing_manager' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string + organization: components['schemas']['organization-simple'] + user: components['schemas']['nullable-simple-user'] + permissions?: { + can_create_repository: boolean + } + } /** - * Interaction Limits - * @description Interaction limit settings. + * Migration + * @description A migration. */ - 'interaction-limit-response': { - limit: components['schemas']['interaction-group'] - /** @example repository */ - origin: string + migration: { + /** @example 79 */ + id: number + owner: components['schemas']['nullable-simple-user'] + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string + /** @example pending */ + state: string + /** @example true */ + lock_repositories: boolean + exclude_metadata: boolean + exclude_git_data: boolean + exclude_attachments: boolean + exclude_releases: boolean + exclude_owner_projects: boolean + org_metadata_only: boolean + repositories: components['schemas']['repository'][] + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string /** * Format: date-time - * @example 2018-08-17T04:18:39Z + * @example 2015-07-06T15:33:38-07:00 */ - expires_at: string + created_at: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string + node_id: string + /** Format: uri */ + archive_url?: string + exclude?: unknown[] + } + 'org-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string + allow_downstream_configuration?: boolean } /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * Interaction Restrictions - * @description Limit interactions to a specific type of user for a specified duration + * Project + * @description Projects are a way to organize columns and cards of work. */ - 'interaction-limit': { - limit: components['schemas']['interaction-group'] - expiry?: components['schemas']['interaction-expiry'] + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string + /** @example 1002604 */ + id: number + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null + /** @example 1 */ + number: number + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string + creator: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean } /** * Team Simple @@ -10008,496 +9804,134 @@ export type components = { parent: components['schemas']['nullable-team-simple'] } /** - * Org Membership - * @description Org Membership + * Team Organization + * @description Team Organization */ - 'org-membership': { + 'team-organization': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt + * @example https://api.github.com/orgs/github */ url: string - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - state: 'active' | 'pending' - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - role: 'admin' | 'member' | 'billing_manager' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - organization_url: string - organization: components['schemas']['organization-simple'] - user: components['schemas']['nullable-simple-user'] - permissions?: { - can_create_repository: boolean - } - } - /** - * Migration - * @description A migration. - */ - migration: { - /** @example 79 */ - id: number - owner: components['schemas']['nullable-simple-user'] - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - guid: string - /** @example pending */ - state: string - /** @example true */ - lock_repositories: boolean - exclude_metadata: boolean - exclude_git_data: boolean - exclude_attachments: boolean - exclude_releases: boolean - exclude_owner_projects: boolean - repositories: components['schemas']['repository'][] - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - url: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - created_at: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - updated_at: string - node_id: string - /** Format: uri */ - archive_url?: string - exclude?: unknown[] - } - /** - * Minimal Repository - * @description Minimal Repository - */ - 'nullable-minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @example https://api.github.com/orgs/github/repos */ - downloads_url: string + repos_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @example https://api.github.com/orgs/github/events */ events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + /** @example github */ + name?: string + /** @example GitHub */ + company?: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example https://github.com/blog */ - created_at?: string | null + blog?: string + /** @example San Francisco */ + location?: string /** - * Format: date-time - * @example 2011-01-26T19:14:43Z + * Format: email + * @example octocat@github.com */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number + email?: string + /** @example github */ + twitter_username?: string | null + /** @example true */ + is_verified?: boolean + /** @example true */ + has_organization_projects: boolean + /** @example true */ + has_repository_projects: boolean + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number /** @example 0 */ - watchers?: number - allow_forking?: boolean - } | null - /** - * Package - * @description A software package - */ - package: { - /** - * @description Unique identifier of the package. - * @example 1 - */ - id: number - /** - * @description The name of the package. - * @example super-linter - */ - name: string - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - html_url: string - /** - * @description The number of versions of the package. - * @example 1 - */ - version_count: number - /** - * @example private - * @enum {string} - */ - visibility: 'private' | 'public' - owner?: components['schemas']['nullable-simple-user'] - repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - } - /** - * Package Version - * @description A version of a software package - */ - 'package-version': { - /** - * @description Unique identifier of the package version. - * @example 1 - */ - id: number - /** - * @description The name of the package version. - * @example latest - */ - name: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - package_html_url: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - html_url?: string - /** @example MIT */ - license?: string - description?: string - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - deleted_at?: string - /** Package Version Metadata */ - metadata?: { - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** Container Metadata */ - container?: { - tags: string[] - } - /** Docker Metadata */ - docker?: { - tag?: string[] - } & { - tags: unknown - } - } - } - /** - * Project - * @description Projects are a way to organize columns and cards of work. - */ - project: { - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test - */ - owner_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604 - */ - url: string + following: number /** * Format: uri - * @example https://github.com/api-playground/projects-test/projects/12 + * @example https://github.com/octocat */ html_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604/columns - */ - columns_url: string - /** @example 1002604 */ - id: number - /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ - node_id: string - /** - * @description Name of the project - * @example Week One Sprint - */ - name: string - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body: string | null - /** @example 1 */ - number: number - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state: string - creator: components['schemas']['nullable-simple-user'] /** * Format: date-time - * @example 2011-04-10T20:09:31Z + * @example 2008-01-14T04:33:35Z */ created_at: string + /** @example Organization */ + type: string + /** @example 100 */ + total_private_repos?: number + /** @example 100 */ + owned_private_repos?: number + /** @example 81 */ + private_gists?: number | null + /** @example 10000 */ + disk_usage?: number | null + /** @example 8 */ + collaborators?: number | null /** - * Format: date-time - * @example 2014-03-03T18:58:10Z + * Format: email + * @example org@example.com */ + billing_email?: string | null + plan?: { + name: string + space: number + private_repos: number + filled_seats?: number + seats?: number + } + default_repository_permission?: string | null + /** @example true */ + members_can_create_repositories?: boolean | null + /** @example true */ + two_factor_requirement_enabled?: boolean | null + /** @example all */ + members_allowed_repository_creation_type?: string + /** @example true */ + members_can_create_public_repositories?: boolean + /** @example true */ + members_can_create_private_repositories?: boolean + /** @example true */ + members_can_create_internal_repositories?: boolean + /** @example true */ + members_can_create_pages?: boolean + /** @example true */ + members_can_create_public_pages?: boolean + /** @example true */ + members_can_create_private_pages?: boolean + /** @example false */ + members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean + /** Format: date-time */ updated_at: string - /** - * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. - * @enum {string} - */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - private?: boolean - } - /** - * GroupMapping - * @description External Groups to be mapped to a team for membership - */ - 'group-mapping': { - /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] - */ - groups?: { - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - group_name: string - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - group_description: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - synced_at?: string | null - }[] } /** * Full Team @@ -10564,7 +9998,7 @@ export type components = { * @example 2017-08-17T12:37:15Z */ updated_at: string - organization: components['schemas']['organization-full'] + organization: components['schemas']['team-organization'] /** * @description Distinguished Name (DN) that team maps to within LDAP environment * @example uid=example,ou=users,dc=github,dc=com @@ -10772,10 +10206,10 @@ export type components = { } } /** - * Team Repository - * @description A team's access to a repository. + * Repository + * @description A git repository */ - 'team-repository': { + 'nullable-repository': { /** * @description Unique identifier of the repository * @example 42 @@ -10791,6 +10225,7 @@ export type components = { /** @example octocat/Hello-World */ full_name: string license: components['schemas']['nullable-license-simple'] + organization?: components['schemas']['nullable-simple-user'] forks: number permissions?: { admin: boolean @@ -10799,9 +10234,7 @@ export type components = { push: boolean maintain?: boolean } - /** @example admin */ - role_name?: string - owner: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] /** * @description Whether the repository is private or public. * @default false @@ -10959,7 +10392,10 @@ export type components = { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -11033,28 +10469,522 @@ export type components = { * @example true */ allow_rebase_merge?: boolean - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. + 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 + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + allow_rebase_merge?: boolean + temp_clone_token?: string + allow_squash_merge?: boolean + allow_auto_merge?: boolean + delete_branch_on_merge?: boolean + allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + allow_merge_commit?: boolean + subscribers_count?: number + network_count?: number + } | null + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean + subscribers_count?: number + network_count?: number + open_issues: number + watchers: number + master_branch?: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean + } | null + /** + * Team Repository + * @description A team's access to a repository. + */ + 'team-repository': { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + /** @example octocat/Hello-World */ + full_name: string + license: components['schemas']['nullable-license-simple'] + forks: number + permissions?: { + admin: boolean + pull: boolean + triage?: boolean + push: boolean + maintain?: boolean + } + /** @example admin */ + role_name?: string + owner: components['schemas']['nullable-simple-user'] + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + language: string | null + /** @example 9 */ + forks_count: number + /** @example 80 */ + stargazers_count: number + /** @example 80 */ + watchers_count: number + /** @example 108 */ + size: number + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** @example 0 */ + open_issues_count: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + topics?: string[] + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + has_pages: boolean + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + template_repository?: components['schemas']['nullable-repository'] + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether to allow merge commits for pull requests. * @default true * @example true */ @@ -11065,6 +10995,12 @@ export type components = { * @example false */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -11219,6 +11155,20 @@ export type components = { */ html_url: string | null } + 'security-and-analysis': { + advanced_security?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + } | null /** * Full Repository * @description Full Repository @@ -11386,7 +11336,10 @@ export type components = { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** @example master */ default_branch: string @@ -11455,7 +11408,51 @@ export type components = { /** @example true */ allow_merge_commit?: boolean /** @example true */ + allow_update_branch?: boolean + /** @example false */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** @example true */ allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean /** @example 42 */ subscribers_count: number /** @example 0 */ @@ -11474,16 +11471,7 @@ export type components = { */ anonymous_access_enabled?: boolean code_of_conduct?: components['schemas']['code-of-conduct-simple'] - security_and_analysis?: { - advanced_security?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - secret_scanning?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - } | null + security_and_analysis?: components['schemas']['security-and-analysis'] } /** * Artifact @@ -11516,12 +11504,35 @@ export type components = { expires_at: string | null /** Format: date-time */ updated_at: string | null + workflow_run?: { + /** @example 10 */ + id?: number + /** @example 42 */ + repository_id?: number + /** @example 42 */ + head_repository_id?: number + /** @example main */ + head_branch?: string + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string + } | null } /** - * Job - * @description Information of a job execution in a workflow run + * Actions cache usage policy for repository + * @description GitHub Actions cache usage policy for repository. */ - job: { + 'actions-cache-usage-policy-for-repository': { + /** + * @description The size limit for the sum of all caches, in gigabytes. + * @example 14 + */ + repo_cache_size_limit_in_gb: number + } + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { /** * @description The id of the job. * @example 21 @@ -11559,8 +11570,9 @@ export type components = { /** * @description The outcome of the job. * @example success + * @enum {string|null} */ - conclusion: string | null + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -11650,6 +11662,23 @@ export type components = { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } + 'actions-workflow-access-to-repository': { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: 'none' | 'organization' | 'enterprise' + } + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + 'referenced-workflow': { + path: string + sha: string + ref?: string + } /** Pull Request Minimal */ 'pull-request-minimal': { id: number @@ -11723,10 +11752,15 @@ export type components = { /** @example master */ head_branch: string | null /** - * @description The SHA of the head commit that points to the version of the worflow being run. + * @description The SHA of the head commit that points to the version of the workflow being run. * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ head_sha: string + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string /** * @description The auto incrementing run number for the workflow run. * @example 106 @@ -11737,6 +11771,7 @@ export type components = { * @example 1 */ run_attempt?: number + referenced_workflows?: components['schemas']['referenced-workflow'][] | null /** @example push */ event: string /** @example completed */ @@ -11760,6 +11795,8 @@ export type components = { created_at: string /** Format: date-time */ updated_at: string + actor?: components['schemas']['simple-user'] + triggering_actor?: components['schemas']['simple-user'] /** * Format: date-time * @description The start time of the latest run. Resets on re-run. @@ -11810,6 +11847,8 @@ export type components = { head_repository: components['schemas']['minimal-repository'] /** @example 5 */ head_repository_id?: number + } & { + display_title: unknown } /** * Environment Approval @@ -11861,7 +11900,7 @@ export type components = { comment: string } /** - * @description The type of reviewer. Must be one of: `User` or `Team` + * @description The type of reviewer. * @example User * @enum {string} */ @@ -11983,39 +12022,6 @@ export type components = { production_environment?: boolean performed_via_github_app?: components['schemas']['nullable-integration'] } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - 'workflow-run-usage': { - billable: { - UBUNTU?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - MACOS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - WINDOWS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - } - run_duration_ms?: number - } /** * Actions Secret * @description Set secrets for GitHub Actions. @@ -12071,23 +12077,6 @@ export type components = { */ deleted_at?: string } - /** - * Workflow Usage - * @description Workflow Usage - */ - 'workflow-usage': { - billable: { - UBUNTU?: { - total_ms?: number - } - MACOS?: { - total_ms?: number - } - WINDOWS?: { - total_ms?: number - } - } - } /** * Autolink reference * @description An autolink reference. @@ -12149,6 +12138,8 @@ export type components = { users?: components['schemas']['simple-user'][] /** @description The list of teams with review dismissal access. */ teams?: components['schemas']['team'][] + /** @description The list of apps with review dismissal access. */ + apps?: components['schemas']['integration'][] /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ url?: string /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ @@ -12156,13 +12147,15 @@ export type components = { /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ teams_url?: string } - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of users allowed to bypass pull request requirements. */ users?: components['schemas']['simple-user'][] /** @description The list of teams allowed to bypass pull request requirements. */ teams?: components['schemas']['team'][] - } | null + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components['schemas']['integration'][] + } /** @example true */ dismiss_stale_reviews: boolean /** @example true */ @@ -12292,6 +12285,9 @@ export type components = { allow_deletions?: { enabled?: boolean } + block_creations?: { + enabled?: boolean + } required_conversation_resolution?: { enabled?: boolean } @@ -12527,10 +12523,12 @@ export type components = { teams_url: string users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } bypass_pull_request_allowances?: { users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } } required_signatures?: { @@ -12560,6 +12558,9 @@ export type components = { required_conversation_resolution?: { enabled?: boolean } + block_creations?: { + enabled: boolean + } } /** * Deployment @@ -12815,10 +12816,11 @@ export type components = { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule-summary'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] @@ -12831,16 +12833,17 @@ export type components = { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] } /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * @enum {string} */ 'code-scanning-alert-set-state': 'open' | 'dismissed' @@ -12904,7 +12907,7 @@ export type components = { */ confirm_delete_url: string | null } - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/sarif-support-for-code-scanning)." */ 'code-scanning-analysis-sarif-file': string 'code-scanning-sarifs-receipt': { id?: components['schemas']['code-scanning-analysis-sarif-id'] @@ -12929,222 +12932,50 @@ export type components = { errors?: string[] | null } /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'nullable-codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - } | null - /** - * Codespace - * @description A codespace. + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file */ - codespace: { - /** @example 1 */ - id: number - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - name: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - environment_id: string | null - owner: components['schemas']['simple-user'] - billable_owner: components['schemas']['simple-user'] - repository: components['schemas']['minimal-repository'] - machine: components['schemas']['nullable-codespace-machine'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - prebuild: boolean | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - last_used_at: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL for this codespace. - */ - url: string - /** @description Details about the codespace's git repository. */ - git_status: { + 'codeowners-errors': { + errors: { /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 + * @description The line number where this errors occurs. + * @example 7 */ - ahead?: number + line: number /** - * @description The number of commits the local repository is behind the remote. - * @example 0 + * @description The column number where this errors occurs. + * @example 3 */ - behind?: number - /** @description Whether the local repository has unpushed changes. */ - has_unpushed_changes?: boolean - /** @description Whether the local repository has uncommitted changes. */ - has_uncommitted_changes?: boolean + column: number /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main + * @description The contents of the line where the error occurs. + * @example * user */ - ref?: string - } - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - idle_timeout_minutes: number | null - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - web_url: string - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - machines_url: string - /** - * Format: uri - * @description API URL to start this codespace. - */ - start_url: string - /** - * Format: uri - * @description API URL to stop this codespace. - */ - stop_url: string - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - pulls_url: string | null - recent_folders: string[] - runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - allowed_port_privacy_settings?: string[] | null - } - } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null + source?: string + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string + }[] } /** * Collaborator @@ -13220,7 +13051,7 @@ export type components = { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } /** * Repository Invitation @@ -13331,7 +13162,7 @@ export type components = { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } | null /** * Repository Collaborator Permission @@ -13364,7 +13195,7 @@ export type components = { created_at: string /** Format: date-time */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -13390,7 +13221,7 @@ export type components = { * Auto merge * @description The status of auto merging a pull request. */ - auto_merge: { + 'auto-merge': { enabled_by: components['schemas']['simple-user'] /** * @description The merge method to use. @@ -13532,8 +13363,8 @@ export type components = { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -13548,7 +13379,7 @@ export type components = { state: string context: string /** Format: uri */ - target_url: string + target_url: string | null required?: boolean | null /** Format: uri */ avatar_url: string | null @@ -13584,68 +13415,13 @@ export type components = { id: number node_id: string state: string - description: string - target_url: string + description: string | null + target_url: string | null context: string created_at: string updated_at: string creator: components['schemas']['nullable-simple-user'] } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'nullable-code-of-conduct-simple': { - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - } | null - /** Community Health File */ - 'nullable-community-health-file': { - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - } | null - /** - * Community Profile - * @description Community Profile - */ - 'community-profile': { - /** @example 100 */ - health_percentage: number - /** @example My first repository on GitHub! */ - description: string | null - /** @example example.com */ - documentation: string | null - files: { - code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - code_of_conduct_file: components['schemas']['nullable-community-health-file'] - license: components['schemas']['nullable-license-simple'] - contributing: components['schemas']['nullable-community-health-file'] - readme: components['schemas']['nullable-community-health-file'] - issue_template: components['schemas']['nullable-community-health-file'] - pull_request_template: components['schemas']['nullable-community-health-file'] - } - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - updated_at: string | null - /** @example true */ - content_reports_enabled?: boolean - } /** * Commit Comparison * @description Commit Comparison @@ -13751,7 +13527,8 @@ export type components = { * @description A list of directory items */ 'content-directory': { - type: string + /** @enum {string} */ + type: 'dir' | 'file' | 'submodule' | 'symlink' size: number name: string path: string @@ -13779,7 +13556,8 @@ export type components = { * @description Content File */ 'content-file': { - type: string + /** @enum {string} */ + type: 'file' encoding: string size: number name: string @@ -13812,7 +13590,8 @@ export type components = { * @description An object describing a symlink */ 'content-symlink': { - type: string + /** @enum {string} */ + type: 'symlink' target: string size: number name: string @@ -13836,11 +13615,12 @@ export type components = { } } /** - * Symlink Content - * @description An object describing a symlink + * Submodule Content + * @description An object describing a submodule */ 'content-submodule': { - type: string + /** @enum {string} */ + type: 'submodule' /** Format: uri */ submodule_git_url: string size: number @@ -13968,6 +13748,38 @@ export type components = { /** Format: date-time */ updated_at: string } + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + 'dependency-graph-diff': { + /** @enum {string} */ + change_type: 'added' | 'removed' + /** @example path/to/package-lock.json */ + manifest: string + /** @example npm */ + ecosystem: string + /** @example @actions/core */ + name: string + /** @example 1.0.0 */ + version: string + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null + /** @example MIT */ + license: string | null + /** @example https://github.com/github/actions */ + source_repository_url: string | null + vulnerabilities: { + /** @example critical */ + severity: string + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string + /** @example A summary of the advisory. */ + advisory_summary: string + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string + }[] + }[] /** * Deployment Status * @description The status of a deployment. @@ -14050,7 +13862,7 @@ export type components = { */ 'wait-timer': number /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: { + 'deployment-branch-policy-settings': { /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ protected_branches: boolean /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ @@ -14121,7 +13933,36 @@ export type components = { type: string } )[] - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + 'deployment-branch-policy': { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string + } + /** Deployment branch policy name pattern */ + 'deployment-branch-policy-name-pattern': { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string } /** * Short Blob @@ -14438,86 +14279,6 @@ export type components = { deliveries_url?: string last_response: components['schemas']['hook-response'] } - /** - * Import - * @description A repository import from an external source. - */ - import: { - vcs: string | null - use_lfs?: boolean - /** @description The URL of the originating repository. */ - vcs_url: string - svc_root?: string - tfvc_project?: string - /** @enum {string} */ - status: - | 'auth' - | 'error' - | 'none' - | 'detecting' - | 'choose' - | 'auth_failed' - | 'importing' - | 'mapping' - | 'waiting_to_push' - | 'pushing' - | 'complete' - | 'setup' - | 'unknown' - | 'detection_found_multiple' - | 'detection_found_nothing' - | 'detection_needs_auth' - status_text?: string | null - 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 - }[] - message?: string - authors_count?: number | null - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - /** Format: uri */ - authors_url: string - /** Format: uri */ - repository_url: string - svn_root?: string - } - /** - * Porter Author - * @description Porter Author - */ - 'porter-author': { - id: number - remote_id: string - remote_name: string - email: string - name: string - /** Format: uri */ - url: string - /** Format: uri */ - import_url: string - } - /** - * Porter Large File - * @description Porter Large File - */ - 'porter-large-file': { - ref_name: string - path: string - oid: string - size: number - } /** * Issue * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. @@ -14550,6 +14311,12 @@ export type components = { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -14614,7 +14381,7 @@ export type components = { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } | null /** @@ -14698,7 +14465,7 @@ export type components = { 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'] + author_association?: components['schemas']['author-association'] lock_reason?: string | null performed_via_github_app?: components['schemas']['nullable-integration'] } @@ -15097,7 +14864,7 @@ export type components = { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -15251,7 +15018,7 @@ export type components = { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Pull Request Review Comment @@ -15289,12 +15056,12 @@ export type components = { */ path: string /** - * @description The line index in the diff to which the comment applies. + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. * @example 1 */ position: number /** - * @description The index of the original line in the diff to which the comment applies. + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. * @example 4 */ original_position: number @@ -15341,7 +15108,7 @@ export type components = { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: { /** @@ -15454,6 +15221,22 @@ export type components = { performed_via_github_app: components['schemas']['nullable-integration'] assignee: components['schemas']['simple-user'] } + /** + * State Change Issue Event + * @description State Change Issue Event + */ + 'state-change-issue-event': { + 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 + performed_via_github_app: components['schemas']['nullable-integration'] + state_reason?: string | null + } /** * Timeline Event * @description Timeline Event @@ -15480,6 +15263,7 @@ export type components = { | components['schemas']['timeline-commit-commented-event'] | components['schemas']['timeline-assigned-issue-event'] | components['schemas']['timeline-unassigned-issue-event'] + | components['schemas']['state-change-issue-event'] /** * Deploy Key * @description An SSH key granting access to a single repository. @@ -15689,6 +15473,12 @@ export type components = { * @example https://example.com */ html_url?: string + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ('legacy' | 'workflow') | null source?: components['schemas']['pages-source-hash'] /** * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. @@ -15734,71 +15524,11 @@ export type components = { /** @example queued */ status: string } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - 'pages-health-check': { - domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } - alt_domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } | null + 'repository-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string } /** * Team Simple @@ -16123,6 +15853,7 @@ export type components = { updated_at: string allow_forking?: boolean is_template?: boolean + web_commit_signoff_required?: boolean } | null sha: string user: { @@ -16296,6 +16027,7 @@ export type components = { /** Format: date-time */ updated_at: string allow_forking?: boolean + web_commit_signoff_required?: boolean } sha: string user: { @@ -16337,8 +16069,8 @@ export type components = { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -16434,7 +16166,7 @@ export type components = { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Legacy Review Comment @@ -16489,7 +16221,7 @@ export type components = { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: components['schemas']['link'] html: components['schemas']['link'] @@ -16611,11 +16343,6 @@ export type components = { body_html?: string body_text?: string mentions_count?: number - /** - * Format: uri - * @description The URL of the release discussion. - */ - discussion_url?: string reactions?: components['schemas']['reaction-rollup'] } /** @@ -16634,6 +16361,7 @@ export type components = { 'secret-scanning-alert': { number?: components['schemas']['alert-number'] created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['alert-updated-at'] url?: components['schemas']['alert-url'] html_url?: components['schemas']['alert-html-url'] /** @@ -16651,8 +16379,21 @@ export type components = { resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string /** @description The secret that was detected. */ secret?: string + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null } /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ 'secret-scanning-location-commit': { @@ -16812,6 +16553,22 @@ export type components = { tarball_url: string node_id: string } + /** + * Tag protection + * @description Tag protection + */ + 'tag-protection': { + /** @example 2 */ + id?: number + /** @example 2011-01-26T19:01:12Z */ + created_at?: string + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string + /** @example true */ + enabled?: boolean + /** @example v1.* */ + pattern: string + } /** * Topic * @description A topic aggregates entities that are related to a subject. @@ -16819,61 +16576,6 @@ export type components = { topic: { names: string[] } - /** Traffic */ - traffic: { - /** Format: date-time */ - timestamp: string - uniques: number - count: number - } - /** - * Clone Traffic - * @description Clone Traffic - */ - 'clone-traffic': { - /** @example 173 */ - count: number - /** @example 128 */ - uniques: number - clones: components['schemas']['traffic'][] - } - /** - * Content Traffic - * @description Content Traffic - */ - 'content-traffic': { - /** @example /github/hubot */ - path: string - /** @example github/hubot: A customizable life embetterment robot. */ - title: string - /** @example 3542 */ - count: number - /** @example 2225 */ - uniques: number - } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - 'referrer-traffic': { - /** @example Google */ - referrer: string - /** @example 4 */ - count: number - /** @example 3 */ - uniques: number - } - /** - * View Traffic - * @description View Traffic - */ - 'view-traffic': { - /** @example 14850 */ - count: number - /** @example 3782 */ - uniques: number - views: components['schemas']['traffic'][] - } 'scim-group-list-enterprise': { schemas: string[] totalResults: number @@ -16970,125 +16672,6 @@ export type components = { location?: string } } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - 'scim-user': { - /** @description SCIM schema used. */ - schemas: string[] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - id: string - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - externalId: string | null - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string | null - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string | null - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string | null - familyName: string | null - formatted?: string | null - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - value: string - primary?: boolean - }[] - /** - * @description The active status of the User. - * @example true - */ - active: boolean - meta: { - /** @example User */ - resourceType?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - location?: string - } - /** @description The ID of the organization. */ - organization_id?: number - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - operations?: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: string | { [key: string]: unknown } | unknown[] - }[] - /** @description associated groups */ - groups?: { - value?: string - display?: string - }[] - } - /** - * SCIM User List - * @description SCIM User List - */ - 'scim-user-list': { - /** @description SCIM schema used. */ - schemas: string[] - /** @example 3 */ - totalResults: number - /** @example 10 */ - itemsPerPage: number - /** @example 1 */ - startIndex: number - Resources: components['schemas']['scim-user'][] - } /** Search Result Text Matches */ 'search-result-text-matches': { object_url?: string @@ -17207,6 +16790,7 @@ export type components = { description?: string | null }[] state: string + state_reason?: string | null assignee: components['schemas']['nullable-simple-user'] milestone: components['schemas']['nullable-milestone'] comments: number @@ -17231,7 +16815,7 @@ export type components = { } body?: string score: number - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] draft?: boolean repository?: components['schemas']['repository'] body_html?: string @@ -17378,6 +16962,8 @@ export type components = { delete_branch_on_merge?: boolean allow_forking?: boolean is_template?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Topic Search Result Item @@ -17474,6 +17060,163 @@ export type components = { /** Format: date-time */ suspended_at?: string | null } + 'configuration-status': { + status?: string + progress?: { + status: string + key: string + }[] + } + 'maintenance-status': { + status?: string + scheduled_time?: string + connection_services?: { + name: string + number: number + }[] + } + 'enterprise-settings': { + enterprise?: { + private_mode?: boolean + public_pages?: boolean + subdomain_isolation?: boolean + signup_enabled?: boolean + github_hostname?: string + identicons_host?: string + http_proxy?: string | null + auth_mode?: string + expire_sessions?: boolean + admin_password?: string | null + configuration_id?: number + configuration_run_count?: number + avatar?: { + enabled?: boolean + uri?: string + } + customer?: { + name?: string + email?: string + uuid?: string + secret_key_data?: string + public_key_data?: string + } + license?: { + seats?: number + evaluation?: boolean + perpetual?: boolean + unlimited_seating?: boolean + support_key?: string + ssh_allowed?: boolean + cluster_support?: boolean + expire_at?: string + } + github_ssl?: { + enabled?: boolean + cert?: string | null + key?: string | null + } + ldap?: { + host?: string | null + port?: number + base?: unknown[] + uid?: string | null + bind_dn?: string | null + password?: string | null + method?: string + search_strategy?: string + user_groups?: unknown[] + admin_group?: string | null + virtual_attribute_enabled?: boolean + recursive_group_search?: boolean + posix_support?: boolean + user_sync_emails?: boolean + user_sync_keys?: boolean + user_sync_interval?: number + team_sync_interval?: number + sync_enabled?: boolean + reconciliation?: { + user?: string | null + org?: string | null + } + profile?: { + uid?: string + name?: string | null + mail?: string | null + key?: string | null + } + } + cas?: { + url?: string | null + } + saml?: { + sso_url?: string | null + certificate?: string | null + certificate_path?: string | null + issuer?: string | null + idp_initiated_sso?: boolean + disable_admin_demote?: boolean + } + github_oauth?: { + client_id?: string + client_secret?: string + organization_name?: string + organization_team?: string + } + smtp?: { + enabled?: boolean + address?: string + authentication?: string + port?: string + domain?: string + username?: string + user_name?: string + enable_starttls_auto?: boolean + password?: string + 'discard-to-noreply-address'?: boolean + support_address?: string + support_address_type?: string + noreply_address?: string + } + ntp?: { + primary_server?: string + secondary_server?: string + } + timezone?: string | null + snmp?: { + enabled?: boolean + community?: string + } + syslog?: { + enabled?: boolean + server?: string | null + protocol_name?: string + } + assets?: string | null + pages?: { + enabled?: boolean + } + collectd?: { + enabled?: boolean + server?: string | null + port?: number + encryption?: string | null + username?: string | null + password?: string | null + } + mapping?: { + enabled?: boolean + tileserver?: string | null + basemap?: string + token?: string | null + } + load_balancer?: string | null + } + run_list?: string[] + } + 'ssh-key': { + key?: string + 'pretty-print'?: string + } /** * Private User * @description Private User @@ -17597,84 +17340,6 @@ export type components = { business_plus?: boolean ldap_dn?: string } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - 'codespaces-secret': { - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - name: string - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - selected_repositories_url: string - } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - 'codespaces-user-public-key': { - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - 'codespace-export-details': { - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - state?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - completed_at?: string | null - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - branch?: string | null - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - sha?: string | null - /** - * @description Id for the export details - * @example latest - */ - id?: string - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - export_url?: string - } /** * Email * @description Email @@ -17699,6 +17364,8 @@ export type components = { 'gpg-key': { /** @example 3 */ id: number + /** @example Octocat's GPG Key */ + name?: string | null primary_key_id: number | null /** @example 3262EFF25BA0D270 */ key_id: string @@ -17707,7 +17374,7 @@ export type components = { /** * @example [ * { - * "email": "mastahyeti@users.noreply.github.com", + * "email": "octocat@users.noreply.github.com", * "verified": true * } * ] @@ -17730,7 +17397,8 @@ export type components = { * "can_encrypt_storage": true, * "can_certify": false, * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null + * "expires_at": null, + * "revoked": false * } * ] */ @@ -17748,6 +17416,7 @@ export type components = { created_at?: string expires_at?: string | null raw_key?: string | null + revoked?: boolean }[] /** @example true */ can_sign: boolean @@ -17762,6 +17431,8 @@ export type components = { created_at: string /** Format: date-time */ expires_at: string | null + /** @example true */ + revoked: boolean raw_key: string | null } /** @@ -17778,47 +17449,6 @@ export type components = { verified: boolean read_only: boolean } - /** Marketplace Account */ - 'marketplace-account': { - /** Format: uri */ - url: string - id: number - type: string - node_id?: string - login: string - /** Format: email */ - email?: string | null - /** Format: email */ - organization_billing_email?: string | null - } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - 'user-marketplace-purchase': { - /** @example monthly */ - billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - next_billing_date: string | null - unit_count: number | null - /** @example true */ - on_free_trial: boolean - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - updated_at: string | null - account: components['schemas']['marketplace-account'] - plan: components['schemas']['marketplace-listing-plan'] - } /** * Starred Repository * @description Starred Repository @@ -17854,7 +17484,7 @@ export type components = { 'application/json': components['schemas']['basic-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed_simple: { content: { 'application/json': components['schemas']['validation-error-simple'] @@ -17867,7 +17497,7 @@ export type components = { 'application/scim+json': components['schemas']['scim-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed: { content: { 'application/json': components['schemas']['validation-error'] @@ -17879,15 +17509,6 @@ export type components = { 'application/json': { [key: string]: unknown } } } - /** Preview header missing */ - preview_header_missing: { - content: { - 'application/json': { - message: string - documentation_url: string - } - } - } /** Forbidden */ forbidden: { content: { @@ -17980,7 +17601,7 @@ export type components = { 'application/json': components['schemas']['basic-error'] } } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + /** 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'] @@ -17990,72 +17611,59 @@ export type components = { found: unknown /** A header with no content is returned. */ no_content: 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: { - /** @description Results per page (max 100) */ + /** @description The number of results per page (max 100). */ 'per-page': number + /** @description Page number of the results to fetch. */ + page: number + /** @description The unique identifier of the hook. */ + 'hook-id': number + /** @description The direction to sort the results by. */ + direction: 'asc' | 'desc' + /** @description The unique identifier of the key. */ + 'key-ids': string + /** @description The unique identifier of the team. */ + 'team-id': number + /** @description The handle for the GitHub user account. */ + username: string + /** @description The organization name. The name is not case sensitive. */ + org: string + /** @description The unique identifier of the pre-receive environment. */ + 'pre-receive-environment-id': number + /** @description The unique identifier of the pre-receive hook. */ + 'pre-receive-hook-id': number + /** @description The unique identifier of the token. */ + 'token-id': number /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor: string 'delivery-id': number - /** @description Page number of the results to fetch. */ - page: number /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since: string - /** @description installation_id parameter */ + /** @description The unique identifier of the installation. */ 'installation-id': number - /** @description grant_id parameter */ + /** @description The unique identifier of the grant. */ 'grant-id': number - /** @description The client ID of your GitHub app. */ + /** @description The client ID of the GitHub app. */ 'client-id': string 'app-slug': string - /** @description authorization_id parameter */ + /** @description The client ID of the OAuth app. */ + 'oauth-client-id': string + /** @description The unique identifier of the authorization. */ 'authorization-id': number /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: string - /** @description Unique identifier of an organization. */ + /** @description The unique identifier of the organization. */ 'org-id': number + /** @description Only return runner groups that are allowed to be used by this organization. */ + 'visible-to-organization': string /** @description Unique identifier of the self-hosted runner group. */ 'runner-group-id': number /** @description Unique identifier of the self-hosted runner. */ 'runner-id': number /** @description The name of a self-hosted runner's custom label. */ 'runner-label-name': string - /** @description 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). */ + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ 'audit-log-phrase': string /** * @description The event types to include: @@ -18067,9 +17675,9 @@ export type components = { * The default is `web`. */ 'audit-log-include': 'web' | 'git' | 'all' - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ 'audit-log-before': string /** * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. @@ -18081,31 +17689,27 @@ export type components = { 'secret-scanning-alert-state': 'open' | 'resolved' /** * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ 'secret-scanning-alert-secret-type': string /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ 'secret-scanning-alert-resolution': string - /** @description A 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. */ + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + 'secret-scanning-alert-sort': 'created' | 'updated' + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ 'pagination-before': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ 'pagination-after': string - /** @description gist_id parameter */ + /** @description The unique identifier of the gist. */ 'gist-id': string - /** @description comment_id parameter */ + /** @description The unique identifier of the comment. */ 'comment-id': number /** @description A list of comma separated label names. Example: `bug,ui,@high` */ labels: string - /** @description One of `asc` (ascending) or `desc` (descending). */ - direction: 'asc' | 'desc' - /** @description account_id parameter */ - 'account-id': number - /** @description plan_id parameter */ - 'plan-id': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: 'created' | 'updated' + /** @description The account owner of the repository. The name is not case sensitive. */ owner: string + /** @description The name of the repository. The name is not case sensitive. */ repo: string /** @description If `true`, show notifications marked as read. */ all: boolean @@ -18113,45 +17717,41 @@ export type components = { participating: boolean /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ before: string - /** @description thread_id parameter */ + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ 'thread-id': number /** @description An organization ID. Only return organizations with an ID greater than this ID. */ 'since-org': number - org: string - /** @description team_slug parameter */ - 'team-slug': string + /** @description The unique identifier of the repository. */ 'repository-id': number - /** @description secret_name parameter */ + /** @description Only return runner groups that are allowed to be used by this repository. */ + 'visible-to-repository': string + /** @description The name of the secret. */ 'secret-name': string - username: string - /** @description group_id parameter */ + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The unique identifier of the group. */ 'group-id': number - 'hook-id': number - /** @description invitation_id parameter */ - 'invitation-id': number - /** @description migration_id parameter */ + /** @description The unique identifier of the migration. */ 'migration-id': number - /** @description repo_name parameter */ - 'repo-name': string - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - 'package-visibility': 'public' | 'private' | 'internal' - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description The name of the package. */ - 'package-name': string - /** @description Unique identifier of the package version. */ - 'package-version-id': number + /** @description The slug of the team name. */ + 'team-slug': string + /** @description The number that identifies the discussion. */ 'discussion-number': number + /** @description The number that identifies the comment. */ 'comment-number': number + /** @description The unique identifier of the reaction. */ 'reaction-id': number + /** @description The unique identifier of the project. */ 'project-id': number - /** @description card_id parameter */ + /** @description The unique identifier of the card. */ 'card-id': number - /** @description column_id parameter */ + /** @description The unique identifier of the column. */ 'column-id': number - /** @description artifact_id parameter */ + /** @description The unique identifier of the artifact. */ 'artifact-id': number - /** @description job_id parameter */ + /** @description The unique identifier of the job. */ 'job-id': number /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ actor: string @@ -18159,7 +17759,7 @@ export type components = { 'workflow-run-branch': string /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event: string - /** @description 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)." */ + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ 'workflow-run-status': | 'completed' | 'action_required' @@ -18174,61 +17774,64 @@ export type components = { | 'queued' | 'requested' | 'waiting' - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created: string /** @description If `true` pull requests are omitted from the response (empty array). */ 'exclude-pull-requests': boolean /** @description Returns workflow runs with the `check_suite_id` that you specify. */ 'workflow-run-check-suite-id': number - /** @description The id of the workflow run. */ + /** @description The unique identifier of the workflow run. */ 'run-id': number /** @description The attempt number of the workflow run. */ 'attempt-number': number /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ 'workflow-id': number | string - /** @description autolink_id parameter */ + /** @description The unique identifier of the autolink. */ 'autolink-id': number /** @description The name of the branch. */ branch: string - /** @description check_run_id parameter */ + /** @description The unique identifier of the check run. */ 'check-run-id': number - /** @description check_suite_id parameter */ + /** @description The unique identifier of the check suite. */ 'check-suite-id': number /** @description Returns check runs with the specified `name`. */ 'check-name': string - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + /** @description Returns check runs with the specified `status`. */ status: 'queued' | 'in_progress' | 'completed' - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ 'git-ref': components['schemas']['code-scanning-ref'] /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ 'alert-number': components['schemas']['alert-number'] - /** @description commit_sha parameter */ + /** @description The SHA of the commit. */ 'commit-sha': string + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + 'manifest-path': string /** @description deployment_id parameter */ 'deployment-id': number - /** @description The name of the environment */ + /** @description The name of the environment. */ 'environment-name': string - /** @description A user ID. Only return users with an ID greater than this ID. */ - 'since-user': number - /** @description issue_number parameter */ + /** @description The unique identifier of the branch policy. */ + 'branch-policy-id': number + /** @description The unique identifier of the invitation. */ + 'invitation-id': number + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: 'created' | 'updated' + /** @description The number that identifies the issue. */ 'issue-number': number - /** @description key_id parameter */ + /** @description The unique identifier of the key. */ 'key-id': number - /** @description milestone_number parameter */ + /** @description The number that identifies the milestone. */ 'milestone-number': number + /** @description The number that identifies the pull request. */ 'pull-number': number - /** @description review_id parameter */ + /** @description The unique identifier of the review. */ 'review-id': number - /** @description asset_id parameter */ + /** @description The unique identifier of the asset. */ 'asset-id': number - /** @description release_id parameter */ + /** @description The unique identifier of the release. */ 'release-id': number - /** @description Must be one of: `day`, `week`. */ - per: '' | 'day' | 'week' + /** @description The unique identifier of the tag protection. */ + 'tag-protection-id': number /** @description A repository ID. Only return repositories with an ID greater than this ID. */ 'since-repo': number /** @description Used for pagination: the index of the first result to return. */ @@ -18237,19 +17840,14 @@ export type components = { count: number /** @description Identifier generated by the GitHub SCIM endpoint. */ 'scim-group-id': string - /** @description scim_user_id parameter */ + /** @description The unique identifier of the SCIM user. */ 'scim-user-id': string /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order: 'desc' | 'asc' - 'team-id': number - /** @description ID of the Repository to filter on */ - 'repository-id-in-query': number - /** @description The name of the codespace. */ - 'codespace-name': string - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - 'export-id': string - /** @description gpg_key_id parameter */ + /** @description The unique identifier of the GPG key. */ 'gpg-key-id': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + 'since-user': number } headers: { link?: string @@ -18269,628 +17867,627 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': { - /** Format: uri-template */ - current_user_url: string - /** Format: uri-template */ - current_user_authorizations_html_url: string - /** Format: uri-template */ - authorizations_url: string - /** Format: uri-template */ - code_search_url: string - /** Format: uri-template */ - commit_search_url: string - /** Format: uri-template */ - emails_url: string - /** Format: uri-template */ - emojis_url: string - /** Format: uri-template */ - events_url: string - /** Format: uri-template */ - feeds_url: string - /** Format: uri-template */ - followers_url: string - /** Format: uri-template */ - following_url: string - /** Format: uri-template */ - gists_url: string - /** Format: uri-template */ - hub_url: string - /** Format: uri-template */ - issue_search_url: string - /** Format: uri-template */ - issues_url: string - /** Format: uri-template */ - keys_url: string - /** Format: uri-template */ - label_search_url: string - /** Format: uri-template */ - notifications_url: string - /** Format: uri-template */ - organization_url: string - /** Format: uri-template */ - organization_repositories_url: string - /** Format: uri-template */ - organization_teams_url: string - /** Format: uri-template */ - public_gists_url: string - /** Format: uri-template */ - rate_limit_url: string - /** Format: uri-template */ - repository_url: string - /** Format: uri-template */ - repository_search_url: string - /** Format: uri-template */ - current_user_repositories_url: string - /** Format: uri-template */ - starred_url: string - /** Format: uri-template */ - starred_gists_url: string - /** Format: uri-template */ - topic_search_url?: string - /** Format: uri-template */ - user_url: string - /** Format: uri-template */ - user_organizations_url: string - /** Format: uri-template */ - user_repositories_url: string - /** Format: uri-template */ - user_search_url: string - } + 'application/json': components['schemas']['root'] } } } } - /** - * 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: {} + 'enterprise-admin/list-global-webhooks': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['global-hook'][] } } } } - /** 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 - } - } + 'enterprise-admin/create-global-webhook': { responses: { /** Response */ 201: { content: { - 'application/json': components['schemas']['integration'] & - ({ - client_id: string - client_secret: string - webhook_secret: string | null - pem: string - } & { [key: string]: unknown }) + 'application/json': components['schemas']['global-hook'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': { + /** @description Must be passed as "web". */ + name: string + /** @description Key/value pairs to provide settings for this webhook. */ + config: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } } } } - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } + 'enterprise-admin/get-global-webhook': { + parameters: { + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } - } - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - 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'] + 'application/json': components['schemas']['global-hook'] } } } } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/list-webhook-deliveries': { + 'enterprise-admin/delete-global-webhook': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 204: never } } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-delivery': { + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + 'enterprise-admin/update-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['global-hook-2'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/redeliver-webhook-delivery': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + 'enterprise-admin/ping-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + /** Response */ + 204: never } } - /** - * 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': { + 'enterprise-admin/list-public-keys': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of 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 + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'accessed' + /** Only show public keys accessed after the given time. */ + since?: string } } responses: { - /** The permissions the installation has are included under the `permissions` key. */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['installation'][] + 'application/json': components['schemas']['public-key-full'][] } } } } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-installation': { + 'enterprise-admin/delete-public-key': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the key. */ + key_ids: components['parameters']['key-ids'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + 'enterprise-admin/update-ldap-mapping-for-team': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['installation'] + 'application/json': components['schemas']['ldap-mapping-team'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } - 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-team': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/update-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['installation-token'] + 'application/json': components['schemas']['ldap-mapping-user'] } } - 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': { - /** @description List of repository names that the token should have access to */ - repositories?: string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } } } - /** - * 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/create-org': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['organization-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's username. */ + login: string + /** @description The login of the user who will manage this organization. */ + admin: string + /** @description The organization's display name. */ + profile_name?: string + } + } + } + } + 'enterprise-admin/update-org-name': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 202: { + content: { + 'application/json': { + message?: string + url?: string + } + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's new name. */ + login: string + } + } } } - /** - * **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': { + 'enterprise-admin/list-pre-receive-environments': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['application-grant'][] + 'application/json': components['schemas']['pre-receive-environment'][] } } - 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': { + 'enterprise-admin/create-pre-receive-environment': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The new pre-receive environment's name. */ + name: string + /** @description URL from which to download a tarball of this environment. */ + image_url: string + } + } + } + } + 'enterprise-admin/get-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['application-grant'] + 'application/json': components['schemas']['pre-receive-environment'] } } - 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 attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. * - * 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). + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ */ - 'oauth-authorizations/delete-grant': { + 'enterprise-admin/delete-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } } - /** - * 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': { + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + 'enterprise-admin/update-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } requestBody: { content: { 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + /** @description This pre-receive environment's new name. */ + name?: string + /** @description URL from which to download a tarball of this environment. */ + image_url?: string } } } } - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/check-token': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + 'enterprise-admin/start-pre-receive-environment-download': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } } } } } - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - 'apps/delete-token': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + 'enterprise-admin/get-download-status-for-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } } } - /** 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': { + 'enterprise-admin/list-pre-receive-hooks': { parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property to sort the results by. */ + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'][] + } + } + } + } + 'enterprise-admin/create-pre-receive-hook': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** @description The name of the hook. */ + name: string + /** @description The script that the hook runs. */ + script: string + /** @description The GitHub repository where the script is kept. */ + script_repository: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment: { [key: string]: unknown } + /** @description The state of enforcement for this hook. default: `disabled` */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. default: `false` */ + allow_downstream_configuration?: boolean } } } } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/scope-token': { + 'enterprise-admin/get-pre-receive-hook': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] - } + } + 'enterprise-admin/delete-pre-receive-hook': { + parameters: { + path: { + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } + responses: { + /** 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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/get-by-slug': { + 'enterprise-admin/update-pre-receive-hook': { parameters: { path: { - app_slug: components['parameters']['app-slug'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['pre-receive-hook'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the hook. */ + name?: string + /** @description The script that the hook runs. */ + script?: string + /** @description The GitHub repository where the script is kept. */ + script_repository?: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment?: { [key: string]: unknown } + /** @description The state of enforcement for this hook. */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. */ + allow_downstream_configuration?: boolean } } - 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': { + /** Lists personal access tokens for all users, including admin users. */ + 'enterprise-admin/list-personal-access-tokens': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string } } responses: { @@ -18901,788 +18498,680 @@ export type operations = { 'application/json': components['schemas']['authorization'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + } + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + 'enterprise-admin/delete-personal-access-token': { + parameters: { + path: { + /** The unique identifier of the token. */ + token_id: components['parameters']['token-id'] + } + } + responses: { + /** Response */ + 204: never } } /** - * **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). + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. * - * 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)." + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * If the login name or email address is already associated with an account, the server will return a `422` response. */ - 'oauth-authorizations/create-authorization': { - parameters: {} + 'enterprise-admin/create-user': { responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['simple-user'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The user's username. */ + login: string /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems + * @description **Required for built-in authentication.** The user's email + * address. This parameter can be omitted when using CAS, LDAP, or SAML. + * For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description The OAuth app client key for which to create the token. */ - client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + email?: string } } } } /** - * **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 a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. * - * **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/). + * You can delete any user account except your own. */ - 'oauth-authorizations/get-or-create-authorization-for-app': { + 'enterprise-admin/delete-user': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } + /** Response */ + 204: never + } + } + 'enterprise-admin/update-username-for-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } - /** **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 - } + } + responses: { + /** Response */ + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + message?: string + url?: string + } } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + /** @description The user's new username. */ + login: string } } } } - /** - * **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': { + 'enterprise-admin/create-impersonation-o-auth-token': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - fingerprint: string + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ + /** Response when getting an existing impersonation OAuth token */ 200: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - /** Response if returning a new token */ + /** Response when creating a new impersonation OAuth token */ 201: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string + /** @description A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + scopes?: string[] } } } } - /** **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': { + 'enterprise-admin/delete-impersonation-o-auth-token': { parameters: { path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } + responses: { + /** Response */ + 204: never + } + } + /** + * 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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']['authorization'] + 'application/json': components['schemas']['integration'] } } - 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': { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + code: string } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 201: { + content: { + 'application/json': components['schemas']['integration'] & + ({ + client_id: string + client_secret: string + webhook_secret: string | null + pem: string + } & { [key: string]: unknown }) + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * **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)." + * 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 can only send one of these scope keys at a time. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'oauth-authorizations/update-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } + 'apps/get-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** @description A list of scopes to add to this authorization. */ - add_scopes?: string[] - /** @description A list of scopes to remove from this authorization. */ - remove_scopes?: string[] - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + 'application/json': components['schemas']['webhook-config'] } } } } - 'codes-of-conduct/get-all-codes-of-conduct': { - parameters: {} + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-of-conduct'][] + 'application/json': components['schemas']['webhook-config'] } } - 304: components['responses']['not_modified'] - } - } - 'codes-of-conduct/get-conduct-code': { - parameters: { - path: { - key: string - } } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'] + 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'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] } } - /** Lists all the emojis available to use on GitHub. */ - 'emojis/get': { - parameters: {} + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/list-webhook-deliveries': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } responses: { /** Response */ 200: { content: { - 'application/json': { [key: string]: string } + 'application/json': components['schemas']['hook-delivery-item'][] } } - 304: components['responses']['not_modified'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Returns a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-github-actions-permissions-enterprise': { + 'apps/get-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-enterprise-permissions'] + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-github-actions-permissions-enterprise': { + 'apps/redeliver-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_organizations: components['schemas']['enabled-organizations'] - allowed_actions?: components['schemas']['allowed-actions'] - } - } + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * The permissions the installation has are included under the `permissions` key. */ - 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { + 'apps/list-installations': { 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) */ + /** The number of 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: { - /** Response */ + /** The permissions the installation has are included under the `permissions` key. */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 'application/json': components['schemas']['installation'][] } } } } /** - * 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)." + * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + 'apps/get-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[] + 200: { + content: { + 'application/json': components['schemas']['installation'] } } + 404: components['responses']['not_found'] } } /** - * 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)." + * 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { + 'apps/delete-installation': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { + 'apps/create-installation-access-token': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['installation-token'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository names that the token should have access to */ + repositories?: string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * 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 Enterprise Server API or webhook events is blocked for that account. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-allowed-actions-enterprise': { + 'apps/suspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } + 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * Removes a GitHub App installation suspension. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-allowed-actions-enterprise': { + 'apps/unsuspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } + 404: components['responses']['not_found'] } } /** - * Lists all self-hosted runner groups for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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/enterprise-server@3.6/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"]`. */ - 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + 'oauth-authorizations/list-grants': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-enterprise'][] - } + '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'] } } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + 'application/json': components['schemas']['application-grant'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Gets a specific self-hosted runner group for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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). */ - 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + 'oauth-authorizations/delete-grant': { 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'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). */ - 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + 'apps/delete-authorization': { 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } + } } } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['authorization'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string } } } } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: number[] + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * **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`). * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + 'apps/get-by-slug': { 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'] + app_slug: components['parameters']['app-slug'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['integration'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { @@ -19690,504 +19179,698 @@ export type operations = { 200: { headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/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/enterprise-server@3.6/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 Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ - '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'] - } - } + 'oauth-authorizations/create-authorization': { + parameters: {} responses: { /** Response */ - 204: never + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description The OAuth app client key for which to create the token. */ + client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string } } } } /** - * Adds a self-hosted runner to a runner group configured in an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ - 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] } } responses: { - /** Response */ - 204: never + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } + } } } /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ - 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] + fingerprint: string } } responses: { - /** Response */ - 204: never + /** if returning an existing token */ + 200: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** Response if returning a new token */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + } + } } } - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** 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'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count?: number - runners?: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-runner-applications-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` + * You can only send one of these scope keys at a time. */ - 'enterprise-admin/create-registration-token-for-enterprise': { + 'oauth-authorizations/update-authorization': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['authorization'] } } + 422: components['responses']['validation_failed'] } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'enterprise-admin/create-remove-token-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + requestBody: { + content: { + 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[] + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[] + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } } } + } + 'codes-of-conduct/get-all-codes-of-conduct': { + parameters: {} responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['code-of-conduct'][] } } + 304: components['responses']['not_modified'] } } - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + 'codes-of-conduct/get-conduct-code': { 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'] + key: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner'] + 'application/json': components['schemas']['code-of-conduct'] } } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** Lists all the emojis available to use on GitHub Enterprise Server. */ + 'emojis/get': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': { [key: string]: string } + } + } + 304: components['responses']['not_modified'] + } + } + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + 'enterprise-admin/get-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } } } + } + /** Removes the global announcement banner in your enterprise. */ + 'enterprise-admin/remove-announcement': { responses: { /** Response */ 204: never } } - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + 'enterprise-admin/set-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } + } + } + requestBody: { + content: { + 'application/json': components['schemas']['announcement'] + } + } + } + 'enterprise-admin/get-license-information': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license-info'] + } + } + } + } + 'enterprise-admin/get-all-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-overview'] + } + } + } + } + 'enterprise-admin/get-comment-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-comment-overview'] + } + } + } + } + 'enterprise-admin/get-gist-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-gist-overview'] + } + } + } + } + 'enterprise-admin/get-hooks-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-hook-overview'] + } + } + } + } + 'enterprise-admin/get-issue-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-issue-overview'] + } + } + } + } + 'enterprise-admin/get-milestone-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-milestone-overview'] + } + } + } + } + 'enterprise-admin/get-org-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-organization-overview'] + } + } + } + } + 'enterprise-admin/get-pages-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-page-overview'] + } + } + } + } + 'enterprise-admin/get-pull-request-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-pull-request-overview'] + } + } + } + } + 'enterprise-admin/get-repo-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-repository-overview'] + } + } + } + } + 'enterprise-admin/get-user-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-user-overview'] + } + } + } + } + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'actions/get-actions-cache-usage-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } + } } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + 'actions/get-actions-cache-usage-policy-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } } /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + 'actions/set-actions-cache-usage-policy-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + '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'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-enterprise-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + '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'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_organizations: components['schemas']['enabled-organizations'] + allowed_actions?: components['schemas']['allowed-actions'] + } + } } } - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - 'enterprise-admin/get-audit-log': { + /** + * 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: { - /** 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } } } } } /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * 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. */ - 'secret-scanning/list-alerts-for-enterprise': { + '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'] } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[] } } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-github-actions-billing-ghe': { + '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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + 204: never } } /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + * 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. */ - 'billing/get-github-advanced-security-billing-ghe': { + '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'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { - /** Success */ - 200: { - content: { - 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] + /** Response */ + 204: never } } /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-github-packages-billing-ghe': { + '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. */ @@ -20198,19 +19881,17 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['packages-billing-usage'] + 'application/json': components['schemas']['selected-actions'] } } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-shared-storage-billing-ghe': { + '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. */ @@ -20219,268 +19900,250 @@ export type operations = { } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] } } } - /** 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': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/get-github-actions-default-workflow-permissions-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response */ + /** Success response */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } - 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: + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." * - * * **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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'activity/get-feeds': { - parameters: {} + 'actions/set-github-actions-default-workflow-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']['feed'] - } + /** Success response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - 'gists/list': { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } query: { - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components['parameters']['visible-to-organization'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': { + total_count: number + runner_groups: components['schemas']['runner-groups-enterprise'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] } } /** - * Allows you to add a new gist with one or more files. + * Creates a new self-hosted runner group for an enterprise. * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'gists/create': { - parameters: {} + '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: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['gist-simple'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} */ - description?: string + visibility?: 'selected' | 'all' + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - files: { - [key: string]: { - /** @description Content of the file */ - content: string - } - } - public?: boolean | ('true' | 'false') + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } /** - * List public gists sorted by most recently updated to least recently updated. + * Gets a specific self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'gists/list-public': { + 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { 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'] + 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: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } } - /** List the authenticated user's starred gists: */ - 'gists/list-starred': { + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { parameters: { - 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'] + 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: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } } - 'gists/get': { + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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']['gist-simple'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] - } - } - 'gists/delete': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ - 'gists/update': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name?: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} */ - description?: string + visibility?: 'selected' | 'all' /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - files?: { [key: string]: { [key: string]: unknown } } - } | null + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } } } } - 'gists/list-comments': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20489,153 +20152,99 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-comment'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/create-comment': { + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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 */ - 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'] + 204: never } requestBody: { content: { 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } - } - } - 'gists/get-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] } } - 'gists/delete-comment': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/update-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } } } - 'gists/list-commits': { + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** 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'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } 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'] + 204: never } } - 'gists/list-forks': { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20646,408 +20255,436 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['gist-simple'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - 'gists/fork': { + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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 */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['base-gist'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'gists/check-is-starred': { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response if gist is starred */ + /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - 404: { - content: { - 'application/json': { [key: string]: unknown } - } - } } } - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'gists/star': { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/unstar': { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + headers: {} + content: { + 'application/json': { + total_count?: number + runners?: components['schemas']['runner'][] + } + } + } } } - 'gists/get-revision': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-runner-applications-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - sha: string + /** 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']['gist-simple'] + 'application/json': components['schemas']['runner-application'][] } } - 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: {} + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + 'enterprise-admin/create-registration-token-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': string[] + 'application/json': components['schemas']['authentication-token'] } } - 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. + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` */ - 'gitignore/get-template': { + 'enterprise-admin/create-remove-token-for-enterprise': { parameters: { path: { - name: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['gitignore-template'] + 'application/json': components['schemas']['authentication-token'] } } - 304: components['responses']['not_modified'] } } /** - * List repositories that an app installation can access. + * Gets a specific self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-repos-accessible-to-installation': { + 'enterprise-admin/get-self-hosted-runner-for-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** 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: { - headers: {} content: { - 'application/json': { - total_count: number - repositories: components['schemas']['repository'][] - /** @example selected */ - repository_selection?: string - } + 'application/json': components['schemas']['runner'] } } - 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. + * 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 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/revoke-installation-access-token': { - parameters: {} + 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } responses: { /** Response */ 204: never } } /** - * 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. - * + * Lists all labels for a self-hosted runner configured in an enterprise. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'issues/list': { + 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { parameters: { - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - collab?: boolean - orgs?: boolean - owned?: boolean - pulls?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 304: components['responses']['not_modified'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'licenses/get-all-commonly-used': { + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { parameters: { - query: { - featured?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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']['license-simple'][] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] } } - 304: components['responses']['not_modified'] } } - 'licenses/get': { + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { parameters: { path: { - license: string + /** 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']['license'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - } - } - 'markdown/render': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: { - 'Content-Length'?: string - } - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The Markdown text to render in HTML. */ - text: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - mode?: 'markdown' | 'gfm' - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - context?: string + /** @description The names of the custom labels to add to the runner. */ + labels: string[] } } } } - /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - 'markdown/render-raw': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'text/html': string - } + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - 304: components['responses']['not_modified'] } - requestBody: { - content: { - 'text/plain': string - 'text/x-markdown': string - } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * 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. + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/get-subscription-plan-for-account': { + 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** - * 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': { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + 'enterprise-admin/get-audit-log': { parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['audit-log-event'][] } } - 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. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ - 'apps/list-accounts-for-plan': { + 'secret-scanning/list-alerts-for-enterprise': { parameters: { path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } 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) */ + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] } } responses: { @@ -21055,47 +20692,48 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': components['schemas']['organization-secret-scanning-alert'][] } } - 401: components['responses']['requires_authentication'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * 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. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - 'apps/get-subscription-plan-for-account-stubbed': { + 'billing/get-github-advanced-security-billing-ghe': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Success */ 200: { content: { - 'application/json': components['schemas']['marketplace-purchase'] + 'application/json': components['schemas']['advanced-security-active-committers'] } } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: unknown + 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * 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': { + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21104,31 +20742,46 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['event'][] } } - 401: components['responses']['requires_authentication'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 503: components['responses']['service_unavailable'] } } /** - * 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 Enterprise Server 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 Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. * - * 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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ - 'apps/list-accounts-for-plan-stubbed': { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + '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: { - /** 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21139,37 +20792,73 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': components['schemas']['base-gist'][] } } - 401: components['responses']['requires_authentication'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * Allows you to add a new gist with one or more files. * - * **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. + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ - 'meta/get': { + 'gists/create': { parameters: {} responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['api-overview'] + 'application/json': components['schemas']['gist-simple'] } } 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string + } + } + public?: boolean | ('true' | 'false') + } + } } } - 'activity/list-public-events-for-repo-network': { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } query: { - /** Results per page (max 100) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21178,29 +20867,23 @@ export type operations = { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['base-gist'][] } } - 301: components['responses']['moved_permanently'] 304: components['responses']['not_modified'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** List all notifications for the current user, sorted by most recently updated. */ - 'activity/list-notifications-for-authenticated-user': { + /** List the authenticated user's starred gists: */ + 'gists/list-starred': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21211,186 +20894,229 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['base-gist'][] } } 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: {} + 'gists/get': { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - } + 'application/json': components['schemas']['gist-simple'] } } - /** Reset Content */ - 205: unknown 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. - */ - last_read_at?: string - /** @description Whether the notification has been read. */ - read?: boolean - } - } + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - 'activity/get-thread': { + 'gists/delete': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread'] - } - } + 204: never 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - 'activity/mark-thread-as-read': { + /** Allows you to update a gist's description and to update, delete, or 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: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: { [key: string]: unknown } } + } | null + } } } - /** - * 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': { + 'gists/list-comments': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-subscription'] + 'application/json': components['schemas']['gist-comment'][] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/create-comment': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['thread-subscription'] + 'application/json': components['schemas']['gist-comment'] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { /** - * @description Whether to block all notifications from a thread. - * @default false + * @description The comment text. + * @example Body of the attachment */ - ignored?: boolean + body: string } } } } - /** 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': { + 'gists/get-comment': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + 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: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Get the octocat as ASCII art */ - 'meta/get-octocat': { + 'gists/update-comment': { parameters: { - query: { - /** The words to show in Octocat's speech bubble */ - s?: string + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/octocat-stream': string + 'application/json': components['schemas']['gist-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string } } } } - /** - * 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': { + 'gists/list-commits': { parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - since?: components['parameters']['since-org'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { @@ -21400,271 +21126,176 @@ export type operations = { Link?: string } content: { - 'application/json': components['schemas']['organization-simple'][] + 'application/json': components['schemas']['gist-commit'][] } } 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - 'orgs/list-custom-roles': { + 'gists/list-forks': { parameters: { path: { - organization_id: string + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response - list of custom role names */ + /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of custom roles in this organization - * @example 3 - */ - total_count?: number - custom_roles?: components['schemas']['organization-custom-repository-role'][] - } + 'application/json': components['schemas']['gist-simple'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/list-linked-external-idp-groups-to-team-for-org': { + 'gists/fork': { parameters: { path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['external-groups'] + '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'] } } - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - 'orgs/get': { + 'gists/check-is-starred': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Response */ - 200: { + /** Response if gist is starred */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + 404: { content: { - 'application/json': components['schemas']['organization-full'] + 'application/json': { [key: string]: unknown } } } - 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': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'gists/star': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-full'] - } - } - 409: components['responses']['conflict'] - /** Validation failed */ - 422: { - content: { - 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] - } - } + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string - /** @description The company name. */ - company?: string - /** @description The publicly visible email address. */ - email?: string - /** @description The Twitter username of the company. */ - twitter_username?: string - /** @description The location. */ - location?: string - /** @description The shorthand name of the company. */ - name?: string - /** @description The description of the company. */ - description?: string - /** @description Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_repositories?: boolean - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_public_pages?: boolean - /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false - */ - members_can_fork_private_repositories?: boolean - /** @example "http://github.blog" */ - blog?: string - } + } + 'gists/unstar': { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } } - /** - * 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': { + 'gists/get-revision': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + sha: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-organization-permissions'] + '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/enterprise-server@3.6/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'] } } /** - * 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. + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ - 'actions/set-github-actions-permissions-organization': { + 'gitignore/get-template': { parameters: { path: { - org: components['parameters']['org'] + name: string } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_repositories: components['schemas']['enabled-repositories'] - allowed_actions?: components['schemas']['allowed-actions'] + 200: { + content: { + 'application/json': components['schemas']['gitignore-template'] } } + 304: components['responses']['not_modified'] } } /** - * 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)." + * List repositories that an app installation can access. * - * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/list-selected-repositories-enabled-github-actions-organization': { + 'apps/list-repos-accessible-to-installation': { parameters: { - path: { - org: components['parameters']['org'] - } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21673,175 +21304,196 @@ export type operations = { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number repositories: components['schemas']['repository'][] + /** @example selected */ + repository_selection?: string } } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * 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)." + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. * - * 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. + * 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/set-selected-repositories-enabled-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } + 'apps/revoke-installation-access-token': { + parameters: {} responses: { /** Response */ 204: never } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[] - } - } - } } /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * 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. * - * 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. + * + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'actions/enable-selected-repository-github-actions-organization': { + 'issues/list': { parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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 + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + 'licenses/get-all-commonly-used': { parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + query: { + featured?: boolean + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['license-simple'][] + } + } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'licenses/get': { parameters: { path: { - org: components['parameters']['org'] + license: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': components['schemas']['license'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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'] - } - } + 'markdown/render': { + parameters: {} responses: { /** Response */ - 204: never + 200: { + headers: { + 'Content-Length'?: string + } + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] } requestBody: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': { + /** @description The Markdown text to render in HTML. */ + text: string + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: 'markdown' | 'gfm' + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string + } } } } - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } + /** 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: { - 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + 'text/html': string } } + 304: components['responses']['not_modified'] } - } - /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] + requestBody: { + content: { + 'text/plain': string + 'text/x-markdown': string } } + } + 'meta/get': { + parameters: {} responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + 200: { + content: { + 'application/json': components['schemas']['api-overview'] + } } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'activity/list-public-events-for-repo-network': { parameters: { path: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21851,372 +21503,416 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-org'][] - } + 'application/json': components['schemas']['event'][] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + /** List all notifications for the current user, sorted by most recently updated. */ + 'activity/list-notifications-for-authenticated-user': { parameters: { - path: { - org: components['parameters']['org'] + 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'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 50). */ + per_page?: number } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['runner-groups-org'] + '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" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-notifications-as-read': { + parameters: {} + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + } } } + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] /** - * @description Whether the runner group can be used by `public` repositories. - * @default false + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */ - allows_public_repositories?: boolean + last_read_at?: string + /** @description Whether the notification has been read. */ + read?: boolean } } } } - /** - * 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': { + /** Gets information about a notification thread. */ + 'activity/get-thread': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['thread'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ + 'activity/mark-thread-as-read': { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * 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. + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - 'actions/delete-self-hosted-runner-group-from-org': { + 'activity/get-thread-subscription-for-authenticated-user': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['thread-subscription'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * 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)." + * 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**. * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * 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. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ - 'actions/update-self-hosted-runner-group-for-org': { + 'activity/set-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['thread-subscription'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - /** - * @description Whether the runner group can be used by `public` repositories. + * @description Whether to block all notifications from a thread. * @default false */ - allows_public_repositories?: boolean + ignored?: boolean } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + 'activity/delete-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * 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': { + /** Get the octocat as ASCII art */ + 'meta/get-octocat': { parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + query: { + /** The words to show in Octocat's speech bubble */ + s?: string } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: number[] + 200: { + content: { + 'application/octocat-stream': string } } } } /** - * 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)." + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ - 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { + 'orgs/list': { 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'] + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components['parameters']['since-org'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 204: never + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + 304: components['responses']['not_modified'] } } /** - * 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)." - * + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. * - * 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)." + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + 'orgs/list-custom-roles': { 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'] + /** The unique identifier of the organization. */ + organization_id: string } } responses: { - /** Response */ - 204: never + /** Response - list of custom role names */ + 200: { + content: { + 'application/json': { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number + custom_roles?: components['schemas']['organization-custom-repository-role'][] + } + } + } } } /** - * 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. + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." */ - 'actions/list-self-hosted-runners-in-group-for-org': { + 'orgs/get': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'][] - } + 'application/json': components['schemas']['organization-full'] } } + 404: components['responses']['not_found'] } } /** - * 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. + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ - 'actions/set-self-hosted-runners-in-group-for-org': { + 'orgs/update': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 409: components['responses']['conflict'] + /** Validation failed */ + 422: { + content: { + 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** @description Billing email address. This address is not publicized. */ + billing_email?: string + /** @description The company name. */ + company?: string + /** @description The publicly visible email address. */ + email?: string + /** @description The Twitter username of the company. */ + twitter_username?: string + /** @description The location. */ + location?: string + /** @description The shorthand name of the company. */ + name?: string + /** @description The description of the company. */ + description?: string + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean + /** @description 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+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean + /** + * @description Specifies which types of repositories non-admin organization members can create. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean + /** @example "http://github.blog" */ + blog?: string } } } } /** - * 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. + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/add-self-hosted-runner-to-group-for-org': { + 'actions/get-actions-cache-usage-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-self-hosted-runner-from-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } } } - responses: { - /** Response */ - 204: never - } } /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/list-self-hosted-runners-for-org': { + 'actions/get-actions-cache-usage-by-repo-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22229,20 +21925,21 @@ export type operations = { content: { 'application/json': { total_count: number - runners: components['schemas']['runner'][] + repository_cache_usages: components['schemas']['actions-cache-usage-by-repository'][] } } } } } /** - * Lists binaries for the runner application that you can download and run. + * 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. + * 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-runner-applications-for-org': { + 'actions/get-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22250,101 +21947,105 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-application'][] + 'application/json': components['schemas']['actions-organization-permissions'] } } } } /** - * 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 + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * 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. * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` + * 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/create-registration-token-for-org': { + 'actions/set-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_repositories: components['schemas']['enabled-repositories'] + allowed_actions?: components['schemas']['allowed-actions'] } } } } /** - * 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. + * 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)." * - * ``` - * ./config.sh remove --token TOKEN - * ``` + * 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/create-remove-token-for-org': { + 'actions/list-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': { + total_count: number + repositories: components['schemas']['repository'][] + } } } } } /** - * Gets a specific self-hosted runner configured in an 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. + * 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-self-hosted-runner-for-org': { + 'actions/set-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[] } } } } /** - * 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. + * 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. + * 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/delete-self-hosted-runner-from-org': { + 'actions/enable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { @@ -22353,346 +22054,434 @@ export type operations = { } } /** - * Lists all labels for a self-hosted runner configured in an 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. + * 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-labels-for-self-hosted-runner-for-org': { + 'actions/disable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 204: never } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. + * 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. + * 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-custom-labels-for-self-hosted-runner-for-org': { + 'actions/get-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] } } } } /** - * Add custom labels to a self-hosted runner configured in an 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)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/add-custom-labels-to-self-hosted-runner-for-org': { + 'actions/set-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } + 'application/json': components['schemas']['selected-actions'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-all-custom-labels-from-self-hosted-runner-for-org': { + 'actions/get-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-custom-label-from-self-hosted-runner-for-org': { + 'actions/set-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components['parameters']['visible-to-repository'] } } responses: { /** Response */ 200: { - headers: {} content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-actions-secret'][] + runner_groups: components['schemas']['runner-groups-org'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-actions-secret'] + 'application/json': components['schemas']['runner-groups-org'] } } } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/create-or-update-org-secret': { + 'actions/delete-self-hosted-runner-group-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + 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']['empty-object'] + 'application/json': components['schemas']['runner-groups-org'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + /** @description Name of the runner group. */ + name: string /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. * @enum {string} */ - visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] + visibility?: 'selected' | 'all' | 'private' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 204: never } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[] + } + } + } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - repositories: components['schemas']['minimal-repository'][] + runners: components['schemas']['runner'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { @@ -22702,96 +22491,92 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/add-selected-repo-to-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** 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: { - /** No Content when repository was added to the selected list */ + /** Response */ 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/remove-selected-repo-from-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response when repository was removed from the selected list */ + /** Response */ 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown } } /** - * 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)." + * Lists all self-hosted runners configured in an organization. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/get-audit-log': { + 'actions/list-self-hosted-runners-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } } } - /** List the users blocked by an organization. */ - 'orgs/list-blocked-users': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22799,151 +22584,243 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['runner-application'][] } } - 415: components['responses']['preview_header_missing'] } } - 'orgs/check-blocked-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { - /** If the user is blocked: */ - 204: never - /** If the user is not blocked: */ - 404: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['authentication-token'] } } } } - 'orgs/block-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } } } - 'orgs/unblock-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } } } /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * 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. * - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'code-scanning/list-alerts-for-org': { + 'actions/delete-self-hosted-runner-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - sort?: 'created' | 'updated' + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['code-scanning-organization-alert-items'][] - } + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - 403: components['responses']['code_scanning_forbidden_read'] + } + responses: { + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/list-saml-sso-authorizations': { + 'actions/set-custom-labels-for-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - login?: string + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + 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']['credential-authorization'][] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] } } } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/remove-saml-sso-authorization': { + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - credential_id: number + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels_readonly'] 404: components['responses']['not_found'] } } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-org-secrets': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Lists 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22956,16 +22833,17 @@ export type operations = { content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-dependabot-secret'][] + secrets: components['schemas']['organization-actions-secret'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-public-key': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22973,17 +22851,18 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + '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 `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -22991,7 +22870,7 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-dependabot-secret'] + 'application/json': components['schemas']['organization-actions-secret'] } } } @@ -22999,8 +22878,8 @@ export type operations = { /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. + * 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 * @@ -23073,11 +22952,12 @@ export type operations = { * puts Base64.strict_encode64(encrypted_secret) * ``` */ - 'dependabot/create-or-update-org-secret': { + 'actions/create-or-update-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23094,30 +22974,28 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string /** - * @description 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. + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. * @enum {string} */ visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] + /** @description 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/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[] } } } } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/delete-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23126,18 +23004,19 @@ export type operations = { 204: never } } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-selected-repos-for-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } query: { /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -23153,12 +23032,13 @@ export type operations = { } } } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/set-selected-repos-for-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23169,18 +23049,19 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ selected_repository_ids: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/add-selected-repo-to-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23192,12 +23073,13 @@ export type operations = { 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/remove-selected-repo-from-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23209,13 +23091,45 @@ export type operations = { 409: unknown } } - 'activity/list-public-org-events': { - parameters: { - path: { - org: components['parameters']['org'] + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." + */ + 'orgs/get-audit-log': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23225,72 +23139,345 @@ export type operations = { /** Response */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['audit-log-event'][] } } } } /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'teams/external-idp-group-info-for-org': { + 'code-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** group_id parameter */ - group_id: components['parameters']['group-id'] + } + 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'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['external-group'] + 'application/json': components['schemas']['code-scanning-organization-alert-items'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-org-secrets': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + 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-dependabot-secret'][] + } + } + } + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-public-key': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-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 `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-dependabot-secret'] } } } } /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/list-external-idp-groups-for-org': { + 'dependabot/create-or-update-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: string[] + } + } + } + } + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/delete-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } query: { - /** Results per page (max 100) */ + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list to groups containing the text in the group name */ - display_name?: string } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['external-groups'] + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/set-selected-repos-for-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] } } } } - /** 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': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/add-selected-repo-to-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown + } + } + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/remove-selected-repo-from-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown + } + } + 'activity/list-public-org-events': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23299,21 +23486,75 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': components['schemas']['event'][] + } + } + } + } + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/external-idp-group-info-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The unique identifier of the group. */ + group_id: components['parameters']['group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-group'] + } + } + } + } + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-external-idp-groups-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page token */ + page?: number + /** Limits the list to groups containing the text in the group name */ + display_name?: string + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['external-groups'] } } - 404: components['responses']['not_found'] } } 'orgs/list-webhooks': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23334,6 +23575,7 @@ export type operations = { 'orgs/create-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23355,7 +23597,7 @@ export type operations = { 'application/json': { /** @description Must be passed as "web". */ name: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-hook-config-params). */ config: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23367,7 +23609,7 @@ export type operations = { password?: string } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23386,7 +23628,9 @@ export type operations = { 'orgs/get-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23403,7 +23647,9 @@ export type operations = { 'orgs/delete-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23417,7 +23663,9 @@ export type operations = { 'orgs/update-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23434,7 +23682,7 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-hook-config-params). */ config?: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23442,7 +23690,7 @@ export type operations = { insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23467,7 +23715,9 @@ export type operations = { 'orgs/get-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23488,7 +23738,9 @@ export type operations = { 'orgs/update-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23515,11 +23767,13 @@ export type operations = { 'orgs/list-webhook-deliveries': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor?: components['parameters']['cursor'] @@ -23540,7 +23794,9 @@ export type operations = { 'orgs/get-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23560,7 +23816,9 @@ export type operations = { 'orgs/redeliver-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23571,11 +23829,13 @@ export type operations = { 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ 'orgs/ping-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23588,11 +23848,12 @@ export type operations = { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-org-installation': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23609,10 +23870,11 @@ export type operations = { 'orgs/list-app-installations': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23631,203 +23893,34 @@ export type operations = { } } } - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - 'interactions/set-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - 'interactions/remove-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - 'orgs/list-pending-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'orgs/create-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['organization-invitation'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - invitee_id?: number - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - email?: string - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: number[] - } - } - } - } - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - 'orgs/cancel-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - 'orgs/list-invitation-teams': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] - } - } /** * List issues in an organization assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23848,23 +23941,15 @@ export type operations = { 'orgs/list-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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 members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ 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. - */ + /** Filter members returned by their role. */ role?: 'all' | 'admin' | 'member' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23878,8 +23963,6 @@ export type operations = { 'application/json': components['schemas']['simple-user'][] } } - /** Response if requester is not an organization member */ - 302: never 422: components['responses']['validation_failed'] } } @@ -23887,7 +23970,9 @@ export type operations = { 'orgs/check-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23904,7 +23989,9 @@ export type operations = { 'orgs/remove-member': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23918,7 +24005,9 @@ export type operations = { 'orgs/get-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23936,7 +24025,7 @@ export type operations = { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -23947,7 +24036,9 @@ export type operations = { 'orgs/set-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23984,7 +24075,9 @@ export type operations = { 'orgs/remove-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23999,10 +24092,11 @@ export type operations = { 'migrations/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24024,6 +24118,7 @@ export type operations = { 'migrations/start-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24048,6 +24143,16 @@ export type operations = { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean /** * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). * @default false @@ -24066,6 +24171,13 @@ export type operations = { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ exclude?: 'repositories'[] } } @@ -24084,8 +24196,9 @@ export type operations = { 'migrations/get-status-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { @@ -24108,96 +24221,20 @@ export type operations = { 404: components['responses']['not_found'] } } - /** Fetches the URL to a migration archive. */ - 'migrations/download-archive-for-org': { + /** List all users who are outside collaborators of an organization. */ + 'orgs/list-outside-collaborators': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 302: never - 404: components['responses']['not_found'] - } - } - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - 'migrations/delete-archive-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - 'migrations/unlock-repo-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** List all the repositories for this organization migration. */ - 'migrations/list-repos-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** List all users who are outside collaborators of an organization. */ - 'orgs/list-outside-collaborators': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. - */ - filter?: '2fa_disabled' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + } + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: '2fa_disabled' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { @@ -24210,11 +24247,13 @@ export type operations = { } } } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 'orgs/convert-member-to-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24227,16 +24266,29 @@ export type operations = { } /** User was converted */ 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 403: unknown 404: components['responses']['not_found'] } + requestBody: { + content: { + 'application/json': { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean + } + } + } } /** Removing a user from this list will remove them from all the organization's repositories. */ 'orgs/remove-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24254,249 +24306,110 @@ export type operations = { } } } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-organization': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-org': { parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The sort order for the response collection. */ + sort?: 'created' | 'updated' | 'name' + } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'][] + 'application/json': components['schemas']['org-pre-receive-hook'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-organization': { + 'enterprise-admin/get-pre-receive-hook-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-org': { + /** Removes any overrides for this hook at the org level for this org. */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'][] + 'application/json': components['schemas']['org-pre-receive-hook'] } } - 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': { + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + requestBody: { + content: { + 'application/json': { + /** @description The state of enforcement for the hook on this repository. */ + enforcement?: string + /** @description Whether repositories can override enforcement. */ + allow_downstream_configuration?: boolean + } } } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } } /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24513,10 +24426,11 @@ export type operations = { 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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24548,10 +24462,11 @@ export type operations = { 'orgs/list-public-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24570,7 +24485,9 @@ export type operations = { 'orgs/check-public-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24584,12 +24501,14 @@ export type operations = { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'orgs/set-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24602,7 +24521,9 @@ export type operations = { 'orgs/remove-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24615,16 +24536,17 @@ export type operations = { 'repos/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24645,7 +24567,7 @@ export type operations = { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -24653,6 +24575,7 @@ export type operations = { 'repos/create-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24744,6 +24667,46 @@ export type operations = { * @default false */ delete_branch_on_merge?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' } } } @@ -24751,12 +24714,14 @@ export type operations = { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ 'secret-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { @@ -24764,15 +24729,19 @@ export type operations = { state?: components['parameters']['secret-scanning-alert-state'] /** * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ secret_type?: components['parameters']['secret-scanning-alert-secret-type'] /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -24789,39 +24758,22 @@ export type operations = { } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. + * Gets the GitHub Advanced Security active committers for an organization per repository. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-actions-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ 'billing/get-github-advanced-security-billing-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24837,87 +24789,15 @@ export type operations = { 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-packages-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-shared-storage-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - 'teams/list-idp-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: string - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } /** Lists all teams in an organization that are visible to the authenticated user. */ 'teams/list': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24942,6 +24822,7 @@ export type operations = { 'teams/create': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24979,29 +24860,30 @@ export type operations = { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ permission?: 'pull' | 'push' /** @description The ID of a team to set as the parent team. */ parent_team_id?: number + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." */ + ldap_dn?: string } } } } /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25025,8 +24907,9 @@ export type operations = { 'teams/delete-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25043,18 +24926,28 @@ export type operations = { 'teams/update-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ 201: { content: { 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { @@ -25074,10 +24967,7 @@ export type operations = { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ @@ -25089,21 +24979,22 @@ export type operations = { } } /** - * 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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25122,17 +25013,18 @@ export type operations = { } } /** - * 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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ 'teams/create-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25161,16 +25053,18 @@ export type operations = { } } /** - * 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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25184,16 +25078,18 @@ export type operations = { } } /** - * 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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25203,16 +25099,18 @@ export type operations = { } } /** - * 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/). + * 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25236,22 +25134,24 @@ export type operations = { } } /** - * 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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25268,18 +25168,20 @@ export type operations = { } } /** - * 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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ 'teams/create-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25301,17 +25203,20 @@ export type operations = { } } /** - * 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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25325,17 +25230,20 @@ export type operations = { } } /** - * 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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25345,17 +25253,20 @@ export type operations = { } } /** - * 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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25377,23 +25288,26 @@ export type operations = { } } /** - * 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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25410,22 +25324,25 @@ export type operations = { } } /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ 'reactions/create-for-team-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } responses: { - /** Response */ + /** Response when the reaction type has already been added to this team discussion comment */ 200: { content: { 'application/json': components['schemas']['reaction'] @@ -25442,7 +25359,7 @@ export type operations = { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25453,16 +25370,20 @@ export type operations = { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion-comment': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25472,22 +25393,24 @@ export type operations = { } } /** - * 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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25504,16 +25427,18 @@ export type operations = { } } /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ 'reactions/create-for-team-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25535,7 +25460,7 @@ export type operations = { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25546,15 +25471,18 @@ export type operations = { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25563,16 +25491,40 @@ export type operations = { 204: never } } + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-linked-external-idp-groups-to-team-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-groups'] + } + } + } + } /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'teams/unlink-external-idp-group-from-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25584,13 +25536,14 @@ export type operations = { /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ 'teams/link-external-idp-group-to-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25614,35 +25567,6 @@ export type operations = { } } } - /** - * 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. * @@ -25651,19 +25575,15 @@ export type operations = { 'teams/list-members-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ 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. - */ + /** Filters members returned by their role in the team. */ role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25689,14 +25609,16 @@ export type operations = { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ 'teams/get-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25716,7 +25638,7 @@ export type operations = { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -25727,9 +25649,11 @@ export type operations = { 'teams/add-or-update-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25749,9 +25673,7 @@ export type operations = { content: { 'application/json': { /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @description The role that this user should have in the team. * @default member * @enum {string} */ @@ -25765,16 +25687,18 @@ export type operations = { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ 'teams/remove-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25793,12 +25717,13 @@ export type operations = { 'teams/list-projects-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25822,9 +25747,11 @@ export type operations = { 'teams/check-permissions-for-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25847,9 +25774,11 @@ export type operations = { 'teams/add-or-update-project-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25870,11 +25799,7 @@ export type operations = { content: { 'application/json': { /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." * @enum {string} */ permission?: 'read' | 'write' | 'admin' @@ -25890,9 +25815,11 @@ export type operations = { 'teams/remove-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25909,12 +25836,13 @@ export type operations = { 'teams/list-repos-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25933,7 +25861,7 @@ export type operations = { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -25942,10 +25870,13 @@ export type operations = { 'teams/check-permissions-for-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -25963,7 +25894,7 @@ export type operations = { } } /** - * 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)." + * 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/enterprise-server@3.6/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}`. * @@ -25972,10 +25903,13 @@ export type operations = { 'teams/add-or-update-repo-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -25987,19 +25921,10 @@ export type operations = { content: { 'application/json': { /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @description The permission to grant the team on 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. * @default push - * @enum {string} */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + permission?: string } } } @@ -26012,10 +25937,13 @@ export type operations = { 'teams/remove-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26024,69 +25952,6 @@ export type operations = { 204: never } } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/list-idp-groups-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/create-or-update-idp-group-connections-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups?: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - }[] - } - } - } - } /** * Lists the child teams of the team specified by `{team_slug}`. * @@ -26095,12 +25960,13 @@ export type operations = { 'teams/list-child-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26119,7 +25985,7 @@ export type operations = { 'projects/get-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26139,7 +26005,7 @@ export type operations = { 'projects/delete-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26164,7 +26030,7 @@ export type operations = { 'projects/update-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26201,7 +26067,7 @@ export type operations = { 'projects/move-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26265,7 +26131,7 @@ export type operations = { 'projects/get-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26285,7 +26151,7 @@ export type operations = { 'projects/delete-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26300,7 +26166,7 @@ export type operations = { 'projects/update-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26330,13 +26196,13 @@ export type operations = { 'projects/list-cards': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ 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`. */ + /** Filters the project cards that are returned by the card's state. */ archived_state?: 'all' | 'archived' | 'not_archived' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26358,7 +26224,7 @@ export type operations = { 'projects/create-card': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26421,7 +26287,7 @@ export type operations = { 'projects/move-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26453,6 +26319,7 @@ export type operations = { 'projects/get': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26472,6 +26339,7 @@ export type operations = { 'projects/delete': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26498,6 +26366,7 @@ export type operations = { 'projects/update': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26558,17 +26427,13 @@ export type operations = { 'projects/list-collaborators': { parameters: { path: { + /** The unique identifier of the project. */ 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. - */ + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26593,7 +26458,9 @@ export type operations = { 'projects/add-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26624,7 +26491,9 @@ export type operations = { 'projects/remove-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26642,7 +26511,9 @@ export type operations = { 'projects/get-permission-for-user': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26663,10 +26534,11 @@ export type operations = { 'projects/list-columns': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26688,6 +26560,7 @@ export type operations = { 'projects/create-column': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26734,31 +26607,13 @@ export type operations = { 404: components['responses']['not_found'] } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - 'reactions/delete-legacy': { - parameters: { - path: { - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - } - } /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ 'repos/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26783,7 +26638,9 @@ export type operations = { 'repos/delete': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26803,11 +26660,13 @@ export type operations = { 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ 'repos/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26834,7 +26693,7 @@ export type operations = { homepage?: string /** * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. * @default false */ private?: boolean @@ -26843,7 +26702,16 @@ export type operations = { * @enum {string} */ visibility?: 'public' | 'private' | 'internal' - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ security_and_analysis?: { /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ advanced_security?: { @@ -26855,6 +26723,11 @@ export type operations = { /** @description Can be `enabled` or `disabled`. */ status?: string } + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } } | null /** * @description Either `true` to enable issues for this repository or `false` to disable them. @@ -26903,6 +26776,51 @@ export type operations = { * @default false */ delete_branch_on_merge?: boolean + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. * @default false @@ -26913,6 +26831,11 @@ export type operations = { * @default false */ allow_forking?: boolean + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean } } } @@ -26921,11 +26844,13 @@ export type operations = { 'actions/list-artifacts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26948,9 +26873,11 @@ export type operations = { 'actions/get-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -26967,9 +26894,11 @@ export type operations = { 'actions/delete-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -26987,9 +26916,11 @@ export type operations = { 'actions/download-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] archive_format: string } @@ -26997,15 +26928,88 @@ export type operations = { responses: { /** Response */ 302: never + 410: components['responses']['gone'] + } + } + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-by-repository'] + } + } + } + } + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } + } + } + } + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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/set-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27027,9 +27031,11 @@ export type operations = { 'actions/download-job-logs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27038,16 +27044,50 @@ export type operations = { 302: never } } + /** Re-run a job and its dependent jobs in 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/re-run-job-for-workflow-run': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } + } /** * 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. + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27070,7 +27110,9 @@ export type operations = { 'actions/set-github-actions-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27087,6 +27129,57 @@ export type operations = { } } } + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/get-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } + } + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/set-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } /** * 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)." * @@ -27095,7 +27188,9 @@ export type operations = { 'actions/get-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27120,7 +27215,9 @@ export type operations = { 'actions/set-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27134,15 +27231,70 @@ export type operations = { } } } + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/get-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/set-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } + } + } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27169,7 +27321,9 @@ export type operations = { 'actions/list-runner-applications-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27197,7 +27351,9 @@ export type operations = { 'actions/create-registration-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27225,7 +27381,9 @@ export type operations = { 'actions/create-remove-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27247,7 +27405,9 @@ export type operations = { 'actions/get-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27271,7 +27431,9 @@ export type operations = { 'actions/delete-self-hosted-runner-from-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27291,7 +27453,9 @@ export type operations = { 'actions/list-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27312,7 +27476,9 @@ export type operations = { 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27341,7 +27507,9 @@ export type operations = { 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27371,7 +27539,9 @@ export type operations = { 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27395,7 +27565,9 @@ export type operations = { 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27410,14 +27582,16 @@ export type operations = { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -27427,13 +27601,13 @@ export type operations = { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -27458,9 +27632,11 @@ export type operations = { 'actions/get-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { @@ -27485,9 +27661,11 @@ export type operations = { 'actions/delete-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27500,9 +27678,11 @@ export type operations = { 'actions/get-reviews-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27515,42 +27695,19 @@ export type operations = { } } } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/approve-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ 'actions/list-workflow-run-artifacts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27578,9 +27735,11 @@ export type operations = { 'actions/get-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27599,19 +27758,21 @@ export type operations = { } } } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27640,9 +27801,11 @@ export type operations = { 'actions/download-workflow-run-attempt-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27657,9 +27820,11 @@ export type operations = { 'actions/cancel-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27667,28 +27832,27 @@ export type operations = { /** Response */ 202: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } + 409: components['responses']['conflict'] } } - /** 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier 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. - */ + /** Filters jobs by their `completed_at` timestamp. `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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27716,9 +27880,11 @@ export type operations = { 'actions/download-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27731,9 +27897,11 @@ export type operations = { 'actions/delete-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27752,9 +27920,11 @@ export type operations = { 'actions/get-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27770,14 +27940,16 @@ export type operations = { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ 'actions/review-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27801,7 +27973,7 @@ export type operations = { */ environment_ids: number[] /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` + * @description Whether to approve or reject deployment to the specified environments. * @example approved * @enum {string} */ @@ -27819,9 +27991,11 @@ export type operations = { 'actions/re-run-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27829,43 +28003,65 @@ export type operations = { /** Response */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-run-usage': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + 'actions/re-run-workflow-failed-jobs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['workflow-run-usage'] + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27888,7 +28084,9 @@ export type operations = { 'actions/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27905,9 +28103,11 @@ export type operations = { 'actions/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28000,9 +28200,11 @@ export type operations = { 'actions/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28010,7 +28212,7 @@ export type operations = { /** Response when creating a secret */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } /** Response when updating a secret */ @@ -28019,7 +28221,7 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string @@ -28031,9 +28233,11 @@ export type operations = { 'actions/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28046,11 +28250,13 @@ export type operations = { 'actions/list-repo-workflows': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28073,7 +28279,9 @@ export type operations = { 'actions/get-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28096,7 +28304,9 @@ export type operations = { 'actions/disable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28117,7 +28327,9 @@ export type operations = { 'actions/create-workflow-dispatch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28146,7 +28358,9 @@ export type operations = { 'actions/enable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28158,14 +28372,16 @@ export type operations = { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28177,13 +28393,13 @@ export type operations = { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -28204,38 +28420,17 @@ export type operations = { } } } - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-usage': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-usage'] - } - } - } - } /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ 'issues/list-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28262,7 +28457,9 @@ export type operations = { 'issues/check-user-can-be-assigned': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] assignee: string } @@ -28286,7 +28483,9 @@ export type operations = { 'repos/list-autolinks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -28307,7 +28506,9 @@ export type operations = { 'repos/create-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -28328,8 +28529,13 @@ export type operations = { 'application/json': { /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ key_prefix: string - /** @description The URL must contain for the reference number. */ + /** @description The URL must contain `` for the reference number. */ url_template: string + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean } } } @@ -28342,9 +28548,11 @@ export type operations = { 'repos/get-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28366,9 +28574,11 @@ export type operations = { 'repos/delete-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28378,42 +28588,18 @@ export type operations = { 404: components['responses']['not_found'] } } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/enable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/disable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } 'repos/list-branches': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28433,7 +28619,9 @@ export type operations = { 'repos/get-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28448,14 +28636,15 @@ export type operations = { } 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] } } /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'repos/get-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28483,7 +28672,9 @@ export type operations = { 'repos/update-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28524,12 +28715,14 @@ export type operations = { enforce_admins: boolean | null /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ required_pull_request_reviews: { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28537,13 +28730,15 @@ export type operations = { require_code_owner_reviews?: boolean /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } | null /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ restrictions: { @@ -28560,6 +28755,8 @@ export type operations = { allow_force_pushes?: boolean | null /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ allow_deletions?: boolean + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ required_conversation_resolution?: boolean } @@ -28570,7 +28767,9 @@ export type operations = { 'repos/delete-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28586,7 +28785,9 @@ export type operations = { 'repos/get-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28609,7 +28810,9 @@ export type operations = { 'repos/set-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28632,7 +28835,9 @@ export type operations = { 'repos/delete-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28648,7 +28853,9 @@ export type operations = { 'repos/get-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28667,7 +28874,9 @@ export type operations = { 'repos/delete-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28689,7 +28898,9 @@ export type operations = { 'repos/update-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28707,12 +28918,14 @@ export type operations = { requestBody: { content: { 'application/json': { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28720,13 +28933,15 @@ export type operations = { require_code_owner_reviews?: boolean /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } } } @@ -28741,7 +28956,9 @@ export type operations = { 'repos/get-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28765,7 +28982,9 @@ export type operations = { 'repos/create-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28789,7 +29008,9 @@ export type operations = { 'repos/delete-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28805,7 +29026,9 @@ export type operations = { 'repos/get-status-checks-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28825,7 +29048,9 @@ export type operations = { 'repos/remove-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28844,7 +29069,9 @@ export type operations = { 'repos/update-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28885,7 +29112,9 @@ export type operations = { 'repos/get-all-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28905,7 +29134,9 @@ export type operations = { 'repos/set-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28925,7 +29156,7 @@ export type operations = { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28936,7 +29167,9 @@ export type operations = { 'repos/add-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28957,7 +29190,7 @@ export type operations = { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28968,7 +29201,9 @@ export type operations = { 'repos/remove-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28988,7 +29223,7 @@ export type operations = { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -29005,7 +29240,9 @@ export type operations = { 'repos/get-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29029,7 +29266,9 @@ export type operations = { 'repos/delete-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29048,7 +29287,9 @@ export type operations = { 'repos/get-apps-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29076,7 +29317,9 @@ export type operations = { 'repos/set-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29114,7 +29357,9 @@ export type operations = { 'repos/add-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29152,7 +29397,9 @@ export type operations = { 'repos/remove-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29186,7 +29433,9 @@ export type operations = { 'repos/get-teams-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29214,7 +29463,9 @@ export type operations = { 'repos/set-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29233,7 +29484,7 @@ export type operations = { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29252,7 +29503,9 @@ export type operations = { 'repos/add-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29271,7 +29524,7 @@ export type operations = { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29290,7 +29543,9 @@ export type operations = { 'repos/remove-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29309,7 +29564,7 @@ export type operations = { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29324,7 +29579,9 @@ export type operations = { 'repos/get-users-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29352,7 +29609,9 @@ export type operations = { 'repos/set-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29371,7 +29630,7 @@ export type operations = { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29390,7 +29649,9 @@ export type operations = { 'repos/add-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29409,7 +29670,7 @@ export type operations = { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29428,7 +29689,9 @@ export type operations = { 'repos/remove-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29447,7 +29710,7 @@ export type operations = { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29457,7 +29720,7 @@ export type operations = { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -29474,7 +29737,9 @@ export type operations = { 'repos/rename-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29510,7 +29775,9 @@ export type operations = { 'checks/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -29545,7 +29812,7 @@ export type operations = { /** @description A reference for the run on the integrator's system. */ external_id?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @default queued * @enum {string} */ @@ -29556,7 +29823,7 @@ export type operations = { */ started_at?: string /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29566,15 +29833,15 @@ export type operations = { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object) description. */ output?: { /** @description The title of the check run. */ title: string - /** @description The summary of the check run. This parameter supports Markdown. */ + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ summary: string - /** @description The details of the check run. This parameter supports Markdown. */ + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29587,7 +29854,7 @@ export type operations = { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29598,7 +29865,7 @@ export type operations = { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29608,7 +29875,7 @@ export type operations = { caption?: string }[] } - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string @@ -29629,9 +29896,11 @@ export type operations = { 'checks/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29652,9 +29921,11 @@ export type operations = { 'checks/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29692,12 +29963,12 @@ export type operations = { */ started_at?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @enum {string} */ status?: 'queued' | 'in_progress' | 'completed' /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29707,7 +29978,7 @@ export type operations = { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object-1) description. */ output?: { /** @description **Required**. */ title?: string @@ -29715,7 +29986,7 @@ export type operations = { summary: string /** @description Can contain Markdown. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29728,7 +29999,7 @@ export type operations = { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29739,7 +30010,7 @@ export type operations = { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29749,7 +30020,7 @@ export type operations = { caption?: string }[] } - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string @@ -29766,13 +30037,15 @@ export type operations = { 'checks/list-annotations': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -29789,1774 +30062,163 @@ export type operations = { } } /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ 'checks/rerequest-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ - 403: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - 404: components['responses']['not_found'] - /** Validation error if the check run is not rerequestable */ - 422: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - 'checks/create-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** when the suite already existed */ - 200: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - /** Response when the suite was created */ - 201: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The sha of the head commit. */ - head_sha: string - } - } - } - } - /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - 'checks/set-suites-preferences': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-suite-preference'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - auto_trigger_checks?: { - /** @description The `id` of the GitHub App. */ - app_id: number - /** - * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. - * @default true - */ - setting: boolean - }[] - } - } - } - } - /** - * **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'][] - } - } - } - } - } - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - 'checks/rerequest-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - 'code-scanning/list-alerts-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-items'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - 'code-scanning/get-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - 'code-scanning/update-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - state: components['schemas']['code-scanning-alert-set-state'] - dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] - } - } - } - } - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - 'code-scanning/list-alert-instances': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-instance'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - 'code-scanning/list-recent-analyses': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['schemas']['code-scanning-ref'] - /** Filter analyses belonging to the same SARIF upload. */ - sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - */ - 'code-scanning/get-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json+sarif': string - 'application/json': components['schemas']['code-scanning-analysis'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - 'code-scanning/delete-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - query: { - /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - confirm_delete?: string | null - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis-deletion'] - } - } - 400: components['responses']['bad_request'] - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - 'code-scanning/upload-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - 400: unknown - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - 413: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - ref: components['schemas']['code-scanning-ref'] - sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string - } - } - } - } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'code-scanning/get-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - sarif_id: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-status'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-in-repository-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - } - } - } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/repo-machines-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Required. The location to check for available machines. */ - location: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/list-collaborators': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['collaborator'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/check-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a collaborator */ - 204: never - /** Not Found if user is not a collaborator */ - 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - 'repos/add-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response when a new invitation is created */ - 201: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } - /** Response when person is already a collaborator */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - permissions?: string - } - } - } - } - 'repos/remove-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - 'repos/get-collaborator-permission-level': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** if user has admin permissions */ - 200: { - content: { - 'application/json': components['schemas']['repository-collaborator-permission'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - 'repos/list-commit-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - 'repos/get-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/delete-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - 'repos/update-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment */ - body: string - } - } - } - } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - 'reactions/list-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - 'reactions/create-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - 'reactions/delete-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/list-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - sha?: string - /** Only commits containing this file path will be returned. */ - path?: string - /** GitHub login or email address by which to filter by commit author. */ - author?: string - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - until?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit'][] - } - } - 400: components['responses']['bad_request'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - 'repos/list-branches-for-head-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-short'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - 'repos/list-comments-for-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - /** @description Relative path of the file to comment on. */ - path?: string - /** @description Line index in the diff to comment on. */ - position?: number - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - line?: number - } - } - } - } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - 'repos/list-pull-requests-associated-with-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-simple'][] - } - } - } - } - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/get-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/list-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - app_id?: number - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - check_runs: 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 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'][] - } - } - } - } - } - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - 'repos/get-combined-status-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-commit-status'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - 'repos/list-commit-statuses-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['status'][] - } - } - 301: components['responses']['moved_permanently'] - } - } - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - 'repos/get-community-profile-metrics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['community-profile'] - } - } - } - } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/compare-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - basehead: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comparison'] - } - } - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent - * object format. - * - * **Note**: - * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees - * API](https://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * The response will be an array of objects, one object for each item in the directory. - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value - * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). - * In the next major version of the API, the type will be returned as "submodule". - * - * #### If the content is a symlink - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the - * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific - * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out - * the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the - * github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - 'repos/get-content': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } } responses: { /** Response */ - 200: { + 201: { 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'] + 'application/json': { [key: string]: unknown } + } + } + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + 'application/json': components['schemas']['basic-error'] } } - 302: components['responses']['found'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } } } - /** Creates a new file or replaces an existing file in a repository. */ - 'repos/create-or-update-file-contents': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { - /** Response */ + /** Response when the suite already exists */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - /** Response */ + /** Response when the suite was created */ 201: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The new file content, using Base64 encoding. */ - content: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string - } - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string - } + /** @description The sha of the head commit. */ + head_sha: string } } } } - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - 'repos/delete-file': { + /** 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite-preference'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The blob SHA of the file being replaced. */ - sha: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description object containing information about the committer. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } - /** @description object containing information about the author. */ - author?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean + }[] } } } } /** - * Lists 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. + * **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`. * - * 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. + * 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. */ - 'repos/list-contributors': { + 'checks/get-suite': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { - /** if repository contains content */ + /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['contributor'][] + 'application/json': components['schemas']['check-suite'] } } - /** Response if repository is empty */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/list-repo-secrets': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } query: { - /** Results per page (max 100) */ + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -31569,653 +30231,689 @@ export type operations = { content: { 'application/json': { total_count: number - secrets: components['schemas']['dependabot-secret'][] + check_runs: components['schemas']['check-run'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-public-key': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + 'application/json': { [key: string]: unknown } } } } } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-secret': { + /** + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + 'code-scanning/list-alerts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + } + 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'] + /** The number of 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'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-secret'] + 'application/json': components['schemas']['code-scanning-alert-items'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * **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`. */ - 'dependabot/create-or-update-repo-secret': { + 'code-scanning/get-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + 'application/json': components['schemas']['code-scanning-alert'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/delete-repo-secret': { + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + 'code-scanning/update-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 */ - 204: never + 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'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] + } + } } } - /** Simple filtering of deployments is available via query parameters: */ - 'repos/list-deployments': { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alert-instances': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { - /** The SHA recorded at creation time. */ - sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - environment?: string | null - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of 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: { - headers: {} content: { - 'application/json': components['schemas']['deployment'][] + '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'] } } /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts + * 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. * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. + * 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. * - * #### 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. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * #### 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`. + * **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. */ - 'repos/create-deployment': { + 'code-scanning/list-recent-analyses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - 202: { - content: { - 'application/json': { - message?: string - } - } - } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - ref: string - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - task?: string - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - auto_merge?: boolean - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - required_contexts?: string[] - payload?: { [key: string]: unknown } | string - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - environment?: string - /** - * @description Short description of the deployment. - * @default - */ - description?: string | null - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - transient_environment?: boolean - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - production_environment?: boolean - } - } - } - } - 'repos/get-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + 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'] + /** The number of 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']['deployment'] + 'application/json': components['schemas']['code-scanning-analysis'][] } } + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * To set a deployment as inactive, you must: + * 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. * - * * 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. + * 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. * - * 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)." + * 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). */ - 'repos/delete-deployment': { + 'code-scanning/get-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['code-scanning-analysis'] + 'application/json+sarif': { [key: string]: unknown } + } + } + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + 503: components['responses']['service_unavailable'] } } - /** Users with pull access can view deployment statuses for a deployment: */ - 'repos/list-deployment-statuses': { + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + 'code-scanning/delete-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['deployment-status'][] + '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'] } } /** - * Users with `push` access can create deployment statuses for a given deployment. + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. * - * 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. + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." */ - 'repos/create-deployment-status': { + 'code-scanning/upload-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 202: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-receipt'] } } - 422: components['responses']['validation_failed'] + /** Bad Request if the sarif field is invalid */ + 400: unknown + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + 413: unknown + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + ref: components['schemas']['code-scanning-ref'] + sarif: components['schemas']['code-scanning-analysis-sarif-file'] /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ */ - environment?: 'production' | 'staging' | 'qa' + checkout_uri?: string /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - environment_url?: string - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean + started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string } } } } - /** Users with pull access can view a deployment status for a deployment: */ - 'repos/get-deployment-status': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + 'code-scanning/get-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - status_id: number + /** The SARIF ID obtained after uploading. */ + sarif_id: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-status'] } } - 404: components['responses']['not_found'] + 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - 'repos/create-dispatch-event': { + 'repos/codeowners-errors': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string + } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A custom webhook event name. */ - event_type: string - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { [key: string]: unknown } + 200: { + content: { + 'application/json': components['schemas']['codeowners-errors'] } } + /** Resource not found */ + 404: unknown } } /** - * Get all environments for a repository. + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * - * 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. + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ - 'repos/get-all-environments': { + 'repos/list-collaborators': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: 'outside' | 'direct' | 'all' + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: 'pull' | 'triage' | 'push' | 'maintain' | 'admin' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of environments in this repository - * @example 5 - */ - total_count?: number - environments?: components['schemas']['environment'][] - } + 'application/json': components['schemas']['collaborator'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/check-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } + /** Response if user is a collaborator */ + 204: never + /** Not Found if user is not a collaborator */ + 404: unknown } } /** - * 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)." + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * **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)." + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** * - * You must authenticate using an access token with the repo scope to use this endpoint. + * 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/create-or-update-environment': { + 'repos/add-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } 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: { + /** Response when a new invitation is created */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-invitation'] } } + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - wait_timer?: components['schemas']['wait-timer'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: - | { - type?: components['schemas']['deployment-reviewer-type'] - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number - }[] - | null - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - } | null + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** + * @default push + */ + permission?: string + } } } } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - 'repos/delete-an-environment': { + 'repos/remove-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Default response */ + /** Response */ 204: never } } - 'activity/list-repo-events': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + 'repos/get-collaborator-permission-level': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ + /** if user has admin permissions */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['repository-collaborator-permission'] } } + 404: components['responses']['not_found'] } } - 'repos/list-forks': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + 'repos/list-commit-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32226,200 +30924,172 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['commit-comment'][] } } - 400: components['responses']['bad_request'] } } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - 'repos/create-fork': { + 'repos/get-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['commit-comment'] } } - 400: components['responses']['bad_request'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description Optional parameter to specify the organization name if forking into an organization. */ - organization?: string - } | null + } + 'repos/delete-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } - 'git/create-blob': { + 'repos/update-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['short-blob'] + 'application/json': components['schemas']['commit-comment'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new blob's content. */ - content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - encoding?: string + /** @description The contents of the comment */ + body: string } } } } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - 'git/get-blob': { + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ + 'reactions/list-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - file_sha: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['blob'] + 'application/json': components['schemas']['reaction'][] } } - 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': { + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + 'reactions/create-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] } + } + /** Reaction created */ + 201: { content: { - 'application/json': components['schemas']['git-commit'] + 'application/json': components['schemas']['reaction'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message */ - message: string - /** @description The SHA of the tree object this commit points to */ - tree: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - parents?: string[] - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name: string - /** @description The email of the author (or committer) of the commit */ - email: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - signature?: string + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * + * **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/enterprise-server@3.6/rest/reference/repos#comments). + */ + 'reactions/delete-for-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32449,89 +31119,113 @@ export type operations = { * | `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': { + 'repos/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] + } + 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 + /** The number of results per page (max 100). */ + per_page?: 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-commit'] + 'application/json': components['schemas']['commit'][] } } + 400: components['responses']['bad_request'] 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] } } /** - * 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)". + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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`. + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - 'git/list-matching-refs': { + 'repos/list-branches-for-head-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['git-ref'][] + 'application/json': components['schemas']['branch-short'][] } } + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + 'repos/list-comments-for-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['commit-comment'][] } } - 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': { + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { @@ -32541,73 +31235,63 @@ export type operations = { Location?: string } content: { - 'application/json': components['schemas']['git-ref'] + 'application/json': components['schemas']['commit-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string - /** @description The SHA1 value for this reference. */ - sha: string - /** @example "refs/heads/newbranch" */ - key?: string + /** @description The contents of the comment. */ + body: string + /** @description Relative path of the file to comment on. */ + path?: string + /** @description Line index in the diff to comment on. */ + position?: number + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number } } } } - 'git/delete-ref': { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + 'repos/list-pull-requests-associated-with-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - } - 'git/update-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The SHA1 value to set this reference to */ - sha: string - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - force?: boolean + 'application/json': components['schemas']['pull-request-simple'][] } } } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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** * @@ -32638,56 +31322,200 @@ export type operations = { * | `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': { + 'repos/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit'] } } + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } - requestBody: { - content: { - 'application/json': { - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - tag: string - /** @description The tag message. */ - message: string - /** @description The SHA of the git object this is tagging. */ - object: string - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - type: 'commit' | 'tree' | 'blob' - /** @description An object with information about the individual creating the tag. */ - tagger?: { - /** @description The name of the author of the tag */ - name: string - /** @description The email of the author of the tag */ - email: string - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string + } + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + app_id?: number + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + check_runs: 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 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + /** The number of results per page (max 100). */ + 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'][] } } } } } /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + 'repos/get-combined-status-for-ref': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-commit-status'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + 'repos/list-commit-statuses-for-ref': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + } + } + /** + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32717,766 +31545,996 @@ export type operations = { * | `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': { + 'repos/compare-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tag_sha: string + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit-comparison'] } } 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### 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 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)." + * 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. */ - 'git/create-tree': { + 'repos/get-content': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['git-tree'] + 'application/vnd.github.object': components['schemas']['content-tree'] + 'application/json': + | components['schemas']['content-directory'] + | components['schemas']['content-file'] + | components['schemas']['content-symlink'] + | components['schemas']['content-submodule'] } } + 302: components['responses']['found'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: { - /** @description The file referenced in the tree. */ - path?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - type?: 'blob' | 'tree' | 'commit' - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null - /** - * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - content?: string - }[] - /** - * @description The 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 - } - } } } /** - * Returns a single tree using the SHA1 value for that tree. + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. * - * 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. + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'git/get-tree': { + 'repos/create-or-update-file-contents': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tree'] + 'application/json': components['schemas']['file-commit'] } } - 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: {} + 201: { content: { - 'application/json': components['schemas']['hook'][] + 'application/json': components['schemas']['file-commit'] } } 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The commit message. */ + message: string + /** @description The new file content, using Base64 encoding. */ + content: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string + } + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string + } + } + } } } /** - * 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. + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'repos/create-webhook': { + 'repos/delete-file': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** path parameter */ + path: string } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['file-commit'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - 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'] - /** @example "abc" */ - token?: string - /** @example "sha256" */ - digest?: string + /** @description The commit message. */ + message: string + /** @description The blob SHA of the file being deleted. */ + sha: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - } | null + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } + } } } } - /** 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + } + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string + /** The number of 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']['hook'] + 'application/json': components['schemas']['contributor'][] } } + /** Response if repository is empty */ + 204: never + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } } - 'repos/delete-webhook': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/list-repo-secrets': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + secrets: components['schemas']['dependabot-secret'][] + } + } + } } } - /** 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': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description 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'] - /** @example "bar@example.com" */ - address?: string - /** @example "The Serious Room" */ - room?: string - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - add_events?: string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - remove_events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean + 'application/json': components['schemas']['dependabot-public-key'] } } } } - /** - * 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': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['dependabot-secret'] } } } } /** - * 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)." + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'repos/update-webhook-config-for-repo': { + 'dependabot/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { + /** Response when creating a secret */ + 201: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['empty-object'] } } + /** Response when updating a secret */ + 204: never } 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'] + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string } } } } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - 'repos/list-webhook-deliveries': { + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 204: never } } - /** Returns a delivery for a webhook configured in a repository. */ - 'repos/get-webhook-delivery': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + 'dependency-graph/diff-range': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components['parameters']['manifest-path'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['dependency-graph-diff'] } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - 'repos/redeliver-webhook-delivery': { + /** Simple filtering of deployments is available via query parameters: */ + 'repos/list-deployments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'repos/ping-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + query: { + /** The SHA recorded at creation time. */ + sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - 'repos/test-push-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['deployment'][] + } } } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } } /** - * View the progress of an import. + * Deployments offer a few configurable parameters with certain defaults. * - * **Import status** + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them + * before we merge a pull request. * - * This section includes details about the possible values of the `status` field of the Import Progress response. + * 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`. * - * An import that does not have errors will progress through these steps: + * 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. * - * * `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. + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. * - * If there are problems, you will see one of these in the `status` field: + * 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. * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * The `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. * - * **The project_choices field** + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. * - * 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. + * #### 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 * - * **Git LFS related fields** + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. * - * This section includes details about Git LFS related fields that may be present in the Import Progress 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. * - * * `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. + * #### 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`. */ - 'migrations/get-import-status': { + 'repos/create-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['deployment'] } } - 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 - } + /** Merged branch response */ + 202: { content: { - 'application/json': components['schemas']['import'] + 'application/json': { + message?: string + } } } - 404: components['responses']['not_found'] + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The URL of the originating repository. */ - vcs_url: string + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean + /** @description The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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]: unknown } | string + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false */ - vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the username to provide to `vcs_url`. */ - vcs_username?: string - /** @description If authentication is required, the password to provide to `vcs_url`. */ - vcs_password?: string - /** @description For a tfvc import, the name of the project that is being imported. */ - tfvc_project?: string + transient_environment?: boolean + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean } } } } - /** Stop an import for a repository. */ - 'migrations/cancel-import': { + 'repos/get-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['deployment'] + } + } + 404: components['responses']['not_found'] } } /** - * 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. + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ - 'migrations/update-import': { + 'repos/delete-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The username to provide to the originating repository. */ - vcs_username?: string - /** @description The password to provide to the originating repository. */ - vcs_password?: string - /** @example "git" */ - vcs?: string - /** @example "project1" */ - tfvc_project?: string - } | null - } + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** - * 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': { + /** Users with pull access can view deployment statuses for a deployment: */ + 'repos/list-deployment-statuses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['porter-author'][] + 'application/json': components['schemas']['deployment-status'][] } } 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - author_id: number + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['porter-author'] + 'application/json': components['schemas']['deployment-status'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new Git author email. */ - email?: string - /** @description The new Git author name. */ - name?: string + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean } } } } - /** List files larger than 100MB found during the import */ - 'migrations/get-large-files': { + /** Users with pull access can view a deployment status for a deployment: */ + 'repos/get-deployment-status': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + status_id: number } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['porter-large-file'][] + 'application/json': components['schemas']['deployment-status'] } } + 404: components['responses']['not_found'] } } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - 'migrations/set-lfs-preference': { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + 'repos/create-dispatch-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } + 204: never 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} - */ - use_lfs: 'opt_in' | 'opt_out' + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown } } } } } /** - * 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. + * Lists the environments for a repository. * - * 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. + * 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. */ - 'apps/get-repo-installation': { + 'repos/get-all-environments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results 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']['installation'] + 'application/json': { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number + environments?: components['schemas']['environment'][] + } } } - 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': { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } + 'application/json': components['schemas']['environment'] } } } } - /** 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': { + /** + * 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-or-update-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['interaction-limit-response'] + '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'] } } - /** Response */ - 409: unknown } requestBody: { content: { - 'application/json': components['schemas']['interaction-limit'] + 'application/json': { + wait_timer?: components['schemas']['wait-timer'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components['schemas']['deployment-reviewer-type'] + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number + }[] + | null + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } | null } } } - /** 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': { + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + 'repos/delete-an-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { - /** Response */ + /** Default response */ 204: never - /** Response */ - 409: unknown } } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - 'repos/list-invitations': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33485,177 +32543,145 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['repository-invitation'][] + 'application/json': { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number + branch_policies: components['schemas']['deployment-branch-policy'][] + } } } } } - 'repos/delete-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/update-invitation': { + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-invitation'] + 'application/json': components['schemas']['deployment-branch-policy'] } } + /** Response if the same branch name pattern already exists */ + 303: never + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. - * @enum {string} - */ - permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' - } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } /** - * List issues in a repository. + * Gets a deployment branch policy for an environment. * - * **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. + * 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. */ - 'issues/list-for-repo': { + 'repos/get-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * Updates a deployment branch policy for an environment. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ - 'issues/create': { + 'repos/update-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { - 'application/json': { - /** @description The title of the issue. */ - title: string | number - /** @description The contents of the issue. */ - body?: string - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - assignee?: string | null - milestone?: (string | number) | null - /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } - /** By default, Issue Comments are ordered by ascending ID. */ - 'issues/list-comments-for-repo': { + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/delete-deployment-branch-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'activity/list-repo-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33664,172 +32690,304 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['event'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'issues/get-comment': { + 'repos/list-forks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + } + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['minimal-repository'][] } } - 404: components['responses']['not_found'] + 400: components['responses']['bad_request'] } } - 'issues/delete-comment': { + /** + * 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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + 'repos/create-fork': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 204: never + 202: { + content: { + 'application/json': components['schemas']['full-repository'] + } + } + 400: components['responses']['bad_request'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string + } | null + } } } - 'issues/update-comment': { + 'git/create-blob': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['short-blob'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description The new blob's content. */ + content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string } } } } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - 'reactions/list-for-issue-comment': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + file_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['blob'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - 'reactions/create-for-issue-comment': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 */ + /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['git-commit'] } } + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The commit message */ + message: string + /** @description The SHA of the tree object this commit points to */ + tree: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[] + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string + /** @description The email of the author (or committer) of the commit */ + email: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description The [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 } } } } /** - * **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`. + * 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 the 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: * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * | 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. | */ - 'reactions/delete-for-issue-comment': { + 'git/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['git-commit'] + } + } + 404: components['responses']['not_found'] } } - 'issues/list-events-for-repo': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** ref parameter */ + ref: string } } responses: { @@ -33837,214 +32995,270 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['issue-event'][] + 'application/json': components['schemas']['git-ref'][] } } - 422: components['responses']['validation_failed'] } } - 'issues/get-event': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + 'git/get-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - event_id: number + /** ref parameter */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['issue-event'] + 'application/json': components['schemas']['git-ref'] } } - 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://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/get': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-ref'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string + /** @description The SHA1 value for this reference. */ + sha: string + /** @example "refs/heads/newbranch" */ + key?: string } } - 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': { + 'git/delete-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } 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'] + 204: never 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the issue. */ - title?: (string | number) | null - /** @description The contents of the issue. */ - body?: string | null - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - milestone?: (string | number) | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } - } } } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - 'issues/add-assignees': { + 'git/update-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-ref'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] + /** @description The SHA1 value to set this reference to */ + sha: string + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean } } } } - /** Removes one or more assignees from an issue. */ - 'issues/remove-assignees': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-tag'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string + /** @description The tag message. */ + message: string + /** @description The SHA of the git object this is tagging. */ + object: string + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: 'commit' | 'tree' | 'blob' + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string + /** @description The email of the author of the tag */ + email: string + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } } } } } - /** Issue Comments are ordered by ascending ID. */ - 'issues/list-comments': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + tag_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['git-tag'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'issues/create-comment': { + /** + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + 'git/create-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { @@ -34054,59 +33268,96 @@ export type operations = { Location?: string } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['git-tree'] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: 'blob' | 'tree' | 'commit' + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string + }[] + /** + * @description The 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 } } } } - 'issues/list-events': { + /** + * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + 'git/get-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + tree_sha: string } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['issue-event-for-issue'][] + 'application/json': components['schemas']['git-tree'] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/list-labels-on-issue': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + 'repos/list-webhooks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34117,305 +33368,374 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'][] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - /** Removes any previous labels and sets the new labels for an issue. */ - 'issues/set-labels': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } - 410: components['responses']['gone'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | { - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string + 'application/json': { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "abc" */ + token?: string + /** @example "sha256" */ + digest?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } | null } } } - 'issues/add-labels': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string - } + 404: components['responses']['not_found'] } } - 'issues/remove-all-labels': { + 'repos/delete-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "bar@example.com" */ + address?: string + /** @example "The Serious Room" */ + room?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } + } } } /** - * Users with push access can lock an issue or pull request's conversation. + * 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)." * - * 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)." + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. */ - 'issues/lock': { + 'repos/get-webhook-config-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - * @enum {string} - */ - lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } | null + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } } } } - /** Users with push access can unlock an issue's conversation. */ - 'issues/unlock': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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'] + } + } } } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - 'reactions/list-for-issue': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + 'repos/list-webhook-deliveries': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-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. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['hook-delivery-item'][] } } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - 'reactions/create-for-issue': { + /** Returns a delivery for a webhook configured in a repository. */ + 'repos/get-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['hook-delivery'] } } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + 'repos/redeliver-webhook-delivery': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } + } + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + 'repos/ping-webhook': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * 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. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` */ - 'reactions/delete-for-issue': { + 'repos/test-push-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - reaction_id: components['parameters']['reaction-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - 'issues/list-events-for-timeline': { + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-repo-installation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['timeline-issue-events'][] + 'application/json': components['schemas']['installation'] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - 'repos/list-deploy-keys': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34426,90 +33746,94 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['deploy-key'][] + 'application/json': components['schemas']['repository-invitation'][] } } } } - /** You can create a read-only deploy key. */ - 'repos/create-deploy-key': { + 'repos/delete-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['deploy-key'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A name for the key. */ - title?: string - /** @description The contents of the key. */ - key: string - /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." - */ - read_only?: boolean - } - } + 204: never } } - 'repos/get-deploy-key': { + 'repos/update-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['repository-invitation'] } } - 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'] + requestBody: { + content: { + 'application/json': { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' + } } } - responses: { - /** Response */ - 204: never - } } - 'issues/list-labels-for-repo': { + /** + * 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** 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. */ + 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. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34520,16 +33844,25 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/create-label': { + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'issues/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34540,49 +33873,105 @@ export type operations = { Location?: string } content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['issue'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - name: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + /** @description The title of the issue. */ + title: string | number + /** @description The contents of the issue. */ + body?: string + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] } } } } - 'issues/get-label': { + /** By default, Issue Comments are ordered by ascending ID. */ + 'issues/list-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + } + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['issue-comment'][] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/delete-label': { + 'issues/get-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the comment. */ + 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -34590,76 +33979,121 @@ export type operations = { 204: never } } - 'issues/update-label': { + 'issues/update-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['issue-comment'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - new_name?: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + /** @description The contents of the comment. */ + body: string } } } } - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - 'repos/list-languages': { + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ + 'reactions/list-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['language'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - 'repos/enable-lfs-for-repo': { + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + 'reactions/create-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - 403: unknown + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } } } - 'repos/disable-lfs-for-repo': { + /** + * **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/enterprise-server@3.6/rest/reference/issues#comments). + */ + 'reactions/delete-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -34667,247 +34101,292 @@ export type operations = { 204: never } } - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - 'licenses/get-for-repo': { + 'issues/list-events-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['license-content'] + 'application/json': components['schemas']['issue-event'][] } } + 422: components['responses']['validation_failed'] } } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - 'repos/merge-upstream': { + 'issues/get-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + event_id: number } } responses: { - /** The branch has been successfully synced with the upstream repository */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['merged-upstream'] - } - } - /** The branch could not be synced because of a merge conflict */ - 409: unknown - /** The branch could not be synced for some other reason */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string + 'application/json': components['schemas']['issue-event'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'repos/merge': { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { - /** Successful Response (The resulting merge commit) */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['commit'] - } - } - /** Response when already merged */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - 404: unknown - /** Conflict when there is a merge conflict */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - base: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - head: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - commit_message?: string + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'issues/list-milestones': { + /** Issue owners and users with push access can edit an issue. */ + 'issues/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['milestone'][] + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the issue. */ + title?: (string | number) | null + /** @description The contents of the issue. */ + body?: string | null + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'not_planned' | 'reopened') | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] + } + } } } - 'issues/create-milestone': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + 'issues/add-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description 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[] } } } } - 'issues/get-milestone': { + /** Removes one or more assignees from an issue. */ + 'issues/remove-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] } } - 404: components['responses']['not_found'] } } - 'issues/delete-milestone': { + /** Issue Comments are ordered by ascending ID. */ + 'issues/list-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-comment'][] + } + } 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'issues/update-milestone': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'issues/create-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue-comment'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description The contents of the comment. */ + body: string } } } } - 'issues/list-labels-for-milestone': { + 'issues/list-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34918,28 +34397,24 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue-event-for-issue'][] } } + 410: components['responses']['gone'] } } - /** List all notifications for the current user. */ - 'activity/list-repo-notifications-for-authenticated-user': { + 'issues/list-labels-on-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34950,157 +34425,219 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** 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': { + /** Removes any previous labels and sets the new labels for an issue. */ + 'issues/set-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['label'][] } } - /** Reset Content */ - 205: unknown + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. - */ - last_read_at?: string - } + 'application/json': + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string } } } - 'repos/get-pages': { + 'issues/add-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string + } } } - /** 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': { + 'issues/remove-all-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean - source?: - | ('gh-pages' | 'master' | 'master /docs') - | { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - path: '/' | '/docs' - } - } - } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - 'repos/create-pages-site': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + name: string } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['label'][] } } - 409: components['responses']['conflict'] + 301: components['responses']['moved_permanently'] + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'issues/lock': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The source branch and directory used to publish your Pages site. */ - source: { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - path?: '/' | '/docs' - } + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' } | null } } } - 'repos/delete-pages-site': { + /** Users with push access can unlock an issue's conversation. */ + 'issues/unlock': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'repos/list-pages-builds': { + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ + 'reactions/list-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35111,110 +34648,114 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['page-build'][] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** - * 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': { + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + 'reactions/create-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page-build-status'] + 'application/json': components['schemas']['reaction'] } } - } - } - 'repos/get-latest-pages-build': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - 'repos/get-pages-build': { + /** + * **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/enterprise-server@3.6/rest/reference/issues/). + */ + 'reactions/delete-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - build_id: number + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page-build'] - } - } + 204: never } } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - 'repos/get-pages-health-check': { + 'issues/list-events-for-timeline': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['pages-health-check'] - } - } - /** Empty response */ - 202: { - content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['timeline-issue-events'][] } } - /** Custom domains are not available for GitHub Pages */ - 400: unknown 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - 422: unknown + 410: components['responses']['gone'] } } - /** 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': { + 'repos/list-deploy-keys': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35225,148 +34766,98 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['project'][] + 'application/json': components['schemas']['deploy-key'][] } } - 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': { + /** You can create a read-only deploy key. */ + 'repos/create-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['deploy-key'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the project. */ - name: string - /** @description The description of the project. */ - body?: string + /** @description A name for the key. */ + title?: string + /** @description The contents of the key. */ + key: string + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean } } } } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'pulls/list': { + 'repos/get-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'][] + 'application/json': components['schemas']['deploy-key'] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] + 404: components['responses']['not_found'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - 'pulls/create': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the new pull request. */ - title?: string - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean - /** @example 1 */ - issue?: number - } - } + 204: never } } - /** 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': { + 'issues/list-labels-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35377,153 +34868,160 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 404: components['responses']['not_found'] } } - /** Provides details for a review comment. */ - 'pulls/get-review-comment': { + 'issues/create-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['label'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string + } + } + } + } + 'issues/get-label': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } 404: components['responses']['not_found'] } } - /** Deletes a review comment. */ - 'pulls/delete-review-comment': { + 'issues/delete-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] } } - /** Enables you to edit a review comment. */ - 'pulls/update-review-comment': { + 'issues/update-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } } requestBody: { content: { 'application/json': { - /** @description The text of the reply to the review comment. */ - body: string + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['language'] } } - 404: components['responses']['not_found'] } } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - 'reactions/create-for-pull-request-review-comment': { + 'repos/enable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } + 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown } } - /** - * **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': { + 'repos/disable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -35532,146 +35030,113 @@ export type operations = { } } /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * This method returns the contents of the repository's license file, if one is detected. * - * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ - 'pulls/get': { + 'licenses/get-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['license-content'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - 'pulls/update': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + 'repos/merge-upstream': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** The branch has been successfully synced with the upstream repository */ 200: { content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['merged-upstream'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] + /** The branch could not be synced because of a merge conflict */ + 409: unknown + /** The branch could not be synced for some other reason */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description The title of the pull request. */ - title?: string - /** @description The contents of the pull request. */ - body?: string - /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean + /** @description The name of the branch which should be updated to match upstream. */ + branch: string } } } } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-pr-for-authenticated-user': { + 'repos/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response when the codespace was successfully created */ + /** Successful Response (The resulting merge commit) */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['commit'] } } - 401: components['responses']['requires_authentication'] + /** Response when already merged */ + 204: never 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + /** Not Found when the base or head does not exist */ + 404: unknown + /** Conflict when there is a merge conflict */ + 409: unknown + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number + /** @description The name of the base branch that the head will be merged into. */ + base: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string } } } } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments': { + 'issues/list-milestones': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** 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' - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35682,26 +35147,19 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['milestone'][] } } + 404: components['responses']['not_found'] } } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-review-comment': { + 'issues/create-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { @@ -35711,214 +35169,125 @@ export type operations = { Location?: string } content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['milestone'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The text of the review comment. */ - body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id?: string - /** @description The relative path to the file that necessitates a comment. */ - path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number + /** @description The title of the milestone. */ + title: string /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - start_side?: 'LEFT' | 'RIGHT' | 'side' + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - in_reply_to?: number - } - } - } - } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-reply-for-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string + due_on?: string } } } } - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - 'pulls/list-commits': { + 'issues/get-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit'][] + 'application/json': components['schemas']['milestone'] } } + 404: components['responses']['not_found'] } } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - 'pulls/list-files': { + 'issues/delete-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['diff-entry'][] - } - } - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - 'pulls/check-if-merged': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response if pull request has been merged */ 204: never - /** Not Found if pull request has not been merged */ - 404: unknown + 404: components['responses']['not_found'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/merge': { + 'issues/update-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { - /** if merge was successful */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-merge-result'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - 405: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } - } - } - /** Conflict if sha was provided and pull request head did not match */ - 409: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } + 'application/json': components['schemas']['milestone'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Title for the automatic commit message. */ - commit_title?: string - /** @description Extra detail to append to automatic commit message. */ - commit_message?: string - /** @description SHA that pull request head must match to allow merge. */ - sha?: string + /** @description The title of the milestone. */ + title?: string /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - merge_method?: 'merge' | 'squash' | 'rebase' - } | null + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string + } } } } - 'pulls/list-requested-reviewers': { + 'issues/list-labels-for-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35929,237 +35298,216 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-request'] + 'application/json': components['schemas']['label'][] } } } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/request-reviewers': { + /** Lists all notifications for the current user in the specified repository. */ + 'activity/list-repo-notifications-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + } + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'] - } - } - 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description An array of user `login`s that will be requested. */ - reviewers?: string[] - /** @description An array of team `slug`s that will be requested. */ - team_reviewers?: string[] + 'application/json': components['schemas']['thread'][] } } } } - 'pulls/remove-requested-reviewers': { + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': { + message?: string + url?: string + } } } - 422: components['responses']['validation_failed'] + /** Reset Content */ + 205: unknown } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be removed. */ - reviewers: string[] - /** @description An array of team `slug`s that will be removed. */ - team_reviewers?: string[] + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string } } } } - /** The list of reviews returns in chronological order. */ - 'pulls/list-reviews': { + 'repos/get-pages': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-review'][] + 'application/json': components['schemas']['page'] } } + 404: components['responses']['not_found'] } } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - 'pulls/create-review': { + /** Updates information for a GitHub Enterprise Server 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 204: never + 400: components['responses']['bad_request'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - commit_id?: string - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - body?: string + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. * @enum {string} */ - event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: { - /** @description The relative path to the file that necessitates a review comment. */ - path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number - /** @description Text of the review comment. */ - body: string - /** @example 28 */ - line?: number - /** @example RIGHT */ - side?: string - /** @example 26 */ - start_line?: number - /** @example LEFT */ - start_side?: string - }[] - } - } - } - } - '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'] + build_type?: 'legacy' | 'workflow' + source?: + | ('gh-pages' | 'master' | 'master /docs') + | { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: '/' | '/docs' + } } } - 404: components['responses']['not_found'] } } - /** Update the review summary comment with new text. */ - 'pulls/update-review': { + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ + 'repos/create-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['page'] } } - 422: components['responses']['validation_failed_simple'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review. */ - body: string - } + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: 'legacy' | 'workflow' + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: '/' | '/docs' + } + } | null } } } - 'pulls/delete-pending-review': { + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ + 'repos/delete-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] - } - } + 204: never 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } } - /** List comments for a specific pull request review. */ - 'pulls/list-comments-for-review': { + 'repos/list-pages-builds': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36170,487 +35518,449 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['review-comment'][] + 'application/json': components['schemas']['page-build'][] } } - 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The message for the pull request review dismissal */ - message: string - /** @example "APPROVE" */ - event?: string + 'application/json': components['schemas']['page-build-status'] } } } } - 'pulls/submit-review': { + 'repos/get-latest-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The body text of the pull request review */ - body?: string - /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - * @enum {string} - */ - event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + 'application/json': components['schemas']['page-build'] } } } } - /** 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': { + 'repos/get-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + build_id: number } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['page-build'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string - } | null - } } } - /** - * 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': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['repository-pre-receive-hook'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - 'repos/get-readme-in-directory': { + 'enterprise-admin/get-pre-receive-hook-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - dir: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 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). + * Deletes any overridden enforcement on this repository for the specified hook. * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + * Responds with effective values inherited from owner and/or global level. */ - 'repos/list-releases': { + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { - /** Response */ + /** Responds with effective values inherited from owner and/or global level. */ 200: { - headers: {} content: { - 'application/json': components['schemas']['release'][] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 404: components['responses']['not_found'] } } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-release': { + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false + * @description The state of enforcement for the hook on this repository. + * @enum {string} */ - generate_release_notes?: boolean + enforcement?: 'enabled' | 'disabled' | 'testing' } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + } + query: { + /** Indicates the state of the projects to return. */ + state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'][] } } - 302: components['responses']['found'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'repos/delete-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** Response */ - 204: never + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } } - /** Users with push access to the repository can edit a release asset. */ - 'repos/update-release-asset': { + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'] } } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The file name of the asset. */ - name?: string - /** @description An alternate short description of the asset. Used in place of the filename. */ - label?: string - /** @example "uploaded" */ - state?: string + /** @description The name of the project. */ + name: string + /** @description The description of the project. */ + body?: string } } } } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - 'repos/generate-release-notes': { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'pulls/list': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** Name and body of generated release notes */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-notes-content'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The tag name for the release. This can be an existing tag or a new one. */ - tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - target_commitish?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - previous_tag_name?: string - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - configuration_file_path?: string + 'application/json': components['schemas']['pull-request-simple'][] } } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } /** - * View the latest published full release for the repository. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ - 'repos/get-latest-release': { + 'pulls/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number } } } } - /** Get a published release with the specified tag. */ - 'repos/get-release-by-tag': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** tag parameter */ - tag: string + } + query: { + sort?: 'created' | 'updated' | 'created_at' + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - 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': { + /** Provides details for a review comment. */ + 'pulls/get-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-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). */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request-review-comment'] } } 404: components['responses']['not_found'] } } - /** Users with push access to the repository can delete a release. */ - 'repos/delete-release': { + /** Deletes a review comment. */ + 'pulls/delete-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - /** Users with push access to the repository can edit a release. */ - 'repos/update-release': { + /** Enables you to edit a review comment. */ + 'pulls/update-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['pull-request-review-comment'] } } } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string + /** @description The text of the reply to the review comment. */ + body: string } } } } - 'repos/list-release-assets': { + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ + 'reactions/list-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36661,68 +35971,22 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - 'repos/upload-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - name: string - label?: string - } - } - responses: { - /** Response for successful upload */ - 201: { - content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['reaction'][] } } - /** Response if you upload an asset with the same filename as another uploaded asset */ - 422: unknown - } - requestBody: { - content: { - '*/*': string - } + 404: components['responses']['not_found'] } } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - 'reactions/create-for-release': { + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + 'reactions/create-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -36744,135 +36008,146 @@ export type operations = { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the pull request review comment. * @enum {string} */ - content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ - 'secret-scanning/list-alerts-for-repo': { + 'reactions/delete-for-pull-request-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } 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'] + 204: never } } /** - * 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 'secret-scanning/get-alert': { + 'pulls/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + * 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. */ - 'secret-scanning/update-alert': { + 'pulls/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } - /** 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'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - state: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** @description The title of the pull request. */ + title?: string + /** @description The contents of the pull request. */ + body?: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean } } } } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-locations-for-alert': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components['parameters']['sort'] + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { @@ -36880,342 +36155,528 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['secret-scanning-location'][] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] } } /** - * Lists the people that have starred the repository. + * 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/enterprise-server@3.6/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 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: + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'activity/list-stargazers-for-repo': { + 'pulls/create-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] + 'application/json': components['schemas']['pull-request-review-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string + /** @description The relative path to the file that necessitates a comment. */ + path: string + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: 'LEFT' | 'RIGHT' | 'side' + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number + } + } + } } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 'repos/get-code-frequency-stats': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-reply-for-review-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + } + } + } + } + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ + 'pulls/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['commit'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] } } - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - 'repos/get-commit-activity-stats': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + 'pulls/list-files': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-activity'][] + 'application/json': components['schemas']['diff-entry'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } - /** - * 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': { + 'pulls/check-if-merged': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 200: { - content: { - 'application/json': components['schemas']['contributor-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + /** Response if pull request has been merged */ + 204: never + /** Not Found if pull request has not been merged */ + 404: unknown } } - /** - * 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** The array order is oldest week (index 0) to most recent week. */ + /** if merge was successful */ 200: { content: { - 'application/json': components['schemas']['participation-stats'] + 'application/json': components['schemas']['pull-request-merge-result'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Title for the automatic commit message. */ + commit_title?: string + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string + /** @description SHA that pull request head must match to allow merge. */ + sha?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: 'merge' | 'squash' | 'rebase' + } | null + } } } - /** - * 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': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + 'pulls/list-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-request'] } } - 204: components['responses']['no_content'] } } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - 'repos/create-commit-status': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/request-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - sha: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['status'] + 'application/json': components['schemas']['pull-request-simple'] } } + 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown } requestBody: { content: { 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string - /** @description A short description of the status. */ - description?: string - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[] + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[] } } } } - /** Lists the people watching the specified repository. */ - 'activity/list-watchers-for-repo': { + 'pulls/remove-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['pull-request-simple'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[] + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[] } } } } - 'activity/get-repo-subscription': { + /** The list of reviews returns in chronological order. */ + 'pulls/list-reviews': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if you subscribe to the repository */ + /** The list of reviews returns in chronological order. */ 200: { + headers: {} content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'][] } } - 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - 404: unknown } } - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - 'activity/set-repo-subscription': { + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description Determines if notifications should be received from this repository. */ - subscribed?: boolean - /** @description Determines if all notifications should be blocked from this repository. */ - ignored?: boolean + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. 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/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number + /** @description Text of the review comment. */ + body: string + /** @example 28 */ + line?: number + /** @example RIGHT */ + side?: string + /** @example 26 */ + start_line?: number + /** @example LEFT */ + start_side?: string + }[] } } } } - /** 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': { + 'pulls/get-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] } } - 'repos/list-tags': { + /** Update the review summary comment with new text. */ + 'pulls/update-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['tag'][] + 'application/json': components['schemas']['pull-request-review'] + } + } + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review. */ + body: string } } } } - /** - * 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': { + 'pulls/delete-pending-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - ref: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 302: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - 'repos/list-teams': { + /** List comments for a specific pull request review. */ + 'pulls/list-comments-for-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -37226,188 +36687,302 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['review-comment'][] } } + 404: components['responses']['not_found'] } } - 'repos/get-all-topics': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The message for the pull request review dismissal */ + message: string + /** + * @example "DISMISS" + * @enum {string} + */ + event?: 'DISMISS' + } + } } } - 'repos/replace-all-topics': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ + 'pulls/submit-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The body text of the pull request review */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['clone-traffic'] + 'application/json': { + message?: string + url?: string + } } } 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@3.6/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 + } } } - /** Get the top 10 popular contents over the last 14 days. */ - 'repos/get-top-paths': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Get the top 10 referrers over the last 14 days. */ - 'repos/get-top-referrers': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme-in-directory': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + dir: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['referrer-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['view-traffic'] + 'application/json': components['schemas']['release'][] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - 'repos/transfer': { + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-release': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 202: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['minimal-repository'] + 'application/json': components['schemas']['release'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: number[] + /** @description The name of the tag. */ + tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean } } } } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/check-vulnerability-alerts': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + 302: components['responses']['found'] + 404: components['responses']['not_found'] } } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/enable-vulnerability-alerts': { + 'repos/delete-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { @@ -37415,437 +36990,360 @@ export type operations = { 204: never } } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/disable-vulnerability-alerts': { + /** Users with push access to the repository can edit a release asset. */ + 'repos/update-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - 'repos/download-zipball-archive': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - ref: string + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } } } - responses: { - /** Response */ - 302: never + requestBody: { + content: { + 'application/json': { + /** @description The file name of the asset. */ + name?: string + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string + /** @example "uploaded" */ + state?: string + } + } } } - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-using-template': { + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + 'repos/generate-release-notes': { parameters: { path: { - template_owner: string - template_repo: string + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string - } + /** Name and body of generated release notes */ + 200: { content: { - 'application/json': components['schemas']['repository'] + 'application/json': components['schemas']['release-notes-content'] } } + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - owner?: string - /** @description The name of the new repository. */ - name: string - /** @description A short description of the new repository. */ - description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - include_all_branches?: boolean - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - private?: boolean + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string } } } } /** - * Lists all public repositories in the order that they were created. + * View the latest published full release for the repository. * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * 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/list-public': { + 'repos/get-latest-release': { parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components['parameters']['since-repo'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['release'] } } - 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': { + /** Get a published release with the specified tag. */ + 'repos/get-release-by-tag': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** tag parameter */ + tag: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['actions-secret'][] - } + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ + 'repos/get-release': { parameters: { path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ 200: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Users with push access to the repository can delete a release. */ + 'repos/delete-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-secret'] - } - } + 204: never } } - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-environment-secret': { + /** Users with push access to the repository can edit a release. */ + 'repos/update-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['release'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string + /** @description The name of the tag. */ + tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean } } } } - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Default response */ - 204: never - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/list-provisioned-groups-enterprise': { + 'repos/list-release-assets': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - /** attributes to exclude */ - excludedAttributes?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-group-list-enterprise'] + 'application/json': components['schemas']['release-asset'][] } } } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#create-a-release) to upload a release asset. * - * 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. + * 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 Enterprise Server 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 Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ - 'enterprise-admin/provision-and-invite-enterprise-group': { + 'repos/upload-release-asset': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + query: { + name: string + label?: string } } responses: { - /** Response */ + /** Response for successful upload */ 201: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['release-asset'] } } + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown } requestBody: { content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] - } + '*/*': string } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/get-provisioning-information-for-enterprise-group': { + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + 'reactions/list-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Attributes to exclude. */ - excludedAttributes?: string + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** - * **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': { + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + 'reactions/create-for-release': { parameters: { path: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** Reaction exists */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-scim-group-from-enterprise': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + 'reactions/delete-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -37853,626 +37351,629 @@ export type operations = { 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': { + /** Lists the status of each repository cache replica. */ + 'repos/list-cache-info': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Status information for cache replicas */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown + 'application/json': { + host: string + location: string + git: { + /** @enum {string} */ + sync_status: 'offline' | 'inactive' | 'in_sync' | 'not_in_sync' + /** Format: date-time */ + last_sync: string + } }[] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * **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. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/list-provisioned-identities-enterprise': { + 'secret-scanning/list-alerts-for-repo': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-user-list-enterprise'] + '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'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/get-alert': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'] + } + } + 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ - 'enterprise-admin/provision-and-invite-enterprise-user': { + 'secret-scanning/update-alert': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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 */ - 201: { + 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + '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': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + state: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] } } } } - /** **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': { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-locations-for-alert': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['secret-scanning-location'][] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **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`. + * Lists the people that have starred the repository. * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ - 'enterprise-admin/set-information-for-provisioned-enterprise-user': { + 'activity/list-stargazers-for-repo': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] } } + 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + } + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 'repos/get-code-frequency-stats': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + 'application/json': components['schemas']['code-frequency-stat'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-user-from-enterprise': { + /** 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: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['commit-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } /** - * **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`. + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * * `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 */ - 'enterprise-admin/update-attribute-for-enterprise-user': { + 'repos/get-contributors-stats': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['contributor-activity'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] + } + } + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + 'repos/get-participation-stats': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { [key: string]: unknown }[] + 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'] } } /** - * 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. + * Each array contains the day number, hour number, and number of commits: * - * 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. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * 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. + * 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. */ - 'scim/list-provisioned-identities': { + 'repos/get-punch-card-stats': { 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 + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** 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/scim+json': components['schemas']['scim-user-list'] + 'application/json': components['schemas']['code-frequency-stat'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 204: components['responses']['no_content'] } } - /** Provision organization membership for a user, and send an activation email to the email address. */ - 'scim/provision-and-invite-user': { + /** + * 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: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + sha: string } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['status'] } } - 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': { /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe + * @description The state of the status. + * @enum {string} */ - displayName?: string + state: 'error' | 'failure' | 'pending' | 'success' /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - name: { - givenName: string - familyName: string - formatted?: string - } + target_url?: string | null + /** @description A short description of the status. */ + description?: string | null /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default */ - emails: { - value: string - primary?: boolean - type?: string - }[] - schemas?: string[] - externalId?: string - groups?: string[] - active?: boolean + context?: string } } } } - 'scim/get-provisioning-information-for-user': { + /** Lists the people watching the specified repository. */ + 'activity/list-watchers-for-repo': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['simple-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': { + 'activity/get-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + 404: unknown + } + } + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ + 'activity/set-repo-subscription': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['repository-subscription'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - externalId?: string - groups?: string[] - active?: boolean - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string - familyName: string - formatted?: string - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - type?: string - value: string - primary?: boolean - }[] + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean } } } } - 'scim/delete-user-from-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ + 'activity/delete-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + } + } + 'repos/list-tags': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] + } + } } } /** - * 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. + * This returns the tag protection states of a repository. * - * **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 - * } - * }] - * } - * ``` + * This information is only available to repository administrators. */ - 'scim/update-attribute-for-user': { + 'repos/list-tag-protection': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['tag-protection'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + 'repos/create-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { /** Response */ - 429: { + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['tag-protection'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - Operations: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: - | { - active?: boolean | null - userName?: string | null - externalId?: string | null - givenName?: string | null - familyName?: string | null - } - | { - value?: string - primary?: boolean - }[] - | string - }[] + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string } } } } /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. */ - 'search/code': { + 'repos/delete-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the tag protection. */ + tag_protection_id: components['parameters']['tag-protection-id'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + 'repos/list-teams': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'indexed' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38481,260 +37982,209 @@ export type operations = { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['code-search-result-item'][] - } + 'application/json': components['schemas']['team'][] } } - 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': { + 'repos/get-all-topics': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'author-date' | 'committer-date' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['commit-search-result-item'][] - } + 'application/json': components['schemas']['topic'] } } - 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'repos/replace-all-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). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: - | 'comments' - | 'reactions' - | 'reactions-+1' - | 'reactions--1' - | 'reactions-smile' - | 'reactions-thinking_face' - | 'reactions-heart' - | 'reactions-tada' - | 'interactions' - | 'created' - | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[] + } + } + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + 'repos/transfer': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['issue-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[] } } - 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` + * 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. * - * The labels that best match the query appear first in the search results. + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ - 'search/labels': { + 'repos/download-zipball-archive': { parameters: { - query: { - /** The id of the repository. */ - repository_id: number - /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'created' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['label-search-result-item'][] - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 302: never } } /** - * 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). + * 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. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * **OAuth scope requirements** * - * `q=tetris+language:assembly&sort=stars&order=desc` + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * 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. + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - 'search/repos': { + 'repos/create-using-template': { parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + template_owner: string + template_repo: string } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['repo-search-result-item'][] - } + 'application/json': components['schemas']['repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string + /** @description The name of the new repository. */ + name: string + /** @description A short description of the new repository. */ + description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } } /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` + * Lists all public repositories in the order that they were created. * - * 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. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ - 'search/topics': { + 'repos/list-public': { parameters: { query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components['parameters']['since-repo'] + /** Specifies the types of repositories to return. This endpoint will only list repositories available to all users on the enterprise. */ + visibility?: 'all' | 'public' } } responses: { /** Response */ 200: { + headers: { + Link?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['topic-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'][] } } 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** 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: { + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'followers' | 'repositories' | 'joined' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38743,215 +38193,312 @@ export type operations = { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - incomplete_results: boolean - items: components['schemas']['user-search-result-item'][] + secrets: components['schemas']['actions-secret'][] } } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + 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']['team-full'] + 'application/json': components['schemas']['actions-public-key'] } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } } } /** - * **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. + * 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. * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * #### Example encrypting a secret using Node.js * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/update-legacy': { + 'actions/create-or-update-environment-secret': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - /** Response */ + /** Response when creating a secret */ 201: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['empty-object'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ - name: string - /** @description The description of the team. */ - description?: string - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string } } } } - /** - * **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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Default 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: { - /** 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'] + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + /** attributes to exclude */ + excludedAttributes?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion'][] + 'application/json': components['schemas']['scim-group-list-enterprise'] } } } } /** - * **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/). + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title: string - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] } } } } - /** - * **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': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + query: { + /** Attributes to exclude. */ + excludedAttributes?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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. */ - 'teams/delete-discussion-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] + } + } + } + } + /** **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: { @@ -38960,246 +38507,308 @@ export type operations = { } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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). */ - 'teams/update-discussion-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title?: string - /** @description The discussion post's body text. */ - body?: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: unknown + }[] } } } } /** - * **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. + * **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 Enterprise Server. 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 Enterprise Server account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. * - * 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/). + * 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ - 'teams/list-discussion-comments-legacy': { + 'enterprise-admin/list-provisioned-identities-enterprise': { 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'][] + 'application/json': components['schemas']['scim-user-list-enterprise'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * Provision enterprise membership for a user, and send organization invitation emails to the email address. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-comment-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/get-discussion-comment-legacy': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * 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`. * - * 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/). + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. */ - 'teams/update-discussion-comment-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/list-for-team-discussion-comment-legacy': { + /** **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: { - 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } + 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 "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * **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`. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` */ - 'reactions/create-for-team-discussion-comment-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: 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 reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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` * - * 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/). + * 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. */ - 'reactions/list-for-team-discussion-legacy': { + 'search/code': { 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) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39208,57 +38817,94 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['code-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * 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/enterprise-server@3.6/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` */ - 'reactions/create-for-team-discussion-legacy': { + 'search/commits': { parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['commit-search-result-item'][] + } } } + 304: components['responses']['not_modified'] } } /** - * **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. + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * - * 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:** 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)." */ - 'teams/list-pending-invitations-legacy': { + 'search/issues-and-pull-requests': { parameters: { - path: { - team_id: components['parameters']['team-id'] - } query: { - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39267,32 +38913,43 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['issue-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Team members will include the members of child teams. + * 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/enterprise-server@3.6/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. */ - 'teams/list-members-legacy': { + 'search/labels': { 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) */ + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39301,312 +38958,455 @@ export type operations = { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['label-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } /** - * The "Get team member" endpoint (described below) is deprecated. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * To list members in a team, the team must be visible to the authenticated user. + * 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. */ - 'teams/get-member-legacy': { + 'search/repos': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if user is a member */ - 204: never - /** if user is not a member */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['repo-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * The "Add team member" endpoint (described below) is deprecated. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * 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: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * `q=ruby+is:featured` * - * 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)." + * 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. */ - 'teams/add-member-legacy': { + 'search/topics': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + q: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - 422: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['topic-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] } } /** - * The "Remove team member" endpoint (described below) is deprecated. + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * For example, if you're looking for a list of popular users, you might try this query: * - * 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. + * `q=tom+repos:%3E42+followers:%3E1000` * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 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. */ - 'teams/remove-member-legacy': { + 'search/users': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - /** Not Found if team synchronization is setup */ - 404: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['user-search-result-item'][] + } + } + } + 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 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. + * This endpoint allows you to check the status of the most recent configuration process: * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Note that you may need to wait several seconds after you start a process before you can check its status. * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. + * The different statuses are: * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | */ - 'teams/get-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/get-configuration-status': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['configuration-status'] + } } } + } + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + 'enterprise-admin/start-configuration-process': { + responses: { + /** Response */ + 202: unknown + } + } + /** Check your installation's maintenance status: */ + 'enterprise-admin/get-maintenance-status': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['maintenance-status'] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/enable-or-disable-maintenance-mode': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['maintenance-status'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description A JSON string with the attributes `enabled` and `when`. + * + * The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + * + * The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + */ + maintenance: string } } - 404: components['responses']['not_found'] } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + 'enterprise-admin/get-settings': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-settings'] + } + } + } + } + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). * - * 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. + * **Notes:** * - * 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. + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." */ - 'teams/add-or-update-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/set-settings': { + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings: string + } + } + } + } + 'enterprise-admin/get-all-authorized-ssh-keys': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/add-authorized-ssh-key': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string + } } } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/remove-authorized-ssh-key': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['ssh-key'][] } } - /** Forbidden if team synchronization is set up */ - 403: unknown - 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string } } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. * - * 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. + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/remove-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } + 'enterprise-admin/create-enterprise-server-license': { responses: { /** Response */ - 204: never - /** if team synchronization is set up */ - 403: unknown + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your _.ghl_ license file. */ + license: string + /** @description You **must** provide a password _only if_ you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. */ + password?: string + /** @description An optional JSON string containing the installation settings. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings?: string + } + } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * This API upgrades your license and also triggers the configuration process. * - * Lists the organization projects for a team. + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/list-projects-legacy': { + 'enterprise-admin/upgrade-license': { + responses: { + /** Response */ + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your new _.ghl_ license file. */ + license?: string + } + } + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ + 'teams/get-legacy': { parameters: { path: { + /** The unique identifier of the team. */ 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'][] + '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 [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * 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/check-permissions-for-project-legacy': { + 'teams/delete-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown + 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 [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) 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. + * 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/add-or-update-project-permissions-legacy': { + 'teams/update-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { + 201: { content: { - 'application/json': { - message?: string - documentation_url?: string - } + 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The name of the team. */ + name: string + /** @description The description of the team. */ + description?: string /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. * @enum {string} */ - permission?: 'read' | 'write' | 'admin' + privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#list-discussions) 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. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - 'teams/list-repos-legacy': { + 'teams/list-discussions-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39617,441 +39417,355 @@ export type operations = { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['team-discussion'][] } } - 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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. * - * **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. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'teams/check-permissions-for-repo-legacy': { + 'teams/create-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { - /** Alternative response with extra repository information */ - 200: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['team-repository'] + 'application/json': components['schemas']['team-discussion'] } } - /** Response if repository is managed by this team */ - 204: never - /** Not Found if repository is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-or-update-repo-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The discussion post's title. */ + title: string + /** @description The discussion post's body text. */ + body: string /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false */ - permission?: 'pull' | 'push' | 'admin' + private?: boolean } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) 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. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-repo-legacy': { + 'teams/get-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 204: never + 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 [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. * - * List IdP groups connected to a team on GitHub. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/list-idp-groups-for-legacy': { + 'teams/delete-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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 [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. * - * 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. + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/create-or-update-idp-group-connections-legacy': { + 'teams/update-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['team-discussion'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - /** @example "caceab43fc9ffa20081c" */ - id?: string - /** @example "external-team-6c13e7288ef7" */ - name?: string - /** @example "moar cheese pleese" */ - description?: string - }[] - /** @example "I am not a timestamp" */ - synced_at?: string + /** @description The discussion post's title. */ + title?: string + /** @description The discussion post's body text. */ + body?: string } } } } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - 'teams/list-child-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 [List discussion comments](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussion-comments-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** if child teams exist */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['team-discussion-comment'][] } } - 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. + * **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'users/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } + 'teams/create-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } - 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: { + 201: { content: { - 'application/json': components['schemas']['private-user'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - name?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - email?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - blog?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - twitter_username?: string | null - /** - * @description The new company of the user. - * @example Acme corporation - */ - company?: string - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - location?: string - /** @description The new hiring availability of the user. */ - hireable?: boolean - /** @description The new short biography of the user. */ - bio?: string - } - } - } - } - /** List the users you've blocked on your personal account. */ - 'users/list-blocked-by-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] + /** @description The discussion comment's body text. */ + body: string } } - 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': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } 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: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team-discussion-comment'] } } } } - 'users/block': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'users/unblock': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } } } /** - * Lists the authenticated user's codespaces. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-for-authenticated-user': { + 'reactions/list-for-team-discussion-comment-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - repository_id?: components['parameters']['repository-id-in-query'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } + 'application/json': components['schemas']['reaction'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Creates a new codespace, owned by the authenticated user. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ - 'codespaces/create-for-authenticated-user': { + 'reactions/create-for-team-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } + } responses: { - /** Response when the codespace was successfully created */ + /** Response */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['reaction'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } requestBody: { content: { - 'application/json': - | { - /** @description Repository id for this codespace */ - repository_id: number - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - | { - /** @description Pull request number for this codespace */ - pull_request: { - /** @description Pull request number */ - pull_request_number: number - /** @description Repository id for this codespace */ - repository_id: number - } - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } } } } /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-secrets-for-authenticated-user': { + 'reactions/list-for-team-discussion-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40062,491 +39776,545 @@ export type operations = { 200: { headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['codespaces-secret'][] - } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - 'codespaces/get-public-key-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-user-public-key'] + 'application/json': components['schemas']['reaction'][] } } } } /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ - 'codespaces/get-secret-for-authenticated-user': { + 'reactions/create-for-team-discussion-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['codespaces-secret'] + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * Team members will include the members of child teams. + */ + 'teams/list-members-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** Filters members returned by their role in the team. */ + role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ + per_page?: 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. * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. * - * #### Example encrypting a secret using Ruby + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/get-member-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** if user is a member */ + 204: never + /** if user is not a member */ + 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * - * ```ruby - * require "rbnacl" - * require "base64" + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/create-or-update-secret-for-authenticated-user': { + 'teams/add-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response after successfully creaing a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ + /** Response */ 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: string[] - } - } + 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown } } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - 'codespaces/delete-secret-for-authenticated-user': { + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + /** Not Found if team synchronization is setup */ + 404: unknown } } /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ - 'codespaces/list-repositories-for-secret-for-authenticated-user': { + 'teams/get-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } + 'application/json': components['schemas']['team-membership'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. */ - 'codespaces/set-repositories-for-secret-for-authenticated-user': { + 'teams/add-or-update-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repositories were added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: number[] + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' } } } } /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/add-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ - 'codespaces/remove-repository-for-secret-for-authenticated-user': { + 'teams/remove-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repository was removed from the selected list */ + /** Response */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** if team synchronization is set up */ + 403: unknown } } /** - * Gets information about a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Lists the organization projects for a team. */ - 'codespaces/get-for-authenticated-user': { + 'teams/list-projects-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['team-project'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Deletes a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. */ - 'codespaces/delete-for-authenticated-user': { + 'teams/check-permissions-for-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 202: components['responses']['accepted'] - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown } } /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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. */ - 'codespaces/update-for-authenticated-user': { + 'teams/add-or-update-project-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': { + message?: string + documentation_url?: string + } } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A valid machine to transition this codespace to. */ - machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - recent_folders?: string[] + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' } } } } /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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. */ - 'codespaces/export-for-authenticated-user': { + 'teams/remove-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 202: { + 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 [List team repositories](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ + 'teams/list-repos-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['minimal-repository'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } /** - * Gets information about an export of a codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ - 'codespaces/get-export-details-for-authenticated-user': { + 'teams/check-permissions-for-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - export_id: components['parameters']['export-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** Alternative response with extra repository information */ 200: { content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['team-repository'] } } - 404: components['responses']['not_found'] + /** Response if repository is managed by this team */ + 204: never + /** Not Found if repository is not managed by this team */ + 404: unknown } } /** - * List the machine types a codespace can transition to use. + * **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/enterprise-server@3.6/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. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/codespace-machines-for-authenticated-user': { + 'teams/add-or-update-repo-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Starts a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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. */ - 'codespaces/start-for-authenticated-user': { + 'teams/remove-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } + 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 child teams`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ + 'teams/list-child-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - /** Payment required */ - 402: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team'][] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] } } /** - * Stops a user's codespace. + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. */ - 'codespaces/stop-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } + 'users/get-authenticated': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] } } + 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** Sets the visibility for your primary email addresses. */ - 'users/set-primary-email-visibility-for-authenticated-user': { + /** **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']['email'][] + 'application/json': components['schemas']['private-user'] } } 304: components['responses']['not_modified'] @@ -40559,10 +40327,39 @@ export type operations = { content: { 'application/json': { /** - * @description Denotes whether an email is publicly visible. - * @enum {string} + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj */ - visibility: 'public' | 'private' + twitter_username?: string | null + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string + /** @description The new hiring availability of the user. */ + hireable?: boolean + /** @description The new short biography of the user. */ + bio?: string } } } @@ -40571,7 +40368,7 @@ export type operations = { 'users/list-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40650,7 +40447,7 @@ export type operations = { 'users/list-followers-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40673,7 +40470,7 @@ export type operations = { 'users/list-followed-by-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40695,6 +40492,7 @@ export type operations = { 'users/check-person-is-followed-by-authenticated': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40713,13 +40511,14 @@ export type operations = { } } /** - * 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)." + * 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/enterprise-server@3.6/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: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40736,6 +40535,7 @@ export type operations = { 'users/unfollow': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40748,11 +40548,11 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-gpg-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40772,7 +40572,7 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-gpg-key-for-authenticated-user': { parameters: {} responses: { @@ -40791,17 +40591,19 @@ export type operations = { requestBody: { content: { 'application/json': { + /** @description A descriptive name for the new key. */ + name?: string /** @description A GPG key in ASCII-armored format. */ armored_public_key: string } } } } - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40818,11 +40620,11 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40839,7 +40641,7 @@ export type operations = { /** * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -40848,7 +40650,7 @@ export type operations = { 'apps/list-installations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40868,7 +40670,6 @@ export type operations = { 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] } } /** @@ -40876,18 +40677,18 @@ export type operations = { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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 */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40913,13 +40714,14 @@ export type operations = { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/add-repo-to-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -40934,13 +40736,14 @@ export type operations = { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/remove-repo-from-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -40952,74 +40755,30 @@ export type operations = { 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - 'interactions/get-restrictions-for-authenticated-user': { - responses: { - /** Default response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - 'interactions/set-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - 'interactions/remove-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 204: never - } - } /** * List issues across owned and member repositories assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-authenticated-user': { parameters: { query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41037,11 +40796,11 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-public-ssh-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41061,7 +40820,7 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-public-ssh-key-for-authenticated-user': { parameters: {} responses: { @@ -41091,11 +40850,11 @@ export type operations = { } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41112,11 +40871,11 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41129,57 +40888,12 @@ export type operations = { 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. */ + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ state?: 'active' | 'pending' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41202,6 +40916,7 @@ export type operations = { 'orgs/get-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41219,6 +40934,7 @@ export type operations = { 'orgs/update-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41249,7 +40965,7 @@ export type operations = { 'migrations/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41291,6 +41007,16 @@ export type operations = { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean /** * @description Do not include attachments in the migration * @example true @@ -41306,6 +41032,12 @@ export type operations = { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean /** * @description Exclude attributes from the API response to improve performance * @example [ @@ -41318,39 +41050,6 @@ export type operations = { } } } - /** - * 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: * @@ -41377,7 +41076,7 @@ export type operations = { 'migrations/get-archive-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } } @@ -41389,51 +41088,15 @@ export type operations = { 403: components['responses']['forbidden'] } } - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - 'migrations/delete-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - 'migrations/unlock-repo-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists all the repositories for this user migration. */ 'migrations/list-repos-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41460,7 +41123,7 @@ export type operations = { 'orgs/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41479,221 +41142,7 @@ export type operations = { 403: components['responses']['forbidden'] } } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-authenticated-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/create-for-authenticated-user': { parameters: {} responses: { @@ -41706,7 +41155,6 @@ export type operations = { 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: { @@ -41726,11 +41174,11 @@ export type operations = { } } } - /** 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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ 'users/list-public-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41758,7 +41206,7 @@ export type operations = { 'repos/list-for-authenticated-user': { parameters: { query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + /** Limit results to repositories with the specified visibility. */ visibility?: 'all' | 'public' | 'private' /** * Comma-separated list of values. Can include: @@ -41767,17 +41215,13 @@ export type operations = { * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ + /** Limit results to repositories of the specified type. 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`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41805,7 +41249,7 @@ export type operations = { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -41911,6 +41355,40 @@ export type operations = { * @example false */ delete_branch_on_merge?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether downloads are enabled. * @default true @@ -41931,7 +41409,7 @@ export type operations = { 'repos/list-invitations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41954,7 +41432,7 @@ export type operations = { 'repos/decline-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -41970,7 +41448,7 @@ export type operations = { 'repos/accept-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -41986,16 +41464,16 @@ export type operations = { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ '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). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42018,7 +41496,9 @@ export type operations = { 'activity/check-repo-is-starred-by-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42036,11 +41516,13 @@ export type operations = { } } } - /** 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'activity/star-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42056,7 +41538,9 @@ export type operations = { 'activity/unstar-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42073,7 +41557,7 @@ export type operations = { 'activity/list-watched-repos-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42092,11 +41576,11 @@ export type operations = { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ 'teams/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42116,16 +41600,16 @@ export type operations = { } } /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -42145,15 +41629,16 @@ export type operations = { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ 'users/get-by-username': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42171,10 +41656,11 @@ export type operations = { 'activity/list-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42193,11 +41679,13 @@ export type operations = { 'activity/list-org-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42215,10 +41703,11 @@ export type operations = { 'activity/list-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42237,10 +41726,11 @@ export type operations = { 'users/list-followers-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42260,10 +41750,11 @@ export type operations = { 'users/list-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42282,6 +41773,7 @@ export type operations = { 'users/check-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] target_user: string } @@ -42297,12 +41789,13 @@ export type operations = { 'gists/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42323,10 +41816,11 @@ export type operations = { 'users/list-gpg-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42355,6 +41849,7 @@ export type operations = { 'users/get-context-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { @@ -42378,11 +41873,12 @@ export type operations = { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-user-installation': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42399,10 +41895,11 @@ export type operations = { 'users/list-public-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42421,15 +41918,16 @@ export type operations = { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ 'orgs/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42445,240 +41943,16 @@ export type operations = { } } } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } 'projects/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42699,10 +41973,11 @@ export type operations = { 'activity/list-received-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42720,10 +41995,11 @@ export type operations = { 'activity/list-received-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42742,16 +42018,17 @@ export type operations = { 'repos/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Can be one of `all`, `owner`, `member`. */ + /** Limit results to repositories of the specified type. */ type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42767,88 +42044,49 @@ export type operations = { } } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-actions-billing-user': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'enterprise-admin/promote-user-to-be-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + 204: never } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-packages-billing-user': { + /** You can demote any user account except your own. */ + 'enterprise-admin/demote-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-shared-storage-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } + 204: never } } /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 'activity/list-repos-starred-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42868,10 +42106,11 @@ export type operations = { 'activity/list-repos-watched-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42887,6 +42126,54 @@ export type operations = { } } } + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'enterprise-admin/suspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being suspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + 'enterprise-admin/unsuspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being unsuspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } /** Get a random sentence from the Zen of GitHub */ 'meta/get-zen': { responses: { diff --git a/test/v3/expected/github.immutable.ts b/test/v3/expected/github.immutable.ts index 11c73a07e..16f1d887b 100644 --- a/test/v3/expected/github.immutable.ts +++ b/test/v3/expected/github.immutable.ts @@ -8,29 +8,146 @@ export interface paths { /** Get Hypermedia links to resources accessible in GitHub's REST API */ readonly get: operations['meta/root'] } + readonly '/admin/hooks': { + readonly get: operations['enterprise-admin/list-global-webhooks'] + readonly post: operations['enterprise-admin/create-global-webhook'] + } + readonly '/admin/hooks/{hook_id}': { + readonly get: operations['enterprise-admin/get-global-webhook'] + readonly delete: operations['enterprise-admin/delete-global-webhook'] + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + readonly patch: operations['enterprise-admin/update-global-webhook'] + } + readonly '/admin/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + readonly post: operations['enterprise-admin/ping-global-webhook'] + } + readonly '/admin/keys': { + readonly get: operations['enterprise-admin/list-public-keys'] + } + readonly '/admin/keys/{key_ids}': { + readonly delete: operations['enterprise-admin/delete-public-key'] + } + readonly '/admin/ldap/teams/{team_id}/mapping': { + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + readonly patch: operations['enterprise-admin/update-ldap-mapping-for-team'] + } + readonly '/admin/ldap/teams/{team_id}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + readonly post: operations['enterprise-admin/sync-ldap-mapping-for-team'] + } + readonly '/admin/ldap/users/{username}/mapping': { + readonly patch: operations['enterprise-admin/update-ldap-mapping-for-user'] + } + readonly '/admin/ldap/users/{username}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + readonly post: operations['enterprise-admin/sync-ldap-mapping-for-user'] + } + readonly '/admin/organizations': { + readonly post: operations['enterprise-admin/create-org'] + } + readonly '/admin/organizations/{org}': { + readonly patch: operations['enterprise-admin/update-org-name'] + } + readonly '/admin/pre-receive-environments': { + readonly get: operations['enterprise-admin/list-pre-receive-environments'] + readonly post: operations['enterprise-admin/create-pre-receive-environment'] + } + readonly '/admin/pre-receive-environments/{pre_receive_environment_id}': { + readonly get: operations['enterprise-admin/get-pre-receive-environment'] + /** + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ + */ + readonly delete: operations['enterprise-admin/delete-pre-receive-environment'] + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + readonly patch: operations['enterprise-admin/update-pre-receive-environment'] + } + readonly '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + readonly post: operations['enterprise-admin/start-pre-receive-environment-download'] + } + readonly '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + readonly get: operations['enterprise-admin/get-download-status-for-pre-receive-environment'] + } + readonly '/admin/pre-receive-hooks': { + readonly get: operations['enterprise-admin/list-pre-receive-hooks'] + readonly post: operations['enterprise-admin/create-pre-receive-hook'] + } + readonly '/admin/pre-receive-hooks/{pre_receive_hook_id}': { + readonly get: operations['enterprise-admin/get-pre-receive-hook'] + readonly delete: operations['enterprise-admin/delete-pre-receive-hook'] + readonly patch: operations['enterprise-admin/update-pre-receive-hook'] + } + readonly '/admin/tokens': { + /** Lists personal access tokens for all users, including admin users. */ + readonly get: operations['enterprise-admin/list-personal-access-tokens'] + } + readonly '/admin/tokens/{token_id}': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + readonly delete: operations['enterprise-admin/delete-personal-access-token'] + } + readonly '/admin/users': { + /** + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. + * + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. + */ + readonly post: operations['enterprise-admin/create-user'] + } + readonly '/admin/users/{username}': { + /** + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. + * + * You can delete any user account except your own. + */ + readonly delete: operations['enterprise-admin/delete-user'] + readonly patch: operations['enterprise-admin/update-username-for-user'] + } + readonly '/admin/users/{username}/authorizations': { + readonly post: operations['enterprise-admin/create-impersonation-o-auth-token'] + readonly delete: operations['enterprise-admin/delete-impersonation-o-auth-token'] + } readonly '/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/get-authenticated'] } readonly '/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`. */ + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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`. */ readonly post: operations['apps/create-from-manifest'] } readonly '/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly patch: operations['apps/update-webhook-config-for-app'] } @@ -38,7 +155,7 @@ export interface paths { /** * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/list-webhook-deliveries'] } @@ -46,7 +163,7 @@ export interface paths { /** * Returns a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/get-webhook-delivery'] } @@ -54,13 +171,13 @@ export interface paths { /** * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly post: operations['apps/redeliver-webhook-delivery'] } readonly '/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. */ @@ -70,13 +187,13 @@ export interface paths { /** * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly 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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly delete: operations['apps/delete-installation'] } @@ -84,37 +201,37 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly post: operations['apps/create-installation-access-token'] } readonly '/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. + * 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 Enterprise Server 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly delete: operations['apps/unsuspend-installation'] } readonly '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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"]`. + * 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/enterprise-server@3.6/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"]`. */ readonly get: operations['oauth-authorizations/list-grants'] } readonly '/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ readonly 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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). */ @@ -122,44 +239,44 @@ export interface paths { } readonly '/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. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). */ readonly delete: operations['apps/delete-authorization'] } readonly '/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`. */ + /** 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/enterprise-server@3.6/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`. */ readonly 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. */ + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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. */ readonly 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`. */ + /** 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/enterprise-server@3.6/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`. */ readonly patch: operations['apps/reset-token'] } readonly '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ readonly post: operations['apps/scope-token'] } readonly '/apps/{app_slug}': { /** * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ readonly get: operations['apps/get-by-slug'] } readonly '/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ readonly 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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ @@ -167,39 +284,39 @@ export interface paths { } readonly '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ readonly put: operations['oauth-authorizations/get-or-create-authorization-for-app'] } readonly '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ readonly put: operations['oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint'] } readonly '/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ readonly 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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ readonly 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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * You can only send one of these scope keys at a time. */ @@ -212,9 +329,75 @@ export interface paths { readonly get: operations['codes-of-conduct/get-conduct-code'] } readonly '/emojis': { - /** Lists all the emojis available to use on GitHub. */ + /** Lists all the emojis available to use on GitHub Enterprise Server. */ readonly get: operations['emojis/get'] } + readonly '/enterprise/announcement': { + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + readonly get: operations['enterprise-admin/get-announcement'] + /** Removes the global announcement banner in your enterprise. */ + readonly delete: operations['enterprise-admin/remove-announcement'] + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + readonly patch: operations['enterprise-admin/set-announcement'] + } + readonly '/enterprise/settings/license': { + readonly get: operations['enterprise-admin/get-license-information'] + } + readonly '/enterprise/stats/all': { + readonly get: operations['enterprise-admin/get-all-stats'] + } + readonly '/enterprise/stats/comments': { + readonly get: operations['enterprise-admin/get-comment-stats'] + } + readonly '/enterprise/stats/gists': { + readonly get: operations['enterprise-admin/get-gist-stats'] + } + readonly '/enterprise/stats/hooks': { + readonly get: operations['enterprise-admin/get-hooks-stats'] + } + readonly '/enterprise/stats/issues': { + readonly get: operations['enterprise-admin/get-issue-stats'] + } + readonly '/enterprise/stats/milestones': { + readonly get: operations['enterprise-admin/get-milestone-stats'] + } + readonly '/enterprise/stats/orgs': { + readonly get: operations['enterprise-admin/get-org-stats'] + } + readonly '/enterprise/stats/pages': { + readonly get: operations['enterprise-admin/get-pages-stats'] + } + readonly '/enterprise/stats/pulls': { + readonly get: operations['enterprise-admin/get-pull-request-stats'] + } + readonly '/enterprise/stats/repos': { + readonly get: operations['enterprise-admin/get-repo-stats'] + } + readonly '/enterprise/stats/users': { + readonly get: operations['enterprise-admin/get-user-stats'] + } + readonly '/enterprises/{enterprise}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + readonly get: operations['actions/get-actions-cache-usage-for-enterprise'] + } + readonly '/enterprises/{enterprise}/actions/cache/usage-policy': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + readonly get: operations['actions/get-actions-cache-usage-policy-for-enterprise'] + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + readonly patch: operations['actions/set-actions-cache-usage-policy-for-enterprise'] + } readonly '/enterprises/{enterprise}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. @@ -271,6 +454,25 @@ export interface paths { */ readonly put: operations['enterprise-admin/set-allowed-actions-enterprise'] } + readonly '/enterprises/{enterprise}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + readonly get: operations['actions/get-github-actions-default-workflow-permissions-enterprise'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + readonly put: operations['actions/set-github-actions-default-workflow-permissions-enterprise'] + } readonly '/enterprises/{enterprise}/actions/runner-groups': { /** * Lists all self-hosted runner groups for an enterprise. @@ -472,46 +674,19 @@ export interface paths { readonly '/enterprises/{enterprise}/secret-scanning/alerts': { /** * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ readonly get: operations['secret-scanning/list-alerts-for-enterprise'] } - readonly '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - readonly get: operations['billing/get-github-actions-billing-ghe'] - } readonly '/enterprises/{enterprise}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - readonly get: operations['billing/get-github-advanced-security-billing-ghe'] - } - readonly '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - readonly get: operations['billing/get-github-packages-billing-ghe'] - } - readonly '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * The authenticated user must be an enterprise admin. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - readonly get: operations['billing/get-shared-storage-billing-ghe'] + readonly get: operations['billing/get-github-advanced-security-billing-ghe'] } readonly '/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. */ @@ -519,17 +694,17 @@ export interface paths { } readonly '/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: + * GitHub Enterprise Server 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) + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server. * - * **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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ readonly get: operations['activity/get-feeds'] } @@ -547,7 +722,7 @@ export interface paths { /** * 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. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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. */ readonly get: operations['gists/list-public'] } @@ -558,7 +733,7 @@ export interface paths { readonly '/gists/{gist_id}': { readonly get: operations['gists/get'] readonly 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. */ + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ readonly patch: operations['gists/update'] } readonly '/gists/{gist_id}/comments': { @@ -575,12 +750,11 @@ export interface paths { } readonly '/gists/{gist_id}/forks': { readonly get: operations['gists/list-forks'] - /** **Note**: This was previously `/gists/:gist_id/fork`. */ readonly post: operations['gists/fork'] } readonly '/gists/{gist_id}/star': { readonly 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly put: operations['gists/star'] readonly delete: operations['gists/unstar'] } @@ -588,13 +762,13 @@ export interface paths { readonly get: operations['gists/get-revision'] } readonly '/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). */ + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ readonly get: operations['gitignore/get-all-templates'] } readonly '/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. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ readonly get: operations['gitignore/get-template'] } @@ -602,7 +776,7 @@ export interface paths { /** * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ readonly get: operations['apps/list-repos-accessible-to-installation'] } @@ -610,9 +784,9 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ readonly delete: operations['apps/revoke-installation-access-token'] } @@ -626,7 +800,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly get: operations['issues/list'] } @@ -643,60 +817,7 @@ export interface paths { /** 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. */ readonly post: operations['markdown/render-raw'] } - readonly '/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. - */ - readonly get: operations['apps/get-subscription-plan-for-account'] - } - readonly '/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. - */ - readonly get: operations['apps/list-plans'] - } - readonly '/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. - */ - readonly get: operations['apps/list-accounts-for-plan'] - } - readonly '/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. - */ - readonly get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - readonly '/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. - */ - readonly get: operations['apps/list-plans-stubbed'] - } - readonly '/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. - */ - readonly get: operations['apps/list-accounts-for-plan-stubbed'] - } readonly '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ readonly get: operations['meta/get'] } readonly '/networks/{owner}/{repo}/events': { @@ -705,16 +826,18 @@ export interface paths { readonly '/notifications': { /** List all notifications for the current user, sorted by most recently updated. */ readonly 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`. */ + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ readonly put: operations['activity/mark-notifications-as-read'] } readonly '/notifications/threads/{thread_id}': { + /** Gets information about a notification thread. */ readonly get: operations['activity/get-thread'] + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ readonly patch: operations['activity/mark-thread-as-read'] } readonly '/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). + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/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. */ @@ -724,10 +847,10 @@ export interface paths { * * 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. + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ readonly 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`. */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ readonly delete: operations['activity/delete-thread-subscription'] } readonly '/octocat': { @@ -736,9 +859,9 @@ export interface paths { } readonly '/organizations': { /** - * Lists all organizations, in the order that they were created on GitHub. + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * **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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ readonly get: operations['orgs/list'] } @@ -747,32 +870,43 @@ export interface paths { * List the custom repository roles available in this organization. In order to see custom * repository roles in an organization, the authenticated user must be an organization owner. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - readonly get: operations['orgs/list-custom-roles'] - } - readonly '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - readonly get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + readonly get: operations['orgs/list-custom-roles'] } readonly '/orgs/{org}': { /** * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." */ readonly 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). + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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. */ readonly patch: operations['orgs/update'] } + readonly '/orgs/{org}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + readonly get: operations['actions/get-actions-cache-usage-for-org'] + } + readonly '/orgs/{org}/actions/cache/usage-by-repository': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + readonly get: operations['actions/get-actions-cache-usage-by-repo-for-org'] + } readonly '/orgs/{org}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. @@ -838,14 +972,16 @@ export interface paths { readonly '/orgs/{org}/actions/permissions/workflow': { /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ readonly get: operations['actions/get-github-actions-default-workflow-permissions-organization'] /** * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ @@ -853,10 +989,7 @@ export interface paths { } readonly '/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. */ readonly get: operations['actions/list-self-hosted-runner-groups-for-org'] @@ -871,26 +1004,17 @@ export interface paths { } readonly '/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. */ readonly 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. */ readonly 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. */ readonly patch: operations['actions/update-self-hosted-runner-group-for-org'] @@ -905,70 +1029,43 @@ export interface paths { */ readonly 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. */ readonly put: operations['actions/set-repo-access-to-self-hosted-runner-group-in-org'] } readonly '/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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ readonly 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. */ readonly delete: operations['actions/remove-repo-access-to-self-hosted-runner-group-in-org'] } readonly '/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. */ readonly 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. */ readonly put: operations['actions/set-self-hosted-runners-in-group-for-org'] } readonly '/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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ readonly 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. */ readonly delete: operations['actions/remove-self-hosted-runner-from-group-for-org'] @@ -1171,58 +1268,37 @@ export interface paths { readonly '/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. */ readonly 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. */ + /** 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/enterprise-server@3.6/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. */ readonly put: operations['actions/set-selected-repos-for-org-secret'] } readonly '/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. */ + /** 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/enterprise-server@3.6/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. */ readonly 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. */ + /** 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/enterprise-server@3.6/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. */ readonly delete: operations['actions/remove-selected-repo-from-org-secret'] } readonly '/orgs/{org}/audit-log': { /** - * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ readonly get: operations['orgs/get-audit-log'] } - readonly '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - readonly get: operations['orgs/list-blocked-users'] - } - readonly '/orgs/{org}/blocks/{username}': { - readonly get: operations['orgs/check-blocked-user'] - readonly put: operations['orgs/block-user'] - readonly delete: operations['orgs/unblock-user'] - } readonly '/orgs/{org}/code-scanning/alerts': { /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * * GitHub Apps must have the `security_events` read permission to use this endpoint. */ readonly get: operations['code-scanning/list-alerts-for-org'] } - readonly '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - readonly get: operations['orgs/list-saml-sso-authorizations'] - } - readonly '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - readonly delete: operations['orgs/remove-saml-sso-authorization'] - } readonly '/orgs/{org}/dependabot/secrets': { /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ readonly get: operations['dependabot/list-org-secrets'] @@ -1318,13 +1394,13 @@ export interface paths { readonly '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ readonly get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ readonly put: operations['dependabot/set-selected-repos-for-org-secret'] } readonly '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ readonly put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ readonly delete: operations['dependabot/remove-selected-repo-from-org-secret'] } readonly '/orgs/{org}/events': { @@ -1334,22 +1410,18 @@ export interface paths { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ readonly get: operations['teams/external-idp-group-info-for-org'] } readonly '/orgs/{org}/external-groups': { /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ readonly get: operations['teams/list-external-idp-groups-for-org'] } - readonly '/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. */ - readonly get: operations['orgs/list-failed-invitations'] - } readonly '/orgs/{org}/hooks': { readonly get: operations['orgs/list-webhooks'] /** Here's how you can create a hook that posts payloads in JSON format: */ @@ -1389,14 +1461,14 @@ export interface paths { readonly post: operations['orgs/redeliver-webhook-delivery'] } readonly '/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. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ readonly post: operations['orgs/ping-webhook'] } readonly '/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/get-org-installation'] } @@ -1404,36 +1476,6 @@ export interface paths { /** 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. */ readonly get: operations['orgs/list-app-installations'] } - readonly '/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. */ - readonly 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. */ - readonly 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. */ - readonly delete: operations['interactions/remove-restrictions-for-org'] - } - readonly '/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`. */ - readonly get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly post: operations['orgs/create-invitation'] - } - readonly '/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). - */ - readonly delete: operations['orgs/cancel-invitation'] - } - readonly '/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. */ - readonly get: operations['orgs/list-invitation-teams'] - } readonly '/orgs/{org}/issues': { /** * List issues in an organization assigned to the authenticated user. @@ -1441,7 +1483,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly get: operations['issues/list-for-org'] } @@ -1461,7 +1503,7 @@ export interface paths { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -1496,114 +1538,31 @@ export interface paths { */ readonly get: operations['migrations/get-status-for-org'] } - readonly '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - readonly get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - readonly delete: operations['migrations/delete-archive-for-org'] - } - readonly '/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. */ - readonly delete: operations['migrations/unlock-repo-for-org'] - } - readonly '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - readonly get: operations['migrations/list-repos-for-org'] - } readonly '/orgs/{org}/outside_collaborators': { /** List all users who are outside collaborators of an organization. */ readonly get: operations['orgs/list-outside-collaborators'] } readonly '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ readonly put: operations['orgs/convert-member-to-outside-collaborator'] /** Removing a user from this list will remove them from all the organization's repositories. */ readonly delete: operations['orgs/remove-outside-collaborator'] } - readonly '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly get: operations['packages/list-packages-for-organization'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly delete: operations['packages/delete-package-for-org'] - } - readonly '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly post: operations['packages/restore-package-for-org'] - } - readonly '/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. - */ - readonly get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly delete: operations['packages/delete-package-version-for-org'] + readonly '/orgs/{org}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + readonly get: operations['enterprise-admin/list-pre-receive-hooks-for-org'] } - readonly '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly post: operations['packages/restore-package-version-for-org'] + readonly '/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}': { + readonly get: operations['enterprise-admin/get-pre-receive-hook-for-org'] + /** Removes any overrides for this hook at the org level for this org. */ + readonly delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-org'] + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + readonly patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-org'] } readonly '/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. */ readonly 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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ readonly post: operations['projects/create-for-org'] } readonly '/orgs/{org}/public_members': { @@ -1615,7 +1574,7 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly put: operations['orgs/set-public-membership-for-authenticated-user'] readonly delete: operations['orgs/remove-public-membership-for-authenticated-user'] @@ -1628,7 +1587,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -1639,56 +1598,23 @@ export interface paths { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ readonly get: operations['secret-scanning/list-alerts-for-org'] } - readonly '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly get: operations['billing/get-github-actions-billing-org'] - } readonly '/orgs/{org}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - readonly get: operations['billing/get-github-advanced-security-billing-org'] - } - readonly '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly get: operations['billing/get-github-packages-billing-org'] - } - readonly '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly get: operations['billing/get-shared-storage-billing-org'] - } - readonly '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. * - * 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 total number of repositories with committer information is tracked by the `total_count` field. */ - readonly get: operations['teams/list-idp-groups-for-org'] + readonly get: operations['billing/get-github-advanced-security-billing-org'] } readonly '/orgs/{org}/teams': { /** Lists all teams in an organization that are visible to the authenticated user. */ @@ -1702,7 +1628,7 @@ export interface paths { } readonly '/orgs/{org}/teams/{team_slug}': { /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ @@ -1724,15 +1650,15 @@ export interface paths { } readonly '/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -1740,19 +1666,19 @@ export interface paths { } readonly '/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/). + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 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/). + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 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/). + * 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/enterprise-server@3.6/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}`. */ @@ -1760,15 +1686,15 @@ export interface paths { } readonly '/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -1776,19 +1702,19 @@ export interface paths { } readonly '/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/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ @@ -1796,13 +1722,13 @@ export interface paths { } readonly '/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly get: operations['reactions/list-for-team-discussion-comment-in-org'] /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -1812,19 +1738,19 @@ export interface paths { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly delete: operations['reactions/delete-for-team-discussion-comment'] } readonly '/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly get: operations['reactions/list-for-team-discussion-in-org'] /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -1834,32 +1760,30 @@ export interface paths { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly delete: operations['reactions/delete-for-team-discussion'] } readonly '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + readonly get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ readonly delete: operations['teams/unlink-external-idp-group-from-team-for-org'] /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ readonly patch: operations['teams/link-external-idp-group-to-team-for-org'] } - readonly '/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`. - */ - readonly get: operations['teams/list-pending-invitations-in-org'] - } readonly '/orgs/{org}/teams/{team_slug}/members': { /** * Team members will include the members of child teams. @@ -1879,7 +1803,7 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ readonly get: operations['teams/get-membership-for-user-in-org'] /** @@ -1887,7 +1811,7 @@ export interface paths { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -1901,7 +1825,7 @@ export interface paths { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -1947,7 +1871,7 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -1955,7 +1879,7 @@ export interface paths { */ readonly 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)." + * 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/enterprise-server@3.6/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}`. * @@ -1969,24 +1893,6 @@ export interface paths { */ readonly delete: operations['teams/remove-repo-in-org'] } - readonly '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - readonly get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - readonly patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } readonly '/orgs/{org}/teams/{team_slug}/teams': { /** * Lists the child teams of the team specified by `{team_slug}`. @@ -2049,14 +1955,6 @@ export interface paths { */ readonly get: operations['rate-limit/get'] } - readonly '/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). - */ - readonly delete: operations['reactions/delete-legacy'] - } readonly '/repos/{owner}/{repo}': { /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ readonly get: operations['repos/get'] @@ -2067,7 +1965,7 @@ export interface paths { * repositories, you will get a `403 Forbidden` response. */ readonly 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ readonly patch: operations['repos/update'] } readonly '/repos/{owner}/{repo}/actions/artifacts': { @@ -2089,6 +1987,28 @@ export interface paths { */ readonly get: operations['actions/download-artifact'] } + readonly '/repos/{owner}/{repo}/actions/cache/usage': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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. + */ + readonly get: operations['actions/get-actions-cache-usage'] + } + readonly '/repos/{owner}/{repo}/actions/cache/usage-policy': { + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + readonly get: operations['actions/get-actions-cache-usage-policy'] + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + readonly patch: operations['actions/set-actions-cache-usage-policy'] + } readonly '/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. */ readonly get: operations['actions/get-job-for-workflow-run'] @@ -2102,12 +2022,15 @@ export interface paths { */ readonly get: operations['actions/download-job-logs-for-workflow-run'] } + readonly '/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun': { + /** Re-run a job and its dependent jobs in 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. */ + readonly post: operations['actions/re-run-job-for-workflow-run'] + } readonly '/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. + * 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. */ readonly get: operations['actions/get-github-actions-permissions-repository'] /** @@ -2119,6 +2042,24 @@ export interface paths { */ readonly put: operations['actions/set-github-actions-permissions-repository'] } + readonly '/repos/{owner}/{repo}/actions/permissions/access': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + readonly get: operations['actions/get-workflow-access-to-repository'] + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + readonly put: operations['actions/set-workflow-access-to-repository'] + } readonly '/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)." @@ -2137,6 +2078,24 @@ export interface paths { */ readonly put: operations['actions/set-allowed-actions-repository'] } + readonly '/repos/{owner}/{repo}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + readonly get: operations['actions/get-github-actions-default-workflow-permissions-repository'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + readonly put: operations['actions/set-github-actions-default-workflow-permissions-repository'] + } readonly '/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. */ readonly get: operations['actions/list-self-hosted-runners-for-repo'] @@ -2242,7 +2201,7 @@ export interface paths { } readonly '/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). + * 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/enterprise-server@3.6/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. */ @@ -2262,14 +2221,6 @@ export interface paths { /** 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. */ readonly get: operations['actions/get-reviews-for-run'] } - readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - readonly post: operations['actions/approve-workflow-run'] - } readonly '/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. */ readonly get: operations['actions/list-workflow-run-artifacts'] @@ -2284,7 +2235,7 @@ export interface paths { readonly get: operations['actions/get-workflow-run-attempt'] } readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ readonly get: operations['actions/list-jobs-for-workflow-run-attempt'] } readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { @@ -2301,7 +2252,7 @@ export interface paths { readonly post: operations['actions/cancel-workflow-run'] } readonly '/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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ readonly get: operations['actions/list-jobs-for-workflow-run'] } readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { @@ -2325,7 +2276,7 @@ export interface paths { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ readonly post: operations['actions/review-pending-deployments-for-run'] } @@ -2333,13 +2284,9 @@ export interface paths { /** 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. */ readonly post: operations['actions/re-run-workflow'] } - readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - readonly get: operations['actions/get-workflow-run-usage'] + readonly '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + readonly post: operations['actions/re-run-workflow-failed-jobs'] } readonly '/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. */ @@ -2469,20 +2416,12 @@ export interface paths { } readonly '/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). + * 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/enterprise-server@3.6/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. */ readonly get: operations['actions/list-workflow-runs'] } - readonly '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - readonly get: operations['actions/get-workflow-usage'] - } readonly '/repos/{owner}/{repo}/assignees': { /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ readonly get: operations['issues/list-assignees'] @@ -2521,12 +2460,6 @@ export interface paths { */ readonly delete: operations['repos/delete-autolink'] } - readonly '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - readonly put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - readonly delete: operations['repos/disable-automated-security-fixes'] - } readonly '/repos/{owner}/{repo}/branches': { readonly get: operations['repos/list-branches'] } @@ -2757,7 +2690,7 @@ export interface paths { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -2803,7 +2736,7 @@ export interface paths { } readonly '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ @@ -2813,12 +2746,12 @@ export interface paths { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. */ readonly post: operations['checks/create-suite'] } readonly '/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. */ + /** 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/enterprise-server@3.6/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ readonly patch: operations['checks/set-suites-preferences'] } readonly '/repos/{owner}/{repo}/check-suites/{check_suite_id}': { @@ -2839,7 +2772,7 @@ export interface paths { } readonly '/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. + * 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/enterprise-server@3.6/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. */ @@ -2847,16 +2780,16 @@ export interface paths { } readonly '/repos/{owner}/{repo}/code-scanning/alerts': { /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ readonly get: operations['code-scanning/list-alerts-for-repo'] } @@ -2949,8 +2882,7 @@ export interface paths { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -3021,33 +2953,20 @@ export interface paths { /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ readonly get: operations['code-scanning/get-sarif'] } - readonly '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/list-in-repository-for-authenticated-user'] + readonly '/repos/{owner}/{repo}/codeowners/errors': { /** - * Creates a codespace owned by the authenticated user in the specified repository. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - readonly post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - readonly '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/repo-machines-for-authenticated-user'] + readonly get: operations['repos/codeowners-errors'] } readonly '/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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. * @@ -3069,17 +2988,23 @@ export interface paths { */ readonly get: operations['repos/check-collaborator'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} * ``` * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). * - * 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). + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. * * **Rate limits** * @@ -3094,7 +3019,7 @@ export interface paths { } readonly '/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/). + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). * * Comments are ordered by ascending ID. */ @@ -3106,16 +3031,16 @@ export interface paths { readonly patch: operations['repos/update-commit-comment'] } readonly '/repos/{owner}/{repo}/comments/{comment_id}/reactions': { - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ readonly get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ readonly post: operations['reactions/create-for-commit-comment'] } readonly '/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 a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ readonly delete: operations['reactions/delete-for-commit-comment'] } @@ -3166,12 +3091,12 @@ export interface paths { /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['repos/create-commit-comment'] } readonly '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ readonly get: operations['repos/list-pull-requests-associated-with-commit'] } readonly '/repos/{owner}/{repo}/commits/{ref}': { @@ -3180,9 +3105,9 @@ export interface paths { * * **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. + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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. + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/enterprise-server@3.6/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** * @@ -3252,28 +3177,11 @@ export interface paths { */ readonly get: operations['repos/list-commit-statuses-for-ref'] } - readonly '/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. - */ - readonly get: operations['repos/get-community-profile-metrics'] - } readonly '/repos/{owner}/{repo}/compare/{basehead}': { /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * The response 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/enterprise-server@3.6/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. * @@ -3319,16 +3227,21 @@ export interface paths { * 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 + * Files and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/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 + * type](https://docs.github.com/enterprise-server@3.6/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). + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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. + * API](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -3350,7 +3263,11 @@ export interface paths { * github.com URLs (`html_url` and `_links["html"]`) will have null values. */ readonly get: operations['repos/get-content'] - /** Creates a new file or replaces an existing file in a repository. */ + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ readonly put: operations['repos/create-or-update-file-contents'] /** * Deletes a file in a repository. @@ -3360,6 +3277,8 @@ export interface paths { * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ readonly delete: operations['repos/delete-file'] } @@ -3463,13 +3382,17 @@ export interface paths { /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ readonly delete: operations['dependabot/delete-repo-secret'] } + readonly '/repos/{owner}/{repo}/dependency-graph/compare/{basehead}': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + readonly get: operations['dependency-graph/diff-range'] + } readonly '/repos/{owner}/{repo}/deployments': { /** Simple filtering of deployments is available via query parameters: */ readonly 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 + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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 @@ -3481,7 +3404,7 @@ export interface paths { * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will * return a failure response. * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. @@ -3525,7 +3448,7 @@ export interface paths { * * 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)." + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ readonly delete: operations['repos/delete-deployment'] } @@ -3545,7 +3468,7 @@ export interface paths { } readonly '/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)." + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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. * @@ -3560,28 +3483,68 @@ export interface paths { } readonly '/repos/{owner}/{repo}/environments': { /** - * Get all environments for a repository. + * Lists the 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. */ readonly get: operations['repos/get-all-environments'] } readonly '/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. */ + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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. + */ readonly 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 name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." * * **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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ readonly put: operations['repos/create-or-update-environment'] /** You must authenticate using an access token with the repo scope to use this endpoint. */ readonly delete: operations['repos/delete-an-environment'] } + readonly '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies': { + /** + * Lists the deployment branch policies for an environment. + * + * 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. + */ + readonly get: operations['repos/list-deployment-branch-policies'] + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly post: operations['repos/create-deployment-branch-policy'] + } + readonly '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}': { + /** + * Gets a deployment branch policy for an environment. + * + * 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. + */ + readonly get: operations['repos/get-deployment-branch-policy'] + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly put: operations['repos/update-deployment-branch-policy'] + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly delete: operations['repos/delete-deployment-branch-policy'] + } readonly '/repos/{owner}/{repo}/events': { readonly get: operations['activity/list-repo-events'] } @@ -3590,7 +3553,7 @@ export interface paths { /** * Create a fork for the authenticated user. * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ readonly post: operations['repos/create-fork'] } @@ -3616,7 +3579,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3651,7 +3614,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3681,7 +3644,7 @@ export interface paths { * * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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`. */ @@ -3691,7 +3654,7 @@ export interface paths { /** * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". */ readonly get: operations['git/get-ref'] } @@ -3705,7 +3668,7 @@ export interface paths { } readonly '/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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. * * **Signature verification object** * @@ -3775,7 +3738,9 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. */ readonly post: operations['git/create-tree'] } @@ -3784,10 +3749,14 @@ export interface paths { * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ readonly get: operations['git/get-tree'] } readonly '/repos/{owner}/{repo}/hooks': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ readonly get: operations['repos/list-webhooks'] /** * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can @@ -3829,7 +3798,7 @@ export interface paths { readonly post: operations['repos/redeliver-webhook-delivery'] } readonly '/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. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ readonly post: operations['repos/ping-webhook'] } readonly '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { @@ -3840,90 +3809,14 @@ export interface paths { */ readonly post: operations['repos/test-push-webhook'] } - readonly '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - readonly get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - readonly put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - readonly 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. - */ - readonly patch: operations['migrations/update-import'] - } - readonly '/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. - */ - readonly get: operations['migrations/get-commit-authors'] - } - readonly '/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. */ - readonly patch: operations['migrations/map-commit-author'] - } - readonly '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - readonly get: operations['migrations/get-large-files'] - } - readonly '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - readonly patch: operations['migrations/set-lfs-preference'] - } readonly '/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/get-repo-installation'] } - readonly '/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. */ - readonly 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. */ - readonly 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. */ - readonly delete: operations['interactions/remove-restrictions-for-repo'] - } readonly '/repos/{owner}/{repo}/invitations': { /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ readonly get: operations['repos/list-invitations'] @@ -3939,13 +3832,13 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly get: operations['issues/list-for-repo'] /** * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['issues/create'] } @@ -3959,16 +3852,16 @@ export interface paths { readonly patch: operations['issues/update-comment'] } readonly '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions': { - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ readonly get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ readonly post: operations['reactions/create-for-issue-comment'] } readonly '/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 a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ readonly delete: operations['reactions/delete-for-issue-comment'] } @@ -3980,17 +3873,17 @@ export interface paths { } readonly '/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 + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly get: operations['issues/get'] /** Issue owners and users with push access can edit an issue. */ @@ -4005,7 +3898,7 @@ export interface paths { readonly '/repos/{owner}/{repo}/issues/{issue_number}/comments': { /** Issue Comments are ordered by ascending ID. */ readonly get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['issues/create-comment'] } readonly '/repos/{owner}/{repo}/issues/{issue_number}/events': { @@ -4026,23 +3919,23 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly put: operations['issues/lock'] /** Users with push access can unlock an issue's conversation. */ readonly delete: operations['issues/unlock'] } readonly '/repos/{owner}/{repo}/issues/{issue_number}/reactions': { - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ readonly get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ readonly post: operations['reactions/create-for-issue'] } readonly '/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 a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ readonly delete: operations['reactions/delete-for-issue'] } @@ -4080,7 +3973,7 @@ export interface paths { /** * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ readonly get: operations['licenses/get-for-repo'] } @@ -4104,17 +3997,18 @@ export interface paths { readonly get: operations['issues/list-labels-for-milestone'] } readonly '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ + /** Lists all notifications for the current user in the specified repository. */ readonly 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`. */ + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ readonly put: operations['activity/mark-repo-notifications-as-read'] } readonly '/repos/{owner}/{repo}/pages': { readonly 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). */ + /** Updates information for a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ readonly 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)." */ + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ readonly post: operations['repos/create-pages-site'] + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ readonly delete: operations['repos/delete-pages-site'] } readonly '/repos/{owner}/{repo}/pages/builds': { @@ -4132,20 +4026,25 @@ export interface paths { readonly '/repos/{owner}/{repo}/pages/builds/{build_id}': { readonly get: operations['repos/get-pages-build'] } - readonly '/repos/{owner}/{repo}/pages/health': { + readonly '/repos/{owner}/{repo}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + readonly get: operations['enterprise-admin/list-pre-receive-hooks-for-repo'] + } + readonly '/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}': { + readonly get: operations['enterprise-admin/get-pre-receive-hook-for-repo'] /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * Deletes any overridden enforcement on this repository for the specified hook. * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + * Responds with effective values inherited from owner and/or global level. */ - readonly get: operations['repos/get-pages-health-check'] + readonly delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-repo'] + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + readonly patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-repo'] } readonly '/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. */ readonly 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. */ + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ readonly post: operations['projects/create-for-repo'] } readonly '/repos/{owner}/{repo}/pulls': { @@ -4156,9 +4055,7 @@ export interface paths { * * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ readonly post: operations['pulls/create'] } @@ -4175,16 +4072,16 @@ export interface paths { readonly patch: operations['pulls/update-review-comment'] } readonly '/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). */ + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ readonly get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ readonly post: operations['reactions/create-for-pull-request-review-comment'] } readonly '/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 a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ readonly delete: operations['reactions/delete-for-pull-request-comment'] } @@ -4194,9 +4091,9 @@ export interface paths { * * 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)". + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Server 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: * @@ -4204,7 +4101,7 @@ export interface paths { * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ readonly get: operations['pulls/get'] /** @@ -4214,25 +4111,17 @@ export interface paths { */ readonly patch: operations['pulls/update'] } - readonly '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly post: operations['codespaces/create-with-pr-for-authenticated-user'] - } readonly '/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. */ readonly 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. + * 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/enterprise-server@3.6/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. + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['pulls/create-review-comment'] } @@ -4240,12 +4129,12 @@ export interface paths { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['pulls/create-reply-for-review-comment'] } readonly '/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. */ + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ readonly get: operations['pulls/list-commits'] } readonly '/repos/{owner}/{repo}/pulls/{pull_number}/files': { @@ -4254,12 +4143,13 @@ export interface paths { } readonly '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { readonly get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly put: operations['pulls/merge'] } readonly '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ readonly get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['pulls/request-reviewers'] readonly delete: operations['pulls/remove-requested-reviewers'] } @@ -4267,11 +4157,11 @@ export interface paths { /** The list of reviews returns in chronological order. */ readonly get: operations['pulls/list-reviews'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." * - * **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. + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. */ @@ -4288,10 +4178,11 @@ export interface paths { readonly get: operations['pulls/list-comments-for-review'] } readonly '/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. */ + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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. */ readonly put: operations['pulls/dismiss-review'] } readonly '/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ readonly post: operations['pulls/submit-review'] } readonly '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { @@ -4302,7 +4193,7 @@ export interface paths { /** * 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. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ readonly get: operations['repos/get-readme'] } @@ -4310,13 +4201,13 @@ export interface paths { /** * Gets the README from a repository directory. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ readonly get: operations['repos/get-readme-in-directory'] } readonly '/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). + * 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/enterprise-server@3.6/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. */ @@ -4324,19 +4215,19 @@ export interface paths { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['repos/create-release'] } readonly '/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. */ + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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. */ readonly get: operations['repos/get-release-asset'] readonly delete: operations['repos/delete-release-asset'] /** Users with push access to the repository can edit a release asset. */ readonly patch: operations['repos/update-release-asset'] } readonly '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ readonly post: operations['repos/generate-release-notes'] } readonly '/repos/{owner}/{repo}/releases/latest': { @@ -4352,7 +4243,7 @@ export interface paths { readonly get: operations['repos/get-release-by-tag'] } readonly '/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). */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ readonly get: operations['repos/get-release'] /** Users with push access to the repository can delete a release. */ readonly delete: operations['repos/delete-release'] @@ -4362,8 +4253,8 @@ export interface paths { readonly '/repos/{owner}/{repo}/releases/{release_id}/assets': { readonly 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. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * @@ -4371,25 +4262,41 @@ export interface paths { * * `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, + * GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, * you'll still need to pass your authentication to be able to upload an asset. * * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. * * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ readonly post: operations['repos/upload-release-asset'] } readonly '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + readonly get: operations['reactions/list-for-release'] + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ readonly post: operations['reactions/create-for-release'] } + readonly '/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + readonly delete: operations['reactions/delete-for-release'] + } + readonly '/repos/{owner}/{repo}/replicas/caches': { + /** Lists the status of each repository cache replica. */ + readonly get: operations['repos/list-cache-info'] + } readonly '/repos/{owner}/{repo}/secret-scanning/alerts': { /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4397,13 +4304,17 @@ export interface paths { } readonly '/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. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ readonly 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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -4411,7 +4322,9 @@ export interface paths { } readonly '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4421,7 +4334,7 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ readonly get: operations['activity/list-stargazers-for-repo'] } @@ -4478,14 +4391,34 @@ export interface paths { } readonly '/repos/{owner}/{repo}/subscription': { readonly 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. */ + /** 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/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ readonly 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). */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ readonly delete: operations['activity/delete-repo-subscription'] } readonly '/repos/{owner}/{repo}/tags': { readonly get: operations['repos/list-tags'] } + readonly '/repos/{owner}/{repo}/tags/protection': { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + readonly get: operations['repos/list-tag-protection'] + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + readonly post: operations['repos/create-tag-protection'] + } + readonly '/repos/{owner}/{repo}/tags/protection/{tag_protection_id}': { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + readonly delete: operations['repos/delete-tag-protection'] + } readonly '/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 @@ -4502,50 +4435,27 @@ export interface paths { readonly get: operations['repos/get-all-topics'] readonly put: operations['repos/replace-all-topics'] } - readonly '/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. */ - readonly get: operations['repos/get-clones'] - } - readonly '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - readonly get: operations['repos/get-top-paths'] - } - readonly '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - readonly get: operations['repos/get-top-referrers'] - } - readonly '/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. */ - readonly get: operations['repos/get-views'] - } readonly '/repos/{owner}/{repo}/transfer': { /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ readonly post: operations['repos/transfer'] } - readonly '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly delete: operations['repos/disable-vulnerability-alerts'] - } readonly '/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. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ readonly get: operations['repos/download-zipball-archive'] } readonly '/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`. + * 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. If the repository is not public, 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/enterprise-server@3.6/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: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -4558,7 +4468,7 @@ export interface paths { * * Note: * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ readonly get: operations['repos/list-public'] } @@ -4688,20 +4598,20 @@ export interface paths { * * 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 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 Enterprise Server. 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: + * 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 Enterprise Server 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 is granted access by the IdP and is not a member of the GitHub Enterprise Server 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. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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. + * 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ readonly get: operations['enterprise-admin/list-provisioned-identities-enterprise'] /** @@ -4750,65 +4660,11 @@ export interface paths { */ readonly patch: operations['enterprise-admin/update-attribute-for-enterprise-user'] } - readonly '/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. - */ - readonly get: operations['scim/list-provisioned-identities'] - /** Provision organization membership for a user, and send an activation email to the email address. */ - readonly post: operations['scim/provision-and-invite-user'] - } - readonly '/scim/v2/organizations/{org}/Users/{scim_user_id}': { - readonly 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}`. - */ - readonly put: operations['scim/set-information-for-provisioned-user'] - readonly 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 - * } - * }] - * } - * ``` - */ - readonly patch: operations['scim/update-attribute-for-user'] - } readonly '/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). + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4829,10 +4685,10 @@ export interface paths { } readonly '/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). + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * metadata](https://docs.github.com/enterprise-server@3.6/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: * @@ -4842,10 +4698,10 @@ export interface paths { } readonly '/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). + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. * @@ -4859,9 +4715,9 @@ export interface paths { } readonly '/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). + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4873,9 +4729,9 @@ export interface paths { } readonly '/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). + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4887,9 +4743,9 @@ export interface paths { } readonly '/search/topics': { /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * 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/enterprise-server@3.6/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: * @@ -4901,9 +4757,9 @@ export interface paths { } readonly '/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). + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * * For example, if you're looking for a list of popular users, you might try this query: * @@ -4913,11 +4769,85 @@ export interface paths { */ readonly get: operations['search/users'] } + readonly '/setup/api/configcheck': { + /** + * This endpoint allows you to check the status of the most recent configuration process: + * + * Note that you may need to wait several seconds after you start a process before you can check its status. + * + * The different statuses are: + * + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | + */ + readonly get: operations['enterprise-admin/get-configuration-status'] + } + readonly '/setup/api/configure': { + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + readonly post: operations['enterprise-admin/start-configuration-process'] + } + readonly '/setup/api/maintenance': { + /** Check your installation's maintenance status: */ + readonly get: operations['enterprise-admin/get-maintenance-status'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly post: operations['enterprise-admin/enable-or-disable-maintenance-mode'] + } + readonly '/setup/api/settings': { + /** + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). + * + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + readonly get: operations['enterprise-admin/get-settings'] + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + * + * **Notes:** + * + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + */ + readonly put: operations['enterprise-admin/set-settings'] + } + readonly '/setup/api/settings/authorized-keys': { + readonly get: operations['enterprise-admin/get-all-authorized-ssh-keys'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly post: operations['enterprise-admin/add-authorized-ssh-key'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly delete: operations['enterprise-admin/remove-authorized-ssh-key'] + } + readonly '/setup/api/start': { + /** + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. + * + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. + * + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: + * + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + readonly post: operations['enterprise-admin/create-enterprise-server-license'] + } + readonly '/setup/api/upgrade': { + /** + * This API upgrades your license and also triggers the configuration process. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + readonly post: operations['enterprise-admin/upgrade-license'] + } readonly '/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. */ + /** **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/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * * To delete a team, the authenticated user must be an organization owner or team maintainer. * @@ -4925,7 +4855,7 @@ export interface paths { */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) endpoint. * * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * @@ -4935,115 +4865,107 @@ export interface paths { } readonly '/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. + * **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/enterprise-server@3.6/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['teams/create-discussion-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly patch: operations['teams/update-discussion-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ readonly post: operations['teams/create-discussion-comment-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly patch: operations['teams/update-discussion-comment-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ readonly post: operations['reactions/create-for-team-discussion-comment-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ readonly post: operations['reactions/create-for-team-discussion-legacy'] } - readonly '/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`. - */ - readonly get: operations['teams/list-pending-invitations-legacy'] - } readonly '/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. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * * Team members will include the members of child teams. */ @@ -5053,7 +4975,7 @@ export interface paths { /** * 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. + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5061,33 +4983,33 @@ export interface paths { /** * 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. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly 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. + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ readonly delete: operations['teams/remove-member-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. * * Team members will include the members of child teams. * @@ -5096,17 +5018,17 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. * @@ -5114,19 +5036,19 @@ export interface paths { */ readonly 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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ readonly delete: operations['teams/remove-membership-for-user-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * * Lists the organization projects for a team. */ @@ -5134,72 +5056,54 @@ export interface paths { } readonly '/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. + * **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/enterprise-server@3.6/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. */ readonly 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. + * **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/enterprise-server@3.6/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. */ readonly 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. + * **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/enterprise-server@3.6/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. */ readonly delete: operations['teams/remove-project-legacy'] } readonly '/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. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ readonly get: operations['teams/list-repos-legacy'] } readonly '/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. + * **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/enterprise-server@3.6/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: + * 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ readonly 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. + * **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/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly 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. + * **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/enterprise-server@3.6/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. */ readonly delete: operations['teams/remove-repo-legacy'] } - readonly '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - readonly get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - readonly patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } readonly '/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. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ readonly get: operations['teams/list-child-legacy'] } readonly '/user': { @@ -5212,218 +5116,6 @@ export interface paths { /** **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. */ readonly patch: operations['users/update-authenticated'] } - readonly '/user/blocks': { - /** List the users you've blocked on your personal account. */ - readonly get: operations['users/list-blocked-by-authenticated-user'] - } - readonly '/user/blocks/{username}': { - readonly get: operations['users/check-blocked'] - readonly put: operations['users/block'] - readonly delete: operations['users/unblock'] - } - readonly '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly post: operations['codespaces/create-for-authenticated-user'] - } - readonly '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly get: operations['codespaces/list-secrets-for-authenticated-user'] - } - readonly '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - readonly get: operations['codespaces/get-public-key-for-authenticated-user'] - } - readonly '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - readonly put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - readonly delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - readonly '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - readonly '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly patch: operations['codespaces/update-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - readonly post: operations['codespaces/export-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/get-export-details-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly post: operations['codespaces/start-for-authenticated-user'] - } - readonly '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly post: operations['codespaces/stop-for-authenticated-user'] - } - readonly '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - readonly patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } readonly '/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. */ readonly get: operations['users/list-emails-for-authenticated-user'] @@ -5443,7 +5135,7 @@ export interface paths { readonly '/user/following/{username}': { readonly 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)." + * 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/enterprise-server@3.6/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. */ @@ -5452,22 +5144,22 @@ export interface paths { readonly delete: operations['users/unfollow'] } readonly '/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly post: operations['users/create-gpg-key-for-authenticated-user'] } readonly '/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly delete: operations['users/delete-gpg-key-for-authenticated-user'] } readonly '/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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -5481,7 +5173,7 @@ export interface paths { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5491,24 +5183,16 @@ export interface paths { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ readonly put: operations['apps/add-repo-to-installation-for-authenticated-user'] /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ readonly delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] } - readonly '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - readonly 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. */ - readonly put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - readonly delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } readonly '/user/issues': { /** * List issues across owned and member repositories assigned to the authenticated user. @@ -5516,30 +5200,22 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly get: operations['issues/list-for-authenticated-user'] } readonly '/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly post: operations['users/create-public-ssh-key-for-authenticated-user'] } readonly '/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly delete: operations['users/delete-public-ssh-key-for-authenticated-user'] } - readonly '/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/). */ - readonly get: operations['apps/list-subscriptions-for-authenticated-user'] - } - readonly '/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/). */ - readonly get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } readonly '/user/memberships/orgs': { readonly get: operations['orgs/list-memberships-for-authenticated-user'] } @@ -5553,19 +5229,6 @@ export interface paths { /** Initiates the generation of a user migration archive. */ readonly post: operations['migrations/start-for-authenticated-user'] } - readonly '/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). - */ - readonly get: operations['migrations/get-status-for-authenticated-user'] - } readonly '/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: @@ -5591,12 +5254,6 @@ export interface paths { * 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. */ readonly 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. */ - readonly delete: operations['migrations/delete-archive-for-authenticated-user'] - } - readonly '/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. */ - readonly delete: operations['migrations/unlock-repo-for-authenticated-user'] } readonly '/user/migrations/{migration_id}/repositories': { /** Lists all the repositories for this user migration. */ @@ -5612,85 +5269,12 @@ export interface paths { */ readonly get: operations['orgs/list-for-authenticated-user'] } - readonly '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly get: operations['packages/list-packages-for-authenticated-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly delete: operations['packages/delete-package-for-authenticated-user'] - } - readonly '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly post: operations['packages/restore-package-for-authenticated-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly delete: operations['packages/delete-package-version-for-authenticated-user'] - } - readonly '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly post: operations['packages/restore-package-version-for-authenticated-user'] - } readonly '/user/projects': { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ readonly post: operations['projects/create-for-authenticated-user'] } readonly '/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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ readonly get: operations['users/list-public-emails-for-authenticated-user'] } readonly '/user/repos': { @@ -5705,7 +5289,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -5724,13 +5308,13 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ readonly get: operations['activity/list-repos-starred-by-authenticated-user'] } readonly '/user/starred/{owner}/{repo}': { readonly 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly put: operations['activity/star-repo-for-authenticated-user'] readonly delete: operations['activity/unstar-repo-for-authenticated-user'] } @@ -5739,14 +5323,14 @@ export interface paths { readonly get: operations['activity/list-watched-repos-for-authenticated-user'] } readonly '/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ readonly get: operations['teams/list-for-authenticated-user'] } readonly '/users': { /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ readonly get: operations['users/list'] } @@ -5754,11 +5338,11 @@ export interface paths { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ readonly get: operations['users/get-by-username'] } @@ -5809,7 +5393,7 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly get: operations['apps/get-user-installation'] } @@ -5821,90 +5405,10 @@ export interface paths { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ readonly get: operations['orgs/list-for-user'] } - readonly '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly get: operations['packages/list-packages-for-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly delete: operations['packages/delete-package-for-user'] - } - readonly '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly post: operations['packages/restore-package-for-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - readonly '/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. - */ - readonly get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly delete: operations['packages/delete-package-version-for-user'] - } - readonly '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly post: operations['packages/restore-package-version-for-user'] - } readonly '/users/{username}/projects': { readonly get: operations['projects/list-for-user'] } @@ -5919,41 +5423,17 @@ export interface paths { /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ readonly get: operations['repos/list-for-user'] } - readonly '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - readonly get: operations['billing/get-github-actions-billing-user'] - } - readonly '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - readonly get: operations['billing/get-github-packages-billing-user'] - } - readonly '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - readonly get: operations['billing/get-shared-storage-billing-user'] + readonly '/users/{username}/site_admin': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + readonly put: operations['enterprise-admin/promote-user-to-be-site-administrator'] + /** You can demote any user account except your own. */ + readonly delete: operations['enterprise-admin/demote-site-administrator'] } readonly '/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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ readonly get: operations['activity/list-repos-starred-by-user'] } @@ -5961,6 +5441,18 @@ export interface paths { /** Lists repositories a user is watching. */ readonly get: operations['activity/list-repos-watched-by-user'] } + readonly '/users/{username}/suspended': { + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + readonly put: operations['enterprise-admin/suspend-user'] + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + readonly delete: operations['enterprise-admin/unsuspend-user'] + } readonly '/zen': { /** Get a random sentence from the Zen of GitHub */ readonly get: operations['meta/get-zen'] @@ -5969,13 +5461,142 @@ export interface paths { export interface components { readonly schemas: { + readonly root: { + /** Format: uri-template */ + readonly current_user_url: string + /** Format: uri-template */ + readonly current_user_authorizations_html_url: string + /** Format: uri-template */ + readonly authorizations_url: string + /** Format: uri-template */ + readonly code_search_url: string + /** Format: uri-template */ + readonly commit_search_url: string + /** Format: uri-template */ + readonly emails_url: string + /** Format: uri-template */ + readonly emojis_url: string + /** Format: uri-template */ + readonly events_url: string + /** Format: uri-template */ + readonly feeds_url: string + /** Format: uri-template */ + readonly followers_url: string + /** Format: uri-template */ + readonly following_url: string + /** Format: uri-template */ + readonly gists_url: string + /** Format: uri-template */ + readonly hub_url: string + /** Format: uri-template */ + readonly issue_search_url: string + /** Format: uri-template */ + readonly issues_url: string + /** Format: uri-template */ + readonly keys_url: string + /** Format: uri-template */ + readonly label_search_url: string + /** Format: uri-template */ + readonly notifications_url: string + /** Format: uri-template */ + readonly organization_url: string + /** Format: uri-template */ + readonly organization_repositories_url: string + /** Format: uri-template */ + readonly organization_teams_url: string + /** Format: uri-template */ + readonly public_gists_url: string + /** Format: uri-template */ + readonly rate_limit_url: string + /** Format: uri-template */ + readonly repository_url: string + /** Format: uri-template */ + readonly repository_search_url: string + /** Format: uri-template */ + readonly current_user_repositories_url: string + /** Format: uri-template */ + readonly starred_url: string + /** Format: uri-template */ + readonly starred_gists_url: string + /** Format: uri-template */ + readonly topic_search_url?: string + /** Format: uri-template */ + readonly user_url: string + /** Format: uri-template */ + readonly user_organizations_url: string + /** Format: uri-template */ + readonly user_repositories_url: string + /** Format: uri-template */ + readonly user_search_url: string + } + readonly 'global-hook': { + readonly type?: string + readonly id?: number + readonly name?: string + readonly active?: boolean + readonly events?: readonly string[] + readonly config?: { + readonly url?: string + readonly content_type?: string + readonly insecure_ssl?: string + readonly secret?: string + } + readonly updated_at?: string + readonly created_at?: string + readonly url?: string + readonly ping_url?: string + } + readonly 'global-hook-2': { + readonly type?: string + readonly id?: number + readonly name?: string + readonly active?: boolean + readonly events?: readonly string[] + readonly config?: { + readonly url?: string + readonly content_type?: string + readonly insecure_ssl?: string + } + readonly updated_at?: string + readonly created_at?: string + readonly url?: string + readonly ping_url?: string + } + readonly 'public-key-full': { + readonly id: number + readonly key: string + readonly user_id: number | null + readonly repository_id: number | null + readonly url: string + readonly title: string + readonly read_only: boolean + readonly verified: boolean + /** Format: date-time */ + readonly created_at: string + } & { + last_used: unknown + } + readonly 'ldap-mapping-team': { + readonly ldap_dn?: string + readonly id?: number + readonly node_id?: string + readonly url?: string + readonly html_url?: string + readonly name?: string + readonly slug?: string + readonly description?: string | null + readonly privacy?: string + readonly permission?: string + readonly members_url?: string + readonly repositories_url?: string + readonly parent?: unknown | null + } /** - * Simple User - * @description Simple User + * Ldap Private User + * @description Ldap Private User */ - readonly 'nullable-simple-user': { - readonly name?: string | null - readonly email?: string | null + readonly 'ldap-mapping-user': { + readonly ldap_dn?: string /** @example octocat */ readonly login: string /** @example 1 */ @@ -6035,304 +5656,384 @@ export interface components { /** @example User */ readonly type: string readonly site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - readonly starred_at?: string - } | null + /** @example monalisa octocat */ + readonly name: string | null + /** @example GitHub */ + readonly company: string | null + /** @example https://github.com/blog */ + readonly blog: string | null + /** @example San Francisco */ + readonly location: string | null + /** + * Format: email + * @example octocat@github.com + */ + readonly email: string | null + readonly hireable: boolean | null + /** @example There once was... */ + readonly bio: string | null + /** @example monalisa */ + readonly twitter_username?: string | null + /** @example 2 */ + readonly public_repos: number + /** @example 1 */ + readonly public_gists: number + /** @example 20 */ + readonly followers: number + /** @example 0 */ + readonly following: number + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + readonly created_at: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + readonly updated_at: string + /** @example 81 */ + readonly private_gists: number + /** @example 100 */ + readonly total_private_repos: number + /** @example 100 */ + readonly owned_private_repos: number + /** @example 10000 */ + readonly disk_usage: number + /** @example 8 */ + readonly collaborators: number + /** @example true */ + readonly two_factor_authentication: boolean + readonly plan?: { + readonly collaborators: number + readonly name: string + readonly space: number + readonly private_repos: number + } + /** Format: date-time */ + readonly suspended_at?: string | null + readonly business_plus?: boolean + } /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + * Organization Simple + * @description Organization Simple */ - readonly integration: { + readonly 'organization-simple': { + /** @example github */ + readonly login: string + /** @example 1 */ + readonly id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + readonly node_id: string /** - * @description Unique identifier of the GitHub app - * @example 37 + * Format: uri + * @example https://api.github.com/orgs/github */ - readonly id: number + readonly url: string /** - * @description The slug name of the GitHub app - * @example probot-owners + * Format: uri + * @example https://api.github.com/orgs/github/repos */ - readonly slug?: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - readonly node_id: string - readonly owner: components['schemas']['nullable-simple-user'] + readonly repos_url: string /** - * @description The name of the GitHub app - * @example Probot Owners + * Format: uri + * @example https://api.github.com/orgs/github/events */ - readonly name: string - /** @example The description of the app. */ + readonly events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + readonly hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + readonly issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + readonly members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + readonly public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + readonly avatar_url: string + /** @example A great organization */ readonly description: string | null + } + readonly 'pre-receive-environment': { + readonly id?: number + readonly name?: string + readonly image_url?: string + readonly url?: string + readonly html_url?: string + readonly default_environment?: boolean + readonly created_at?: string + readonly hooks_count?: number + readonly download?: { + readonly url?: string + readonly state?: string + readonly downloaded_at?: string | null + readonly message?: string | null + } + } + readonly 'pre-receive-environment-download-status': { + readonly url?: string + readonly state?: string + readonly downloaded_at?: string | null + readonly message?: string | null + } + readonly 'pre-receive-hook': { + readonly id?: number + readonly name?: string + readonly enforcement?: string + readonly script?: string + readonly script_repository?: { + readonly id?: number + readonly full_name?: string + readonly url?: string + readonly html_url?: string + } + readonly environment?: { + readonly id?: number + readonly name?: string + readonly image_url?: string + readonly url?: string + readonly html_url?: string + readonly default_environment?: boolean + readonly created_at?: string + readonly hooks_count?: number + readonly download?: { + readonly url?: string + readonly state?: string + readonly downloaded_at?: string | null + readonly message?: string | null + } + } + readonly allow_downstream_configuration?: boolean + } + /** + * Simple User + * @description Simple User + */ + readonly 'nullable-simple-user': { + readonly name?: string | null + readonly email?: string | null + /** @example octocat */ + readonly login: string + /** @example 1 */ + readonly id: number + /** @example MDQ6VXNlcjE= */ + readonly node_id: string /** * Format: uri - * @example https://example.com + * @example https://github.com/images/error/octocat_happy.gif */ - readonly external_url: string + readonly avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + readonly gravatar_id: string | null /** * Format: uri - * @example https://github.com/apps/super-ci + * @example https://api.github.com/users/octocat + */ + readonly url: string + /** + * Format: uri + * @example https://github.com/octocat */ readonly html_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/followers */ - readonly created_at: string + readonly followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + readonly following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + readonly gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + readonly starred_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions */ - readonly updated_at: string + readonly subscriptions_url: string /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } + * Format: uri + * @example https://api.github.com/users/octocat/orgs */ - readonly permissions: { - readonly issues?: string - readonly checks?: string - readonly metadata?: string - readonly contents?: string - readonly deployments?: string - } & { readonly [key: string]: string } + readonly organizations_url: string /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] + * Format: uri + * @example https://api.github.com/users/octocat/repos */ - readonly events: readonly string[] + readonly repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + readonly events_url: string /** - * @description The number of installations associated with the GitHub app - * @example 5 + * Format: uri + * @example https://api.github.com/users/octocat/received_events */ - readonly installations_count?: number - /** @example "Iv1.25b5d1e65ffc4022" */ - readonly client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - readonly client_secret?: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - readonly webhook_secret?: string | null - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - readonly pem?: string - } - /** - * Basic Error - * @description Basic Error - */ - readonly 'basic-error': { - readonly message?: string - readonly documentation_url?: string - readonly url?: string - readonly status?: string - } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - readonly 'validation-error-simple': { - readonly message: string - readonly documentation_url: string - readonly errors?: readonly string[] - } - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - readonly 'webhook-config-url': string - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - readonly 'webhook-config-content-type': string - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - readonly 'webhook-config-secret': string - readonly 'webhook-config-insecure-ssl': string | number - /** - * Webhook Configuration - * @description Configuration object of the webhook - */ - readonly 'webhook-config': { - readonly url?: components['schemas']['webhook-config-url'] - 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 received_events_url: string + /** @example User */ + readonly type: string + readonly site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + readonly starred_at?: string + } | null /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } */ - readonly 'hook-delivery-item': { + readonly 'app-permissions': { /** - * @description Unique identifier of the webhook delivery. - * @example 42 + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} */ - readonly id: number + readonly actions?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} */ - readonly guid: string + readonly administration?: 'read' | 'write' /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token for checks on code. + * @enum {string} */ - readonly delivered_at: string + readonly checks?: 'read' | 'write' /** - * @description Whether the webhook delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} */ - readonly redelivery: boolean + readonly contents?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} */ - readonly duration: number + readonly deployments?: 'read' | 'write' /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} */ - readonly status: string + readonly environments?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} */ - readonly status_code: number + readonly issues?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} */ - readonly event: string + readonly metadata?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} */ - readonly action: string | null + readonly packages?: 'read' | 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} */ - readonly installation_id: number | null + readonly pages?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} */ - readonly repository_id: number | null - } - /** - * Scim Error - * @description Scim Error - */ - readonly 'scim-error': { - readonly message?: string | null - readonly documentation_url?: string | null - readonly detail?: string | null - readonly status?: number - readonly scimType?: string | null - readonly schemas?: readonly string[] - } - /** - * Validation Error - * @description Validation Error - */ - readonly 'validation-error': { - readonly message: string - readonly documentation_url: string - 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) - }[] - } - /** - * Webhook delivery - * @description Delivery made by a webhook. - */ - readonly 'hook-delivery': { + readonly pull_requests?: 'read' | 'write' /** - * @description Unique identifier of the delivery. - * @example 42 + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} */ - readonly id: number + readonly repository_hooks?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} */ - readonly guid: string + readonly repository_projects?: 'read' | 'write' | 'admin' /** - * Format: date-time - * @description Time when the delivery was delivered. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} */ - readonly delivered_at: string + readonly secret_scanning_alerts?: 'read' | 'write' /** - * @description Whether the delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} */ - readonly redelivery: boolean + readonly secrets?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} */ - readonly duration: number + readonly security_events?: 'read' | 'write' /** - * @description Description of the status of the attempted delivery - * @example failed to connect + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} */ - readonly status: string + readonly single_file?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} */ - readonly status_code: number + readonly statuses?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} */ - readonly event: string + readonly vulnerability_alerts?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} */ - readonly action: string | null + readonly workflows?: 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} */ - readonly installation_id: number | null + readonly members?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} */ - readonly repository_id: number | null + readonly organization_administration?: 'read' | 'write' /** - * @description The URL target of the delivery. - * @example https://www.example.com + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} */ - readonly url?: string - readonly request: { - /** @description The request headers sent with the webhook delivery. */ - readonly headers: { readonly [key: string]: unknown } | null - /** @description The webhook payload. */ - readonly payload: { readonly [key: string]: unknown } | null - } - readonly response: { - /** @description The response headers received when the delivery was made. */ - readonly headers: { readonly [key: string]: unknown } | null - /** @description The response payload received. */ - readonly payload: string | null - } + readonly organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + readonly organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + readonly organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + readonly organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + readonly organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + readonly organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + readonly organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + readonly team_discussions?: 'read' | 'write' } /** * Simple User @@ -6403,217 +6104,409 @@ export interface components { /** @example "2020-07-09T00:17:55Z" */ readonly starred_at?: string } - /** - * Enterprise - * @description An enterprise account - */ - readonly enterprise: { - /** @description A short description of the enterprise. */ - readonly description?: string | null + /** Scoped Installation */ + readonly 'nullable-scoped-installation': { + readonly permissions: components['schemas']['app-permissions'] /** - * Format: uri - * @example https://github.com/enterprises/octo-business + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} */ - readonly html_url: string + readonly repository_selection: 'all' | 'selected' + /** @example config.yaml */ + readonly single_file_name: string | null + /** @example true */ + readonly has_multiple_single_files?: boolean + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + readonly single_file_paths?: readonly string[] /** * Format: uri - * @description The enterprise's website URL. + * @example https://api.github.com/users/octocat/repos */ - readonly website_url?: string | null + readonly repositories_url: string + readonly account: components['schemas']['simple-user'] + } | null + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + readonly authorization: { + readonly id: number + /** Format: uri */ + readonly url: string + /** @description A list of scopes that this authorization is in. */ + readonly scopes: readonly string[] | null + readonly token: string + readonly token_last_eight: string | null + readonly hashed_token: string | null + readonly app: { + readonly client_id: string + readonly name: string + /** Format: uri */ + readonly url: string + } + readonly note: string | null + /** Format: uri */ + readonly note_url: string | null + /** Format: date-time */ + readonly updated_at: string + /** Format: date-time */ + readonly created_at: string + readonly fingerprint: string | null + readonly user?: components['schemas']['nullable-simple-user'] + readonly installation?: components['schemas']['nullable-scoped-installation'] + /** Format: date-time */ + readonly expires_at: string | null + } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + readonly integration: { /** - * @description Unique identifier of the enterprise - * @example 42 + * @description Unique identifier of the GitHub app + * @example 37 */ readonly id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + readonly slug?: string + /** @example MDExOkludGVncmF0aW9uMQ== */ readonly node_id: string + readonly owner: components['schemas']['nullable-simple-user'] /** - * @description The name of the enterprise. - * @example Octo Business + * @description The name of the GitHub app + * @example Probot Owners */ readonly name: string + /** @example The description of the app. */ + readonly description: string | null /** - * @description The slug url identifier for the enterprise. - * @example octo-business + * Format: uri + * @example https://example.com */ - readonly slug: string + readonly external_url: string /** - * Format: date-time - * @example 2019-01-26T19:01:12Z + * Format: uri + * @example https://github.com/apps/super-ci */ - readonly created_at: string | null + readonly html_url: string /** * Format: date-time - * @example 2019-01-26T19:14:43Z + * @example 2017-07-08T16:18:44-04:00 */ - readonly updated_at: string | null - /** Format: uri */ - readonly avatar_url: string - } - /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } - */ - readonly 'app-permissions': { + readonly created_at: string /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 */ - readonly actions?: 'read' | 'write' + readonly updated_at: string /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } */ - readonly administration?: 'read' | 'write' + readonly permissions: { + readonly issues?: string + readonly checks?: string + readonly metadata?: string + readonly contents?: string + readonly deployments?: string + } & { readonly [key: string]: string } /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] */ - readonly checks?: 'read' | 'write' + readonly events: readonly string[] /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description The number of installations associated with the GitHub app + * @example 5 */ - readonly contents?: 'read' | 'write' + readonly installations_count?: number + /** @example "Iv1.25b5d1e65ffc4022" */ + readonly client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + readonly client_secret?: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + readonly webhook_secret?: string | null + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + readonly pem?: string + } + /** + * Basic Error + * @description Basic Error + */ + readonly 'basic-error': { + readonly message?: string + readonly documentation_url?: string + readonly url?: string + readonly status?: string + } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + readonly 'validation-error-simple': { + readonly message: string + readonly documentation_url: string + readonly errors?: readonly string[] + } + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + readonly 'webhook-config-url': string + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + readonly 'webhook-config-content-type': string + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + readonly 'webhook-config-secret': string + readonly 'webhook-config-insecure-ssl': string | number + /** + * Webhook Configuration + * @description Configuration object of the webhook + */ + readonly 'webhook-config': { + readonly url?: components['schemas']['webhook-config-url'] + 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'] + } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + readonly 'hook-delivery-item': { /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the webhook delivery. + * @example 42 */ - readonly deployments?: 'read' | 'write' + readonly id: number /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - readonly environments?: 'read' | 'write' + readonly guid: string /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z */ - readonly issues?: 'read' | 'write' + readonly delivered_at: string /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the webhook delivery is a redelivery. + * @example false */ - readonly metadata?: 'read' | 'write' + readonly redelivery: boolean /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - readonly packages?: 'read' | 'write' + readonly duration: number /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} + * @description Describes the response returned after attempting the delivery. + * @example failed to connect */ - readonly pages?: 'read' | 'write' + readonly status: string /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - readonly pull_requests?: 'read' | 'write' + readonly status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - readonly repository_hooks?: 'read' | 'write' + readonly event: string /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - readonly repository_projects?: 'read' | 'write' | 'admin' + readonly action: string | null /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - readonly secret_scanning_alerts?: 'read' | 'write' + readonly installation_id: number | null /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - readonly secrets?: 'read' | 'write' + readonly repository_id: number | null + } + /** + * Scim Error + * @description Scim Error + */ + readonly 'scim-error': { + readonly message?: string | null + readonly documentation_url?: string | null + readonly detail?: string | null + readonly status?: number + readonly scimType?: string | null + readonly schemas?: readonly string[] + } + /** + * Validation Error + * @description Validation Error + */ + readonly 'validation-error': { + readonly message: string + readonly documentation_url: string + 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) + }[] + } + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + readonly 'hook-delivery': { /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the delivery. + * @example 42 */ - readonly security_events?: 'read' | 'write' + readonly id: number /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - readonly single_file?: 'read' | 'write' + readonly guid: string /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z */ - readonly statuses?: 'read' | 'write' + readonly delivered_at: string /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the delivery is a redelivery. + * @example false */ - readonly vulnerability_alerts?: 'read' | 'write' + readonly redelivery: boolean /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - readonly workflows?: 'write' + readonly duration: number /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} + * @description Description of the status of the attempted delivery + * @example failed to connect */ - readonly members?: 'read' | 'write' + readonly status: string /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - readonly organization_administration?: 'read' | 'write' + readonly status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - readonly organization_hooks?: 'read' | 'write' + readonly event: string /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - readonly organization_plan?: 'read' + readonly action: string | null /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - readonly organization_projects?: 'read' | 'write' | 'admin' + readonly installation_id: number | null /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - readonly organization_packages?: 'read' | 'write' + readonly repository_id: number | null /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The URL target of the delivery. + * @example https://www.example.com */ - readonly organization_secrets?: 'read' | 'write' + readonly url?: string + readonly request: { + /** @description The request headers sent with the webhook delivery. */ + readonly headers: { readonly [key: string]: unknown } | null + /** @description The webhook payload. */ + readonly payload: { readonly [key: string]: unknown } | null + } + readonly response: { + /** @description The response headers received when the delivery was made. */ + readonly headers: { readonly [key: string]: unknown } | null + /** @description The response payload received. */ + readonly payload: string | null + } + } + /** + * Enterprise + * @description An enterprise account + */ + readonly enterprise: { + /** @description A short description of the enterprise. */ + readonly description?: string | null /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://github.com/enterprises/octo-business */ - readonly organization_self_hosted_runners?: 'read' | 'write' + readonly html_url: string /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @description The enterprise's website URL. */ - readonly organization_user_blocking?: 'read' | 'write' + readonly website_url?: string | null /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the enterprise + * @example 42 */ - readonly team_discussions?: 'read' | 'write' - } - /** - * Installation + readonly id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + readonly node_id: string + /** + * @description The name of the enterprise. + * @example Octo Business + */ + readonly name: string + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + readonly slug: string + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + readonly created_at: string | null + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + readonly updated_at: string | null + /** Format: uri */ + readonly avatar_url: string + } + /** + * Installation * @description Installation */ readonly installation: { @@ -6882,7 +6775,10 @@ export interface components { readonly stargazers_count: number /** @example 80 */ readonly watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ readonly size: number /** * @description The default branch of the repository. @@ -7061,6 +6957,41 @@ export interface components { readonly allow_auto_merge?: boolean readonly delete_branch_on_merge?: boolean readonly allow_update_branch?: boolean + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' readonly allow_merge_commit?: boolean readonly subscribers_count?: number readonly network_count?: number @@ -7084,6 +7015,52 @@ export interface components { * @example false */ readonly delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + readonly allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether to allow merge commits for pull requests. * @default true @@ -7092,6 +7069,11 @@ export interface components { readonly allow_merge_commit?: boolean /** @description Whether to allow forking this repo */ readonly allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + readonly web_commit_signoff_required?: boolean readonly subscribers_count?: number readonly network_count?: number readonly open_issues: number @@ -7099,6 +7081,8 @@ export interface components { readonly master_branch?: string /** @example "2020-07-09T00:17:42Z" */ readonly starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + readonly anonymous_access_enabled?: boolean } /** * Installation Token @@ -7159,64 +7143,6 @@ export interface components { readonly scopes: readonly string[] readonly user?: components['schemas']['nullable-simple-user'] } - /** Scoped Installation */ - readonly 'nullable-scoped-installation': { - readonly permissions: components['schemas']['app-permissions'] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - readonly repository_selection: 'all' | 'selected' - /** @example config.yaml */ - readonly single_file_name: string | null - /** @example true */ - readonly has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - readonly single_file_paths?: readonly string[] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - readonly repositories_url: string - readonly account: components['schemas']['simple-user'] - } | null - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - readonly authorization: { - readonly id: number - /** Format: uri */ - readonly url: string - /** @description A list of scopes that this authorization is in. */ - readonly scopes: readonly string[] | null - readonly token: string - readonly token_last_eight: string | null - readonly hashed_token: string | null - readonly app: { - readonly client_id: string - readonly name: string - /** Format: uri */ - readonly url: string - } - readonly note: string | null - /** Format: uri */ - readonly note_url: string | null - /** Format: date-time */ - readonly updated_at: string - /** Format: date-time */ - readonly created_at: string - readonly fingerprint: string | null - readonly user?: components['schemas']['nullable-simple-user'] - readonly installation?: components['schemas']['nullable-scoped-installation'] - /** Format: date-time */ - readonly expires_at: string | null - } /** * Code Of Conduct * @description Code Of Conduct @@ -7286,12 +7212,137 @@ export interface components { readonly html_url: string | null } /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @description The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + * @example Very **important** announcement about _nothing_. + */ + readonly 'announcement-message': string + /** + * Format: date-time + * @description The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + * @example "2021-01-01T00:00:00.000-07:00" + */ + readonly 'announcement-expiration': string | null + /** + * Enterprise Announcement + * @description Enterprise global announcement + */ + readonly announcement: { + readonly announcement: components['schemas']['announcement-message'] + readonly expires_at?: components['schemas']['announcement-expiration'] + } + readonly 'license-info': { + readonly seats?: string | number + readonly seats_used?: number + readonly seats_available?: string | number + readonly kind?: string + readonly days_until_expiration?: number + readonly expire_at?: string + } + /** Repository Enterprise Stats */ + readonly 'enterprise-repository-overview': { + readonly total_repos: number + readonly root_repos: number + readonly fork_repos: number + readonly org_repos: number + readonly total_pushes: number + readonly total_wikis: number + } + /** Hooks Enterprise Stats */ + readonly 'enterprise-hook-overview': { + readonly total_hooks: number + readonly active_hooks: number + readonly inactive_hooks: number + } + /** Enterprise Pages Stats */ + readonly 'enterprise-page-overview': { + readonly total_pages: number + } + /** Enterprise Organization Stats */ + readonly 'enterprise-organization-overview': { + readonly total_orgs: number + readonly disabled_orgs: number + readonly total_teams: number + readonly total_team_members: number + } + /** Enterprise User Stats */ + readonly 'enterprise-user-overview': { + readonly total_users: number + readonly admin_users: number + readonly suspended_users: number + } + /** Enterprise Pull Request Stats */ + readonly 'enterprise-pull-request-overview': { + readonly total_pulls: number + readonly merged_pulls: number + readonly mergeable_pulls: number + readonly unmergeable_pulls: number + } + /** Enterprise Issue Stats */ + readonly 'enterprise-issue-overview': { + readonly total_issues: number + readonly open_issues: number + readonly closed_issues: number + } + /** Enterprise Milestone Stats */ + readonly 'enterprise-milestone-overview': { + readonly total_milestones: number + readonly open_milestones: number + readonly closed_milestones: number + } + /** Enterprise Gist Stats */ + readonly 'enterprise-gist-overview': { + readonly total_gists: number + readonly private_gists: number + readonly public_gists: number + } + /** Enterprise Comment Stats */ + readonly 'enterprise-comment-overview': { + readonly total_commit_comments: number + readonly total_gist_comments: number + readonly total_issue_comments: number + readonly total_pull_request_comments: number + } + readonly 'enterprise-overview': { + readonly repos?: components['schemas']['enterprise-repository-overview'] + readonly hooks?: components['schemas']['enterprise-hook-overview'] + readonly pages?: components['schemas']['enterprise-page-overview'] + readonly orgs?: components['schemas']['enterprise-organization-overview'] + readonly users?: components['schemas']['enterprise-user-overview'] + readonly pulls?: components['schemas']['enterprise-pull-request-overview'] + readonly issues?: components['schemas']['enterprise-issue-overview'] + readonly milestones?: components['schemas']['enterprise-milestone-overview'] + readonly gists?: components['schemas']['enterprise-gist-overview'] + readonly comments?: components['schemas']['enterprise-comment-overview'] + } + readonly 'actions-cache-usage-org-enterprise': { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + readonly total_active_caches_count: number + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + readonly total_active_caches_size_in_bytes: number + } + /** + * Actions cache usage policy for an enterprise + * @description GitHub Actions cache usage policy for an enterprise. + */ + readonly 'actions-cache-usage-policy-enterprise': { + /** + * @description For repositories in an enterprise, the default size limit for the sum of all caches in a repository, in gigabytes. + * @example 10 + */ + readonly repo_cache_size_limit_in_gb?: number + /** + * @description For repositories in an enterprise, the maximum value that can be set as the limit for the sum of all caches in a repository, in gigabytes. + * @example 15 + */ + readonly max_repo_cache_size_limit_in_gb?: number + } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. * @enum {string} */ readonly 'enabled-organizations': 'all' | 'none' | 'selected' /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @description The permissions policy that controls the actions that are allowed to run. * @enum {string} */ readonly 'allowed-actions': 'all' | 'local_only' | 'selected' @@ -7304,52 +7355,26 @@ export interface components { readonly allowed_actions?: components['schemas']['allowed-actions'] readonly selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * Organization Simple - * @description Organization Simple - */ - readonly 'organization-simple': { - /** @example github */ - readonly login: string - /** @example 1 */ - readonly id: number - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - readonly node_id: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - readonly url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - readonly repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - readonly events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - readonly hooks_url: string - /** @example https://api.github.com/orgs/github/issues */ - readonly issues_url: string - /** @example https://api.github.com/orgs/github/members{/member} */ - readonly members_url: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - readonly public_members_url: string - /** @example https://github.com/images/error/octocat_happy.gif */ - readonly avatar_url: string - /** @example A great organization */ - readonly description: string | null - } readonly 'selected-actions': { /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - readonly github_owned_allowed?: boolean - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - readonly verified_allowed?: boolean + readonly github_owned_allowed: boolean /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - readonly patterns_allowed?: readonly string[] + readonly patterns_allowed: readonly string[] + } + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + readonly 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + readonly 'actions-can-approve-pull-request-reviews': boolean + readonly 'actions-get-default-workflow-permissions': { + readonly default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + readonly can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + } + readonly 'actions-set-default-workflow-permissions': { + readonly default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + readonly can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] } readonly 'runner-groups-enterprise': { readonly id: number @@ -7359,6 +7384,18 @@ export interface components { readonly selected_organizations_url?: string readonly runners_url: string readonly allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + readonly workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] } /** * Self hosted runner label @@ -7513,6 +7550,11 @@ export interface components { * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly 'alert-created-at': string + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly 'nullable-alert-updated-at': string | null /** * Format: uri * @description The REST API URL of the alert resource. @@ -7524,780 +7566,393 @@ export interface components { */ readonly 'alert-html-url': string /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. * @enum {string} */ readonly 'secret-scanning-alert-state': 'open' | 'resolved' /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ readonly 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null /** - * Repository - * @description A git repository + * Simple Repository + * @description Simple Repository */ - readonly 'nullable-repository': { + readonly 'simple-repository': { /** - * @description Unique identifier of the repository - * @example 42 + * @description A unique identifier of the repository. + * @example 1296269 */ readonly id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ readonly node_id: string /** * @description The name of the repository. - * @example Team Environment + * @example Hello-World */ readonly name: string - /** @example octocat/Hello-World */ - readonly full_name: string - readonly license: components['schemas']['nullable-license-simple'] - readonly organization?: components['schemas']['nullable-simple-user'] - readonly forks: number - readonly permissions?: { - readonly admin: boolean - readonly pull: boolean - readonly triage?: boolean - readonly push: boolean - readonly maintain?: boolean - } - readonly owner: components['schemas']['simple-user'] /** - * @description Whether the repository is private or public. - * @default false + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World */ + readonly full_name: string + readonly owner: components['schemas']['simple-user'] + /** @description Whether the repository is private. */ readonly private: boolean /** * Format: uri + * @description The URL to view the repository on GitHub.com. * @example https://github.com/octocat/Hello-World */ readonly html_url: string - /** @example This your first repo! */ + /** + * @description The repository description. + * @example This your first repo! + */ readonly description: string | null + /** @description Whether the repository is a fork. */ readonly fork: boolean /** * Format: uri + * @description The URL to get more information about the repository from the GitHub API. * @example https://api.github.com/repos/octocat/Hello-World */ readonly url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ readonly archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ readonly assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ readonly blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ readonly branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ readonly collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ readonly comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ readonly commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ readonly compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ readonly contents_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors */ readonly contributors_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments */ readonly deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads */ readonly downloads_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events */ readonly events_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks */ readonly forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ readonly git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ readonly git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ readonly git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - readonly git_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ readonly issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ readonly issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ readonly issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ readonly keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ readonly labels_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages */ readonly languages_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges */ readonly merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ readonly milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ readonly notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ readonly pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ readonly releases_url: string - /** @example git@github.com:octocat/Hello-World.git */ - readonly ssh_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers */ readonly stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ readonly statuses_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers */ readonly subscribers_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription */ readonly subscription_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags */ readonly tags_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams */ readonly teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - readonly trees_url: string - /** @example https://github.com/octocat/Hello-World.git */ - readonly clone_url: string /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - readonly mirror_url: string | null + readonly trees_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks */ readonly hooks_url: string + } + readonly 'organization-secret-scanning-alert': { + readonly number?: components['schemas']['alert-number'] + readonly created_at?: components['schemas']['alert-created-at'] + readonly updated_at?: components['schemas']['nullable-alert-updated-at'] + readonly url?: components['schemas']['alert-url'] + readonly html_url?: components['schemas']['alert-html-url'] /** * Format: uri - * @example https://svn.github.com/octocat/Hello-World + * @description The REST API URL of the code locations for this alert. */ - readonly svn_url: string + readonly locations_url?: string + readonly state?: components['schemas']['secret-scanning-alert-state'] + readonly resolution?: components['schemas']['secret-scanning-alert-resolution'] /** - * Format: uri - * @example https://github.com + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly homepage: string | null - readonly language: string | null - /** @example 9 */ - readonly forks_count: number - /** @example 80 */ - readonly stargazers_count: number - /** @example 80 */ - readonly watchers_count: number - /** @example 108 */ - readonly size: number + readonly resolved_at?: string | null + readonly resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The type of secret that secret scanning detected. */ + readonly secret_type?: string /** - * @description The default branch of the repository. - * @example master + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." */ - readonly default_branch: string - /** @example 0 */ - readonly open_issues_count: number + readonly secret_type_display_name?: string + /** @description The secret that was detected. */ + readonly secret?: string + readonly repository?: components['schemas']['simple-repository'] + /** @description Whether push protection was bypassed for the detected secret. */ + readonly push_protection_bypassed?: boolean | null + readonly push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly is_template?: boolean - readonly topics?: readonly string[] + readonly push_protection_bypassed_at?: string | null + } + readonly 'advanced-security-active-committers-user': { + readonly user_login: string + /** @example 2021-11-03 */ + readonly last_pushed_date: string + } + readonly 'advanced-security-active-committers-repository': { + /** @example octocat/Hello-World */ + readonly name: string + /** @example 25 */ + readonly advanced_security_committers: number + readonly advanced_security_committers_breakdown: readonly components['schemas']['advanced-security-active-committers-user'][] + } + readonly 'advanced-security-active-committers': { + /** @example 25 */ + readonly total_advanced_security_committers?: number + /** @example 2 */ + readonly total_count?: number + readonly repositories: readonly components['schemas']['advanced-security-active-committers-repository'][] + } + /** + * Actor + * @description Actor + */ + readonly actor: { + readonly id: number + readonly login: string + readonly display_login?: string + readonly gravatar_id: string | null + /** Format: uri */ + readonly url: string + /** Format: uri */ + readonly avatar_url: string + } + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + readonly 'nullable-milestone': { /** - * @description Whether issues are enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 */ - readonly has_issues: boolean + readonly url: string /** - * @description Whether projects are enabled. - * @default true - * @example true + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 */ - readonly has_projects: boolean + readonly html_url: string /** - * @description Whether the wiki is enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels */ - readonly has_wiki: boolean - readonly has_pages: boolean + readonly labels_url: string + /** @example 1002604 */ + readonly id: number + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + readonly node_id: string /** - * @description Whether downloads are enabled. - * @default true - * @example true + * @description The number of the milestone. + * @example 42 */ - readonly has_downloads: boolean + readonly number: number /** - * @description Whether the repository is archived. - * @default false + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} */ - readonly archived: boolean - /** @description Returns whether or not this repository disabled. */ - readonly disabled: boolean + readonly state: 'open' | 'closed' /** - * @description The repository visibility: public, private, or internal. - * @default public + * @description The title of the milestone. + * @example v1.0 */ - readonly visibility?: string + readonly title: string + /** @example Tracking milestone for version 1.0 */ + readonly description: string | null + readonly creator: components['schemas']['nullable-simple-user'] + /** @example 4 */ + readonly open_issues: number + /** @example 8 */ + readonly closed_issues: number /** * Format: date-time - * @example 2011-01-26T19:06:43Z + * @example 2011-04-10T20:09:31Z */ - readonly pushed_at: string | null + readonly created_at: string /** * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example 2014-03-03T18:58:10Z */ - readonly created_at: string | null + readonly updated_at: string /** * Format: date-time - * @example 2011-01-26T19:14:43Z + * @example 2013-02-12T13:22:01Z */ - readonly updated_at: string | null + readonly closed_at: string | null /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - 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 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 maintain?: boolean - readonly push?: boolean - readonly triage?: boolean - readonly pull?: boolean - } - readonly allow_rebase_merge?: boolean - readonly temp_clone_token?: string - readonly allow_squash_merge?: boolean - readonly allow_auto_merge?: boolean - readonly delete_branch_on_merge?: boolean - readonly allow_update_branch?: boolean - readonly allow_merge_commit?: boolean - readonly subscribers_count?: number - readonly network_count?: number - } | null - readonly temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - readonly allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - readonly allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - readonly delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - readonly allow_merge_commit?: boolean - /** @description Whether to allow forking this repo */ - readonly allow_forking?: boolean - readonly subscribers_count?: number - readonly network_count?: number - readonly open_issues: number - readonly watchers: number - readonly master_branch?: string - /** @example "2020-07-09T00:17:42Z" */ - readonly starred_at?: string - } | null - /** - * Minimal Repository - * @description Minimal Repository - */ - readonly 'minimal-repository': { - /** @example 1296269 */ - readonly id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - readonly node_id: string - /** @example Hello-World */ - readonly name: string - /** @example octocat/Hello-World */ - readonly full_name: string - readonly owner: components['schemas']['simple-user'] - readonly private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - readonly html_url: string - /** @example This your first repo! */ - readonly description: string | null - readonly fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - readonly url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - readonly archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - readonly assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - readonly blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - readonly branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - readonly collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - readonly comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - readonly commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - readonly compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - readonly contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - readonly contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - readonly deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - readonly downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - readonly events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - readonly forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - readonly git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - readonly git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - readonly git_tags_url: string - readonly git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - readonly issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - readonly issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - readonly issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - readonly keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - readonly labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - readonly languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - readonly merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - readonly milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - readonly notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - readonly pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - readonly releases_url: string - readonly ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - readonly stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - readonly statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - readonly subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - readonly subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - readonly tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - readonly teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - readonly trees_url: string - readonly clone_url?: string - readonly mirror_url?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - readonly hooks_url: string - readonly svn_url?: string - readonly homepage?: string | null - readonly language?: string | null - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - readonly pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - readonly created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - readonly updated_at?: string | null - readonly permissions?: { - readonly admin?: boolean - readonly maintain?: boolean - readonly push?: boolean - readonly triage?: boolean - readonly pull?: boolean - } - /** @example admin */ - readonly role_name?: string - readonly template_repository?: components['schemas']['nullable-repository'] - readonly temp_clone_token?: string - readonly delete_branch_on_merge?: boolean - readonly subscribers_count?: number - readonly network_count?: number - readonly code_of_conduct?: components['schemas']['code-of-conduct'] - readonly license?: { - readonly key?: string - readonly name?: string - readonly spdx_id?: string - readonly url?: string - readonly node_id?: string - } | null - /** @example 0 */ - readonly forks?: number - /** @example 0 */ - readonly open_issues?: number - /** @example 0 */ - readonly watchers?: number - readonly allow_forking?: boolean - } - readonly 'organization-secret-scanning-alert': { - readonly number?: components['schemas']['alert-number'] - readonly created_at?: components['schemas']['alert-created-at'] - readonly url?: components['schemas']['alert-url'] - readonly html_url?: components['schemas']['alert-html-url'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - readonly locations_url?: string - readonly state?: components['schemas']['secret-scanning-alert-state'] - readonly resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly resolved_at?: string | null - readonly resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The type of secret that secret scanning detected. */ - readonly secret_type?: string - /** @description The secret that was detected. */ - readonly secret?: string - readonly repository?: components['schemas']['minimal-repository'] - } - readonly 'actions-billing-usage': { - /** @description The sum of the free and paid GitHub Actions minutes used. */ - readonly total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - readonly total_paid_minutes_used: number - /** @description The amount of free GitHub Actions minutes available. */ - readonly included_minutes: number - readonly minutes_used_breakdown: { - /** @description Total minutes used on Ubuntu runner machines. */ - readonly UBUNTU?: number - /** @description Total minutes used on macOS runner machines. */ - readonly MACOS?: number - /** @description Total minutes used on Windows runner machines. */ - readonly WINDOWS?: number - } - } - readonly 'advanced-security-active-committers-user': { - readonly user_login: string - /** @example 2021-11-03 */ - readonly last_pushed_date: string - } - readonly 'advanced-security-active-committers-repository': { - /** @example octocat/Hello-World */ - readonly name: string - /** @example 25 */ - readonly advanced_security_committers: number - readonly advanced_security_committers_breakdown: readonly components['schemas']['advanced-security-active-committers-user'][] - } - readonly 'advanced-security-active-committers': { - /** @example 25 */ - readonly total_advanced_security_committers?: number - readonly repositories: readonly components['schemas']['advanced-security-active-committers-repository'][] - } - readonly 'packages-billing-usage': { - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - readonly total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - readonly total_paid_gigabytes_bandwidth_used: number - /** @description Free storage space (GB) for GitHub Packages. */ - readonly included_gigabytes_bandwidth: number - } - readonly 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - readonly days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - readonly estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - readonly estimated_storage_for_month: number - } - /** - * Actor - * @description Actor - */ - readonly actor: { - readonly id: number - readonly login: string - readonly display_login?: string - readonly gravatar_id: string | null - /** Format: uri */ - readonly url: string - /** Format: uri */ - readonly avatar_url: string - } - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - readonly 'nullable-milestone': { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - readonly url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - readonly html_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - readonly labels_url: string - /** @example 1002604 */ - readonly id: number - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - readonly node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - readonly number: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - readonly state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - readonly title: string - /** @example Tracking milestone for version 1.0 */ - readonly description: string | null - readonly creator: components['schemas']['nullable-simple-user'] - /** @example 4 */ - readonly open_issues: number - /** @example 8 */ - readonly closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - readonly created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - readonly updated_at: string - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - readonly closed_at: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z + * Format: date-time + * @example 2012-10-09T23:39:01Z */ readonly due_on: string | null } | null @@ -8388,7 +8043,15 @@ export interface components { * @example OWNER * @enum {string} */ - readonly author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + readonly 'author-association': + | 'COLLABORATOR' + | 'CONTRIBUTOR' + | 'FIRST_TIMER' + | 'FIRST_TIME_CONTRIBUTOR' + | 'MANNEQUIN' + | 'MEMBER' + | 'NONE' + | 'OWNER' /** Reaction Rollup */ readonly 'reaction-rollup': { /** Format: uri */ @@ -8435,6 +8098,12 @@ export interface components { * @example open */ readonly state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + readonly state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -8499,7 +8168,7 @@ export interface components { readonly timeline_url?: string readonly repository?: components['schemas']['repository'] readonly performed_via_github_app?: components['schemas']['nullable-integration'] - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly reactions?: components['schemas']['reaction-rollup'] } /** @@ -8541,7 +8210,7 @@ export interface components { readonly updated_at: string /** Format: uri */ readonly issue_url: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly performed_via_github_app?: components['schemas']['nullable-integration'] readonly reactions?: components['schemas']['reaction-rollup'] } @@ -8870,7 +8539,7 @@ export interface components { * @example 2011-04-18T23:23:56Z */ readonly updated_at: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] } /** * Gist Commit @@ -9023,77 +8692,6 @@ export interface components { /** @example true */ readonly featured: boolean } - /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan - */ - readonly 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - readonly url: string - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts - */ - readonly accounts_url: string - /** @example 1313 */ - readonly id: number - /** @example 3 */ - readonly number: number - /** @example Pro */ - readonly name: string - /** @example A professional-grade CI solution */ - readonly description: string - /** @example 1099 */ - readonly monthly_price_in_cents: number - /** @example 11870 */ - readonly yearly_price_in_cents: number - /** @example flat-rate */ - readonly price_model: string - /** @example true */ - readonly has_free_trial: boolean - readonly unit_name: string | null - /** @example published */ - readonly state: string - /** - * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" - * ] - */ - readonly bullets: readonly string[] - } - /** - * Marketplace Purchase - * @description Marketplace Purchase - */ - readonly 'marketplace-purchase': { - readonly url: string - readonly type: string - readonly id: number - readonly login: string - readonly organization_billing_email?: string - readonly email?: string | 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 - readonly is_installed?: boolean - readonly unit_count?: number | null - readonly on_free_trial?: boolean - readonly free_trial_ends_on?: string | null - readonly updated_at?: string - readonly plan?: components['schemas']['marketplace-listing-plan'] - } - } /** * Api Overview * @description Api Overview @@ -9101,42 +8699,6 @@ export interface components { readonly 'api-overview': { /** @example true */ readonly verifiable_password_authentication: boolean - readonly ssh_key_fingerprints?: { - readonly SHA256_RSA?: string - readonly SHA256_DSA?: string - readonly SHA256_ECDSA?: string - readonly SHA256_ED25519?: string - } - /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] - */ - readonly ssh_keys?: readonly string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - readonly hooks?: readonly string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - readonly web?: readonly string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - readonly api?: readonly string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - readonly git?: readonly string[] /** * @example [ * "13.65.0.0/16", @@ -9147,32 +8709,222 @@ export interface components { readonly packages?: readonly string[] /** * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" + * "192.168.7.15/32", + * "192.168.7.16/32" * ] */ - readonly pages?: readonly string[] + readonly dependabot?: readonly string[] + /** @example 3.6.0 */ + readonly installed_version?: string + } + /** + * Minimal Repository + * @description Minimal Repository + */ + readonly 'minimal-repository': { + /** @example 1296269 */ + readonly id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + readonly node_id: string + /** @example Hello-World */ + readonly name: string + /** @example octocat/Hello-World */ + readonly full_name: string + readonly owner: components['schemas']['simple-user'] + readonly private: boolean /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] + * Format: uri + * @example https://github.com/octocat/Hello-World */ - readonly importer?: readonly string[] + readonly html_url: string + /** @example This your first repo! */ + readonly description: string | null + readonly fork: boolean /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + readonly url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + readonly archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + readonly assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + readonly blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + readonly branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + readonly collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + readonly comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + readonly commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + readonly compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + readonly contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors */ - readonly actions?: readonly string[] + readonly contributors_url: string /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments */ - readonly dependabot?: readonly string[] + readonly deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + readonly downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + readonly events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + readonly forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + readonly git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + readonly git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + readonly git_tags_url: string + readonly git_url?: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + readonly issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + readonly issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + readonly issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + readonly keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + readonly labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + readonly languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + readonly merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + readonly milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + readonly notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + readonly pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + readonly releases_url: string + readonly ssh_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + readonly stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + readonly statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + readonly subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + readonly subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + readonly tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + readonly teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + readonly trees_url: string + readonly clone_url?: string + readonly mirror_url?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + readonly hooks_url: string + readonly svn_url?: string + readonly homepage?: string | null + readonly language?: string | null + readonly forks_count?: number + readonly stargazers_count?: number + readonly watchers_count?: number + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + 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 + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + readonly pushed_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + readonly created_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + readonly updated_at?: string | null + readonly permissions?: { + readonly admin?: boolean + readonly maintain?: boolean + readonly push?: boolean + readonly triage?: boolean + readonly pull?: boolean + } + /** @example admin */ + readonly role_name?: string + readonly temp_clone_token?: string + readonly delete_branch_on_merge?: boolean + readonly subscribers_count?: number + readonly network_count?: number + readonly code_of_conduct?: components['schemas']['code-of-conduct'] + readonly license?: { + readonly key?: string + readonly name?: string + readonly spdx_id?: string + readonly url?: string + readonly node_id?: string + } | null + /** @example 0 */ + readonly forks?: number + /** @example 0 */ + readonly open_issues?: number + /** @example 0 */ + readonly watchers?: number + readonly allow_forking?: boolean + /** @example false */ + readonly web_commit_signoff_required?: boolean } /** * Thread @@ -9230,47 +8982,11 @@ export interface components { * @description Custom repository roles created by organization administrators */ readonly 'organization-custom-repository-role': { + /** @description The unique identifier of the custom role. */ readonly id: number + /** @description The name of the custom role. */ readonly name: string } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - readonly 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - readonly groups?: readonly { - /** - * @description The internal ID of the group - * @example 1 - */ - readonly group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - readonly group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - readonly updated_at: string - }[] - } /** * Organization Full * @description Organization Full @@ -9396,11 +9112,34 @@ export interface components { readonly members_can_create_private_pages?: boolean /** @example false */ readonly members_can_fork_private_repositories?: boolean | null + /** @example false */ + readonly web_commit_signoff_required?: boolean /** Format: date-time */ readonly updated_at: string } /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + readonly 'actions-cache-usage-by-repository': { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + readonly full_name: string + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + readonly active_caches_size_in_bytes: number + /** + * @description The number of active caches in the repository. + * @example 3 + */ + readonly active_caches_count: number + } + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. * @enum {string} */ readonly 'enabled-repositories': 'all' | 'none' | 'selected' @@ -9411,21 +9150,6 @@ export interface components { readonly allowed_actions?: components['schemas']['allowed-actions'] readonly selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - readonly 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - readonly 'actions-can-approve-pull-request-reviews': boolean - readonly 'actions-get-default-workflow-permissions': { - readonly default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - readonly can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - } - readonly 'actions-set-default-workflow-permissions': { - readonly default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - readonly can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - } readonly 'runner-groups-org': { readonly id: number readonly name: string @@ -9437,6 +9161,18 @@ export interface components { readonly inherited: boolean readonly inherited_allows_public_repositories?: boolean readonly allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + readonly workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] } /** * Actions Secret for an Organization @@ -9492,6 +9228,10 @@ export interface components { * @description An object without any properties. */ readonly 'empty-object': { readonly [key: string]: unknown } + /** @description The name of the tool used to generate the code scanning analysis. */ + readonly 'code-scanning-analysis-tool-name': string + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + readonly 'code-scanning-analysis-tool-guid': string | null /** * @description State of a code scanning alert. * @enum {string} @@ -9511,17 +9251,19 @@ export interface components { * Format: date-time * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly 'code-scanning-alert-fixed-at': string | null + readonly 'alert-fixed-at': string | null /** * Format: date-time * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly 'code-scanning-alert-dismissed-at': string | null + readonly 'alert-dismissed-at': string | null /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ readonly 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description The dismissal comment associated with the dismissal of the alert. */ + readonly 'code-scanning-alert-dismissed-comment': string | null readonly 'code-scanning-alert-rule': { /** @description A unique identifier for the rule used to detect the alert. */ readonly id?: string | null @@ -9545,13 +9287,11 @@ export interface components { readonly tags?: readonly string[] | null /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ readonly help?: string | null + /** @description A link to the documentation for the rule used to detect the alert. */ + readonly help_uri?: string | null } - /** @description The name of the tool used to generate the code scanning analysis. */ - readonly 'code-scanning-analysis-tool-name': string /** @description The version of the tool used to generate the code scanning analysis. */ readonly 'code-scanning-analysis-tool-version': string | null - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - readonly 'code-scanning-analysis-tool-guid': 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'] @@ -9607,82 +9347,15 @@ export interface components { readonly html_url: components['schemas']['alert-html-url'] readonly instances_url: components['schemas']['alert-instances-url'] readonly state: components['schemas']['code-scanning-alert-state'] - readonly fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + readonly fixed_at?: components['schemas']['alert-fixed-at'] readonly dismissed_by: components['schemas']['nullable-simple-user'] - readonly dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + readonly dismissed_at: components['schemas']['alert-dismissed-at'] readonly dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + readonly dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] 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 repository: components['schemas']['minimal-repository'] - } - /** - * Credential Authorization - * @description Credential Authorization - */ - readonly 'credential-authorization': { - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - readonly login: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - readonly credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - readonly credential_type: string - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - readonly token_last_eight?: string - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - readonly credential_authorized_at: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - readonly scopes?: readonly string[] - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - readonly fingerprint?: string - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - readonly credential_accessed_at: string | null - /** @example 12345678 */ - readonly authorized_credential_id: number | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - readonly authorized_credential_title?: string | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - readonly authorized_credential_note?: string | null - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - readonly authorized_credential_expires_at?: string | null + readonly repository: components['schemas']['simple-repository'] } /** * Dependabot Secret for an Organization @@ -9811,23 +9484,42 @@ export interface components { }[] } /** - * Organization Invitation - * @description Organization Invitation + * ExternalGroups + * @description A list of external groups available to be connected to a team */ - readonly 'organization-invitation': { - readonly id: number - readonly login: string | null - readonly email: string | null - readonly role: string - readonly created_at: string - readonly failed_at?: string | null - readonly failed_reason?: string | null - readonly inviter: components['schemas']['simple-user'] - readonly team_count: number - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - readonly node_id: string - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - readonly invitation_teams_url: string + readonly 'external-groups': { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + readonly groups?: readonly { + /** + * @description The internal ID of the group + * @example 1 + */ + readonly group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + readonly group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + readonly updated_at: string + }[] } /** * Org Hook @@ -9885,38 +9577,150 @@ export interface components { readonly type: string } /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} + * Org Membership + * @description Org Membership */ - readonly 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' + readonly 'org-membership': { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + readonly url: string + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + readonly state: 'active' | 'pending' + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + readonly role: 'admin' | 'member' | 'billing_manager' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + readonly organization_url: string + readonly organization: components['schemas']['organization-simple'] + readonly user: components['schemas']['nullable-simple-user'] + readonly permissions?: { + readonly can_create_repository: boolean + } + } /** - * Interaction Limits - * @description Interaction limit settings. + * Migration + * @description A migration. */ - readonly 'interaction-limit-response': { - readonly limit: components['schemas']['interaction-group'] - /** @example repository */ - readonly origin: string + readonly migration: { + /** @example 79 */ + readonly id: number + readonly owner: components['schemas']['nullable-simple-user'] + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + readonly guid: string + /** @example pending */ + readonly state: string + /** @example true */ + readonly lock_repositories: boolean + readonly exclude_metadata: boolean + readonly exclude_git_data: boolean + readonly exclude_attachments: boolean + readonly exclude_releases: boolean + readonly exclude_owner_projects: boolean + readonly org_metadata_only: boolean + readonly repositories: readonly components['schemas']['repository'][] + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + readonly url: string /** * Format: date-time - * @example 2018-08-17T04:18:39Z + * @example 2015-07-06T15:33:38-07:00 */ - readonly expires_at: string + readonly created_at: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + readonly updated_at: string + readonly node_id: string + /** Format: uri */ + readonly archive_url?: string + readonly exclude?: readonly unknown[] + } + readonly 'org-pre-receive-hook': { + readonly id?: number + readonly name?: string + readonly enforcement?: string + readonly configuration_url?: string + readonly allow_downstream_configuration?: boolean } /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - readonly 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * Interaction Restrictions - * @description Limit interactions to a specific type of user for a specified duration + * Project + * @description Projects are a way to organize columns and cards of work. */ - readonly 'interaction-limit': { - readonly limit: components['schemas']['interaction-group'] - readonly expiry?: components['schemas']['interaction-expiry'] + readonly project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + readonly owner_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + readonly url: string + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + readonly html_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + readonly columns_url: string + /** @example 1002604 */ + readonly id: number + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + readonly node_id: string + /** + * @description Name of the project + * @example Week One Sprint + */ + readonly name: string + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + readonly body: string | null + /** @example 1 */ + readonly number: number + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + readonly state: string + readonly creator: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + readonly created_at: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + readonly updated_at: string + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + readonly organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + readonly private?: boolean } /** * Team Simple @@ -10008,496 +9812,134 @@ export interface components { readonly parent: components['schemas']['nullable-team-simple'] } /** - * Org Membership - * @description Org Membership + * Team Organization + * @description Team Organization */ - readonly 'org-membership': { + readonly 'team-organization': { + /** @example github */ + readonly login: string + /** @example 1 */ + readonly id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + readonly node_id: string /** * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt + * @example https://api.github.com/orgs/github */ readonly url: string - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - readonly state: 'active' | 'pending' - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - readonly role: 'admin' | 'member' | 'billing_manager' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - readonly organization_url: string - readonly organization: components['schemas']['organization-simple'] - readonly user: components['schemas']['nullable-simple-user'] - readonly permissions?: { - readonly can_create_repository: boolean - } - } - /** - * Migration - * @description A migration. - */ - readonly migration: { - /** @example 79 */ - readonly id: number - readonly owner: components['schemas']['nullable-simple-user'] - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - readonly guid: string - /** @example pending */ - readonly state: string - /** @example true */ - readonly lock_repositories: boolean - readonly exclude_metadata: boolean - readonly exclude_git_data: boolean - readonly exclude_attachments: boolean - readonly exclude_releases: boolean - readonly exclude_owner_projects: boolean - readonly repositories: readonly components['schemas']['repository'][] - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - readonly url: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - readonly created_at: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - readonly updated_at: string - readonly node_id: string - /** Format: uri */ - readonly archive_url?: string - readonly exclude?: readonly unknown[] - } - /** - * Minimal Repository - * @description Minimal Repository - */ - readonly 'nullable-minimal-repository': { - /** @example 1296269 */ - readonly id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - readonly node_id: string - /** @example Hello-World */ - readonly name: string - /** @example octocat/Hello-World */ - readonly full_name: string - readonly owner: components['schemas']['simple-user'] - readonly private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - readonly html_url: string - /** @example This your first repo! */ - readonly description: string | null - readonly fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - readonly url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - readonly archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - readonly assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - readonly blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - readonly branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - readonly collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - readonly comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - readonly commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - readonly compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - readonly contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - readonly contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - readonly deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @example https://api.github.com/orgs/github/repos */ - readonly downloads_url: string + readonly repos_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @example https://api.github.com/orgs/github/events */ readonly events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - readonly forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - readonly git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - readonly git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - readonly git_tags_url: string - readonly git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - readonly issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - readonly issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** @example https://api.github.com/orgs/github/hooks */ + readonly hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ readonly issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - readonly keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - readonly labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - readonly languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - readonly merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - readonly milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - readonly notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - readonly pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - readonly releases_url: string - readonly ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - readonly stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - readonly statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - readonly subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - readonly subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - readonly tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - readonly teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - readonly trees_url: string - readonly clone_url?: string - readonly mirror_url?: string | null + /** @example https://api.github.com/orgs/github/members{/member} */ + readonly members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + readonly public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + readonly avatar_url: string + /** @example A great organization */ + readonly description: string | null + /** @example github */ + readonly name?: string + /** @example GitHub */ + readonly company?: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - readonly hooks_url: string - readonly svn_url?: string - readonly homepage?: string | null - readonly language?: string | null - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - readonly pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example https://github.com/blog */ - readonly created_at?: string | null + readonly blog?: string + /** @example San Francisco */ + readonly location?: string /** - * Format: date-time - * @example 2011-01-26T19:14:43Z + * Format: email + * @example octocat@github.com */ - readonly updated_at?: string | null - readonly permissions?: { - readonly admin?: boolean - readonly maintain?: boolean - readonly push?: boolean - readonly triage?: boolean - readonly pull?: boolean - } - /** @example admin */ - readonly role_name?: string - readonly template_repository?: components['schemas']['nullable-repository'] - readonly temp_clone_token?: string - readonly delete_branch_on_merge?: boolean - readonly subscribers_count?: number - readonly network_count?: number - readonly code_of_conduct?: components['schemas']['code-of-conduct'] - readonly license?: { - readonly key?: string - readonly name?: string - readonly spdx_id?: string - readonly url?: string - readonly node_id?: string - } | null - /** @example 0 */ - readonly forks?: number - /** @example 0 */ - readonly open_issues?: number + readonly email?: string + /** @example github */ + readonly twitter_username?: string | null + /** @example true */ + readonly is_verified?: boolean + /** @example true */ + readonly has_organization_projects: boolean + /** @example true */ + readonly has_repository_projects: boolean + /** @example 2 */ + readonly public_repos: number + /** @example 1 */ + readonly public_gists: number + /** @example 20 */ + readonly followers: number /** @example 0 */ - readonly watchers?: number - readonly allow_forking?: boolean - } | null - /** - * Package - * @description A software package - */ - readonly package: { - /** - * @description Unique identifier of the package. - * @example 1 - */ - readonly id: number - /** - * @description The name of the package. - * @example super-linter - */ - readonly name: string - /** - * @example docker - * @enum {string} - */ - readonly package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - readonly url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - readonly html_url: string - /** - * @description The number of versions of the package. - * @example 1 - */ - readonly version_count: number - /** - * @example private - * @enum {string} - */ - readonly visibility: 'private' | 'public' - readonly owner?: components['schemas']['nullable-simple-user'] - readonly repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ - readonly created_at: string - /** Format: date-time */ - readonly updated_at: string - } - /** - * Package Version - * @description A version of a software package - */ - readonly 'package-version': { - /** - * @description Unique identifier of the package version. - * @example 1 - */ - readonly id: number - /** - * @description The name of the package version. - * @example latest - */ - readonly name: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ - readonly url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - readonly package_html_url: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - readonly html_url?: string - /** @example MIT */ - readonly license?: string - readonly description?: string - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - readonly created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - readonly updated_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - readonly deleted_at?: string - /** Package Version Metadata */ - readonly metadata?: { - /** - * @example docker - * @enum {string} - */ - readonly package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** Container Metadata */ - readonly container?: { - readonly tags: readonly string[] - } - /** Docker Metadata */ - readonly docker?: { - readonly tag?: readonly string[] - } & { - tags: unknown - } - } - } - /** - * Project - * @description Projects are a way to organize columns and cards of work. - */ - readonly project: { - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test - */ - readonly owner_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604 - */ - readonly url: string + readonly following: number /** * Format: uri - * @example https://github.com/api-playground/projects-test/projects/12 + * @example https://github.com/octocat */ readonly html_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604/columns - */ - readonly columns_url: string - /** @example 1002604 */ - readonly id: number - /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ - readonly node_id: string - /** - * @description Name of the project - * @example Week One Sprint - */ - readonly name: string - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - readonly body: string | null - /** @example 1 */ - readonly number: number - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - readonly state: string - readonly creator: components['schemas']['nullable-simple-user'] /** * Format: date-time - * @example 2011-04-10T20:09:31Z + * @example 2008-01-14T04:33:35Z */ readonly created_at: string + /** @example Organization */ + readonly type: string + /** @example 100 */ + readonly total_private_repos?: number + /** @example 100 */ + readonly owned_private_repos?: number + /** @example 81 */ + readonly private_gists?: number | null + /** @example 10000 */ + readonly disk_usage?: number | null + /** @example 8 */ + readonly collaborators?: number | null /** - * Format: date-time - * @example 2014-03-03T18:58:10Z + * Format: email + * @example org@example.com */ + readonly billing_email?: string | null + readonly plan?: { + readonly name: string + readonly space: number + readonly private_repos: number + readonly filled_seats?: number + readonly seats?: number + } + readonly default_repository_permission?: string | null + /** @example true */ + readonly members_can_create_repositories?: boolean | null + /** @example true */ + readonly two_factor_requirement_enabled?: boolean | null + /** @example all */ + readonly members_allowed_repository_creation_type?: string + /** @example true */ + readonly members_can_create_public_repositories?: boolean + /** @example true */ + readonly members_can_create_private_repositories?: boolean + /** @example true */ + readonly members_can_create_internal_repositories?: boolean + /** @example true */ + readonly members_can_create_pages?: boolean + /** @example true */ + readonly members_can_create_public_pages?: boolean + /** @example true */ + readonly members_can_create_private_pages?: boolean + /** @example false */ + readonly members_can_fork_private_repositories?: boolean | null + /** @example false */ + readonly web_commit_signoff_required?: boolean + /** Format: date-time */ readonly updated_at: string - /** - * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. - * @enum {string} - */ - readonly organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - readonly private?: boolean - } - /** - * GroupMapping - * @description External Groups to be mapped to a team for membership - */ - readonly 'group-mapping': { - /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] - */ - readonly groups?: readonly { - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - readonly group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - readonly group_name: string - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - readonly group_description: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - readonly status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - readonly synced_at?: string | null - }[] } /** * Full Team @@ -10564,7 +10006,7 @@ export interface components { * @example 2017-08-17T12:37:15Z */ readonly updated_at: string - readonly organization: components['schemas']['organization-full'] + readonly organization: components['schemas']['team-organization'] /** * @description Distinguished Name (DN) that team maps to within LDAP environment * @example uid=example,ou=users,dc=github,dc=com @@ -10772,10 +10214,10 @@ export interface components { } } /** - * Team Repository - * @description A team's access to a repository. + * Repository + * @description A git repository */ - readonly 'team-repository': { + readonly 'nullable-repository': { /** * @description Unique identifier of the repository * @example 42 @@ -10791,6 +10233,7 @@ export interface components { /** @example octocat/Hello-World */ readonly full_name: string readonly license: components['schemas']['nullable-license-simple'] + readonly organization?: components['schemas']['nullable-simple-user'] readonly forks: number readonly permissions?: { readonly admin: boolean @@ -10799,9 +10242,7 @@ export interface components { readonly push: boolean readonly maintain?: boolean } - /** @example admin */ - readonly role_name?: string - readonly owner: components['schemas']['nullable-simple-user'] + readonly owner: components['schemas']['simple-user'] /** * @description Whether the repository is private or public. * @default false @@ -10959,7 +10400,10 @@ export interface components { readonly stargazers_count: number /** @example 80 */ readonly watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ readonly size: number /** * @description The default branch of the repository. @@ -11033,28 +10477,522 @@ export interface components { * @example true */ readonly allow_rebase_merge?: boolean - readonly template_repository?: components['schemas']['nullable-repository'] - readonly temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - readonly allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - readonly allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - readonly delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. + 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 maintain?: boolean + readonly push?: boolean + readonly triage?: boolean + readonly pull?: boolean + } + readonly allow_rebase_merge?: boolean + readonly temp_clone_token?: string + readonly allow_squash_merge?: boolean + readonly allow_auto_merge?: boolean + readonly delete_branch_on_merge?: boolean + readonly allow_update_branch?: boolean + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + readonly allow_merge_commit?: boolean + readonly subscribers_count?: number + readonly network_count?: number + } | null + readonly temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + readonly allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + readonly allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + readonly delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + readonly allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + readonly allow_merge_commit?: boolean + /** @description Whether to allow forking this repo */ + readonly allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + readonly web_commit_signoff_required?: boolean + readonly subscribers_count?: number + readonly network_count?: number + readonly open_issues: number + readonly watchers: number + readonly master_branch?: string + /** @example "2020-07-09T00:17:42Z" */ + readonly starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + readonly anonymous_access_enabled?: boolean + } | null + /** + * Team Repository + * @description A team's access to a repository. + */ + readonly 'team-repository': { + /** + * @description Unique identifier of the repository + * @example 42 + */ + readonly id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + readonly node_id: string + /** + * @description The name of the repository. + * @example Team Environment + */ + readonly name: string + /** @example octocat/Hello-World */ + readonly full_name: string + readonly license: components['schemas']['nullable-license-simple'] + readonly forks: number + readonly permissions?: { + readonly admin: boolean + readonly pull: boolean + readonly triage?: boolean + readonly push: boolean + readonly maintain?: boolean + } + /** @example admin */ + readonly role_name?: string + readonly owner: components['schemas']['nullable-simple-user'] + /** + * @description Whether the repository is private or public. + * @default false + */ + readonly private: boolean + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + readonly html_url: string + /** @example This your first repo! */ + readonly description: string | null + readonly fork: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + readonly url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + readonly archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + readonly assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + readonly blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + readonly branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + readonly collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + readonly comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + readonly commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + readonly compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + readonly contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + readonly contributors_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + readonly deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + readonly downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + readonly events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + readonly forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + readonly git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + readonly git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + readonly git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + readonly git_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + readonly issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + readonly issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + readonly issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + readonly keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + readonly labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + readonly languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + readonly merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + readonly milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + readonly notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + readonly pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + readonly releases_url: string + /** @example git@github.com:octocat/Hello-World.git */ + readonly ssh_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + readonly stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + readonly statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + readonly subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + readonly subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + readonly tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + readonly teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + readonly trees_url: string + /** @example https://github.com/octocat/Hello-World.git */ + readonly clone_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + readonly mirror_url: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + readonly hooks_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + readonly svn_url: string + /** + * Format: uri + * @example https://github.com + */ + readonly homepage: string | null + readonly language: string | null + /** @example 9 */ + readonly forks_count: number + /** @example 80 */ + readonly stargazers_count: number + /** @example 80 */ + readonly watchers_count: number + /** @example 108 */ + readonly size: number + /** + * @description The default branch of the repository. + * @example master + */ + readonly default_branch: string + /** @example 0 */ + readonly open_issues_count: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + readonly is_template?: boolean + readonly topics?: readonly string[] + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + readonly has_issues: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + readonly has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + readonly has_wiki: boolean + readonly has_pages: boolean + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + readonly has_downloads: boolean + /** + * @description Whether the repository is archived. + * @default false + */ + readonly archived: boolean + /** @description Returns whether or not this repository disabled. */ + readonly disabled: boolean + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + readonly visibility?: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + readonly pushed_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + readonly created_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + readonly updated_at: string | null + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + readonly allow_rebase_merge?: boolean + readonly template_repository?: components['schemas']['nullable-repository'] + readonly temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + readonly allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + readonly allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + readonly delete_branch_on_merge?: boolean + /** + * @description Whether to allow merge commits for pull requests. * @default true * @example true */ @@ -11065,6 +11003,12 @@ export interface components { * @example false */ readonly allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + readonly web_commit_signoff_required?: boolean readonly subscribers_count?: number readonly network_count?: number readonly open_issues: number @@ -11219,6 +11163,20 @@ export interface components { */ readonly html_url: string | null } + readonly 'security-and-analysis': { + readonly advanced_security?: { + /** @enum {string} */ + readonly status?: 'enabled' | 'disabled' + } + readonly secret_scanning?: { + /** @enum {string} */ + readonly status?: 'enabled' | 'disabled' + } + readonly secret_scanning_push_protection?: { + /** @enum {string} */ + readonly status?: 'enabled' | 'disabled' + } + } | null /** * Full Repository * @description Full Repository @@ -11386,7 +11344,10 @@ export interface components { readonly stargazers_count: number /** @example 80 */ readonly watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ readonly size: number /** @example master */ readonly default_branch: string @@ -11455,7 +11416,51 @@ export interface components { /** @example true */ readonly allow_merge_commit?: boolean /** @example true */ + readonly allow_update_branch?: boolean + /** @example false */ + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** @example true */ readonly allow_forking?: boolean + /** @example false */ + readonly web_commit_signoff_required?: boolean /** @example 42 */ readonly subscribers_count: number /** @example 0 */ @@ -11474,16 +11479,7 @@ export interface components { */ readonly anonymous_access_enabled?: boolean readonly code_of_conduct?: components['schemas']['code-of-conduct-simple'] - readonly security_and_analysis?: { - readonly advanced_security?: { - /** @enum {string} */ - readonly status?: 'enabled' | 'disabled' - } - readonly secret_scanning?: { - /** @enum {string} */ - readonly status?: 'enabled' | 'disabled' - } - } | null + readonly security_and_analysis?: components['schemas']['security-and-analysis'] } /** * Artifact @@ -11516,12 +11512,35 @@ export interface components { readonly expires_at: string | null /** Format: date-time */ readonly updated_at: string | null + readonly workflow_run?: { + /** @example 10 */ + readonly id?: number + /** @example 42 */ + readonly repository_id?: number + /** @example 42 */ + readonly head_repository_id?: number + /** @example main */ + readonly head_branch?: string + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + readonly head_sha?: string + } | null } /** - * Job - * @description Information of a job execution in a workflow run + * Actions cache usage policy for repository + * @description GitHub Actions cache usage policy for repository. */ - readonly job: { + readonly 'actions-cache-usage-policy-for-repository': { + /** + * @description The size limit for the sum of all caches, in gigabytes. + * @example 14 + */ + readonly repo_cache_size_limit_in_gb: number + } + /** + * Job + * @description Information of a job execution in a workflow run + */ + readonly job: { /** * @description The id of the job. * @example 21 @@ -11559,8 +11578,9 @@ export interface components { /** * @description The outcome of the job. * @example success + * @enum {string|null} */ - readonly conclusion: string | null + readonly conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -11650,6 +11670,23 @@ export interface components { readonly allowed_actions?: components['schemas']['allowed-actions'] readonly selected_actions_url?: components['schemas']['selected-actions-url'] } + readonly 'actions-workflow-access-to-repository': { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + readonly access_level: 'none' | 'organization' | 'enterprise' + } + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + readonly 'referenced-workflow': { + readonly path: string + readonly sha: string + readonly ref?: string + } /** Pull Request Minimal */ readonly 'pull-request-minimal': { readonly id: number @@ -11723,10 +11760,15 @@ export interface components { /** @example master */ readonly head_branch: string | null /** - * @description The SHA of the head commit that points to the version of the worflow being run. + * @description The SHA of the head commit that points to the version of the workflow being run. * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ readonly head_sha: string + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + readonly path: string /** * @description The auto incrementing run number for the workflow run. * @example 106 @@ -11737,6 +11779,7 @@ export interface components { * @example 1 */ readonly run_attempt?: number + readonly referenced_workflows?: readonly components['schemas']['referenced-workflow'][] | null /** @example push */ readonly event: string /** @example completed */ @@ -11760,6 +11803,8 @@ export interface components { readonly created_at: string /** Format: date-time */ readonly updated_at: string + readonly actor?: components['schemas']['simple-user'] + readonly triggering_actor?: components['schemas']['simple-user'] /** * Format: date-time * @description The start time of the latest run. Resets on re-run. @@ -11810,6 +11855,8 @@ export interface components { readonly head_repository: components['schemas']['minimal-repository'] /** @example 5 */ readonly head_repository_id?: number + } & { + display_title: unknown } /** * Environment Approval @@ -11861,7 +11908,7 @@ export interface components { readonly comment: string } /** - * @description The type of reviewer. Must be one of: `User` or `Team` + * @description The type of reviewer. * @example User * @enum {string} */ @@ -11983,39 +12030,6 @@ export interface components { readonly production_environment?: boolean readonly performed_via_github_app?: components['schemas']['nullable-integration'] } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - readonly 'workflow-run-usage': { - readonly billable: { - readonly UBUNTU?: { - readonly total_ms: number - readonly jobs: number - readonly job_runs?: readonly { - readonly job_id: number - readonly duration_ms: number - }[] - } - readonly MACOS?: { - readonly total_ms: number - readonly jobs: number - readonly job_runs?: readonly { - readonly job_id: number - readonly duration_ms: number - }[] - } - readonly WINDOWS?: { - readonly total_ms: number - readonly jobs: number - readonly job_runs?: readonly { - readonly job_id: number - readonly duration_ms: number - }[] - } - } - readonly run_duration_ms?: number - } /** * Actions Secret * @description Set secrets for GitHub Actions. @@ -12071,23 +12085,6 @@ export interface components { */ readonly deleted_at?: string } - /** - * Workflow Usage - * @description Workflow Usage - */ - readonly 'workflow-usage': { - readonly billable: { - readonly UBUNTU?: { - readonly total_ms?: number - } - readonly MACOS?: { - readonly total_ms?: number - } - readonly WINDOWS?: { - readonly total_ms?: number - } - } - } /** * Autolink reference * @description An autolink reference. @@ -12149,6 +12146,8 @@ export interface components { readonly users?: readonly components['schemas']['simple-user'][] /** @description The list of teams with review dismissal access. */ readonly teams?: readonly components['schemas']['team'][] + /** @description The list of apps with review dismissal access. */ + readonly apps?: readonly components['schemas']['integration'][] /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ readonly url?: string /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ @@ -12156,13 +12155,15 @@ export interface components { /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ readonly teams_url?: string } - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ readonly bypass_pull_request_allowances?: { /** @description The list of users allowed to bypass pull request requirements. */ readonly users?: readonly components['schemas']['simple-user'][] /** @description The list of teams allowed to bypass pull request requirements. */ readonly teams?: readonly components['schemas']['team'][] - } | null + /** @description The list of apps allowed to bypass pull request requirements. */ + readonly apps?: readonly components['schemas']['integration'][] + } /** @example true */ readonly dismiss_stale_reviews: boolean /** @example true */ @@ -12292,6 +12293,9 @@ export interface components { readonly allow_deletions?: { readonly enabled?: boolean } + readonly block_creations?: { + readonly enabled?: boolean + } readonly required_conversation_resolution?: { readonly enabled?: boolean } @@ -12527,10 +12531,12 @@ export interface components { readonly teams_url: string readonly users: readonly components['schemas']['simple-user'][] readonly teams: readonly components['schemas']['team'][] + readonly apps?: readonly components['schemas']['integration'][] } readonly bypass_pull_request_allowances?: { readonly users: readonly components['schemas']['simple-user'][] readonly teams: readonly components['schemas']['team'][] + readonly apps?: readonly components['schemas']['integration'][] } } readonly required_signatures?: { @@ -12560,6 +12566,9 @@ export interface components { readonly required_conversation_resolution?: { readonly enabled?: boolean } + readonly block_creations?: { + readonly enabled: boolean + } } /** * Deployment @@ -12815,10 +12824,11 @@ export interface components { readonly html_url: components['schemas']['alert-html-url'] readonly instances_url: components['schemas']['alert-instances-url'] readonly state: components['schemas']['code-scanning-alert-state'] - readonly fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + readonly fixed_at?: components['schemas']['alert-fixed-at'] readonly dismissed_by: components['schemas']['nullable-simple-user'] - readonly dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + readonly dismissed_at: components['schemas']['alert-dismissed-at'] readonly dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + readonly dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] 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'] @@ -12831,16 +12841,17 @@ export interface components { readonly html_url: components['schemas']['alert-html-url'] readonly instances_url: components['schemas']['alert-instances-url'] readonly state: components['schemas']['code-scanning-alert-state'] - readonly fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + readonly fixed_at?: components['schemas']['alert-fixed-at'] readonly dismissed_by: components['schemas']['nullable-simple-user'] - readonly dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + readonly dismissed_at: components['schemas']['alert-dismissed-at'] readonly dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + readonly dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] 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'] } /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * @enum {string} */ readonly 'code-scanning-alert-set-state': 'open' | 'dismissed' @@ -12904,7 +12915,7 @@ export interface components { */ readonly confirm_delete_url: string | null } - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/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'] @@ -12929,222 +12940,50 @@ export interface components { readonly errors?: readonly string[] | null } /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - readonly 'nullable-codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - readonly name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - readonly display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - readonly operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - readonly storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - readonly memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - readonly cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - readonly prebuild_availability: ('none' | 'blob' | 'pool') | null - } | null - /** - * Codespace - * @description A codespace. + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file */ - readonly codespace: { - /** @example 1 */ - readonly id: number - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - readonly name: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - readonly environment_id: string | null - readonly owner: components['schemas']['simple-user'] - readonly billable_owner: components['schemas']['simple-user'] - readonly repository: components['schemas']['minimal-repository'] - readonly machine: components['schemas']['nullable-codespace-machine'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - readonly prebuild: boolean | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - readonly created_at: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - readonly updated_at: string - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - readonly last_used_at: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - readonly state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL for this codespace. - */ - readonly url: string - /** @description Details about the codespace's git repository. */ - readonly git_status: { + readonly 'codeowners-errors': { + readonly errors: readonly { /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 + * @description The line number where this errors occurs. + * @example 7 */ - readonly ahead?: number + readonly line: number /** - * @description The number of commits the local repository is behind the remote. - * @example 0 + * @description The column number where this errors occurs. + * @example 3 */ - readonly behind?: number - /** @description Whether the local repository has unpushed changes. */ - readonly has_unpushed_changes?: boolean - /** @description Whether the local repository has uncommitted changes. */ - readonly has_uncommitted_changes?: boolean + readonly column: number /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main + * @description The contents of the line where the error occurs. + * @example * user */ - readonly ref?: string - } - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - readonly location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - readonly idle_timeout_minutes: number | null - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - readonly web_url: string - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - readonly machines_url: string - /** - * Format: uri - * @description API URL to start this codespace. - */ - readonly start_url: string - /** - * Format: uri - * @description API URL to stop this codespace. - */ - readonly stop_url: string - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - readonly pulls_url: string | null - readonly recent_folders: readonly string[] - readonly runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - readonly allowed_port_privacy_settings?: readonly string[] | null - } - } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - readonly 'codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - readonly name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - readonly display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - readonly operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - readonly storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - readonly memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - readonly cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - readonly prebuild_availability: ('none' | 'blob' | 'pool') | null + readonly source?: string + /** + * @description The type of error. + * @example Invalid owner + */ + readonly kind: string + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + readonly suggestion?: string | null + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + readonly message: string + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + readonly path: string + }[] } /** * Collaborator @@ -13220,7 +13059,7 @@ export interface components { readonly admin: boolean } /** @example admin */ - readonly role_name: string + readonly role_name?: string } /** * Repository Invitation @@ -13331,7 +13170,7 @@ export interface components { readonly admin: boolean } /** @example admin */ - readonly role_name: string + readonly role_name?: string } | null /** * Repository Collaborator Permission @@ -13364,7 +13203,7 @@ export interface components { readonly created_at: string /** Format: date-time */ readonly updated_at: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly reactions?: components['schemas']['reaction-rollup'] } /** @@ -13390,7 +13229,7 @@ export interface components { * Auto merge * @description The status of auto merging a pull request. */ - readonly auto_merge: { + readonly 'auto-merge': { readonly enabled_by: components['schemas']['simple-user'] /** * @description The merge method to use. @@ -13532,8 +13371,8 @@ export interface components { readonly review_comment: components['schemas']['link'] readonly self: components['schemas']['link'] } - readonly author_association: components['schemas']['author_association'] - readonly auto_merge: components['schemas']['auto_merge'] + readonly author_association: components['schemas']['author-association'] + readonly auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -13548,7 +13387,7 @@ export interface components { readonly state: string readonly context: string /** Format: uri */ - readonly target_url: string + readonly target_url: string | null readonly required?: boolean | null /** Format: uri */ readonly avatar_url: string | null @@ -13584,68 +13423,13 @@ export interface components { readonly id: number readonly node_id: string readonly state: string - readonly description: string - readonly target_url: string + readonly description: string | null + readonly target_url: string | null readonly context: string readonly created_at: string readonly updated_at: string readonly creator: components['schemas']['nullable-simple-user'] } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - readonly 'nullable-code-of-conduct-simple': { - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - readonly url: string - /** @example citizen_code_of_conduct */ - readonly key: string - /** @example Citizen Code of Conduct */ - readonly name: string - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - readonly html_url: string | null - } | null - /** Community Health File */ - readonly 'nullable-community-health-file': { - /** Format: uri */ - readonly url: string - /** Format: uri */ - readonly html_url: string - } | null - /** - * Community Profile - * @description Community Profile - */ - readonly 'community-profile': { - /** @example 100 */ - readonly health_percentage: number - /** @example My first repository on GitHub! */ - readonly description: string | null - /** @example example.com */ - readonly documentation: string | null - readonly files: { - readonly code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - readonly code_of_conduct_file: components['schemas']['nullable-community-health-file'] - readonly license: components['schemas']['nullable-license-simple'] - readonly contributing: components['schemas']['nullable-community-health-file'] - readonly readme: components['schemas']['nullable-community-health-file'] - readonly issue_template: components['schemas']['nullable-community-health-file'] - readonly pull_request_template: components['schemas']['nullable-community-health-file'] - } - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - readonly updated_at: string | null - /** @example true */ - readonly content_reports_enabled?: boolean - } /** * Commit Comparison * @description Commit Comparison @@ -13751,7 +13535,8 @@ export interface components { * @description A list of directory items */ readonly 'content-directory': readonly { - readonly type: string + /** @enum {string} */ + readonly type: 'dir' | 'file' | 'submodule' | 'symlink' readonly size: number readonly name: string readonly path: string @@ -13779,7 +13564,8 @@ export interface components { * @description Content File */ readonly 'content-file': { - readonly type: string + /** @enum {string} */ + readonly type: 'file' readonly encoding: string readonly size: number readonly name: string @@ -13812,7 +13598,8 @@ export interface components { * @description An object describing a symlink */ readonly 'content-symlink': { - readonly type: string + /** @enum {string} */ + readonly type: 'symlink' readonly target: string readonly size: number readonly name: string @@ -13836,11 +13623,12 @@ export interface components { } } /** - * Symlink Content - * @description An object describing a symlink + * Submodule Content + * @description An object describing a submodule */ readonly 'content-submodule': { - readonly type: string + /** @enum {string} */ + readonly type: 'submodule' /** Format: uri */ readonly submodule_git_url: string readonly size: number @@ -13968,6 +13756,38 @@ export interface components { /** Format: date-time */ readonly updated_at: string } + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + readonly 'dependency-graph-diff': readonly { + /** @enum {string} */ + readonly change_type: 'added' | 'removed' + /** @example path/to/package-lock.json */ + readonly manifest: string + /** @example npm */ + readonly ecosystem: string + /** @example @actions/core */ + readonly name: string + /** @example 1.0.0 */ + readonly version: string + /** @example pkg:/npm/%40actions/core@1.1.0 */ + readonly package_url: string | null + /** @example MIT */ + readonly license: string | null + /** @example https://github.com/github/actions */ + readonly source_repository_url: string | null + readonly vulnerabilities: readonly { + /** @example critical */ + readonly severity: string + /** @example GHSA-rf4j-j272-fj86 */ + readonly advisory_ghsa_id: string + /** @example A summary of the advisory. */ + readonly advisory_summary: string + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + readonly advisory_url: string + }[] + }[] /** * Deployment Status * @description The status of a deployment. @@ -14050,7 +13870,7 @@ export interface components { */ readonly 'wait-timer': number /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - readonly deployment_branch_policy: { + readonly 'deployment-branch-policy-settings': { /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ readonly protected_branches: boolean /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ @@ -14121,7 +13941,36 @@ export interface components { readonly type: string } )[] - readonly deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + readonly deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + readonly 'deployment-branch-policy': { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + readonly id?: number + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + readonly node_id?: string + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + readonly name?: string + } + /** Deployment branch policy name pattern */ + readonly 'deployment-branch-policy-name-pattern': { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + readonly name: string } /** * Short Blob @@ -14438,86 +14287,6 @@ export interface components { readonly deliveries_url?: string readonly last_response: components['schemas']['hook-response'] } - /** - * Import - * @description A repository import from an external source. - */ - readonly import: { - readonly vcs: string | null - readonly use_lfs?: boolean - /** @description The URL of the originating repository. */ - readonly vcs_url: string - readonly svc_root?: string - readonly tfvc_project?: string - /** @enum {string} */ - readonly 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' - readonly status_text?: string | null - readonly failed_step?: string | null - readonly error_message?: string | null - readonly import_percent?: number | null - readonly commit_count?: number | null - readonly push_percent?: number | null - readonly has_large_files?: boolean - readonly large_files_size?: number - readonly large_files_count?: number - readonly project_choices?: readonly { - readonly vcs?: string - readonly tfvc_project?: string - readonly human_name?: string - }[] - readonly message?: string - readonly authors_count?: number | null - /** Format: uri */ - readonly url: string - /** Format: uri */ - readonly html_url: string - /** Format: uri */ - readonly authors_url: string - /** Format: uri */ - readonly repository_url: string - readonly svn_root?: string - } - /** - * Porter Author - * @description Porter Author - */ - readonly 'porter-author': { - readonly id: number - readonly remote_id: string - readonly remote_name: string - readonly email: string - readonly name: string - /** Format: uri */ - readonly url: string - /** Format: uri */ - readonly import_url: string - } - /** - * Porter Large File - * @description Porter Large File - */ - readonly 'porter-large-file': { - readonly ref_name: string - readonly path: string - readonly oid: string - readonly size: number - } /** * Issue * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. @@ -14550,6 +14319,12 @@ export interface components { * @example open */ readonly state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + readonly state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -14614,7 +14389,7 @@ export interface components { readonly timeline_url?: string readonly repository?: components['schemas']['repository'] readonly performed_via_github_app?: components['schemas']['nullable-integration'] - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly reactions?: components['schemas']['reaction-rollup'] } | null /** @@ -14698,7 +14473,7 @@ export interface components { readonly milestone?: components['schemas']['issue-event-milestone'] readonly project_card?: components['schemas']['issue-event-project-card'] readonly rename?: components['schemas']['issue-event-rename'] - readonly author_association?: components['schemas']['author_association'] + readonly author_association?: components['schemas']['author-association'] readonly lock_reason?: string | null readonly performed_via_github_app?: components['schemas']['nullable-integration'] } @@ -15097,7 +14872,7 @@ export interface components { readonly updated_at: string /** Format: uri */ readonly issue_url: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly performed_via_github_app?: components['schemas']['nullable-integration'] readonly reactions?: components['schemas']['reaction-rollup'] } @@ -15251,7 +15026,7 @@ export interface components { readonly commit_id: string readonly body_html?: string readonly body_text?: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] } /** * Pull Request Review Comment @@ -15289,12 +15064,12 @@ export interface components { */ readonly path: string /** - * @description The line index in the diff to which the comment applies. + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. * @example 1 */ readonly position: number /** - * @description The index of the original line in the diff to which the comment applies. + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. * @example 4 */ readonly original_position: number @@ -15341,7 +15116,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ readonly pull_request_url: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly _links: { readonly self: { /** @@ -15454,6 +15229,22 @@ export interface components { readonly performed_via_github_app: components['schemas']['nullable-integration'] readonly assignee: components['schemas']['simple-user'] } + /** + * State Change Issue Event + * @description State Change Issue Event + */ + readonly 'state-change-issue-event': { + readonly id: number + readonly node_id: string + readonly url: string + readonly actor: components['schemas']['simple-user'] + readonly event: string + readonly commit_id: string | null + readonly commit_url: string | null + readonly created_at: string + readonly performed_via_github_app: components['schemas']['nullable-integration'] + readonly state_reason?: string | null + } /** * Timeline Event * @description Timeline Event @@ -15480,6 +15271,7 @@ export interface components { | components['schemas']['timeline-commit-commented-event'] | components['schemas']['timeline-assigned-issue-event'] | components['schemas']['timeline-unassigned-issue-event'] + | components['schemas']['state-change-issue-event'] /** * Deploy Key * @description An SSH key granting access to a single repository. @@ -15689,6 +15481,12 @@ export interface components { * @example https://example.com */ readonly html_url?: string + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + readonly build_type?: ('legacy' | 'workflow') | null readonly source?: components['schemas']['pages-source-hash'] /** * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. @@ -15734,71 +15532,11 @@ export interface components { /** @example queued */ readonly status: string } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - readonly 'pages-health-check': { - readonly domain?: { - readonly host?: string - readonly uri?: string - readonly nameservers?: string - readonly dns_resolves?: boolean - readonly is_proxied?: boolean | null - readonly is_cloudflare_ip?: boolean | null - readonly is_fastly_ip?: boolean | null - readonly is_old_ip_address?: boolean | null - readonly is_a_record?: boolean | null - readonly has_cname_record?: boolean | null - readonly has_mx_records_present?: boolean | null - readonly is_valid_domain?: boolean - readonly is_apex_domain?: boolean - readonly should_be_a_record?: boolean | null - readonly is_cname_to_github_user_domain?: boolean | null - readonly is_cname_to_pages_dot_github_dot_com?: boolean | null - readonly is_cname_to_fastly?: boolean | null - readonly is_pointed_to_github_pages_ip?: boolean | null - readonly is_non_github_pages_ip_present?: boolean | null - readonly is_pages_domain?: boolean - readonly is_served_by_pages?: boolean | null - readonly is_valid?: boolean - readonly reason?: string | null - readonly responds_to_https?: boolean - readonly enforces_https?: boolean - readonly https_error?: string | null - readonly is_https_eligible?: boolean | null - readonly caa_error?: string | null - } - readonly alt_domain?: { - readonly host?: string - readonly uri?: string - readonly nameservers?: string - readonly dns_resolves?: boolean - readonly is_proxied?: boolean | null - readonly is_cloudflare_ip?: boolean | null - readonly is_fastly_ip?: boolean | null - readonly is_old_ip_address?: boolean | null - readonly is_a_record?: boolean | null - readonly has_cname_record?: boolean | null - readonly has_mx_records_present?: boolean | null - readonly is_valid_domain?: boolean - readonly is_apex_domain?: boolean - readonly should_be_a_record?: boolean | null - readonly is_cname_to_github_user_domain?: boolean | null - readonly is_cname_to_pages_dot_github_dot_com?: boolean | null - readonly is_cname_to_fastly?: boolean | null - readonly is_pointed_to_github_pages_ip?: boolean | null - readonly is_non_github_pages_ip_present?: boolean | null - readonly is_pages_domain?: boolean - readonly is_served_by_pages?: boolean | null - readonly is_valid?: boolean - readonly reason?: string | null - readonly responds_to_https?: boolean - readonly enforces_https?: boolean - readonly https_error?: string | null - readonly is_https_eligible?: boolean | null - readonly caa_error?: string | null - } | null + readonly 'repository-pre-receive-hook': { + readonly id?: number + readonly name?: string + readonly enforcement?: string + readonly configuration_url?: string } /** * Team Simple @@ -16123,6 +15861,7 @@ export interface components { readonly updated_at: string readonly allow_forking?: boolean readonly is_template?: boolean + readonly web_commit_signoff_required?: boolean } | null readonly sha: string readonly user: { @@ -16296,6 +16035,7 @@ export interface components { /** Format: date-time */ readonly updated_at: string readonly allow_forking?: boolean + readonly web_commit_signoff_required?: boolean } readonly sha: string readonly user: { @@ -16337,8 +16077,8 @@ export interface components { readonly review_comment: components['schemas']['link'] readonly self: components['schemas']['link'] } - readonly author_association: components['schemas']['author_association'] - readonly auto_merge: components['schemas']['auto_merge'] + readonly author_association: components['schemas']['author-association'] + readonly auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -16434,7 +16174,7 @@ export interface components { readonly commit_id: string readonly body_html?: string readonly body_text?: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] } /** * Legacy Review Comment @@ -16489,7 +16229,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ readonly pull_request_url: string - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly _links: { readonly self: components['schemas']['link'] readonly html: components['schemas']['link'] @@ -16611,11 +16351,6 @@ export interface components { readonly body_html?: string readonly body_text?: string readonly mentions_count?: number - /** - * Format: uri - * @description The URL of the release discussion. - */ - readonly discussion_url?: string readonly reactions?: components['schemas']['reaction-rollup'] } /** @@ -16634,6 +16369,7 @@ export interface components { readonly 'secret-scanning-alert': { readonly number?: components['schemas']['alert-number'] readonly created_at?: components['schemas']['alert-created-at'] + readonly updated_at?: components['schemas']['alert-updated-at'] readonly url?: components['schemas']['alert-url'] readonly html_url?: components['schemas']['alert-html-url'] /** @@ -16651,8 +16387,21 @@ export interface components { readonly resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ readonly secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + readonly secret_type_display_name?: string /** @description The secret that was detected. */ readonly secret?: string + /** @description Whether push protection was bypassed for the detected secret. */ + readonly push_protection_bypassed?: boolean | null + readonly push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly push_protection_bypassed_at?: string | null } /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ readonly 'secret-scanning-location-commit': { @@ -16812,6 +16561,22 @@ export interface components { readonly tarball_url: string readonly node_id: string } + /** + * Tag protection + * @description Tag protection + */ + readonly 'tag-protection': { + /** @example 2 */ + readonly id?: number + /** @example 2011-01-26T19:01:12Z */ + readonly created_at?: string + /** @example 2011-01-26T19:01:12Z */ + readonly updated_at?: string + /** @example true */ + readonly enabled?: boolean + /** @example v1.* */ + readonly pattern: string + } /** * Topic * @description A topic aggregates entities that are related to a subject. @@ -16819,61 +16584,6 @@ export interface components { readonly topic: { readonly names: readonly string[] } - /** Traffic */ - readonly traffic: { - /** Format: date-time */ - readonly timestamp: string - readonly uniques: number - readonly count: number - } - /** - * Clone Traffic - * @description Clone Traffic - */ - readonly 'clone-traffic': { - /** @example 173 */ - readonly count: number - /** @example 128 */ - readonly uniques: number - readonly clones: readonly components['schemas']['traffic'][] - } - /** - * Content Traffic - * @description Content Traffic - */ - readonly 'content-traffic': { - /** @example /github/hubot */ - readonly path: string - /** @example github/hubot: A customizable life embetterment robot. */ - readonly title: string - /** @example 3542 */ - readonly count: number - /** @example 2225 */ - readonly uniques: number - } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - readonly 'referrer-traffic': { - /** @example Google */ - readonly referrer: string - /** @example 4 */ - readonly count: number - /** @example 3 */ - readonly uniques: number - } - /** - * View Traffic - * @description View Traffic - */ - readonly 'view-traffic': { - /** @example 14850 */ - readonly count: number - /** @example 3782 */ - readonly uniques: number - readonly views: readonly components['schemas']['traffic'][] - } readonly 'scim-group-list-enterprise': { readonly schemas: readonly string[] readonly totalResults: number @@ -16970,125 +16680,6 @@ export interface components { readonly location?: string } } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - readonly 'scim-user': { - /** @description SCIM schema used. */ - readonly schemas: readonly string[] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - readonly id: string - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - readonly externalId: string | null - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - readonly userName: string | null - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - readonly displayName?: string | null - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - readonly name: { - readonly givenName: string | null - readonly familyName: string | null - readonly formatted?: string | null - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - readonly emails: readonly { - readonly value: string - readonly primary?: boolean - }[] - /** - * @description The active status of the User. - * @example true - */ - readonly active: boolean - readonly meta: { - /** @example User */ - readonly resourceType?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - readonly created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - readonly lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - readonly location?: string - } - /** @description The ID of the organization. */ - readonly organization_id?: number - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - readonly operations?: readonly { - /** @enum {string} */ - readonly op: 'add' | 'remove' | 'replace' - readonly path?: string - readonly value?: string | { readonly [key: string]: unknown } | readonly unknown[] - }[] - /** @description associated groups */ - readonly groups?: readonly { - readonly value?: string - readonly display?: string - }[] - } - /** - * SCIM User List - * @description SCIM User List - */ - readonly 'scim-user-list': { - /** @description SCIM schema used. */ - readonly schemas: readonly string[] - /** @example 3 */ - readonly totalResults: number - /** @example 10 */ - readonly itemsPerPage: number - /** @example 1 */ - readonly startIndex: number - readonly Resources: readonly components['schemas']['scim-user'][] - } /** Search Result Text Matches */ readonly 'search-result-text-matches': readonly { readonly object_url?: string @@ -17207,6 +16798,7 @@ export interface components { readonly description?: string | null }[] readonly state: string + readonly state_reason?: string | null readonly assignee: components['schemas']['nullable-simple-user'] readonly milestone: components['schemas']['nullable-milestone'] readonly comments: number @@ -17231,7 +16823,7 @@ export interface components { } readonly body?: string readonly score: number - readonly author_association: components['schemas']['author_association'] + readonly author_association: components['schemas']['author-association'] readonly draft?: boolean readonly repository?: components['schemas']['repository'] readonly body_html?: string @@ -17378,6 +16970,8 @@ export interface components { readonly delete_branch_on_merge?: boolean readonly allow_forking?: boolean readonly is_template?: boolean + /** @example false */ + readonly web_commit_signoff_required?: boolean } /** * Topic Search Result Item @@ -17474,6 +17068,163 @@ export interface components { /** Format: date-time */ readonly suspended_at?: string | null } + readonly 'configuration-status': { + readonly status?: string + readonly progress?: readonly { + readonly status: string + readonly key: string + }[] + } + readonly 'maintenance-status': { + readonly status?: string + readonly scheduled_time?: string + readonly connection_services?: readonly { + readonly name: string + readonly number: number + }[] + } + readonly 'enterprise-settings': { + readonly enterprise?: { + readonly private_mode?: boolean + readonly public_pages?: boolean + readonly subdomain_isolation?: boolean + readonly signup_enabled?: boolean + readonly github_hostname?: string + readonly identicons_host?: string + readonly http_proxy?: string | null + readonly auth_mode?: string + readonly expire_sessions?: boolean + readonly admin_password?: string | null + readonly configuration_id?: number + readonly configuration_run_count?: number + readonly avatar?: { + readonly enabled?: boolean + readonly uri?: string + } + readonly customer?: { + readonly name?: string + readonly email?: string + readonly uuid?: string + readonly secret_key_data?: string + readonly public_key_data?: string + } + readonly license?: { + readonly seats?: number + readonly evaluation?: boolean + readonly perpetual?: boolean + readonly unlimited_seating?: boolean + readonly support_key?: string + readonly ssh_allowed?: boolean + readonly cluster_support?: boolean + readonly expire_at?: string + } + readonly github_ssl?: { + readonly enabled?: boolean + readonly cert?: string | null + readonly key?: string | null + } + readonly ldap?: { + readonly host?: string | null + readonly port?: number + readonly base?: readonly unknown[] + readonly uid?: string | null + readonly bind_dn?: string | null + readonly password?: string | null + readonly method?: string + readonly search_strategy?: string + readonly user_groups?: readonly unknown[] + readonly admin_group?: string | null + readonly virtual_attribute_enabled?: boolean + readonly recursive_group_search?: boolean + readonly posix_support?: boolean + readonly user_sync_emails?: boolean + readonly user_sync_keys?: boolean + readonly user_sync_interval?: number + readonly team_sync_interval?: number + readonly sync_enabled?: boolean + readonly reconciliation?: { + readonly user?: string | null + readonly org?: string | null + } + readonly profile?: { + readonly uid?: string + readonly name?: string | null + readonly mail?: string | null + readonly key?: string | null + } + } + readonly cas?: { + readonly url?: string | null + } + readonly saml?: { + readonly sso_url?: string | null + readonly certificate?: string | null + readonly certificate_path?: string | null + readonly issuer?: string | null + readonly idp_initiated_sso?: boolean + readonly disable_admin_demote?: boolean + } + readonly github_oauth?: { + readonly client_id?: string + readonly client_secret?: string + readonly organization_name?: string + readonly organization_team?: string + } + readonly smtp?: { + readonly enabled?: boolean + readonly address?: string + readonly authentication?: string + readonly port?: string + readonly domain?: string + readonly username?: string + readonly user_name?: string + readonly enable_starttls_auto?: boolean + readonly password?: string + readonly 'discard-to-noreply-address'?: boolean + readonly support_address?: string + readonly support_address_type?: string + readonly noreply_address?: string + } + readonly ntp?: { + readonly primary_server?: string + readonly secondary_server?: string + } + readonly timezone?: string | null + readonly snmp?: { + readonly enabled?: boolean + readonly community?: string + } + readonly syslog?: { + readonly enabled?: boolean + readonly server?: string | null + readonly protocol_name?: string + } + readonly assets?: string | null + readonly pages?: { + readonly enabled?: boolean + } + readonly collectd?: { + readonly enabled?: boolean + readonly server?: string | null + readonly port?: number + readonly encryption?: string | null + readonly username?: string | null + readonly password?: string | null + } + readonly mapping?: { + readonly enabled?: boolean + readonly tileserver?: string | null + readonly basemap?: string + readonly token?: string | null + } + readonly load_balancer?: string | null + } + readonly run_list?: readonly string[] + } + readonly 'ssh-key': { + readonly key?: string + readonly 'pretty-print'?: string + } /** * Private User * @description Private User @@ -17597,84 +17348,6 @@ export interface components { readonly business_plus?: boolean readonly ldap_dn?: string } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - readonly 'codespaces-secret': { - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - readonly name: string - /** Format: date-time */ - readonly created_at: string - /** Format: date-time */ - readonly updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - readonly visibility: 'all' | 'private' | 'selected' - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - readonly selected_repositories_url: string - } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - readonly 'codespaces-user-public-key': { - /** - * @description The identifier for the key. - * @example 1234567 - */ - readonly key_id: string - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - readonly key: string - } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - readonly 'codespace-export-details': { - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - readonly state?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - readonly completed_at?: string | null - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - readonly branch?: string | null - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - readonly sha?: string | null - /** - * @description Id for the export details - * @example latest - */ - readonly id?: string - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - readonly export_url?: string - } /** * Email * @description Email @@ -17699,6 +17372,8 @@ export interface components { readonly 'gpg-key': { /** @example 3 */ readonly id: number + /** @example Octocat's GPG Key */ + readonly name?: string | null readonly primary_key_id: number | null /** @example 3262EFF25BA0D270 */ readonly key_id: string @@ -17707,7 +17382,7 @@ export interface components { /** * @example [ * { - * "email": "mastahyeti@users.noreply.github.com", + * "email": "octocat@users.noreply.github.com", * "verified": true * } * ] @@ -17730,7 +17405,8 @@ export interface components { * "can_encrypt_storage": true, * "can_certify": false, * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null + * "expires_at": null, + * "revoked": false * } * ] */ @@ -17748,6 +17424,7 @@ export interface components { readonly created_at?: string readonly expires_at?: string | null readonly raw_key?: string | null + readonly revoked?: boolean }[] /** @example true */ readonly can_sign: boolean @@ -17762,6 +17439,8 @@ export interface components { readonly created_at: string /** Format: date-time */ readonly expires_at: string | null + /** @example true */ + readonly revoked: boolean readonly raw_key: string | null } /** @@ -17778,47 +17457,6 @@ export interface components { readonly verified: boolean readonly read_only: boolean } - /** Marketplace Account */ - readonly 'marketplace-account': { - /** Format: uri */ - readonly url: string - readonly id: number - readonly type: string - readonly node_id?: string - readonly login: string - /** Format: email */ - readonly email?: string | null - /** Format: email */ - readonly organization_billing_email?: string | null - } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - readonly 'user-marketplace-purchase': { - /** @example monthly */ - readonly billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - readonly next_billing_date: string | null - readonly unit_count: number | null - /** @example true */ - readonly on_free_trial: boolean - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - readonly free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - readonly updated_at: string | null - readonly account: components['schemas']['marketplace-account'] - readonly plan: components['schemas']['marketplace-listing-plan'] - } /** * Starred Repository * @description Starred Repository @@ -17854,7 +17492,7 @@ export interface components { readonly 'application/json': components['schemas']['basic-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ readonly validation_failed_simple: { readonly content: { readonly 'application/json': components['schemas']['validation-error-simple'] @@ -17867,7 +17505,7 @@ export interface components { readonly 'application/scim+json': components['schemas']['scim-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ readonly validation_failed: { readonly content: { readonly 'application/json': components['schemas']['validation-error'] @@ -17879,15 +17517,6 @@ export interface components { readonly 'application/json': { readonly [key: string]: unknown } } } - /** Preview header missing */ - readonly preview_header_missing: { - readonly content: { - readonly 'application/json': { - readonly message: string - readonly documentation_url: string - } - } - } /** Forbidden */ readonly forbidden: { readonly content: { @@ -17980,7 +17609,7 @@ export interface components { readonly 'application/json': components['schemas']['basic-error'] } } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + /** Response if the repository is archived or if GitHub Advanced Security is not enabled for this repository */ readonly code_scanning_forbidden_write: { readonly content: { readonly 'application/json': components['schemas']['basic-error'] @@ -17990,72 +17619,59 @@ export interface components { readonly found: unknown /** A header with no content is returned. */ readonly no_content: unknown - /** Resource not found */ - readonly scim_not_found: { - readonly content: { - readonly 'application/json': components['schemas']['scim-error'] - readonly 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Forbidden */ - readonly scim_forbidden: { - readonly content: { - readonly 'application/json': components['schemas']['scim-error'] - readonly 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Bad Request */ - readonly scim_bad_request: { - readonly content: { - readonly 'application/json': components['schemas']['scim-error'] - readonly 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Internal Error */ - readonly scim_internal_error: { - readonly content: { - readonly 'application/json': components['schemas']['scim-error'] - readonly 'application/scim+json': components['schemas']['scim-error'] - } - } - /** Conflict */ - readonly scim_conflict: { - readonly content: { - readonly 'application/json': components['schemas']['scim-error'] - readonly 'application/scim+json': components['schemas']['scim-error'] - } - } } readonly parameters: { - /** @description Results per page (max 100) */ + /** @description The number of results per page (max 100). */ readonly 'per-page': number + /** @description Page number of the results to fetch. */ + readonly page: number + /** @description The unique identifier of the hook. */ + readonly 'hook-id': number + /** @description The direction to sort the results by. */ + readonly direction: 'asc' | 'desc' + /** @description The unique identifier of the key. */ + readonly 'key-ids': string + /** @description The unique identifier of the team. */ + readonly 'team-id': number + /** @description The handle for the GitHub user account. */ + readonly username: string + /** @description The organization name. The name is not case sensitive. */ + readonly org: string + /** @description The unique identifier of the pre-receive environment. */ + readonly 'pre-receive-environment-id': number + /** @description The unique identifier of the pre-receive hook. */ + readonly 'pre-receive-hook-id': number + /** @description The unique identifier of the token. */ + readonly 'token-id': number /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ readonly cursor: string readonly 'delivery-id': number - /** @description Page number of the results to fetch. */ - readonly page: number /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly since: string - /** @description installation_id parameter */ + /** @description The unique identifier of the installation. */ readonly 'installation-id': number - /** @description grant_id parameter */ + /** @description The unique identifier of the grant. */ readonly 'grant-id': number - /** @description The client ID of your GitHub app. */ + /** @description The client ID of the GitHub app. */ readonly 'client-id': string readonly 'app-slug': string - /** @description authorization_id parameter */ + /** @description The client ID of the OAuth app. */ + readonly 'oauth-client-id': string + /** @description The unique identifier of the authorization. */ readonly 'authorization-id': number /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: string - /** @description Unique identifier of an organization. */ + /** @description The unique identifier of the organization. */ readonly 'org-id': number + /** @description Only return runner groups that are allowed to be used by this organization. */ + readonly 'visible-to-organization': string /** @description Unique identifier of the self-hosted runner group. */ readonly 'runner-group-id': number /** @description Unique identifier of the self-hosted runner. */ readonly 'runner-id': number /** @description The name of a self-hosted runner's custom label. */ readonly 'runner-label-name': string - /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ readonly 'audit-log-phrase': string /** * @description The event types to include: @@ -18067,9 +17683,9 @@ export interface components { * The default is `web`. */ readonly 'audit-log-include': 'web' | 'git' | 'all' - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ readonly 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ readonly 'audit-log-before': string /** * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. @@ -18081,31 +17697,27 @@ export interface components { readonly 'secret-scanning-alert-state': 'open' | 'resolved' /** * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ readonly 'secret-scanning-alert-secret-type': string /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ readonly 'secret-scanning-alert-resolution': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + readonly 'secret-scanning-alert-sort': 'created' | 'updated' + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ readonly 'pagination-before': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ readonly 'pagination-after': string - /** @description gist_id parameter */ + /** @description The unique identifier of the gist. */ readonly 'gist-id': string - /** @description comment_id parameter */ + /** @description The unique identifier of the comment. */ readonly 'comment-id': number /** @description A list of comma separated label names. Example: `bug,ui,@high` */ readonly labels: string - /** @description One of `asc` (ascending) or `desc` (descending). */ - readonly direction: 'asc' | 'desc' - /** @description account_id parameter */ - readonly 'account-id': number - /** @description plan_id parameter */ - readonly 'plan-id': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - readonly sort: 'created' | 'updated' + /** @description The account owner of the repository. The name is not case sensitive. */ readonly owner: string + /** @description The name of the repository. The name is not case sensitive. */ readonly repo: string /** @description If `true`, show notifications marked as read. */ readonly all: boolean @@ -18113,45 +17725,41 @@ export interface components { readonly participating: boolean /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly before: string - /** @description thread_id parameter */ + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ readonly 'thread-id': number /** @description An organization ID. Only return organizations with an ID greater than this ID. */ readonly 'since-org': number - readonly org: string - /** @description team_slug parameter */ - readonly 'team-slug': string + /** @description The unique identifier of the repository. */ readonly 'repository-id': number - /** @description secret_name parameter */ + /** @description Only return runner groups that are allowed to be used by this repository. */ + readonly 'visible-to-repository': string + /** @description The name of the secret. */ readonly 'secret-name': string - readonly username: string - /** @description group_id parameter */ + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + readonly 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + readonly 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The unique identifier of the group. */ readonly 'group-id': number - readonly 'hook-id': number - /** @description invitation_id parameter */ - readonly 'invitation-id': number - /** @description migration_id parameter */ + /** @description The unique identifier of the migration. */ readonly 'migration-id': number - /** @description repo_name parameter */ - readonly 'repo-name': string - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - readonly 'package-visibility': 'public' | 'private' | 'internal' - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description The name of the package. */ - readonly 'package-name': string - /** @description Unique identifier of the package version. */ - readonly 'package-version-id': number + /** @description The slug of the team name. */ + readonly 'team-slug': string + /** @description The number that identifies the discussion. */ readonly 'discussion-number': number + /** @description The number that identifies the comment. */ readonly 'comment-number': number + /** @description The unique identifier of the reaction. */ readonly 'reaction-id': number + /** @description The unique identifier of the project. */ readonly 'project-id': number - /** @description card_id parameter */ + /** @description The unique identifier of the card. */ readonly 'card-id': number - /** @description column_id parameter */ + /** @description The unique identifier of the column. */ readonly 'column-id': number - /** @description artifact_id parameter */ + /** @description The unique identifier of the artifact. */ readonly 'artifact-id': number - /** @description job_id parameter */ + /** @description The unique identifier of the job. */ readonly 'job-id': number /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ readonly actor: string @@ -18159,7 +17767,7 @@ export interface components { readonly 'workflow-run-branch': string /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ readonly event: string - /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ readonly 'workflow-run-status': | 'completed' | 'action_required' @@ -18174,61 +17782,64 @@ export interface components { | 'queued' | 'requested' | 'waiting' - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ readonly created: string /** @description If `true` pull requests are omitted from the response (empty array). */ readonly 'exclude-pull-requests': boolean /** @description Returns workflow runs with the `check_suite_id` that you specify. */ readonly 'workflow-run-check-suite-id': number - /** @description The id of the workflow run. */ + /** @description The unique identifier of the workflow run. */ readonly 'run-id': number /** @description The attempt number of the workflow run. */ readonly 'attempt-number': number /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ readonly 'workflow-id': number | string - /** @description autolink_id parameter */ + /** @description The unique identifier of the autolink. */ readonly 'autolink-id': number /** @description The name of the branch. */ readonly branch: string - /** @description check_run_id parameter */ + /** @description The unique identifier of the check run. */ readonly 'check-run-id': number - /** @description check_suite_id parameter */ + /** @description The unique identifier of the check suite. */ readonly 'check-suite-id': number /** @description Returns check runs with the specified `name`. */ readonly 'check-name': string - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + /** @description Returns check runs with the specified `status`. */ readonly status: 'queued' | 'in_progress' | 'completed' - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - readonly 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - readonly 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ readonly 'git-ref': components['schemas']['code-scanning-ref'] /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ readonly 'alert-number': components['schemas']['alert-number'] - /** @description commit_sha parameter */ + /** @description The SHA of the commit. */ readonly 'commit-sha': string + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + readonly 'manifest-path': string /** @description deployment_id parameter */ readonly 'deployment-id': number - /** @description The name of the environment */ + /** @description The name of the environment. */ readonly 'environment-name': string - /** @description A user ID. Only return users with an ID greater than this ID. */ - readonly 'since-user': number - /** @description issue_number parameter */ + /** @description The unique identifier of the branch policy. */ + readonly 'branch-policy-id': number + /** @description The unique identifier of the invitation. */ + readonly 'invitation-id': number + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + readonly sort: 'created' | 'updated' + /** @description The number that identifies the issue. */ readonly 'issue-number': number - /** @description key_id parameter */ + /** @description The unique identifier of the key. */ readonly 'key-id': number - /** @description milestone_number parameter */ + /** @description The number that identifies the milestone. */ readonly 'milestone-number': number + /** @description The number that identifies the pull request. */ readonly 'pull-number': number - /** @description review_id parameter */ + /** @description The unique identifier of the review. */ readonly 'review-id': number - /** @description asset_id parameter */ + /** @description The unique identifier of the asset. */ readonly 'asset-id': number - /** @description release_id parameter */ + /** @description The unique identifier of the release. */ readonly 'release-id': number - /** @description Must be one of: `day`, `week`. */ - readonly per: '' | 'day' | 'week' + /** @description The unique identifier of the tag protection. */ + readonly 'tag-protection-id': number /** @description A repository ID. Only return repositories with an ID greater than this ID. */ readonly 'since-repo': number /** @description Used for pagination: the index of the first result to return. */ @@ -18237,19 +17848,14 @@ export interface components { readonly count: number /** @description Identifier generated by the GitHub SCIM endpoint. */ readonly 'scim-group-id': string - /** @description scim_user_id parameter */ + /** @description The unique identifier of the SCIM user. */ readonly 'scim-user-id': string /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ readonly order: 'desc' | 'asc' - readonly 'team-id': number - /** @description ID of the Repository to filter on */ - readonly 'repository-id-in-query': number - /** @description The name of the codespace. */ - readonly 'codespace-name': string - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - readonly 'export-id': string - /** @description gpg_key_id parameter */ + /** @description The unique identifier of the GPG key. */ readonly 'gpg-key-id': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + readonly 'since-user': number } readonly headers: { readonly link?: string @@ -18269,628 +17875,627 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': { - /** Format: uri-template */ - readonly current_user_url: string - /** Format: uri-template */ - readonly current_user_authorizations_html_url: string - /** Format: uri-template */ - readonly authorizations_url: string - /** Format: uri-template */ - readonly code_search_url: string - /** Format: uri-template */ - readonly commit_search_url: string - /** Format: uri-template */ - readonly emails_url: string - /** Format: uri-template */ - readonly emojis_url: string - /** Format: uri-template */ - readonly events_url: string - /** Format: uri-template */ - readonly feeds_url: string - /** Format: uri-template */ - readonly followers_url: string - /** Format: uri-template */ - readonly following_url: string - /** Format: uri-template */ - readonly gists_url: string - /** Format: uri-template */ - readonly hub_url: string - /** Format: uri-template */ - readonly issue_search_url: string - /** Format: uri-template */ - readonly issues_url: string - /** Format: uri-template */ - readonly keys_url: string - /** Format: uri-template */ - readonly label_search_url: string - /** Format: uri-template */ - readonly notifications_url: string - /** Format: uri-template */ - readonly organization_url: string - /** Format: uri-template */ - readonly organization_repositories_url: string - /** Format: uri-template */ - readonly organization_teams_url: string - /** Format: uri-template */ - readonly public_gists_url: string - /** Format: uri-template */ - readonly rate_limit_url: string - /** Format: uri-template */ - readonly repository_url: string - /** Format: uri-template */ - readonly repository_search_url: string - /** Format: uri-template */ - readonly current_user_repositories_url: string - /** Format: uri-template */ - readonly starred_url: string - /** Format: uri-template */ - readonly starred_gists_url: string - /** Format: uri-template */ - readonly topic_search_url?: string - /** Format: uri-template */ - readonly user_url: string - /** Format: uri-template */ - readonly user_organizations_url: string - /** Format: uri-template */ - readonly user_repositories_url: string - /** Format: uri-template */ - readonly user_search_url: string - } + readonly 'application/json': components['schemas']['root'] } } } } - /** - * 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. - */ - readonly 'apps/get-authenticated': { - readonly parameters: {} + readonly 'enterprise-admin/list-global-webhooks': { + readonly parameters: { + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['integration'] + readonly 'application/json': readonly components['schemas']['global-hook'][] } } } } - /** 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`. */ - readonly 'apps/create-from-manifest': { - readonly parameters: { - readonly path: { - readonly code: string - } - } + readonly 'enterprise-admin/create-global-webhook': { readonly responses: { /** Response */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['integration'] & - ({ - readonly client_id: string - readonly client_secret: string - readonly webhook_secret: string | null - readonly pem: string - } & { readonly [key: string]: unknown }) + readonly 'application/json': components['schemas']['global-hook'] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } + readonly 'application/json': { + /** @description Must be passed as "web". */ + readonly name: string + /** @description Key/value pairs to provide settings for this webhook. */ + readonly config: { + /** @description The URL to which the payloads will be delivered. */ + readonly url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + readonly content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + readonly secret?: string + /** @description 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.** */ + readonly insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + readonly events?: readonly string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + readonly active?: boolean + } } } } - /** - * 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. - */ - readonly 'apps/get-webhook-config-for-app': { - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['webhook-config'] - } + readonly 'enterprise-admin/get-global-webhook': { + readonly parameters: { + readonly path: { + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } - } - /** - * 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. - */ - readonly 'apps/update-webhook-config-for-app': { readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['webhook-config'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - readonly url?: components['schemas']['webhook-config-url'] - 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 'application/json': components['schemas']['global-hook'] } } } } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - readonly 'apps/list-webhook-deliveries': { + readonly 'enterprise-admin/delete-global-webhook': { readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - readonly cursor?: components['parameters']['cursor'] + readonly path: { + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['hook-delivery-item'][] - } - } - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] + readonly 204: never } } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - readonly 'apps/get-webhook-delivery': { + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + readonly 'enterprise-admin/update-global-webhook': { readonly parameters: { readonly path: { - readonly delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['hook-delivery'] + readonly 'application/json': components['schemas']['global-hook-2'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. */ + readonly config?: { + /** @description The URL to which the payloads will be delivered. */ + readonly url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + readonly content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + readonly secret?: string + /** @description 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.** */ + readonly insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + readonly events?: readonly string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + readonly active?: boolean } } - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] } } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - readonly 'apps/redeliver-webhook-delivery': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + readonly 'enterprise-admin/ping-global-webhook': { readonly parameters: { readonly path: { - readonly delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { - readonly 202: components['responses']['accepted'] - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] + /** Response */ + readonly 204: never } } - /** - * 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. - */ - readonly 'apps/list-installations': { + readonly 'enterprise-admin/list-public-keys': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly 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`. */ - readonly since?: components['parameters']['since'] - readonly outdated?: string + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + readonly sort?: 'created' | 'updated' | 'accessed' + /** Only show public keys accessed after the given time. */ + readonly since?: string } } readonly responses: { - /** The permissions the installation has are included under the `permissions` key. */ + /** Response */ readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['installation'][] + readonly 'application/json': readonly components['schemas']['public-key-full'][] } } } } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - readonly 'apps/get-installation': { + readonly 'enterprise-admin/delete-public-key': { readonly parameters: { readonly path: { - /** installation_id parameter */ - readonly installation_id: components['parameters']['installation-id'] + /** The unique identifier of the key. */ + readonly key_ids: components['parameters']['key-ids'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + } + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + readonly 'enterprise-admin/update-ldap-mapping-for-team': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['installation'] + readonly 'application/json': components['schemas']['ldap-mapping-team'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + readonly ldap_dn: string } } - readonly 404: components['responses']['not_found'] - readonly 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. - */ - readonly 'apps/delete-installation': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + readonly 'enterprise-admin/sync-ldap-mapping-for-team': { readonly parameters: { readonly path: { - /** installation_id parameter */ - readonly installation_id: components['parameters']['installation-id'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] + readonly 201: { + readonly content: { + readonly 'application/json': { + readonly status?: string + } + } + } } } - /** - * 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. - */ - readonly 'apps/create-installation-access-token': { + readonly 'enterprise-admin/update-ldap-mapping-for-user': { readonly parameters: { readonly path: { - /** installation_id parameter */ - readonly installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['installation-token'] + readonly 'application/json': components['schemas']['ldap-mapping-user'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 415: components['responses']['preview_header_missing'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description List of repository names that the token should have access to */ - readonly repositories?: readonly string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - readonly repository_ids?: readonly number[] - readonly permissions?: components['schemas']['app-permissions'] + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + readonly ldap_dn: string } } } } - /** - * 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. - */ - readonly 'apps/suspend-installation': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + readonly 'enterprise-admin/sync-ldap-mapping-for-user': { readonly parameters: { readonly path: { - /** installation_id parameter */ - readonly installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] + readonly 201: { + readonly content: { + readonly 'application/json': { + readonly status?: string + } + } + } } } - /** - * 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. - */ - readonly 'apps/unsuspend-installation': { + readonly 'enterprise-admin/create-org': { + readonly responses: { + /** Response */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['organization-simple'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The organization's username. */ + readonly login: string + /** @description The login of the user who will manage this organization. */ + readonly admin: string + /** @description The organization's display name. */ + readonly profile_name?: string + } + } + } + } + readonly 'enterprise-admin/update-org-name': { readonly parameters: { readonly path: { - /** installation_id parameter */ - readonly installation_id: components['parameters']['installation-id'] + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] + readonly 202: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly url?: string + } + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The organization's new name. */ + readonly login: string + } + } } } - /** - * **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"]`. - */ - readonly 'oauth-authorizations/list-grants': { + readonly 'enterprise-admin/list-pre-receive-environments': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - readonly client_id?: string + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + readonly sort?: 'created' | 'updated' | 'name' } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['application-grant'][] + readonly 'application/json': readonly components['schemas']['pre-receive-environment'][] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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/). */ - readonly 'oauth-authorizations/get-grant': { + readonly 'enterprise-admin/create-pre-receive-environment': { + readonly responses: { + /** Response */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['pre-receive-environment'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The new pre-receive environment's name. */ + readonly name: string + /** @description URL from which to download a tarball of this environment. */ + readonly image_url: string + } + } + } + } + readonly 'enterprise-admin/get-pre-receive-environment': { readonly parameters: { readonly path: { - /** grant_id parameter */ - readonly grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + readonly pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['application-grant'] + readonly 'application/json': components['schemas']['pre-receive-environment'] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 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 attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. * - * 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). + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ */ - readonly 'oauth-authorizations/delete-grant': { + readonly 'enterprise-admin/delete-pre-receive-environment': { readonly parameters: { readonly path: { - /** grant_id parameter */ - readonly grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + readonly pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } readonly responses: { /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] + /** Client Errors */ + readonly 422: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly errors?: readonly { + readonly resource?: string + readonly code?: string + readonly message?: string + }[] + } + } + } } } - /** - * 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). - */ - readonly 'apps/delete-authorization': { + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + readonly 'enterprise-admin/update-pre-receive-environment': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + readonly pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 422: components['responses']['validation_failed'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['pre-receive-environment'] + } + } + /** Client Errors */ + readonly 422: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly errors?: readonly { + readonly resource?: string + readonly code?: string + readonly message?: string + }[] + } + } + } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - readonly access_token: string + /** @description This pre-receive environment's new name. */ + readonly name?: string + /** @description URL from which to download a tarball of this environment. */ + readonly image_url?: string } } } } - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - readonly 'apps/check-token': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + readonly 'enterprise-admin/start-pre-receive-environment-download': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + readonly pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': components['schemas']['pre-receive-environment-download-status'] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The access_token of the OAuth application. */ - readonly access_token: string + /** Client Errors */ + readonly 422: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly errors?: readonly { + readonly resource?: string + readonly code?: string + readonly message?: string + }[] + } } } } } - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - readonly 'apps/delete-token': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + readonly 'enterprise-admin/get-download-status-for-pre-receive-environment': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + readonly pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - readonly access_token: string + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['pre-receive-environment-download-status'] } } } } - /** 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`. */ - readonly 'apps/reset-token': { + readonly 'enterprise-admin/list-pre-receive-hooks': { readonly parameters: { - readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The property to sort the results by. */ + readonly sort?: 'created' | 'updated' | 'name' } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': readonly components['schemas']['pre-receive-hook'][] + } + } + } + } + readonly 'enterprise-admin/create-pre-receive-hook': { + readonly responses: { + /** Response */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['pre-receive-hook'] } } - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The access_token of the OAuth application. */ - readonly access_token: string + /** @description The name of the hook. */ + readonly name: string + /** @description The script that the hook runs. */ + readonly script: string + /** @description The GitHub repository where the script is kept. */ + readonly script_repository: { readonly [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + readonly environment: { readonly [key: string]: unknown } + /** @description The state of enforcement for this hook. default: `disabled` */ + readonly enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. default: `false` */ + readonly allow_downstream_configuration?: boolean } } } } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - readonly 'apps/scope-token': { + readonly 'enterprise-admin/get-pre-receive-hook': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': components['schemas']['pre-receive-hook'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - readonly access_token: string - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - readonly target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - readonly target_id?: number - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - readonly repositories?: readonly string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - readonly repository_ids?: readonly number[] - readonly permissions?: components['schemas']['app-permissions'] - } + } + readonly 'enterprise-admin/delete-pre-receive-hook': { + readonly parameters: { + readonly path: { + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } + readonly responses: { + /** Response */ + readonly 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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - readonly 'apps/get-by-slug': { + readonly 'enterprise-admin/update-pre-receive-hook': { readonly parameters: { readonly path: { - readonly app_slug: components['parameters']['app-slug'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['integration'] + readonly 'application/json': components['schemas']['pre-receive-hook'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The name of the hook. */ + readonly name?: string + /** @description The script that the hook runs. */ + readonly script?: string + /** @description The GitHub repository where the script is kept. */ + readonly script_repository?: { readonly [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + readonly environment?: { readonly [key: string]: unknown } + /** @description The state of enforcement for this hook. */ + readonly enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. */ + readonly allow_downstream_configuration?: boolean } } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 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/). */ - readonly 'oauth-authorizations/list-authorizations': { + /** Lists personal access tokens for all users, including admin users. */ + readonly 'enterprise-admin/list-personal-access-tokens': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - readonly client_id?: string } } readonly responses: { @@ -18901,788 +18506,680 @@ export interface operations { readonly 'application/json': readonly components['schemas']['authorization'][] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + } + } + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + readonly 'enterprise-admin/delete-personal-access-token': { + readonly parameters: { + readonly path: { + /** The unique identifier of the token. */ + readonly token_id: components['parameters']['token-id'] + } + } + readonly responses: { + /** Response */ + readonly 204: never } } /** - * **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). + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. * - * 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)." + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * If the login name or email address is already associated with an account, the server will return a `422` response. */ - readonly 'oauth-authorizations/create-authorization': { - readonly parameters: {} + readonly 'enterprise-admin/create-user': { readonly responses: { /** Response */ readonly 201: { - readonly headers: { - readonly Location?: string - } readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': components['schemas']['simple-user'] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 410: components['responses']['gone'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description The user's username. */ + readonly login: string /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - readonly scopes?: readonly string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems + * @description **Required for built-in authentication.** The user's email + * address. This parameter can be omitted when using CAS, LDAP, or SAML. + * For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." */ - readonly note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - readonly note_url?: string - /** @description The OAuth app client key for which to create the token. */ - readonly client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - readonly client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - readonly fingerprint?: string + readonly email?: string } } } } /** - * **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 a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. * - * **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/). + * You can delete any user account except your own. */ - readonly 'oauth-authorizations/get-or-create-authorization-for-app': { + readonly 'enterprise-admin/delete-user': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** if returning an existing token */ - readonly 200: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['authorization'] - } + /** Response */ + readonly 204: never + } + } + readonly 'enterprise-admin/update-username-for-user': { + readonly parameters: { + readonly path: { + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } - /** **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/). */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + } + readonly responses: { + /** Response */ + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': { + readonly message?: string + readonly url?: string + } } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - readonly client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - readonly scopes?: readonly string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - readonly note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - readonly note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - readonly fingerprint?: string + /** @description The user's new username. */ + readonly login: string } } } } - /** - * **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)." - */ - readonly 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { + readonly 'enterprise-admin/create-impersonation-o-auth-token': { readonly parameters: { readonly path: { - /** The client ID of your GitHub app. */ - readonly client_id: components['parameters']['client-id'] - readonly fingerprint: string + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** if returning an existing token */ + /** Response when getting an existing impersonation OAuth token */ readonly 200: { - readonly headers: { - readonly Location?: string - } readonly content: { readonly 'application/json': components['schemas']['authorization'] } } - /** Response if returning a new token */ + /** Response when creating a new impersonation OAuth token */ readonly 201: { - readonly headers: { - readonly Location?: string - } readonly content: { readonly 'application/json': components['schemas']['authorization'] } } - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - readonly client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - readonly scopes?: readonly string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - readonly note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - readonly note_url?: string + /** @description A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + readonly scopes?: readonly string[] } } } } - /** **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/). */ - readonly 'oauth-authorizations/get-authorization': { + readonly 'enterprise-admin/delete-impersonation-o-auth-token': { readonly parameters: { readonly path: { - /** authorization_id parameter */ - readonly authorization_id: components['parameters']['authorization-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } + readonly responses: { + /** Response */ + readonly 204: never + } + } + /** + * 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + readonly 'apps/get-authenticated': { + readonly parameters: {} readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] + readonly 'application/json': components['schemas']['integration'] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 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/). */ - readonly 'oauth-authorizations/delete-authorization': { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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`. */ + readonly 'apps/create-from-manifest': { readonly parameters: { readonly path: { - /** authorization_id parameter */ - readonly authorization_id: components['parameters']['authorization-id'] + readonly code: string } } readonly responses: { /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['integration'] & + ({ + readonly client_id: string + readonly client_secret: string + readonly webhook_secret: string | null + readonly pem: string + } & { readonly [key: string]: unknown }) + } + } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] } } /** - * **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)." + * 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 can only send one of these scope keys at a time. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'oauth-authorizations/update-authorization': { - readonly parameters: { - readonly path: { - /** authorization_id parameter */ - readonly authorization_id: components['parameters']['authorization-id'] - } - } + readonly 'apps/get-webhook-config-for-app': { readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authorization'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - readonly scopes?: readonly string[] | null - /** @description A list of scopes to add to this authorization. */ - readonly add_scopes?: readonly string[] - /** @description A list of scopes to remove from this authorization. */ - readonly remove_scopes?: readonly string[] - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - readonly note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - readonly note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - readonly fingerprint?: string + readonly 'application/json': components['schemas']['webhook-config'] } } } } - readonly 'codes-of-conduct/get-all-codes-of-conduct': { - readonly parameters: {} + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + readonly 'apps/update-webhook-config-for-app': { readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['code-of-conduct'][] + readonly 'application/json': components['schemas']['webhook-config'] } } - readonly 304: components['responses']['not_modified'] - } - } - readonly 'codes-of-conduct/get-conduct-code': { - readonly parameters: { - readonly path: { - readonly key: string - } } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['code-of-conduct'] + readonly requestBody: { + readonly content: { + readonly 'application/json': { + readonly url?: components['schemas']['webhook-config-url'] + 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 304: components['responses']['not_modified'] - readonly 404: components['responses']['not_found'] } } - /** Lists all the emojis available to use on GitHub. */ - readonly 'emojis/get': { - readonly parameters: {} + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + readonly 'apps/list-webhook-deliveries': { + readonly parameters: { + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + readonly cursor?: components['parameters']['cursor'] + } + } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': { readonly [key: string]: string } + readonly 'application/json': readonly components['schemas']['hook-delivery-item'][] } } - readonly 304: components['responses']['not_modified'] + readonly 400: components['responses']['bad_request'] + readonly 422: components['responses']['validation_failed'] } } /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Returns a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/get-github-actions-permissions-enterprise': { + readonly 'apps/get-webhook-delivery': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + readonly delivery_id: components['parameters']['delivery-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['actions-enterprise-permissions'] + readonly 'application/json': components['schemas']['hook-delivery'] } } + readonly 400: components['responses']['bad_request'] + readonly 422: components['responses']['validation_failed'] } } /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/set-github-actions-permissions-enterprise': { + readonly 'apps/redeliver-webhook-delivery': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + readonly delivery_id: components['parameters']['delivery-id'] } } readonly responses: { - /** Response */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - readonly enabled_organizations: components['schemas']['enabled-organizations'] - readonly allowed_actions?: components['schemas']['allowed-actions'] - } - } + readonly 202: components['responses']['accepted'] + readonly 400: components['responses']['bad_request'] + readonly 422: components['responses']['validation_failed'] } } /** - * 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * The permissions the installation has are included under the `permissions` key. */ - readonly 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { + readonly 'apps/list-installations': { readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly 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`. */ + readonly since?: components['parameters']['since'] + readonly outdated?: string } } readonly responses: { - /** Response */ + /** The permissions the installation has are included under the `permissions` key. */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly organizations: readonly components['schemas']['organization-simple'][] - } + readonly 'application/json': readonly components['schemas']['installation'][] } } } } /** - * 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)." + * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + readonly 'apps/get-installation': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + readonly installation_id: components['parameters']['installation-id'] } } readonly responses: { /** Response */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - readonly selected_organization_ids: readonly number[] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['installation'] } } + readonly 404: components['responses']['not_found'] } } /** - * 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)." + * 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { + readonly 'apps/delete-installation': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - readonly org_id: components['parameters']['org-id'] + /** The unique identifier of the installation. */ + readonly installation_id: components['parameters']['installation-id'] } } readonly responses: { /** Response */ readonly 204: never + readonly 404: components['responses']['not_found'] } } /** - * 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)." + * 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { + readonly 'apps/create-installation-access-token': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of an organization. */ - readonly org_id: components['parameters']['org-id'] + /** The unique identifier of the installation. */ + readonly installation_id: components['parameters']['installation-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['installation-token'] + } + } + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description List of repository names that the token should have access to */ + readonly repositories?: readonly string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + readonly repository_ids?: readonly number[] + readonly permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * 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 Enterprise Server API or webhook events is blocked for that account. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/get-allowed-actions-enterprise': { + readonly 'apps/suspend-installation': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + readonly installation_id: components['parameters']['installation-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['selected-actions'] - } - } + readonly 204: never + readonly 404: components['responses']['not_found'] } } /** - * 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)." + * Removes a GitHub App installation suspension. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - readonly 'enterprise-admin/set-allowed-actions-enterprise': { + readonly 'apps/unsuspend-installation': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + readonly installation_id: components['parameters']['installation-id'] } } readonly responses: { /** Response */ readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': components['schemas']['selected-actions'] - } + readonly 404: components['responses']['not_found'] } } /** - * Lists all self-hosted runner groups for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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/enterprise-server@3.6/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"]`. */ - readonly 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + readonly 'oauth-authorizations/list-grants': { readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + readonly client_id?: string } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly runner_groups: readonly components['schemas']['runner-groups-enterprise'][] - } + readonly 'application/json': readonly components['schemas']['application-grant'][] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + readonly 'oauth-authorizations/get-grant': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the grant. */ + readonly grant_id: components['parameters']['grant-id'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Name of the runner group. */ - readonly name: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - readonly visibility?: 'selected' | 'all' - /** @description List of organization IDs that can access the runner group. */ - readonly selected_organization_ids?: readonly number[] - /** @description List of runner IDs to add to the runner group. */ - readonly runners?: readonly number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - readonly allows_public_repositories?: boolean + readonly 'application/json': components['schemas']['application-grant'] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } /** - * Gets a specific self-hosted runner group for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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). */ - readonly 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + readonly 'oauth-authorizations/delete-grant': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the grant. */ + readonly grant_id: components['parameters']['grant-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['runner-groups-enterprise'] - } - } + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). */ - readonly 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + readonly 'apps/delete-authorization': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The client ID of the GitHub app. */ + readonly client_id: components['parameters']['client-id'] } } readonly responses: { /** Response */ readonly 204: never + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + readonly access_token: string + } + } } } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + /** 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/enterprise-server@3.6/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`. */ + readonly 'apps/check-token': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The client ID of the GitHub app. */ + readonly client_id: components['parameters']['client-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['runner-groups-enterprise'] + readonly 'application/json': components['schemas']['authorization'] } } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Name of the runner group. */ - readonly name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - readonly visibility?: 'selected' | 'all' - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - readonly allows_public_repositories?: boolean + /** @description The access_token of the OAuth application. */ + readonly access_token: string } } } } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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. */ + readonly 'apps/delete-token': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The client ID of the GitHub app. */ + readonly client_id: components['parameters']['client-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly organizations: readonly components['schemas']['organization-simple'][] - } + readonly 204: never + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + readonly access_token: string } } } } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + /** 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/enterprise-server@3.6/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`. */ + readonly 'apps/reset-token': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The client ID of the GitHub app. */ + readonly client_id: components['parameters']['client-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - readonly selected_organization_ids: readonly number[] + /** @description The access_token of the OAuth application. */ + readonly access_token: string } } } } - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ + readonly 'apps/scope-token': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of an organization. */ - readonly org_id: components['parameters']['org-id'] + /** The client ID of the GitHub app. */ + readonly client_id: components['parameters']['client-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + readonly access_token: string + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + readonly target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + readonly target_id?: number + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + readonly repositories?: readonly string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + readonly repository_ids?: readonly number[] + readonly permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * **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`). * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - readonly 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + readonly 'apps/get-by-slug': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of an organization. */ - readonly org_id: components['parameters']['org-id'] + readonly app_slug: components['parameters']['app-slug'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['integration'] + } + } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + readonly 'oauth-authorizations/list-authorizations': { readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + readonly client_id?: string } } readonly responses: { @@ -19690,504 +19187,698 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly runners: readonly components['schemas']['runner'][] - } + readonly 'application/json': readonly components['schemas']['authorization'][] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/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/enterprise-server@3.6/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 Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ - readonly 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { - readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - } - } + readonly 'oauth-authorizations/create-authorization': { + readonly parameters: {} readonly responses: { /** Response */ - readonly 204: never + readonly 201: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - readonly runners: readonly number[] + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + readonly scopes?: readonly string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + readonly note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + readonly note_url?: string + /** @description The OAuth app client key for which to create the token. */ + readonly client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + readonly client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + readonly fingerprint?: string } } } } /** - * Adds a self-hosted runner to a runner group configured in an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ - readonly 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + readonly 'oauth-authorizations/get-or-create-authorization-for-app': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + /** The client ID of the OAuth app. */ + readonly client_id: components['parameters']['oauth-client-id'] } } readonly responses: { - /** Response */ - readonly 204: never + /** if returning an existing token */ + readonly 200: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + /** **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + readonly 201: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + readonly client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + readonly scopes?: readonly string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + readonly note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + readonly note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + readonly fingerprint?: string + } + } } } /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ - readonly 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + readonly 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + /** The client ID of the OAuth app. */ + readonly client_id: components['parameters']['oauth-client-id'] + readonly fingerprint: string } } readonly responses: { - /** Response */ - readonly 204: never + /** if returning an existing token */ + readonly 200: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + /** Response if returning a new token */ + readonly 201: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['authorization'] + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + readonly client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + readonly scopes?: readonly string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + readonly note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + readonly note_url?: string + } + } } } - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/list-self-hosted-runners-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + readonly 'oauth-authorizations/get-authorization': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The unique identifier of the authorization. */ + readonly authorization_id: components['parameters']['authorization-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count?: number - readonly runners?: readonly components['schemas']['runner'][] - } + readonly 'application/json': components['schemas']['authorization'] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/list-runner-applications-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + readonly 'oauth-authorizations/delete-authorization': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + readonly authorization_id: components['parameters']['authorization-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['runner-application'][] - } - } + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` + * You can only send one of these scope keys at a time. */ - readonly 'enterprise-admin/create-registration-token-for-enterprise': { + readonly 'oauth-authorizations/update-authorization': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + readonly authorization_id: components['parameters']['authorization-id'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authentication-token'] + readonly 'application/json': components['schemas']['authorization'] } } + readonly 422: components['responses']['validation_failed'] } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - readonly 'enterprise-admin/create-remove-token-for-enterprise': { - readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + readonly scopes?: readonly string[] | null + /** @description A list of scopes to add to this authorization. */ + readonly add_scopes?: readonly string[] + /** @description A list of scopes to remove from this authorization. */ + readonly remove_scopes?: readonly string[] + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + readonly note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + readonly note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + readonly fingerprint?: string + } } } + } + readonly 'codes-of-conduct/get-all-codes-of-conduct': { + readonly parameters: {} readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authentication-token'] + readonly 'application/json': readonly components['schemas']['code-of-conduct'][] } } + readonly 304: components['responses']['not_modified'] } } - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + readonly 'codes-of-conduct/get-conduct-code': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + readonly key: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['runner'] + readonly 'application/json': components['schemas']['code-of-conduct'] } } + readonly 304: components['responses']['not_modified'] + readonly 404: components['responses']['not_found'] } } - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { - readonly parameters: { - readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + /** Lists all the emojis available to use on GitHub Enterprise Server. */ + readonly 'emojis/get': { + readonly parameters: {} + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': { readonly [key: string]: string } + } + } + readonly 304: components['responses']['not_modified'] + } + } + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + readonly 'enterprise-admin/get-announcement': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['announcement'] + } } } + } + /** Removes the global announcement banner in your enterprise. */ + readonly 'enterprise-admin/remove-announcement': { readonly responses: { /** Response */ readonly 204: never } } - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - readonly 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + readonly 'enterprise-admin/set-announcement': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['announcement'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['announcement'] + } + } + } + readonly 'enterprise-admin/get-license-information': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['license-info'] + } + } + } + } + readonly 'enterprise-admin/get-all-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-overview'] + } + } + } + } + readonly 'enterprise-admin/get-comment-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-comment-overview'] + } + } + } + } + readonly 'enterprise-admin/get-gist-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-gist-overview'] + } + } + } + } + readonly 'enterprise-admin/get-hooks-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-hook-overview'] + } + } + } + } + readonly 'enterprise-admin/get-issue-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-issue-overview'] + } + } + } + } + readonly 'enterprise-admin/get-milestone-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-milestone-overview'] + } + } + } + } + readonly 'enterprise-admin/get-org-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-organization-overview'] + } + } + } + } + readonly 'enterprise-admin/get-pages-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-page-overview'] + } + } + } + } + readonly 'enterprise-admin/get-pull-request-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-pull-request-overview'] + } + } + } + } + readonly 'enterprise-admin/get-repo-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-repository-overview'] + } + } + } + } + readonly 'enterprise-admin/get-user-stats': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-user-overview'] + } + } + } + } + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + readonly 'actions/get-actions-cache-usage-for-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } + } } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - readonly 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + readonly 'actions/get-actions-cache-usage-policy-for-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - readonly labels: readonly string[] + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } } /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - readonly 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + readonly 'actions/set-actions-cache-usage-policy-for-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + /** Response */ + readonly 204: never } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - readonly labels: readonly string[] - } + readonly 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - readonly 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + readonly 'enterprise-admin/get-github-actions-permissions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels_readonly'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-enterprise-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - readonly 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + readonly 'enterprise-admin/set-github-actions-permissions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - readonly name: components['parameters']['runner-label-name'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + readonly enabled_organizations: components['schemas']['enabled-organizations'] + readonly allowed_actions?: components['schemas']['allowed-actions'] + } + } } } - /** 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. */ - readonly 'enterprise-admin/get-audit-log': { + /** + * 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. + */ + readonly 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] } readonly 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). */ - readonly 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`. - */ - readonly 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. */ - readonly 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. */ - readonly 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`. - */ - readonly order?: components['parameters']['audit-log-order'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['audit-log-event'][] + readonly 'application/json': { + readonly total_count: number + readonly organizations: readonly components['schemas']['organization-simple'][] + } } } } } /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * 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. */ - readonly 'secret-scanning/list-alerts-for-enterprise': { + readonly 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] } - readonly query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - readonly state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - readonly secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - readonly resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - readonly before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - readonly after?: components['parameters']['pagination-after'] - } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['organization-secret-scanning-alert'][] + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description List of organization IDs to enable for GitHub Actions. */ + readonly selected_organization_ids: readonly number[] } } - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - readonly 'billing/get-github-actions-billing-ghe': { + readonly 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the organization. */ + readonly org_id: components['parameters']['org-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['actions-billing-usage'] - } - } + readonly 204: never } } /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + * 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. */ - readonly 'billing/get-github-advanced-security-billing-ghe': { + readonly 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ readonly enterprise: components['parameters']['enterprise'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The unique identifier of the organization. */ + readonly org_id: components['parameters']['org-id'] } } readonly responses: { - /** Success */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - readonly 403: components['responses']['code_scanning_forbidden_read'] + /** Response */ + readonly 204: never } } /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - readonly 'billing/get-github-packages-billing-ghe': { + readonly 'enterprise-admin/get-allowed-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ @@ -20198,19 +19889,17 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['packages-billing-usage'] + readonly 'application/json': components['schemas']['selected-actions'] } } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - readonly 'billing/get-shared-storage-billing-ghe': { + readonly 'enterprise-admin/set-allowed-actions-enterprise': { readonly parameters: { readonly path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ @@ -20219,268 +19908,250 @@ export interface operations { } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['combined-billing-usage'] - } + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['selected-actions'] } } } - /** 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. */ - readonly 'activity/list-public-events': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + readonly 'actions/get-github-actions-default-workflow-permissions-enterprise': { readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } } readonly responses: { - /** Response */ + /** Success response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['event'][] + readonly 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 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: + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." * - * * **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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - readonly 'activity/get-feeds': { - readonly parameters: {} + readonly 'actions/set-github-actions-default-workflow-permissions-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['feed'] - } + /** Success response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - readonly 'gists/list': { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this organization. */ + readonly visible_to_organization?: components['parameters']['visible-to-organization'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['base-gist'][] + readonly 'application/json': { + readonly total_count: number + readonly runner_groups: readonly components['schemas']['runner-groups-enterprise'][] + } } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] } } /** - * Allows you to add a new gist with one or more files. + * Creates a new self-hosted runner group for an enterprise. * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'gists/create': { - readonly parameters: {} + readonly 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + } readonly responses: { /** Response */ readonly 201: { - readonly headers: { - readonly Location?: string - } readonly content: { - readonly 'application/json': components['schemas']['gist-simple'] + readonly 'application/json': components['schemas']['runner-groups-enterprise'] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description Name of the runner group. */ + readonly name: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} */ - readonly description?: string + readonly visibility?: 'selected' | 'all' + /** @description List of organization IDs that can access the runner group. */ + readonly selected_organization_ids?: readonly number[] + /** @description List of runner IDs to add to the runner group. */ + readonly runners?: readonly number[] /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - readonly files: { - readonly [key: string]: { - /** @description Content of the file */ - readonly content: string - } - } - readonly public?: boolean | ('true' | 'false') + readonly allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] } } } } /** - * List public gists sorted by most recently updated to least recently updated. + * Gets a specific self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'gists/list-public': { + readonly 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { readonly parameters: { - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['base-gist'][] + readonly 'application/json': components['schemas']['runner-groups-enterprise'] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] } } - /** List the authenticated user's starred gists: */ - readonly 'gists/list-starred': { + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { readonly parameters: { - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['base-gist'][] - } - } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] + readonly 204: never } } - readonly 'gists/get': { + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['gist-simple'] + readonly 'application/json': components['schemas']['runner-groups-enterprise'] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden_gist'] - readonly 404: components['responses']['not_found'] - } - } - readonly 'gists/delete': { - readonly parameters: { - readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 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. */ - readonly 'gists/update': { - readonly parameters: { - readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['gist-simple'] - } - } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description Name of the runner group. */ + readonly name?: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} */ - readonly description?: string + readonly visibility?: 'selected' | 'all' /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - readonly files?: { readonly [key: string]: { readonly [key: string]: unknown } } - } | null + readonly allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] + } } } } - readonly 'gists/list-comments': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -20489,153 +20160,99 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['gist-comment'][] + readonly 'application/json': { + readonly total_count: number + readonly organizations: readonly components['schemas']['organization-simple'][] + } } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] } } - readonly 'gists/create-comment': { + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['gist-comment'] - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 204: never } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - readonly body: string - } - } - } - } - readonly 'gists/get-comment': { - readonly parameters: { - readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['gist-comment'] + /** @description List of organization IDs that can access the runner group. */ + readonly selected_organization_ids: readonly number[] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden_gist'] - readonly 404: components['responses']['not_found'] } } - readonly 'gists/delete-comment': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the organization. */ + readonly org_id: components['parameters']['org-id'] } } readonly responses: { /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - readonly 'gists/update-comment': { - readonly parameters: { - readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['gist-comment'] - } - } - readonly 404: components['responses']['not_found'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - readonly body: string - } - } } } - readonly 'gists/list-commits': { + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the organization. */ + readonly org_id: components['parameters']['org-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: { - readonly Link?: string - } - readonly content: { - readonly 'application/json': readonly components['schemas']['gist-commit'][] - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 204: never } } - readonly 'gists/list-forks': { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -20646,408 +20263,436 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['gist-simple'][] + readonly 'application/json': { + readonly total_count: number + readonly runners: readonly components['schemas']['runner'][] + } } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] } } - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - readonly 'gists/fork': { + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['base-gist'] + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + readonly runners: readonly number[] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - readonly 'gists/check-is-starred': { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + readonly 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response if gist is starred */ + /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - readonly 404: { - readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } - } - } } } - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - readonly 'gists/star': { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] } } - readonly 'gists/unstar': { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/list-self-hosted-runners-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': { + readonly total_count?: number + readonly runners?: readonly components['schemas']['runner'][] + } + } + } } } - readonly 'gists/get-revision': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/list-runner-applications-for-enterprise': { readonly parameters: { readonly path: { - /** gist_id parameter */ - readonly gist_id: components['parameters']['gist-id'] - readonly sha: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['gist-simple'] + readonly 'application/json': readonly components['schemas']['runner-application'][] } } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 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). */ - readonly 'gitignore/get-all-templates': { - readonly parameters: {} + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + readonly 'enterprise-admin/create-registration-token-for-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': readonly string[] + readonly 'application/json': components['schemas']['authentication-token'] } } - readonly 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. + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` */ - readonly 'gitignore/get-template': { + readonly 'enterprise-admin/create-remove-token-for-enterprise': { readonly parameters: { readonly path: { - readonly name: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['gitignore-template'] + readonly 'application/json': components['schemas']['authentication-token'] } } - readonly 304: components['responses']['not_modified'] } } /** - * List repositories that an app installation can access. + * Gets a specific self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'apps/list-repos-accessible-to-installation': { + readonly 'enterprise-admin/get-self-hosted-runner-for-enterprise': { readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly repositories: readonly components['schemas']['repository'][] - /** @example selected */ - readonly repository_selection?: string - } + readonly 'application/json': components['schemas']['runner'] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 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. + * 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 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'apps/revoke-installation-access-token': { - readonly parameters: {} + readonly 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] + } + } readonly responses: { /** Response */ readonly 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. - * + * Lists all labels for a self-hosted runner configured in an enterprise. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'issues/list': { + readonly 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { readonly parameters: { - readonly query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - readonly filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - readonly state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - readonly labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - readonly sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - readonly 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`. */ - readonly since?: components['parameters']['since'] - readonly collab?: boolean - readonly orgs?: boolean - readonly owned?: boolean - readonly pulls?: boolean - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['issue'][] - } - } - readonly 304: components['responses']['not_modified'] + readonly 200: components['responses']['actions_runner_labels'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - readonly 'licenses/get-all-commonly-used': { + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { readonly parameters: { - readonly query: { - readonly featured?: boolean - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['license-simple'][] + readonly 200: components['responses']['actions_runner_labels'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + readonly labels: readonly string[] } } - readonly 304: components['responses']['not_modified'] } } - readonly 'licenses/get': { + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { readonly parameters: { readonly path: { - readonly license: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['license'] - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] + readonly 200: components['responses']['actions_runner_labels'] readonly 404: components['responses']['not_found'] - } - } - readonly 'markdown/render': { - readonly parameters: {} - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: { - readonly 'Content-Length'?: string - } - readonly content: { - readonly 'text/html': string - } - } - readonly 304: components['responses']['not_modified'] + readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The Markdown text to render in HTML. */ - readonly text: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - readonly mode?: 'markdown' | 'gfm' - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - readonly context?: string + /** @description The names of the custom labels to add to the runner. */ + readonly labels: readonly string[] } } } } - /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - readonly 'markdown/render-raw': { - readonly parameters: {} - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'text/html': string - } + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + readonly 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } - readonly 304: components['responses']['not_modified'] } - readonly requestBody: { - readonly content: { - readonly 'text/plain': string - readonly 'text/x-markdown': string - } + readonly responses: { + readonly 200: components['responses']['actions_runner_labels_readonly'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] } } /** - * 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. + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - readonly 'apps/get-subscription-plan-for-account': { + readonly 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { readonly parameters: { readonly path: { - /** account_id parameter */ - readonly account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + readonly name: components['parameters']['runner-label-name'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['marketplace-purchase'] - } - } - readonly 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - readonly 404: { - readonly content: { - readonly 'application/json': components['schemas']['basic-error'] - } - } + readonly 200: components['responses']['actions_runner_labels'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] } } - /** - * 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. - */ - readonly 'apps/list-plans': { + /** 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. */ + readonly 'enterprise-admin/get-audit-log': { readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + readonly 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`. + */ + readonly include?: components['parameters']['audit-log-include'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + readonly after?: components['parameters']['audit-log-after'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + readonly 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`. + */ + readonly order?: components['parameters']['audit-log-order'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['marketplace-listing-plan'][] + readonly 'application/json': readonly components['schemas']['audit-log-event'][] } } - readonly 401: components['responses']['requires_authentication'] - readonly 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. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ - readonly 'apps/list-accounts-for-plan': { + readonly 'secret-scanning/list-alerts-for-enterprise': { readonly parameters: { readonly path: { - /** plan_id parameter */ - readonly plan_id: components['parameters']['plan-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - readonly 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. */ - readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + readonly state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + readonly secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + readonly resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + readonly sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + readonly before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + readonly after?: components['parameters']['pagination-after'] } } readonly responses: { @@ -21055,47 +20700,48 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['marketplace-purchase'][] + readonly 'application/json': readonly components['schemas']['organization-secret-scanning-alert'][] } } - readonly 401: components['responses']['requires_authentication'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] + readonly 503: components['responses']['service_unavailable'] } } /** - * 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. + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * 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. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - readonly 'apps/get-subscription-plan-for-account-stubbed': { + readonly 'billing/get-github-advanced-security-billing-ghe': { readonly parameters: { readonly path: { - /** account_id parameter */ - readonly account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** Response */ + /** Success */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['marketplace-purchase'] + readonly 'application/json': components['schemas']['advanced-security-active-committers'] } } - readonly 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - readonly 404: unknown + readonly 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * 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. - */ - readonly 'apps/list-plans-stubbed': { + /** 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. */ + readonly 'activity/list-public-events': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21104,31 +20750,46 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['marketplace-listing-plan'][] + readonly 'application/json': readonly components['schemas']['event'][] } } - readonly 401: components['responses']['requires_authentication'] + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 503: components['responses']['service_unavailable'] } } /** - * 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 Enterprise Server 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 Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. * - * 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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ - readonly 'apps/list-accounts-for-plan-stubbed': { - readonly parameters: { - readonly path: { - /** plan_id parameter */ - readonly plan_id: components['parameters']['plan-id'] + readonly 'activity/get-feeds': { + readonly parameters: {} + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['feed'] + } } + } + } + /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ + readonly 'gists/list': { + readonly parameters: { readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - readonly 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. */ - readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21139,37 +20800,73 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['marketplace-purchase'][] + readonly 'application/json': readonly components['schemas']['base-gist'][] } } - readonly 401: components['responses']['requires_authentication'] + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] } } /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * Allows you to add a new gist with one or more files. * - * **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. + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ - readonly 'meta/get': { + readonly 'gists/create': { readonly parameters: {} readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['api-overview'] + readonly 'application/json': components['schemas']['gist-simple'] } } readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description Description of the gist + * @example Example Ruby script + */ + readonly description?: string + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + readonly files: { + readonly [key: string]: { + /** @description Content of the file */ + readonly content: string + } + } + readonly public?: boolean | ('true' | 'false') + } + } } } - readonly 'activity/list-public-events-for-repo-network': { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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. + */ + readonly 'gists/list-public': { readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } readonly query: { - /** Results per page (max 100) */ + /** 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21178,29 +20875,23 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['event'][] + readonly 'application/json': readonly components['schemas']['base-gist'][] } } - readonly 301: components['responses']['moved_permanently'] readonly 304: components['responses']['not_modified'] readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** List all notifications for the current user, sorted by most recently updated. */ - readonly 'activity/list-notifications-for-authenticated-user': { + /** List the authenticated user's starred gists: */ + readonly 'gists/list-starred': { readonly parameters: { readonly query: { - /** If `true`, show notifications marked as read. */ - readonly all?: components['parameters']['all'] - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - readonly 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`. */ readonly 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`. */ - readonly before?: components['parameters']['before'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21211,186 +20902,229 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['thread'][] + readonly 'application/json': readonly components['schemas']['base-gist'][] } } readonly 304: components['responses']['not_modified'] readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] - readonly 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`. */ - readonly 'activity/mark-notifications-as-read': { - readonly parameters: {} + readonly 'gists/get': { + readonly parameters: { + readonly path: { + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + } + } readonly responses: { /** Response */ - readonly 202: { + readonly 200: { readonly content: { - readonly 'application/json': { - readonly message?: string - } + readonly 'application/json': components['schemas']['gist-simple'] } } - /** Reset Content */ - readonly 205: unknown readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. - */ - readonly last_read_at?: string - /** @description Whether the notification has been read. */ - readonly read?: boolean - } - } + readonly 403: components['responses']['forbidden_gist'] + readonly 404: components['responses']['not_found'] } } - readonly 'activity/get-thread': { + readonly 'gists/delete': { readonly parameters: { readonly path: { - /** thread_id parameter */ - readonly thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['thread'] - } - } + readonly 204: never readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - readonly 'activity/mark-thread-as-read': { + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + readonly 'gists/update': { readonly parameters: { readonly path: { - /** thread_id parameter */ - readonly thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { - /** Reset Content */ - readonly 205: unknown - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['gist-simple'] + } + } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + readonly description?: string + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + readonly files?: { readonly [key: string]: { readonly [key: string]: unknown } } + } | null + } } } - /** - * 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. - */ - readonly 'activity/get-thread-subscription-for-authenticated-user': { + readonly 'gists/list-comments': { readonly parameters: { readonly path: { - /** thread_id parameter */ - readonly thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['thread-subscription'] + readonly 'application/json': readonly components['schemas']['gist-comment'][] } } readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * 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. - */ - readonly 'activity/set-thread-subscription': { + readonly 'gists/create-comment': { readonly parameters: { readonly path: { - /** thread_id parameter */ - readonly thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['thread-subscription'] + readonly 'application/json': components['schemas']['gist-comment'] } } readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } readonly requestBody: { readonly content: { readonly 'application/json': { /** - * @description Whether to block all notifications from a thread. - * @default false + * @description The comment text. + * @example Body of the attachment */ - readonly ignored?: boolean + readonly body: string } } } } - /** 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`. */ - readonly 'activity/delete-thread-subscription': { + readonly 'gists/get-comment': { readonly parameters: { readonly path: { - /** thread_id parameter */ - readonly thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['gist-comment'] + } + } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden_gist'] + readonly 404: components['responses']['not_found'] + } + } + readonly 'gists/delete-comment': { + readonly parameters: { + readonly path: { + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ readonly 204: never readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** Get the octocat as ASCII art */ - readonly 'meta/get-octocat': { + readonly 'gists/update-comment': { readonly parameters: { - readonly query: { - /** The words to show in Octocat's speech bubble */ - readonly s?: string + readonly path: { + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/octocat-stream': string + readonly 'application/json': components['schemas']['gist-comment'] + } + } + readonly 404: components['responses']['not_found'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + readonly body: 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. - */ - readonly 'orgs/list': { + readonly 'gists/list-commits': { readonly parameters: { + readonly path: { + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + } readonly query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - readonly since?: components['parameters']['since-org'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { @@ -21400,271 +21134,176 @@ export interface operations { readonly Link?: string } readonly content: { - readonly 'application/json': readonly components['schemas']['organization-simple'][] + readonly 'application/json': readonly components['schemas']['gist-commit'][] } } readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - readonly 'orgs/list-custom-roles': { + readonly 'gists/list-forks': { readonly parameters: { readonly path: { - readonly organization_id: string + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** Response - list of custom role names */ + /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - /** - * @description The number of custom roles in this organization - * @example 3 - */ - readonly total_count?: number - readonly custom_roles?: readonly components['schemas']['organization-custom-repository-role'][] - } + readonly 'application/json': readonly components['schemas']['gist-simple'][] } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - readonly 'teams/list-linked-external-idp-groups-to-team-for-org': { + readonly 'gists/fork': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** team_slug parameter */ - readonly team_slug: components['parameters']['team-slug'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['external-groups'] + readonly 'application/json': components['schemas']['base-gist'] } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - readonly 'orgs/get': { + readonly 'gists/check-is-starred': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { - /** Response */ - readonly 200: { + /** Response if gist is starred */ + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + readonly 404: { readonly content: { - readonly 'application/json': components['schemas']['organization-full'] + readonly 'application/json': { readonly [key: string]: unknown } } } - readonly 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. - */ - readonly 'orgs/update': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + readonly 'gists/star': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['organization-full'] - } - } - readonly 409: components['responses']['conflict'] - /** Validation failed */ - readonly 422: { - readonly content: { - readonly 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] - } - } + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Billing email address. This address is not publicized. */ - readonly billing_email?: string - /** @description The company name. */ - readonly company?: string - /** @description The publicly visible email address. */ - readonly email?: string - /** @description The Twitter username of the company. */ - readonly twitter_username?: string - /** @description The location. */ - readonly location?: string - /** @description The shorthand name of the company. */ - readonly name?: string - /** @description The description of the company. */ - readonly description?: string - /** @description Toggles whether an organization can use organization projects. */ - readonly has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - readonly has_repository_projects?: boolean - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - readonly default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - readonly members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - readonly members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - readonly members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - readonly members_can_create_public_repositories?: boolean - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - readonly members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - readonly members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - readonly members_can_create_public_pages?: boolean - /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - readonly members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false - */ - readonly members_can_fork_private_repositories?: boolean - /** @example "http://github.blog" */ - readonly blog?: string - } + } + readonly 'gists/unstar': { + readonly parameters: { + readonly path: { + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] } } + readonly responses: { + /** Response */ + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + } } - /** - * 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. - */ - readonly 'actions/get-github-actions-permissions-organization': { + readonly 'gists/get-revision': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + /** The unique identifier of the gist. */ + readonly gist_id: components['parameters']['gist-id'] + readonly sha: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['actions-organization-permissions'] + readonly 'application/json': components['schemas']['gist-simple'] + } + } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + } + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-for-the-authenticated-user). */ + readonly 'gitignore/get-all-templates': { + readonly parameters: {} + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': readonly string[] } } + readonly 304: components['responses']['not_modified'] } } /** - * 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. + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ - readonly 'actions/set-github-actions-permissions-organization': { + readonly 'gitignore/get-template': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + readonly name: string } } readonly responses: { /** Response */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - readonly enabled_repositories: components['schemas']['enabled-repositories'] - readonly allowed_actions?: components['schemas']['allowed-actions'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['gitignore-template'] } } + readonly 304: components['responses']['not_modified'] } } /** - * 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)." + * List repositories that an app installation can access. * - * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - readonly 'actions/list-selected-repositories-enabled-github-actions-organization': { + readonly 'apps/list-repos-accessible-to-installation': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21673,175 +21312,196 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { readonly 'application/json': { readonly total_count: number readonly repositories: readonly components['schemas']['repository'][] + /** @example selected */ + readonly repository_selection?: string } } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } /** - * 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)." + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. * - * 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. + * 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - readonly 'actions/set-selected-repositories-enabled-github-actions-organization': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } + readonly 'apps/revoke-installation-access-token': { + readonly parameters: {} readonly responses: { /** Response */ readonly 204: never } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - readonly selected_repository_ids: readonly number[] - } - } - } } /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * 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. * - * 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. + * + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - readonly 'actions/enable-selected-repository-github-actions-organization': { + readonly 'issues/list': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - readonly repository_id: components['parameters']['repository-id'] + readonly query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + readonly filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + readonly state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + readonly labels?: components['parameters']['labels'] + /** What to sort results by. */ + readonly sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + readonly 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`. */ + readonly since?: components['parameters']['since'] + readonly collab?: boolean + readonly orgs?: boolean + readonly owned?: boolean + readonly pulls?: boolean + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['issue'][] + } + } + readonly 304: components['responses']['not_modified'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** - * 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. - */ - readonly 'actions/disable-selected-repository-github-actions-organization': { + readonly 'licenses/get-all-commonly-used': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - readonly repository_id: components['parameters']['repository-id'] + readonly query: { + readonly featured?: boolean + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': readonly components['schemas']['license-simple'][] + } + } + readonly 304: components['responses']['not_modified'] } } - /** - * 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. - */ - readonly 'actions/get-allowed-actions-organization': { + readonly 'licenses/get': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + readonly license: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['selected-actions'] + readonly 'application/json': components['schemas']['license'] } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * 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. - */ - readonly 'actions/set-allowed-actions-organization': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } + readonly 'markdown/render': { + readonly parameters: {} readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly headers: { + readonly 'Content-Length'?: string + } + readonly content: { + readonly 'text/html': string + } + } + readonly 304: components['responses']['not_modified'] } readonly requestBody: { readonly content: { - readonly 'application/json': components['schemas']['selected-actions'] + readonly 'application/json': { + /** @description The Markdown text to render in HTML. */ + readonly text: string + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + readonly mode?: 'markdown' | 'gfm' + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + readonly context?: string + } } } } - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - readonly 'actions/get-github-actions-default-workflow-permissions-organization': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } + /** 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. */ + readonly 'markdown/render-raw': { + readonly parameters: {} readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + readonly 'text/html': string } } + readonly 304: components['responses']['not_modified'] } - } - /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - readonly 'actions/set-github-actions-default-workflow-permissions-organization': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] + readonly requestBody: { + readonly content: { + readonly 'text/plain': string + readonly 'text/x-markdown': string } } + } + readonly 'meta/get': { + readonly parameters: {} readonly responses: { /** Response */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['api-overview'] + } } + readonly 304: components['responses']['not_modified'] } } - /** - * 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. - */ - readonly 'actions/list-self-hosted-runner-groups-for-org': { + readonly 'activity/list-public-events-for-repo-network': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -21851,372 +21511,416 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly runner_groups: readonly components['schemas']['runner-groups-org'][] - } + readonly 'application/json': readonly components['schemas']['event'][] } } + readonly 301: components['responses']['moved_permanently'] + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** - * 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. - */ - readonly 'actions/create-self-hosted-runner-group-for-org': { + /** List all notifications for the current user, sorted by most recently updated. */ + readonly 'activity/list-notifications-for-authenticated-user': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] + readonly query: { + /** If `true`, show notifications marked as read. */ + readonly all?: components['parameters']['all'] + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + readonly 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`. */ + readonly 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`. */ + readonly before?: components['parameters']['before'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 50). */ + readonly per_page?: number } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['runner-groups-org'] + readonly 'application/json': readonly components['schemas']['thread'][] + } + } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + } + } + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + readonly 'activity/mark-notifications-as-read': { + readonly parameters: {} + readonly responses: { + /** Response */ + readonly 202: { + readonly content: { + readonly 'application/json': { + readonly message?: string + } } } + /** Reset Content */ + readonly 205: unknown + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Name of the runner group. */ - readonly name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all - * @enum {string} - */ - readonly visibility?: 'selected' | 'all' | 'private' - /** @description List of repository IDs that can access the runner group. */ - readonly selected_repository_ids?: readonly number[] - /** @description List of runner IDs to add to the runner group. */ - readonly runners?: readonly number[] /** - * @description Whether the runner group can be used by `public` repositories. - * @default false + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */ - readonly allows_public_repositories?: boolean + readonly last_read_at?: string + /** @description Whether the notification has been read. */ + readonly read?: boolean } } } } - /** - * 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. - */ - readonly 'actions/get-self-hosted-runner-group-for-org': { + /** Gets information about a notification thread. */ + readonly 'activity/get-thread': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + readonly thread_id: components['parameters']['thread-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['runner-groups-org'] + readonly 'application/json': components['schemas']['thread'] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + } + } + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ + readonly 'activity/mark-thread-as-read': { + readonly parameters: { + readonly path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + readonly thread_id: components['parameters']['thread-id'] + } + } + readonly responses: { + /** Reset Content */ + readonly 205: unknown + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] } } /** - * 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. + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - readonly 'actions/delete-self-hosted-runner-group-from-org': { + readonly 'activity/get-thread-subscription-for-authenticated-user': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + readonly thread_id: components['parameters']['thread-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['thread-subscription'] + } + } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } /** - * 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)." + * 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**. * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * 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. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ - readonly 'actions/update-self-hosted-runner-group-for-org': { + readonly 'activity/set-thread-subscription': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + readonly thread_id: components['parameters']['thread-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['runner-groups-org'] + readonly 'application/json': components['schemas']['thread-subscription'] } } + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Name of the runner group. */ - readonly name: string /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} - */ - readonly visibility?: 'selected' | 'all' | 'private' - /** - * @description Whether the runner group can be used by `public` repositories. + * @description Whether to block all notifications from a thread. * @default false */ - readonly allows_public_repositories?: boolean + readonly ignored?: boolean } } } } - /** - * 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. - */ - readonly 'actions/list-repo-access-to-self-hosted-runner-group-in-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + readonly 'activity/delete-thread-subscription': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + readonly thread_id: components['parameters']['thread-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly repositories: readonly components['schemas']['minimal-repository'][] - } - } - } + readonly 204: never + readonly 304: components['responses']['not_modified'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] } } - /** - * 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. - */ - readonly 'actions/set-repo-access-to-self-hosted-runner-group-in-org': { + /** Get the octocat as ASCII art */ + readonly 'meta/get-octocat': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] + readonly query: { + /** The words to show in Octocat's speech bubble */ + readonly s?: string } } readonly responses: { /** Response */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - readonly selected_repository_ids: readonly number[] + readonly 200: { + readonly content: { + readonly 'application/octocat-stream': string } } } } /** - * 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)." + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ - readonly 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { + readonly 'orgs/list': { readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - readonly repository_id: components['parameters']['repository-id'] + readonly query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + readonly since?: components['parameters']['since-org'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly headers: { + readonly Link?: string + } + readonly content: { + readonly 'application/json': readonly components['schemas']['organization-simple'][] + } + } + readonly 304: components['responses']['not_modified'] } } /** - * 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)." - * + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. * - * 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)." + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - readonly 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + readonly 'orgs/list-custom-roles': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - readonly repository_id: components['parameters']['repository-id'] + /** The unique identifier of the organization. */ + readonly organization_id: string } } readonly responses: { - /** Response */ - readonly 204: never + /** Response - list of custom role names */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + readonly total_count?: number + readonly custom_roles?: readonly components['schemas']['organization-custom-repository-role'][] + } + } + } } } /** - * 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. + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." */ - readonly 'actions/list-self-hosted-runners-in-group-for-org': { + readonly 'orgs/get': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly runners: readonly components['schemas']['runner'][] - } + readonly 'application/json': components['schemas']['organization-full'] } } + readonly 404: components['responses']['not_found'] } } /** - * 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. + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ - readonly 'actions/set-self-hosted-runners-in-group-for-org': { + readonly 'orgs/update': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['organization-full'] + } + } + readonly 409: components['responses']['conflict'] + /** Validation failed */ + readonly 422: { + readonly content: { + readonly 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - readonly runners: readonly number[] + /** @description Billing email address. This address is not publicized. */ + readonly billing_email?: string + /** @description The company name. */ + readonly company?: string + /** @description The publicly visible email address. */ + readonly email?: string + /** @description The Twitter username of the company. */ + readonly twitter_username?: string + /** @description The location. */ + readonly location?: string + /** @description The shorthand name of the company. */ + readonly name?: string + /** @description The description of the company. */ + readonly description?: string + /** @description Whether an organization can use organization projects. */ + readonly has_organization_projects?: boolean + /** @description Whether repositories that belong to the organization can use repository projects. */ + readonly has_repository_projects?: boolean + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + readonly default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + readonly members_can_create_repositories?: boolean + /** @description 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+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + readonly members_can_create_internal_repositories?: boolean + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + readonly members_can_create_private_repositories?: boolean + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + readonly members_can_create_public_repositories?: boolean + /** + * @description Specifies which types of repositories non-admin organization members can create. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + readonly members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + readonly members_can_create_pages?: boolean + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + readonly members_can_fork_private_repositories?: boolean + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + readonly web_commit_signoff_required?: boolean + /** @example "http://github.blog" */ + readonly blog?: string } } } } /** - * 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. + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - readonly 'actions/add-self-hosted-runner-to-group-for-org': { + readonly 'actions/get-actions-cache-usage-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ - readonly 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. - */ - readonly 'actions/remove-self-hosted-runner-from-group-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - readonly runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } } } - readonly responses: { - /** Response */ - readonly 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. + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - readonly 'actions/list-self-hosted-runners-for-org': { + readonly 'actions/get-actions-cache-usage-by-repo-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -22229,20 +21933,21 @@ export interface operations { readonly content: { readonly 'application/json': { readonly total_count: number - readonly runners: readonly components['schemas']['runner'][] + readonly repository_cache_usages: readonly components['schemas']['actions-cache-usage-by-repository'][] } } } } } /** - * Lists binaries for the runner application that you can download and run. + * 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. + * 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. */ - readonly 'actions/list-runner-applications-for-org': { + readonly 'actions/get-github-actions-permissions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -22250,101 +21955,105 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['runner-application'][] + readonly 'application/json': components['schemas']['actions-organization-permissions'] } } } } /** - * 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 + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * 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. * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` + * 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. */ - readonly 'actions/create-registration-token-for-org': { + readonly 'actions/set-github-actions-permissions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } readonly responses: { /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['authentication-token'] + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + readonly enabled_repositories: components['schemas']['enabled-repositories'] + readonly allowed_actions?: components['schemas']['allowed-actions'] } } } } /** - * 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. + * 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)." * - * ``` - * ./config.sh remove --token TOKEN - * ``` + * 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. */ - readonly 'actions/create-remove-token-for-org': { + readonly 'actions/list-selected-repositories-enabled-github-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['authentication-token'] + readonly 'application/json': { + readonly total_count: number + readonly repositories: readonly components['schemas']['repository'][] + } } } } } /** - * Gets a specific self-hosted runner configured in an 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. + * 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. */ - readonly 'actions/get-self-hosted-runner-for-org': { + readonly 'actions/set-selected-repositories-enabled-github-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['runner'] + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description List of repository IDs to enable for GitHub Actions. */ + readonly selected_repository_ids: readonly number[] } } } } /** - * 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. + * 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. + * 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. */ - readonly 'actions/delete-self-hosted-runner-from-org': { + readonly 'actions/enable-selected-repository-github-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] } } readonly responses: { @@ -22353,346 +22062,434 @@ export interface operations { } } /** - * Lists all labels for a self-hosted runner configured in an 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. + * 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. */ - readonly 'actions/list-labels-for-self-hosted-runner-for-org': { + readonly 'actions/disable-selected-repository-github-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] + /** Response */ + readonly 204: never } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. + * 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. + * 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. */ - readonly 'actions/set-custom-labels-for-self-hosted-runner-for-org': { + readonly 'actions/get-allowed-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - readonly labels: readonly string[] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['selected-actions'] } } } } /** - * Add custom labels to a self-hosted runner configured in an 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)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - readonly 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + readonly 'actions/set-allowed-actions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + /** Response */ + readonly 204: never } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - readonly labels: readonly string[] - } + readonly 'application/json': components['schemas']['selected-actions'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - readonly 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { + readonly 'actions/get-github-actions-default-workflow-permissions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels_readonly'] - readonly 404: components['responses']['not_found'] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - readonly 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + readonly 'actions/set-github-actions-default-workflow-permissions-organization': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - readonly runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - readonly name: components['parameters']['runner-label-name'] } } readonly responses: { - readonly 200: components['responses']['actions_runner_labels'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + /** Success response */ + readonly 204: never + /** Conflict response when changing a setting is prevented by the owning enterprise */ + readonly 409: unknown + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } } } - /** 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. */ - readonly 'actions/list-org-secrets': { + /** + * 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. + */ + readonly 'actions/list-self-hosted-runner-groups-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this repository. */ + readonly visible_to_repository?: components['parameters']['visible-to-repository'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { readonly 'application/json': { readonly total_count: number - readonly secrets: readonly components['schemas']['organization-actions-secret'][] + readonly runner_groups: readonly components['schemas']['runner-groups-org'][] } } } } } - /** 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. */ - readonly 'actions/get-org-public-key': { + /** + * 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. + */ + readonly 'actions/create-self-hosted-runner-group-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['actions-public-key'] + readonly 'application/json': components['schemas']['runner-groups-org'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Name of the runner group. */ + readonly name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + readonly visibility?: 'selected' | 'all' | 'private' + /** @description List of repository IDs that can access the runner group. */ + readonly selected_repository_ids?: readonly number[] + /** @description List of runner IDs to add to the runner group. */ + readonly runners?: readonly number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + readonly allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] } } } } - /** 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. */ - readonly 'actions/get-org-secret': { + /** + * 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. + */ + readonly 'actions/get-self-hosted-runner-group-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['organization-actions-secret'] + readonly 'application/json': components['schemas']['runner-groups-org'] } } } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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. */ - readonly 'actions/create-or-update-org-secret': { + readonly 'actions/delete-self-hosted-runner-group-from-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { - /** Response when creating a secret */ - readonly 201: { + /** Response */ + readonly 204: never + } + } + /** + * 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. + */ + readonly 'actions/update-self-hosted-runner-group-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + } + } + readonly responses: { + /** Response */ + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['empty-object'] + readonly 'application/json': components['schemas']['runner-groups-org'] } } - /** Response when updating a secret */ - readonly 204: never } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - readonly encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - readonly key_id?: string + /** @description Name of the runner group. */ + readonly name: string /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. * @enum {string} */ - readonly visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - readonly selected_repository_ids?: readonly string[] + readonly visibility?: 'selected' | 'all' | 'private' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + readonly allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + readonly restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + readonly selected_workflows?: readonly string[] } } } } - /** 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. */ - readonly 'actions/delete-org-secret': { + /** + * 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. + */ + readonly 'actions/list-repo-access-to-self-hosted-runner-group-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + } + readonly query: { + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly repositories: readonly components['schemas']['minimal-repository'][] + } + } + } + } + } + /** + * 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. + */ + readonly 'actions/set-repo-access-to-self-hosted-runner-group-in-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { /** Response */ readonly 204: never } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + readonly selected_repository_ids: readonly number[] + } + } + } } - /** 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. */ - readonly 'actions/list-selected-repos-for-org-secret': { + /** + * 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. + */ + readonly 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + } + /** + * 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. + */ + readonly 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + } + /** + * 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. + */ + readonly 'actions/list-self-hosted-runners-in-group-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { readonly 'application/json': { readonly total_count: number - readonly repositories: readonly components['schemas']['minimal-repository'][] + readonly runners: readonly components['schemas']['runner'][] } } } } } - /** 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. */ - readonly 'actions/set-selected-repos-for-org-secret': { + /** + * 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. + */ + readonly 'actions/set-self-hosted-runners-in-group-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] } } readonly responses: { @@ -22702,96 +22499,92 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - readonly selected_repository_ids: readonly number[] + /** @description List of runner IDs to add to the runner group. */ + readonly runners: readonly number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - readonly 'actions/add-selected-repo-to-org-secret': { + /** + * 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. + */ + readonly 'actions/add-self-hosted-runner-to-group-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] - readonly repository_id: number + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** No Content when repository was added to the selected list */ + /** Response */ readonly 204: never - /** Conflict when visibility type is not set to selected */ - readonly 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. */ - readonly 'actions/remove-selected-repo-from-org-secret': { + /** + * 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. + */ + readonly 'actions/remove-self-hosted-runner-from-group-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] - readonly repository_id: number + /** Unique identifier of the self-hosted runner group. */ + readonly runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response when repository was removed from the selected list */ + /** Response */ readonly 204: never - /** Conflict when visibility type not set to selected */ - readonly 409: unknown } } /** - * 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)." + * Lists all self-hosted runners configured in an organization. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - readonly 'orgs/get-audit-log': { + readonly 'actions/list-self-hosted-runners-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly 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). */ - readonly 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`. - */ - readonly 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. */ - readonly 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. */ - readonly 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`. - */ - readonly order?: components['parameters']['audit-log-order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['audit-log-event'][] + readonly 'application/json': { + readonly total_count: number + readonly runners: readonly components['schemas']['runner'][] + } } } } } - /** List the users blocked by an organization. */ - readonly 'orgs/list-blocked-users': { + /** + * 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. + */ + readonly 'actions/list-runner-applications-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -22799,151 +22592,243 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['simple-user'][] + readonly 'application/json': readonly components['schemas']['runner-application'][] } } - readonly 415: components['responses']['preview_header_missing'] } } - readonly 'orgs/check-blocked-user': { + /** + * 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 + * ``` + */ + readonly 'actions/create-registration-token-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - readonly username: components['parameters']['username'] } } readonly responses: { - /** If the user is blocked: */ - readonly 204: never - /** If the user is not blocked: */ - readonly 404: { + /** Response */ + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['authentication-token'] } } } } - readonly 'orgs/block-user': { + /** + * 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 + * ``` + */ + readonly 'actions/create-remove-token-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 422: components['responses']['validation_failed'] + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['authentication-token'] + } + } } } - readonly 'orgs/unblock-user': { + /** + * 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. + */ + readonly 'actions/get-self-hosted-runner-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - readonly username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['runner'] + } + } } } /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * 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. * - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - readonly 'code-scanning/list-alerts-for-org': { + readonly 'actions/delete-self-hosted-runner-from-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - } - readonly query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - readonly before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - readonly after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - readonly direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - readonly state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - readonly sort?: 'created' | 'updated' + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['code-scanning-organization-alert-items'][] - } + readonly 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + readonly 'actions/list-labels-for-self-hosted-runner-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } - readonly 403: components['responses']['code_scanning_forbidden_read'] + } + readonly responses: { + readonly 200: components['responses']['actions_runner_labels'] readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - readonly 'orgs/list-saml-sso-authorizations': { + readonly 'actions/set-custom-labels-for-self-hosted-runner-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page token */ - readonly page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - readonly login?: string + } + readonly responses: { + readonly 200: components['responses']['actions_runner_labels'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + readonly labels: readonly string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + readonly 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['credential-authorization'][] + readonly 200: components['responses']['actions_runner_labels'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + readonly labels: readonly string[] } } } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - readonly 'orgs/remove-saml-sso-authorization': { + readonly 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - readonly credential_id: number + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] } } readonly responses: { - /** Response */ - readonly 204: never + readonly 200: components['responses']['actions_runner_labels_readonly'] readonly 404: components['responses']['not_found'] } } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/list-org-secrets': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + readonly 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + readonly runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + readonly name: components['parameters']['runner-label-name'] + } + } + readonly responses: { + readonly 200: components['responses']['actions_runner_labels'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + } + /** 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. */ + readonly 'actions/list-org-secrets': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -22956,16 +22841,17 @@ export interface operations { readonly content: { readonly 'application/json': { readonly total_count: number - readonly secrets: readonly components['schemas']['organization-dependabot-secret'][] + readonly secrets: readonly components['schemas']['organization-actions-secret'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/get-org-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. */ + readonly 'actions/get-org-public-key': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -22973,17 +22859,18 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['dependabot-public-key'] + readonly '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 `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/get-org-secret': { + /** 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. */ + readonly 'actions/get-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -22991,7 +22878,7 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['organization-dependabot-secret'] + readonly 'application/json': components['schemas']['organization-actions-secret'] } } } @@ -22999,8 +22886,8 @@ export interface operations { /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. + * 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 * @@ -23073,11 +22960,12 @@ export interface operations { * puts Base64.strict_encode64(encrypted_secret) * ``` */ - readonly 'dependabot/create-or-update-org-secret': { + readonly 'actions/create-or-update-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -23094,30 +22982,28 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) endpoint. */ readonly encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ readonly key_id?: string /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. * @enum {string} */ readonly visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - readonly selected_repository_ids?: readonly string[] + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + readonly selected_repository_ids?: readonly number[] } } } } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/delete-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. */ + readonly 'actions/delete-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -23126,18 +23012,19 @@ export interface operations { readonly 204: never } } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/list-selected-repos-for-org-secret': { + /** 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. */ + readonly 'actions/list-selected-repos-for-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } readonly query: { /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] } } @@ -23153,12 +23040,13 @@ export interface operations { } } } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/set-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/enterprise-server@3.6/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. */ + readonly 'actions/set-selected-repos-for-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -23169,18 +23057,19 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ readonly selected_repository_ids: readonly number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/add-selected-repo-to-org-secret': { + /** 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/enterprise-server@3.6/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. */ + readonly 'actions/add-selected-repo-to-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] readonly repository_id: number } @@ -23192,12 +23081,13 @@ export interface operations { readonly 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - readonly 'dependabot/remove-selected-repo-from-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/enterprise-server@3.6/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. */ + readonly 'actions/remove-selected-repo-from-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] readonly repository_id: number } @@ -23209,13 +23099,45 @@ export interface operations { readonly 409: unknown } } - readonly 'activity/list-public-org-events': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." + */ + readonly 'orgs/get-audit-log': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ + readonly 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`. + */ + readonly include?: components['parameters']['audit-log-include'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + readonly after?: components['parameters']['audit-log-after'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + readonly 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`. + */ + readonly order?: components['parameters']['audit-log-order'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23225,72 +23147,345 @@ export interface operations { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['event'][] + readonly 'application/json': readonly components['schemas']['audit-log-event'][] } } } } /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * GitHub Apps must have the `security_events` read permission to use this endpoint. */ - readonly 'teams/external-idp-group-info-for-org': { + readonly 'code-scanning/list-alerts-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** group_id parameter */ - readonly group_id: components['parameters']['group-id'] + } + readonly 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. */ + readonly 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. */ + readonly tool_guid?: components['parameters']['tool-guid'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + readonly before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + readonly after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** If specified, only code scanning alerts with this state will be returned. */ + readonly state?: components['schemas']['code-scanning-alert-state'] + /** The property by which to sort the results. */ + readonly sort?: 'created' | 'updated' } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['external-group'] + readonly 'application/json': readonly components['schemas']['code-scanning-organization-alert-items'][] + } + } + readonly 403: components['responses']['code_scanning_forbidden_read'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/list-org-secrets': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly secrets: readonly components['schemas']['organization-dependabot-secret'][] + } + } + } + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/get-org-public-key': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['dependabot-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 `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/get-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['organization-dependabot-secret'] } } } } /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - readonly 'teams/list-external-idp-groups-for-org': { + readonly 'dependabot/create-or-update-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + } + } + readonly responses: { + /** Response when creating a secret */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + readonly encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + readonly key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + readonly visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + readonly selected_repository_ids?: readonly string[] + } + } + } + } + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/delete-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/list-selected-repos-for-org-secret': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } readonly query: { - /** Results per page (max 100) */ + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] - /** Page token */ - readonly page?: number - /** Limits the list to groups containing the text in the group name */ - readonly display_name?: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: { - readonly Link?: string - } readonly content: { - readonly 'application/json': components['schemas']['external-groups'] + readonly 'application/json': { + readonly total_count: number + readonly repositories: readonly components['schemas']['minimal-repository'][] + } + } + } + } + } + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/set-selected-repos-for-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + readonly selected_repository_ids: readonly number[] } } } } - /** 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. */ - readonly 'orgs/list-failed-invitations': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/add-selected-repo-to-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + readonly repository_id: number + } + } + readonly responses: { + /** No Content when repository was added to the selected list */ + readonly 204: never + /** Conflict when visibility type is not set to selected */ + readonly 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + readonly 'dependabot/remove-selected-repo-from-org-secret': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + readonly repository_id: number + } + } + readonly responses: { + /** Response when repository was removed from the selected list */ + readonly 204: never + /** Conflict when visibility type not set to selected */ + readonly 409: unknown + } + } + readonly 'activity/list-public-org-events': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23299,21 +23494,75 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['organization-invitation'][] + readonly 'application/json': readonly components['schemas']['event'][] + } + } + } + } + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + readonly 'teams/external-idp-group-info-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The unique identifier of the group. */ + readonly group_id: components['parameters']['group-id'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['external-group'] + } + } + } + } + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + readonly 'teams/list-external-idp-groups-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page token */ + readonly page?: number + /** Limits the list to groups containing the text in the group name */ + readonly display_name?: string + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: { + readonly Link?: string + } + readonly content: { + readonly 'application/json': components['schemas']['external-groups'] } } - readonly 404: components['responses']['not_found'] } } readonly 'orgs/list-webhooks': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23334,6 +23583,7 @@ export interface operations { readonly 'orgs/create-webhook': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -23355,7 +23605,7 @@ export interface operations { readonly 'application/json': { /** @description Must be passed as "web". */ readonly name: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-hook-config-params). */ readonly config: { readonly url: components['schemas']['webhook-config-url'] readonly content_type?: components['schemas']['webhook-config-content-type'] @@ -23367,7 +23617,7 @@ export interface operations { readonly password?: string } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23386,7 +23636,9 @@ export interface operations { readonly 'orgs/get-webhook': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23403,7 +23655,9 @@ export interface operations { readonly 'orgs/delete-webhook': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23417,7 +23671,9 @@ export interface operations { readonly 'orgs/update-webhook': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23434,7 +23690,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-hook-config-params). */ readonly config?: { readonly url: components['schemas']['webhook-config-url'] readonly content_type?: components['schemas']['webhook-config-content-type'] @@ -23442,7 +23698,7 @@ export interface operations { readonly insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23467,7 +23723,9 @@ export interface operations { readonly 'orgs/get-webhook-config-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23488,7 +23746,9 @@ export interface operations { readonly 'orgs/update-webhook-config-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23515,11 +23775,13 @@ export interface operations { readonly 'orgs/list-webhook-deliveries': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ readonly cursor?: components['parameters']['cursor'] @@ -23540,7 +23802,9 @@ export interface operations { readonly 'orgs/get-webhook-delivery': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] readonly delivery_id: components['parameters']['delivery-id'] } @@ -23560,7 +23824,9 @@ export interface operations { readonly 'orgs/redeliver-webhook-delivery': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] readonly delivery_id: components['parameters']['delivery-id'] } @@ -23571,11 +23837,13 @@ export interface operations { readonly 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ readonly 'orgs/ping-webhook': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the hook. */ readonly hook_id: components['parameters']['hook-id'] } } @@ -23588,11 +23856,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly 'apps/get-org-installation': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -23609,10 +23878,11 @@ export interface operations { readonly 'orgs/list-app-installations': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23631,203 +23901,34 @@ export interface operations { } } } - /** 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. */ - readonly 'interactions/get-restrictions-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] | { readonly [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - readonly 'interactions/set-restrictions-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly '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. */ - readonly 'interactions/remove-restrictions-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 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`. */ - readonly 'orgs/list-pending-invitations': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['organization-invitation'][] - } - } - readonly 404: components['responses']['not_found'] - } - } - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly 'orgs/create-invitation': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['organization-invitation'] - } - } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - readonly invitee_id?: number - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - readonly email?: string - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - readonly role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - readonly team_ids?: readonly number[] - } - } - } - } - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - readonly 'orgs/cancel-invitation': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** invitation_id parameter */ - readonly invitation_id: components['parameters']['invitation-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - readonly 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. */ - readonly 'orgs/list-invitation-teams': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** invitation_id parameter */ - readonly invitation_id: components['parameters']['invitation-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['team'][] - } - } - readonly 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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly 'issues/list-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ readonly filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ readonly state?: 'open' | 'closed' | 'all' /** A list of comma separated label names. Example: `bug,ui,@high` */ readonly labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + /** What to sort results by. */ readonly sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly 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`. */ readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23848,23 +23949,15 @@ export interface operations { readonly 'orgs/list-members': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly 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 members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ readonly 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. - */ + /** Filter members returned by their role. */ readonly role?: 'all' | 'admin' | 'member' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -23878,8 +23971,6 @@ export interface operations { readonly 'application/json': readonly components['schemas']['simple-user'][] } } - /** Response if requester is not an organization member */ - readonly 302: never readonly 422: components['responses']['validation_failed'] } } @@ -23887,7 +23978,9 @@ export interface operations { readonly 'orgs/check-membership-for-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -23904,7 +23997,9 @@ export interface operations { readonly 'orgs/remove-member': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -23918,7 +24013,9 @@ export interface operations { readonly 'orgs/get-membership-for-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -23936,7 +24033,7 @@ export interface operations { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -23947,7 +24044,9 @@ export interface operations { readonly 'orgs/set-membership-for-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -23984,7 +24083,9 @@ export interface operations { readonly 'orgs/remove-membership-for-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -23999,10 +24100,11 @@ export interface operations { readonly 'migrations/list-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24024,6 +24126,7 @@ export interface operations { readonly 'migrations/start-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -24048,6 +24151,16 @@ export interface operations { * @example true */ readonly lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + readonly exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + readonly exclude_git_data?: boolean /** * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). * @default false @@ -24066,6 +24179,13 @@ export interface operations { * @example true */ readonly exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + readonly org_metadata_only?: boolean + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ readonly exclude?: readonly 'repositories'[] } } @@ -24084,8 +24204,9 @@ export interface operations { readonly 'migrations/get-status-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** migration_id parameter */ + /** The unique identifier of the migration. */ readonly migration_id: components['parameters']['migration-id'] } readonly query: { @@ -24108,96 +24229,20 @@ export interface operations { readonly 404: components['responses']['not_found'] } } - /** Fetches the URL to a migration archive. */ - readonly 'migrations/download-archive-for-org': { + /** List all users who are outside collaborators of an organization. */ + readonly 'orgs/list-outside-collaborators': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - } - } - readonly responses: { - /** Response */ - readonly 302: never - readonly 404: components['responses']['not_found'] - } - } - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - readonly 'migrations/delete-archive-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 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. */ - readonly 'migrations/unlock-repo-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - readonly repo_name: components['parameters']['repo-name'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - } - } - /** List all the repositories for this organization migration. */ - readonly 'migrations/list-repos-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['minimal-repository'][] - } - } - readonly 404: components['responses']['not_found'] - } - } - /** List all users who are outside collaborators of an organization. */ - readonly 'orgs/list-outside-collaborators': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - readonly 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. - */ - readonly filter?: '2fa_disabled' | 'all' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + } + readonly query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + readonly filter?: '2fa_disabled' | 'all' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { @@ -24210,11 +24255,13 @@ export interface operations { } } } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ readonly 'orgs/convert-member-to-outside-collaborator': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -24227,16 +24274,29 @@ export interface operations { } /** User was converted */ readonly 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ readonly 403: unknown readonly 404: components['responses']['not_found'] } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + readonly async?: boolean + } + } + } } /** Removing a user from this list will remove them from all the organization's repositories. */ readonly 'orgs/remove-outside-collaborator': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -24254,249 +24314,110 @@ export interface operations { } } } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/list-packages-for-organization': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + readonly 'enterprise-admin/list-pre-receive-hooks-for-org': { readonly parameters: { - readonly query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - readonly visibility?: components['parameters']['package-visibility'] - } readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The sort order for the response collection. */ + readonly sort?: 'created' | 'updated' | 'name' + } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['package'][] + readonly 'application/json': readonly components['schemas']['org-pre-receive-hook'][] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] } } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/get-package-for-organization': { + readonly 'enterprise-admin/get-pre-receive-hook-for-org': { readonly parameters: { readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['package'] + readonly 'application/json': components['schemas']['org-pre-receive-hook'] } } } } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly 'packages/delete-package-for-org': { + /** Removes any overrides for this hook at the org level for this org. */ + readonly 'enterprise-admin/remove-pre-receive-hook-enforcement-for-org': { readonly parameters: { readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly 'packages/restore-package-for-org': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly org: components['parameters']['org'] - } - readonly query: { - /** package token */ - readonly token?: string - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. - */ - readonly 'packages/get-all-package-versions-for-package-owned-by-org': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly org: components['parameters']['org'] - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - readonly state?: 'active' | 'deleted' + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['package-version'][] + readonly 'application/json': components['schemas']['org-pre-receive-hook'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. - */ - readonly 'packages/get-package-version-for-organization': { + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + readonly 'enterprise-admin/update-pre-receive-hook-enforcement-for-org': { readonly parameters: { readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['package-version'] + readonly 'application/json': components['schemas']['org-pre-receive-hook'] } } } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly 'packages/delete-package-version-for-org': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly org: components['parameters']['org'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The state of enforcement for the hook on this repository. */ + readonly enforcement?: string + /** @description Whether repositories can override enforcement. */ + readonly allow_downstream_configuration?: boolean + } } } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly 'packages/restore-package-version-for-org': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly org: components['parameters']['org'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. */ readonly 'projects/list-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ readonly state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24513,10 +24434,11 @@ export interface operations { readonly 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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ readonly 'projects/create-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -24548,10 +24470,11 @@ export interface operations { readonly 'orgs/list-public-members': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24570,7 +24493,9 @@ export interface operations { readonly 'orgs/check-public-membership-for-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -24584,12 +24509,14 @@ export interface operations { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly 'orgs/set-public-membership-for-authenticated-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -24602,7 +24529,9 @@ export interface operations { readonly 'orgs/remove-public-membership-for-authenticated-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -24615,16 +24544,17 @@ export interface operations { readonly 'repos/list-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ readonly type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ readonly sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24645,7 +24575,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -24653,6 +24583,7 @@ export interface operations { readonly 'repos/create-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -24744,6 +24675,46 @@ export interface operations { * @default false */ readonly delete_branch_on_merge?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' } } } @@ -24751,12 +24722,14 @@ export interface operations { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ readonly 'secret-scanning/list-alerts-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { @@ -24764,15 +24737,19 @@ export interface operations { readonly state?: components['parameters']['secret-scanning-alert-state'] /** * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ readonly secret_type?: components['parameters']['secret-scanning-alert-secret-type'] /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ readonly resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + readonly sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] } } @@ -24789,39 +24766,22 @@ export interface operations { } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. + * Gets the GitHub Advanced Security active committers for an organization per repository. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly 'billing/get-github-actions-billing-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ readonly 'billing/get-github-advanced-security-billing-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24837,87 +24797,15 @@ export interface operations { readonly 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly 'billing/get-github-packages-billing-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - readonly 'billing/get-shared-storage-billing-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - readonly 'teams/list-idp-groups-for-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page token */ - readonly page?: string - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: { - readonly Link?: string - } - readonly content: { - readonly 'application/json': components['schemas']['group-mapping'] - } - } - } - } /** Lists all teams in an organization that are visible to the authenticated user. */ readonly 'teams/list': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -24942,6 +24830,7 @@ export interface operations { readonly 'teams/create': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -24979,29 +24868,30 @@ export interface operations { */ readonly privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ readonly permission?: 'pull' | 'push' /** @description The ID of a team to set as the parent team. */ readonly parent_team_id?: number + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." */ + readonly ldap_dn?: string } } } } /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ readonly 'teams/get-by-name': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } @@ -25025,8 +24915,9 @@ export interface operations { readonly 'teams/delete-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } @@ -25043,18 +24934,28 @@ export interface operations { readonly 'teams/update-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } readonly responses: { + /** Response when the updated information already exists */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['team-full'] + } + } /** Response */ readonly 201: { readonly content: { readonly 'application/json': components['schemas']['team-full'] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { @@ -25074,10 +24975,7 @@ export interface operations { */ readonly privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ @@ -25089,21 +24987,22 @@ export interface operations { } } /** - * 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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 'teams/list-discussions-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } readonly query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25122,17 +25021,18 @@ export interface operations { } } /** - * 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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ readonly 'teams/create-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } @@ -25161,16 +25061,18 @@ export interface operations { } } /** - * 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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 'teams/get-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } } @@ -25184,16 +25086,18 @@ export interface operations { } } /** - * 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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 'teams/delete-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } } @@ -25203,16 +25107,18 @@ export interface operations { } } /** - * 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/). + * 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/enterprise-server@3.6/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}`. */ readonly 'teams/update-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } } @@ -25236,22 +25142,24 @@ export interface operations { } } /** - * 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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 'teams/list-discussion-comments-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } readonly query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25268,18 +25176,20 @@ export interface operations { } } /** - * 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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ readonly 'teams/create-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } } @@ -25301,17 +25211,20 @@ export interface operations { } } /** - * 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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 'teams/get-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] } } @@ -25325,17 +25238,20 @@ export interface operations { } } /** - * 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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 'teams/delete-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] } } @@ -25345,17 +25261,20 @@ export interface operations { } } /** - * 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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ readonly 'teams/update-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] } } @@ -25377,23 +25296,26 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 'reactions/list-for-team-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] } readonly 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25410,22 +25332,25 @@ export interface operations { } } /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ readonly 'reactions/create-for-team-discussion-comment-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] } } readonly responses: { - /** Response */ + /** Response when the reaction type has already been added to this team discussion comment */ readonly 200: { readonly content: { readonly 'application/json': components['schemas']['reaction'] @@ -25442,7 +25367,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. * @enum {string} */ readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25453,16 +25378,20 @@ export interface operations { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'reactions/delete-for-team-discussion-comment': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ readonly comment_number: components['parameters']['comment-number'] + /** The unique identifier of the reaction. */ readonly reaction_id: components['parameters']['reaction-id'] } } @@ -25472,22 +25401,24 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. */ readonly 'reactions/list-for-team-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } readonly 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25504,16 +25435,18 @@ export interface operations { } } /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ readonly 'reactions/create-for-team-discussion-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] } } @@ -25535,7 +25468,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. * @enum {string} */ readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25546,15 +25479,18 @@ export interface operations { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'reactions/delete-for-team-discussion': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ readonly discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the reaction. */ readonly reaction_id: components['parameters']['reaction-id'] } } @@ -25563,16 +25499,40 @@ export interface operations { readonly 204: never } } + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + readonly 'teams/list-linked-external-idp-groups-to-team-for-org': { + readonly parameters: { + readonly path: { + /** The organization name. The name is not case sensitive. */ + readonly org: components['parameters']['org'] + /** The slug of the team name. */ + readonly team_slug: components['parameters']['team-slug'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['external-groups'] + } + } + } + } /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ readonly 'teams/unlink-external-idp-group-from-team-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } @@ -25584,13 +25544,14 @@ export interface operations { /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ readonly 'teams/link-external-idp-group-to-team-for-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } } @@ -25614,35 +25575,6 @@ export interface operations { } } } - /** - * 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`. - */ - readonly 'teams/list-pending-invitations-in-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** team_slug parameter */ - readonly team_slug: components['parameters']['team-slug'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['organization-invitation'][] - } - } - } - } /** * Team members will include the members of child teams. * @@ -25651,19 +25583,15 @@ export interface operations { readonly 'teams/list-members-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } readonly 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. - */ + /** Filters members returned by their role in the team. */ readonly role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25689,14 +25617,16 @@ export interface operations { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ readonly 'teams/get-membership-for-user-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -25716,7 +25646,7 @@ export interface operations { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -25727,9 +25657,11 @@ export interface operations { readonly 'teams/add-or-update-membership-for-user-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -25749,9 +25681,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @description The role that this user should have in the team. * @default member * @enum {string} */ @@ -25765,16 +25695,18 @@ export interface operations { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ readonly 'teams/remove-membership-for-user-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -25793,12 +25725,13 @@ export interface operations { readonly 'teams/list-projects-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25822,9 +25755,11 @@ export interface operations { readonly 'teams/check-permissions-for-project-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -25847,9 +25782,11 @@ export interface operations { readonly 'teams/add-or-update-project-permissions-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -25870,11 +25807,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." * @enum {string} */ readonly permission?: 'read' | 'write' | 'admin' @@ -25890,9 +25823,11 @@ export interface operations { readonly 'teams/remove-project-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -25909,12 +25844,13 @@ export interface operations { readonly 'teams/list-repos-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -25933,7 +25869,7 @@ export interface operations { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -25942,10 +25878,13 @@ export interface operations { readonly 'teams/check-permissions-for-repo-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -25963,7 +25902,7 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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}`. * @@ -25972,10 +25911,13 @@ export interface operations { readonly 'teams/add-or-update-repo-permissions-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -25987,19 +25929,10 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @description The permission to grant the team on 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. * @default push - * @enum {string} */ - readonly permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + readonly permission?: string } } } @@ -26012,10 +25945,13 @@ export interface operations { readonly 'teams/remove-repo-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -26024,69 +25960,6 @@ export interface operations { readonly 204: never } } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - readonly 'teams/list-idp-groups-in-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** team_slug parameter */ - readonly team_slug: components['parameters']['team-slug'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - readonly 'teams/create-or-update-idp-group-connections-in-org': { - readonly parameters: { - readonly path: { - readonly org: components['parameters']['org'] - /** team_slug parameter */ - readonly team_slug: components['parameters']['team-slug'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['group-mapping'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - readonly groups?: readonly { - /** @description ID of the IdP group. */ - readonly group_id: string - /** @description Name of the IdP group. */ - readonly group_name: string - /** @description Description of the IdP group. */ - readonly group_description: string - }[] - } - } - } - } /** * Lists the child teams of the team specified by `{team_slug}`. * @@ -26095,12 +25968,13 @@ export interface operations { readonly 'teams/list-child-in-org': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ readonly team_slug: components['parameters']['team-slug'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -26119,7 +25993,7 @@ export interface operations { readonly 'projects/get-card': { readonly parameters: { readonly path: { - /** card_id parameter */ + /** The unique identifier of the card. */ readonly card_id: components['parameters']['card-id'] } } @@ -26139,7 +26013,7 @@ export interface operations { readonly 'projects/delete-card': { readonly parameters: { readonly path: { - /** card_id parameter */ + /** The unique identifier of the card. */ readonly card_id: components['parameters']['card-id'] } } @@ -26164,7 +26038,7 @@ export interface operations { readonly 'projects/update-card': { readonly parameters: { readonly path: { - /** card_id parameter */ + /** The unique identifier of the card. */ readonly card_id: components['parameters']['card-id'] } } @@ -26201,7 +26075,7 @@ export interface operations { readonly 'projects/move-card': { readonly parameters: { readonly path: { - /** card_id parameter */ + /** The unique identifier of the card. */ readonly card_id: components['parameters']['card-id'] } } @@ -26265,7 +26139,7 @@ export interface operations { readonly 'projects/get-column': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } } @@ -26285,7 +26159,7 @@ export interface operations { readonly 'projects/delete-column': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } } @@ -26300,7 +26174,7 @@ export interface operations { readonly 'projects/update-column': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } } @@ -26330,13 +26204,13 @@ export interface operations { readonly 'projects/list-cards': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } readonly query: { - /** Filters the project cards that are returned by the card's state. Can be one of `all`,`archived`, or `not_archived`. */ + /** Filters the project cards that are returned by the card's state. */ readonly archived_state?: 'all' | 'archived' | 'not_archived' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -26358,7 +26232,7 @@ export interface operations { readonly 'projects/create-card': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } } @@ -26421,7 +26295,7 @@ export interface operations { readonly 'projects/move-column': { readonly parameters: { readonly path: { - /** column_id parameter */ + /** The unique identifier of the column. */ readonly column_id: components['parameters']['column-id'] } } @@ -26453,6 +26327,7 @@ export interface operations { readonly 'projects/get': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -26472,6 +26347,7 @@ export interface operations { readonly 'projects/delete': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -26498,6 +26374,7 @@ export interface operations { readonly 'projects/update': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -26558,17 +26435,13 @@ export interface operations { readonly 'projects/list-collaborators': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } readonly 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. - */ + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ readonly affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -26593,7 +26466,9 @@ export interface operations { readonly 'projects/add-collaborator': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -26624,7 +26499,9 @@ export interface operations { readonly 'projects/remove-collaborator': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -26642,7 +26519,9 @@ export interface operations { readonly 'projects/get-permission-for-user': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -26663,10 +26542,11 @@ export interface operations { readonly 'projects/list-columns': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -26688,6 +26568,7 @@ export interface operations { readonly 'projects/create-column': { readonly parameters: { readonly path: { + /** The unique identifier of the project. */ readonly project_id: components['parameters']['project-id'] } } @@ -26734,31 +26615,13 @@ export interface operations { readonly 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). - */ - readonly 'reactions/delete-legacy': { - readonly parameters: { - readonly path: { - readonly reaction_id: components['parameters']['reaction-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 410: components['responses']['gone'] - } - } /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ readonly 'repos/get': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -26783,7 +26646,9 @@ export interface operations { readonly 'repos/delete': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -26803,11 +26668,13 @@ export interface operations { readonly 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ readonly 'repos/update': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -26834,7 +26701,7 @@ export interface operations { readonly homepage?: string /** * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. * @default false */ readonly private?: boolean @@ -26843,7 +26710,16 @@ export interface operations { * @enum {string} */ readonly visibility?: 'public' | 'private' | 'internal' - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ readonly security_and_analysis?: { /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ readonly advanced_security?: { @@ -26855,6 +26731,11 @@ export interface operations { /** @description Can be `enabled` or `disabled`. */ readonly status?: string } + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + readonly secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + readonly status?: string + } } | null /** * @description Either `true` to enable issues for this repository or `false` to disable them. @@ -26903,6 +26784,51 @@ export interface operations { * @default false */ readonly delete_branch_on_merge?: boolean + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + readonly allow_update_branch?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + readonly use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. * @default false @@ -26913,6 +26839,11 @@ export interface operations { * @default false */ readonly allow_forking?: boolean + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + readonly web_commit_signoff_required?: boolean } } } @@ -26921,11 +26852,13 @@ export interface operations { readonly 'actions/list-artifacts-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -26948,9 +26881,11 @@ export interface operations { readonly 'actions/get-artifact': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ readonly artifact_id: components['parameters']['artifact-id'] } } @@ -26967,9 +26902,11 @@ export interface operations { readonly 'actions/delete-artifact': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ readonly artifact_id: components['parameters']['artifact-id'] } } @@ -26987,9 +26924,11 @@ export interface operations { readonly 'actions/download-artifact': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ readonly artifact_id: components['parameters']['artifact-id'] readonly archive_format: string } @@ -26997,15 +26936,88 @@ export interface operations { readonly responses: { /** Response */ readonly 302: never + readonly 410: components['responses']['gone'] + } + } + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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. + */ + readonly 'actions/get-actions-cache-usage': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-by-repository'] + } + } + } + } + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + readonly 'actions/get-actions-cache-usage-policy': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } + } + } + } + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + readonly 'actions/set-actions-cache-usage-policy': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } } } /** 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. */ readonly 'actions/get-job-for-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ readonly job_id: components['parameters']['job-id'] } } @@ -27027,9 +27039,11 @@ export interface operations { readonly 'actions/download-job-logs-for-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ readonly job_id: components['parameters']['job-id'] } } @@ -27038,16 +27052,50 @@ export interface operations { readonly 302: never } } + /** Re-run a job and its dependent jobs in 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. */ + readonly 'actions/re-run-job-for-workflow-run': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the job. */ + readonly job_id: components['parameters']['job-id'] + } + } + readonly responses: { + /** Response */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['empty-object'] + } + } + readonly 403: components['responses']['forbidden'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + readonly enable_debug_logging?: boolean + } | null + } + } + } /** * 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. + * 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. */ readonly 'actions/get-github-actions-permissions-repository': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27070,7 +27118,9 @@ export interface operations { readonly 'actions/set-github-actions-permissions-repository': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27087,6 +27137,57 @@ export interface operations { } } } + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + readonly 'actions/get-workflow-access-to-repository': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } + } + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + readonly 'actions/set-workflow-access-to-repository': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } /** * 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)." * @@ -27095,7 +27196,9 @@ export interface operations { readonly 'actions/get-allowed-actions-repository': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27120,7 +27223,9 @@ export interface operations { readonly 'actions/set-allowed-actions-repository': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27134,15 +27239,70 @@ export interface operations { } } } + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + readonly 'actions/get-github-actions-default-workflow-permissions-repository': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + readonly 'actions/set-github-actions-default-workflow-permissions-repository': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Success response */ + readonly 204: never + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + readonly 409: unknown + } + readonly requestBody: { + readonly content: { + readonly 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } + } + } /** Lists all self-hosted runners configured in a repository. You must authenticate using an access token with the `repo` scope to use this endpoint. */ readonly 'actions/list-self-hosted-runners-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -27169,7 +27329,9 @@ export interface operations { readonly 'actions/list-runner-applications-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27197,7 +27359,9 @@ export interface operations { readonly 'actions/create-registration-token-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27225,7 +27389,9 @@ export interface operations { readonly 'actions/create-remove-token-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27247,7 +27413,9 @@ export interface operations { readonly 'actions/get-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27271,7 +27439,9 @@ export interface operations { readonly 'actions/delete-self-hosted-runner-from-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27291,7 +27461,9 @@ export interface operations { readonly 'actions/list-labels-for-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27312,7 +27484,9 @@ export interface operations { readonly 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27341,7 +27515,9 @@ export interface operations { readonly 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27371,7 +27547,9 @@ export interface operations { readonly 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27395,7 +27573,9 @@ export interface operations { readonly 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ readonly runner_id: components['parameters']['runner-id'] @@ -27410,14 +27590,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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. */ readonly 'actions/list-workflow-runs-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { @@ -27427,13 +27609,13 @@ export interface operations { readonly branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ readonly 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)." */ + /** 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`. */ readonly status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ readonly created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ readonly exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -27458,9 +27640,11 @@ export interface operations { readonly 'actions/get-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } readonly query: { @@ -27485,9 +27669,11 @@ export interface operations { readonly 'actions/delete-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27500,9 +27686,11 @@ export interface operations { readonly 'actions/get-reviews-for-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27515,42 +27703,19 @@ export interface operations { } } } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - readonly 'actions/approve-workflow-run': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ - readonly run_id: components['parameters']['run-id'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['empty-object'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ readonly 'actions/list-workflow-run-artifacts': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -27578,9 +27743,11 @@ export interface operations { readonly 'actions/get-workflow-run-attempt': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ readonly attempt_number: components['parameters']['attempt-number'] @@ -27599,19 +27766,21 @@ export interface operations { } } } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ readonly 'actions/list-jobs-for-workflow-run-attempt': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ readonly attempt_number: components['parameters']['attempt-number'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -27640,9 +27809,11 @@ export interface operations { readonly 'actions/download-workflow-run-attempt-logs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ readonly attempt_number: components['parameters']['attempt-number'] @@ -27657,9 +27828,11 @@ export interface operations { readonly 'actions/cancel-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27667,28 +27840,27 @@ export interface operations { /** Response */ readonly 202: { readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } + readonly 'application/json': components['schemas']['empty-object'] } } + readonly 409: components['responses']['conflict'] } } - /** 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ readonly 'actions/list-jobs-for-workflow-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } readonly 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. - */ + /** Filters jobs by their `completed_at` timestamp. `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. */ readonly filter?: 'latest' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -27716,9 +27888,11 @@ export interface operations { readonly 'actions/download-workflow-run-logs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27731,9 +27905,11 @@ export interface operations { readonly 'actions/delete-workflow-run-logs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27752,9 +27928,11 @@ export interface operations { readonly 'actions/get-pending-deployments-for-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27770,14 +27948,16 @@ export interface operations { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ readonly 'actions/review-pending-deployments-for-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27801,7 +27981,7 @@ export interface operations { */ readonly environment_ids: readonly number[] /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` + * @description Whether to approve or reject deployment to the specified environments. * @example approved * @enum {string} */ @@ -27819,9 +27999,11 @@ export interface operations { readonly 'actions/re-run-workflow': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } @@ -27829,43 +28011,65 @@ export interface operations { /** Response */ readonly 201: { readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } + readonly 'application/json': components['schemas']['empty-object'] } } } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + readonly enable_debug_logging?: boolean + } | null + } + } } - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - readonly 'actions/get-workflow-run-usage': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + readonly 'actions/re-run-workflow-failed-jobs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ readonly run_id: components['parameters']['run-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['workflow-run-usage'] + readonly 'application/json': components['schemas']['empty-object'] } } } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + readonly enable_debug_logging?: boolean + } | null + } + } } /** 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. */ readonly 'actions/list-repo-secrets': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -27888,7 +28092,9 @@ export interface operations { readonly 'actions/get-repo-public-key': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -27905,9 +28111,11 @@ export interface operations { readonly 'actions/get-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -28000,9 +28208,11 @@ export interface operations { readonly 'actions/create-or-update-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -28010,7 +28220,7 @@ export interface operations { /** Response when creating a secret */ readonly 201: { readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } + readonly 'application/json': components['schemas']['empty-object'] } } /** Response when updating a secret */ @@ -28019,7 +28229,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) endpoint. */ readonly encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ readonly key_id?: string @@ -28031,9 +28241,11 @@ export interface operations { readonly 'actions/delete-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ readonly secret_name: components['parameters']['secret-name'] } } @@ -28046,11 +28258,13 @@ export interface operations { readonly 'actions/list-repo-workflows': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -28073,7 +28287,9 @@ export interface operations { readonly 'actions/get-workflow': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The ID of the workflow. You can also pass the workflow file name as a string. */ readonly workflow_id: components['parameters']['workflow-id'] @@ -28096,7 +28312,9 @@ export interface operations { readonly 'actions/disable-workflow': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The ID of the workflow. You can also pass the workflow file name as a string. */ readonly workflow_id: components['parameters']['workflow-id'] @@ -28117,7 +28335,9 @@ export interface operations { readonly 'actions/create-workflow-dispatch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The ID of the workflow. You can also pass the workflow file name as a string. */ readonly workflow_id: components['parameters']['workflow-id'] @@ -28146,7 +28366,9 @@ export interface operations { readonly 'actions/enable-workflow': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The ID of the workflow. You can also pass the workflow file name as a string. */ readonly workflow_id: components['parameters']['workflow-id'] @@ -28158,14 +28380,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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. */ readonly 'actions/list-workflow-runs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The ID of the workflow. You can also pass the workflow file name as a string. */ readonly workflow_id: components['parameters']['workflow-id'] @@ -28177,13 +28401,13 @@ export interface operations { readonly branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ readonly 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)." */ + /** 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`. */ readonly status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ readonly created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ readonly exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -28204,38 +28428,17 @@ export interface operations { } } } - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - readonly 'actions/get-workflow-usage': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - readonly workflow_id: components['parameters']['workflow-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['workflow-usage'] - } - } - } - } /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ readonly 'issues/list-assignees': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -28262,7 +28465,9 @@ export interface operations { readonly 'issues/check-user-can-be-assigned': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] readonly assignee: string } @@ -28286,7 +28491,9 @@ export interface operations { readonly 'repos/list-autolinks': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { @@ -28307,7 +28514,9 @@ export interface operations { readonly 'repos/create-autolink': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -28328,8 +28537,13 @@ export interface operations { readonly 'application/json': { /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ readonly key_prefix: string - /** @description The URL must contain for the reference number. */ + /** @description The URL must contain `` for the reference number. */ readonly url_template: string + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + readonly is_alphanumeric?: boolean } } } @@ -28342,9 +28556,11 @@ export interface operations { readonly 'repos/get-autolink': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ readonly autolink_id: components['parameters']['autolink-id'] } } @@ -28366,9 +28582,11 @@ export interface operations { readonly 'repos/delete-autolink': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ readonly autolink_id: components['parameters']['autolink-id'] } } @@ -28378,42 +28596,18 @@ export interface operations { readonly 404: components['responses']['not_found'] } } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - readonly 'repos/enable-automated-security-fixes': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - } - } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - readonly 'repos/disable-automated-security-fixes': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - } - } readonly 'repos/list-branches': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { /** Setting to `true` returns only protected branches. When set to `false`, only unprotected branches are returned. Omitting this parameter returns all branches. */ readonly protected?: boolean - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -28433,7 +28627,9 @@ export interface operations { readonly 'repos/get-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28448,14 +28644,15 @@ export interface operations { } readonly 301: components['responses']['moved_permanently'] readonly 404: components['responses']['not_found'] - readonly 415: components['responses']['preview_header_missing'] } } /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ readonly 'repos/get-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28483,7 +28680,9 @@ export interface operations { readonly 'repos/update-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28524,12 +28723,14 @@ export interface operations { readonly enforce_admins: boolean | null /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ readonly required_pull_request_reviews: { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps 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?: { /** @description The list of user `login`s with dismissal access */ readonly users?: readonly string[] /** @description The list of team `slug`s with dismissal access */ readonly teams?: readonly string[] + /** @description The list of app `slug`s with dismissal access */ + readonly apps?: readonly string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ readonly dismiss_stale_reviews?: boolean @@ -28537,13 +28738,15 @@ export interface operations { readonly require_code_owner_reviews?: boolean /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ readonly required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ readonly bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ readonly users?: readonly string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ readonly teams?: readonly string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + readonly apps?: readonly string[] + } } | null /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ readonly restrictions: { @@ -28560,6 +28763,8 @@ export interface operations { readonly allow_force_pushes?: boolean | null /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ readonly allow_deletions?: boolean + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + readonly block_creations?: boolean /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ readonly required_conversation_resolution?: boolean } @@ -28570,7 +28775,9 @@ export interface operations { readonly 'repos/delete-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28586,7 +28793,9 @@ export interface operations { readonly 'repos/get-admin-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28609,7 +28818,9 @@ export interface operations { readonly 'repos/set-admin-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28632,7 +28843,9 @@ export interface operations { readonly 'repos/delete-admin-branch-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28648,7 +28861,9 @@ export interface operations { readonly 'repos/get-pull-request-review-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28667,7 +28882,9 @@ export interface operations { readonly 'repos/delete-pull-request-review-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28689,7 +28906,9 @@ export interface operations { readonly 'repos/update-pull-request-review-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28707,12 +28926,14 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps 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?: { /** @description The list of user `login`s with dismissal access */ readonly users?: readonly string[] /** @description The list of team `slug`s with dismissal access */ readonly teams?: readonly string[] + /** @description The list of app `slug`s with dismissal access */ + readonly apps?: readonly string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ readonly dismiss_stale_reviews?: boolean @@ -28720,13 +28941,15 @@ export interface operations { readonly require_code_owner_reviews?: boolean /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ readonly required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ readonly bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ readonly users?: readonly string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ readonly teams?: readonly string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + readonly apps?: readonly string[] + } } } } @@ -28741,7 +28964,9 @@ export interface operations { readonly 'repos/get-commit-signature-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28765,7 +28990,9 @@ export interface operations { readonly 'repos/create-commit-signature-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28789,7 +29016,9 @@ export interface operations { readonly 'repos/delete-commit-signature-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28805,7 +29034,9 @@ export interface operations { readonly 'repos/get-status-checks-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28825,7 +29056,9 @@ export interface operations { readonly 'repos/remove-status-check-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28844,7 +29077,9 @@ export interface operations { readonly 'repos/update-status-check-protection': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28885,7 +29120,9 @@ export interface operations { readonly 'repos/get-all-status-check-contexts': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28905,7 +29142,9 @@ export interface operations { readonly 'repos/set-status-check-contexts': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28925,7 +29164,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ readonly contexts: readonly string[] } | readonly string[] @@ -28936,7 +29175,9 @@ export interface operations { readonly 'repos/add-status-check-contexts': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28957,7 +29198,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ readonly contexts: readonly string[] } | readonly string[] @@ -28968,7 +29209,9 @@ export interface operations { readonly 'repos/remove-status-check-contexts': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -28988,7 +29231,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ readonly contexts: readonly string[] } | readonly string[] @@ -29005,7 +29248,9 @@ export interface operations { readonly 'repos/get-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29029,7 +29274,9 @@ export interface operations { readonly 'repos/delete-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29048,7 +29295,9 @@ export interface operations { readonly 'repos/get-apps-with-access-to-protected-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29076,7 +29325,9 @@ export interface operations { readonly 'repos/set-app-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29114,7 +29365,9 @@ export interface operations { readonly 'repos/add-app-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29152,7 +29405,9 @@ export interface operations { readonly 'repos/remove-app-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29186,7 +29441,9 @@ export interface operations { readonly 'repos/get-teams-with-access-to-protected-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29214,7 +29471,9 @@ export interface operations { readonly 'repos/set-team-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29233,7 +29492,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ readonly teams: readonly string[] } | readonly string[] @@ -29252,7 +29511,9 @@ export interface operations { readonly 'repos/add-team-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29271,7 +29532,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ readonly teams: readonly string[] } | readonly string[] @@ -29290,7 +29551,9 @@ export interface operations { readonly 'repos/remove-team-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29309,7 +29572,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ readonly teams: readonly string[] } | readonly string[] @@ -29324,7 +29587,9 @@ export interface operations { readonly 'repos/get-users-with-access-to-protected-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29352,7 +29617,9 @@ export interface operations { readonly 'repos/set-user-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29371,7 +29638,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ readonly users: readonly string[] } | readonly string[] @@ -29390,7 +29657,9 @@ export interface operations { readonly 'repos/add-user-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29409,7 +29678,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ readonly users: readonly string[] } | readonly string[] @@ -29428,7 +29697,9 @@ export interface operations { readonly 'repos/remove-user-access-restrictions': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29447,7 +29718,7 @@ export interface operations { readonly content: { readonly 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ readonly users: readonly string[] } | readonly string[] @@ -29457,7 +29728,7 @@ export interface operations { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -29474,7 +29745,9 @@ export interface operations { readonly 'repos/rename-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] /** The name of the branch. */ readonly branch: components['parameters']['branch'] @@ -29510,7 +29783,9 @@ export interface operations { readonly 'checks/create': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -29545,7 +29820,7 @@ export interface operations { /** @description A reference for the run on the integrator's system. */ readonly external_id?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @default queued * @enum {string} */ @@ -29556,7 +29831,7 @@ export interface operations { */ readonly started_at?: string /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29566,15 +29841,15 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly completed_at?: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) description. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object) description. */ readonly output?: { /** @description The title of the check run. */ readonly title: string - /** @description The summary of the check run. This parameter supports Markdown. */ + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ readonly summary: string - /** @description The details of the check run. This parameter supports Markdown. */ + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ readonly text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ readonly annotations?: readonly { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ readonly path: string @@ -29587,7 +29862,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ readonly end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ readonly annotation_level: 'notice' | 'warning' | 'failure' @@ -29598,7 +29873,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ readonly raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) description for details. */ readonly images?: readonly { /** @description The alternative text for the image. */ readonly alt: string @@ -29608,7 +29883,7 @@ export interface operations { readonly caption?: string }[] } - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ readonly actions?: readonly { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ readonly label: string @@ -29629,9 +29904,11 @@ export interface operations { readonly 'checks/get': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ readonly check_run_id: components['parameters']['check-run-id'] } } @@ -29652,9 +29929,11 @@ export interface operations { readonly 'checks/update': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ readonly check_run_id: components['parameters']['check-run-id'] } } @@ -29692,12 +29971,12 @@ export interface operations { */ readonly started_at?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @enum {string} */ readonly status?: 'queued' | 'in_progress' | 'completed' /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29707,7 +29986,7 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ readonly completed_at?: string - /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) description. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object-1) description. */ readonly output?: { /** @description **Required**. */ readonly title?: string @@ -29715,7 +29994,7 @@ export interface operations { readonly summary: string /** @description Can contain Markdown. */ readonly text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ readonly annotations?: readonly { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ readonly path: string @@ -29728,7 +30007,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ readonly end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ readonly annotation_level: 'notice' | 'warning' | 'failure' @@ -29739,7 +30018,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ readonly raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ readonly images?: readonly { /** @description The alternative text for the image. */ readonly alt: string @@ -29749,7 +30028,7 @@ export interface operations { readonly caption?: string }[] } - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ readonly actions?: readonly { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ readonly label: string @@ -29766,13 +30045,15 @@ export interface operations { readonly 'checks/list-annotations': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ readonly check_run_id: components['parameters']['check-run-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -29789,1774 +30070,163 @@ export interface operations { } } /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - readonly 'checks/rerequest-run': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** check_run_id parameter */ - readonly check_run_id: components['parameters']['check-run-id'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } - } - } - /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ - readonly 403: { - readonly content: { - readonly 'application/json': components['schemas']['basic-error'] - } - } - readonly 404: components['responses']['not_found'] - /** Validation error if the check run is not rerequestable */ - readonly 422: { - readonly content: { - readonly 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - readonly 'checks/create-suite': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** when the suite already existed */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['check-suite'] - } - } - /** Response when the suite was created */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['check-suite'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The sha of the head commit. */ - readonly head_sha: string - } - } - } - } - /** 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. */ - readonly 'checks/set-suites-preferences': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['check-suite-preference'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - readonly auto_trigger_checks?: readonly { - /** @description The `id` of the GitHub App. */ - readonly app_id: number - /** - * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. - * @default true - */ - readonly setting: boolean - }[] - } - } - } - } - /** - * **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. - */ - readonly 'checks/get-suite': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** check_suite_id parameter */ - readonly check_suite_id: components['parameters']['check-suite-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly '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. - */ - readonly 'checks/list-for-suite': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** check_suite_id parameter */ - readonly check_suite_id: components['parameters']['check-suite-id'] - } - readonly query: { - /** Returns check runs with the specified `name`. */ - readonly check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - readonly 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`. */ - readonly filter?: 'latest' | 'all' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly check_runs: readonly components['schemas']['check-run'][] - } - } - } - } - } - /** - * 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. - */ - readonly 'checks/rerequest-suite': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** check_suite_id parameter */ - readonly check_suite_id: components['parameters']['check-suite-id'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': { readonly [key: string]: 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 with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - readonly 'code-scanning/list-alerts-for-repo': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly 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. */ - readonly 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. */ - readonly tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly 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`. */ - readonly ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ - readonly direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - readonly sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - readonly state?: components['schemas']['code-scanning-alert-state'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['code-scanning-alert-items'][] - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['code_scanning_forbidden_read'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - readonly 'code-scanning/get-alert': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['code-scanning-alert'] - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['code_scanning_forbidden_read'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - readonly 'code-scanning/update-alert': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['code-scanning-alert'] - } - } - readonly 403: components['responses']['code_scanning_forbidden_write'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - readonly state: components['schemas']['code-scanning-alert-set-state'] - readonly dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] - } - } - } - } - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - readonly 'code-scanning/list-alert-instances': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly 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`. */ - readonly ref?: components['parameters']['git-ref'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['code-scanning-alert-instance'][] - } - } - readonly 403: components['responses']['code_scanning_forbidden_read'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - readonly 'code-scanning/list-recent-analyses': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly 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. */ - readonly 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. */ - readonly tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly 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`. */ - readonly ref?: components['schemas']['code-scanning-ref'] - /** Filter analyses belonging to the same SARIF upload. */ - readonly sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['code-scanning-analysis'][] - } - } - readonly 403: components['responses']['code_scanning_forbidden_read'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * - * 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). - */ - readonly 'code-scanning/get-analysis': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - readonly analysis_id: number - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json+sarif': string - readonly 'application/json': components['schemas']['code-scanning-analysis'] - } - } - readonly 403: components['responses']['code_scanning_forbidden_read'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - readonly 'code-scanning/delete-analysis': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - readonly analysis_id: number - } - readonly query: { - /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - readonly confirm_delete?: string | null - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['code-scanning-analysis-deletion'] - } - } - readonly 400: components['responses']['bad_request'] - readonly 403: components['responses']['code_scanning_forbidden_write'] - readonly 404: components['responses']['not_found'] - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - readonly 'code-scanning/upload-sarif': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 202: { - readonly content: { - readonly 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - readonly 400: unknown - readonly 403: components['responses']['code_scanning_forbidden_write'] - readonly 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - readonly 413: unknown - readonly 503: components['responses']['service_unavailable'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - readonly commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - readonly ref: components['schemas']['code-scanning-ref'] - readonly sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - readonly checkout_uri?: string - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - readonly tool_name?: string - } - } - } - } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - readonly 'code-scanning/get-sarif': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - readonly sarif_id: string - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['code-scanning-sarifs-status'] - } - } - readonly 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - readonly 404: unknown - readonly 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly 'codespaces/list-in-repository-for-authenticated-user': { - readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly codespaces: readonly components['schemas']['codespace'][] - } - } - } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] - } - } - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly 'codespaces/create-with-repo-for-authenticated-user': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response when the codespace was successfully created */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - readonly 202: { - readonly content: { - readonly 'application/json': components['schemas']['codespace'] - } - } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Git ref (typically a branch name) for this codespace */ - readonly ref?: string - /** @description Location for this codespace */ - readonly location: string - /** @description Machine type to use for this codespace */ - readonly machine?: string - /** @description Working directory for this codespace */ - readonly working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - readonly idle_timeout_minutes?: number - } - } - } - } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly 'codespaces/repo-machines-for-authenticated-user': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Required. The location to check for available machines. */ - readonly location: string - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly machines: readonly components['schemas']['codespace-machine'][] - } - } - } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - readonly 'repos/list-collaborators': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly 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. - */ - readonly affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['collaborator'][] - } - } - readonly 404: components['responses']['not_found'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - readonly 'repos/check-collaborator': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response if user is a collaborator */ - readonly 204: never - /** Not Found if user is not a collaborator */ - readonly 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - readonly 'repos/add-collaborator': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response when a new invitation is created */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['repository-invitation'] - } - } - /** Response when person is already a collaborator */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - readonly permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - readonly permissions?: string - } - } - } - } - readonly 'repos/remove-collaborator': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - } - } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - readonly 'repos/get-collaborator-permission-level': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** if user has admin permissions */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['repository-collaborator-permission'] - } - } - readonly 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. - */ - readonly 'repos/list-commit-comments-for-repo': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['commit-comment'][] - } - } - } - } - readonly 'repos/get-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['commit-comment'] - } - } - readonly 404: components['responses']['not_found'] - } - } - readonly 'repos/delete-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - } - } - readonly 'repos/update-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['commit-comment'] - } - } - readonly 404: components['responses']['not_found'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The contents of the comment */ - readonly body: string - } - } - } - } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - readonly 'reactions/list-for-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] - } - } - readonly 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - readonly 'reactions/create-for-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Reaction exists */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - readonly 415: components['responses']['preview_header_missing'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - readonly 'reactions/delete-for-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - readonly reaction_id: components['parameters']['reaction-id'] - } - } - readonly responses: { - /** Response */ - readonly 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. | - */ - readonly 'repos/list-commits': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - readonly sha?: string - /** Only commits containing this file path will be returned. */ - readonly path?: string - /** GitHub login or email address by which to filter by commit author. */ - readonly 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`. */ - readonly 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`. */ - readonly until?: string - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['commit'][] - } - } - readonly 400: components['responses']['bad_request'] - readonly 404: components['responses']['not_found'] - readonly 409: components['responses']['conflict'] - readonly 500: components['responses']['internal_error'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - readonly 'repos/list-branches-for-head-commit': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** commit_sha parameter */ - readonly commit_sha: components['parameters']['commit-sha'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['branch-short'][] - } - } - readonly 422: components['responses']['validation_failed'] - } - } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - readonly 'repos/list-comments-for-commit': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** commit_sha parameter */ - readonly commit_sha: components['parameters']['commit-sha'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['commit-comment'][] - } - } - } - } - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly 'repos/create-commit-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** commit_sha parameter */ - readonly commit_sha: components['parameters']['commit-sha'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['commit-comment'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The contents of the comment. */ - readonly body: string - /** @description Relative path of the file to comment on. */ - readonly path?: string - /** @description Line index in the diff to comment on. */ - readonly position?: number - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - readonly line?: number - } - } - } - } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - readonly 'repos/list-pull-requests-associated-with-commit': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** commit_sha parameter */ - readonly commit_sha: components['parameters']['commit-sha'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['pull-request-simple'][] - } - } - } - } - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - readonly 'repos/get-commit': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['commit'] - } - } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - readonly 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. - */ - readonly 'checks/list-for-ref': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Returns check runs with the specified `name`. */ - readonly check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - readonly 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`. */ - readonly filter?: 'latest' | 'all' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - readonly app_id?: number - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly check_runs: readonly 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 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. - */ - readonly 'checks/list-suites-for-ref': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Filters check suites by GitHub App `id`. */ - readonly app_id?: number - /** Returns check runs with the specified `name`. */ - readonly check_name?: components['parameters']['check-name'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly check_suites: readonly components['schemas']['check-suite'][] - } - } - } - } - } - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - readonly 'repos/get-combined-status-for-ref': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['combined-commit-status'] - } - } - readonly 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`. - */ - readonly 'repos/list-commit-statuses-for-ref': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['status'][] - } - } - readonly 301: components['responses']['moved_permanently'] - } - } - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - readonly 'repos/get-community-profile-metrics': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['community-profile'] - } - } - } - } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - readonly 'repos/compare-commits': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - readonly basehead: string - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['commit-comparison'] - } - } - readonly 404: components['responses']['not_found'] - readonly 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. + * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ - readonly 'repos/get-content': { + readonly 'checks/rerequest-run': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** path parameter */ - readonly path: string - } - readonly query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - readonly ref?: string + /** The unique identifier of the check run. */ + readonly check_run_id: components['parameters']['check-run-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/vnd.github.v3.object': components['schemas']['content-tree'] - readonly 'application/json': - | components['schemas']['content-directory'] - | components['schemas']['content-file'] - | components['schemas']['content-symlink'] - | components['schemas']['content-submodule'] + readonly 'application/json': { readonly [key: string]: unknown } + } + } + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + readonly 403: { + readonly content: { + readonly 'application/json': components['schemas']['basic-error'] } } - readonly 302: components['responses']['found'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + /** Validation error if the check run is not rerequestable */ + readonly 422: { + readonly content: { + readonly 'application/json': components['schemas']['basic-error'] + } + } } } - /** Creates a new file or replaces an existing file in a repository. */ - readonly 'repos/create-or-update-file-contents': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. + */ + readonly 'checks/create-suite': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** path parameter */ - readonly path: string } } readonly responses: { - /** Response */ + /** Response when the suite already exists */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['file-commit'] + readonly 'application/json': components['schemas']['check-suite'] } } - /** Response */ + /** Response when the suite was created */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['file-commit'] + readonly 'application/json': components['schemas']['check-suite'] } } - readonly 404: components['responses']['not_found'] - readonly 409: components['responses']['conflict'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The commit message. */ - readonly message: string - /** @description The new file content, using Base64 encoding. */ - readonly content: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - readonly sha?: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - readonly branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - readonly committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - readonly name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - readonly email: string - /** @example "2013-01-05T13:13:22+05:00" */ - readonly date?: string - } - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - readonly author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - readonly name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - readonly email: string - /** @example "2013-01-15T17:13:22+05:00" */ - readonly date?: string - } + /** @description The sha of the head commit. */ + readonly head_sha: string } } } } - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - readonly 'repos/delete-file': { + /** 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/enterprise-server@3.6/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ + readonly 'checks/set-suites-preferences': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** path parameter */ - readonly path: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['file-commit'] + readonly 'application/json': components['schemas']['check-suite-preference'] } } - readonly 404: components['responses']['not_found'] - readonly 409: components['responses']['conflict'] - readonly 422: components['responses']['validation_failed'] - readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The commit message. */ - readonly message: string - /** @description The blob SHA of the file being replaced. */ - readonly sha: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - readonly branch?: string - /** @description object containing information about the committer. */ - readonly committer?: { - /** @description The name of the author (or committer) of the commit */ - readonly name?: string - /** @description The email of the author (or committer) of the commit */ - readonly email?: string - } - /** @description object containing information about the author. */ - readonly author?: { - /** @description The name of the author (or committer) of the commit */ - readonly name?: string - /** @description The email of the author (or committer) of the commit */ - readonly email?: string - } + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) description for details. */ + readonly auto_trigger_checks?: readonly { + /** @description The `id` of the GitHub App. */ + readonly app_id: number + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + readonly setting: boolean + }[] } } } } /** - * 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. + * **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`. * - * 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. + * 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. */ - readonly 'repos/list-contributors': { + readonly 'checks/get-suite': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Set to `1` or `true` to include anonymous contributors in results. */ - readonly anon?: string - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The unique identifier of the check suite. */ + readonly check_suite_id: components['parameters']['check-suite-id'] } } readonly responses: { - /** if repository contains content */ + /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['contributor'][] + readonly 'application/json': components['schemas']['check-suite'] } } - /** Response if repository is empty */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] } } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - readonly 'dependabot/list-repo-secrets': { + /** + * **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. + */ + readonly 'checks/list-for-suite': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + readonly check_suite_id: components['parameters']['check-suite-id'] } readonly query: { - /** Results per page (max 100) */ + /** Returns check runs with the specified `name`. */ + readonly check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. */ + readonly status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + readonly filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -31569,653 +30239,689 @@ export interface operations { readonly content: { readonly 'application/json': { readonly total_count: number - readonly secrets: readonly components['schemas']['dependabot-secret'][] + readonly check_runs: readonly components['schemas']['check-run'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - readonly 'dependabot/get-repo-public-key': { + /** + * 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/enterprise-server@3.6/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. + */ + readonly 'checks/rerequest-suite': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + readonly check_suite_id: components['parameters']['check-suite-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['dependabot-public-key'] + readonly 'application/json': { readonly [key: string]: unknown } } } } } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - readonly 'dependabot/get-repo-secret': { + /** + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + readonly 'code-scanning/list-alerts-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + } + readonly 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. */ + readonly 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. */ + readonly tool_guid?: components['parameters']['tool-guid'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly 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`. */ + readonly ref?: components['parameters']['git-ref'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The property by which to sort the results. */ + readonly sort?: 'created' | 'updated' + /** If specified, only code scanning alerts with this state will be returned. */ + readonly state?: components['schemas']['code-scanning-alert-state'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['dependabot-secret'] + readonly 'application/json': readonly components['schemas']['code-scanning-alert-items'][] } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['code_scanning_forbidden_read'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * **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`. */ - readonly 'dependabot/create-or-update-repo-secret': { + readonly 'code-scanning/get-alert': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** 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. */ + readonly alert_number: components['parameters']['alert-number'] } } readonly responses: { - /** Response when creating a secret */ - readonly 201: { + /** Response */ + readonly 200: { readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } - } - } - /** Response when updating a secret */ - readonly 204: never - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - readonly encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - readonly key_id?: string + readonly 'application/json': components['schemas']['code-scanning-alert'] } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['code_scanning_forbidden_read'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - readonly 'dependabot/delete-repo-secret': { + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + readonly 'code-scanning/update-alert': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** 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. */ + readonly alert_number: components['parameters']['alert-number'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['code-scanning-alert'] + } + } + readonly 403: components['responses']['code_scanning_forbidden_write'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + readonly state: components['schemas']['code-scanning-alert-set-state'] + readonly dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] + readonly dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] + } + } } } - /** Simple filtering of deployments is available via query parameters: */ - readonly 'repos/list-deployments': { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + readonly 'code-scanning/list-alert-instances': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly 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. */ + readonly alert_number: components['parameters']['alert-number'] } readonly query: { - /** The SHA recorded at creation time. */ - readonly sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - readonly ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - readonly task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - readonly environment?: string | null - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly 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`. */ + readonly ref?: components['parameters']['git-ref'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['deployment'][] + readonly 'application/json': readonly components['schemas']['code-scanning-alert-instance'][] } } + readonly 403: components['responses']['code_scanning_forbidden_read'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts + * 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. * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. + * 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. * - * #### 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. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * #### 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`. + * **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. */ - readonly 'repos/create-deployment': { + readonly 'code-scanning/list-recent-analyses': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly 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. */ + readonly 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. */ + readonly tool_guid?: components['parameters']['tool-guid'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly 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`. */ + readonly ref?: components['schemas']['code-scanning-ref'] + /** Filter analyses belonging to the same SARIF upload. */ + readonly sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] + } } readonly responses: { /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - readonly 202: { + readonly 200: { readonly content: { - readonly 'application/json': { - readonly message?: string - } - } - } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - readonly 409: unknown - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - readonly ref: string - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - readonly task?: string - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - readonly auto_merge?: boolean - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - readonly required_contexts?: readonly string[] - readonly payload?: { readonly [key: string]: unknown } | string - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - readonly environment?: string - /** - * @description Short description of the deployment. - * @default - */ - readonly description?: string | null - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - readonly transient_environment?: boolean - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - readonly production_environment?: boolean + readonly 'application/json': readonly components['schemas']['code-scanning-analysis'][] } } + readonly 403: components['responses']['code_scanning_forbidden_read'] + readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } - readonly 'repos/get-deployment': { + /** + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + * + * The default JSON response contains fields that describe the analysis. + * This includes the Git reference and commit SHA to which the analysis relates, + * the datetime of the analysis, the name of the code scanning tool, + * and the number of alerts. + * + * The `rules_count` field in the default response give the number of rules + * that were run in the analysis. + * For very old analyses this data is not available, + * and `0` is returned in this field. + * + * If you use the Accept header `application/sarif+json`, + * the response contains the analysis data that was uploaded. + * This is formatted as + * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). + */ + readonly 'code-scanning/get-analysis': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** deployment_id parameter */ - readonly deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + readonly analysis_id: number } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deployment'] + readonly 'application/json': components['schemas']['code-scanning-analysis'] + readonly 'application/json+sarif': { readonly [key: string]: unknown } } } + readonly 403: components['responses']['code_scanning_forbidden_read'] readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. * - * To set a deployment as inactive, you must: + * 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. * - * * 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. + * 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` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. * - * 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)." + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. */ - readonly 'repos/delete-deployment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** deployment_id parameter */ - readonly deployment_id: components['parameters']['deployment-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] - } - } - /** Users with pull access can view deployment statuses for a deployment: */ - readonly 'repos/list-deployment-statuses': { + readonly 'code-scanning/delete-analysis': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** deployment_id parameter */ - readonly deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + readonly analysis_id: number } readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + readonly confirm_delete?: string | null } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['deployment-status'][] + readonly 'application/json': components['schemas']['code-scanning-analysis-deletion'] } } + readonly 400: components['responses']['bad_request'] + readonly 403: components['responses']['code_scanning_forbidden_write'] readonly 404: components['responses']['not_found'] + readonly 503: components['responses']['service_unavailable'] } } /** - * Users with `push` access can create deployment statuses for a given deployment. + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. * - * 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. + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." */ - readonly 'repos/create-deployment-status': { + readonly 'code-scanning/upload-sarif': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** deployment_id parameter */ - readonly deployment_id: components['parameters']['deployment-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['deployment-status'] + readonly 'application/json': components['schemas']['code-scanning-sarifs-receipt'] } } - readonly 422: components['responses']['validation_failed'] + /** Bad Request if the sarif field is invalid */ + readonly 400: unknown + readonly 403: components['responses']['code_scanning_forbidden_write'] + readonly 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + readonly 413: unknown + readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { readonly 'application/json': { + readonly commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + readonly ref: components['schemas']['code-scanning-ref'] + readonly sarif: components['schemas']['code-scanning-analysis-sarif-file'] /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - readonly state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - readonly target_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - readonly log_url?: string - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - readonly description?: string - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ */ - readonly environment?: 'production' | 'staging' | 'qa' + readonly checkout_uri?: string /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly environment_url?: string - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - readonly auto_inactive?: boolean + readonly started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + readonly tool_name?: string } } } } - /** Users with pull access can view a deployment status for a deployment: */ - readonly 'repos/get-deployment-status': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + readonly 'code-scanning/get-sarif': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** deployment_id parameter */ - readonly deployment_id: components['parameters']['deployment-id'] - readonly status_id: number + /** The SARIF ID obtained after uploading. */ + readonly sarif_id: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deployment-status'] + readonly 'application/json': components['schemas']['code-scanning-sarifs-status'] } } - readonly 404: components['responses']['not_found'] + readonly 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + readonly 404: unknown + readonly 503: components['responses']['service_unavailable'] } } /** - * 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. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. - * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - readonly 'repos/create-dispatch-event': { + readonly 'repos/codeowners-errors': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + readonly ref?: string + } } readonly responses: { /** Response */ - readonly 204: never - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description A custom webhook event name. */ - readonly event_type: string - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - readonly client_payload?: { readonly [key: string]: unknown } + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['codeowners-errors'] } } + /** Resource not found */ + readonly 404: unknown } } /** - * Get all environments for a repository. + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * - * 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. + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ - readonly 'repos/get-all-environments': { + readonly 'repos/list-collaborators': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + readonly affiliation?: 'outside' | 'direct' | 'all' + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + readonly permission?: 'pull' | 'triage' | 'push' | 'maintain' | 'admin' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - /** - * @description The number of environments in this repository - * @example 5 - */ - readonly total_count?: number - readonly environments?: readonly components['schemas']['environment'][] - } + readonly 'application/json': readonly components['schemas']['collaborator'][] } } + readonly 404: components['responses']['not_found'] } } - /** 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. */ - readonly 'repos/get-environment': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + readonly 'repos/check-collaborator': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['environment'] - } - } + /** Response if user is a collaborator */ + readonly 204: never + /** Not Found if user is not a collaborator */ + readonly 404: unknown } } /** - * 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)." + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * **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)." + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** * - * You must authenticate using an access token with the repo scope to use this endpoint. + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. */ - readonly 'repos/create-or-update-environment': { + readonly 'repos/add-collaborator': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly '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 */ - readonly 422: { + /** Response when a new invitation is created */ + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['repository-invitation'] } } + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + readonly 204: never + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - readonly wait_timer?: components['schemas']['wait-timer'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - readonly reviewers?: - | readonly { - readonly type?: components['schemas']['deployment-reviewer-type'] - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - readonly id?: number - }[] - | null - readonly deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - } | null + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** + * @default push + */ + readonly permission?: string + } } } } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - readonly 'repos/delete-an-environment': { + readonly 'repos/remove-collaborator': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** Default response */ + /** Response */ readonly 204: never } } - readonly 'activity/list-repo-events': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + readonly 'repos/get-collaborator-permission-level': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** Response */ + /** if user has admin permissions */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['event'][] + readonly 'application/json': components['schemas']['repository-collaborator-permission'] } } + readonly 404: components['responses']['not_found'] } } - readonly 'repos/list-forks': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + readonly 'repos/list-commit-comments-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - readonly sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -32226,200 +30932,172 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['minimal-repository'][] + readonly 'application/json': readonly components['schemas']['commit-comment'][] } } - readonly 400: components['responses']['bad_request'] } } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - readonly 'repos/create-fork': { + readonly 'repos/get-commit-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ - readonly 202: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['full-repository'] + readonly 'application/json': components['schemas']['commit-comment'] } } - readonly 400: components['responses']['bad_request'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Optional parameter to specify the organization name if forking into an organization. */ - readonly organization?: string - } | null + } + readonly 'repos/delete-commit-comment': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } + readonly responses: { + /** Response */ + readonly 204: never + readonly 404: components['responses']['not_found'] + } } - readonly 'git/create-blob': { + readonly 'repos/update-commit-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['short-blob'] + readonly 'application/json': components['schemas']['commit-comment'] } } - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 409: components['responses']['conflict'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The new blob's content. */ - readonly content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - readonly encoding?: string + /** @description The contents of the comment */ + readonly body: string } } } } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - readonly 'git/get-blob': { + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ + readonly 'reactions/list-for-commit-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly file_sha: string + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + } + readonly query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['blob'] + readonly 'application/json': readonly components['schemas']['reaction'][] } } - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 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. | - */ - readonly 'git/create-commit': { + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + readonly 'reactions/create-for-commit-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { - /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string + /** Reaction exists */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['reaction'] } + } + /** Reaction created */ + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['git-commit'] + readonly 'application/json': components['schemas']['reaction'] } } - readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The commit message */ - readonly message: string - /** @description The SHA of the tree object this commit points to */ - readonly tree: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - readonly parents?: readonly string[] - /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ - readonly author?: { - /** @description The name of the author (or committer) of the commit */ - readonly name: string - /** @description The email of the author (or committer) of the commit */ - readonly email: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly date?: string - } - /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ - readonly committer?: { - /** @description The name of the author (or committer) of the commit */ - readonly name?: string - /** @description The email of the author (or committer) of the commit */ - readonly email?: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly date?: string - } - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - readonly signature?: string + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * **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/enterprise-server@3.6/rest/reference/repos#comments). + */ + readonly 'reactions/delete-for-commit-comment': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + readonly reaction_id: components['parameters']['reaction-id'] + } + } + readonly responses: { + /** Response */ + readonly 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: @@ -32449,89 +31127,113 @@ export interface operations { * | `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. | */ - readonly 'git/get-commit': { + readonly 'repos/list-commits': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** commit_sha parameter */ - readonly commit_sha: components['parameters']['commit-sha'] + } + readonly query: { + /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ + readonly sha?: string + /** Only commits containing this file path will be returned. */ + readonly path?: string + /** GitHub login or email address by which to filter by commit author. */ + readonly 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`. */ + readonly 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`. */ + readonly until?: string + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['git-commit'] + readonly 'application/json': readonly components['schemas']['commit'][] } } + readonly 400: components['responses']['bad_request'] readonly 404: components['responses']['not_found'] + readonly 409: components['responses']['conflict'] + readonly 500: components['responses']['internal_error'] } } /** - * 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)". + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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`. + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - readonly 'git/list-matching-refs': { + readonly 'repos/list-branches-for-head-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The SHA of the commit. */ + readonly commit_sha: components['parameters']['commit-sha'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['git-ref'][] + readonly 'application/json': readonly components['schemas']['branch-short'][] } } + readonly 422: components['responses']['validation_failed'] } } - /** - * 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)". - */ - readonly 'git/get-ref': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + readonly 'repos/list-comments-for-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string + /** The SHA of the commit. */ + readonly commit_sha: components['parameters']['commit-sha'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['git-ref'] + readonly 'application/json': readonly components['schemas']['commit-comment'][] } } - readonly 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. */ - readonly 'git/create-ref': { + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + readonly 'repos/create-commit-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The SHA of the commit. */ + readonly commit_sha: components['parameters']['commit-sha'] } } readonly responses: { @@ -32541,73 +31243,63 @@ export interface operations { readonly Location?: string } readonly content: { - readonly 'application/json': components['schemas']['git-ref'] + readonly 'application/json': components['schemas']['commit-comment'] } } + readonly 403: components['responses']['forbidden'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - readonly ref: string - /** @description The SHA1 value for this reference. */ - readonly sha: string - /** @example "refs/heads/newbranch" */ - readonly key?: string + /** @description The contents of the comment. */ + readonly body: string + /** @description Relative path of the file to comment on. */ + readonly path?: string + /** @description Line index in the diff to comment on. */ + readonly position?: number + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + readonly line?: number } } } } - readonly 'git/delete-ref': { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + readonly 'repos/list-pull-requests-associated-with-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string + /** The SHA of the commit. */ + readonly commit_sha: components['parameters']['commit-sha'] } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 422: components['responses']['validation_failed'] - } - } - readonly 'git/update-ref': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** ref parameter */ - readonly ref: string + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['git-ref'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The SHA1 value to set this reference to */ - readonly sha: string - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - readonly force?: boolean + readonly 'application/json': readonly components['schemas']['pull-request-simple'][] } } } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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** * @@ -32638,56 +31330,200 @@ export interface operations { * | `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. | */ - readonly 'git/create-tag': { + readonly 'repos/get-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** ref parameter */ + readonly ref: string + } + readonly query: { + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['git-tag'] + readonly 'application/json': components['schemas']['commit'] } } + readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] + readonly 500: components['responses']['internal_error'] + readonly 503: components['responses']['service_unavailable'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - readonly tag: string - /** @description The tag message. */ - readonly message: string - /** @description The SHA of the git object this is tagging. */ - readonly object: string - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - readonly type: 'commit' | 'tree' | 'blob' - /** @description An object with information about the individual creating the tag. */ - readonly tagger?: { - /** @description The name of the author of the tag */ - readonly name: string - /** @description The email of the author of the tag */ - readonly email: string - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly date?: string + } + /** + * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. + * + * 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. + */ + readonly 'checks/list-for-ref': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** ref parameter */ + readonly ref: string + } + readonly query: { + /** Returns check runs with the specified `name`. */ + readonly check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. */ + readonly status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + readonly filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + readonly app_id?: number + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly check_runs: readonly 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 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. + */ + readonly 'checks/list-suites-for-ref': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** ref parameter */ + readonly ref: string + } + readonly query: { + /** Filters check suites by GitHub App `id`. */ + readonly app_id?: number + /** Returns check runs with the specified `name`. */ + readonly check_name?: components['parameters']['check-name'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly check_suites: readonly components['schemas']['check-suite'][] } } } } } /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + readonly 'repos/get-combined-status-for-ref': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** ref parameter */ + readonly ref: string + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['combined-commit-status'] + } + } + readonly 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`. + */ + readonly 'repos/list-commit-statuses-for-ref': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** ref parameter */ + readonly ref: string + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['status'][] + } + } + readonly 301: components['responses']['moved_permanently'] + } + } + /** + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32717,766 +31553,996 @@ export interface operations { * | `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. | */ - readonly 'git/get-tag': { + readonly 'repos/compare-commits': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly tag_sha: string + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + readonly basehead: string + } + readonly query: { + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['git-tag'] + readonly 'application/json': components['schemas']['commit-comparison'] } } readonly 404: components['responses']['not_found'] + readonly 500: components['responses']['internal_error'] + readonly 503: components['responses']['service_unavailable'] } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### 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 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)." + * 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. */ - readonly 'git/create-tree': { + readonly 'repos/get-content': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** path parameter */ + readonly path: string + } + readonly query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + readonly ref?: string } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['git-tree'] + readonly 'application/vnd.github.object': components['schemas']['content-tree'] + readonly 'application/json': + | components['schemas']['content-directory'] + | components['schemas']['content-file'] + | components['schemas']['content-symlink'] + | components['schemas']['content-submodule'] } } + readonly 302: components['responses']['found'] readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - readonly tree: readonly { - /** @description The file referenced in the tree. */ - readonly path?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - readonly mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - readonly type?: 'blob' | 'tree' | 'commit' - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - readonly sha?: string | null - /** - * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - readonly content?: string - }[] - /** - * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. - * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. - */ - readonly base_tree?: string - } - } } } /** - * Returns a single tree using the SHA1 value for that tree. + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. * - * 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. + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - readonly 'git/get-tree': { + readonly 'repos/create-or-update-file-contents': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly tree_sha: string - } - readonly 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. */ - readonly recursive?: string + /** path parameter */ + readonly path: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['git-tree'] + readonly 'application/json': components['schemas']['file-commit'] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - } - readonly 'repos/list-webhooks': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} + readonly 201: { readonly content: { - readonly 'application/json': readonly components['schemas']['hook'][] + readonly 'application/json': components['schemas']['file-commit'] } } readonly 404: components['responses']['not_found'] + readonly 409: components['responses']['conflict'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The commit message. */ + readonly message: string + /** @description The new file content, using Base64 encoding. */ + readonly content: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + readonly sha?: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + readonly branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + readonly committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + readonly name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + readonly email: string + /** @example "2013-01-05T13:13:22+05:00" */ + readonly date?: string + } + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + readonly author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + readonly name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + readonly email: string + /** @example "2013-01-15T17:13:22+05:00" */ + readonly date?: string + } + } + } } } /** - * 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. + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - readonly 'repos/create-webhook': { + readonly 'repos/delete-file': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** path parameter */ + readonly path: string } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['hook'] + readonly 'application/json': components['schemas']['file-commit'] } } - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 409: components['responses']['conflict'] readonly 422: components['responses']['validation_failed'] + readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - readonly name?: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - readonly config?: { - readonly url?: components['schemas']['webhook-config-url'] - 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'] - /** @example "abc" */ - readonly token?: string - /** @example "sha256" */ - readonly digest?: string + /** @description The commit message. */ + readonly message: string + /** @description The blob SHA of the file being deleted. */ + readonly sha: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + readonly branch?: string + /** @description object containing information about the committer. */ + readonly committer?: { + /** @description The name of the author (or committer) of the commit */ + readonly name?: string + /** @description The email of the author (or committer) of the commit */ + readonly email?: string } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - readonly events?: readonly string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - readonly active?: boolean - } | null + /** @description object containing information about the author. */ + readonly author?: { + /** @description The name of the author (or committer) of the commit */ + readonly name?: string + /** @description The email of the author (or committer) of the commit */ + readonly email?: string + } + } } } } - /** 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)." */ - readonly 'repos/get-webhook': { + /** + * 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. + */ + readonly 'repos/list-contributors': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + } + readonly query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + readonly anon?: string + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** Response */ + /** if repository contains content */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['hook'] + readonly 'application/json': readonly components['schemas']['contributor'][] } } + /** Response if repository is empty */ + readonly 204: never + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] } } - readonly 'repos/delete-webhook': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + readonly 'dependabot/list-repo-secrets': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly secrets: readonly components['schemas']['dependabot-secret'][] + } + } + } } } - /** 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)." */ - readonly 'repos/update-webhook': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + readonly 'dependabot/get-repo-public-key': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['hook'] - } - } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - readonly config?: { - readonly url: components['schemas']['webhook-config-url'] - 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'] - /** @example "bar@example.com" */ - readonly address?: string - /** @example "The Serious Room" */ - readonly room?: string - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - readonly events?: readonly string[] - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - readonly add_events?: readonly string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - readonly remove_events?: readonly string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - readonly active?: boolean + readonly 'application/json': components['schemas']['dependabot-public-key'] } } } } - /** - * 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. - */ - readonly 'repos/get-webhook-config-for-repo': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + readonly 'dependabot/get-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['webhook-config'] + readonly 'application/json': components['schemas']['dependabot-secret'] } } } } /** - * 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)." + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - readonly 'repos/update-webhook-config-for-repo': { + readonly 'dependabot/create-or-update-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } } readonly responses: { - /** Response */ - readonly 200: { + /** Response when creating a secret */ + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['webhook-config'] + readonly 'application/json': components['schemas']['empty-object'] } } + /** Response when updating a secret */ + readonly 204: never } readonly requestBody: { readonly content: { readonly 'application/json': { - readonly url?: components['schemas']['webhook-config-url'] - 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'] + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + readonly encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + readonly key_id?: string } } } } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - readonly 'repos/list-webhook-deliveries': { + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + readonly 'dependabot/delete-repo-secret': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - readonly cursor?: components['parameters']['cursor'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['hook-delivery-item'][] - } - } - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] + readonly 204: never } } - /** Returns a delivery for a webhook configured in a repository. */ - readonly 'repos/get-webhook-delivery': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + readonly 'dependency-graph/diff-range': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] - readonly delivery_id: components['parameters']['delivery-id'] + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + readonly basehead: string + } + readonly query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + readonly name?: components['parameters']['manifest-path'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['hook-delivery'] + readonly 'application/json': components['schemas']['dependency-graph-diff'] } } - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - readonly 'repos/redeliver-webhook-delivery': { + /** Simple filtering of deployments is available via query parameters: */ + readonly 'repos/list-deployments': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] - readonly delivery_id: components['parameters']['delivery-id'] } - } - readonly responses: { - readonly 202: components['responses']['accepted'] - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] - } - } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - readonly 'repos/ping-webhook': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + readonly query: { + /** The SHA recorded at creation time. */ + readonly sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + readonly ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + readonly task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + readonly environment?: string | null + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 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` - */ - readonly 'repos/test-push-webhook': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly hook_id: components['parameters']['hook-id'] + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['deployment'][] + } } } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - } } /** - * View the progress of an import. + * Deployments offer a few configurable parameters with certain defaults. * - * **Import status** + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them + * before we merge a pull request. * - * This section includes details about the possible values of the `status` field of the Import Progress response. + * 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`. * - * An import that does not have errors will progress through these steps: + * 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. * - * * `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. + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. * - * If there are problems, you will see one of these in the `status` field: + * 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. * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * The `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. * - * **The project_choices field** + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. * - * 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. + * #### 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 * - * **Git LFS related fields** + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. * - * This section includes details about Git LFS related fields that may be present in the Import Progress 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. * - * * `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. + * #### 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`. */ - readonly 'migrations/get-import-status': { + readonly 'repos/create-deployment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['import'] + readonly 'application/json': components['schemas']['deployment'] } } - readonly 404: components['responses']['not_found'] - } - } - /** Start a source import to a GitHub repository using GitHub Importer. */ - readonly 'migrations/start-import': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + /** Merged branch response */ + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['import'] + readonly 'application/json': { + readonly message?: string + } } } - readonly 404: components['responses']['not_found'] + /** Conflict when there is a merge conflict or the commit's status checks failed */ + readonly 409: unknown readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The URL of the originating repository. */ - readonly vcs_url: string + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + readonly ref: string /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + readonly task?: string + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + readonly auto_merge?: boolean + /** @description The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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]: unknown } | string + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production */ - readonly vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the username to provide to `vcs_url`. */ - readonly vcs_username?: string - /** @description If authentication is required, the password to provide to `vcs_url`. */ - readonly vcs_password?: string - /** @description For a tfvc import, the name of the project that is being imported. */ - readonly tfvc_project?: string + readonly environment?: string + /** + * @description Short description of the deployment. + * @default + */ + readonly description?: string | null + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false + */ + readonly transient_environment?: boolean + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + readonly production_environment?: boolean } } } } - /** Stop an import for a repository. */ - readonly 'migrations/cancel-import': { + readonly 'repos/get-deployment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** deployment_id parameter */ + readonly deployment_id: components['parameters']['deployment-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deployment'] + } + } + readonly 404: components['responses']['not_found'] } } /** - * 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. + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ - readonly 'migrations/update-import': { + readonly 'repos/delete-deployment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** deployment_id parameter */ + readonly deployment_id: components['parameters']['deployment-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['import'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The username to provide to the originating repository. */ - readonly vcs_username?: string - /** @description The password to provide to the originating repository. */ - readonly vcs_password?: string - /** @example "git" */ - readonly vcs?: string - /** @example "project1" */ - readonly tfvc_project?: string - } | null - } + readonly 204: never + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] } } - /** - * 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. - */ - readonly 'migrations/get-commit-authors': { + /** Users with pull access can view deployment statuses for a deployment: */ + readonly 'repos/list-deployment-statuses': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** deployment_id parameter */ + readonly deployment_id: components['parameters']['deployment-id'] } readonly query: { - /** A user ID. Only return users with an ID greater than this ID. */ - readonly since?: components['parameters']['since-user'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['porter-author'][] + readonly 'application/json': readonly components['schemas']['deployment-status'][] } } readonly 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. */ - readonly 'migrations/map-commit-author': { + /** + * 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. + */ + readonly 'repos/create-deployment-status': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly author_id: number + /** deployment_id parameter */ + readonly deployment_id: components['parameters']['deployment-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['porter-author'] + readonly 'application/json': components['schemas']['deployment-status'] } } - readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The new Git author email. */ - readonly email?: string - /** @description The new Git author name. */ - readonly name?: string + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + readonly state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + readonly target_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + readonly log_url?: string + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + readonly description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + readonly environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + readonly environment_url?: string + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + readonly auto_inactive?: boolean } } } } - /** List files larger than 100MB found during the import */ - readonly 'migrations/get-large-files': { + /** Users with pull access can view a deployment status for a deployment: */ + readonly 'repos/get-deployment-status': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** deployment_id parameter */ + readonly deployment_id: components['parameters']['deployment-id'] + readonly status_id: number } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['porter-large-file'][] + readonly 'application/json': components['schemas']['deployment-status'] } } + readonly 404: components['responses']['not_found'] } } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - readonly 'migrations/set-lfs-preference': { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + readonly 'repos/create-dispatch-event': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['import'] - } - } + readonly 204: never readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} - */ - readonly use_lfs: 'opt_in' | 'opt_out' + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + readonly event_type: string + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + readonly client_payload?: { readonly [key: string]: unknown } } } } } /** - * 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. + * Lists the environments for a repository. * - * 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. + * 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. */ - readonly 'apps/get-repo-installation': { + readonly 'repos/get-all-environments': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['installation'] + readonly 'application/json': { + /** + * @description The number of environments in this repository + * @example 5 + */ + readonly total_count?: number + readonly environments?: readonly components['schemas']['environment'][] + } } } - readonly 301: components['responses']['moved_permanently'] - readonly 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. */ - readonly 'interactions/get-restrictions-for-repo': { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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. + */ + readonly 'repos/get-environment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] | { readonly [key: string]: unknown } + readonly 'application/json': components['schemas']['environment'] } } } } - /** 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. */ - readonly 'interactions/set-restrictions-for-repo': { + /** + * 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly 'repos/create-or-update-environment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] + readonly '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 */ + readonly 422: { + readonly content: { + readonly 'application/json': components['schemas']['basic-error'] } } - /** Response */ - readonly 409: unknown } readonly requestBody: { readonly content: { - readonly 'application/json': components['schemas']['interaction-limit'] + readonly 'application/json': { + readonly wait_timer?: components['schemas']['wait-timer'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + readonly reviewers?: + | readonly { + readonly type?: components['schemas']['deployment-reviewer-type'] + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + readonly id?: number + }[] + | null + readonly deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } | null } } } - /** 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. */ - readonly 'interactions/remove-restrictions-for-repo': { + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + readonly 'repos/delete-an-environment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } } readonly responses: { - /** Response */ + /** Default response */ readonly 204: never - /** Response */ - readonly 409: unknown } } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - readonly 'repos/list-invitations': { + /** + * Lists the deployment branch policies for an environment. + * + * 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. + */ + readonly 'repos/list-deployment-branch-policies': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -33485,177 +32551,145 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['repository-invitation'][] + readonly 'application/json': { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + readonly total_count: number + readonly branch_policies: readonly components['schemas']['deployment-branch-policy'][] + } } } } } - readonly 'repos/delete-invitation': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** invitation_id parameter */ - readonly invitation_id: components['parameters']['invitation-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - } - } - readonly 'repos/update-invitation': { + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly 'repos/create-deployment-branch-policy': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** invitation_id parameter */ - readonly invitation_id: components['parameters']['invitation-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['repository-invitation'] + readonly 'application/json': components['schemas']['deployment-branch-policy'] } } + /** Response if the same branch name pattern already exists */ + readonly 303: never + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + readonly 404: unknown } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. - * @enum {string} - */ - readonly permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' - } + readonly 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } /** - * List issues in a repository. + * Gets a deployment branch policy for an environment. * - * **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. + * 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. */ - readonly 'issues/list-for-repo': { + readonly 'repos/get-deployment-branch-policy': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly 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. */ - readonly milestone?: string - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - readonly 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. */ - readonly assignee?: string - /** The user that created the issue. */ - readonly creator?: string - /** A user that's mentioned in the issue. */ - readonly mentioned?: string - /** A list of comma separated label names. Example: `bug,ui,@high` */ - readonly labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - readonly sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + readonly branch_policy_id: components['parameters']['branch-policy-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['issue'][] + readonly 'application/json': components['schemas']['deployment-branch-policy'] } } - readonly 301: components['responses']['moved_permanently'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * Updates a deployment branch policy for an environment. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ - readonly 'issues/create': { + readonly 'repos/update-deployment-branch-policy': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + readonly branch_policy_id: components['parameters']['branch-policy-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['issue'] + readonly 'application/json': components['schemas']['deployment-branch-policy'] } } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] - readonly 422: components['responses']['validation_failed'] - readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** @description The title of the issue. */ - readonly title: string | number - /** @description The contents of the issue. */ - readonly body?: string - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - readonly assignee?: string | null - readonly milestone?: (string | number) | null - /** @description 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 ( - | string - | { - readonly id?: number - readonly name?: string - readonly description?: string | null - readonly color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - readonly assignees?: readonly string[] - } + readonly 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } - /** By default, Issue Comments are ordered by ascending ID. */ - readonly 'issues/list-comments-for-repo': { + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + readonly 'repos/delete-deployment-branch-policy': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + readonly branch_policy_id: components['parameters']['branch-policy-id'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + } + readonly 'activity/list-repo-events': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - readonly sort?: components['parameters']['sort'] - /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -33664,172 +32698,304 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['issue-comment'][] + readonly 'application/json': readonly components['schemas']['event'][] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - readonly 'issues/get-comment': { + readonly 'repos/list-forks': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] + } + readonly query: { + /** The sort order. `stargazers` will sort by star count. */ + readonly sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['issue-comment'] + readonly 'application/json': readonly components['schemas']['minimal-repository'][] } } - readonly 404: components['responses']['not_found'] + readonly 400: components['responses']['bad_request'] } } - readonly 'issues/delete-comment': { + /** + * 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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + readonly 'repos/create-fork': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 202: { + readonly content: { + readonly 'application/json': components['schemas']['full-repository'] + } + } + readonly 400: components['responses']['bad_request'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + readonly organization?: string + } | null + } } } - readonly 'issues/update-comment': { + readonly 'git/create-blob': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['issue-comment'] + readonly 'application/json': components['schemas']['short-blob'] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 409: components['responses']['conflict'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The contents of the comment. */ - readonly body: string + /** @description The new blob's content. */ + readonly content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + readonly encoding?: string } } } } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - readonly 'reactions/list-for-issue-comment': { + /** + * The `content` in the response will always be Base64 encoded. + * + * _Note_: This API supports blobs up to 100 megabytes in size. + */ + readonly 'git/get-blob': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly file_sha: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] + readonly 'application/json': components['schemas']['blob'] } } + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - readonly 'reactions/create-for-issue-comment': { + /** + * 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 the 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. | + */ + readonly 'git/create-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { - /** Reaction exists */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ + /** Response */ readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['reaction'] + readonly 'application/json': components['schemas']['git-commit'] } } + readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The commit message */ + readonly message: string + /** @description The SHA of the tree object this commit points to */ + readonly tree: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + readonly parents?: readonly string[] + /** @description Information about the author of the commit. By default, the `author` will be the authenticated user and the current date. See the `author` and `committer` object below for details. */ + readonly author?: { + /** @description The name of the author (or committer) of the commit */ + readonly name: string + /** @description The email of the author (or committer) of the commit */ + readonly email: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly date?: string + } + /** @description Information about the person who is making the commit. By default, `committer` will use the information set in `author`. See the `author` and `committer` object below for details. */ + readonly committer?: { + /** @description The name of the author (or committer) of the commit */ + readonly name?: string + /** @description The email of the author (or committer) of the commit */ + readonly email?: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly date?: string + } + /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ + readonly signature?: string } } } } /** - * **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`. + * 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 the table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * 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. | */ - readonly 'reactions/delete-for-issue-comment': { + readonly 'git/get-commit': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - readonly reaction_id: components['parameters']['reaction-id'] + /** The SHA of the commit. */ + readonly commit_sha: components['parameters']['commit-sha'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['git-commit'] + } + } + readonly 404: components['responses']['not_found'] } } - readonly 'issues/list-events-for-repo': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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`. + */ + readonly 'git/list-matching-refs': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** ref parameter */ + readonly ref: string } } readonly responses: { @@ -33837,214 +33003,270 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['issue-event'][] + readonly 'application/json': readonly components['schemas']['git-ref'][] } } - readonly 422: components['responses']['validation_failed'] } } - readonly 'issues/get-event': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + readonly 'git/get-ref': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly event_id: number + /** ref parameter */ + readonly ref: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['issue-event'] + readonly 'application/json': components['schemas']['git-ref'] } } - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 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://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - readonly 'issues/get': { + /** 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. */ + readonly 'git/create-ref': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['issue'] + readonly 'application/json': components['schemas']['git-ref'] + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + readonly ref: string + /** @description The SHA1 value for this reference. */ + readonly sha: string + /** @example "refs/heads/newbranch" */ + readonly key?: string } } - readonly 301: components['responses']['moved_permanently'] - readonly 304: components['responses']['not_modified'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] } } - /** Issue owners and users with push access can edit an issue. */ - readonly 'issues/update': { + readonly 'git/delete-ref': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** ref parameter */ + readonly ref: string } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['issue'] - } - } - readonly 301: components['responses']['moved_permanently'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] + readonly 204: never readonly 422: components['responses']['validation_failed'] - readonly 503: components['responses']['service_unavailable'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The title of the issue. */ - readonly title?: (string | number) | null - /** @description The contents of the issue. */ - readonly body?: string | null - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - readonly assignee?: string | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - readonly state?: 'open' | 'closed' - readonly milestone?: (string | number) | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - readonly labels?: readonly ( - | string - | { - readonly id?: number - readonly name?: string - readonly description?: string | null - readonly color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - readonly assignees?: readonly string[] - } - } } } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - readonly 'issues/add-assignees': { + readonly 'git/update-ref': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + readonly ref: string } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['issue'] + readonly 'application/json': components['schemas']['git-ref'] } } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - readonly assignees?: readonly string[] + /** @description The SHA1 value to set this reference to */ + readonly sha: string + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + readonly force?: boolean } } } } - /** Removes one or more assignees from an issue. */ - readonly 'issues/remove-assignees': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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. | + */ + readonly 'git/create-tag': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['issue'] + readonly 'application/json': components['schemas']['git-tag'] } } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - readonly assignees?: readonly string[] + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + readonly tag: string + /** @description The tag message. */ + readonly message: string + /** @description The SHA of the git object this is tagging. */ + readonly object: string + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + readonly type: 'commit' | 'tree' | 'blob' + /** @description An object with information about the individual creating the tag. */ + readonly tagger?: { + /** @description The name of the author of the tag */ + readonly name: string + /** @description The email of the author of the tag */ + readonly email: string + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly date?: string + } } } } } - /** Issue Comments are ordered by ascending ID. */ - readonly 'issues/list-comments': { + /** + * **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. | + */ + readonly 'git/get-tag': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] - } - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly tag_sha: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['issue-comment'][] + readonly 'application/json': components['schemas']['git-tag'] } } readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'issues/create-comment': { + /** + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + readonly 'git/create-tree': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { @@ -34054,59 +33276,96 @@ export interface operations { readonly Location?: string } readonly content: { - readonly 'application/json': components['schemas']['issue-comment'] + readonly 'application/json': components['schemas']['git-tree'] } } readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The contents of the comment. */ - readonly body: string + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + readonly tree: readonly { + /** @description The file referenced in the tree. */ + readonly path?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + readonly mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + readonly type?: 'blob' | 'tree' | 'commit' + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + readonly sha?: string | null + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + readonly content?: string + }[] + /** + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + */ + readonly base_tree?: string } } } } - readonly 'issues/list-events': { + /** + * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + readonly 'git/get-tree': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + readonly tree_sha: string } readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** 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. */ + readonly recursive?: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['issue-event-for-issue'][] + readonly 'application/json': components['schemas']['git-tree'] } } - readonly 410: components['responses']['gone'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - readonly 'issues/list-labels-on-issue': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + readonly 'repos/list-webhooks': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -34117,305 +33376,374 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': readonly components['schemas']['hook'][] } } - readonly 410: components['responses']['gone'] + readonly 404: components['responses']['not_found'] } } - /** Removes any previous labels and sets the new labels for an issue. */ - readonly 'issues/set-labels': { + /** + * 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. + */ + readonly 'repos/create-webhook': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': components['schemas']['hook'] } } - readonly 410: components['responses']['gone'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { - readonly 'application/json': - | { - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - readonly labels?: readonly string[] - } - | readonly string[] - | { - readonly labels?: readonly { - readonly name: string - }[] - } - | readonly { - readonly name: string - }[] - | string + readonly 'application/json': { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + readonly name?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-hook-config-params). */ + readonly config?: { + readonly url?: components['schemas']['webhook-config-url'] + 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'] + /** @example "abc" */ + readonly token?: string + /** @example "sha256" */ + readonly digest?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + readonly events?: readonly string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + readonly active?: boolean + } | null } } } - readonly 'issues/add-labels': { + /** 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)." */ + readonly 'repos/get-webhook': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': components['schemas']['hook'] } } - readonly 410: components['responses']['gone'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': - | { - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - readonly labels?: readonly string[] - } - | readonly string[] - | { - readonly labels?: readonly { - readonly name: string - }[] - } - | readonly { - readonly name: string - }[] - | string - } + readonly 404: components['responses']['not_found'] } } - readonly 'issues/remove-all-labels': { + readonly 'repos/delete-webhook': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 204: never - readonly 410: components['responses']['gone'] + readonly 404: components['responses']['not_found'] } } - /** 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. */ - readonly 'issues/remove-label': { + /** 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)." */ + readonly 'repos/update-webhook': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] - readonly name: string + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': components['schemas']['hook'] } } readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-hook-config-params). */ + readonly config?: { + readonly url: components['schemas']['webhook-config-url'] + 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'] + /** @example "bar@example.com" */ + readonly address?: string + /** @example "The Serious Room" */ + readonly room?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + readonly events?: readonly string[] + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + readonly add_events?: readonly string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + readonly remove_events?: readonly string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + readonly active?: boolean + } + } } } /** - * Users with push access can lock an issue or pull request's conversation. + * 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)." * - * 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)." + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. */ - readonly 'issues/lock': { + readonly 'repos/get-webhook-config-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - * @enum {string} - */ - readonly lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } | null + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['webhook-config'] + } } } } - /** Users with push access can unlock an issue's conversation. */ - readonly 'issues/unlock': { + /** + * 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. + */ + readonly 'repos/update-webhook-config-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['webhook-config'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + readonly url?: components['schemas']['webhook-config-url'] + 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'] + } + } } } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - readonly 'reactions/list-for-issue': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + readonly 'repos/list-webhook-deliveries': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + readonly cursor?: components['parameters']['cursor'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] + readonly 'application/json': readonly components['schemas']['hook-delivery-item'][] } } - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] + readonly 400: components['responses']['bad_request'] + readonly 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - readonly 'reactions/create-for-issue': { + /** Returns a delivery for a webhook configured in a repository. */ + readonly 'repos/get-webhook-delivery': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] + readonly delivery_id: components['parameters']['delivery-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reaction'] + readonly 'application/json': components['schemas']['hook-delivery'] } } - /** Response */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } + readonly 400: components['responses']['bad_request'] + readonly 422: components['responses']['validation_failed'] + } + } + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + readonly 'repos/redeliver-webhook-delivery': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] + readonly delivery_id: components['parameters']['delivery-id'] } + } + readonly responses: { + readonly 202: components['responses']['accepted'] + readonly 400: components['responses']['bad_request'] readonly 422: components['responses']['validation_failed'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } + } + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + readonly 'repos/ping-webhook': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } + readonly responses: { + /** Response */ + readonly 204: never + readonly 404: components['responses']['not_found'] + } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * 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. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` */ - readonly 'reactions/delete-for-issue': { + readonly 'repos/test-push-webhook': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] - readonly reaction_id: components['parameters']['reaction-id'] + /** The unique identifier of the hook. */ + readonly hook_id: components['parameters']['hook-id'] } } readonly responses: { /** Response */ readonly 204: never + readonly 404: components['responses']['not_found'] } } - readonly 'issues/list-events-for-timeline': { + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + readonly 'apps/get-repo-installation': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** issue_number parameter */ - readonly issue_number: components['parameters']['issue-number'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['timeline-issue-events'][] + readonly 'application/json': components['schemas']['installation'] } } + readonly 301: components['responses']['moved_permanently'] readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] } } - readonly 'repos/list-deploy-keys': { + /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ + readonly 'repos/list-invitations': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -34426,90 +33754,94 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['deploy-key'][] + readonly 'application/json': readonly components['schemas']['repository-invitation'][] } } } } - /** You can create a read-only deploy key. */ - readonly 'repos/create-deploy-key': { + readonly 'repos/delete-invitation': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + readonly invitation_id: components['parameters']['invitation-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['deploy-key'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description A name for the key. */ - readonly title?: string - /** @description The contents of the key. */ - readonly key: string - /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." - */ - readonly read_only?: boolean - } - } + readonly 204: never } } - readonly 'repos/get-deploy-key': { + readonly 'repos/update-invitation': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** key_id parameter */ - readonly key_id: components['parameters']['key-id'] + /** The unique identifier of the invitation. */ + readonly invitation_id: components['parameters']['invitation-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deploy-key'] + readonly 'application/json': components['schemas']['repository-invitation'] } } - readonly 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. */ - readonly 'repos/delete-deploy-key': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** key_id parameter */ - readonly key_id: components['parameters']['key-id'] + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + readonly permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' + } } } - readonly responses: { - /** Response */ - readonly 204: never - } } - readonly 'issues/list-labels-for-repo': { + /** + * 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + readonly 'issues/list-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Results per page (max 100) */ + /** 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. */ + readonly milestone?: string + /** Indicates the state of the issues to return. */ + readonly 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. */ + readonly assignee?: string + /** The user that created the issue. */ + readonly creator?: string + /** A user that's mentioned in the issue. */ + readonly mentioned?: string + /** A list of comma separated label names. Example: `bug,ui,@high` */ + readonly labels?: components['parameters']['labels'] + /** What to sort results by. */ + readonly sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + readonly 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -34520,16 +33852,25 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': readonly components['schemas']['issue'][] } } + readonly 301: components['responses']['moved_permanently'] readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - readonly 'issues/create-label': { + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + readonly 'issues/create': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -34540,49 +33881,105 @@ export interface operations { readonly Location?: string } readonly content: { - readonly 'application/json': components['schemas']['label'] + readonly 'application/json': components['schemas']['issue'] } } + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] readonly 422: components['responses']['validation_failed'] + readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - readonly name: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - readonly color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - readonly description?: string + /** @description The title of the issue. */ + readonly title: string | number + /** @description The contents of the issue. */ + readonly body?: string + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + readonly assignee?: string | null + readonly milestone?: (string | number) | null + /** @description 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 ( + | string + | { + readonly id?: number + readonly name?: string + readonly description?: string | null + readonly color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + readonly assignees?: readonly string[] } } } } - readonly 'issues/get-label': { + /** By default, Issue Comments are ordered by ascending ID. */ + readonly 'issues/list-comments-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly name: string + } + readonly query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + readonly sort?: components['parameters']['sort'] + /** Either `asc` or `desc`. Ignored without the `sort` parameter. */ + readonly 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['label'] + readonly 'application/json': readonly components['schemas']['issue-comment'][] } } readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - readonly 'issues/delete-label': { + readonly 'issues/get-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly name: string + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['issue-comment'] + } + } + readonly 404: components['responses']['not_found'] + } + } + readonly 'issues/delete-comment': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { @@ -34590,76 +33987,121 @@ export interface operations { readonly 204: never } } - readonly 'issues/update-label': { + readonly 'issues/update-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly name: string + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['label'] + readonly 'application/json': components['schemas']['issue-comment'] } } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - readonly new_name?: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - readonly color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - readonly description?: string + /** @description The contents of the comment. */ + readonly body: string } } } } - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - readonly 'repos/list-languages': { + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ + readonly 'reactions/list-for-issue-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + } + readonly query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue comment. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['language'] + readonly 'application/json': readonly components['schemas']['reaction'][] } } + readonly 404: components['responses']['not_found'] } } - readonly 'repos/enable-lfs-for-repo': { + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + readonly 'reactions/create-for-issue-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { - readonly 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - readonly 403: unknown + /** Reaction exists */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['reaction'] + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } } } - readonly 'repos/disable-lfs-for-repo': { + /** + * **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/enterprise-server@3.6/rest/reference/issues#comments). + */ + readonly 'reactions/delete-for-issue-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + readonly reaction_id: components['parameters']['reaction-id'] } } readonly responses: { @@ -34667,247 +34109,292 @@ export interface operations { readonly 204: never } } - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - readonly 'licenses/get-for-repo': { + readonly 'issues/list-events-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['license-content'] + readonly 'application/json': readonly components['schemas']['issue-event'][] } } + readonly 422: components['responses']['validation_failed'] } } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - readonly 'repos/merge-upstream': { + readonly 'issues/get-event': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + readonly event_id: number } } readonly responses: { - /** The branch has been successfully synced with the upstream repository */ + /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['merged-upstream'] - } - } - /** The branch could not be synced because of a merge conflict */ - readonly 409: unknown - /** The branch could not be synced for some other reason */ - readonly 422: unknown - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - readonly branch: string + readonly 'application/json': components['schemas']['issue-event'] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - readonly 'repos/merge': { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + readonly 'issues/get': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { - /** Successful Response (The resulting merge commit) */ - readonly 201: { + /** Response */ + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['commit'] - } - } - /** Response when already merged */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - readonly 404: unknown - /** Conflict when there is a merge conflict */ - readonly 409: unknown - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - readonly base: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - readonly head: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - readonly commit_message?: string + readonly 'application/json': components['schemas']['issue'] } } + readonly 301: components['responses']['moved_permanently'] + readonly 304: components['responses']['not_modified'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - readonly 'issues/list-milestones': { + /** Issue owners and users with push access can edit an issue. */ + readonly 'issues/update': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** The state of the milestone. Either `open`, `closed`, or `all`. */ - readonly state?: 'open' | 'closed' | 'all' - /** What to sort results by. Either `due_on` or `completeness`. */ - readonly sort?: 'due_on' | 'completeness' - /** The direction of the sort. Either `asc` or `desc`. */ - readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['milestone'][] + readonly 'application/json': components['schemas']['issue'] } } + readonly 301: components['responses']['moved_permanently'] + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] + readonly 503: components['responses']['service_unavailable'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The title of the issue. */ + readonly title?: (string | number) | null + /** @description The contents of the issue. */ + readonly body?: string | null + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + readonly assignee?: string | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + readonly state?: 'open' | 'closed' + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + readonly state_reason?: ('completed' | 'not_planned' | 'reopened') | null + readonly milestone?: (string | number) | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + readonly labels?: readonly ( + | string + | { + readonly id?: number + readonly name?: string + readonly description?: string | null + readonly color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + readonly assignees?: readonly string[] + } + } } } - readonly 'issues/create-milestone': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + readonly 'issues/add-assignees': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 201: { - readonly headers: { - readonly Location?: string - } readonly content: { - readonly 'application/json': components['schemas']['milestone'] + readonly 'application/json': components['schemas']['issue'] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The title of the milestone. */ - readonly title: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - readonly state?: 'open' | 'closed' - /** @description A description of the milestone. */ - readonly description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly due_on?: string + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + readonly assignees?: readonly string[] } } } } - readonly 'issues/get-milestone': { + /** Removes one or more assignees from an issue. */ + readonly 'issues/remove-assignees': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** milestone_number parameter */ - readonly milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['milestone'] + readonly 'application/json': components['schemas']['issue'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + readonly assignees?: readonly string[] } } - readonly 404: components['responses']['not_found'] } } - readonly 'issues/delete-milestone': { + /** Issue Comments are ordered by ascending ID. */ + readonly 'issues/list-comments': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** milestone_number parameter */ - readonly milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] + } + readonly 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['issue-comment'][] + } + } readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - readonly 'issues/update-milestone': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + readonly 'issues/create-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** milestone_number parameter */ - readonly milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['milestone'] + readonly 'application/json': components['schemas']['issue-comment'] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The title of the milestone. */ - readonly title?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - readonly state?: 'open' | 'closed' - /** @description A description of the milestone. */ - readonly description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - readonly due_on?: string + /** @description The contents of the comment. */ + readonly body: string } } } } - readonly 'issues/list-labels-for-milestone': { + readonly 'issues/list-events': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** milestone_number parameter */ - readonly milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -34918,28 +34405,24 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['label'][] + readonly 'application/json': readonly components['schemas']['issue-event-for-issue'][] } } + readonly 410: components['responses']['gone'] } } - /** List all notifications for the current user. */ - readonly 'activity/list-repo-notifications-for-authenticated-user': { + readonly 'issues/list-labels-on-issue': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } readonly query: { - /** If `true`, show notifications marked as read. */ - readonly all?: components['parameters']['all'] - /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ - readonly 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`. */ - readonly 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`. */ - readonly before?: components['parameters']['before'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -34950,157 +34433,219 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['thread'][] + readonly 'application/json': readonly components['schemas']['label'][] } } + readonly 301: components['responses']['moved_permanently'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - /** 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`. */ - readonly 'activity/mark-repo-notifications-as-read': { + /** Removes any previous labels and sets the new labels for an issue. */ + readonly 'issues/set-labels': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 202: { + readonly 200: { readonly content: { - readonly 'application/json': { - readonly message?: string - readonly url?: string - } + readonly 'application/json': readonly components['schemas']['label'][] } } - /** Reset Content */ - readonly 205: unknown + readonly 301: components['responses']['moved_permanently'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. - */ - readonly last_read_at?: string - } + readonly 'application/json': + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." */ + readonly labels?: readonly string[] + } + | readonly string[] + | { + readonly labels?: readonly { + readonly name: string + }[] + } + | readonly { + readonly name: string + }[] + | string } } } - readonly 'repos/get-pages': { + readonly 'issues/add-labels': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['page'] + readonly 'application/json': readonly components['schemas']['label'][] } } + readonly 301: components['responses']['moved_permanently'] readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." */ + readonly labels?: readonly string[] + } + | readonly string[] + | { + readonly labels?: readonly { + readonly name: string + }[] + } + | readonly { + readonly name: string + }[] + | string + } } } - /** Updates information for a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ - readonly 'repos/update-information-about-pages-site': { + readonly 'issues/remove-all-labels': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 204: never - readonly 400: components['responses']['bad_request'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - readonly cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - readonly https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - readonly public?: boolean - readonly source?: - | ('gh-pages' | 'master' | 'master /docs') - | { - /** @description The repository branch used to publish your site's source files. */ - readonly branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - readonly path: '/' | '/docs' - } - } - } + readonly 301: components['responses']['moved_permanently'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - readonly 'repos/create-pages-site': { + /** 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. */ + readonly 'issues/remove-label': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] + readonly name: string } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['page'] + readonly 'application/json': readonly components['schemas']['label'][] } } - readonly 409: components['responses']['conflict'] + readonly 301: components['responses']['moved_permanently'] + readonly 404: components['responses']['not_found'] + readonly 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + readonly 'issues/lock': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The source branch and directory used to publish your Pages site. */ - readonly source: { - /** @description The repository branch used to publish your site's source files. */ - readonly branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - readonly path?: '/' | '/docs' - } + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + readonly lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' } | null } } } - readonly 'repos/delete-pages-site': { + /** Users with push access can unlock an issue's conversation. */ + readonly 'issues/unlock': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ readonly 204: never + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - readonly 'repos/list-pages-builds': { + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ + readonly 'reactions/list-for-issue': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } readonly query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -35111,110 +34656,114 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['page-build'][] + readonly 'application/json': readonly components['schemas']['reaction'][] } } + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] } } - /** - * 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. - */ - readonly 'repos/request-pages-build': { + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + readonly 'reactions/create-for-issue': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['page-build-status'] + readonly 'application/json': components['schemas']['reaction'] } } - } - } - readonly 'repos/get-latest-pages-build': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['page-build'] + readonly 'application/json': components['schemas']['reaction'] + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - readonly 'repos/get-pages-build': { + /** + * **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/enterprise-server@3.6/rest/reference/issues/). + */ + readonly 'reactions/delete-for-issue': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly build_id: number + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] + /** The unique identifier of the reaction. */ + readonly reaction_id: components['parameters']['reaction-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['page-build'] - } - } + readonly 204: never } } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - readonly 'repos/get-pages-health-check': { + readonly 'issues/list-events-for-timeline': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + readonly issue_number: components['parameters']['issue-number'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['pages-health-check'] - } - } - /** Empty response */ - readonly 202: { - readonly content: { - readonly 'application/json': components['schemas']['empty-object'] + readonly 'application/json': readonly components['schemas']['timeline-issue-events'][] } } - /** Custom domains are not available for GitHub Pages */ - readonly 400: unknown readonly 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - readonly 422: unknown + readonly 410: components['responses']['gone'] } } - /** 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. */ - readonly 'projects/list-for-repo': { + readonly 'repos/list-deploy-keys': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ - readonly state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -35225,148 +34774,98 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['project'][] + readonly 'application/json': readonly components['schemas']['deploy-key'][] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] - readonly 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. */ - readonly 'projects/create-for-repo': { + /** You can create a read-only deploy key. */ + readonly 'repos/create-deploy-key': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['project'] + readonly 'application/json': components['schemas']['deploy-key'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 410: components['responses']['gone'] - readonly 422: components['responses']['validation_failed_simple'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the project. */ - readonly name: string - /** @description The description of the project. */ - readonly body?: string + /** @description A name for the key. */ + readonly title?: string + /** @description The contents of the key. */ + readonly key: string + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + readonly read_only?: boolean } } } } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - readonly 'pulls/list': { + readonly 'repos/get-deploy-key': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Either `open`, `closed`, or `all` to filter by state. */ - readonly 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`. */ - readonly head?: string - /** Filter pulls by base branch name. Example: `gh-pages`. */ - readonly 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). */ - readonly 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`. */ - readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The unique identifier of the key. */ + readonly key_id: components['parameters']['key-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['pull-request-simple'][] + readonly 'application/json': components['schemas']['deploy-key'] } } - readonly 304: components['responses']['not_modified'] - readonly 422: components['responses']['validation_failed'] + readonly 404: components['responses']['not_found'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - readonly 'pulls/create': { + /** Deploy keys are immutable. If you need to update a key, remove the key and create a new one instead. */ + readonly 'repos/delete-deploy-key': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the key. */ + readonly key_id: components['parameters']['key-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['pull-request'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The title of the new pull request. */ - readonly title?: string - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - readonly head: string - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - readonly base: string - /** @description The contents of the pull request. */ - readonly body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - readonly maintainer_can_modify?: boolean - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - readonly draft?: boolean - /** @example 1 */ - readonly issue?: number - } - } + readonly 204: never } } - /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ - readonly 'pulls/list-review-comments-for-repo': { + readonly 'issues/list-labels-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - readonly sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -35377,153 +34876,160 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['pull-request-review-comment'][] + readonly 'application/json': readonly components['schemas']['label'][] } } + readonly 404: components['responses']['not_found'] } } - /** Provides details for a review comment. */ - readonly 'pulls/get-review-comment': { + readonly 'issues/create-label': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] + } + } + readonly responses: { + /** Response */ + readonly 201: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['label'] + } + } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + readonly name: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + readonly color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + readonly description?: string + } + } + } + } + readonly 'issues/get-label': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + readonly name: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-review-comment'] + readonly 'application/json': components['schemas']['label'] } } readonly 404: components['responses']['not_found'] } } - /** Deletes a review comment. */ - readonly 'pulls/delete-review-comment': { + readonly 'issues/delete-label': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] + readonly name: string } } readonly responses: { /** Response */ readonly 204: never - readonly 404: components['responses']['not_found'] } } - /** Enables you to edit a review comment. */ - readonly 'pulls/update-review-comment': { + readonly 'issues/update-label': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] + readonly name: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-review-comment'] + readonly 'application/json': components['schemas']['label'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The text of the reply to the review comment. */ - readonly body: string + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + readonly new_name?: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + readonly color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + readonly description?: string } } } } - /** List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). */ - readonly 'reactions/list-for-pull-request-review-comment': { + /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ + readonly 'repos/list-languages': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] + readonly 'application/json': components['schemas']['language'] } } - readonly 404: components['responses']['not_found'] } } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - readonly 'reactions/create-for-pull-request-review-comment': { + readonly 'repos/enable-lfs-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { - /** Reaction exists */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } + readonly 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + readonly 403: unknown } } - /** - * **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). - */ - readonly 'reactions/delete-for-pull-request-comment': { + readonly 'repos/disable-lfs-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - readonly reaction_id: components['parameters']['reaction-id'] } } readonly responses: { @@ -35532,146 +35038,113 @@ export interface operations { } } /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * This method returns the contents of the repository's license file, if one is detected. * - * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ - readonly 'pulls/get': { + readonly 'licenses/get-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly 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. */ + /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request'] + readonly 'application/json': components['schemas']['license-content'] } } - readonly 304: components['responses']['not_modified'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - readonly 'pulls/update': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + readonly 'repos/merge-upstream': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { - /** Response */ + /** The branch has been successfully synced with the upstream repository */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request'] + readonly 'application/json': components['schemas']['merged-upstream'] } } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] + /** The branch could not be synced because of a merge conflict */ + readonly 409: unknown + /** The branch could not be synced for some other reason */ + readonly 422: unknown } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The title of the pull request. */ - readonly title?: string - /** @description The contents of the pull request. */ - readonly body?: string - /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} - */ - readonly state?: 'open' | 'closed' - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - readonly base?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - readonly maintainer_can_modify?: boolean + /** @description The name of the branch which should be updated to match upstream. */ + readonly branch: string } } } } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - readonly 'codespaces/create-with-pr-for-authenticated-user': { + readonly 'repos/merge': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { - /** Response when the codespace was successfully created */ + /** Successful Response (The resulting merge commit) */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - readonly 202: { - readonly content: { - readonly 'application/json': components['schemas']['codespace'] + readonly 'application/json': components['schemas']['commit'] } } - readonly 401: components['responses']['requires_authentication'] + /** Response when already merged */ + readonly 204: never readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + /** Not Found when the base or head does not exist */ + readonly 404: unknown + /** Conflict when there is a merge conflict */ + readonly 409: unknown + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Location for this codespace */ - readonly location: string - /** @description Machine type to use for this codespace */ - readonly machine?: string - /** @description Working directory for this codespace */ - readonly working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - readonly idle_timeout_minutes?: number + /** @description The name of the base branch that the head will be merged into. */ + readonly base: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + readonly head: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + readonly commit_message?: string } } } } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - readonly 'pulls/list-review-comments': { + readonly 'issues/list-milestones': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - readonly sort?: components['parameters']['sort'] - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ + /** The state of the milestone. Either `open`, `closed`, or `all`. */ + readonly state?: 'open' | 'closed' | 'all' + /** What to sort results by. Either `due_on` or `completeness`. */ + readonly sort?: 'due_on' | 'completeness' + /** The direction of the sort. Either `asc` or `desc`. */ readonly 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`. */ - readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -35682,26 +35155,19 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['pull-request-review-comment'][] + readonly 'application/json': readonly components['schemas']['milestone'][] } } + readonly 404: components['responses']['not_found'] } } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly 'pulls/create-review-comment': { + readonly 'issues/create-milestone': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { @@ -35711,214 +35177,125 @@ export interface operations { readonly Location?: string } readonly content: { - readonly 'application/json': components['schemas']['pull-request-review-comment'] + readonly 'application/json': components['schemas']['milestone'] } } - readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The text of the review comment. */ - readonly body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - readonly commit_id?: string - /** @description The relative path to the file that necessitates a comment. */ - readonly path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - readonly position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - readonly side?: 'LEFT' | 'RIGHT' - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - readonly line?: number - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - readonly start_line?: number + /** @description The title of the milestone. */ + readonly title: string /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - readonly start_side?: 'LEFT' | 'RIGHT' | 'side' + readonly state?: 'open' | 'closed' + /** @description A description of the milestone. */ + readonly description?: string /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - readonly in_reply_to?: number - } - } - } - } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly 'pulls/create-reply-for-review-comment': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - readonly comment_id: components['parameters']['comment-id'] - } - } - readonly responses: { - /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['pull-request-review-comment'] - } - } - readonly 404: components['responses']['not_found'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The text of the review comment. */ - readonly body: string + readonly due_on?: string } } } } - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - readonly 'pulls/list-commits': { + readonly 'issues/get-milestone': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the milestone. */ + readonly milestone_number: components['parameters']['milestone-number'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['commit'][] + readonly 'application/json': components['schemas']['milestone'] } } + readonly 404: components['responses']['not_found'] } } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - readonly 'pulls/list-files': { + readonly 'issues/delete-milestone': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the milestone. */ + readonly milestone_number: components['parameters']['milestone-number'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['diff-entry'][] - } - } - readonly 422: components['responses']['validation_failed'] - readonly 500: components['responses']['internal_error'] - } - } - readonly 'pulls/check-if-merged': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - } - } - readonly responses: { - /** Response if pull request has been merged */ readonly 204: never - /** Not Found if pull request has not been merged */ - readonly 404: unknown + readonly 404: components['responses']['not_found'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'pulls/merge': { + readonly 'issues/update-milestone': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + readonly milestone_number: components['parameters']['milestone-number'] } } readonly responses: { - /** if merge was successful */ + /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-merge-result'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - readonly 405: { - readonly content: { - readonly 'application/json': { - readonly message?: string - readonly documentation_url?: string - } - } - } - /** Conflict if sha was provided and pull request head did not match */ - readonly 409: { - readonly content: { - readonly 'application/json': { - readonly message?: string - readonly documentation_url?: string - } + readonly 'application/json': components['schemas']['milestone'] } } - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Title for the automatic commit message. */ - readonly commit_title?: string - /** @description Extra detail to append to automatic commit message. */ - readonly commit_message?: string - /** @description SHA that pull request head must match to allow merge. */ - readonly sha?: string + /** @description The title of the milestone. */ + readonly title?: string /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - readonly merge_method?: 'merge' | 'squash' | 'rebase' - } | null + readonly state?: 'open' | 'closed' + /** @description A description of the milestone. */ + readonly description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + readonly due_on?: string + } } } } - readonly 'pulls/list-requested-reviewers': { + readonly 'issues/list-labels-for-milestone': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + readonly milestone_number: components['parameters']['milestone-number'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -35929,237 +35306,216 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['pull-request-review-request'] + readonly 'application/json': readonly components['schemas']['label'][] } } } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'pulls/request-reviewers': { + /** Lists all notifications for the current user in the specified repository. */ + readonly 'activity/list-repo-notifications-for-authenticated-user': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] + } + readonly query: { + /** If `true`, show notifications marked as read. */ + readonly all?: components['parameters']['all'] + /** If `true`, only shows notifications in which the user is directly participating or mentioned. */ + readonly 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`. */ + readonly 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`. */ + readonly before?: components['parameters']['before'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['pull-request-simple'] - } - } - readonly 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ - readonly 422: unknown - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description An array of user `login`s that will be requested. */ - readonly reviewers?: readonly string[] - /** @description An array of team `slug`s that will be requested. */ - readonly team_reviewers?: readonly string[] + readonly 'application/json': readonly components['schemas']['thread'][] } } } } - readonly 'pulls/remove-requested-reviewers': { + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + readonly 'activity/mark-repo-notifications-as-read': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-simple'] + readonly 'application/json': { + readonly message?: string + readonly url?: string + } } } - readonly 422: components['responses']['validation_failed'] + /** Reset Content */ + readonly 205: unknown } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description An array of user `login`s that will be removed. */ - readonly reviewers: readonly string[] - /** @description An array of team `slug`s that will be removed. */ - readonly team_reviewers?: readonly string[] + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + readonly last_read_at?: string } } } } - /** The list of reviews returns in chronological order. */ - readonly 'pulls/list-reviews': { + readonly 'repos/get-pages': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] } } readonly responses: { - /** The list of reviews returns in chronological order. */ + /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['pull-request-review'][] + readonly 'application/json': components['schemas']['page'] } } + readonly 404: components['responses']['not_found'] } } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - readonly 'pulls/create-review': { + /** Updates information for a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). */ + readonly 'repos/update-information-about-pages-site': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed_simple'] + readonly 204: never + readonly 400: components['responses']['bad_request'] + readonly 409: components['responses']['conflict'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - readonly commit_id?: string - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - readonly body?: string + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + readonly cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + readonly https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + readonly public?: boolean /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. * @enum {string} */ - readonly event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - readonly comments?: readonly { - /** @description The relative path to the file that necessitates a review comment. */ - readonly path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - readonly position?: number - /** @description Text of the review comment. */ - readonly body: string - /** @example 28 */ - readonly line?: number - /** @example RIGHT */ - readonly side?: string - /** @example 26 */ - readonly start_line?: number - /** @example LEFT */ - readonly start_side?: string - }[] - } - } - } - } - readonly 'pulls/get-review': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] + readonly build_type?: 'legacy' | 'workflow' + readonly source?: + | ('gh-pages' | 'master' | 'master /docs') + | { + /** @description The repository branch used to publish your site's source files. */ + readonly branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + readonly path: '/' | '/docs' + } } } - readonly 404: components['responses']['not_found'] } } - /** Update the review summary comment with new text. */ - readonly 'pulls/update-review': { + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ + readonly 'repos/create-pages-site': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] + readonly 'application/json': components['schemas']['page'] } } - readonly 422: components['responses']['validation_failed_simple'] + readonly 409: components['responses']['conflict'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The body text of the pull request review. */ - readonly body: string - } + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + readonly build_type?: 'legacy' | 'workflow' + /** @description The source branch and directory used to publish your Pages site. */ + readonly source?: { + /** @description The repository branch used to publish your site's source files. */ + readonly branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + readonly path?: '/' | '/docs' + } + } | null } } } - readonly 'pulls/delete-pending-review': { + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ + readonly 'repos/delete-pages-site': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] - } - } + readonly 204: never readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] + readonly 409: components['responses']['conflict'] + readonly 422: components['responses']['validation_failed'] } } - /** List comments for a specific pull request review. */ - readonly 'pulls/list-comments-for-review': { + readonly 'repos/list-pages-builds': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -36170,487 +35526,449 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['review-comment'][] + readonly 'application/json': readonly components['schemas']['page-build'][] } } - readonly 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. */ - readonly 'pulls/dismiss-review': { + /** + * 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. + */ + readonly 'repos/request-pages-build': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] - } - } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The message for the pull request review dismissal */ - readonly message: string - /** @example "APPROVE" */ - readonly event?: string + readonly 'application/json': components['schemas']['page-build-status'] } } } } - readonly 'pulls/submit-review': { + readonly 'repos/get-latest-pages-build': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['pull-request-review'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed_simple'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The body text of the pull request review */ - readonly body?: string - /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - * @enum {string} - */ - readonly event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + readonly 'application/json': components['schemas']['page-build'] } } } } - /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ - readonly 'pulls/update-branch': { + readonly 'repos/get-pages-build': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly pull_number: components['parameters']['pull-number'] + readonly build_id: number } } readonly responses: { /** Response */ - readonly 202: { + readonly 200: { readonly content: { - readonly 'application/json': { - readonly message?: string - readonly url?: string - } + readonly 'application/json': components['schemas']['page-build'] } } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - readonly expected_head_sha?: string - } | 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. - */ - readonly 'repos/get-readme': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + readonly 'enterprise-admin/list-pre-receive-hooks-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - readonly ref?: string + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + readonly sort?: 'created' | 'updated' | 'name' } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['content-file'] + readonly 'application/json': readonly components['schemas']['repository-pre-receive-hook'][] } } - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - readonly 'repos/get-readme-in-directory': { + readonly 'enterprise-admin/get-pre-receive-hook-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - readonly dir: string - } - readonly query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - readonly ref?: string + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['content-file'] + readonly 'application/json': components['schemas']['repository-pre-receive-hook'] } } - readonly 404: components['responses']['not_found'] - readonly 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). + * Deletes any overridden enforcement on this repository for the specified hook. * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + * Responds with effective values inherited from owner and/or global level. */ - readonly 'repos/list-releases': { + readonly 'enterprise-admin/remove-pre-receive-hook-enforcement-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { - /** Response */ + /** Responds with effective values inherited from owner and/or global level. */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['release'][] + readonly 'application/json': components['schemas']['repository-pre-receive-hook'] } } - readonly 404: components['responses']['not_found'] } } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - readonly 'repos/create-release': { + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + readonly 'enterprise-admin/update-pre-receive-hook-enforcement-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + readonly pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } readonly responses: { /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } - readonly content: { - readonly 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - readonly 404: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['repository-pre-receive-hook'] } } - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the tag. */ - readonly tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - readonly target_commitish?: string - /** @description The name of the release. */ - readonly name?: string - /** @description Text describing the contents of the tag. */ - readonly body?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - readonly draft?: boolean - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - readonly prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - readonly discussion_category_name?: string /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false + * @description The state of enforcement for the hook on this repository. + * @enum {string} */ - readonly generate_release_notes?: boolean + readonly enforcement?: 'enabled' | 'disabled' | 'testing' } } } } - /** 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. */ - readonly 'repos/get-release-asset': { + /** 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. */ + readonly 'projects/list-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** asset_id parameter */ - readonly asset_id: components['parameters']['asset-id'] + } + readonly query: { + /** Indicates the state of the projects to return. */ + readonly state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly 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. */ + /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['release-asset'] + readonly 'application/json': readonly components['schemas']['project'][] } } - readonly 302: components['responses']['found'] + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 415: components['responses']['preview_header_missing'] - } - } - readonly 'repos/delete-release-asset': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** asset_id parameter */ - readonly asset_id: components['parameters']['asset-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed_simple'] } } - /** Users with push access to the repository can edit a release asset. */ - readonly 'repos/update-release-asset': { + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ + readonly 'projects/create-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** asset_id parameter */ - readonly asset_id: components['parameters']['asset-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['release-asset'] + readonly 'application/json': components['schemas']['project'] } } + readonly 401: components['responses']['requires_authentication'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 410: components['responses']['gone'] + readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The file name of the asset. */ - readonly name?: string - /** @description An alternate short description of the asset. Used in place of the filename. */ - readonly label?: string - /** @example "uploaded" */ - readonly state?: string + /** @description The name of the project. */ + readonly name: string + /** @description The description of the project. */ + readonly body?: string } } } } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - readonly 'repos/generate-release-notes': { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + readonly 'pulls/list': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** Either `open`, `closed`, or `all` to filter by state. */ + readonly 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`. */ + readonly head?: string + /** Filter pulls by base branch name. Example: `gh-pages`. */ + readonly base?: string + /** What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + readonly sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + readonly direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } } readonly responses: { - /** Name and body of generated release notes */ + /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['release-notes-content'] - } - } - readonly 404: components['responses']['not_found'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The tag name for the release. This can be an existing tag or a new one. */ - readonly tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - readonly target_commitish?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - readonly previous_tag_name?: string - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - readonly configuration_file_path?: string + readonly 'application/json': readonly components['schemas']['pull-request-simple'][] } } + readonly 304: components['responses']['not_modified'] + readonly 422: components['responses']['validation_failed'] } } /** - * View the latest published full release for the repository. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ - readonly 'repos/get-latest-release': { + readonly 'pulls/create': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['release'] + readonly 'application/json': components['schemas']['pull-request'] + } + } + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + readonly title?: string + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + readonly head: string + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + readonly base: string + /** @description The contents of the pull request. */ + readonly body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + readonly maintainer_can_modify?: boolean + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + readonly draft?: boolean + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + readonly issue?: number } } } } - /** Get a published release with the specified tag. */ - readonly 'repos/get-release-by-tag': { + /** Lists review comments for all pull requests in a repository. By default, review comments are in ascending order by ID. */ + readonly 'pulls/list-review-comments-for-repo': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** tag parameter */ - readonly tag: string + } + readonly query: { + readonly sort?: 'created' | 'updated' | 'created_at' + /** The direction to sort results. Ignored without `sort` parameter. */ + readonly 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['release'] + readonly 'application/json': readonly components['schemas']['pull-request-review-comment'][] } } - readonly 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). */ - readonly 'repos/get-release': { + /** Provides details for a review comment. */ + readonly 'pulls/get-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly 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). */ + /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['release'] + readonly 'application/json': components['schemas']['pull-request-review-comment'] } } readonly 404: components['responses']['not_found'] } } - /** Users with push access to the repository can delete a release. */ - readonly 'repos/delete-release': { + /** Deletes a review comment. */ + readonly 'pulls/delete-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ readonly 204: never + readonly 404: components['responses']['not_found'] } } - /** Users with push access to the repository can edit a release. */ - readonly 'repos/update-release': { + /** Enables you to edit a review comment. */ + readonly 'pulls/update-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - readonly 404: { - readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['pull-request-review-comment'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the tag. */ - readonly tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - readonly target_commitish?: string - /** @description The name of the release. */ - readonly name?: string - /** @description Text describing the contents of the tag. */ - readonly body?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - readonly draft?: boolean - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - readonly prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - readonly discussion_category_name?: string + /** @description The text of the reply to the review comment. */ + readonly body: string } } } } - readonly 'repos/list-release-assets': { + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ + readonly 'reactions/list-for-pull-request-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } readonly query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a pull request review comment. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -36661,68 +35979,22 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - readonly 'repos/upload-release-asset': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] - } - readonly query: { - readonly name: string - readonly label?: string - } - } - readonly responses: { - /** Response for successful upload */ - readonly 201: { - readonly content: { - readonly 'application/json': components['schemas']['release-asset'] + readonly 'application/json': readonly components['schemas']['reaction'][] } } - /** Response if you upload an asset with the same filename as another uploaded asset */ - readonly 422: unknown - } - readonly requestBody: { - readonly content: { - readonly '*/*': string - } + readonly 404: components['responses']['not_found'] } } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - readonly 'reactions/create-for-release': { + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + readonly 'reactions/create-for-pull-request-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - /** release_id parameter */ - readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] } } readonly responses: { @@ -36744,135 +36016,146 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the pull request review comment. * @enum {string} */ - readonly content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ - readonly 'secret-scanning/list-alerts-for-repo': { + readonly 'reactions/delete-for-pull-request-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - readonly state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - readonly secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - readonly resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + readonly reaction_id: components['parameters']['reaction-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['secret-scanning-alert'][] - } - } - /** Repository is public or secret scanning is disabled for the repository */ - readonly 404: unknown - readonly 503: components['responses']['service_unavailable'] + readonly 204: never } } /** - * 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - readonly 'secret-scanning/get-alert': { + readonly 'pulls/get': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { - /** Response */ + /** Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['secret-scanning-alert'] + readonly 'application/json': components['schemas']['pull-request'] } } readonly 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - readonly 404: unknown + readonly 404: components['responses']['not_found'] + readonly 500: components['responses']['internal_error'] readonly 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + * 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. */ - readonly 'secret-scanning/update-alert': { + readonly 'pulls/update': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['secret-scanning-alert'] + readonly 'application/json': components['schemas']['pull-request'] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - readonly 404: unknown - /** State does not match the resolution */ - readonly 422: unknown - readonly 503: components['responses']['service_unavailable'] + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - readonly state: components['schemas']['secret-scanning-alert-state'] - readonly resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** @description The title of the pull request. */ + readonly title?: string + /** @description The contents of the pull request. */ + readonly body?: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + readonly state?: 'open' | 'closed' + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + readonly base?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + readonly maintainer_can_modify?: boolean } } } } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - readonly 'secret-scanning/list-locations-for-alert': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + readonly 'pulls/list-review-comments': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly 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. */ - readonly alert_number: components['parameters']['alert-number'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } readonly query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + readonly sort?: components['parameters']['sort'] + /** The direction to sort results. Ignored without `sort` parameter. */ + readonly 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`. */ + readonly since?: components['parameters']['since'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] } } readonly responses: { @@ -36880,342 +36163,528 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['secret-scanning-location'][] + readonly 'application/json': readonly components['schemas']['pull-request-review-comment'][] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - readonly 404: unknown - readonly 503: components['responses']['service_unavailable'] } } /** - * Lists the people that have starred the repository. + * 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/enterprise-server@3.6/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. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'activity/list-stargazers-for-repo': { + readonly 'pulls/create-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': readonly components['schemas']['simple-user'][] | readonly components['schemas']['stargazer'][] + readonly 'application/json': components['schemas']['pull-request-review-comment'] } } + readonly 403: components['responses']['forbidden'] readonly 422: components['responses']['validation_failed'] } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The text of the review comment. */ + readonly body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + readonly commit_id: string + /** @description The relative path to the file that necessitates a comment. */ + readonly path: string + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. 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. + */ + readonly position?: number + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + readonly side?: 'LEFT' | 'RIGHT' + /** @description 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. */ + readonly line: number + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + readonly start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + readonly start_side?: 'LEFT' | 'RIGHT' | 'side' + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + readonly in_reply_to?: number + } + } + } } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - readonly 'repos/get-code-frequency-stats': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + readonly 'pulls/create-reply-for-review-comment': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the comment. */ + readonly comment_id: components['parameters']['comment-id'] + } + } + readonly responses: { + /** Response */ + readonly 201: { + readonly headers: { + readonly Location?: string + } + readonly content: { + readonly 'application/json': components['schemas']['pull-request-review-comment'] + } + } + readonly 404: components['responses']['not_found'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The text of the review comment. */ + readonly body: string + } + } + } + } + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ + readonly 'pulls/list-commits': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['code-frequency-stat'][] + readonly 'application/json': readonly components['schemas']['commit'][] } } - readonly 202: components['responses']['accepted'] - readonly 204: components['responses']['no_content'] } } - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - readonly 'repos/get-commit-activity-stats': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + readonly 'pulls/list-files': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['commit-activity'][] + readonly 'application/json': readonly components['schemas']['diff-entry'][] } } - readonly 202: components['responses']['accepted'] - readonly 204: components['responses']['no_content'] + readonly 422: components['responses']['validation_failed'] + readonly 500: components['responses']['internal_error'] + readonly 503: components['responses']['service_unavailable'] } } - /** - * 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 - */ - readonly 'repos/get-contributors-stats': { + readonly 'pulls/check-if-merged': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly 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 - */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['contributor-activity'][] - } - } - readonly 202: components['responses']['accepted'] - readonly 204: components['responses']['no_content'] + /** Response if pull request has been merged */ + readonly 204: never + /** Not Found if pull request has not been merged */ + readonly 404: unknown } } - /** - * 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. - */ - readonly 'repos/get-participation-stats': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + readonly 'pulls/merge': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { - /** The array order is oldest week (index 0) to most recent week. */ + /** if merge was successful */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['participation-stats'] + readonly 'application/json': components['schemas']['pull-request-merge-result'] } } + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + readonly 405: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly documentation_url?: string + } + } + } + /** Conflict if sha was provided and pull request head did not match */ + readonly 409: { + readonly content: { + readonly 'application/json': { + readonly message?: string + readonly documentation_url?: string + } + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description Title for the automatic commit message. */ + readonly commit_title?: string + /** @description Extra detail to append to automatic commit message. */ + readonly commit_message?: string + /** @description SHA that pull request head must match to allow merge. */ + readonly sha?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + readonly merge_method?: 'merge' | 'squash' | 'rebase' + } | null + } } } - /** - * 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. - */ - readonly 'repos/get-punch-card-stats': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + readonly 'pulls/list-requested-reviewers': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly 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. */ + /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['code-frequency-stat'][] + readonly 'application/json': components['schemas']['pull-request-review-request'] } } - readonly 204: components['responses']['no_content'] } } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - readonly 'repos/create-commit-status': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + readonly 'pulls/request-reviewers': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly sha: string + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ readonly 201: { - readonly headers: { - readonly Location?: string - } readonly content: { - readonly 'application/json': components['schemas']['status'] + readonly 'application/json': components['schemas']['pull-request-simple'] } } + readonly 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + readonly 422: unknown } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - readonly state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - readonly target_url?: string - /** @description A short description of the status. */ - readonly description?: string - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - readonly context?: string + /** @description An array of user `login`s that will be requested. */ + readonly reviewers?: readonly string[] + /** @description An array of team `slug`s that will be requested. */ + readonly team_reviewers?: readonly string[] } } } } - /** Lists the people watching the specified repository. */ - readonly 'activity/list-watchers-for-repo': { + readonly 'pulls/remove-requested-reviewers': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['simple-user'][] + readonly 'application/json': components['schemas']['pull-request-simple'] + } + } + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description An array of user `login`s that will be removed. */ + readonly reviewers: readonly string[] + /** @description An array of team `slug`s that will be removed. */ + readonly team_reviewers?: readonly string[] } } } } - readonly 'activity/get-repo-subscription': { + /** The list of reviews returns in chronological order. */ + readonly 'pulls/list-reviews': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** if you subscribe to the repository */ + /** The list of reviews returns in chronological order. */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['repository-subscription'] + readonly 'application/json': readonly components['schemas']['pull-request-review'][] } } - readonly 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - readonly 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. */ - readonly 'activity/set-repo-subscription': { + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. + */ + readonly 'pulls/create-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['repository-subscription'] + readonly 'application/json': components['schemas']['pull-request-review'] } } + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Determines if notifications should be received from this repository. */ - readonly subscribed?: boolean - /** @description Determines if all notifications should be blocked from this repository. */ - readonly ignored?: boolean + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + readonly commit_id?: string + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + readonly body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + readonly event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + readonly comments?: readonly { + /** @description The relative path to the file that necessitates a review comment. */ + readonly path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + readonly position?: number + /** @description Text of the review comment. */ + readonly body: string + /** @example 28 */ + readonly line?: number + /** @example RIGHT */ + readonly side?: string + /** @example 26 */ + readonly start_line?: number + /** @example LEFT */ + readonly start_side?: string + }[] } } } } - /** 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). */ - readonly 'activity/delete-repo-subscription': { + readonly 'pulls/get-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['pull-request-review'] + } + } + readonly 404: components['responses']['not_found'] } } - readonly 'repos/list-tags': { + /** Update the review summary comment with new text. */ + readonly 'pulls/update-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['tag'][] + readonly 'application/json': components['schemas']['pull-request-review'] + } + } + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The body text of the pull request review. */ + readonly body: string } } } } - /** - * 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. - */ - readonly 'repos/download-tarball-archive': { + readonly 'pulls/delete-pending-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - readonly ref: string + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ - readonly 302: never + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['pull-request-review'] + } + } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] } } - readonly 'repos/list-teams': { + /** List comments for a specific pull request review. */ + readonly 'pulls/list-comments-for-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -37226,188 +36695,302 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['team'][] + readonly 'application/json': readonly components['schemas']['review-comment'][] } } + readonly 404: components['responses']['not_found'] } } - readonly 'repos/get-all-topics': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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. */ + readonly 'pulls/dismiss-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topic'] + readonly 'application/json': components['schemas']['pull-request-review'] } } readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The message for the pull request review dismissal */ + readonly message: string + /** + * @example "DISMISS" + * @enum {string} + */ + readonly event?: 'DISMISS' + } + } } } - readonly 'repos/replace-all-topics': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ + readonly 'pulls/submit-review': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + readonly review_id: components['parameters']['review-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topic'] + readonly 'application/json': components['schemas']['pull-request-review'] } } + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ - readonly names: readonly string[] + /** @description The body text of the pull request review */ + readonly body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + readonly event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' } } } } - /** 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. */ - readonly 'repos/get-clones': { + /** Updates the pull request branch with the latest upstream changes by merging HEAD from the base branch into the pull request branch. */ + readonly 'pulls/update-branch': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] - } - readonly query: { - /** Must be one of: `day`, `week`. */ - readonly per?: components['parameters']['per'] + /** The number that identifies the pull request. */ + readonly pull_number: components['parameters']['pull-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 202: { readonly content: { - readonly 'application/json': components['schemas']['clone-traffic'] + readonly 'application/json': { + readonly message?: string + readonly url?: string + } } } readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@3.6/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 + } } } - /** Get the top 10 popular contents over the last 14 days. */ - readonly 'repos/get-top-paths': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + readonly 'repos/get-readme': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } + readonly query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + readonly ref?: string + } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['content-traffic'][] + readonly 'application/json': components['schemas']['content-file'] } } - readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** Get the top 10 referrers over the last 14 days. */ - readonly 'repos/get-top-referrers': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + readonly 'repos/get-readme-in-directory': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + readonly dir: string + } + readonly query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + readonly ref?: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['referrer-traffic'][] + readonly 'application/json': components['schemas']['content-file'] } } - readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } - /** 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. */ - readonly 'repos/get-views': { + /** + * 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/enterprise-server@3.6/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. + */ + readonly 'repos/list-releases': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } readonly query: { - /** Must be one of: `day`, `week`. */ - readonly per?: components['parameters']['per'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['view-traffic'] + readonly 'application/json': readonly components['schemas']['release'][] } } - readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - readonly 'repos/transfer': { + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + readonly 'repos/create-release': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 202: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': components['schemas']['minimal-repository'] + readonly 'application/json': components['schemas']['release'] } } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - readonly new_owner: string - /** @description 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[] + /** @description The name of the tag. */ + readonly tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + readonly target_commitish?: string + /** @description The name of the release. */ + readonly name?: string + /** @description Text describing the contents of the tag. */ + readonly body?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + readonly draft?: boolean + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + readonly prerelease?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + readonly generate_release_notes?: boolean } } } } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly 'repos/check-vulnerability-alerts': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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. */ + readonly 'repos/get-release-asset': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + readonly asset_id: components['parameters']['asset-id'] } } readonly responses: { - /** Response if repository is enabled with vulnerability alerts */ - readonly 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - readonly 404: unknown + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['release-asset'] + } + } + readonly 302: components['responses']['found'] + readonly 404: components['responses']['not_found'] } } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly 'repos/enable-vulnerability-alerts': { + readonly 'repos/delete-release-asset': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + readonly asset_id: components['parameters']['asset-id'] } } readonly responses: { @@ -37415,437 +36998,360 @@ export interface operations { readonly 204: never } } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - readonly 'repos/disable-vulnerability-alerts': { + /** Users with push access to the repository can edit a release asset. */ + readonly 'repos/update-release-asset': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + readonly asset_id: components['parameters']['asset-id'] } } readonly responses: { /** Response */ - readonly 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. - */ - readonly 'repos/download-zipball-archive': { - readonly parameters: { - readonly path: { - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - readonly ref: string + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['release-asset'] + } } } - readonly responses: { - /** Response */ - readonly 302: never + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The file name of the asset. */ + readonly name?: string + /** @description An alternate short description of the asset. Used in place of the filename. */ + readonly label?: string + /** @example "uploaded" */ + readonly state?: string + } + } } } - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - readonly 'repos/create-using-template': { + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + readonly 'repos/generate-release-notes': { readonly parameters: { readonly path: { - readonly template_owner: string - readonly template_repo: string + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { - /** Response */ - readonly 201: { - readonly headers: { - readonly Location?: string - } + /** Name and body of generated release notes */ + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['repository'] + readonly 'application/json': components['schemas']['release-notes-content'] } } + readonly 404: components['responses']['not_found'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - readonly owner?: string - /** @description The name of the new repository. */ - readonly name: string - /** @description A short description of the new repository. */ - readonly description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - readonly include_all_branches?: boolean - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - readonly private?: boolean + /** @description The tag name for the release. This can be an existing tag or a new one. */ + readonly tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + readonly target_commitish?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + readonly previous_tag_name?: string + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + readonly configuration_file_path?: string } } } } /** - * Lists all public repositories in the order that they were created. + * View the latest published full release for the repository. * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * 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. */ - readonly 'repos/list-public': { + readonly 'repos/get-latest-release': { readonly parameters: { - readonly query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - readonly since?: components['parameters']['since-repo'] + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 200: { - readonly headers: { - readonly Link?: string - } readonly content: { - readonly 'application/json': readonly components['schemas']['minimal-repository'][] + readonly 'application/json': components['schemas']['release'] } } - readonly 304: components['responses']['not_modified'] - readonly 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. */ - readonly 'actions/list-environment-secrets': { + /** Get a published release with the specified tag. */ + readonly 'repos/get-release-by-tag': { readonly parameters: { readonly path: { - readonly repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] - } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** tag parameter */ + readonly tag: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly secrets: readonly components['schemas']['actions-secret'][] - } + readonly 'application/json': components['schemas']['release'] } } + readonly 404: components['responses']['not_found'] } } - /** 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. */ - readonly 'actions/get-environment-public-key': { + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ + readonly 'repos/get-release': { readonly parameters: { readonly path: { - readonly repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } } readonly responses: { - /** Response */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['actions-public-key'] + readonly 'application/json': components['schemas']['release'] } } + readonly 404: components['responses']['not_found'] } } - /** 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. */ - readonly 'actions/get-environment-secret': { + /** Users with push access to the repository can delete a release. */ + readonly 'repos/delete-release': { readonly parameters: { readonly path: { - readonly repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['actions-secret'] - } - } + readonly 204: never } } - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - readonly 'actions/create-or-update-environment-secret': { + /** Users with push access to the repository can edit a release. */ + readonly 'repos/update-release': { readonly parameters: { readonly path: { - readonly repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } } readonly responses: { - /** Response when creating a secret */ - readonly 201: { + /** Response */ + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['empty-object'] + readonly 'application/json': components['schemas']['release'] } } - /** Response when updating a secret */ - readonly 204: never } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - readonly encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - readonly key_id: string + /** @description The name of the tag. */ + readonly tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + readonly target_commitish?: string + /** @description The name of the release. */ + readonly name?: string + /** @description Text describing the contents of the tag. */ + readonly body?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + readonly draft?: boolean + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + readonly prerelease?: boolean } } } } - /** 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. */ - readonly 'actions/delete-environment-secret': { - readonly parameters: { - readonly path: { - readonly repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - readonly environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] - } - } - readonly responses: { - /** Default response */ - readonly 204: never - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - readonly 'enterprise-admin/list-provisioned-groups-enterprise': { + readonly 'repos/list-release-assets': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } readonly query: { - /** Used for pagination: the index of the first result to return. */ - readonly startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - readonly count?: components['parameters']['count'] - /** filter results */ - readonly filter?: string - /** attributes to exclude */ - readonly excludedAttributes?: string + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['scim-group-list-enterprise'] + readonly 'application/json': readonly components['schemas']['release-asset'][] } } } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#create-a-release) to upload a release asset. * - * 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. + * 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 Enterprise Server 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 Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ - readonly 'enterprise-admin/provision-and-invite-enterprise-group': { + readonly 'repos/upload-release-asset': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] + } + readonly query: { + readonly name: string + readonly label?: string } } readonly responses: { - /** Response */ + /** Response for successful upload */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-group'] + readonly 'application/json': components['schemas']['release-asset'] } } + /** Response if you upload an asset with the same filename as another uploaded asset */ + readonly 422: unknown } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - readonly displayName: string - readonly members?: readonly { - /** @description The SCIM user ID for a user. */ - readonly value: string - }[] - } + readonly '*/*': string } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - readonly 'enterprise-admin/get-provisioning-information-for-enterprise-group': { + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + readonly 'reactions/list-for-release': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - readonly scim_group_id: components['parameters']['scim-group-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } readonly query: { - /** Attributes to exclude. */ - readonly excludedAttributes?: string + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + readonly content?: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-group'] + readonly 'application/json': readonly components['schemas']['reaction'][] } } + readonly 404: components['responses']['not_found'] } } - /** - * **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. - */ - readonly 'enterprise-admin/set-information-for-provisioned-enterprise-group': { + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + readonly 'reactions/create-for-release': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - readonly scim_group_id: components['parameters']['scim-group-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] } } readonly responses: { - /** Response */ + /** Reaction exists */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-group'] + readonly 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + readonly 201: { + readonly content: { + readonly 'application/json': components['schemas']['reaction'] } } + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - readonly displayName: string - readonly members?: readonly { - /** @description The SCIM user ID for a user. */ - readonly value: string - }[] + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + readonly content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - readonly 'enterprise-admin/delete-scim-group-from-enterprise': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + readonly 'reactions/delete-for-release': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - readonly scim_group_id: components['parameters']['scim-group-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + readonly release_id: components['parameters']['release-id'] + /** The unique identifier of the reaction. */ + readonly reaction_id: components['parameters']['reaction-id'] } } readonly responses: { @@ -37853,626 +37359,629 @@ export interface operations { readonly 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). - */ - readonly 'enterprise-admin/update-attribute-for-enterprise-group': { + /** Lists the status of each repository cache replica. */ + readonly 'repos/list-cache-info': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** Identifier generated by the GitHub SCIM endpoint. */ - readonly scim_group_id: components['parameters']['scim-group-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** Response */ + /** Status information for cache replicas */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - readonly Operations: readonly { - /** @enum {string} */ - readonly op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - readonly path?: string - /** @description Can be any value - string, number, array or object. */ - readonly value?: unknown + readonly 'application/json': readonly { + readonly host: string + readonly location: string + readonly git: { + /** @enum {string} */ + readonly sync_status: 'offline' | 'inactive' | 'in_sync' | 'not_in_sync' + /** Format: date-time */ + readonly last_sync: string + } }[] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } } /** - * **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. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - readonly 'enterprise-admin/list-provisioned-identities-enterprise': { + readonly 'secret-scanning/list-alerts-for-repo': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } readonly query: { - /** Used for pagination: the index of the first result to return. */ - readonly startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - readonly count?: components['parameters']['count'] - /** filter results */ - readonly filter?: string + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + readonly state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + readonly secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + readonly resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + readonly sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['scim-user-list-enterprise'] + readonly 'application/json': readonly components['schemas']['secret-scanning-alert'][] } } + /** Repository is public or secret scanning is disabled for the repository */ + readonly 404: unknown + readonly 503: components['responses']['service_unavailable'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + readonly 'secret-scanning/get-alert': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly 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. */ + readonly alert_number: components['parameters']['alert-number'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['secret-scanning-alert'] + } + } + readonly 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + readonly 404: unknown + readonly 503: components['responses']['service_unavailable'] + } + } + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ - readonly 'enterprise-admin/provision-and-invite-enterprise-user': { + readonly 'secret-scanning/update-alert': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly 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. */ + readonly alert_number: components['parameters']['alert-number'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-user'] + readonly 'application/json': components['schemas']['secret-scanning-alert'] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + readonly 404: unknown + /** State does not match the resolution */ + readonly 422: unknown + readonly 503: components['responses']['service_unavailable'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description The username for the user. */ - readonly userName: string - readonly name: { - /** @description The first name of the user. */ - readonly givenName: string - /** @description The last name of the user. */ - readonly familyName: string - } - /** @description List of user emails. */ - readonly emails: readonly { - /** @description The email address. */ - readonly value: string - /** @description The type of email address. */ - readonly type: string - /** @description Whether this email address is the primary address. */ - readonly primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - readonly groups?: readonly { - readonly value?: string - }[] + readonly state: components['schemas']['secret-scanning-alert-state'] + readonly resolution?: components['schemas']['secret-scanning-alert-resolution'] } } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - readonly 'enterprise-admin/get-provisioning-information-for-enterprise-user': { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + readonly 'secret-scanning/list-locations-for-alert': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly 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. */ + readonly alert_number: components['parameters']['alert-number'] + } + readonly query: { + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-user'] + readonly 'application/json': readonly components['schemas']['secret-scanning-location'][] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + readonly 404: unknown + readonly 503: components['responses']['service_unavailable'] } } /** - * **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`. + * Lists the people that have starred the repository. * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ - readonly 'enterprise-admin/set-information-for-provisioned-enterprise-user': { + readonly 'activity/list-stargazers-for-repo': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-user'] + readonly 'application/json': readonly components['schemas']['simple-user'][] | readonly components['schemas']['stargazer'][] } } + readonly 422: components['responses']['validation_failed'] } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description The username for the user. */ - readonly userName: string - readonly name: { - /** @description The first name of the user. */ - readonly givenName: string - /** @description The last name of the user. */ - readonly familyName: string - } - /** @description List of user emails. */ - readonly emails: readonly { - /** @description The email address. */ - readonly value: string - /** @description The type of email address. */ - readonly type: string - /** @description Whether this email address is the primary address. */ - readonly primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - readonly groups?: readonly { - readonly value?: string - }[] + } + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + readonly 'repos/get-code-frequency-stats': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + readonly 200: { + readonly content: { + readonly 'application/json': readonly components['schemas']['code-frequency-stat'][] } } + readonly 202: components['responses']['accepted'] + readonly 204: components['responses']['no_content'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - readonly 'enterprise-admin/delete-user-from-enterprise': { + /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ + readonly 'repos/get-commit-activity-stats': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly 'application/json': readonly components['schemas']['commit-activity'][] + } + } + readonly 202: components['responses']['accepted'] + readonly 204: components['responses']['no_content'] } } /** - * **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`. + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * * `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 */ - readonly 'enterprise-admin/update-attribute-for-enterprise-user': { + readonly 'repos/get-contributors-stats': { readonly parameters: { readonly path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - readonly enterprise: components['parameters']['enterprise'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['scim-enterprise-user'] + readonly 'application/json': readonly components['schemas']['contributor-activity'][] } } + readonly 202: components['responses']['accepted'] + readonly 204: components['responses']['no_content'] + } + } + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + readonly 'repos/get-participation-stats': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description The SCIM schema URIs. */ - readonly schemas: readonly string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - readonly Operations: readonly { readonly [key: string]: unknown }[] + readonly responses: { + /** The array order is oldest week (index 0) to most recent week. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['participation-stats'] } } + readonly 404: components['responses']['not_found'] } } /** - * 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. + * Each array contains the day number, hour number, and number of commits: * - * 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. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * 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. + * 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. */ - readonly 'scim/list-provisioned-identities': { + readonly 'repos/get-punch-card-stats': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - } - readonly query: { - /** Used for pagination: the index of the first result to return. */ - readonly startIndex?: number - /** Used for pagination: the number of results to return. */ - readonly 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\"`. - */ - readonly filter?: string + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { - /** Response */ + /** 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. */ readonly 200: { readonly content: { - readonly 'application/scim+json': components['schemas']['scim-user-list'] + readonly 'application/json': readonly components['schemas']['code-frequency-stat'][] } } - readonly 304: components['responses']['not_modified'] - readonly 400: components['responses']['scim_bad_request'] - readonly 403: components['responses']['scim_forbidden'] - readonly 404: components['responses']['scim_not_found'] + readonly 204: components['responses']['no_content'] } } - /** Provision organization membership for a user, and send an activation email to the email address. */ - readonly 'scim/provision-and-invite-user': { + /** + * 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. + */ + readonly 'repos/create-commit-status': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + readonly sha: string } } readonly responses: { /** Response */ readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/scim+json': components['schemas']['scim-user'] + readonly 'application/json': components['schemas']['status'] } } - readonly 304: components['responses']['not_modified'] - readonly 400: components['responses']['scim_bad_request'] - readonly 403: components['responses']['scim_forbidden'] - readonly 404: components['responses']['scim_not_found'] - readonly 409: components['responses']['scim_conflict'] - readonly 500: components['responses']['scim_internal_error'] } readonly requestBody: { readonly content: { readonly 'application/json': { /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - readonly userName: string - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe + * @description The state of the status. + * @enum {string} */ - readonly displayName?: string + readonly state: 'error' | 'failure' | 'pending' | 'success' /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - readonly name: { - readonly givenName: string - readonly familyName: string - readonly formatted?: string - } + readonly target_url?: string | null + /** @description A short description of the status. */ + readonly description?: string | null /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default */ - readonly emails: readonly { - readonly value: string - readonly primary?: boolean - readonly type?: string - }[] - readonly schemas?: readonly string[] - readonly externalId?: string - readonly groups?: readonly string[] - readonly active?: boolean + readonly context?: string } } } } - readonly 'scim/get-provisioning-information-for-user': { + /** Lists the people watching the specified repository. */ + readonly 'activity/list-watchers-for-repo': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/scim+json': components['schemas']['scim-user'] + readonly 'application/json': readonly components['schemas']['simple-user'][] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['scim_forbidden'] - readonly 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}`. - */ - readonly 'scim/set-information-for-provisioned-user': { + readonly 'activity/get-repo-subscription': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** if you subscribe to the repository */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['repository-subscription'] + } + } + readonly 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + readonly 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/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ + readonly 'activity/set-repo-subscription': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/scim+json': components['schemas']['scim-user'] + readonly 'application/json': components['schemas']['repository-subscription'] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['scim_forbidden'] - readonly 404: components['responses']['scim_not_found'] } readonly requestBody: { readonly content: { readonly 'application/json': { - readonly schemas?: readonly string[] - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - readonly displayName?: string - readonly externalId?: string - readonly groups?: readonly string[] - readonly active?: boolean - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - readonly userName: string - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - readonly name: { - readonly givenName: string - readonly familyName: string - readonly formatted?: string - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - readonly emails: readonly { - readonly type?: string - readonly value: string - readonly primary?: boolean - }[] + /** @description Determines if notifications should be received from this repository. */ + readonly subscribed?: boolean + /** @description Determines if all notifications should be blocked from this repository. */ + readonly ignored?: boolean } } } } - readonly 'scim/delete-user-from-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ + readonly 'activity/delete-repo-subscription': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['scim_forbidden'] - readonly 404: components['responses']['scim_not_found'] + } + } + readonly 'repos/list-tags': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['tag'][] + } + } } } /** - * 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. + * This returns the tag protection states of a repository. * - * **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 - * } - * }] - * } - * ``` + * This information is only available to repository administrators. */ - readonly 'scim/update-attribute-for-user': { + readonly 'repos/list-tag-protection': { readonly parameters: { readonly path: { - readonly org: components['parameters']['org'] - /** scim_user_id parameter */ - readonly scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/scim+json': components['schemas']['scim-user'] + readonly 'application/json': readonly components['schemas']['tag-protection'][] } } - readonly 304: components['responses']['not_modified'] - readonly 400: components['responses']['scim_bad_request'] - readonly 403: components['responses']['scim_forbidden'] - readonly 404: components['responses']['scim_not_found'] + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + } + } + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + readonly 'repos/create-tag-protection': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { /** Response */ - readonly 429: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['tag-protection'] } } + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] } readonly requestBody: { readonly content: { readonly 'application/json': { - readonly schemas?: readonly string[] - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - readonly Operations: readonly { - /** @enum {string} */ - readonly op: 'add' | 'remove' | 'replace' - readonly path?: string - readonly value?: - | { - readonly active?: boolean | null - readonly userName?: string | null - readonly externalId?: string | null - readonly givenName?: string | null - readonly familyName?: string | null - } - | readonly { - readonly value?: string - readonly primary?: boolean - }[] - | string - }[] + /** @description An optional glob pattern to match against when enforcing tag protection. */ + readonly pattern: string } } } } /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. */ - readonly 'search/code': { + readonly 'repos/delete-tag-protection': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + /** The unique identifier of the tag protection. */ + readonly tag_protection_id: components['parameters']['tag-protection-id'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + readonly 403: components['responses']['forbidden'] + readonly 404: components['responses']['not_found'] + } + } + /** + * 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. + */ + readonly 'repos/download-tarball-archive': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + readonly ref: string + } + } + readonly responses: { + /** Response */ + readonly 302: never + } + } + readonly 'repos/list-teams': { readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } readonly query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -38481,260 +37990,209 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['code-search-result-item'][] - } + readonly 'application/json': readonly components['schemas']['team'][] } } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - readonly 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` - */ - readonly 'search/commits': { + readonly 'repos/get-all-topics': { readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } readonly query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['commit-search-result-item'][] - } + readonly 'application/json': components['schemas']['topic'] } } - readonly 304: components['responses']['not_modified'] + readonly 404: components['responses']['not_found'] } } - /** - * 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)." - */ - readonly 'search/issues-and-pull-requests': { + readonly 'repos/replace-all-topics': { readonly parameters: { - readonly query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['topic'] + } + } + readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed_simple'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + readonly names: readonly string[] + } + } + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + readonly 'repos/transfer': { + readonly parameters: { + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 202: { readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['issue-search-result-item'][] - } + readonly 'application/json': components['schemas']['minimal-repository'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + readonly new_owner: string + /** @description 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 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] - readonly 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` + * 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. * - * The labels that best match the query appear first in the search results. + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ - readonly 'search/labels': { + readonly 'repos/download-zipball-archive': { readonly parameters: { - readonly query: { - /** The id of the repository. */ - readonly 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). */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] + readonly ref: string } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['label-search-result-item'][] - } - } - } - readonly 304: components['responses']['not_modified'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] + readonly 302: never } } /** - * 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). + * 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. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * **OAuth scope requirements** * - * `q=tetris+language:assembly&sort=stars&order=desc` + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * 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. + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - readonly 'search/repos': { + readonly 'repos/create-using-template': { readonly parameters: { - readonly query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + readonly path: { + readonly template_owner: string + readonly template_repo: string } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { + readonly headers: { + readonly Location?: string + } readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['repo-search-result-item'][] - } + readonly 'application/json': components['schemas']['repository'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + readonly owner?: string + /** @description The name of the new repository. */ + readonly name: string + /** @description A short description of the new repository. */ + readonly description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + readonly include_all_branches?: boolean + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + readonly private?: boolean } } - readonly 304: components['responses']['not_modified'] - readonly 422: components['responses']['validation_failed'] - readonly 503: components['responses']['service_unavailable'] } } /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` + * Lists all public repositories in the order that they were created. * - * 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. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ - readonly 'search/topics': { + readonly 'repos/list-public': { readonly parameters: { readonly 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). */ - readonly q: string - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** A repository ID. Only return repositories with an ID greater than this ID. */ + readonly since?: components['parameters']['since-repo'] + /** Specifies the types of repositories to return. This endpoint will only list repositories available to all users on the enterprise. */ + readonly visibility?: 'all' | 'public' } } readonly responses: { /** Response */ readonly 200: { + readonly headers: { + readonly Link?: string + } readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['topic-search-result-item'][] - } + readonly 'application/json': readonly components['schemas']['minimal-repository'][] } } readonly 304: components['responses']['not_modified'] + readonly 422: components['responses']['validation_failed'] } } - /** - * 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. - */ - readonly 'search/users': { + /** 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. */ + readonly 'actions/list-environment-secrets': { readonly parameters: { + readonly path: { + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + } readonly query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - readonly 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) */ - readonly 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`. */ - readonly order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -38743,215 +38201,312 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { readonly 'application/json': { readonly total_count: number - readonly incomplete_results: boolean - readonly items: readonly components['schemas']['user-search-result-item'][] + readonly secrets: readonly components['schemas']['actions-secret'][] } } } - readonly 304: components['responses']['not_modified'] - readonly 422: components['responses']['validation_failed'] - readonly 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. */ - readonly 'teams/get-legacy': { + /** 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. */ + readonly 'actions/get-environment-public-key': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-full'] + readonly 'application/json': components['schemas']['actions-public-key'] } } - readonly 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. - */ - readonly 'teams/delete-legacy': { + /** 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. */ + readonly 'actions/get-environment-secret': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['actions-secret'] + } + } } } /** - * **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. + * 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. * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * #### Example encrypting a secret using Node.js * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - readonly 'teams/update-legacy': { + readonly 'actions/create-or-update-environment-secret': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] } } readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['team-full'] - } - } - /** Response */ + /** Response when creating a secret */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['team-full'] + readonly 'application/json': components['schemas']['empty-object'] } } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + readonly 204: never } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The name of the team. */ - readonly name: string - /** @description The description of the team. */ - readonly description?: string - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - readonly privacy?: 'secret' | 'closed' - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - readonly permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - readonly parent_team_id?: number | null + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) endpoint. */ + readonly encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + readonly key_id: string } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List 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/). - */ - readonly 'teams/list-discussions-legacy': { + /** 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. */ + readonly 'actions/delete-environment-secret': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + readonly repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + readonly environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + readonly secret_name: components['parameters']['secret-name'] + } + } + readonly responses: { + /** Default response */ + readonly 204: never + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + readonly 'enterprise-admin/list-provisioned-groups-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } readonly query: { - /** One of `asc` (ascending) or `desc` (descending). */ - readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** Used for pagination: the index of the first result to return. */ + readonly startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + readonly count?: components['parameters']['count'] + /** filter results */ + readonly filter?: string + /** attributes to exclude */ + readonly excludedAttributes?: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['team-discussion'][] + readonly 'application/json': components['schemas']['scim-group-list-enterprise'] } } } } /** - * **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/). + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - readonly 'teams/create-discussion-legacy': { + readonly 'enterprise-admin/provision-and-invite-enterprise-group': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } } readonly responses: { /** Response */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion'] + readonly 'application/json': components['schemas']['scim-enterprise-group'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The discussion post's title. */ - readonly title: string - /** @description The discussion post's body text. */ - readonly body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - readonly private?: boolean + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + readonly displayName: string + readonly members?: readonly { + /** @description The SCIM user ID for a user. */ + readonly value: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. - * - * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - readonly 'teams/get-discussion-legacy': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + readonly 'enterprise-admin/get-provisioning-information-for-enterprise-group': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + readonly scim_group_id: components['parameters']['scim-group-id'] + } + readonly query: { + /** Attributes to exclude. */ + readonly excludedAttributes?: string } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion'] + readonly 'application/json': components['schemas']['scim-enterprise-group'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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. */ - readonly 'teams/delete-discussion-legacy': { + readonly 'enterprise-admin/set-information-for-provisioned-enterprise-group': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + readonly scim_group_id: components['parameters']['scim-group-id'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + readonly displayName: string + readonly members?: readonly { + /** @description The SCIM user ID for a user. */ + readonly value: string + }[] + } + } + } + } + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + readonly 'enterprise-admin/delete-scim-group-from-enterprise': { + readonly parameters: { + readonly path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + readonly scim_group_id: components['parameters']['scim-group-id'] } } readonly responses: { @@ -38960,246 +38515,308 @@ export interface operations { } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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). */ - readonly 'teams/update-discussion-legacy': { + readonly 'enterprise-admin/update-attribute-for-enterprise-group': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + readonly scim_group_id: components['parameters']['scim-group-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion'] + readonly 'application/json': components['schemas']['scim-enterprise-group'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The discussion post's title. */ - readonly title?: string - /** @description The discussion post's body text. */ - readonly body?: string + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + readonly Operations: readonly { + /** @enum {string} */ + readonly op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + readonly path?: string + /** @description Can be any value - string, number, array or object. */ + readonly value?: 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 discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * **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 Enterprise Server. 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 Enterprise Server account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. * - * 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/). + * 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ - readonly 'teams/list-discussion-comments-legacy': { + readonly 'enterprise-admin/list-provisioned-identities-enterprise': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - } - readonly query: { - /** One of `asc` (ascending) or `desc` (descending). */ - readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + } + readonly query: { + /** Used for pagination: the index of the first result to return. */ + readonly startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + readonly count?: components['parameters']['count'] + /** filter results */ + readonly filter?: string } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['team-discussion-comment'][] + readonly 'application/json': components['schemas']['scim-user-list-enterprise'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * Provision enterprise membership for a user, and send organization invitation emails to the email address. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - readonly 'teams/create-discussion-comment-legacy': { + readonly 'enterprise-admin/provision-and-invite-enterprise-user': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] } } readonly responses: { /** Response */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion-comment'] + readonly 'application/json': components['schemas']['scim-enterprise-user'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The discussion comment's body text. */ - readonly body: string + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description The username for the user. */ + readonly userName: string + readonly name: { + /** @description The first name of the user. */ + readonly givenName: string + /** @description The last name of the user. */ + readonly familyName: string + } + /** @description List of user emails. */ + readonly emails: readonly { + /** @description The email address. */ + readonly value: string + /** @description The type of email address. */ + readonly type: string + /** @description Whether this email address is the primary address. */ + readonly primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + readonly groups?: readonly { + readonly value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - readonly 'teams/get-discussion-comment-legacy': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + readonly 'enterprise-admin/get-provisioning-information-for-enterprise-user': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - readonly comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + readonly scim_user_id: components['parameters']['scim-user-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion-comment'] + readonly 'application/json': components['schemas']['scim-enterprise-user'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). - */ - readonly 'teams/delete-discussion-comment-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - readonly comment_number: components['parameters']['comment-number'] - } - } - readonly responses: { - /** Response */ - readonly 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. + * 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`. * - * 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/). + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. */ - readonly 'teams/update-discussion-comment-legacy': { + readonly 'enterprise-admin/set-information-for-provisioned-enterprise-user': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - readonly comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + readonly scim_user_id: components['parameters']['scim-user-id'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-discussion-comment'] + readonly 'application/json': components['schemas']['scim-enterprise-user'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The discussion comment's body text. */ - readonly body: string + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description The username for the user. */ + readonly userName: string + readonly name: { + /** @description The first name of the user. */ + readonly givenName: string + /** @description The last name of the user. */ + readonly familyName: string + } + /** @description List of user emails. */ + readonly emails: readonly { + /** @description The email address. */ + readonly value: string + /** @description The type of email address. */ + readonly type: string + /** @description Whether this email address is the primary address. */ + readonly primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + readonly groups?: readonly { + readonly value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - readonly 'reactions/list-for-team-discussion-comment-legacy': { + /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ + readonly 'enterprise-admin/delete-user-from-enterprise': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - readonly comment_number: components['parameters']['comment-number'] - } - readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + readonly scim_user_id: components['parameters']['scim-user-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] - } - } + readonly 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 "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * **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`. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` */ - readonly 'reactions/create-for-team-discussion-comment-legacy': { + readonly 'enterprise-admin/update-attribute-for-enterprise-user': { readonly parameters: { readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - readonly comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + readonly enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + readonly scim_user_id: components['parameters']['scim-user-id'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reaction'] + readonly 'application/json': components['schemas']['scim-enterprise-user'] } } } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The SCIM schema URIs. */ + readonly schemas: readonly string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + readonly Operations: readonly { readonly [key: string]: 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 reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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` * - * 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/). + * 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. */ - readonly 'reactions/list-for-team-discussion-legacy': { + readonly 'search/code': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] - } readonly 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. */ - readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-code)" for a detailed list of qualifiers. */ + readonly q: string + /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -39208,57 +38825,94 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['reaction'][] + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['code-search-result-item'][] + } } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + readonly 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 new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * 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/enterprise-server@3.6/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` */ - readonly 'reactions/create-for-team-discussion-legacy': { + readonly 'search/commits': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly discussion_number: components['parameters']['discussion-number'] + readonly query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-commits)" for a detailed list of qualifiers. */ + readonly q: string + /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 201: { + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reaction'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['commit-search-result-item'][] + } } } + readonly 304: components['responses']['not_modified'] } } /** - * **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. + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * - * 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:** 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)." */ - readonly 'teams/list-pending-invitations-legacy': { + readonly 'search/issues-and-pull-requests': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - } readonly query: { - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-issues-and-pull-requests)" for a detailed list of qualifiers. */ + readonly 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/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -39267,32 +38921,43 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['organization-invitation'][] + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['issue-search-result-item'][] + } } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + readonly 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 new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Team members will include the members of child teams. + * 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/enterprise-server@3.6/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. */ - readonly 'teams/list-members-legacy': { + readonly 'search/labels': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - } readonly 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. - */ - readonly role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ + /** The id of the repository. */ + readonly 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/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + readonly q: string + /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -39301,312 +38966,455 @@ export interface operations { readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['simple-user'][] + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['label-search-result-item'][] + } } } + readonly 304: components['responses']['not_modified'] + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } } /** - * The "Get team member" endpoint (described below) is deprecated. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * To list members in a team, the team must be visible to the authenticated user. + * 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. */ - readonly 'teams/get-member-legacy': { + readonly 'search/repos': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] + readonly query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + readonly 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/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { - /** if user is a member */ - readonly 204: never - /** if user is not a member */ - readonly 404: unknown + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['repo-search-result-item'][] + } + } + } + readonly 304: components['responses']['not_modified'] + readonly 422: components['responses']['validation_failed'] + readonly 503: components['responses']['service_unavailable'] } } /** - * The "Add team member" endpoint (described below) is deprecated. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * 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: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * `q=ruby+is:featured` * - * 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)." + * 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. */ - readonly 'teams/add-member-legacy': { + readonly 'search/topics': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] + readonly query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + readonly q: string + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - readonly 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - readonly 422: unknown + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['topic-search-result-item'][] + } + } + } + readonly 304: components['responses']['not_modified'] } } /** - * The "Remove team member" endpoint (described below) is deprecated. + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * For example, if you're looking for a list of popular users, you might try this query: * - * 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. + * `q=tom+repos:%3E42+followers:%3E1000` * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 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. */ - readonly 'teams/remove-member-legacy': { + readonly 'search/users': { readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] + readonly query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-users)" for a detailed list of qualifiers. */ + readonly q: string + /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results) */ + readonly 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`. */ + readonly order?: components['parameters']['order'] + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ - readonly 204: never - /** Not Found if team synchronization is setup */ - readonly 404: unknown + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly total_count: number + readonly incomplete_results: boolean + readonly items: readonly components['schemas']['user-search-result-item'][] + } + } + } + readonly 304: components['responses']['not_modified'] + readonly 422: components['responses']['validation_failed'] + readonly 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 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. + * This endpoint allows you to check the status of the most recent configuration process: * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Note that you may need to wait several seconds after you start a process before you can check its status. * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. + * The different statuses are: * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | */ - readonly 'teams/get-membership-for-user-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] + readonly 'enterprise-admin/get-configuration-status': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['configuration-status'] + } } } + } + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + readonly 'enterprise-admin/start-configuration-process': { + readonly responses: { + /** Response */ + readonly 202: unknown + } + } + /** Check your installation's maintenance status: */ + readonly 'enterprise-admin/get-maintenance-status': { readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-membership'] + readonly 'application/json': components['schemas']['maintenance-status'] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly 'enterprise-admin/enable-or-disable-maintenance-mode': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['maintenance-status'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * @description A JSON string with the attributes `enabled` and `when`. + * + * The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + * + * The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + */ + readonly maintenance: string } } - readonly 404: components['responses']['not_found'] } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + readonly 'enterprise-admin/get-settings': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['enterprise-settings'] + } + } + } + } + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). * - * 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. + * **Notes:** * - * 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. + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." */ - readonly 'teams/add-or-update-membership-for-user-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] + readonly 'enterprise-admin/set-settings': { + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + readonly settings: string + } + } + } + } + readonly 'enterprise-admin/get-all-authorized-ssh-keys': { + readonly responses: { + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': readonly components['schemas']['ssh-key'][] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly 'enterprise-admin/add-authorized-ssh-key': { + readonly responses: { + /** Response */ + readonly 201: { + readonly content: { + readonly 'application/json': readonly components['schemas']['ssh-key'][] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + readonly authorized_key: string + } } } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + readonly 'enterprise-admin/remove-authorized-ssh-key': { readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['team-membership'] + readonly 'application/json': readonly components['schemas']['ssh-key'][] } } - /** Forbidden if team synchronization is set up */ - readonly 403: unknown - readonly 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - readonly 422: unknown } readonly requestBody: { readonly content: { - readonly 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - readonly role?: 'member' | 'maintainer' + readonly 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + readonly authorized_key: string } } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. * - * 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. + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - readonly 'teams/remove-membership-for-user-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly username: components['parameters']['username'] - } - } + readonly 'enterprise-admin/create-enterprise-server-license': { readonly responses: { /** Response */ - readonly 204: never - /** if team synchronization is set up */ - readonly 403: unknown + readonly 202: unknown + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The content of your _.ghl_ license file. */ + readonly license: string + /** @description You **must** provide a password _only if_ you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. */ + readonly password?: string + /** @description An optional JSON string containing the installation settings. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + readonly settings?: string + } + } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * This API upgrades your license and also triggers the configuration process. * - * Lists the organization projects for a team. + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - readonly 'teams/list-projects-legacy': { + readonly 'enterprise-admin/upgrade-license': { + readonly responses: { + /** Response */ + readonly 202: unknown + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The content of your new _.ghl_ license file. */ + readonly license?: string + } + } + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ + readonly 'teams/get-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] } - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } } readonly responses: { /** Response */ readonly 200: { - readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['team-project'][] + readonly 'application/json': components['schemas']['team-full'] } } readonly 404: components['responses']['not_found'] } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * 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. */ - readonly 'teams/check-permissions-for-project-legacy': { + readonly 'teams/delete-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] - readonly project_id: components['parameters']['project-id'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - readonly 404: unknown + readonly 204: never + readonly 404: components['responses']['not_found'] + readonly 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 [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) 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. + * 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`. */ - readonly 'teams/add-or-update-project-permissions-legacy': { + readonly 'teams/update-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] - readonly project_id: components['parameters']['project-id'] } } readonly responses: { + /** Response when the updated information already exists */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['team-full'] + } + } /** Response */ - readonly 204: never - /** Forbidden if the project is not owned by the organization */ - readonly 403: { + readonly 201: { readonly content: { - readonly 'application/json': { - readonly message?: string - readonly documentation_url?: string - } + readonly 'application/json': components['schemas']['team-full'] } } + readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description The name of the team. */ + readonly name: string + /** @description The description of the team. */ + readonly description?: string /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. * @enum {string} */ - readonly permission?: 'read' | 'write' | 'admin' + readonly privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + readonly permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + readonly parent_team_id?: number | null } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#list-discussions) 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. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'teams/remove-project-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly project_id: components['parameters']['project-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 404: components['responses']['not_found'] - readonly 415: components['responses']['preview_header_missing'] - readonly 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. */ - readonly 'teams/list-repos-legacy': { + readonly 'teams/list-discussions-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] } readonly query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -39617,441 +39425,355 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['minimal-repository'][] + readonly 'application/json': readonly components['schemas']['team-discussion'][] } } - readonly 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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. * - * **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. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'teams/check-permissions-for-repo-legacy': { + readonly 'teams/create-discussion-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] } } readonly responses: { - /** Alternative response with extra repository information */ - readonly 200: { + /** Response */ + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['team-repository'] + readonly 'application/json': components['schemas']['team-discussion'] } } - /** Response if repository is managed by this team */ - readonly 204: never - /** Not Found if repository is not managed by this team */ - readonly 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)." - */ - readonly 'teams/add-or-update-repo-permissions-legacy': { - readonly parameters: { - readonly path: { - readonly team_id: components['parameters']['team-id'] - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description The discussion post's title. */ + readonly title: string + /** @description The discussion post's body text. */ + readonly body: string /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false */ - readonly permission?: 'pull' | 'push' | 'admin' + readonly private?: boolean } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) 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. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'teams/remove-repo-legacy': { + readonly 'teams/get-discussion-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] - readonly owner: components['parameters']['owner'] - readonly repo: components['parameters']['repo'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } } readonly responses: { /** Response */ - readonly 204: never + readonly 200: { + readonly content: { + readonly '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 [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. * - * List IdP groups connected to a team on GitHub. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'teams/list-idp-groups-for-legacy': { + readonly 'teams/delete-discussion-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['group-mapping'] - } - } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 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 [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. * - * 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. + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'teams/create-or-update-idp-group-connections-legacy': { + readonly 'teams/update-discussion-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['group-mapping'] + readonly 'application/json': components['schemas']['team-discussion'] } } - readonly 403: components['responses']['forbidden'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - readonly groups: readonly { - /** @description ID of the IdP group. */ - readonly group_id: string - /** @description Name of the IdP group. */ - readonly group_name: string - /** @description Description of the IdP group. */ - readonly group_description: string - /** @example "caceab43fc9ffa20081c" */ - readonly id?: string - /** @example "external-team-6c13e7288ef7" */ - readonly name?: string - /** @example "moar cheese pleese" */ - readonly description?: string - }[] - /** @example "I am not a timestamp" */ - readonly synced_at?: string + /** @description The discussion post's title. */ + readonly title?: string + /** @description The discussion post's body text. */ + readonly body?: string } } } } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - readonly 'teams/list-child-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 [List discussion comments](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + readonly 'teams/list-discussion-comments-legacy': { readonly parameters: { readonly path: { + /** The unique identifier of the team. */ readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } readonly query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + readonly direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] } } readonly responses: { - /** if child teams exist */ + /** Response */ readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': readonly components['schemas']['team'][] + readonly 'application/json': readonly components['schemas']['team-discussion-comment'][] } } - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 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. + * **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - readonly 'users/get-authenticated': { - readonly parameters: {} - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } + readonly 'teams/create-discussion-comment-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 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. */ - readonly 'users/update-authenticated': { - readonly parameters: {} readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['private-user'] + readonly 'application/json': components['schemas']['team-discussion-comment'] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - readonly name?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - readonly email?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - readonly blog?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - readonly twitter_username?: string | null - /** - * @description The new company of the user. - * @example Acme corporation - */ - readonly company?: string - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - readonly location?: string - /** @description The new hiring availability of the user. */ - readonly hireable?: boolean - /** @description The new short biography of the user. */ - readonly bio?: string - } - } - } - } - /** List the users you've blocked on your personal account. */ - readonly 'users/list-blocked-by-authenticated-user': { - readonly parameters: {} - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['simple-user'][] + /** @description The discussion comment's body text. */ + readonly body: string } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 415: components['responses']['preview_header_missing'] } } - readonly 'users/check-blocked': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + readonly 'teams/get-discussion-comment-legacy': { readonly parameters: { readonly path: { - readonly username: components['parameters']['username'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + readonly comment_number: components['parameters']['comment-number'] } } readonly responses: { - /** If the user is blocked: */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - /** If the user is not blocked: */ - readonly 404: { + /** Response */ + readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': components['schemas']['team-discussion-comment'] } } } } - readonly 'users/block': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + readonly 'teams/delete-discussion-comment-legacy': { readonly parameters: { readonly path: { - readonly username: components['parameters']['username'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + readonly comment_number: components['parameters']['comment-number'] } } readonly responses: { /** Response */ readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] } } - readonly 'users/unblock': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + readonly 'teams/update-discussion-comment-legacy': { readonly parameters: { readonly path: { - readonly username: components['parameters']['username'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + readonly comment_number: components['parameters']['comment-number'] } } readonly responses: { /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The discussion comment's body text. */ + readonly body: string + } + } } } /** - * Lists the authenticated user's codespaces. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'codespaces/list-for-authenticated-user': { + readonly 'reactions/list-for-team-discussion-comment-legacy': { readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + readonly comment_number: components['parameters']['comment-number'] + } readonly query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion comment. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - readonly repository_id?: components['parameters']['repository-id-in-query'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly codespaces: readonly components['schemas']['codespace'][] - } + readonly 'application/json': readonly components['schemas']['reaction'][] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } /** - * Creates a new codespace, owned by the authenticated user. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ - readonly 'codespaces/create-for-authenticated-user': { + readonly 'reactions/create-for-team-discussion-comment-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + readonly comment_number: components['parameters']['comment-number'] + } + } readonly responses: { - /** Response when the codespace was successfully created */ + /** Response */ readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - readonly 202: { - readonly content: { - readonly 'application/json': components['schemas']['codespace'] + readonly 'application/json': components['schemas']['reaction'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] } readonly requestBody: { readonly content: { - readonly 'application/json': - | { - /** @description Repository id for this codespace */ - readonly repository_id: number - /** @description Git ref (typically a branch name) for this codespace */ - readonly ref?: string - /** @description Location for this codespace */ - readonly location: string - /** @description Machine type to use for this codespace */ - readonly machine?: string - /** @description Working directory for this codespace */ - readonly working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - readonly idle_timeout_minutes?: number - } - | { - /** @description Pull request number for this codespace */ - readonly pull_request: { - /** @description Pull request number */ - readonly pull_request_number: number - /** @description Repository id for this codespace */ - readonly repository_id: number - } - /** @description Location for this codespace */ - readonly location: string - /** @description Machine type to use for this codespace */ - readonly machine?: string - /** @description Working directory for this codespace */ - readonly working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - readonly idle_timeout_minutes?: number - } + readonly 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } } } } /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - readonly 'codespaces/list-secrets-for-authenticated-user': { + readonly 'reactions/list-for-team-discussion-legacy': { readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] + } readonly query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a team discussion. */ + readonly content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40062,491 +39784,545 @@ export interface operations { readonly 200: { readonly headers: {} readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly secrets: readonly components['schemas']['codespaces-secret'][] - } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - readonly 'codespaces/get-public-key-for-authenticated-user': { - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['codespaces-user-public-key'] + readonly 'application/json': readonly components['schemas']['reaction'][] } } } } /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ - readonly 'codespaces/get-secret-for-authenticated-user': { + readonly 'reactions/create-for-team-discussion-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + readonly discussion_number: components['parameters']['discussion-number'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 201: { readonly content: { - readonly 'application/json': components['schemas']['codespaces-secret'] + readonly 'application/json': components['schemas']['reaction'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + readonly content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * Team members will include the members of child teams. + */ + readonly 'teams/list-members-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + } + readonly query: { + /** Filters members returned by their role in the team. */ + readonly role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} + readonly content: { + readonly 'application/json': readonly components['schemas']['simple-user'][] + } + } + readonly 404: components['responses']['not_found'] + } + } + /** + * The "Get team member" endpoint (described below) is deprecated. * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. * - * #### Example encrypting a secret using Ruby + * To list members in a team, the team must be visible to the authenticated user. + */ + readonly 'teams/get-member-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] + } + } + readonly responses: { + /** if user is a member */ + readonly 204: never + /** if user is not a member */ + readonly 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * - * ```ruby - * require "rbnacl" - * require "base64" + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - readonly 'codespaces/create-or-update-secret-for-authenticated-user': { + readonly 'teams/add-member-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** Response after successfully creaing a secret */ - readonly 201: { - readonly content: { - readonly 'application/json': { readonly [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ + /** Response */ readonly 204: never - readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - readonly encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - readonly key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - readonly selected_repository_ids?: readonly string[] - } - } + readonly 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + readonly 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + readonly 422: unknown } } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - readonly 'codespaces/delete-secret-for-authenticated-user': { + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + readonly 'teams/remove-member-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ readonly 204: never + /** Not Found if team synchronization is setup */ + readonly 404: unknown } } /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ - readonly 'codespaces/list-repositories-for-secret-for-authenticated-user': { + readonly 'teams/get-membership-for-user-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly repositories: readonly components['schemas']['minimal-repository'][] - } + readonly 'application/json': components['schemas']['team-membership'] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. */ - readonly 'codespaces/set-repositories-for-secret-for-authenticated-user': { + readonly 'teams/add-or-update-membership-for-user-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** No Content when repositories were added to the selected list */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + readonly 403: unknown readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + readonly 422: unknown } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - readonly selected_repository_ids: readonly number[] + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + readonly role?: 'member' | 'maintainer' } } } } /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - readonly 'codespaces/add-repository-for-secret-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] - readonly repository_id: number - } - } - readonly responses: { - /** No Content when repository was added to the selected list */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ - readonly 'codespaces/remove-repository-for-secret-for-authenticated-user': { + readonly 'teams/remove-membership-for-user-legacy': { readonly parameters: { readonly path: { - /** secret_name parameter */ - readonly secret_name: components['parameters']['secret-name'] - readonly repository_id: number + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] } } readonly responses: { - /** No Content when repository was removed from the selected list */ + /** Response */ readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] + /** if team synchronization is set up */ + readonly 403: unknown } } /** - * Gets information about a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Lists the organization projects for a team. */ - readonly 'codespaces/get-for-authenticated-user': { + readonly 'teams/list-projects-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] } } readonly responses: { /** Response */ readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['codespace'] + readonly 'application/json': readonly components['schemas']['team-project'][] } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } /** - * Deletes a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. */ - readonly 'codespaces/delete-for-authenticated-user': { + readonly 'teams/check-permissions-for-project-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + readonly project_id: components['parameters']['project-id'] } } readonly responses: { - readonly 202: components['responses']['accepted'] - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] + /** Response */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + readonly 404: unknown } } /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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. */ - readonly 'codespaces/update-for-authenticated-user': { + readonly 'teams/add-or-update-project-permissions-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + readonly project_id: components['parameters']['project-id'] } } readonly responses: { /** Response */ - readonly 200: { + readonly 204: never + /** Forbidden if the project is not owned by the organization */ + readonly 403: { readonly content: { - readonly 'application/json': components['schemas']['codespace'] + readonly 'application/json': { + readonly message?: string + readonly documentation_url?: string + } } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] + readonly 422: components['responses']['validation_failed'] } readonly requestBody: { readonly content: { readonly 'application/json': { - /** @description A valid machine to transition this codespace to. */ - readonly machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - readonly recent_folders?: readonly string[] + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + readonly permission?: 'read' | 'write' | 'admin' } } } } /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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. */ - readonly 'codespaces/export-for-authenticated-user': { + readonly 'teams/remove-project-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + readonly project_id: components['parameters']['project-id'] } } readonly responses: { /** Response */ - readonly 202: { + readonly 204: never + readonly 404: components['responses']['not_found'] + readonly 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/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ + readonly 'teams/list-repos-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + } + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** Response */ + readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['codespace-export-details'] + readonly 'application/json': readonly components['schemas']['minimal-repository'][] } } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 422: components['responses']['validation_failed'] - readonly 500: components['responses']['internal_error'] } } /** - * Gets information about an export of a codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ - readonly 'codespaces/get-export-details-for-authenticated-user': { + readonly 'teams/check-permissions-for-repo-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - readonly export_id: components['parameters']['export-id'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { - /** Response */ + /** Alternative response with extra repository information */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['codespace-export-details'] + readonly 'application/json': components['schemas']['team-repository'] } } - readonly 404: components['responses']['not_found'] + /** Response if repository is managed by this team */ + readonly 204: never + /** Not Found if repository is not managed by this team */ + readonly 404: unknown } } /** - * List the machine types a codespace can transition to use. + * **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/enterprise-server@3.6/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. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - readonly 'codespaces/codespace-machines-for-authenticated-user': { + readonly 'teams/add-or-update-repo-permissions-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly total_count: number - readonly machines: readonly components['schemas']['codespace-machine'][] - } + readonly 204: never + readonly 403: components['responses']['forbidden'] + readonly 422: components['responses']['validation_failed'] + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + readonly permission?: 'pull' | 'push' | 'admin' } } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } /** - * Starts a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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. */ - readonly 'codespaces/start-for-authenticated-user': { + readonly 'teams/remove-repo-legacy': { readonly parameters: { readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + readonly repo: components['parameters']['repo'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['codespace'] - } + readonly 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 child teams`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ + readonly 'teams/list-child-legacy': { + readonly parameters: { + readonly path: { + /** The unique identifier of the team. */ + readonly team_id: components['parameters']['team-id'] } - readonly 304: components['responses']['not_modified'] - readonly 400: components['responses']['bad_request'] - readonly 401: components['responses']['requires_authentication'] - /** Payment required */ - readonly 402: { + readonly query: { + /** The number of results per page (max 100). */ + readonly per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + readonly page?: components['parameters']['page'] + } + } + readonly responses: { + /** if child teams exist */ + readonly 200: { + readonly headers: {} readonly content: { - readonly 'application/json': components['schemas']['basic-error'] + readonly 'application/json': readonly components['schemas']['team'][] } } readonly 403: components['responses']['forbidden'] readonly 404: components['responses']['not_found'] - readonly 409: components['responses']['conflict'] - readonly 500: components['responses']['internal_error'] + readonly 422: components['responses']['validation_failed'] } } /** - * Stops a user's codespace. + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. */ - readonly 'codespaces/stop-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The name of the codespace. */ - readonly codespace_name: components['parameters']['codespace-name'] - } - } + readonly 'users/get-authenticated': { + readonly parameters: {} readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['codespace'] + readonly 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] } } + readonly 304: components['responses']['not_modified'] readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - readonly 500: components['responses']['internal_error'] } } - /** Sets the visibility for your primary email addresses. */ - readonly 'users/set-primary-email-visibility-for-authenticated-user': { + /** **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. */ + readonly 'users/update-authenticated': { readonly parameters: {} readonly responses: { /** Response */ readonly 200: { readonly content: { - readonly 'application/json': readonly components['schemas']['email'][] + readonly 'application/json': components['schemas']['private-user'] } } readonly 304: components['responses']['not_modified'] @@ -40559,10 +40335,39 @@ export interface operations { readonly content: { readonly 'application/json': { /** - * @description Denotes whether an email is publicly visible. - * @enum {string} + * @description The new name of the user. + * @example Omar Jahandar + */ + readonly name?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + readonly email?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + readonly blog?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj */ - readonly visibility: 'public' | 'private' + readonly twitter_username?: string | null + /** + * @description The new company of the user. + * @example Acme corporation + */ + readonly company?: string + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + readonly location?: string + /** @description The new hiring availability of the user. */ + readonly hireable?: boolean + /** @description The new short biography of the user. */ + readonly bio?: string } } } @@ -40571,7 +40376,7 @@ export interface operations { readonly 'users/list-emails-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40650,7 +40455,7 @@ export interface operations { readonly 'users/list-followers-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40673,7 +40478,7 @@ export interface operations { readonly 'users/list-followed-by-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40695,6 +40500,7 @@ export interface operations { readonly 'users/check-person-is-followed-by-authenticated': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -40713,13 +40519,14 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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. */ readonly 'users/follow': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -40736,6 +40543,7 @@ export interface operations { readonly 'users/unfollow': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -40748,11 +40556,11 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/list-gpg-keys-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40772,7 +40580,7 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/create-gpg-key-for-authenticated-user': { readonly parameters: {} readonly responses: { @@ -40791,17 +40599,19 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/json': { + /** @description A descriptive name for the new key. */ + readonly name?: string /** @description A GPG key in ASCII-armored format. */ readonly armored_public_key: string } } } } - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/get-gpg-key-for-authenticated-user': { readonly parameters: { readonly path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ readonly gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40818,11 +40628,11 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/delete-gpg-key-for-authenticated-user': { readonly parameters: { readonly path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ readonly gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40839,7 +40649,7 @@ export interface operations { /** * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -40848,7 +40658,7 @@ export interface operations { readonly 'apps/list-installations-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40868,7 +40678,6 @@ export interface operations { readonly 304: components['responses']['not_modified'] readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] - readonly 415: components['responses']['preview_header_missing'] } } /** @@ -40876,18 +40685,18 @@ export interface operations { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ readonly 'apps/list-installation-repos-for-authenticated-user': { readonly parameters: { readonly path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ readonly installation_id: components['parameters']['installation-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -40913,13 +40722,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ readonly 'apps/add-repo-to-installation-for-authenticated-user': { readonly parameters: { readonly path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ readonly installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ readonly repository_id: components['parameters']['repository-id'] } } @@ -40934,13 +40744,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ readonly 'apps/remove-repo-from-installation-for-authenticated-user': { readonly parameters: { readonly path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ readonly installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ readonly repository_id: components['parameters']['repository-id'] } } @@ -40952,74 +40763,30 @@ export interface operations { readonly 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - readonly 'interactions/get-restrictions-for-authenticated-user': { - readonly responses: { - /** Default response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] | { readonly [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - readonly 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - readonly 'interactions/set-restrictions-for-authenticated-user': { - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['interaction-limit-response'] - } - } - readonly 422: components['responses']['validation_failed'] - } - readonly requestBody: { - readonly content: { - readonly 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - readonly 'interactions/remove-restrictions-for-authenticated-user': { - readonly responses: { - /** Response */ - readonly 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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ readonly 'issues/list-for-authenticated-user': { readonly parameters: { readonly query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ readonly filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ readonly state?: 'open' | 'closed' | 'all' /** A list of comma separated label names. Example: `bug,ui,@high` */ readonly labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ + /** What to sort results by. */ readonly sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly 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`. */ readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41037,11 +40804,11 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/list-public-ssh-keys-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41061,7 +40828,7 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/create-public-ssh-key-for-authenticated-user': { readonly parameters: {} readonly responses: { @@ -41091,11 +40858,11 @@ export interface operations { } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/get-public-ssh-key-for-authenticated-user': { readonly parameters: { readonly path: { - /** key_id parameter */ + /** The unique identifier of the key. */ readonly key_id: components['parameters']['key-id'] } } @@ -41112,11 +40879,11 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ readonly 'users/delete-public-ssh-key-for-authenticated-user': { readonly parameters: { readonly path: { - /** key_id parameter */ + /** The unique identifier of the key. */ readonly key_id: components['parameters']['key-id'] } } @@ -41129,57 +40896,12 @@ export interface operations { readonly 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/). */ - readonly 'apps/list-subscriptions-for-authenticated-user': { - readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['user-marketplace-purchase'][] - } - } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 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/). */ - readonly 'apps/list-subscriptions-for-authenticated-user-stubbed': { - readonly parameters: { - readonly query: { - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly headers: {} - readonly content: { - readonly 'application/json': readonly components['schemas']['user-marketplace-purchase'][] - } - } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - } - } readonly 'orgs/list-memberships-for-authenticated-user': { readonly parameters: { readonly 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. */ + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ readonly state?: 'active' | 'pending' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41202,6 +40924,7 @@ export interface operations { readonly 'orgs/get-membership-for-authenticated-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -41219,6 +40942,7 @@ export interface operations { readonly 'orgs/update-membership-for-authenticated-user': { readonly parameters: { readonly path: { + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } } @@ -41249,7 +40973,7 @@ export interface operations { readonly 'migrations/list-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41291,6 +41015,16 @@ export interface operations { * @example true */ readonly lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + readonly exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + readonly exclude_git_data?: boolean /** * @description Do not include attachments in the migration * @example true @@ -41306,6 +41040,12 @@ export interface operations { * @example true */ readonly exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + readonly org_metadata_only?: boolean /** * @description Exclude attributes from the API response to improve performance * @example [ @@ -41318,39 +41058,6 @@ export interface operations { } } } - /** - * 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). - */ - readonly 'migrations/get-status-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - } - readonly query: { - readonly exclude?: readonly string[] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['migration'] - } - } - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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: * @@ -41377,7 +41084,7 @@ export interface operations { readonly 'migrations/get-archive-for-authenticated-user': { readonly parameters: { readonly path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ readonly migration_id: components['parameters']['migration-id'] } } @@ -41389,51 +41096,15 @@ export interface operations { readonly 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. */ - readonly 'migrations/delete-archive-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. */ - readonly 'migrations/unlock-repo-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** migration_id parameter */ - readonly migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - readonly repo_name: components['parameters']['repo-name'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 304: components['responses']['not_modified'] - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } /** Lists all the repositories for this user migration. */ readonly 'migrations/list-repos-for-authenticated-user': { readonly parameters: { readonly path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ readonly migration_id: components['parameters']['migration-id'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41460,7 +41131,7 @@ export interface operations { readonly 'orgs/list-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41479,221 +41150,7 @@ export interface operations { readonly 403: components['responses']['forbidden'] } } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/list-packages-for-authenticated-user': { - readonly parameters: { - readonly query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - readonly visibility?: components['parameters']['package-visibility'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/get-package-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/delete-package-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/restore-package-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - } - readonly query: { - /** package token */ - readonly token?: string - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. - */ - readonly 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - } - readonly query: { - /** Page number of the results to fetch. */ - readonly page?: components['parameters']['page'] - /** Results per page (max 100) */ - readonly per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - readonly state?: 'active' | 'deleted' - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['package-version'][] - } - } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. - */ - readonly 'packages/get-package-version-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/delete-package-version-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/restore-package-version-for-authenticated-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ readonly 'projects/create-for-authenticated-user': { readonly parameters: {} readonly responses: { @@ -41706,7 +41163,6 @@ export interface operations { readonly 304: components['responses']['not_modified'] readonly 401: components['responses']['requires_authentication'] readonly 403: components['responses']['forbidden'] - readonly 415: components['responses']['preview_header_missing'] readonly 422: components['responses']['validation_failed_simple'] } readonly requestBody: { @@ -41726,11 +41182,11 @@ export interface operations { } } } - /** 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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ readonly 'users/list-public-emails-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41758,7 +41214,7 @@ export interface operations { readonly 'repos/list-for-authenticated-user': { readonly parameters: { readonly query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + /** Limit results to repositories with the specified visibility. */ readonly visibility?: 'all' | 'public' | 'private' /** * Comma-separated list of values. Can include: @@ -41767,17 +41223,13 @@ export interface operations { * \* `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. */ readonly affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ + /** Limit results to repositories of the specified type. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. */ readonly type?: 'all' | 'owner' | 'public' | 'private' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ readonly sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41805,7 +41257,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -41911,6 +41363,40 @@ export interface operations { * @example false */ readonly delete_branch_on_merge?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + readonly squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + readonly merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + readonly merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether downloads are enabled. * @default true @@ -41931,7 +41417,7 @@ export interface operations { readonly 'repos/list-invitations-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -41954,7 +41440,7 @@ export interface operations { readonly 'repos/decline-invitation-for-authenticated-user': { readonly parameters: { readonly path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ readonly invitation_id: components['parameters']['invitation-id'] } } @@ -41970,7 +41456,7 @@ export interface operations { readonly 'repos/accept-invitation-for-authenticated-user': { readonly parameters: { readonly path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ readonly invitation_id: components['parameters']['invitation-id'] } } @@ -41986,16 +41472,16 @@ export interface operations { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ readonly 'activity/list-repos-starred-by-authenticated-user': { readonly parameters: { readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ readonly sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42018,7 +41504,9 @@ export interface operations { readonly 'activity/check-repo-is-starred-by-authenticated-user': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -42036,11 +41524,13 @@ export interface operations { } } } - /** 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ readonly 'activity/star-repo-for-authenticated-user': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -42056,7 +41546,9 @@ export interface operations { readonly 'activity/unstar-repo-for-authenticated-user': { readonly parameters: { readonly path: { + /** The account owner of the repository. The name is not case sensitive. */ readonly owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ readonly repo: components['parameters']['repo'] } } @@ -42073,7 +41565,7 @@ export interface operations { readonly 'activity/list-watched-repos-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42092,11 +41584,11 @@ export interface operations { readonly 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ readonly 'teams/list-for-authenticated-user': { readonly parameters: { readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42116,16 +41608,16 @@ export interface operations { } } /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ readonly 'users/list': { readonly parameters: { readonly query: { /** A user ID. Only return users with an ID greater than this ID. */ readonly since?: components['parameters']['since-user'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] } } @@ -42145,15 +41637,16 @@ export interface operations { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ readonly 'users/get-by-username': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -42171,10 +41664,11 @@ export interface operations { readonly 'activity/list-events-for-authenticated-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42193,11 +41687,13 @@ export interface operations { readonly 'activity/list-org-events-for-authenticated-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ readonly org: components['parameters']['org'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42215,10 +41711,11 @@ export interface operations { readonly 'activity/list-public-events-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42237,10 +41734,11 @@ export interface operations { readonly 'users/list-followers-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42260,10 +41758,11 @@ export interface operations { readonly 'users/list-following-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42282,6 +41781,7 @@ export interface operations { readonly 'users/check-following-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] readonly target_user: string } @@ -42297,12 +41797,13 @@ export interface operations { readonly 'gists/list-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly 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`. */ readonly since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42323,10 +41824,11 @@ export interface operations { readonly 'users/list-gpg-keys-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42355,6 +41857,7 @@ export interface operations { readonly 'users/get-context-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { @@ -42378,11 +41881,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ readonly 'apps/get-user-installation': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } @@ -42399,10 +41903,11 @@ export interface operations { readonly 'users/list-public-keys-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42421,15 +41926,16 @@ export interface operations { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ readonly 'orgs/list-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42445,240 +41951,16 @@ export interface operations { } } } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/list-packages-for-user': { - readonly parameters: { - readonly query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - readonly visibility?: components['parameters']['package-visibility'] - } - readonly path: { - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['package'][] - } - } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/get-package-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly 'packages/delete-package-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly 'packages/restore-package-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - } - readonly query: { - /** package token */ - readonly token?: string - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - readonly 'packages/get-all-package-versions-for-package-owned-by-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': readonly components['schemas']['package-version'][] - } - } - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 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. - */ - readonly 'packages/get-package-version-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - readonly 'packages/delete-package-version-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - readonly 'packages/restore-package-version-for-user': { - readonly parameters: { - readonly path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - readonly package_type: components['parameters']['package-type'] - /** The name of the package. */ - readonly package_name: components['parameters']['package-name'] - readonly username: components['parameters']['username'] - /** Unique identifier of the package version. */ - readonly package_version_id: components['parameters']['package-version-id'] - } - } - readonly responses: { - /** Response */ - readonly 204: never - readonly 401: components['responses']['requires_authentication'] - readonly 403: components['responses']['forbidden'] - readonly 404: components['responses']['not_found'] - } - } readonly 'projects/list-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ readonly state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42699,10 +41981,11 @@ export interface operations { readonly 'activity/list-received-events-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42720,10 +42003,11 @@ export interface operations { readonly 'activity/list-received-public-events-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42742,16 +42026,17 @@ export interface operations { readonly 'repos/list-for-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Can be one of `all`, `owner`, `member`. */ + /** Limit results to repositories of the specified type. */ readonly type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ readonly sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ readonly direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42767,88 +42052,49 @@ export interface operations { } } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - readonly 'billing/get-github-actions-billing-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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + readonly 'enterprise-admin/promote-user-to-be-site-administrator': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['actions-billing-usage'] - } - } + readonly 204: never } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - readonly 'billing/get-github-packages-billing-user': { + /** You can demote any user account except your own. */ + readonly 'enterprise-admin/demote-site-administrator': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } } readonly responses: { /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - readonly 'billing/get-shared-storage-billing-user': { - readonly parameters: { - readonly path: { - readonly username: components['parameters']['username'] - } - } - readonly responses: { - /** Response */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['combined-billing-usage'] - } - } + readonly 204: never } } /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ readonly 'activity/list-repos-starred-by-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ readonly sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ readonly direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42868,10 +42114,11 @@ export interface operations { readonly 'activity/list-repos-watched-by-user': { readonly parameters: { readonly path: { + /** The handle for the GitHub user account. */ readonly username: components['parameters']['username'] } readonly query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ readonly per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ readonly page?: components['parameters']['page'] @@ -42887,6 +42134,54 @@ export interface operations { } } } + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + readonly 'enterprise-admin/suspend-user': { + readonly parameters: { + readonly path: { + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The reason the user is being suspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + readonly reason?: string + } | null + } + } + } + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + readonly 'enterprise-admin/unsuspend-user': { + readonly parameters: { + readonly path: { + /** The handle for the GitHub user account. */ + readonly username: components['parameters']['username'] + } + } + readonly responses: { + /** Response */ + readonly 204: never + } + readonly requestBody: { + readonly content: { + readonly 'application/json': { + /** @description The reason the user is being unsuspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + readonly reason?: string + } | null + } + } + } /** Get a random sentence from the Zen of GitHub */ readonly 'meta/get-zen': { readonly responses: { diff --git a/test/v3/expected/github.support-array-length.ts b/test/v3/expected/github.support-array-length.ts index fedcae22f..2b6af61bf 100644 --- a/test/v3/expected/github.support-array-length.ts +++ b/test/v3/expected/github.support-array-length.ts @@ -8,29 +8,146 @@ export interface paths { /** Get Hypermedia links to resources accessible in GitHub's REST API */ get: operations['meta/root'] } + '/admin/hooks': { + get: operations['enterprise-admin/list-global-webhooks'] + post: operations['enterprise-admin/create-global-webhook'] + } + '/admin/hooks/{hook_id}': { + get: operations['enterprise-admin/get-global-webhook'] + delete: operations['enterprise-admin/delete-global-webhook'] + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + patch: operations['enterprise-admin/update-global-webhook'] + } + '/admin/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + post: operations['enterprise-admin/ping-global-webhook'] + } + '/admin/keys': { + get: operations['enterprise-admin/list-public-keys'] + } + '/admin/keys/{key_ids}': { + delete: operations['enterprise-admin/delete-public-key'] + } + '/admin/ldap/teams/{team_id}/mapping': { + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + patch: operations['enterprise-admin/update-ldap-mapping-for-team'] + } + '/admin/ldap/teams/{team_id}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-team'] + } + '/admin/ldap/users/{username}/mapping': { + patch: operations['enterprise-admin/update-ldap-mapping-for-user'] + } + '/admin/ldap/users/{username}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-user'] + } + '/admin/organizations': { + post: operations['enterprise-admin/create-org'] + } + '/admin/organizations/{org}': { + patch: operations['enterprise-admin/update-org-name'] + } + '/admin/pre-receive-environments': { + get: operations['enterprise-admin/list-pre-receive-environments'] + post: operations['enterprise-admin/create-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}': { + get: operations['enterprise-admin/get-pre-receive-environment'] + /** + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ + */ + delete: operations['enterprise-admin/delete-pre-receive-environment'] + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + patch: operations['enterprise-admin/update-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + post: operations['enterprise-admin/start-pre-receive-environment-download'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + get: operations['enterprise-admin/get-download-status-for-pre-receive-environment'] + } + '/admin/pre-receive-hooks': { + get: operations['enterprise-admin/list-pre-receive-hooks'] + post: operations['enterprise-admin/create-pre-receive-hook'] + } + '/admin/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook'] + delete: operations['enterprise-admin/delete-pre-receive-hook'] + patch: operations['enterprise-admin/update-pre-receive-hook'] + } + '/admin/tokens': { + /** Lists personal access tokens for all users, including admin users. */ + get: operations['enterprise-admin/list-personal-access-tokens'] + } + '/admin/tokens/{token_id}': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + delete: operations['enterprise-admin/delete-personal-access-token'] + } + '/admin/users': { + /** + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. + * + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. + */ + post: operations['enterprise-admin/create-user'] + } + '/admin/users/{username}': { + /** + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. + * + * You can delete any user account except your own. + */ + delete: operations['enterprise-admin/delete-user'] + patch: operations['enterprise-admin/update-username-for-user'] + } + '/admin/users/{username}/authorizations': { + post: operations['enterprise-admin/create-impersonation-o-auth-token'] + delete: operations['enterprise-admin/delete-impersonation-o-auth-token'] + } '/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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`. */ + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] } @@ -38,7 +155,7 @@ export interface paths { /** * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/list-webhook-deliveries'] } @@ -46,7 +163,7 @@ export interface paths { /** * Returns a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-webhook-delivery'] } @@ -54,13 +171,13 @@ export interface paths { /** * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ post: operations['apps/redeliver-webhook-delivery'] } '/app/installations': { /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. */ @@ -70,13 +187,13 @@ export interface paths { /** * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ delete: operations['apps/delete-installation'] } @@ -84,37 +201,37 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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 Enterprise Server 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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"]`. + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). */ @@ -122,44 +239,44 @@ export interface paths { } '/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. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). */ delete: operations['apps/delete-authorization'] } '/applications/{client_id}/token': { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + /** 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/enterprise-server@3.6/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. */ + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ patch: operations['apps/reset-token'] } '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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'] } '/apps/{app_slug}': { /** * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ @@ -167,39 +284,39 @@ export interface paths { } '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * You can only send one of these scope keys at a time. */ @@ -212,9 +329,75 @@ export interface paths { get: operations['codes-of-conduct/get-conduct-code'] } '/emojis': { - /** Lists all the emojis available to use on GitHub. */ + /** Lists all the emojis available to use on GitHub Enterprise Server. */ get: operations['emojis/get'] } + '/enterprise/announcement': { + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + get: operations['enterprise-admin/get-announcement'] + /** Removes the global announcement banner in your enterprise. */ + delete: operations['enterprise-admin/remove-announcement'] + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + patch: operations['enterprise-admin/set-announcement'] + } + '/enterprise/settings/license': { + get: operations['enterprise-admin/get-license-information'] + } + '/enterprise/stats/all': { + get: operations['enterprise-admin/get-all-stats'] + } + '/enterprise/stats/comments': { + get: operations['enterprise-admin/get-comment-stats'] + } + '/enterprise/stats/gists': { + get: operations['enterprise-admin/get-gist-stats'] + } + '/enterprise/stats/hooks': { + get: operations['enterprise-admin/get-hooks-stats'] + } + '/enterprise/stats/issues': { + get: operations['enterprise-admin/get-issue-stats'] + } + '/enterprise/stats/milestones': { + get: operations['enterprise-admin/get-milestone-stats'] + } + '/enterprise/stats/orgs': { + get: operations['enterprise-admin/get-org-stats'] + } + '/enterprise/stats/pages': { + get: operations['enterprise-admin/get-pages-stats'] + } + '/enterprise/stats/pulls': { + get: operations['enterprise-admin/get-pull-request-stats'] + } + '/enterprise/stats/repos': { + get: operations['enterprise-admin/get-repo-stats'] + } + '/enterprise/stats/users': { + get: operations['enterprise-admin/get-user-stats'] + } + '/enterprises/{enterprise}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-enterprise'] + } + '/enterprises/{enterprise}/actions/cache/usage-policy': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy-for-enterprise'] + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + patch: operations['actions/set-actions-cache-usage-policy-for-enterprise'] + } '/enterprises/{enterprise}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. @@ -271,6 +454,25 @@ export interface paths { */ put: operations['enterprise-admin/set-allowed-actions-enterprise'] } + '/enterprises/{enterprise}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-enterprise'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-enterprise'] + } '/enterprises/{enterprise}/actions/runner-groups': { /** * Lists all self-hosted runner groups for an enterprise. @@ -472,46 +674,19 @@ export interface paths { '/enterprises/{enterprise}/secret-scanning/alerts': { /** * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ get: operations['secret-scanning/list-alerts-for-enterprise'] } - '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-actions-billing-ghe'] - } '/enterprises/{enterprise}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - get: operations['billing/get-github-advanced-security-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-packages-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * The authenticated user must be an enterprise admin. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['billing/get-shared-storage-billing-ghe'] + get: operations['billing/get-github-advanced-security-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. */ @@ -519,17 +694,17 @@ export interface paths { } '/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: + * GitHub Enterprise Server 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) + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server. * - * **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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ get: operations['activity/get-feeds'] } @@ -547,7 +722,7 @@ export interface paths { /** * 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. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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'] } @@ -558,7 +733,7 @@ export interface paths { '/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. */ + /** Allows you to update a gist's description and to update, delete, or 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': { @@ -575,12 +750,11 @@ export interface paths { } '/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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ put: operations['gists/star'] delete: operations['gists/unstar'] } @@ -588,13 +762,13 @@ export interface paths { 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). */ + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/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. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ get: operations['gitignore/get-template'] } @@ -602,7 +776,7 @@ export interface paths { /** * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ get: operations['apps/list-repos-accessible-to-installation'] } @@ -610,9 +784,9 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ delete: operations['apps/revoke-installation-access-token'] } @@ -626,7 +800,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list'] } @@ -643,60 +817,7 @@ export interface paths { /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ post: operations['markdown/render-raw'] } - '/marketplace_listing/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account'] - } - '/marketplace_listing/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans'] - } - '/marketplace_listing/plans/{plan_id}/accounts': { - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan'] - } - '/marketplace_listing/stubbed/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - '/marketplace_listing/stubbed/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans-stubbed'] - } - '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan-stubbed'] - } '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ get: operations['meta/get'] } '/networks/{owner}/{repo}/events': { @@ -705,16 +826,18 @@ export interface paths { '/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`. */ + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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}': { + /** Gets information about a notification thread. */ get: operations['activity/get-thread'] + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ 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). + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/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. */ @@ -724,10 +847,10 @@ export interface paths { * * 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. + * 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/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ delete: operations['activity/delete-thread-subscription'] } '/octocat': { @@ -736,9 +859,9 @@ export interface paths { } '/organizations': { /** - * Lists all organizations, in the order that they were created on GitHub. + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * **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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ get: operations['orgs/list'] } @@ -747,32 +870,43 @@ export interface paths { * List the custom repository roles available in this organization. In order to see custom * repository roles in an organization, the authenticated user must be an organization owner. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - get: operations['orgs/list-custom-roles'] - } - '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + get: operations['orgs/list-custom-roles'] } '/orgs/{org}': { /** * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server 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). + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-org'] + } + '/orgs/{org}/actions/cache/usage-by-repository': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-by-repo-for-org'] + } '/orgs/{org}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. @@ -838,14 +972,16 @@ export interface paths { '/orgs/{org}/actions/permissions/workflow': { /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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-default-workflow-permissions-organization'] /** * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ @@ -853,10 +989,7 @@ export interface paths { } '/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'] @@ -871,26 +1004,17 @@ export interface paths { } '/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'] @@ -905,70 +1029,43 @@ export interface paths { */ 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. + * 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. + * 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'] @@ -1171,58 +1268,37 @@ export interface paths { '/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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': { /** - * 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)." + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ get: operations['orgs/get-audit-log'] } - '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - get: operations['orgs/list-blocked-users'] - } - '/orgs/{org}/blocks/{username}': { - get: operations['orgs/check-blocked-user'] - put: operations['orgs/block-user'] - delete: operations['orgs/unblock-user'] - } '/orgs/{org}/code-scanning/alerts': { /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * * GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/list-alerts-for-org'] } - '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations['orgs/list-saml-sso-authorizations'] - } - '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations['orgs/remove-saml-sso-authorization'] - } '/orgs/{org}/dependabot/secrets': { /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-org-secrets'] @@ -1318,13 +1394,13 @@ export interface paths { '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/set-selected-repos-for-org-secret'] } '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ delete: operations['dependabot/remove-selected-repo-from-org-secret'] } '/orgs/{org}/events': { @@ -1334,22 +1410,18 @@ export interface paths { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/external-idp-group-info-for-org'] } '/orgs/{org}/external-groups': { /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/list-external-idp-groups-for-org'] } - '/orgs/{org}/failed_invitations': { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations['orgs/list-failed-invitations'] - } '/orgs/{org}/hooks': { get: operations['orgs/list-webhooks'] /** Here's how you can create a hook that posts payloads in JSON format: */ @@ -1389,14 +1461,14 @@ export interface paths { post: operations['orgs/redeliver-webhook-delivery'] } '/orgs/{org}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-org-installation'] } @@ -1404,36 +1476,6 @@ export interface paths { /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ get: operations['orgs/list-app-installations'] } - '/orgs/{org}/interaction-limits': { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-org'] - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations['interactions/set-restrictions-for-org'] - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations['interactions/remove-restrictions-for-org'] - } - '/orgs/{org}/invitations': { - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['orgs/create-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}': { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations['orgs/cancel-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}/teams': { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations['orgs/list-invitation-teams'] - } '/orgs/{org}/issues': { /** * List issues in an organization assigned to the authenticated user. @@ -1441,7 +1483,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-org'] } @@ -1461,7 +1503,7 @@ export interface paths { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -1496,114 +1538,31 @@ export interface paths { */ get: operations['migrations/get-status-for-org'] } - '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations['migrations/delete-archive-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations['migrations/unlock-repo-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - get: operations['migrations/list-repos-for-org'] - } '/orgs/{org}/outside_collaborators': { /** List all users who are outside collaborators of an organization. */ get: operations['orgs/list-outside-collaborators'] } '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ put: operations['orgs/convert-member-to-outside-collaborator'] /** Removing a user from this list will remove them from all the organization's repositories. */ delete: operations['orgs/remove-outside-collaborator'] } - '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-organization'] - } - '/orgs/{org}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-org'] } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-org'] + /** Removes any overrides for this hook at the org level for this org. */ + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-org'] + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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': { @@ -1615,7 +1574,7 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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'] @@ -1628,7 +1587,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -1639,56 +1598,23 @@ export interface paths { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ get: operations['secret-scanning/list-alerts-for-org'] } - '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-actions-billing-org'] - } '/orgs/{org}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - get: operations['billing/get-github-advanced-security-billing-org'] - } - '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-packages-billing-org'] - } - '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-shared-storage-billing-org'] - } - '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. * - * 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 total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['teams/list-idp-groups-for-org'] + get: operations['billing/get-github-advanced-security-billing-org'] } '/orgs/{org}/teams': { /** Lists all teams in an organization that are visible to the authenticated user. */ @@ -1702,7 +1628,7 @@ export interface paths { } '/orgs/{org}/teams/{team_slug}': { /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ @@ -1724,15 +1650,15 @@ export interface paths { } '/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -1740,19 +1666,19 @@ export interface paths { } '/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/). + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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}`. */ @@ -1760,15 +1686,15 @@ export interface paths { } '/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -1776,19 +1702,19 @@ export interface paths { } '/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/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ @@ -1796,13 +1722,13 @@ export interface paths { } '/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ get: operations['reactions/list-for-team-discussion-comment-in-org'] /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -1812,19 +1738,19 @@ export interface paths { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ get: operations['reactions/list-for-team-discussion-in-org'] /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -1834,32 +1760,30 @@ export interface paths { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['reactions/delete-for-team-discussion'] } '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ delete: operations['teams/unlink-external-idp-group-from-team-for-org'] /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ patch: operations['teams/link-external-idp-group-to-team-for-org'] } - '/orgs/{org}/teams/{team_slug}/invitations': { - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations['teams/list-pending-invitations-in-org'] - } '/orgs/{org}/teams/{team_slug}/members': { /** * Team members will include the members of child teams. @@ -1879,7 +1803,7 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ get: operations['teams/get-membership-for-user-in-org'] /** @@ -1887,7 +1811,7 @@ export interface paths { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -1901,7 +1825,7 @@ export interface paths { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -1947,7 +1871,7 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -1955,7 +1879,7 @@ export interface paths { */ 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)." + * 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/enterprise-server@3.6/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}`. * @@ -1969,24 +1893,6 @@ export interface paths { */ delete: operations['teams/remove-repo-in-org'] } - '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } '/orgs/{org}/teams/{team_slug}/teams': { /** * Lists the child teams of the team specified by `{team_slug}`. @@ -2049,14 +1955,6 @@ export interface paths { */ get: operations['rate-limit/get'] } - '/reactions/{reaction_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations['reactions/delete-legacy'] - } '/repos/{owner}/{repo}': { /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ get: operations['repos/get'] @@ -2067,7 +1965,7 @@ export interface paths { * 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ patch: operations['repos/update'] } '/repos/{owner}/{repo}/actions/artifacts': { @@ -2089,6 +1987,28 @@ export interface paths { */ get: operations['actions/download-artifact'] } + '/repos/{owner}/{repo}/actions/cache/usage': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage'] + } + '/repos/{owner}/{repo}/actions/cache/usage-policy': { + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy'] + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + patch: operations['actions/set-actions-cache-usage-policy'] + } '/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'] @@ -2102,12 +2022,15 @@ export interface paths { */ get: operations['actions/download-job-logs-for-workflow-run'] } + '/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun': { + /** Re-run a job and its dependent jobs in 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. */ + post: operations['actions/re-run-job-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. + * 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'] /** @@ -2119,6 +2042,24 @@ export interface paths { */ put: operations['actions/set-github-actions-permissions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/access': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations['actions/get-workflow-access-to-repository'] + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations['actions/set-workflow-access-to-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)." @@ -2137,6 +2078,24 @@ export interface paths { */ put: operations['actions/set-allowed-actions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-repository'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-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'] @@ -2242,7 +2201,7 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/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. */ @@ -2262,14 +2221,6 @@ export interface paths { /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/get-reviews-for-run'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - post: operations['actions/approve-workflow-run'] - } '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/list-workflow-run-artifacts'] @@ -2284,7 +2235,7 @@ export interface paths { get: operations['actions/get-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { @@ -2301,7 +2252,7 @@ export interface paths { 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { @@ -2325,7 +2276,7 @@ export interface paths { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ post: operations['actions/review-pending-deployments-for-run'] } @@ -2333,13 +2284,9 @@ export interface paths { /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ post: operations['actions/re-run-workflow'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-run-usage'] + '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations['actions/re-run-workflow-failed-jobs'] } '/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. */ @@ -2469,20 +2416,12 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). * * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. */ get: operations['actions/list-workflow-runs'] } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-usage'] - } '/repos/{owner}/{repo}/assignees': { /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ get: operations['issues/list-assignees'] @@ -2521,12 +2460,6 @@ export interface paths { */ delete: operations['repos/delete-autolink'] } - '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - delete: operations['repos/disable-automated-security-fixes'] - } '/repos/{owner}/{repo}/branches': { get: operations['repos/list-branches'] } @@ -2757,7 +2690,7 @@ export interface paths { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -2803,7 +2736,7 @@ export interface paths { } '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ @@ -2813,12 +2746,12 @@ export interface paths { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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}': { @@ -2839,7 +2772,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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. */ @@ -2847,16 +2780,16 @@ export interface paths { } '/repos/{owner}/{repo}/code-scanning/alerts': { /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ get: operations['code-scanning/list-alerts-for-repo'] } @@ -2949,8 +2882,7 @@ export interface paths { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -3021,33 +2953,20 @@ export interface paths { /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/get-sarif'] } - '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-in-repository-for-authenticated-user'] + '/repos/{owner}/{repo}/codeowners/errors': { /** - * Creates a codespace owned by the authenticated user in the specified repository. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/repo-machines-for-authenticated-user'] + get: operations['repos/codeowners-errors'] } '/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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. * @@ -3069,17 +2988,23 @@ export interface paths { */ get: operations['repos/check-collaborator'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} * ``` * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). * - * 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). + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. * * **Rate limits** * @@ -3094,7 +3019,7 @@ export interface paths { } '/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/). + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). * * Comments are ordered by ascending ID. */ @@ -3106,16 +3031,16 @@ export interface paths { 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). */ + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ post: operations['reactions/create-for-commit-comment'] } '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + * Delete a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ delete: operations['reactions/delete-for-commit-comment'] } @@ -3166,12 +3091,12 @@ export interface paths { /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['repos/create-commit-comment'] } '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ get: operations['repos/list-pull-requests-associated-with-commit'] } '/repos/{owner}/{repo}/commits/{ref}': { @@ -3180,9 +3105,9 @@ export interface paths { * * **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. + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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. + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/enterprise-server@3.6/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** * @@ -3252,28 +3177,11 @@ export interface paths { */ get: operations['repos/list-commit-statuses-for-ref'] } - '/repos/{owner}/{repo}/community/profile': { - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations['repos/get-community-profile-metrics'] - } '/repos/{owner}/{repo}/compare/{basehead}': { /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * The response 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/enterprise-server@3.6/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. * @@ -3319,16 +3227,21 @@ export interface paths { * 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 + * Files and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/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 + * type](https://docs.github.com/enterprise-server@3.6/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). + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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. + * API](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -3350,7 +3263,11 @@ export interface paths { * 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. */ + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ put: operations['repos/create-or-update-file-contents'] /** * Deletes a file in a repository. @@ -3360,6 +3277,8 @@ export interface paths { * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ delete: operations['repos/delete-file'] } @@ -3463,13 +3382,17 @@ export interface paths { /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ delete: operations['dependabot/delete-repo-secret'] } + '/repos/{owner}/{repo}/dependency-graph/compare/{basehead}': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations['dependency-graph/diff-range'] + } '/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 + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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 @@ -3481,7 +3404,7 @@ export interface paths { * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will * return a failure response. * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. @@ -3525,7 +3448,7 @@ export interface paths { * * 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)." + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ delete: operations['repos/delete-deployment'] } @@ -3545,7 +3468,7 @@ export interface paths { } '/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)." + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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. * @@ -3560,28 +3483,68 @@ export interface paths { } '/repos/{owner}/{repo}/environments': { /** - * Get all environments for a repository. + * Lists the 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. */ + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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 name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." * * **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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository 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}/environments/{environment_name}/deployment-branch-policies': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies'] + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations['repos/create-deployment-branch-policy'] + } + '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}': { + /** + * Gets a deployment branch policy for an environment. + * + * 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-deployment-branch-policy'] + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations['repos/update-deployment-branch-policy'] + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations['repos/delete-deployment-branch-policy'] + } '/repos/{owner}/{repo}/events': { get: operations['activity/list-repo-events'] } @@ -3590,7 +3553,7 @@ export interface paths { /** * Create a fork for the authenticated user. * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ post: operations['repos/create-fork'] } @@ -3616,7 +3579,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3651,7 +3614,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3681,7 +3644,7 @@ export interface paths { * * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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`. */ @@ -3691,7 +3654,7 @@ export interface paths { /** * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". */ get: operations['git/get-ref'] } @@ -3705,7 +3668,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. * * **Signature verification object** * @@ -3775,7 +3738,9 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. */ post: operations['git/create-tree'] } @@ -3784,10 +3749,14 @@ export interface paths { * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ get: operations['git/get-tree'] } '/repos/{owner}/{repo}/hooks': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ get: operations['repos/list-webhooks'] /** * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can @@ -3829,7 +3798,7 @@ export interface paths { post: operations['repos/redeliver-webhook-delivery'] } '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ post: operations['repos/ping-webhook'] } '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { @@ -3840,90 +3809,14 @@ export interface paths { */ post: operations['repos/test-push-webhook'] } - '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - delete: operations['migrations/cancel-import'] - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - patch: operations['migrations/update-import'] - } - '/repos/{owner}/{repo}/import/authors': { - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations['migrations/get-commit-authors'] - } - '/repos/{owner}/{repo}/import/authors/{author_id}': { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations['migrations/map-commit-author'] - } - '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - get: operations['migrations/get-large-files'] - } - '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - patch: operations['migrations/set-lfs-preference'] - } '/repos/{owner}/{repo}/installation': { /** * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] @@ -3939,13 +3832,13 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-repo'] /** * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create'] } @@ -3959,16 +3852,16 @@ export interface paths { 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). */ + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ post: operations['reactions/create-for-issue-comment'] } '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * Delete a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ delete: operations['reactions/delete-for-issue-comment'] } @@ -3980,17 +3873,17 @@ export interface paths { } '/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 + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/get'] /** Issue owners and users with push access can edit an issue. */ @@ -4005,7 +3898,7 @@ export interface paths { '/repos/{owner}/{repo}/issues/{issue_number}/comments': { /** Issue Comments are ordered by ascending ID. */ get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create-comment'] } '/repos/{owner}/{repo}/issues/{issue_number}/events': { @@ -4026,23 +3919,23 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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). */ + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ post: operations['reactions/create-for-issue'] } '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ delete: operations['reactions/delete-for-issue'] } @@ -4080,7 +3973,7 @@ export interface paths { /** * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ get: operations['licenses/get-for-repo'] } @@ -4104,17 +3997,18 @@ export interface paths { get: operations['issues/list-labels-for-milestone'] } '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ + /** Lists all notifications for the current user in the specified repository. */ 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`. */ + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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). */ + /** Updates information for a GitHub Enterprise Server 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)." */ + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ post: operations['repos/create-pages-site'] + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ delete: operations['repos/delete-pages-site'] } '/repos/{owner}/{repo}/pages/builds': { @@ -4132,20 +4026,25 @@ export interface paths { '/repos/{owner}/{repo}/pages/builds/{build_id}': { get: operations['repos/get-pages-build'] } - '/repos/{owner}/{repo}/pages/health': { + '/repos/{owner}/{repo}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-repo'] + } + '/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-repo'] /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * Deletes any overridden enforcement on this repository for the specified hook. * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + * Responds with effective values inherited from owner and/or global level. */ - get: operations['repos/get-pages-health-check'] + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-repo'] + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-repo'] } '/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. */ + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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': { @@ -4156,9 +4055,7 @@ export interface paths { * * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ post: operations['pulls/create'] } @@ -4175,16 +4072,16 @@ export interface paths { 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). */ + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ post: operations['reactions/create-for-pull-request-review-comment'] } '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ delete: operations['reactions/delete-for-pull-request-comment'] } @@ -4194,9 +4091,9 @@ export interface paths { * * 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)". + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Server 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: * @@ -4204,7 +4101,7 @@ export interface paths { * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ get: operations['pulls/get'] /** @@ -4214,25 +4111,17 @@ export interface paths { */ patch: operations['pulls/update'] } - '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-pr-for-authenticated-user'] - } '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ get: operations['pulls/list-review-comments'] /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * 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/enterprise-server@3.6/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. + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-review-comment'] } @@ -4240,12 +4129,12 @@ export interface paths { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-reply-for-review-comment'] } '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ get: operations['pulls/list-commits'] } '/repos/{owner}/{repo}/pulls/{pull_number}/files': { @@ -4254,12 +4143,13 @@ export interface paths { } '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ put: operations['pulls/merge'] } '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/request-reviewers'] delete: operations['pulls/remove-requested-reviewers'] } @@ -4267,11 +4157,11 @@ export interface paths { /** The list of reviews returns in chronological order. */ get: operations['pulls/list-reviews'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." * - * **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. + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. */ @@ -4288,10 +4178,11 @@ export interface paths { 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. */ + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ post: operations['pulls/submit-review'] } '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { @@ -4302,7 +4193,7 @@ export interface paths { /** * 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. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme'] } @@ -4310,13 +4201,13 @@ export interface paths { /** * Gets the README from a repository directory. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme-in-directory'] } '/repos/{owner}/{repo}/releases': { /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * 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/enterprise-server@3.6/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. */ @@ -4324,19 +4215,19 @@ export interface paths { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-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. */ + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ get: operations['repos/get-release-asset'] delete: operations['repos/delete-release-asset'] /** Users with push access to the repository can edit a release asset. */ patch: operations['repos/update-release-asset'] } '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ post: operations['repos/generate-release-notes'] } '/repos/{owner}/{repo}/releases/latest': { @@ -4352,7 +4243,7 @@ export interface paths { 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). */ + /** **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/enterprise-server@3.6/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'] @@ -4362,8 +4253,8 @@ export interface paths { '/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. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * @@ -4371,25 +4262,41 @@ export interface paths { * * `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, + * GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, * you'll still need to pass your authentication to be able to upload an asset. * * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. * * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ post: operations['repos/upload-release-asset'] } '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + get: operations['reactions/list-for-release'] + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ post: operations['reactions/create-for-release'] } + '/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + delete: operations['reactions/delete-for-release'] + } + '/repos/{owner}/{repo}/replicas/caches': { + /** Lists the status of each repository cache replica. */ + get: operations['repos/list-cache-info'] + } '/repos/{owner}/{repo}/secret-scanning/alerts': { /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4397,13 +4304,17 @@ export interface paths { } '/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. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` 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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -4411,7 +4322,9 @@ export interface paths { } '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4421,7 +4334,7 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-stargazers-for-repo'] } @@ -4478,14 +4391,34 @@ export interface paths { } '/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. */ + /** 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/enterprise-server@3.6/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). */ + /** 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/enterprise-server@3.6/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}/tags/protection': { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations['repos/list-tag-protection'] + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations['repos/create-tag-protection'] + } + '/repos/{owner}/{repo}/tags/protection/{tag_protection_id}': { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations['repos/delete-tag-protection'] + } '/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 @@ -4502,50 +4435,27 @@ export interface paths { get: operations['repos/get-all-topics'] put: operations['repos/replace-all-topics'] } - '/repos/{owner}/{repo}/traffic/clones': { - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-clones'] - } - '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations['repos/get-top-paths'] - } - '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - get: operations['repos/get-top-referrers'] - } - '/repos/{owner}/{repo}/traffic/views': { - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-views'] - } '/repos/{owner}/{repo}/transfer': { /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ post: operations['repos/transfer'] } - '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - delete: operations['repos/disable-vulnerability-alerts'] - } '/repos/{owner}/{repo}/zipball/{ref}': { /** * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ 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`. + * 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. If the repository is not public, 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/enterprise-server@3.6/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: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -4558,7 +4468,7 @@ export interface paths { * * Note: * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ get: operations['repos/list-public'] } @@ -4688,20 +4598,20 @@ export interface paths { * * 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 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 Enterprise Server. 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: + * 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 Enterprise Server 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 is granted access by the IdP and is not a member of the GitHub Enterprise Server 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. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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. + * 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ get: operations['enterprise-admin/list-provisioned-identities-enterprise'] /** @@ -4750,65 +4660,11 @@ export interface paths { */ 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). + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4829,10 +4685,10 @@ export interface paths { } '/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). + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * metadata](https://docs.github.com/enterprise-server@3.6/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: * @@ -4842,10 +4698,10 @@ export interface paths { } '/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). + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. * @@ -4859,9 +4715,9 @@ export interface paths { } '/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). + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4873,9 +4729,9 @@ export interface paths { } '/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). + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4887,9 +4743,9 @@ export interface paths { } '/search/topics': { /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * 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/enterprise-server@3.6/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: * @@ -4901,9 +4757,9 @@ export interface paths { } '/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). + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * * For example, if you're looking for a list of popular users, you might try this query: * @@ -4913,11 +4769,85 @@ export interface paths { */ get: operations['search/users'] } + '/setup/api/configcheck': { + /** + * This endpoint allows you to check the status of the most recent configuration process: + * + * Note that you may need to wait several seconds after you start a process before you can check its status. + * + * The different statuses are: + * + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | + */ + get: operations['enterprise-admin/get-configuration-status'] + } + '/setup/api/configure': { + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + post: operations['enterprise-admin/start-configuration-process'] + } + '/setup/api/maintenance': { + /** Check your installation's maintenance status: */ + get: operations['enterprise-admin/get-maintenance-status'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/enable-or-disable-maintenance-mode'] + } + '/setup/api/settings': { + /** + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). + * + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + get: operations['enterprise-admin/get-settings'] + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + * + * **Notes:** + * + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + */ + put: operations['enterprise-admin/set-settings'] + } + '/setup/api/settings/authorized-keys': { + get: operations['enterprise-admin/get-all-authorized-ssh-keys'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/add-authorized-ssh-key'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + delete: operations['enterprise-admin/remove-authorized-ssh-key'] + } + '/setup/api/start': { + /** + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. + * + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. + * + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: + * + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/create-enterprise-server-license'] + } + '/setup/api/upgrade': { + /** + * This API upgrades your license and also triggers the configuration process. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/upgrade-license'] + } '/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * * To delete a team, the authenticated user must be an organization owner or team maintainer. * @@ -4925,7 +4855,7 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) endpoint. * * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * @@ -4935,115 +4865,107 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-legacy'] } '/teams/{team_id}/discussions/{discussion_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * **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/enterprise-server@3.6/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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * **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/enterprise-server@3.6/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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ post: operations['reactions/create-for-team-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/reactions': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ post: operations['reactions/create-for-team-discussion-legacy'] } - '/teams/{team_id}/invitations': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - get: operations['teams/list-pending-invitations-legacy'] - } '/teams/{team_id}/members': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * * Team members will include the members of child teams. */ @@ -5053,7 +4975,7 @@ export interface paths { /** * 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. + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5061,33 +4983,33 @@ export interface paths { /** * 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. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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. + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-member-legacy'] } '/teams/{team_id}/memberships/{username}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. * * Team members will include the members of child teams. * @@ -5096,17 +5018,17 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. * @@ -5114,19 +5036,19 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-membership-for-user-legacy'] } '/teams/{team_id}/projects': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * * Lists the organization projects for a team. */ @@ -5134,72 +5056,54 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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: + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. */ delete: operations['teams/remove-repo-legacy'] } - '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } '/teams/{team_id}/teams': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ get: operations['teams/list-child-legacy'] } '/user': { @@ -5212,218 +5116,6 @@ export interface paths { /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ patch: operations['users/update-authenticated'] } - '/user/blocks': { - /** List the users you've blocked on your personal account. */ - get: operations['users/list-blocked-by-authenticated-user'] - } - '/user/blocks/{username}': { - get: operations['users/check-blocked'] - put: operations['users/block'] - delete: operations['users/unblock'] - } - '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-for-authenticated-user'] - } - '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-secrets-for-authenticated-user'] - } - '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - get: operations['codespaces/get-public-key-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - patch: operations['codespaces/update-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/export-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-export-details-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/start-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/stop-for-authenticated-user'] - } - '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } '/user/emails': { /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-emails-for-authenticated-user'] @@ -5443,7 +5135,7 @@ export interface paths { '/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)." + * 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/enterprise-server@3.6/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. */ @@ -5452,22 +5144,22 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-gpg-key-for-authenticated-user'] } '/user/gpg_keys/{gpg_key_id}': { - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-gpg-key-for-authenticated-user'] } '/user/installations': { /** * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -5481,7 +5173,7 @@ export interface paths { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5491,24 +5183,16 @@ export interface paths { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ put: operations['apps/add-repo-to-installation-for-authenticated-user'] /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] } - '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - get: operations['interactions/get-restrictions-for-authenticated-user'] - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } '/user/issues': { /** * List issues across owned and member repositories assigned to the authenticated user. @@ -5516,30 +5200,22 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-public-ssh-key-for-authenticated-user'] } '/user/keys/{key_id}': { - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-public-ssh-key-for-authenticated-user'] } - '/user/marketplace_purchases': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user'] - } - '/user/marketplace_purchases/stubbed': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } '/user/memberships/orgs': { get: operations['orgs/list-memberships-for-authenticated-user'] } @@ -5553,19 +5229,6 @@ export interface paths { /** 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: @@ -5591,12 +5254,6 @@ export interface paths { * 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. */ @@ -5612,85 +5269,12 @@ export interface paths { */ get: operations['orgs/list-for-authenticated-user'] } - '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}': { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-version-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-version-for-authenticated-user'] - } '/user/projects': { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. 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-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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-public-emails-for-authenticated-user'] } '/user/repos': { @@ -5705,7 +5289,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -5724,13 +5308,13 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 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)." */ + /** 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/enterprise-server@3.6/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'] } @@ -5739,14 +5323,14 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/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. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ get: operations['users/list'] } @@ -5754,11 +5338,11 @@ export interface paths { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ get: operations['users/get-by-username'] } @@ -5809,7 +5393,7 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-user-installation'] } @@ -5821,90 +5405,10 @@ export interface paths { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ get: operations['orgs/list-for-user'] } - '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-user'] - } '/users/{username}/projects': { get: operations['projects/list-for-user'] } @@ -5919,41 +5423,17 @@ export interface paths { /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ get: operations['repos/list-for-user'] } - '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-actions-billing-user'] - } - '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-packages-billing-user'] - } - '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-shared-storage-billing-user'] + '/users/{username}/site_admin': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['enterprise-admin/promote-user-to-be-site-administrator'] + /** You can demote any user account except your own. */ + delete: operations['enterprise-admin/demote-site-administrator'] } '/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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-repos-starred-by-user'] } @@ -5961,6 +5441,18 @@ export interface paths { /** Lists repositories a user is watching. */ get: operations['activity/list-repos-watched-by-user'] } + '/users/{username}/suspended': { + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['enterprise-admin/suspend-user'] + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + delete: operations['enterprise-admin/unsuspend-user'] + } '/zen': { /** Get a random sentence from the Zen of GitHub */ get: operations['meta/get-zen'] @@ -5969,13 +5461,142 @@ export interface paths { export interface components { schemas: { + root: { + /** Format: uri-template */ + current_user_url: string + /** Format: uri-template */ + current_user_authorizations_html_url: string + /** Format: uri-template */ + authorizations_url: string + /** Format: uri-template */ + code_search_url: string + /** Format: uri-template */ + commit_search_url: string + /** Format: uri-template */ + emails_url: string + /** Format: uri-template */ + emojis_url: string + /** Format: uri-template */ + events_url: string + /** Format: uri-template */ + feeds_url: string + /** Format: uri-template */ + followers_url: string + /** Format: uri-template */ + following_url: string + /** Format: uri-template */ + gists_url: string + /** Format: uri-template */ + hub_url: string + /** Format: uri-template */ + issue_search_url: string + /** Format: uri-template */ + issues_url: string + /** Format: uri-template */ + keys_url: string + /** Format: uri-template */ + label_search_url: string + /** Format: uri-template */ + notifications_url: string + /** Format: uri-template */ + organization_url: string + /** Format: uri-template */ + organization_repositories_url: string + /** Format: uri-template */ + organization_teams_url: string + /** Format: uri-template */ + public_gists_url: string + /** Format: uri-template */ + rate_limit_url: string + /** Format: uri-template */ + repository_url: string + /** Format: uri-template */ + repository_search_url: string + /** Format: uri-template */ + current_user_repositories_url: string + /** Format: uri-template */ + starred_url: string + /** Format: uri-template */ + starred_gists_url: string + /** Format: uri-template */ + topic_search_url?: string + /** Format: uri-template */ + user_url: string + /** Format: uri-template */ + user_organizations_url: string + /** Format: uri-template */ + user_repositories_url: string + /** Format: uri-template */ + user_search_url: string + } + 'global-hook': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + secret?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'global-hook-2': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'public-key-full': { + id: number + key: string + user_id: number | null + repository_id: number | null + url: string + title: string + read_only: boolean + verified: boolean + /** Format: date-time */ + created_at: string + } & { + last_used: unknown + } + 'ldap-mapping-team': { + ldap_dn?: string + 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?: unknown | null + } /** - * Simple User - * @description Simple User + * Ldap Private User + * @description Ldap Private User */ - 'nullable-simple-user': { - name?: string | null - email?: string | null + 'ldap-mapping-user': { + ldap_dn?: string /** @example octocat */ login: string /** @example 1 */ @@ -6035,304 +5656,384 @@ export interface components { /** @example User */ type: string site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - } | null + /** @example monalisa octocat */ + name: string | null + /** @example GitHub */ + company: string | null + /** @example https://github.com/blog */ + blog: string | null + /** @example San Francisco */ + location: string | null + /** + * Format: email + * @example octocat@github.com + */ + email: string | null + hireable: boolean | null + /** @example There once was... */ + bio: string | null + /** @example monalisa */ + twitter_username?: string | null + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string + /** @example 81 */ + private_gists: number + /** @example 100 */ + total_private_repos: number + /** @example 100 */ + owned_private_repos: number + /** @example 10000 */ + disk_usage: number + /** @example 8 */ + collaborators: number + /** @example true */ + two_factor_authentication: boolean + plan?: { + collaborators: number + name: string + space: number + private_repos: number + } + /** Format: date-time */ + suspended_at?: string | null + business_plus?: boolean + } /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + * Organization Simple + * @description Organization Simple */ - integration: { + 'organization-simple': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** - * @description Unique identifier of the GitHub app - * @example 37 + * Format: uri + * @example https://api.github.com/orgs/github */ - id: number + url: string /** - * @description The slug name of the GitHub app - * @example probot-owners + * Format: uri + * @example https://api.github.com/orgs/github/repos */ - slug?: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] + repos_url: string /** - * @description The name of the GitHub app - * @example Probot Owners + * Format: uri + * @example https://api.github.com/orgs/github/events */ - name: string - /** @example The description of the app. */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ description: string | null + } + 'pre-receive-environment': { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + 'pre-receive-environment-download-status': { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + 'pre-receive-hook': { + id?: number + name?: string + enforcement?: string + script?: string + script_repository?: { + id?: number + full_name?: string + url?: string + html_url?: string + } + environment?: { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + allow_downstream_configuration?: boolean + } + /** + * Simple User + * @description Simple User + */ + 'nullable-simple-user': { + name?: string | null + email?: string | null + /** @example octocat */ + login: string + /** @example 1 */ + id: number + /** @example MDQ6VXNlcjE= */ + node_id: string /** * Format: uri - * @example https://example.com + * @example https://github.com/images/error/octocat_happy.gif */ - external_url: string + avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null /** * Format: uri - * @example https://github.com/apps/super-ci + * @example https://api.github.com/users/octocat + */ + url: string + /** + * Format: uri + * @example https://github.com/octocat */ html_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/followers */ - created_at: string + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions */ - updated_at: string + subscriptions_url: string /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } + * Format: uri + * @example https://api.github.com/users/octocat/orgs */ - permissions: { - issues?: string - checks?: string - metadata?: string - contents?: string - deployments?: string - } & { [key: string]: string } + organizations_url: string /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] + * Format: uri + * @example https://api.github.com/users/octocat/repos */ - events: string[] + repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string /** - * @description The number of installations associated with the GitHub app - * @example 5 + * Format: uri + * @example https://api.github.com/users/octocat/received_events */ - installations_count?: number - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - } - /** - * Basic Error - * @description Basic Error - */ - 'basic-error': { - message?: string - documentation_url?: string - url?: string - status?: string - } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - 'validation-error-simple': { - message: string - documentation_url: string - errors?: string[] - } - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - 'webhook-config-url': string - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - 'webhook-config-content-type': string - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - 'webhook-config-secret': string - 'webhook-config-insecure-ssl': string | number - /** - * Webhook Configuration - * @description 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'] - } + received_events_url: string + /** @example User */ + type: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + } | null /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } */ - 'hook-delivery-item': { + 'app-permissions': { /** - * @description Unique identifier of the webhook delivery. - * @example 42 + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} */ - id: number + actions?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} */ - guid: string + administration?: 'read' | 'write' /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token for checks on code. + * @enum {string} */ - delivered_at: string + checks?: 'read' | 'write' /** - * @description Whether the webhook delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} */ - redelivery: boolean + contents?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} */ - duration: number + deployments?: 'read' | 'write' /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} */ - status: string + environments?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} */ - status_code: number + issues?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} */ - event: string + metadata?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} */ - action: string | null + packages?: 'read' | 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} */ - installation_id: number | null + pages?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} */ - repository_id: number | null - } - /** - * Scim Error - * @description Scim Error - */ - 'scim-error': { - message?: string | null - documentation_url?: string | null - detail?: string | null - status?: number - scimType?: string | null - schemas?: string[] - } - /** - * Validation Error - * @description 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) - }[] - } - /** - * Webhook delivery - * @description Delivery made by a webhook. - */ - 'hook-delivery': { + pull_requests?: 'read' | 'write' /** - * @description Unique identifier of the delivery. - * @example 42 + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} */ - id: number + repository_hooks?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} */ - guid: string + repository_projects?: 'read' | 'write' | 'admin' /** - * Format: date-time - * @description Time when the delivery was delivered. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} */ - delivered_at: string + secret_scanning_alerts?: 'read' | 'write' /** - * @description Whether the delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} */ - redelivery: boolean + secrets?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} */ - duration: number + security_events?: 'read' | 'write' /** - * @description Description of the status of the attempted delivery - * @example failed to connect + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} */ - status: string + single_file?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} */ - status_code: number + statuses?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} */ - event: string + vulnerability_alerts?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} */ - action: string | null + workflows?: 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} */ - installation_id: number | null + members?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} */ - repository_id: number | null + organization_administration?: 'read' | 'write' /** - * @description The URL target of the delivery. - * @example https://www.example.com + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} */ - url?: string - request: { - /** @description The request headers sent with the webhook delivery. */ - headers: { [key: string]: unknown } | null - /** @description The webhook payload. */ - payload: { [key: string]: unknown } | null - } - response: { - /** @description The response headers received when the delivery was made. */ - headers: { [key: string]: unknown } | null - /** @description The response payload received. */ - payload: string | null - } + organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: 'read' | 'write' } /** * Simple User @@ -6403,217 +6104,409 @@ export interface components { /** @example "2020-07-09T00:17:55Z" */ starred_at?: string } - /** - * Enterprise - * @description An enterprise account - */ - enterprise: { - /** @description A short description of the enterprise. */ - description?: string | null + /** Scoped Installation */ + 'nullable-scoped-installation': { + permissions: components['schemas']['app-permissions'] /** - * Format: uri - * @example https://github.com/enterprises/octo-business + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} */ - html_url: string + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** @example true */ + has_multiple_single_files?: boolean + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] /** * Format: uri - * @description The enterprise's website URL. + * @example https://api.github.com/users/octocat/repos */ - website_url?: string | null + repositories_url: string + account: components['schemas']['simple-user'] + } | null + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number + /** Format: uri */ + url: string + /** @description 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 + /** Format: uri */ + url: string + } + note: string | null + /** Format: uri */ + note_url: string | null + /** Format: date-time */ + updated_at: string + /** Format: date-time */ + created_at: string + fingerprint: string | null + user?: components['schemas']['nullable-simple-user'] + installation?: components['schemas']['nullable-scoped-installation'] + /** Format: date-time */ + expires_at: string | null + } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { /** - * @description Unique identifier of the enterprise - * @example 42 + * @description Unique identifier of the GitHub app + * @example 37 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** @example MDExOkludGVncmF0aW9uMQ== */ node_id: string + owner: components['schemas']['nullable-simple-user'] /** - * @description The name of the enterprise. - * @example Octo Business + * @description The name of the GitHub app + * @example Probot Owners */ name: string + /** @example The description of the app. */ + description: string | null /** - * @description The slug url identifier for the enterprise. - * @example octo-business + * Format: uri + * @example https://example.com */ - slug: string + external_url: string /** - * Format: date-time - * @example 2019-01-26T19:01:12Z + * Format: uri + * @example https://github.com/apps/super-ci */ - created_at: string | null + html_url: string /** * Format: date-time - * @example 2019-01-26T19:14:43Z + * @example 2017-07-08T16:18:44-04:00 */ - updated_at: string | null - /** Format: uri */ - avatar_url: string - } - /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } - */ - 'app-permissions': { + created_at: string /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 */ - actions?: 'read' | 'write' + updated_at: string /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } */ - administration?: 'read' | 'write' + permissions: { + issues?: string + checks?: string + metadata?: string + contents?: string + deployments?: string + } & { [key: string]: string } /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] */ - checks?: 'read' | 'write' + events: string[] /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description The number of installations associated with the GitHub app + * @example 5 */ - contents?: 'read' | 'write' + installations_count?: number + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + } + /** + * Basic Error + * @description Basic Error + */ + 'basic-error': { + message?: string + documentation_url?: string + url?: string + status?: string + } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + 'validation-error-simple': { + message: string + documentation_url: string + errors?: string[] + } + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + 'webhook-config-url': string + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + 'webhook-config-content-type': string + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + 'webhook-config-secret': string + 'webhook-config-insecure-ssl': string | number + /** + * Webhook Configuration + * @description 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'] + } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + 'hook-delivery-item': { /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the webhook delivery. + * @example 42 */ - deployments?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - environments?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z */ - issues?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the webhook delivery is a redelivery. + * @example false */ - metadata?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - packages?: 'read' | 'write' + duration: number /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} + * @description Describes the response returned after attempting the delivery. + * @example failed to connect */ - pages?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - pull_requests?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - repository_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - repository_projects?: 'read' | 'write' | 'admin' + action: string | null /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - secret_scanning_alerts?: 'read' | 'write' + installation_id: number | null /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - secrets?: 'read' | 'write' + repository_id: number | null + } + /** + * Scim Error + * @description Scim Error + */ + 'scim-error': { + message?: string | null + documentation_url?: string | null + detail?: string | null + status?: number + scimType?: string | null + schemas?: string[] + } + /** + * Validation Error + * @description 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) + }[] + } + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + 'hook-delivery': { /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the delivery. + * @example 42 */ - security_events?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - single_file?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z */ - statuses?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the delivery is a redelivery. + * @example false */ - vulnerability_alerts?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - workflows?: 'write' + duration: number /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} + * @description Description of the status of the attempted delivery + * @example failed to connect */ - members?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - organization_administration?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - organization_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - organization_plan?: 'read' + action: string | null /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - organization_projects?: 'read' | 'write' | 'admin' + installation_id: number | null /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - organization_packages?: 'read' | 'write' + repository_id: number | null /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The URL target of the delivery. + * @example https://www.example.com */ - organization_secrets?: 'read' | 'write' + url?: string + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null + } + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null + /** @description The response payload received. */ + payload: string | null + } + } + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://github.com/enterprises/octo-business */ - organization_self_hosted_runners?: 'read' | 'write' + html_url: string /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @description The enterprise's website URL. */ - organization_user_blocking?: 'read' | 'write' + website_url?: string | null /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the enterprise + * @example 42 */ - team_discussions?: 'read' | 'write' - } - /** - * Installation + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null + /** Format: uri */ + avatar_url: string + } + /** + * Installation * @description Installation */ installation: { @@ -6882,7 +6775,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -7061,6 +6957,41 @@ export interface components { allow_auto_merge?: boolean delete_branch_on_merge?: boolean allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' allow_merge_commit?: boolean subscribers_count?: number network_count?: number @@ -7084,6 +7015,52 @@ export interface components { * @example false */ delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether to allow merge commits for pull requests. * @default true @@ -7092,6 +7069,11 @@ export interface components { allow_merge_commit?: boolean /** @description Whether to allow forking this repo */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -7099,6 +7081,8 @@ export interface components { master_branch?: string /** @example "2020-07-09T00:17:42Z" */ starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean } /** * Installation Token @@ -7159,64 +7143,6 @@ export interface components { scopes: string[] user?: components['schemas']['nullable-simple-user'] } - /** Scoped Installation */ - 'nullable-scoped-installation': { - permissions: components['schemas']['app-permissions'] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** @example true */ - has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repositories_url: string - account: components['schemas']['simple-user'] - } | null - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - authorization: { - id: number - /** Format: uri */ - url: string - /** @description 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 - /** Format: uri */ - url: string - } - note: string | null - /** Format: uri */ - note_url: string | null - /** Format: date-time */ - updated_at: string - /** Format: date-time */ - created_at: string - fingerprint: string | null - user?: components['schemas']['nullable-simple-user'] - installation?: components['schemas']['nullable-scoped-installation'] - /** Format: date-time */ - expires_at: string | null - } /** * Code Of Conduct * @description Code Of Conduct @@ -7286,12 +7212,137 @@ export interface components { html_url: string | null } /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @description The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + * @example Very **important** announcement about _nothing_. + */ + 'announcement-message': string + /** + * Format: date-time + * @description The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + * @example "2021-01-01T00:00:00.000-07:00" + */ + 'announcement-expiration': string | null + /** + * Enterprise Announcement + * @description Enterprise global announcement + */ + announcement: { + announcement: components['schemas']['announcement-message'] + expires_at?: components['schemas']['announcement-expiration'] + } + 'license-info': { + seats?: string | number + seats_used?: number + seats_available?: string | number + kind?: string + days_until_expiration?: number + expire_at?: string + } + /** Repository Enterprise Stats */ + 'enterprise-repository-overview': { + total_repos: number + root_repos: number + fork_repos: number + org_repos: number + total_pushes: number + total_wikis: number + } + /** Hooks Enterprise Stats */ + 'enterprise-hook-overview': { + total_hooks: number + active_hooks: number + inactive_hooks: number + } + /** Enterprise Pages Stats */ + 'enterprise-page-overview': { + total_pages: number + } + /** Enterprise Organization Stats */ + 'enterprise-organization-overview': { + total_orgs: number + disabled_orgs: number + total_teams: number + total_team_members: number + } + /** Enterprise User Stats */ + 'enterprise-user-overview': { + total_users: number + admin_users: number + suspended_users: number + } + /** Enterprise Pull Request Stats */ + 'enterprise-pull-request-overview': { + total_pulls: number + merged_pulls: number + mergeable_pulls: number + unmergeable_pulls: number + } + /** Enterprise Issue Stats */ + 'enterprise-issue-overview': { + total_issues: number + open_issues: number + closed_issues: number + } + /** Enterprise Milestone Stats */ + 'enterprise-milestone-overview': { + total_milestones: number + open_milestones: number + closed_milestones: number + } + /** Enterprise Gist Stats */ + 'enterprise-gist-overview': { + total_gists: number + private_gists: number + public_gists: number + } + /** Enterprise Comment Stats */ + 'enterprise-comment-overview': { + total_commit_comments: number + total_gist_comments: number + total_issue_comments: number + total_pull_request_comments: number + } + 'enterprise-overview': { + repos?: components['schemas']['enterprise-repository-overview'] + hooks?: components['schemas']['enterprise-hook-overview'] + pages?: components['schemas']['enterprise-page-overview'] + orgs?: components['schemas']['enterprise-organization-overview'] + users?: components['schemas']['enterprise-user-overview'] + pulls?: components['schemas']['enterprise-pull-request-overview'] + issues?: components['schemas']['enterprise-issue-overview'] + milestones?: components['schemas']['enterprise-milestone-overview'] + gists?: components['schemas']['enterprise-gist-overview'] + comments?: components['schemas']['enterprise-comment-overview'] + } + 'actions-cache-usage-org-enterprise': { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number + } + /** + * Actions cache usage policy for an enterprise + * @description GitHub Actions cache usage policy for an enterprise. + */ + 'actions-cache-usage-policy-enterprise': { + /** + * @description For repositories in an enterprise, the default size limit for the sum of all caches in a repository, in gigabytes. + * @example 10 + */ + repo_cache_size_limit_in_gb?: number + /** + * @description For repositories in an enterprise, the maximum value that can be set as the limit for the sum of all caches in a repository, in gigabytes. + * @example 15 + */ + max_repo_cache_size_limit_in_gb?: number + } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-organizations': 'all' | 'none' | 'selected' /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @description The permissions policy that controls the actions that are allowed to run. * @enum {string} */ 'allowed-actions': 'all' | 'local_only' | 'selected' @@ -7304,52 +7355,26 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * Organization Simple - * @description Organization Simple - */ - 'organization-simple': { - /** @example github */ - login: string - /** @example 1 */ - id: number - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** @example A great organization */ - description: string | null - } 'selected-actions': { /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed?: boolean - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed?: boolean + github_owned_allowed: boolean /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed?: string[] + patterns_allowed: string[] + } + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + 'actions-can-approve-pull-request-reviews': boolean + 'actions-get-default-workflow-permissions': { + default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + } + 'actions-set-default-workflow-permissions': { + default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] } 'runner-groups-enterprise': { id: number @@ -7359,6 +7384,18 @@ export interface components { selected_organizations_url?: string runners_url: string allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Self hosted runner label @@ -7513,6 +7550,11 @@ export interface components { * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ 'alert-created-at': string + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'nullable-alert-updated-at': string | null /** * Format: uri * @description The REST API URL of the alert resource. @@ -7524,780 +7566,393 @@ export interface components { */ 'alert-html-url': string /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. * @enum {string} */ 'secret-scanning-alert-state': 'open' | 'resolved' /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null /** - * Repository - * @description A git repository + * Simple Repository + * @description Simple Repository */ - 'nullable-repository': { + 'simple-repository': { /** - * @description Unique identifier of the repository - * @example 42 + * @description A unique identifier of the repository. + * @example 1296269 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ node_id: string /** * @description The name of the repository. - * @example Team Environment + * @example Hello-World */ name: string - /** @example octocat/Hello-World */ - full_name: string - license: components['schemas']['nullable-license-simple'] - organization?: components['schemas']['nullable-simple-user'] - forks: number - permissions?: { - admin: boolean - pull: boolean - triage?: boolean - push: boolean - maintain?: boolean - } - owner: components['schemas']['simple-user'] /** - * @description Whether the repository is private or public. - * @default false + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + /** @description Whether the repository is private. */ private: boolean /** * Format: uri + * @description The URL to view the repository on GitHub.com. * @example https://github.com/octocat/Hello-World */ html_url: string - /** @example This your first repo! */ + /** + * @description The repository description. + * @example This your first repo! + */ description: string | null + /** @description Whether the repository is a fork. */ fork: boolean /** * Format: uri + * @description The URL to get more information about the repository from the GitHub API. * @example https://api.github.com/repos/octocat/Hello-World */ url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ contents_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors */ contributors_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments */ deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads */ downloads_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events */ events_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks */ forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ labels_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages */ languages_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges */ merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ releases_url: string - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers */ stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ statuses_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers */ subscribers_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription */ subscription_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags */ tags_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams */ teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - mirror_url: string | null + trees_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks */ hooks_url: string + } + 'organization-secret-scanning-alert': { + number?: components['schemas']['alert-number'] + created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['nullable-alert-updated-at'] + url?: components['schemas']['alert-url'] + html_url?: components['schemas']['alert-html-url'] /** * Format: uri - * @example https://svn.github.com/octocat/Hello-World + * @description The REST API URL of the code locations for this alert. */ - svn_url: string + locations_url?: string + state?: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] /** - * Format: uri - * @example https://github.com + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - homepage: string | null - language: string | null - /** @example 9 */ - forks_count: number - /** @example 80 */ - stargazers_count: number - /** @example 80 */ - watchers_count: number - /** @example 108 */ - size: number + resolved_at?: string | null + resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The type of secret that secret scanning detected. */ + secret_type?: string /** - * @description The default branch of the repository. - * @example master + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." */ - default_branch: string - /** @example 0 */ - open_issues_count: number + secret_type_display_name?: string + /** @description The secret that was detected. */ + secret?: string + repository?: components['schemas']['simple-repository'] + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - is_template?: boolean - topics?: string[] + push_protection_bypassed_at?: string | null + } + 'advanced-security-active-committers-user': { + user_login: string + /** @example 2021-11-03 */ + last_pushed_date: string + } + 'advanced-security-active-committers-repository': { + /** @example octocat/Hello-World */ + name: string + /** @example 25 */ + advanced_security_committers: number + advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] + } + 'advanced-security-active-committers': { + /** @example 25 */ + total_advanced_security_committers?: number + /** @example 2 */ + total_count?: number + repositories: components['schemas']['advanced-security-active-committers-repository'][] + } + /** + * Actor + * @description Actor + */ + actor: { + id: number + login: string + display_login?: string + gravatar_id: string | null + /** Format: uri */ + url: string + /** Format: uri */ + avatar_url: string + } + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + 'nullable-milestone': { /** - * @description Whether issues are enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 */ - has_issues: boolean + url: string /** - * @description Whether projects are enabled. - * @default true - * @example true + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 */ - has_projects: boolean + html_url: string /** - * @description Whether the wiki is enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels */ - has_wiki: boolean - has_pages: boolean + labels_url: string + /** @example 1002604 */ + id: number + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string /** - * @description Whether downloads are enabled. - * @default true - * @example true + * @description The number of the milestone. + * @example 42 */ - has_downloads: boolean + number: number /** - * @description Whether the repository is archived. - * @default false + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} */ - archived: boolean - /** @description Returns whether or not this repository disabled. */ - disabled: boolean + state: 'open' | 'closed' /** - * @description The repository visibility: public, private, or internal. - * @default public + * @description The title of the milestone. + * @example v1.0 */ - visibility?: string + title: string + /** @example Tracking milestone for version 1.0 */ + description: string | null + creator: components['schemas']['nullable-simple-user'] + /** @example 4 */ + open_issues: number + /** @example 8 */ + closed_issues: number /** * Format: date-time - * @example 2011-01-26T19:06:43Z + * @example 2011-04-10T20:09:31Z */ - pushed_at: string | null + created_at: string /** * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example 2014-03-03T18:58:10Z */ - created_at: string | null + updated_at: string /** * Format: date-time - * @example 2011-01-26T19:14:43Z + * @example 2013-02-12T13:22:01Z */ - updated_at: string | null + closed_at: string | null /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - 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 - } - 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 - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - allow_rebase_merge?: boolean - temp_clone_token?: string - allow_squash_merge?: boolean - allow_auto_merge?: boolean - delete_branch_on_merge?: boolean - allow_update_branch?: boolean - allow_merge_commit?: boolean - subscribers_count?: number - network_count?: number - } | null - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - subscribers_count?: number - network_count?: number - open_issues: number - watchers: number - master_branch?: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - } | null - /** - * Minimal Repository - * @description Minimal Repository - */ - 'minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number - /** @example 0 */ - watchers?: number - allow_forking?: boolean - } - 'organization-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'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - locations_url?: string - state?: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - resolved_at?: string | null - resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The type of secret that secret scanning detected. */ - secret_type?: string - /** @description The secret that was detected. */ - secret?: string - repository?: components['schemas']['minimal-repository'] - } - 'actions-billing-usage': { - /** @description The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number - /** @description The amount of free GitHub Actions minutes available. */ - included_minutes: number - minutes_used_breakdown: { - /** @description Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number - /** @description Total minutes used on macOS runner machines. */ - MACOS?: number - /** @description Total minutes used on Windows runner machines. */ - WINDOWS?: number - } - } - 'advanced-security-active-committers-user': { - user_login: string - /** @example 2021-11-03 */ - last_pushed_date: string - } - 'advanced-security-active-committers-repository': { - /** @example octocat/Hello-World */ - name: string - /** @example 25 */ - advanced_security_committers: number - advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] - } - 'advanced-security-active-committers': { - /** @example 25 */ - total_advanced_security_committers?: number - repositories: components['schemas']['advanced-security-active-committers-repository'][] - } - 'packages-billing-usage': { - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number - /** @description Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number - } - 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number - } - /** - * Actor - * @description Actor - */ - actor: { - id: number - login: string - display_login?: string - gravatar_id: string | null - /** Format: uri */ - url: string - /** Format: uri */ - avatar_url: string - } - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - 'nullable-milestone': { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - html_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - labels_url: string - /** @example 1002604 */ - id: number - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - number: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - title: string - /** @example Tracking milestone for version 1.0 */ - description: string | null - creator: components['schemas']['nullable-simple-user'] - /** @example 4 */ - open_issues: number - /** @example 8 */ - closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - closed_at: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z + * Format: date-time + * @example 2012-10-09T23:39:01Z */ due_on: string | null } | null @@ -8388,7 +8043,7 @@ export interface components { * @example OWNER * @enum {string} */ - author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + 'author-association': 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' /** Reaction Rollup */ 'reaction-rollup': { /** Format: uri */ @@ -8435,6 +8090,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -8499,7 +8160,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -8541,7 +8202,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -8870,7 +8531,7 @@ export interface components { * @example 2011-04-18T23:23:56Z */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Gist Commit @@ -9023,77 +8684,6 @@ export interface components { /** @example true */ featured: boolean } - /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan - */ - 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - url: string - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts - */ - accounts_url: string - /** @example 1313 */ - id: number - /** @example 3 */ - number: number - /** @example Pro */ - name: string - /** @example A professional-grade CI solution */ - description: string - /** @example 1099 */ - monthly_price_in_cents: number - /** @example 11870 */ - yearly_price_in_cents: number - /** @example flat-rate */ - price_model: string - /** @example true */ - has_free_trial: boolean - unit_name: string | null - /** @example published */ - state: string - /** - * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" - * ] - */ - bullets: string[] - } - /** - * Marketplace Purchase - * @description Marketplace Purchase - */ - 'marketplace-purchase': { - url: string - type: string - id: number - login: string - organization_billing_email?: string - email?: string | 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 - 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'] - } - } /** * Api Overview * @description Api Overview @@ -9101,42 +8691,6 @@ export interface components { 'api-overview': { /** @example true */ verifiable_password_authentication: boolean - ssh_key_fingerprints?: { - SHA256_RSA?: string - SHA256_DSA?: string - SHA256_ECDSA?: string - SHA256_ED25519?: string - } - /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] - */ - ssh_keys?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - hooks?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - web?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - api?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - git?: string[] /** * @example [ * "13.65.0.0/16", @@ -9147,32 +8701,222 @@ export interface components { packages?: string[] /** * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" + * "192.168.7.15/32", + * "192.168.7.16/32" * ] */ - pages?: string[] + dependabot?: string[] + /** @example 3.6.0 */ + installed_version?: string + } + /** + * Minimal Repository + * @description Minimal Repository + */ + 'minimal-repository': { + /** @example 1296269 */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example Hello-World */ + name: string + /** @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + private: boolean /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] + * Format: uri + * @example https://github.com/octocat/Hello-World */ - importer?: string[] + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors */ - actions?: string[] + contributors_url: string /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments */ - dependabot?: string[] + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + ssh_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + clone_url?: string + mirror_url?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + svn_url?: string + homepage?: string | null + language?: string | null + forks_count?: number + stargazers_count?: number + watchers_count?: number + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + 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 + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + permissions?: { + admin?: boolean + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + /** @example admin */ + role_name?: string + temp_clone_token?: string + delete_branch_on_merge?: boolean + subscribers_count?: number + network_count?: number + code_of_conduct?: components['schemas']['code-of-conduct'] + license?: { + key?: string + name?: string + spdx_id?: string + url?: string + node_id?: string + } | null + /** @example 0 */ + forks?: number + /** @example 0 */ + open_issues?: number + /** @example 0 */ + watchers?: number + allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Thread @@ -9230,47 +8974,11 @@ export interface components { * @description Custom repository roles created by organization administrators */ 'organization-custom-repository-role': { + /** @description The unique identifier of the custom role. */ id: number + /** @description The name of the custom role. */ name: string } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - groups?: { - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - updated_at: string - }[] - } /** * Organization Full * @description Organization Full @@ -9396,11 +9104,34 @@ export interface components { members_can_create_private_pages?: boolean /** @example false */ members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean /** Format: date-time */ updated_at: string } /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + 'actions-cache-usage-by-repository': { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number + } + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-repositories': 'all' | 'none' | 'selected' @@ -9411,21 +9142,6 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - 'actions-can-approve-pull-request-reviews': boolean - 'actions-get-default-workflow-permissions': { - default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - } - 'actions-set-default-workflow-permissions': { - default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - } 'runner-groups-org': { id: number name: string @@ -9437,6 +9153,18 @@ export interface components { inherited: boolean inherited_allows_public_repositories?: boolean allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Actions Secret for an Organization @@ -9492,6 +9220,10 @@ export interface components { * @description An object without any properties. */ 'empty-object': { [key: string]: unknown } + /** @description The name of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-name': string + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + 'code-scanning-analysis-tool-guid': string | null /** * @description State of a code scanning alert. * @enum {string} @@ -9511,17 +9243,19 @@ export interface components { * Format: date-time * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-fixed-at': string | null + 'alert-fixed-at': string | null /** * Format: date-time * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-dismissed-at': string | null + 'alert-dismissed-at': string | null /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description The dismissal comment associated with the dismissal of the alert. */ + 'code-scanning-alert-dismissed-comment': string | null 'code-scanning-alert-rule': { /** @description A unique identifier for the rule used to detect the alert. */ id?: string | null @@ -9545,13 +9279,11 @@ export interface components { tags?: string[] | null /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ help?: string | null + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null } - /** @description The name of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-name': string /** @description The version of the tool used to generate the code scanning analysis. */ 'code-scanning-analysis-tool-version': string | null - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - 'code-scanning-analysis-tool-guid': string | null 'code-scanning-analysis-tool': { name?: components['schemas']['code-scanning-analysis-tool-name'] version?: components['schemas']['code-scanning-analysis-tool-version'] @@ -9607,82 +9339,15 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] - repository: components['schemas']['minimal-repository'] - } - /** - * Credential Authorization - * @description Credential Authorization - */ - 'credential-authorization': { - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - login: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - credential_type: string - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - token_last_eight?: string - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - credential_authorized_at: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - scopes?: string[] - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - fingerprint?: string - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - credential_accessed_at: string | null - /** @example 12345678 */ - authorized_credential_id: number | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - authorized_credential_title?: string | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - authorized_credential_note?: string | null - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - authorized_credential_expires_at?: string | null + repository: components['schemas']['simple-repository'] } /** * Dependabot Secret for an Organization @@ -9811,23 +9476,42 @@ export interface components { }[] } /** - * Organization Invitation - * @description Organization Invitation + * ExternalGroups + * @description A list of external groups available to be connected to a team */ - 'organization-invitation': { - id: number - login: string | null - email: string | null - role: string - created_at: string - failed_at?: string | null - failed_reason?: string | null - inviter: components['schemas']['simple-user'] - team_count: number - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - node_id: string - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - invitation_teams_url: string + 'external-groups': { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string + }[] } /** * Org Hook @@ -9885,38 +9569,150 @@ export interface components { type: string } /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} + * Org Membership + * @description Org Membership */ - 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' + 'org-membership': { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: 'active' | 'pending' + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: 'admin' | 'member' | 'billing_manager' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string + organization: components['schemas']['organization-simple'] + user: components['schemas']['nullable-simple-user'] + permissions?: { + can_create_repository: boolean + } + } /** - * Interaction Limits - * @description Interaction limit settings. + * Migration + * @description A migration. */ - 'interaction-limit-response': { - limit: components['schemas']['interaction-group'] - /** @example repository */ - origin: string + migration: { + /** @example 79 */ + id: number + owner: components['schemas']['nullable-simple-user'] + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string + /** @example pending */ + state: string + /** @example true */ + lock_repositories: boolean + exclude_metadata: boolean + exclude_git_data: boolean + exclude_attachments: boolean + exclude_releases: boolean + exclude_owner_projects: boolean + org_metadata_only: boolean + repositories: components['schemas']['repository'][] + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string /** * Format: date-time - * @example 2018-08-17T04:18:39Z + * @example 2015-07-06T15:33:38-07:00 */ - expires_at: string + created_at: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string + node_id: string + /** Format: uri */ + archive_url?: string + exclude?: unknown[] + } + 'org-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string + allow_downstream_configuration?: boolean } /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * Interaction Restrictions - * @description Limit interactions to a specific type of user for a specified duration + * Project + * @description Projects are a way to organize columns and cards of work. */ - 'interaction-limit': { - limit: components['schemas']['interaction-group'] - expiry?: components['schemas']['interaction-expiry'] + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string + /** @example 1002604 */ + id: number + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null + /** @example 1 */ + number: number + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string + creator: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean } /** * Team Simple @@ -10008,496 +9804,134 @@ export interface components { parent: components['schemas']['nullable-team-simple'] } /** - * Org Membership - * @description Org Membership + * Team Organization + * @description Team Organization */ - 'org-membership': { + 'team-organization': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt + * @example https://api.github.com/orgs/github */ url: string - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - state: 'active' | 'pending' - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - role: 'admin' | 'member' | 'billing_manager' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - organization_url: string - organization: components['schemas']['organization-simple'] - user: components['schemas']['nullable-simple-user'] - permissions?: { - can_create_repository: boolean - } - } - /** - * Migration - * @description A migration. - */ - migration: { - /** @example 79 */ - id: number - owner: components['schemas']['nullable-simple-user'] - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - guid: string - /** @example pending */ - state: string - /** @example true */ - lock_repositories: boolean - exclude_metadata: boolean - exclude_git_data: boolean - exclude_attachments: boolean - exclude_releases: boolean - exclude_owner_projects: boolean - repositories: components['schemas']['repository'][] - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - url: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - created_at: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - updated_at: string - node_id: string - /** Format: uri */ - archive_url?: string - exclude?: unknown[] - } - /** - * Minimal Repository - * @description Minimal Repository - */ - 'nullable-minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @example https://api.github.com/orgs/github/repos */ - downloads_url: string + repos_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @example https://api.github.com/orgs/github/events */ events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + /** @example github */ + name?: string + /** @example GitHub */ + company?: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example https://github.com/blog */ - created_at?: string | null + blog?: string + /** @example San Francisco */ + location?: string /** - * Format: date-time - * @example 2011-01-26T19:14:43Z + * Format: email + * @example octocat@github.com */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number + email?: string + /** @example github */ + twitter_username?: string | null + /** @example true */ + is_verified?: boolean + /** @example true */ + has_organization_projects: boolean + /** @example true */ + has_repository_projects: boolean + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number /** @example 0 */ - watchers?: number - allow_forking?: boolean - } | null - /** - * Package - * @description A software package - */ - package: { - /** - * @description Unique identifier of the package. - * @example 1 - */ - id: number - /** - * @description The name of the package. - * @example super-linter - */ - name: string - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - html_url: string - /** - * @description The number of versions of the package. - * @example 1 - */ - version_count: number - /** - * @example private - * @enum {string} - */ - visibility: 'private' | 'public' - owner?: components['schemas']['nullable-simple-user'] - repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - } - /** - * Package Version - * @description A version of a software package - */ - 'package-version': { - /** - * @description Unique identifier of the package version. - * @example 1 - */ - id: number - /** - * @description The name of the package version. - * @example latest - */ - name: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - package_html_url: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - html_url?: string - /** @example MIT */ - license?: string - description?: string - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - deleted_at?: string - /** Package Version Metadata */ - metadata?: { - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** Container Metadata */ - container?: { - tags: string[] - } - /** Docker Metadata */ - docker?: { - tag?: string[] - } & { - tags: unknown - } - } - } - /** - * Project - * @description Projects are a way to organize columns and cards of work. - */ - project: { - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test - */ - owner_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604 - */ - url: string + following: number /** * Format: uri - * @example https://github.com/api-playground/projects-test/projects/12 + * @example https://github.com/octocat */ html_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604/columns - */ - columns_url: string - /** @example 1002604 */ - id: number - /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ - node_id: string - /** - * @description Name of the project - * @example Week One Sprint - */ - name: string - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body: string | null - /** @example 1 */ - number: number - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state: string - creator: components['schemas']['nullable-simple-user'] /** * Format: date-time - * @example 2011-04-10T20:09:31Z + * @example 2008-01-14T04:33:35Z */ created_at: string + /** @example Organization */ + type: string + /** @example 100 */ + total_private_repos?: number + /** @example 100 */ + owned_private_repos?: number + /** @example 81 */ + private_gists?: number | null + /** @example 10000 */ + disk_usage?: number | null + /** @example 8 */ + collaborators?: number | null /** - * Format: date-time - * @example 2014-03-03T18:58:10Z + * Format: email + * @example org@example.com */ + billing_email?: string | null + plan?: { + name: string + space: number + private_repos: number + filled_seats?: number + seats?: number + } + default_repository_permission?: string | null + /** @example true */ + members_can_create_repositories?: boolean | null + /** @example true */ + two_factor_requirement_enabled?: boolean | null + /** @example all */ + members_allowed_repository_creation_type?: string + /** @example true */ + members_can_create_public_repositories?: boolean + /** @example true */ + members_can_create_private_repositories?: boolean + /** @example true */ + members_can_create_internal_repositories?: boolean + /** @example true */ + members_can_create_pages?: boolean + /** @example true */ + members_can_create_public_pages?: boolean + /** @example true */ + members_can_create_private_pages?: boolean + /** @example false */ + members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean + /** Format: date-time */ updated_at: string - /** - * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. - * @enum {string} - */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - private?: boolean - } - /** - * GroupMapping - * @description External Groups to be mapped to a team for membership - */ - 'group-mapping': { - /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] - */ - groups?: { - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - group_name: string - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - group_description: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - synced_at?: string | null - }[] } /** * Full Team @@ -10564,7 +9998,7 @@ export interface components { * @example 2017-08-17T12:37:15Z */ updated_at: string - organization: components['schemas']['organization-full'] + organization: components['schemas']['team-organization'] /** * @description Distinguished Name (DN) that team maps to within LDAP environment * @example uid=example,ou=users,dc=github,dc=com @@ -10772,10 +10206,10 @@ export interface components { } } /** - * Team Repository - * @description A team's access to a repository. + * Repository + * @description A git repository */ - 'team-repository': { + 'nullable-repository': { /** * @description Unique identifier of the repository * @example 42 @@ -10791,6 +10225,7 @@ export interface components { /** @example octocat/Hello-World */ full_name: string license: components['schemas']['nullable-license-simple'] + organization?: components['schemas']['nullable-simple-user'] forks: number permissions?: { admin: boolean @@ -10799,9 +10234,7 @@ export interface components { push: boolean maintain?: boolean } - /** @example admin */ - role_name?: string - owner: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] /** * @description Whether the repository is private or public. * @default false @@ -10959,7 +10392,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -11033,28 +10469,522 @@ export interface components { * @example true */ allow_rebase_merge?: boolean - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. + 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 + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + allow_rebase_merge?: boolean + temp_clone_token?: string + allow_squash_merge?: boolean + allow_auto_merge?: boolean + delete_branch_on_merge?: boolean + allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + allow_merge_commit?: boolean + subscribers_count?: number + network_count?: number + } | null + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean + subscribers_count?: number + network_count?: number + open_issues: number + watchers: number + master_branch?: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean + } | null + /** + * Team Repository + * @description A team's access to a repository. + */ + 'team-repository': { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + /** @example octocat/Hello-World */ + full_name: string + license: components['schemas']['nullable-license-simple'] + forks: number + permissions?: { + admin: boolean + pull: boolean + triage?: boolean + push: boolean + maintain?: boolean + } + /** @example admin */ + role_name?: string + owner: components['schemas']['nullable-simple-user'] + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + language: string | null + /** @example 9 */ + forks_count: number + /** @example 80 */ + stargazers_count: number + /** @example 80 */ + watchers_count: number + /** @example 108 */ + size: number + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** @example 0 */ + open_issues_count: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + topics?: string[] + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + has_pages: boolean + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + template_repository?: components['schemas']['nullable-repository'] + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether to allow merge commits for pull requests. * @default true * @example true */ @@ -11065,6 +10995,12 @@ export interface components { * @example false */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -11219,6 +11155,20 @@ export interface components { */ html_url: string | null } + 'security-and-analysis': { + advanced_security?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + } | null /** * Full Repository * @description Full Repository @@ -11386,7 +11336,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** @example master */ default_branch: string @@ -11455,7 +11408,51 @@ export interface components { /** @example true */ allow_merge_commit?: boolean /** @example true */ + allow_update_branch?: boolean + /** @example false */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** @example true */ allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean /** @example 42 */ subscribers_count: number /** @example 0 */ @@ -11474,16 +11471,7 @@ export interface components { */ anonymous_access_enabled?: boolean code_of_conduct?: components['schemas']['code-of-conduct-simple'] - security_and_analysis?: { - advanced_security?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - secret_scanning?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - } | null + security_and_analysis?: components['schemas']['security-and-analysis'] } /** * Artifact @@ -11516,6 +11504,29 @@ export interface components { expires_at: string | null /** Format: date-time */ updated_at: string | null + workflow_run?: { + /** @example 10 */ + id?: number + /** @example 42 */ + repository_id?: number + /** @example 42 */ + head_repository_id?: number + /** @example main */ + head_branch?: string + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string + } | null + } + /** + * Actions cache usage policy for repository + * @description GitHub Actions cache usage policy for repository. + */ + 'actions-cache-usage-policy-for-repository': { + /** + * @description The size limit for the sum of all caches, in gigabytes. + * @example 14 + */ + repo_cache_size_limit_in_gb: number } /** * Job @@ -11559,8 +11570,9 @@ export interface components { /** * @description The outcome of the job. * @example success + * @enum {string|null} */ - conclusion: string | null + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -11650,6 +11662,23 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } + 'actions-workflow-access-to-repository': { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: 'none' | 'organization' | 'enterprise' + } + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + 'referenced-workflow': { + path: string + sha: string + ref?: string + } /** Pull Request Minimal */ 'pull-request-minimal': { id: number @@ -11723,10 +11752,15 @@ export interface components { /** @example master */ head_branch: string | null /** - * @description The SHA of the head commit that points to the version of the worflow being run. + * @description The SHA of the head commit that points to the version of the workflow being run. * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ head_sha: string + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string /** * @description The auto incrementing run number for the workflow run. * @example 106 @@ -11737,6 +11771,7 @@ export interface components { * @example 1 */ run_attempt?: number + referenced_workflows?: components['schemas']['referenced-workflow'][] | null /** @example push */ event: string /** @example completed */ @@ -11760,6 +11795,8 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string + actor?: components['schemas']['simple-user'] + triggering_actor?: components['schemas']['simple-user'] /** * Format: date-time * @description The start time of the latest run. Resets on re-run. @@ -11810,6 +11847,8 @@ export interface components { head_repository: components['schemas']['minimal-repository'] /** @example 5 */ head_repository_id?: number + } & { + display_title: unknown } /** * Environment Approval @@ -11861,7 +11900,7 @@ export interface components { comment: string } /** - * @description The type of reviewer. Must be one of: `User` or `Team` + * @description The type of reviewer. * @example User * @enum {string} */ @@ -11983,39 +12022,6 @@ export interface components { production_environment?: boolean performed_via_github_app?: components['schemas']['nullable-integration'] } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - 'workflow-run-usage': { - billable: { - UBUNTU?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - MACOS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - WINDOWS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - } - run_duration_ms?: number - } /** * Actions Secret * @description Set secrets for GitHub Actions. @@ -12071,23 +12077,6 @@ export interface components { */ deleted_at?: string } - /** - * Workflow Usage - * @description Workflow Usage - */ - 'workflow-usage': { - billable: { - UBUNTU?: { - total_ms?: number - } - MACOS?: { - total_ms?: number - } - WINDOWS?: { - total_ms?: number - } - } - } /** * Autolink reference * @description An autolink reference. @@ -12149,6 +12138,8 @@ export interface components { users?: components['schemas']['simple-user'][] /** @description The list of teams with review dismissal access. */ teams?: components['schemas']['team'][] + /** @description The list of apps with review dismissal access. */ + apps?: components['schemas']['integration'][] /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ url?: string /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ @@ -12156,13 +12147,15 @@ export interface components { /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ teams_url?: string } - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of users allowed to bypass pull request requirements. */ users?: components['schemas']['simple-user'][] /** @description The list of teams allowed to bypass pull request requirements. */ teams?: components['schemas']['team'][] - } | null + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components['schemas']['integration'][] + } /** @example true */ dismiss_stale_reviews: boolean /** @example true */ @@ -12292,6 +12285,9 @@ export interface components { allow_deletions?: { enabled?: boolean } + block_creations?: { + enabled?: boolean + } required_conversation_resolution?: { enabled?: boolean } @@ -12527,10 +12523,12 @@ export interface components { teams_url: string users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } bypass_pull_request_allowances?: { users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } } required_signatures?: { @@ -12560,6 +12558,9 @@ export interface components { required_conversation_resolution?: { enabled?: boolean } + block_creations?: { + enabled: boolean + } } /** * Deployment @@ -12815,10 +12816,11 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule-summary'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] @@ -12831,16 +12833,17 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] } /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * @enum {string} */ 'code-scanning-alert-set-state': 'open' | 'dismissed' @@ -12904,7 +12907,7 @@ export interface components { */ confirm_delete_url: string | null } - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/sarif-support-for-code-scanning)." */ 'code-scanning-analysis-sarif-file': string 'code-scanning-sarifs-receipt': { id?: components['schemas']['code-scanning-analysis-sarif-id'] @@ -12929,222 +12932,50 @@ export interface components { errors?: string[] | null } /** - * Codespace machine - * @description A description of the machine powering a codespace. + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file */ - 'nullable-codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - } | null - /** - * Codespace - * @description A codespace. - */ - codespace: { - /** @example 1 */ - id: number - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - name: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - environment_id: string | null - owner: components['schemas']['simple-user'] - billable_owner: components['schemas']['simple-user'] - repository: components['schemas']['minimal-repository'] - machine: components['schemas']['nullable-codespace-machine'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - prebuild: boolean | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - last_used_at: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL for this codespace. - */ - url: string - /** @description Details about the codespace's git repository. */ - git_status: { + 'codeowners-errors': { + errors: { /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 + * @description The line number where this errors occurs. + * @example 7 */ - ahead?: number + line: number /** - * @description The number of commits the local repository is behind the remote. - * @example 0 + * @description The column number where this errors occurs. + * @example 3 */ - behind?: number - /** @description Whether the local repository has unpushed changes. */ - has_unpushed_changes?: boolean - /** @description Whether the local repository has uncommitted changes. */ - has_uncommitted_changes?: boolean + column: number /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main + * @description The contents of the line where the error occurs. + * @example * user */ - ref?: string - } - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - idle_timeout_minutes: number | null - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - web_url: string - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - machines_url: string - /** - * Format: uri - * @description API URL to start this codespace. - */ - start_url: string - /** - * Format: uri - * @description API URL to stop this codespace. - */ - stop_url: string - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - pulls_url: string | null - recent_folders: string[] - runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - allowed_port_privacy_settings?: string[] | null - } - } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null + source?: string + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string + }[] } /** * Collaborator @@ -13220,7 +13051,7 @@ export interface components { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } /** * Repository Invitation @@ -13331,7 +13162,7 @@ export interface components { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } | null /** * Repository Collaborator Permission @@ -13364,7 +13195,7 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -13390,7 +13221,7 @@ export interface components { * Auto merge * @description The status of auto merging a pull request. */ - auto_merge: { + 'auto-merge': { enabled_by: components['schemas']['simple-user'] /** * @description The merge method to use. @@ -13532,8 +13363,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -13548,7 +13379,7 @@ export interface components { state: string context: string /** Format: uri */ - target_url: string + target_url: string | null required?: boolean | null /** Format: uri */ avatar_url: string | null @@ -13584,68 +13415,13 @@ export interface components { id: number node_id: string state: string - description: string - target_url: string + description: string | null + target_url: string | null context: string created_at: string updated_at: string creator: components['schemas']['nullable-simple-user'] } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'nullable-code-of-conduct-simple': { - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - } | null - /** Community Health File */ - 'nullable-community-health-file': { - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - } | null - /** - * Community Profile - * @description Community Profile - */ - 'community-profile': { - /** @example 100 */ - health_percentage: number - /** @example My first repository on GitHub! */ - description: string | null - /** @example example.com */ - documentation: string | null - files: { - code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - code_of_conduct_file: components['schemas']['nullable-community-health-file'] - license: components['schemas']['nullable-license-simple'] - contributing: components['schemas']['nullable-community-health-file'] - readme: components['schemas']['nullable-community-health-file'] - issue_template: components['schemas']['nullable-community-health-file'] - pull_request_template: components['schemas']['nullable-community-health-file'] - } - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - updated_at: string | null - /** @example true */ - content_reports_enabled?: boolean - } /** * Commit Comparison * @description Commit Comparison @@ -13751,7 +13527,8 @@ export interface components { * @description A list of directory items */ 'content-directory': { - type: string + /** @enum {string} */ + type: 'dir' | 'file' | 'submodule' | 'symlink' size: number name: string path: string @@ -13779,7 +13556,8 @@ export interface components { * @description Content File */ 'content-file': { - type: string + /** @enum {string} */ + type: 'file' encoding: string size: number name: string @@ -13812,7 +13590,8 @@ export interface components { * @description An object describing a symlink */ 'content-symlink': { - type: string + /** @enum {string} */ + type: 'symlink' target: string size: number name: string @@ -13836,11 +13615,12 @@ export interface components { } } /** - * Symlink Content - * @description An object describing a symlink + * Submodule Content + * @description An object describing a submodule */ 'content-submodule': { - type: string + /** @enum {string} */ + type: 'submodule' /** Format: uri */ submodule_git_url: string size: number @@ -13968,6 +13748,38 @@ export interface components { /** Format: date-time */ updated_at: string } + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + 'dependency-graph-diff': { + /** @enum {string} */ + change_type: 'added' | 'removed' + /** @example path/to/package-lock.json */ + manifest: string + /** @example npm */ + ecosystem: string + /** @example @actions/core */ + name: string + /** @example 1.0.0 */ + version: string + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null + /** @example MIT */ + license: string | null + /** @example https://github.com/github/actions */ + source_repository_url: string | null + vulnerabilities: { + /** @example critical */ + severity: string + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string + /** @example A summary of the advisory. */ + advisory_summary: string + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string + }[] + }[] /** * Deployment Status * @description The status of a deployment. @@ -14050,7 +13862,7 @@ export interface components { */ 'wait-timer': number /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: { + 'deployment-branch-policy-settings': { /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ protected_branches: boolean /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ @@ -14121,7 +13933,36 @@ export interface components { type: string } )[] - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + 'deployment-branch-policy': { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string + } + /** Deployment branch policy name pattern */ + 'deployment-branch-policy-name-pattern': { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string } /** * Short Blob @@ -14438,86 +14279,6 @@ export interface components { deliveries_url?: string last_response: components['schemas']['hook-response'] } - /** - * Import - * @description A repository import from an external source. - */ - import: { - vcs: string | null - use_lfs?: boolean - /** @description The URL of the originating repository. */ - vcs_url: string - svc_root?: string - tfvc_project?: string - /** @enum {string} */ - status: - | 'auth' - | 'error' - | 'none' - | 'detecting' - | 'choose' - | 'auth_failed' - | 'importing' - | 'mapping' - | 'waiting_to_push' - | 'pushing' - | 'complete' - | 'setup' - | 'unknown' - | 'detection_found_multiple' - | 'detection_found_nothing' - | 'detection_needs_auth' - status_text?: string | null - 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 - }[] - message?: string - authors_count?: number | null - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - /** Format: uri */ - authors_url: string - /** Format: uri */ - repository_url: string - svn_root?: string - } - /** - * Porter Author - * @description Porter Author - */ - 'porter-author': { - id: number - remote_id: string - remote_name: string - email: string - name: string - /** Format: uri */ - url: string - /** Format: uri */ - import_url: string - } - /** - * Porter Large File - * @description Porter Large File - */ - 'porter-large-file': { - ref_name: string - path: string - oid: string - size: number - } /** * Issue * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. @@ -14550,6 +14311,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -14614,7 +14381,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } | null /** @@ -14698,7 +14465,7 @@ export interface components { 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'] + author_association?: components['schemas']['author-association'] lock_reason?: string | null performed_via_github_app?: components['schemas']['nullable-integration'] } @@ -15097,7 +14864,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -15251,7 +15018,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Pull Request Review Comment @@ -15289,12 +15056,12 @@ export interface components { */ path: string /** - * @description The line index in the diff to which the comment applies. + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. * @example 1 */ position: number /** - * @description The index of the original line in the diff to which the comment applies. + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. * @example 4 */ original_position: number @@ -15341,7 +15108,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: { /** @@ -15454,6 +15221,22 @@ export interface components { performed_via_github_app: components['schemas']['nullable-integration'] assignee: components['schemas']['simple-user'] } + /** + * State Change Issue Event + * @description State Change Issue Event + */ + 'state-change-issue-event': { + 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 + performed_via_github_app: components['schemas']['nullable-integration'] + state_reason?: string | null + } /** * Timeline Event * @description Timeline Event @@ -15480,6 +15263,7 @@ export interface components { | components['schemas']['timeline-commit-commented-event'] | components['schemas']['timeline-assigned-issue-event'] | components['schemas']['timeline-unassigned-issue-event'] + | components['schemas']['state-change-issue-event'] /** * Deploy Key * @description An SSH key granting access to a single repository. @@ -15689,6 +15473,12 @@ export interface components { * @example https://example.com */ html_url?: string + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ('legacy' | 'workflow') | null source?: components['schemas']['pages-source-hash'] /** * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. @@ -15734,71 +15524,11 @@ export interface components { /** @example queued */ status: string } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - 'pages-health-check': { - domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } - alt_domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } | null + 'repository-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string } /** * Team Simple @@ -16123,6 +15853,7 @@ export interface components { updated_at: string allow_forking?: boolean is_template?: boolean + web_commit_signoff_required?: boolean } | null sha: string user: { @@ -16296,6 +16027,7 @@ export interface components { /** Format: date-time */ updated_at: string allow_forking?: boolean + web_commit_signoff_required?: boolean } sha: string user: { @@ -16337,8 +16069,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -16434,7 +16166,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Legacy Review Comment @@ -16489,7 +16221,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: components['schemas']['link'] html: components['schemas']['link'] @@ -16611,11 +16343,6 @@ export interface components { body_html?: string body_text?: string mentions_count?: number - /** - * Format: uri - * @description The URL of the release discussion. - */ - discussion_url?: string reactions?: components['schemas']['reaction-rollup'] } /** @@ -16634,6 +16361,7 @@ export interface components { 'secret-scanning-alert': { number?: components['schemas']['alert-number'] created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['alert-updated-at'] url?: components['schemas']['alert-url'] html_url?: components['schemas']['alert-html-url'] /** @@ -16651,8 +16379,21 @@ export interface components { resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string /** @description The secret that was detected. */ secret?: string + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null } /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ 'secret-scanning-location-commit': { @@ -16812,6 +16553,22 @@ export interface components { tarball_url: string node_id: string } + /** + * Tag protection + * @description Tag protection + */ + 'tag-protection': { + /** @example 2 */ + id?: number + /** @example 2011-01-26T19:01:12Z */ + created_at?: string + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string + /** @example true */ + enabled?: boolean + /** @example v1.* */ + pattern: string + } /** * Topic * @description A topic aggregates entities that are related to a subject. @@ -16819,61 +16576,6 @@ export interface components { topic: { names: string[] } - /** Traffic */ - traffic: { - /** Format: date-time */ - timestamp: string - uniques: number - count: number - } - /** - * Clone Traffic - * @description Clone Traffic - */ - 'clone-traffic': { - /** @example 173 */ - count: number - /** @example 128 */ - uniques: number - clones: components['schemas']['traffic'][] - } - /** - * Content Traffic - * @description Content Traffic - */ - 'content-traffic': { - /** @example /github/hubot */ - path: string - /** @example github/hubot: A customizable life embetterment robot. */ - title: string - /** @example 3542 */ - count: number - /** @example 2225 */ - uniques: number - } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - 'referrer-traffic': { - /** @example Google */ - referrer: string - /** @example 4 */ - count: number - /** @example 3 */ - uniques: number - } - /** - * View Traffic - * @description View Traffic - */ - 'view-traffic': { - /** @example 14850 */ - count: number - /** @example 3782 */ - uniques: number - views: components['schemas']['traffic'][] - } 'scim-group-list-enterprise': { schemas: string[] totalResults: number @@ -16970,139 +16672,6 @@ export interface components { location?: string } } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - 'scim-user': { - /** @description SCIM schema used. */ - schemas: [string, ...string[]] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - id: string - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - externalId: string | null - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string | null - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string | null - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string | null - familyName: string | null - formatted?: string | null - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: [ - { - value: string - primary?: boolean - }, - ...{ - value: string - primary?: boolean - }[], - ] - /** - * @description The active status of the User. - * @example true - */ - active: boolean - meta: { - /** @example User */ - resourceType?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - location?: string - } - /** @description The ID of the organization. */ - organization_id?: number - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - operations?: [ - { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: string | { [key: string]: unknown } | unknown[] - }, - ...{ - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: string | { [key: string]: unknown } | unknown[] - }[], - ] - /** @description associated groups */ - groups?: { - value?: string - display?: string - }[] - } - /** - * SCIM User List - * @description SCIM User List - */ - 'scim-user-list': { - /** @description SCIM schema used. */ - schemas: [string, ...string[]] - /** @example 3 */ - totalResults: number - /** @example 10 */ - itemsPerPage: number - /** @example 1 */ - startIndex: number - Resources: components['schemas']['scim-user'][] - } /** Search Result Text Matches */ 'search-result-text-matches': { object_url?: string @@ -17221,6 +16790,7 @@ export interface components { description?: string | null }[] state: string + state_reason?: string | null assignee: components['schemas']['nullable-simple-user'] milestone: components['schemas']['nullable-milestone'] comments: number @@ -17245,7 +16815,7 @@ export interface components { } body?: string score: number - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] draft?: boolean repository?: components['schemas']['repository'] body_html?: string @@ -17392,6 +16962,8 @@ export interface components { delete_branch_on_merge?: boolean allow_forking?: boolean is_template?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Topic Search Result Item @@ -17488,6 +17060,163 @@ export interface components { /** Format: date-time */ suspended_at?: string | null } + 'configuration-status': { + status?: string + progress?: { + status: string + key: string + }[] + } + 'maintenance-status': { + status?: string + scheduled_time?: string + connection_services?: { + name: string + number: number + }[] + } + 'enterprise-settings': { + enterprise?: { + private_mode?: boolean + public_pages?: boolean + subdomain_isolation?: boolean + signup_enabled?: boolean + github_hostname?: string + identicons_host?: string + http_proxy?: string | null + auth_mode?: string + expire_sessions?: boolean + admin_password?: string | null + configuration_id?: number + configuration_run_count?: number + avatar?: { + enabled?: boolean + uri?: string + } + customer?: { + name?: string + email?: string + uuid?: string + secret_key_data?: string + public_key_data?: string + } + license?: { + seats?: number + evaluation?: boolean + perpetual?: boolean + unlimited_seating?: boolean + support_key?: string + ssh_allowed?: boolean + cluster_support?: boolean + expire_at?: string + } + github_ssl?: { + enabled?: boolean + cert?: string | null + key?: string | null + } + ldap?: { + host?: string | null + port?: number + base?: unknown[] + uid?: string | null + bind_dn?: string | null + password?: string | null + method?: string + search_strategy?: string + user_groups?: unknown[] + admin_group?: string | null + virtual_attribute_enabled?: boolean + recursive_group_search?: boolean + posix_support?: boolean + user_sync_emails?: boolean + user_sync_keys?: boolean + user_sync_interval?: number + team_sync_interval?: number + sync_enabled?: boolean + reconciliation?: { + user?: string | null + org?: string | null + } + profile?: { + uid?: string + name?: string | null + mail?: string | null + key?: string | null + } + } + cas?: { + url?: string | null + } + saml?: { + sso_url?: string | null + certificate?: string | null + certificate_path?: string | null + issuer?: string | null + idp_initiated_sso?: boolean + disable_admin_demote?: boolean + } + github_oauth?: { + client_id?: string + client_secret?: string + organization_name?: string + organization_team?: string + } + smtp?: { + enabled?: boolean + address?: string + authentication?: string + port?: string + domain?: string + username?: string + user_name?: string + enable_starttls_auto?: boolean + password?: string + 'discard-to-noreply-address'?: boolean + support_address?: string + support_address_type?: string + noreply_address?: string + } + ntp?: { + primary_server?: string + secondary_server?: string + } + timezone?: string | null + snmp?: { + enabled?: boolean + community?: string + } + syslog?: { + enabled?: boolean + server?: string | null + protocol_name?: string + } + assets?: string | null + pages?: { + enabled?: boolean + } + collectd?: { + enabled?: boolean + server?: string | null + port?: number + encryption?: string | null + username?: string | null + password?: string | null + } + mapping?: { + enabled?: boolean + tileserver?: string | null + basemap?: string + token?: string | null + } + load_balancer?: string | null + } + run_list?: string[] + } + 'ssh-key': { + key?: string + 'pretty-print'?: string + } /** * Private User * @description Private User @@ -17611,84 +17340,6 @@ export interface components { business_plus?: boolean ldap_dn?: string } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - 'codespaces-secret': { - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - name: string - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - selected_repositories_url: string - } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - 'codespaces-user-public-key': { - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - 'codespace-export-details': { - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - state?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - completed_at?: string | null - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - branch?: string | null - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - sha?: string | null - /** - * @description Id for the export details - * @example latest - */ - id?: string - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - export_url?: string - } /** * Email * @description Email @@ -17713,6 +17364,8 @@ export interface components { 'gpg-key': { /** @example 3 */ id: number + /** @example Octocat's GPG Key */ + name?: string | null primary_key_id: number | null /** @example 3262EFF25BA0D270 */ key_id: string @@ -17721,7 +17374,7 @@ export interface components { /** * @example [ * { - * "email": "mastahyeti@users.noreply.github.com", + * "email": "octocat@users.noreply.github.com", * "verified": true * } * ] @@ -17744,7 +17397,8 @@ export interface components { * "can_encrypt_storage": true, * "can_certify": false, * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null + * "expires_at": null, + * "revoked": false * } * ] */ @@ -17762,6 +17416,7 @@ export interface components { created_at?: string expires_at?: string | null raw_key?: string | null + revoked?: boolean }[] /** @example true */ can_sign: boolean @@ -17776,6 +17431,8 @@ export interface components { created_at: string /** Format: date-time */ expires_at: string | null + /** @example true */ + revoked: boolean raw_key: string | null } /** @@ -17792,47 +17449,6 @@ export interface components { verified: boolean read_only: boolean } - /** Marketplace Account */ - 'marketplace-account': { - /** Format: uri */ - url: string - id: number - type: string - node_id?: string - login: string - /** Format: email */ - email?: string | null - /** Format: email */ - organization_billing_email?: string | null - } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - 'user-marketplace-purchase': { - /** @example monthly */ - billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - next_billing_date: string | null - unit_count: number | null - /** @example true */ - on_free_trial: boolean - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - updated_at: string | null - account: components['schemas']['marketplace-account'] - plan: components['schemas']['marketplace-listing-plan'] - } /** * Starred Repository * @description Starred Repository @@ -17868,7 +17484,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed_simple: { content: { 'application/json': components['schemas']['validation-error-simple'] @@ -17881,7 +17497,7 @@ export interface components { 'application/scim+json': components['schemas']['scim-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed: { content: { 'application/json': components['schemas']['validation-error'] @@ -17893,15 +17509,6 @@ export interface components { 'application/json': { [key: string]: unknown } } } - /** Preview header missing */ - preview_header_missing: { - content: { - 'application/json': { - message: string - documentation_url: string - } - } - } /** Forbidden */ forbidden: { content: { @@ -17994,7 +17601,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + /** 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'] @@ -18004,72 +17611,59 @@ export interface components { found: unknown /** A header with no content is returned. */ no_content: 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: { - /** @description Results per page (max 100) */ + /** @description The number of results per page (max 100). */ 'per-page': number + /** @description Page number of the results to fetch. */ + page: number + /** @description The unique identifier of the hook. */ + 'hook-id': number + /** @description The direction to sort the results by. */ + direction: 'asc' | 'desc' + /** @description The unique identifier of the key. */ + 'key-ids': string + /** @description The unique identifier of the team. */ + 'team-id': number + /** @description The handle for the GitHub user account. */ + username: string + /** @description The organization name. The name is not case sensitive. */ + org: string + /** @description The unique identifier of the pre-receive environment. */ + 'pre-receive-environment-id': number + /** @description The unique identifier of the pre-receive hook. */ + 'pre-receive-hook-id': number + /** @description The unique identifier of the token. */ + 'token-id': number /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor: string 'delivery-id': number - /** @description Page number of the results to fetch. */ - page: number /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since: string - /** @description installation_id parameter */ + /** @description The unique identifier of the installation. */ 'installation-id': number - /** @description grant_id parameter */ + /** @description The unique identifier of the grant. */ 'grant-id': number - /** @description The client ID of your GitHub app. */ + /** @description The client ID of the GitHub app. */ 'client-id': string 'app-slug': string - /** @description authorization_id parameter */ + /** @description The client ID of the OAuth app. */ + 'oauth-client-id': string + /** @description The unique identifier of the authorization. */ 'authorization-id': number /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: string - /** @description Unique identifier of an organization. */ + /** @description The unique identifier of the organization. */ 'org-id': number + /** @description Only return runner groups that are allowed to be used by this organization. */ + 'visible-to-organization': string /** @description Unique identifier of the self-hosted runner group. */ 'runner-group-id': number /** @description Unique identifier of the self-hosted runner. */ 'runner-id': number /** @description The name of a self-hosted runner's custom label. */ 'runner-label-name': string - /** @description 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). */ + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ 'audit-log-phrase': string /** * @description The event types to include: @@ -18081,9 +17675,9 @@ export interface components { * The default is `web`. */ 'audit-log-include': 'web' | 'git' | 'all' - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ 'audit-log-before': string /** * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. @@ -18095,31 +17689,27 @@ export interface components { 'secret-scanning-alert-state': 'open' | 'resolved' /** * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ 'secret-scanning-alert-secret-type': string /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ 'secret-scanning-alert-resolution': string - /** @description A 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. */ + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + 'secret-scanning-alert-sort': 'created' | 'updated' + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ 'pagination-before': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ 'pagination-after': string - /** @description gist_id parameter */ + /** @description The unique identifier of the gist. */ 'gist-id': string - /** @description comment_id parameter */ + /** @description The unique identifier of the comment. */ 'comment-id': number /** @description A list of comma separated label names. Example: `bug,ui,@high` */ labels: string - /** @description One of `asc` (ascending) or `desc` (descending). */ - direction: 'asc' | 'desc' - /** @description account_id parameter */ - 'account-id': number - /** @description plan_id parameter */ - 'plan-id': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: 'created' | 'updated' + /** @description The account owner of the repository. The name is not case sensitive. */ owner: string + /** @description The name of the repository. The name is not case sensitive. */ repo: string /** @description If `true`, show notifications marked as read. */ all: boolean @@ -18127,45 +17717,41 @@ export interface components { participating: boolean /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ before: string - /** @description thread_id parameter */ + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ 'thread-id': number /** @description An organization ID. Only return organizations with an ID greater than this ID. */ 'since-org': number - org: string - /** @description team_slug parameter */ - 'team-slug': string + /** @description The unique identifier of the repository. */ 'repository-id': number - /** @description secret_name parameter */ + /** @description Only return runner groups that are allowed to be used by this repository. */ + 'visible-to-repository': string + /** @description The name of the secret. */ 'secret-name': string - username: string - /** @description group_id parameter */ + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The unique identifier of the group. */ 'group-id': number - 'hook-id': number - /** @description invitation_id parameter */ - 'invitation-id': number - /** @description migration_id parameter */ + /** @description The unique identifier of the migration. */ 'migration-id': number - /** @description repo_name parameter */ - 'repo-name': string - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - 'package-visibility': 'public' | 'private' | 'internal' - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description The name of the package. */ - 'package-name': string - /** @description Unique identifier of the package version. */ - 'package-version-id': number + /** @description The slug of the team name. */ + 'team-slug': string + /** @description The number that identifies the discussion. */ 'discussion-number': number + /** @description The number that identifies the comment. */ 'comment-number': number + /** @description The unique identifier of the reaction. */ 'reaction-id': number + /** @description The unique identifier of the project. */ 'project-id': number - /** @description card_id parameter */ + /** @description The unique identifier of the card. */ 'card-id': number - /** @description column_id parameter */ + /** @description The unique identifier of the column. */ 'column-id': number - /** @description artifact_id parameter */ + /** @description The unique identifier of the artifact. */ 'artifact-id': number - /** @description job_id parameter */ + /** @description The unique identifier of the job. */ 'job-id': number /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ actor: string @@ -18173,7 +17759,7 @@ export interface components { 'workflow-run-branch': string /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event: string - /** @description 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)." */ + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ 'workflow-run-status': | 'completed' | 'action_required' @@ -18188,61 +17774,64 @@ export interface components { | 'queued' | 'requested' | 'waiting' - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created: string /** @description If `true` pull requests are omitted from the response (empty array). */ 'exclude-pull-requests': boolean /** @description Returns workflow runs with the `check_suite_id` that you specify. */ 'workflow-run-check-suite-id': number - /** @description The id of the workflow run. */ + /** @description The unique identifier of the workflow run. */ 'run-id': number /** @description The attempt number of the workflow run. */ 'attempt-number': number /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ 'workflow-id': number | string - /** @description autolink_id parameter */ + /** @description The unique identifier of the autolink. */ 'autolink-id': number /** @description The name of the branch. */ branch: string - /** @description check_run_id parameter */ + /** @description The unique identifier of the check run. */ 'check-run-id': number - /** @description check_suite_id parameter */ + /** @description The unique identifier of the check suite. */ 'check-suite-id': number /** @description Returns check runs with the specified `name`. */ 'check-name': string - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + /** @description Returns check runs with the specified `status`. */ status: 'queued' | 'in_progress' | 'completed' - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ 'git-ref': components['schemas']['code-scanning-ref'] /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ 'alert-number': components['schemas']['alert-number'] - /** @description commit_sha parameter */ + /** @description The SHA of the commit. */ 'commit-sha': string + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + 'manifest-path': string /** @description deployment_id parameter */ 'deployment-id': number - /** @description The name of the environment */ + /** @description The name of the environment. */ 'environment-name': string - /** @description A user ID. Only return users with an ID greater than this ID. */ - 'since-user': number - /** @description issue_number parameter */ + /** @description The unique identifier of the branch policy. */ + 'branch-policy-id': number + /** @description The unique identifier of the invitation. */ + 'invitation-id': number + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: 'created' | 'updated' + /** @description The number that identifies the issue. */ 'issue-number': number - /** @description key_id parameter */ + /** @description The unique identifier of the key. */ 'key-id': number - /** @description milestone_number parameter */ + /** @description The number that identifies the milestone. */ 'milestone-number': number + /** @description The number that identifies the pull request. */ 'pull-number': number - /** @description review_id parameter */ + /** @description The unique identifier of the review. */ 'review-id': number - /** @description asset_id parameter */ + /** @description The unique identifier of the asset. */ 'asset-id': number - /** @description release_id parameter */ + /** @description The unique identifier of the release. */ 'release-id': number - /** @description Must be one of: `day`, `week`. */ - per: '' | 'day' | 'week' + /** @description The unique identifier of the tag protection. */ + 'tag-protection-id': number /** @description A repository ID. Only return repositories with an ID greater than this ID. */ 'since-repo': number /** @description Used for pagination: the index of the first result to return. */ @@ -18251,19 +17840,14 @@ export interface components { count: number /** @description Identifier generated by the GitHub SCIM endpoint. */ 'scim-group-id': string - /** @description scim_user_id parameter */ + /** @description The unique identifier of the SCIM user. */ 'scim-user-id': string /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order: 'desc' | 'asc' - 'team-id': number - /** @description ID of the Repository to filter on */ - 'repository-id-in-query': number - /** @description The name of the codespace. */ - 'codespace-name': string - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - 'export-id': string - /** @description gpg_key_id parameter */ + /** @description The unique identifier of the GPG key. */ 'gpg-key-id': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + 'since-user': number } headers: { link?: string @@ -18283,628 +17867,627 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': { - /** Format: uri-template */ - current_user_url: string - /** Format: uri-template */ - current_user_authorizations_html_url: string - /** Format: uri-template */ - authorizations_url: string - /** Format: uri-template */ - code_search_url: string - /** Format: uri-template */ - commit_search_url: string - /** Format: uri-template */ - emails_url: string - /** Format: uri-template */ - emojis_url: string - /** Format: uri-template */ - events_url: string - /** Format: uri-template */ - feeds_url: string - /** Format: uri-template */ - followers_url: string - /** Format: uri-template */ - following_url: string - /** Format: uri-template */ - gists_url: string - /** Format: uri-template */ - hub_url: string - /** Format: uri-template */ - issue_search_url: string - /** Format: uri-template */ - issues_url: string - /** Format: uri-template */ - keys_url: string - /** Format: uri-template */ - label_search_url: string - /** Format: uri-template */ - notifications_url: string - /** Format: uri-template */ - organization_url: string - /** Format: uri-template */ - organization_repositories_url: string - /** Format: uri-template */ - organization_teams_url: string - /** Format: uri-template */ - public_gists_url: string - /** Format: uri-template */ - rate_limit_url: string - /** Format: uri-template */ - repository_url: string - /** Format: uri-template */ - repository_search_url: string - /** Format: uri-template */ - current_user_repositories_url: string - /** Format: uri-template */ - starred_url: string - /** Format: uri-template */ - starred_gists_url: string - /** Format: uri-template */ - topic_search_url?: string - /** Format: uri-template */ - user_url: string - /** Format: uri-template */ - user_organizations_url: string - /** Format: uri-template */ - user_repositories_url: string - /** Format: uri-template */ - user_search_url: string - } + 'application/json': components['schemas']['root'] } } } } - /** - * 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: {} + 'enterprise-admin/list-global-webhooks': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['global-hook'][] } } } } - /** 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 - } - } + 'enterprise-admin/create-global-webhook': { responses: { /** Response */ 201: { content: { - 'application/json': components['schemas']['integration'] & - ({ - client_id: string - client_secret: string - webhook_secret: string | null - pem: string - } & { [key: string]: unknown }) + 'application/json': components['schemas']['global-hook'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': { + /** @description Must be passed as "web". */ + name: string + /** @description Key/value pairs to provide settings for this webhook. */ + config: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } } } } - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } + 'enterprise-admin/get-global-webhook': { + parameters: { + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } - } - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - 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'] + 'application/json': components['schemas']['global-hook'] } } } } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/list-webhook-deliveries': { + 'enterprise-admin/delete-global-webhook': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 204: never } } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-delivery': { + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + 'enterprise-admin/update-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['global-hook-2'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/redeliver-webhook-delivery': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + 'enterprise-admin/ping-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + /** Response */ + 204: never } } - /** - * 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': { + 'enterprise-admin/list-public-keys': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of 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 + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'accessed' + /** Only show public keys accessed after the given time. */ + since?: string } } responses: { - /** The permissions the installation has are included under the `permissions` key. */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['installation'][] + 'application/json': components['schemas']['public-key-full'][] } } } } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-installation': { + 'enterprise-admin/delete-public-key': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the key. */ + key_ids: components['parameters']['key-ids'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + 'enterprise-admin/update-ldap-mapping-for-team': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['installation'] + 'application/json': components['schemas']['ldap-mapping-team'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } - 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-team': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/update-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['installation-token'] + 'application/json': components['schemas']['ldap-mapping-user'] } } - 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': { - /** @description List of repository names that the token should have access to */ - repositories?: string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } } } - /** - * 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/create-org': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['organization-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's username. */ + login: string + /** @description The login of the user who will manage this organization. */ + admin: string + /** @description The organization's display name. */ + profile_name?: string + } + } + } + } + 'enterprise-admin/update-org-name': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 202: { + content: { + 'application/json': { + message?: string + url?: string + } + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's new name. */ + login: string + } + } } } - /** - * **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': { + 'enterprise-admin/list-pre-receive-environments': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['application-grant'][] + 'application/json': components['schemas']['pre-receive-environment'][] } } - 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': { + 'enterprise-admin/create-pre-receive-environment': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The new pre-receive environment's name. */ + name: string + /** @description URL from which to download a tarball of this environment. */ + image_url: string + } + } + } + } + 'enterprise-admin/get-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['application-grant'] + 'application/json': components['schemas']['pre-receive-environment'] } } - 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 attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. * - * 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). + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ */ - 'oauth-authorizations/delete-grant': { + 'enterprise-admin/delete-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } } - /** - * 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': { + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + 'enterprise-admin/update-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } requestBody: { content: { 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + /** @description This pre-receive environment's new name. */ + name?: string + /** @description URL from which to download a tarball of this environment. */ + image_url?: string } } } } - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/check-token': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + 'enterprise-admin/start-pre-receive-environment-download': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } } } } } - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - 'apps/delete-token': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + 'enterprise-admin/get-download-status-for-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } } } - /** 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': { + 'enterprise-admin/list-pre-receive-hooks': { parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property to sort the results by. */ + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'][] + } + } + } + } + 'enterprise-admin/create-pre-receive-hook': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** @description The name of the hook. */ + name: string + /** @description The script that the hook runs. */ + script: string + /** @description The GitHub repository where the script is kept. */ + script_repository: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment: { [key: string]: unknown } + /** @description The state of enforcement for this hook. default: `disabled` */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. default: `false` */ + allow_downstream_configuration?: boolean } } } } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/scope-token': { + 'enterprise-admin/get-pre-receive-hook': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] - } + } + 'enterprise-admin/delete-pre-receive-hook': { + parameters: { + path: { + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } + responses: { + /** 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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/get-by-slug': { + 'enterprise-admin/update-pre-receive-hook': { parameters: { path: { - app_slug: components['parameters']['app-slug'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['pre-receive-hook'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the hook. */ + name?: string + /** @description The script that the hook runs. */ + script?: string + /** @description The GitHub repository where the script is kept. */ + script_repository?: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment?: { [key: string]: unknown } + /** @description The state of enforcement for this hook. */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. */ + allow_downstream_configuration?: boolean } } - 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': { + /** Lists personal access tokens for all users, including admin users. */ + 'enterprise-admin/list-personal-access-tokens': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string } } responses: { @@ -18915,788 +18498,680 @@ export interface operations { 'application/json': components['schemas']['authorization'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + } + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + 'enterprise-admin/delete-personal-access-token': { + parameters: { + path: { + /** The unique identifier of the token. */ + token_id: components['parameters']['token-id'] + } + } + responses: { + /** Response */ + 204: never } } /** - * **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). + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. * - * 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)." + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * If the login name or email address is already associated with an account, the server will return a `422` response. */ - 'oauth-authorizations/create-authorization': { - parameters: {} + 'enterprise-admin/create-user': { responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['simple-user'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The user's username. */ + login: string /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems + * @description **Required for built-in authentication.** The user's email + * address. This parameter can be omitted when using CAS, LDAP, or SAML. + * For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description The OAuth app client key for which to create the token. */ - client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + email?: string } } } } /** - * **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)." + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. * - * **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 delete any user account except your own. */ - 'oauth-authorizations/get-or-create-authorization-for-app': { + 'enterprise-admin/delete-user': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } + /** Response */ + 204: never + } + } + 'enterprise-admin/update-username-for-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } - /** **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 - } + } + responses: { + /** Response */ + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + message?: string + url?: string + } } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + /** @description The user's new username. */ + login: string } } } } - /** - * **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': { + 'enterprise-admin/create-impersonation-o-auth-token': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - fingerprint: string + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ + /** Response when getting an existing impersonation OAuth token */ 200: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - /** Response if returning a new token */ + /** Response when creating a new impersonation OAuth token */ 201: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string + /** @description A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + scopes?: string[] } } } } - /** **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': { + 'enterprise-admin/delete-impersonation-o-auth-token': { parameters: { path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } + responses: { + /** Response */ + 204: never + } + } + /** + * 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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']['authorization'] + 'application/json': components['schemas']['integration'] } } - 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': { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + code: string } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 201: { + content: { + 'application/json': components['schemas']['integration'] & + ({ + client_id: string + client_secret: string + webhook_secret: string | null + pem: string + } & { [key: string]: unknown }) + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * **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)." + * 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 can only send one of these scope keys at a time. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'oauth-authorizations/update-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } + 'apps/get-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** @description A list of scopes to add to this authorization. */ - add_scopes?: string[] - /** @description A list of scopes to remove from this authorization. */ - remove_scopes?: string[] - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + 'application/json': components['schemas']['webhook-config'] } } } } - 'codes-of-conduct/get-all-codes-of-conduct': { - parameters: {} + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-of-conduct'][] + 'application/json': components['schemas']['webhook-config'] } } - 304: components['responses']['not_modified'] - } - } - 'codes-of-conduct/get-conduct-code': { - parameters: { - path: { - key: string - } } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'] + 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'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] } } - /** Lists all the emojis available to use on GitHub. */ - 'emojis/get': { - parameters: {} + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/list-webhook-deliveries': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } responses: { /** Response */ 200: { content: { - 'application/json': { [key: string]: string } + 'application/json': components['schemas']['hook-delivery-item'][] } } - 304: components['responses']['not_modified'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Returns a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-github-actions-permissions-enterprise': { + 'apps/get-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-enterprise-permissions'] + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-github-actions-permissions-enterprise': { + 'apps/redeliver-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_organizations: components['schemas']['enabled-organizations'] - allowed_actions?: components['schemas']['allowed-actions'] - } - } + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * The permissions the installation has are included under the `permissions` key. */ - 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { + 'apps/list-installations': { 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) */ + /** The number of 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: { - /** Response */ + /** The permissions the installation has are included under the `permissions` key. */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 'application/json': components['schemas']['installation'][] } } } } /** - * 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)." + * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + 'apps/get-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[] + 200: { + content: { + 'application/json': components['schemas']['installation'] } } + 404: components['responses']['not_found'] } } /** - * 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)." + * 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { + 'apps/delete-installation': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { + 'apps/create-installation-access-token': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['installation-token'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository names that the token should have access to */ + repositories?: string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * 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 Enterprise Server API or webhook events is blocked for that account. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-allowed-actions-enterprise': { + 'apps/suspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } + 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * Removes a GitHub App installation suspension. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-allowed-actions-enterprise': { + 'apps/unsuspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } + 404: components['responses']['not_found'] } } /** - * Lists all self-hosted runner groups for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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/enterprise-server@3.6/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"]`. */ - 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + 'oauth-authorizations/list-grants': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-enterprise'][] - } + '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'] } } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + 'application/json': components['schemas']['application-grant'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Gets a specific self-hosted runner group for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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). */ - 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + 'oauth-authorizations/delete-grant': { 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'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). */ - 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + 'apps/delete-authorization': { 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } + } } } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['authorization'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string } } } } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: number[] + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * **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`). * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + 'apps/get-by-slug': { 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'] + app_slug: components['parameters']['app-slug'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['integration'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { @@ -19704,454 +19179,493 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/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/enterprise-server@3.6/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 Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ - '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'] - } - } + 'oauth-authorizations/create-authorization': { + parameters: {} responses: { /** Response */ - 204: never + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description The OAuth app client key for which to create the token. */ + client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string } } } } /** - * Adds a self-hosted runner to a runner group configured in an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ - 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] } } responses: { - /** Response */ - 204: never + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } + } } } /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ - 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] + fingerprint: string } } responses: { - /** Response */ - 204: never + /** if returning an existing token */ + 200: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** Response if returning a new token */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + } + } } } - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** 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'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count?: number - runners?: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-runner-applications-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` + * You can only send one of these scope keys at a time. */ - 'enterprise-admin/create-registration-token-for-enterprise': { + 'oauth-authorizations/update-authorization': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['authorization'] } } + 422: components['responses']['validation_failed'] } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'enterprise-admin/create-remove-token-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + requestBody: { + content: { + 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[] + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[] + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } } } + } + 'codes-of-conduct/get-all-codes-of-conduct': { + parameters: {} responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['code-of-conduct'][] } } + 304: components['responses']['not_modified'] } } - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + 'codes-of-conduct/get-conduct-code': { 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'] + key: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner'] + 'application/json': components['schemas']['code-of-conduct'] } } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } + /** Lists all the emojis available to use on GitHub Enterprise Server. */ + 'emojis/get': { + parameters: {} responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': { [key: string]: string } + } + } + 304: components['responses']['not_modified'] } } - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + 'enterprise-admin/get-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } } } + } + /** Removes the global announcement banner in your enterprise. */ + 'enterprise-admin/remove-announcement': { responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 204: never } } - /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - } - } + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + 'enterprise-admin/set-announcement': { responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } + } } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] - } + 'application/json': components['schemas']['announcement'] } } } - /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + 'enterprise-admin/get-license-information': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license-info'] + } } } + } + 'enterprise-admin/get-all-stats': { responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-overview'] } } } } - /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + 'enterprise-admin/get-comment-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-comment-overview'] + } } } + } + 'enterprise-admin/get-gist-stats': { responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-gist-overview'] + } + } } } - /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] + 'enterprise-admin/get-hooks-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-hook-overview'] + } } } + } + 'enterprise-admin/get-issue-stats': { responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-issue-overview'] + } + } } } - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - 'enterprise-admin/get-audit-log': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + 'enterprise-admin/get-milestone-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-milestone-overview'] + } } - query: { - /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ - phrase?: components['parameters']['audit-log-phrase'] - /** - * The event types to include: - * - * - `web` - returns web (non-Git) events. - * - `git` - returns Git events. - * - `all` - returns both web and Git events. - * - * The default is `web`. - */ - include?: components['parameters']['audit-log-include'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['audit-log-after'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['audit-log-before'] - /** - * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. - * - * The default is `desc`. - */ - order?: components['parameters']['audit-log-order'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + } + } + 'enterprise-admin/get-org-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-organization-overview'] + } } } + } + 'enterprise-admin/get-pages-stats': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': components['schemas']['enterprise-page-overview'] } } } } - /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). - */ - 'secret-scanning/list-alerts-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + 'enterprise-admin/get-pull-request-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-pull-request-overview'] + } } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] + } + } + 'enterprise-admin/get-repo-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-repository-overview'] + } } } + } + 'enterprise-admin/get-user-stats': { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] + 'application/json': components['schemas']['enterprise-user-overview'] } } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-github-actions-billing-ghe': { + 'actions/get-actions-cache-usage-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ @@ -20161,47 +19675,41 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['actions-billing-usage'] + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] } } } } /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'billing/get-github-advanced-security-billing-ghe': { + 'actions/get-actions-cache-usage-policy-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: { - /** Success */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['advanced-security-active-committers'] + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } - 403: components['responses']['code_scanning_forbidden_read'] } } /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'billing/get-github-packages-billing-ghe': { + 'actions/set-actions-cache-usage-policy-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ @@ -20210,21 +19718,20 @@ export interface operations { } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-shared-storage-billing-ghe': { + '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. */ @@ -20235,64 +19742,49 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['combined-billing-usage'] + 'application/json': components['schemas']['actions-enterprise-permissions'] } } } } - /** 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': { + /** + * 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: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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']['event'][] + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_organizations: components['schemas']['enabled-organizations'] + allowed_actions?: components['schemas']['allowed-actions'] } } - 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. + * 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)." * - * **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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - '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': { + '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: { - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20301,355 +19793,357 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] } } /** - * Allows you to add a new gist with one or more files. + * 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)." * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'gists/create': { - parameters: {} + 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } responses: { /** Response */ - 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'] + 204: never } requestBody: { content: { 'application/json': { - /** - * @description Description of the gist - * @example Example Ruby script - */ - description?: string - /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } - */ - files: { - [key: string]: { - /** @description Content of the file */ - content: string - } - } - public?: boolean | ('true' | 'false') + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[] } } } } /** - * List public gists sorted by most recently updated to least recently updated. + * 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)." * - * 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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'gists/list-public': { + 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { 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'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } 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'] + 204: never } } - /** List the authenticated user's starred gists: */ - 'gists/list-starred': { + /** + * 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: { - 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'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } 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'] + 204: never } } - 'gists/get': { + /** + * 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: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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']['gist-simple'] + 'application/json': components['schemas']['selected-actions'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] } } - 'gists/delete': { + /** + * 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: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] + } } } - /** 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': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/get-github-actions-default-workflow-permissions-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response */ + /** Success response */ 200: { content: { - 'application/json': components['schemas']['gist-simple'] + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/set-github-actions-default-workflow-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: { + /** Success response */ + 204: never } requestBody: { content: { - 'application/json': { - /** - * @description Description of the gist - * @example Example Ruby script - */ - description?: string - /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } - */ - files?: { [key: string]: { [key: string]: unknown } } - } | null + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - 'gists/list-comments': { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components['parameters']['visible-to-organization'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-comment'][] + 'application/json': { + total_count: number + runner_groups: components['schemas']['runner-groups-enterprise'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/create-comment': { + /** + * Creates a new self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['gist-comment'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name: string /** - * @description The comment text. - * @example Body of the attachment + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} */ - body: string - } - } - } + visibility?: 'selected' | 'all' + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } + } + } } - 'gists/get-comment': { + /** + * Gets a specific self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** 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']['gist-comment'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] } } - 'gists/delete-comment': { + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/update-comment': { + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** 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']['gist-comment'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name?: string /** - * @description The comment text. - * @example Body of the attachment + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} */ - body: string - } - } - } - } - 'gists/list-commits': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['gist-commit'][] + visibility?: 'selected' | 'all' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/list-forks': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20658,228 +20152,200 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-simple'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-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': { + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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 */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['base-gist'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - 'gists/check-is-starred': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response if gist is starred */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - 404: { - content: { - 'application/json': { [key: string]: unknown } + } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[] } } } } - /** 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': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/unstar': { + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/get-revision': { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - sha: string + /** 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']['gist-simple'] - } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } - 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: { + headers: {} content: { - 'application/json': string[] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } - 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. + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'gitignore/get-template': { + 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - name: string + /** 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']['gitignore-template'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } - 304: components['responses']['not_modified'] } } /** - * List repositories that an app installation can access. + * Adds a self-hosted runner to a runner group configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. */ - 'apps/list-repos-accessible-to-installation': { + 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - repositories: components['schemas']['repository'][] - /** @example selected */ - repository_selection?: string - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } } /** - * 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. + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/revoke-installation-access-token': { - parameters: {} + 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } responses: { /** Response */ 204: never } } /** - * 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. - * + * Lists all self-hosted runners configured for an enterprise. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'issues/list': { + '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: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - collab?: boolean - orgs?: boolean - owned?: boolean - pulls?: boolean - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20890,262 +20356,335 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': { + total_count?: number + runners?: components['schemas']['runner'][] + } } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'licenses/get-all-commonly-used': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-runner-applications-for-enterprise': { parameters: { - query: { - featured?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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']['license-simple'][] + 'application/json': components['schemas']['runner-application'][] } } - 304: components['responses']['not_modified'] } } - 'licenses/get': { + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + 'enterprise-admin/create-registration-token-for-enterprise': { parameters: { path: { - license: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['license'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'markdown/render': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: { - 'Content-Length'?: string - } - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] - } - requestBody: { - content: { - 'application/json': { - /** @description The Markdown text to render in HTML. */ - text: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - mode?: 'markdown' | 'gfm' - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - context?: string - } + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } - } - /** 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: {} + 201: { content: { - 'text/html': string + 'application/json': components['schemas']['authentication-token'] } } - 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. + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. * - * 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. + * ``` + * ./config.sh remove --token TOKEN + * ``` */ - 'apps/get-subscription-plan-for-account': { + 'enterprise-admin/create-remove-token-for-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** 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']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: { + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['authentication-token'] } } } } /** - * Lists all plans that are part of your GitHub Marketplace listing. + * Gets a specific self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-plans': { + 'enterprise-admin/get-self-hosted-runner-for-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['runner'] } } - 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. + * 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. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-accounts-for-plan': { + 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { 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'] + /** 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: { - headers: {} - content: { - 'application/json': components['schemas']['marketplace-purchase'][] - } - } - 401: components['responses']['requires_authentication'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 204: never } } /** - * 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. + * Lists all labels for a self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/get-subscription-plan-for-account-stubbed': { + 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] - } + /** 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']['marketplace-purchase'] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + } + } + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] } } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: unknown } } /** - * Lists all plans that are part of your GitHub Marketplace listing. + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] + } + } + } + } + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-plans-stubbed': { + 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + 'enterprise-admin/get-audit-log': { parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['audit-log-event'][] } } - 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. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ - 'apps/list-accounts-for-plan-stubbed': { + 'secret-scanning/list-alerts-for-enterprise': { parameters: { path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } 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) */ + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] } } responses: { @@ -21153,37 +20692,48 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': components['schemas']['organization-secret-scanning-alert'][] } } - 401: components['responses']['requires_authentication'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * Gets the GitHub Advanced Security active committers for an enterprise per repository. * - * **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. + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ - 'meta/get': { - parameters: {} + 'billing/get-github-advanced-security-billing-ghe': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } responses: { - /** Response */ + /** Success */ 200: { content: { - 'application/json': components['schemas']['api-overview'] + 'application/json': components['schemas']['advanced-security-active-committers'] } } - 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] } } - 'activity/list-public-events-for-repo-network': { + /** 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: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21196,25 +20746,42 @@ export interface operations { 'application/json': components['schemas']['event'][] } } - 301: components['responses']['moved_permanently'] 304: components['responses']['not_modified'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - /** List all notifications for the current user, sorted by most recently updated. */ - 'activity/list-notifications-for-authenticated-user': { + /** + * GitHub Enterprise Server 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 Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. + * + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/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: { - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21225,97 +20792,109 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['base-gist'][] } } 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': { + /** + * 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 */ - 202: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - message?: string - } + 'application/json': components['schemas']['gist-simple'] } } - /** Reset Content */ - 205: unknown 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': { /** - * Format: date-time - * @description Describes the last point that notifications were checked. + * @description Description of the gist + * @example Example Ruby script */ - last_read_at?: string - /** @description Whether the notification has been read. */ - read?: boolean + description?: string + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string + } + } + public?: boolean | ('true' | 'false') } } } } - 'activity/get-thread': { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['base-gist'][] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - 'activity/mark-thread-as-read': { - parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] - } - } - responses: { - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** List the authenticated user's starred gists: */ + 'gists/list-starred': { parameters: { - path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + 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'] + /** The number of results per page (max 100). */ + per_page?: 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-subscription'] + 'application/json': components['schemas']['base-gist'][] } } 304: components['responses']['not_modified'] @@ -21323,539 +20902,491 @@ export interface operations { 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': { + 'gists/get': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['thread-subscription'] + 'application/json': components['schemas']['gist-simple'] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description Whether to block all notifications from a thread. - * @default false - */ - ignored?: boolean - } - } + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - /** 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': { + 'gists/delete': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 204: never 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Get the octocat as ASCII art */ - 'meta/get-octocat': { + /** Allows you to update a gist's description and to update, delete, or rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ + 'gists/update': { parameters: { - query: { - /** The words to show in Octocat's speech bubble */ - s?: string + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 200: { content: { - 'application/octocat-stream': string + 'application/json': components['schemas']['gist-simple'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: { [key: string]: unknown } } + } | null + } } } - /** - * 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': { + 'gists/list-comments': { parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - since?: components['parameters']['since-org'] - /** Results per page (max 100) */ + /** The number of results per 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 - } + headers: {} content: { - 'application/json': components['schemas']['organization-simple'][] + 'application/json': components['schemas']['gist-comment'][] } } 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - 'orgs/list-custom-roles': { + 'gists/create-comment': { parameters: { path: { - organization_id: string + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Response - list of custom role names */ - 200: { + /** Response */ + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - /** - * @description The number of custom roles in this organization - * @example 3 - */ - total_count?: number - custom_roles?: components['schemas']['organization-custom-repository-role'][] - } + 'application/json': components['schemas']['gist-comment'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string } } } } - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/list-linked-external-idp-groups-to-team-for-org': { + 'gists/get-comment': { parameters: { path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['external-groups'] + 'application/json': components['schemas']['gist-comment'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - 'orgs/get': { + 'gists/delete-comment': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-full'] - } - } + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 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': { + 'gists/update-comment': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-full'] - } - } - 409: components['responses']['conflict'] - /** Validation failed */ - 422: { - content: { - 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + 'application/json': components['schemas']['gist-comment'] } } + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string - /** @description The company name. */ - company?: string - /** @description The publicly visible email address. */ - email?: string - /** @description The Twitter username of the company. */ - twitter_username?: string - /** @description The location. */ - location?: string - /** @description The shorthand name of the company. */ - name?: string - /** @description The description of the company. */ - description?: string - /** @description Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_repositories?: boolean - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_public_pages?: boolean /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false + * @description The comment text. + * @example Body of the attachment */ - members_can_fork_private_repositories?: boolean - /** @example "http://github.blog" */ - blog?: string + body: string } } } } - /** - * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-permissions-organization': { + 'gists/list-commits': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per 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']['actions-organization-permissions'] + 'application/json': components['schemas']['gist-commit'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/list-forks': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_repositories: components['schemas']['enabled-repositories'] - allowed_actions?: components['schemas']['allowed-actions'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['gist-simple'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/fork': { 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'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - total_count: number - repositories: components['schemas']['repository'][] - } + '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'] } } - /** - * 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': { + 'gists/check-is-starred': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Response */ + /** Response if gist is starred */ 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + 404: { + content: { + 'application/json': { [key: string]: unknown } } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'gists/star': { parameters: { path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/unstar': { parameters: { path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/get-revision': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + sha: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['selected-actions'] + '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/enterprise-server@3.6/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'] } } /** - * 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. + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ - 'actions/set-allowed-actions-organization': { + 'gitignore/get-template': { parameters: { path: { - org: components['parameters']['org'] + name: string } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] + 200: { + content: { + 'application/json': components['schemas']['gitignore-template'] + } } + 304: components['responses']['not_modified'] } } /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * List repositories that an app installation can access. * - * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/get-github-actions-default-workflow-permissions-organization': { + 'apps/list-repos-accessible-to-installation': { parameters: { - path: { - org: components['parameters']['org'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + 'application/json': { + total_count: number + repositories: components['schemas']['repository'][] + /** @example selected */ + repository_selection?: string + } } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. * - * 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. + * 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/set-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } + 'apps/revoke-installation-access-token': { + parameters: {} responses: { /** Response */ 204: never } - requestBody: { - content: { - 'application/json': components['schemas']['actions-set-default-workflow-permissions'] - } - } } /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." + * 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. * - * 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. + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'actions/list-self-hosted-runner-groups-for-org': { + 'issues/list': { parameters: { - path: { - org: components['parameters']['org'] + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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 + /** The number of results per page (max 100). */ + per_page?: 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: { - /** Results per page (max 100) */ + featured?: boolean + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21865,372 +21396,523 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-org'][] - } + 'application/json': components['schemas']['license-simple'][] } } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'licenses/get': { parameters: { path: { - org: components['parameters']['org'] + license: string } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['license'] + } + } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + 'markdown/render': { + parameters: {} + responses: { + /** Response */ + 200: { + headers: { + 'Content-Length'?: string + } + content: { + 'text/html': string } } + 304: components['responses']['not_modified'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string + /** @description The Markdown text to render in HTML. */ + text: string /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all + * @description The rendering mode. + * @default markdown + * @example markdown * @enum {string} */ - visibility?: 'selected' | 'all' | 'private' - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + mode?: 'markdown' | 'gfm' + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string } } } } - /** - * 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'] + /** 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 } } + } + 'meta/get': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['api-overview'] } } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'activity/list-public-events-for-repo-network': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 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'] } } - /** - * 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': { + /** List all notifications for the current user, sorted by most recently updated. */ + 'activity/list-notifications-for-authenticated-user': { parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + 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'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 50). */ + per_page?: number } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['runner-groups-org'] + '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" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-notifications-as-read': { + parameters: {} + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + } } } + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' /** - * @description Whether the runner group can be used by `public` repositories. - * @default false + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */ - allows_public_repositories?: boolean + last_read_at?: string + /** @description Whether the notification has been read. */ + read?: boolean } } } } - /** - * 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': { + /** Gets information about a notification thread. */ + 'activity/get-thread': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } + 'application/json': components['schemas']['thread'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ + 'activity/mark-thread-as-read': { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * 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)." + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). * - * Replaces the list of repositories that have access to a self-hosted runner group configured in an organization. + * 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: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + 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 must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ - 'actions/set-repo-access-to-self-hosted-runner-group-in-org': { + 'activity/set-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['thread-subscription'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: number[] + /** + * @description Whether to block all notifications from a thread. + * @default false + */ + ignored?: boolean } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + 'activity/delete-thread-subscription': { 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'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Get the octocat as ASCII art */ + 'meta/get-octocat': { + parameters: { + query: { + /** The words to show in Octocat's speech bubble */ + s?: string + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/octocat-stream': string + } + } } } /** - * 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 organizations, in the order that they were created on GitHub Enterprise Server. * - * 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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ - 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + 'orgs/list': { 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'] + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components['parameters']['since-org'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 204: never + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + 304: components['responses']['not_modified'] } } /** - * 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)." + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. * - * Lists self-hosted runners that are in a specific organization group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - 'actions/list-self-hosted-runners-in-group-for-org': { + 'orgs/list-custom-roles': { 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'] + /** The unique identifier of the organization. */ + organization_id: string } } responses: { - /** Response */ + /** Response - list of custom role names */ 200: { - headers: {} content: { 'application/json': { - total_count: number - runners: components['schemas']['runner'][] + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number + custom_roles?: components['schemas']['organization-custom-repository-role'][] } } } } } /** - * 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. + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." */ - 'actions/set-self-hosted-runners-in-group-for-org': { + 'orgs/get': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + 200: { + content: { + 'application/json': components['schemas']['organization-full'] } } + 404: components['responses']['not_found'] } } /** - * 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. + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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). * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ - 'actions/add-self-hosted-runner-to-group-for-org': { + 'orgs/update': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 409: components['responses']['conflict'] + /** Validation failed */ + 422: { + content: { + 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Billing email address. This address is not publicized. */ + billing_email?: string + /** @description The company name. */ + company?: string + /** @description The publicly visible email address. */ + email?: string + /** @description The Twitter username of the company. */ + twitter_username?: string + /** @description The location. */ + location?: string + /** @description The shorthand name of the company. */ + name?: string + /** @description The description of the company. */ + description?: string + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean + /** @description 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+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean + /** + * @description Specifies which types of repositories non-admin organization members can create. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean + /** @example "http://github.blog" */ + blog?: string + } + } } } /** - * 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. + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/remove-self-hosted-runner-from-group-for-org': { + 'actions/get-actions-cache-usage-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } + } } } /** - * 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. + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/list-self-hosted-runners-for-org': { + 'actions/get-actions-cache-usage-by-repo-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22243,20 +21925,21 @@ export interface operations { content: { 'application/json': { total_count: number - runners: components['schemas']['runner'][] + repository_cache_usages: components['schemas']['actions-cache-usage-by-repository'][] } } } } } /** - * Lists binaries for the runner application that you can download and run. + * 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. + * 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-runner-applications-for-org': { + 'actions/get-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22264,101 +21947,105 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-application'][] + 'application/json': components['schemas']['actions-organization-permissions'] } } } } /** - * 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 + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * 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. * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` + * 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/create-registration-token-for-org': { + 'actions/set-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_repositories: components['schemas']['enabled-repositories'] + allowed_actions?: components['schemas']['allowed-actions'] } } } } /** - * 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. + * 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)." * - * ``` - * ./config.sh remove --token TOKEN - * ``` + * 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/create-remove-token-for-org': { + 'actions/list-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': { + total_count: number + repositories: components['schemas']['repository'][] + } } } } } /** - * Gets a specific self-hosted runner configured in an 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. + * 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-self-hosted-runner-for-org': { + 'actions/set-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[] } } } } /** - * 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. + * 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. + * 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/delete-self-hosted-runner-from-org': { + 'actions/enable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { @@ -22367,346 +22054,434 @@ export interface operations { } } /** - * Lists all labels for a self-hosted runner configured in an 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. + * 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-labels-for-self-hosted-runner-for-org': { + 'actions/disable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 204: never } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. + * 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. + * 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-custom-labels-for-self-hosted-runner-for-org': { + 'actions/get-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] } } } } /** - * Add custom labels to a self-hosted runner configured in an 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)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/add-custom-labels-to-self-hosted-runner-for-org': { + 'actions/set-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } + 'application/json': components['schemas']['selected-actions'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-all-custom-labels-from-self-hosted-runner-for-org': { + 'actions/get-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-custom-label-from-self-hosted-runner-for-org': { + 'actions/set-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components['parameters']['visible-to-repository'] } } responses: { /** Response */ 200: { - headers: {} content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-actions-secret'][] + runner_groups: components['schemas']['runner-groups-org'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-actions-secret'] + 'application/json': components['schemas']['runner-groups-org'] } } } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/create-or-update-org-secret': { + 'actions/delete-self-hosted-runner-group-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + 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']['empty-object'] + 'application/json': components['schemas']['runner-groups-org'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + /** @description Name of the runner group. */ + name: string /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. * @enum {string} */ - visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] + visibility?: 'selected' | 'all' | 'private' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 204: never } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[] + } + } + } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - repositories: components['schemas']['minimal-repository'][] + runners: components['schemas']['runner'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { @@ -22716,96 +22491,92 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/add-selected-repo-to-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** 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: { - /** No Content when repository was added to the selected list */ + /** Response */ 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/remove-selected-repo-from-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response when repository was removed from the selected list */ + /** Response */ 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown } } /** - * 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)." + * Lists all self-hosted runners configured in an organization. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/get-audit-log': { + 'actions/list-self-hosted-runners-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } } } - /** List the users blocked by an organization. */ - 'orgs/list-blocked-users': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22813,151 +22584,243 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['runner-application'][] } } - 415: components['responses']['preview_header_missing'] } } - 'orgs/check-blocked-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { - /** If the user is blocked: */ - 204: never - /** If the user is not blocked: */ - 404: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['authentication-token'] } } } } - 'orgs/block-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } } } - 'orgs/unblock-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } } } /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * 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. * - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'code-scanning/list-alerts-for-org': { + 'actions/delete-self-hosted-runner-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - sort?: 'created' | 'updated' + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['code-scanning-organization-alert-items'][] - } + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - 403: components['responses']['code_scanning_forbidden_read'] + } + responses: { + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/list-saml-sso-authorizations': { + 'actions/set-custom-labels-for-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - login?: string + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + 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']['credential-authorization'][] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] } } } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/remove-saml-sso-authorization': { + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - credential_id: number + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels_readonly'] 404: components['responses']['not_found'] } } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-org-secrets': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Lists 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22970,16 +22833,17 @@ export interface operations { content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-dependabot-secret'][] + secrets: components['schemas']['organization-actions-secret'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-public-key': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22987,17 +22851,18 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + '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 `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23005,7 +22870,7 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-dependabot-secret'] + 'application/json': components['schemas']['organization-actions-secret'] } } } @@ -23013,8 +22878,387 @@ export interface operations { /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + * use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` + */ + 'actions/create-or-update-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[] + } + } + } + } + /** 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ + 'actions/list-selected-repos-for-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] + } + } + } + } + /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown + } + } + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown + } + } + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." + */ + 'orgs/get-audit-log': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results 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']['audit-log-event'][] + } + } + } + } + /** + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alerts-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + 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'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['code-scanning-organization-alert-items'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-org-secrets': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + 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-dependabot-secret'][] + } + } + } + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-public-key': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-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 `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-dependabot-secret'] + } + } + } + } + /** + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. * * #### Example encrypting a secret using Node.js * @@ -23090,8 +23334,9 @@ export interface operations { 'dependabot/create-or-update-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23108,19 +23353,16 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string /** - * @description 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. + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. * @enum {string} */ visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ selected_repository_ids?: string[] } } @@ -23130,8 +23372,9 @@ export interface operations { 'dependabot/delete-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23144,14 +23387,15 @@ export interface operations { 'dependabot/list-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } query: { /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -23167,12 +23411,13 @@ export interface operations { } } } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ 'dependabot/set-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23183,18 +23428,19 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ selected_repository_ids: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ 'dependabot/add-selected-repo-to-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23206,12 +23452,13 @@ export interface operations { 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ 'dependabot/remove-selected-repo-from-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23226,10 +23473,11 @@ export interface operations { 'activity/list-public-org-events': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23247,13 +23495,14 @@ export interface operations { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ 'teams/external-idp-group-info-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** group_id parameter */ + /** The unique identifier of the group. */ group_id: components['parameters']['group-id'] } } @@ -23267,17 +23516,18 @@ export interface operations { } } /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ 'teams/list-external-idp-groups-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page token */ page?: number @@ -23297,37 +23547,14 @@ export interface operations { } } } - /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23348,6 +23575,7 @@ export interface operations { 'orgs/create-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23369,7 +23597,7 @@ export interface operations { 'application/json': { /** @description Must be passed as "web". */ name: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-hook-config-params). */ config: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23381,7 +23609,7 @@ export interface operations { password?: string } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23400,7 +23628,9 @@ export interface operations { 'orgs/get-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23417,7 +23647,9 @@ export interface operations { 'orgs/delete-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23431,7 +23663,9 @@ export interface operations { 'orgs/update-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23448,7 +23682,7 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-hook-config-params). */ config?: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23456,7 +23690,7 @@ export interface operations { insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23481,7 +23715,9 @@ export interface operations { 'orgs/get-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23502,7 +23738,9 @@ export interface operations { 'orgs/update-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23529,11 +23767,13 @@ export interface operations { 'orgs/list-webhook-deliveries': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor?: components['parameters']['cursor'] @@ -23554,7 +23794,9 @@ export interface operations { 'orgs/get-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23574,7 +23816,9 @@ export interface operations { 'orgs/redeliver-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23585,11 +23829,13 @@ export interface operations { 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ 'orgs/ping-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23602,11 +23848,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-org-installation': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23623,10 +23870,11 @@ export interface operations { 'orgs/list-app-installations': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23645,203 +23893,34 @@ export interface operations { } } } - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - 'interactions/set-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - 'interactions/remove-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - 'orgs/list-pending-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'orgs/create-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['organization-invitation'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - invitee_id?: number - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - email?: string - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: number[] - } - } - } - } - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - 'orgs/cancel-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - 'orgs/list-invitation-teams': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] - } - } /** * List issues in an organization assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23862,23 +23941,15 @@ export interface operations { 'orgs/list-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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 members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ 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. - */ + /** Filter members returned by their role. */ role?: 'all' | 'admin' | 'member' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23892,8 +23963,6 @@ export interface operations { 'application/json': components['schemas']['simple-user'][] } } - /** Response if requester is not an organization member */ - 302: never 422: components['responses']['validation_failed'] } } @@ -23901,7 +23970,9 @@ export interface operations { 'orgs/check-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23918,7 +23989,9 @@ export interface operations { 'orgs/remove-member': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23932,7 +24005,9 @@ export interface operations { 'orgs/get-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23950,7 +24025,7 @@ export interface operations { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -23961,7 +24036,9 @@ export interface operations { 'orgs/set-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23998,7 +24075,9 @@ export interface operations { 'orgs/remove-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24013,10 +24092,11 @@ export interface operations { 'migrations/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24038,6 +24118,7 @@ export interface operations { 'migrations/start-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24062,6 +24143,16 @@ export interface operations { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean /** * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). * @default false @@ -24080,6 +24171,13 @@ export interface operations { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ exclude?: 'repositories'[] } } @@ -24098,8 +24196,9 @@ export interface operations { 'migrations/get-status-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { @@ -24122,96 +24221,20 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Fetches the URL to a migration archive. */ - 'migrations/download-archive-for-org': { + /** List all users who are outside collaborators of an organization. */ + 'orgs/list-outside-collaborators': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 302: never - 404: components['responses']['not_found'] - } - } - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - 'migrations/delete-archive-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - 'migrations/unlock-repo-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** List all the repositories for this organization migration. */ - 'migrations/list-repos-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** List all users who are outside collaborators of an organization. */ - 'orgs/list-outside-collaborators': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. - */ - filter?: '2fa_disabled' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + } + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: '2fa_disabled' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { @@ -24224,11 +24247,13 @@ export interface operations { } } } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 'orgs/convert-member-to-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24241,16 +24266,29 @@ export interface operations { } /** User was converted */ 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 403: unknown 404: components['responses']['not_found'] } + requestBody: { + content: { + 'application/json': { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean + } + } + } } /** Removing a user from this list will remove them from all the organization's repositories. */ 'orgs/remove-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24268,249 +24306,110 @@ export interface operations { } } } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-organization': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-org': { parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The sort order for the response collection. */ + sort?: 'created' | 'updated' | 'name' + } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'][] + 'application/json': components['schemas']['org-pre-receive-hook'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-organization': { + 'enterprise-admin/get-pre-receive-hook-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-org': { + /** Removes any overrides for this hook at the org level for this org. */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'][] + 'application/json': components['schemas']['org-pre-receive-hook'] } } - 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': { + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + requestBody: { + content: { + 'application/json': { + /** @description The state of enforcement for the hook on this repository. */ + enforcement?: string + /** @description Whether repositories can override enforcement. */ + allow_downstream_configuration?: boolean + } } } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } } /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24527,10 +24426,11 @@ export interface operations { 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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24562,10 +24462,11 @@ export interface operations { 'orgs/list-public-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24584,7 +24485,9 @@ export interface operations { 'orgs/check-public-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24598,12 +24501,14 @@ export interface operations { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'orgs/set-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24616,7 +24521,9 @@ export interface operations { 'orgs/remove-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24629,16 +24536,17 @@ export interface operations { 'repos/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24659,7 +24567,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -24667,6 +24575,7 @@ export interface operations { 'repos/create-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24758,6 +24667,46 @@ export interface operations { * @default false */ delete_branch_on_merge?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' } } } @@ -24765,12 +24714,14 @@ export interface operations { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ 'secret-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { @@ -24778,15 +24729,19 @@ export interface operations { state?: components['parameters']['secret-scanning-alert-state'] /** * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ secret_type?: components['parameters']['secret-scanning-alert-secret-type'] /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -24803,39 +24758,22 @@ export interface operations { } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. + * Gets the GitHub Advanced Security active committers for an organization per repository. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-actions-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ 'billing/get-github-advanced-security-billing-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24851,87 +24789,15 @@ export interface operations { 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-packages-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-shared-storage-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - 'teams/list-idp-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: string - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } /** Lists all teams in an organization that are visible to the authenticated user. */ 'teams/list': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24956,6 +24822,7 @@ export interface operations { 'teams/create': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24993,29 +24860,30 @@ export interface operations { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ permission?: 'pull' | 'push' /** @description The ID of a team to set as the parent team. */ parent_team_id?: number + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." */ + ldap_dn?: string } } } } /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25039,8 +24907,9 @@ export interface operations { 'teams/delete-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25057,18 +24926,28 @@ export interface operations { 'teams/update-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ 201: { content: { 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { @@ -25088,10 +24967,7 @@ export interface operations { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ @@ -25103,21 +24979,22 @@ export interface operations { } } /** - * 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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25136,17 +25013,18 @@ export interface operations { } } /** - * 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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ 'teams/create-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25175,16 +25053,18 @@ export interface operations { } } /** - * 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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25198,16 +25078,18 @@ export interface operations { } } /** - * 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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25217,16 +25099,18 @@ export interface operations { } } /** - * 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/). + * 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25250,22 +25134,24 @@ export interface operations { } } /** - * 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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25282,18 +25168,20 @@ export interface operations { } } /** - * 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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ 'teams/create-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25315,17 +25203,20 @@ export interface operations { } } /** - * 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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25339,17 +25230,20 @@ export interface operations { } } /** - * 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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25359,17 +25253,20 @@ export interface operations { } } /** - * 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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25391,23 +25288,26 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25424,22 +25324,25 @@ export interface operations { } } /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ 'reactions/create-for-team-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } responses: { - /** Response */ + /** Response when the reaction type has already been added to this team discussion comment */ 200: { content: { 'application/json': components['schemas']['reaction'] @@ -25456,7 +25359,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25467,16 +25370,20 @@ export interface operations { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion-comment': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25486,22 +25393,24 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25518,16 +25427,18 @@ export interface operations { } } /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ 'reactions/create-for-team-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25549,7 +25460,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25560,15 +25471,18 @@ export interface operations { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25577,16 +25491,40 @@ export interface operations { 204: never } } + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-linked-external-idp-groups-to-team-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-groups'] + } + } + } + } /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'teams/unlink-external-idp-group-from-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25598,13 +25536,14 @@ export interface operations { /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ 'teams/link-external-idp-group-to-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25628,35 +25567,6 @@ export interface operations { } } } - /** - * 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. * @@ -25665,19 +25575,15 @@ export interface operations { 'teams/list-members-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ 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. - */ + /** Filters members returned by their role in the team. */ role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25703,14 +25609,16 @@ export interface operations { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ 'teams/get-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25730,7 +25638,7 @@ export interface operations { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -25741,9 +25649,11 @@ export interface operations { 'teams/add-or-update-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25763,9 +25673,7 @@ export interface operations { content: { 'application/json': { /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @description The role that this user should have in the team. * @default member * @enum {string} */ @@ -25779,16 +25687,18 @@ export interface operations { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ 'teams/remove-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25807,12 +25717,13 @@ export interface operations { 'teams/list-projects-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25836,9 +25747,11 @@ export interface operations { 'teams/check-permissions-for-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25861,9 +25774,11 @@ export interface operations { 'teams/add-or-update-project-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25884,11 +25799,7 @@ export interface operations { content: { 'application/json': { /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." * @enum {string} */ permission?: 'read' | 'write' | 'admin' @@ -25904,9 +25815,11 @@ export interface operations { 'teams/remove-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25923,12 +25836,13 @@ export interface operations { 'teams/list-repos-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25947,7 +25861,7 @@ export interface operations { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -25956,10 +25870,13 @@ export interface operations { 'teams/check-permissions-for-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -25977,7 +25894,7 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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}`. * @@ -25986,10 +25903,13 @@ export interface operations { 'teams/add-or-update-repo-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26001,19 +25921,10 @@ export interface operations { content: { 'application/json': { /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @description The permission to grant the team on 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. * @default push - * @enum {string} */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + permission?: string } } } @@ -26026,10 +25937,13 @@ export interface operations { 'teams/remove-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26038,69 +25952,6 @@ export interface operations { 204: never } } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/list-idp-groups-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/create-or-update-idp-group-connections-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups?: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - }[] - } - } - } - } /** * Lists the child teams of the team specified by `{team_slug}`. * @@ -26109,12 +25960,13 @@ export interface operations { 'teams/list-child-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26133,7 +25985,7 @@ export interface operations { 'projects/get-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26153,7 +26005,7 @@ export interface operations { 'projects/delete-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26178,7 +26030,7 @@ export interface operations { 'projects/update-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26215,7 +26067,7 @@ export interface operations { 'projects/move-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26279,7 +26131,7 @@ export interface operations { 'projects/get-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26299,7 +26151,7 @@ export interface operations { 'projects/delete-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26314,7 +26166,7 @@ export interface operations { 'projects/update-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26344,13 +26196,13 @@ export interface operations { 'projects/list-cards': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ 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`. */ + /** Filters the project cards that are returned by the card's state. */ archived_state?: 'all' | 'archived' | 'not_archived' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26372,7 +26224,7 @@ export interface operations { 'projects/create-card': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26435,7 +26287,7 @@ export interface operations { 'projects/move-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26467,6 +26319,7 @@ export interface operations { 'projects/get': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26486,6 +26339,7 @@ export interface operations { 'projects/delete': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26512,6 +26366,7 @@ export interface operations { 'projects/update': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26572,17 +26427,13 @@ export interface operations { 'projects/list-collaborators': { parameters: { path: { + /** The unique identifier of the project. */ 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. - */ + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26607,7 +26458,9 @@ export interface operations { 'projects/add-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26638,7 +26491,9 @@ export interface operations { 'projects/remove-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26656,7 +26511,9 @@ export interface operations { 'projects/get-permission-for-user': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26677,10 +26534,11 @@ export interface operations { 'projects/list-columns': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26702,6 +26560,7 @@ export interface operations { 'projects/create-column': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26748,31 +26607,13 @@ export interface operations { 404: components['responses']['not_found'] } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - 'reactions/delete-legacy': { - parameters: { - path: { - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - } - } /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ 'repos/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26797,7 +26638,9 @@ export interface operations { 'repos/delete': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26817,11 +26660,13 @@ export interface operations { 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ 'repos/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26848,7 +26693,7 @@ export interface operations { homepage?: string /** * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. * @default false */ private?: boolean @@ -26857,7 +26702,16 @@ export interface operations { * @enum {string} */ visibility?: 'public' | 'private' | 'internal' - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ security_and_analysis?: { /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ advanced_security?: { @@ -26869,6 +26723,11 @@ export interface operations { /** @description Can be `enabled` or `disabled`. */ status?: string } + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } } | null /** * @description Either `true` to enable issues for this repository or `false` to disable them. @@ -26917,6 +26776,51 @@ export interface operations { * @default false */ delete_branch_on_merge?: boolean + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. * @default false @@ -26927,6 +26831,11 @@ export interface operations { * @default false */ allow_forking?: boolean + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean } } } @@ -26935,11 +26844,13 @@ export interface operations { 'actions/list-artifacts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26962,9 +26873,11 @@ export interface operations { 'actions/get-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -26981,9 +26894,11 @@ export interface operations { 'actions/delete-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -27001,9 +26916,11 @@ export interface operations { 'actions/download-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] archive_format: string } @@ -27011,15 +26928,88 @@ export interface operations { responses: { /** Response */ 302: never + 410: components['responses']['gone'] + } + } + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-by-repository'] + } + } + } + } + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } + } + } + } + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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/set-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27041,9 +27031,11 @@ export interface operations { 'actions/download-job-logs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27052,16 +27044,50 @@ export interface operations { 302: never } } + /** Re-run a job and its dependent jobs in 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/re-run-job-for-workflow-run': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } + } /** * 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. + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27084,7 +27110,9 @@ export interface operations { 'actions/set-github-actions-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27101,6 +27129,57 @@ export interface operations { } } } + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/get-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } + } + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/set-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } /** * 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)." * @@ -27109,7 +27188,9 @@ export interface operations { 'actions/get-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27134,7 +27215,9 @@ export interface operations { 'actions/set-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27148,15 +27231,70 @@ export interface operations { } } } + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/get-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/set-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } + } + } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27183,7 +27321,9 @@ export interface operations { 'actions/list-runner-applications-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27211,7 +27351,9 @@ export interface operations { 'actions/create-registration-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27239,7 +27381,9 @@ export interface operations { 'actions/create-remove-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27261,7 +27405,9 @@ export interface operations { 'actions/get-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27285,7 +27431,9 @@ export interface operations { 'actions/delete-self-hosted-runner-from-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27305,7 +27453,9 @@ export interface operations { 'actions/list-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27326,7 +27476,9 @@ export interface operations { 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27355,7 +27507,9 @@ export interface operations { 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27385,7 +27539,9 @@ export interface operations { 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27409,7 +27565,9 @@ export interface operations { 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27424,14 +27582,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -27441,13 +27601,13 @@ export interface operations { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -27472,9 +27632,11 @@ export interface operations { 'actions/get-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { @@ -27499,9 +27661,11 @@ export interface operations { 'actions/delete-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27514,9 +27678,11 @@ export interface operations { 'actions/get-reviews-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27529,42 +27695,19 @@ export interface operations { } } } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/approve-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ 'actions/list-workflow-run-artifacts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27592,9 +27735,11 @@ export interface operations { 'actions/get-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27613,19 +27758,21 @@ export interface operations { } } } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27654,9 +27801,11 @@ export interface operations { 'actions/download-workflow-run-attempt-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27671,9 +27820,11 @@ export interface operations { 'actions/cancel-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27681,28 +27832,27 @@ export interface operations { /** Response */ 202: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } + 409: components['responses']['conflict'] } } - /** 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier 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. - */ + /** Filters jobs by their `completed_at` timestamp. `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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27730,9 +27880,11 @@ export interface operations { 'actions/download-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27745,9 +27897,11 @@ export interface operations { 'actions/delete-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27766,9 +27920,11 @@ export interface operations { 'actions/get-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27784,14 +27940,16 @@ export interface operations { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ 'actions/review-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27815,7 +27973,7 @@ export interface operations { */ environment_ids: number[] /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` + * @description Whether to approve or reject deployment to the specified environments. * @example approved * @enum {string} */ @@ -27833,9 +27991,11 @@ export interface operations { 'actions/re-run-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27843,43 +28003,65 @@ export interface operations { /** Response */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-run-usage': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + 'actions/re-run-workflow-failed-jobs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['workflow-run-usage'] + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27902,7 +28084,9 @@ export interface operations { 'actions/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27919,9 +28103,11 @@ export interface operations { 'actions/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28014,9 +28200,11 @@ export interface operations { 'actions/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28024,7 +28212,7 @@ export interface operations { /** Response when creating a secret */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } /** Response when updating a secret */ @@ -28033,7 +28221,7 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string @@ -28045,9 +28233,11 @@ export interface operations { 'actions/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28060,11 +28250,13 @@ export interface operations { 'actions/list-repo-workflows': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28087,7 +28279,9 @@ export interface operations { 'actions/get-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28110,7 +28304,9 @@ export interface operations { 'actions/disable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28131,7 +28327,9 @@ export interface operations { 'actions/create-workflow-dispatch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28160,7 +28358,9 @@ export interface operations { 'actions/enable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28172,14 +28372,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28191,13 +28393,13 @@ export interface operations { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -28218,38 +28420,17 @@ export interface operations { } } } - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-usage': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-usage'] - } - } - } - } /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ 'issues/list-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28276,7 +28457,9 @@ export interface operations { 'issues/check-user-can-be-assigned': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] assignee: string } @@ -28300,7 +28483,9 @@ export interface operations { 'repos/list-autolinks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -28321,7 +28506,9 @@ export interface operations { 'repos/create-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -28342,8 +28529,13 @@ export interface operations { 'application/json': { /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ key_prefix: string - /** @description The URL must contain for the reference number. */ + /** @description The URL must contain `` for the reference number. */ url_template: string + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean } } } @@ -28356,9 +28548,11 @@ export interface operations { 'repos/get-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28380,9 +28574,11 @@ export interface operations { 'repos/delete-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28392,42 +28588,18 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/enable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/disable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } 'repos/list-branches': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28447,7 +28619,9 @@ export interface operations { 'repos/get-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28462,14 +28636,15 @@ export interface operations { } 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] } } /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'repos/get-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28497,7 +28672,9 @@ export interface operations { 'repos/update-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28538,12 +28715,14 @@ export interface operations { enforce_admins: boolean | null /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ required_pull_request_reviews: { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28551,13 +28730,15 @@ export interface operations { require_code_owner_reviews?: boolean /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } | null /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ restrictions: { @@ -28574,6 +28755,8 @@ export interface operations { allow_force_pushes?: boolean | null /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ allow_deletions?: boolean + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ required_conversation_resolution?: boolean } @@ -28584,7 +28767,9 @@ export interface operations { 'repos/delete-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28600,7 +28785,9 @@ export interface operations { 'repos/get-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28623,7 +28810,9 @@ export interface operations { 'repos/set-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28646,7 +28835,9 @@ export interface operations { 'repos/delete-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28662,7 +28853,9 @@ export interface operations { 'repos/get-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28681,7 +28874,9 @@ export interface operations { 'repos/delete-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28703,7 +28898,9 @@ export interface operations { 'repos/update-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28721,12 +28918,14 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28734,13 +28933,15 @@ export interface operations { require_code_owner_reviews?: boolean /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } } } @@ -28755,7 +28956,9 @@ export interface operations { 'repos/get-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28779,7 +28982,9 @@ export interface operations { 'repos/create-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28803,7 +29008,9 @@ export interface operations { 'repos/delete-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28819,7 +29026,9 @@ export interface operations { 'repos/get-status-checks-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28839,7 +29048,9 @@ export interface operations { 'repos/remove-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28858,7 +29069,9 @@ export interface operations { 'repos/update-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28899,7 +29112,9 @@ export interface operations { 'repos/get-all-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28919,7 +29134,9 @@ export interface operations { 'repos/set-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28939,7 +29156,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28950,7 +29167,9 @@ export interface operations { 'repos/add-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28971,7 +29190,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28982,7 +29201,9 @@ export interface operations { 'repos/remove-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29002,7 +29223,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -29019,7 +29240,9 @@ export interface operations { 'repos/get-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29043,7 +29266,9 @@ export interface operations { 'repos/delete-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29062,7 +29287,9 @@ export interface operations { 'repos/get-apps-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29090,7 +29317,9 @@ export interface operations { 'repos/set-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29128,7 +29357,9 @@ export interface operations { 'repos/add-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29166,7 +29397,9 @@ export interface operations { 'repos/remove-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29200,7 +29433,9 @@ export interface operations { 'repos/get-teams-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29228,7 +29463,9 @@ export interface operations { 'repos/set-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29247,7 +29484,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29266,7 +29503,9 @@ export interface operations { 'repos/add-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29285,7 +29524,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29304,7 +29543,9 @@ export interface operations { 'repos/remove-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29323,7 +29564,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29338,7 +29579,9 @@ export interface operations { 'repos/get-users-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29366,7 +29609,9 @@ export interface operations { 'repos/set-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29385,7 +29630,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29404,7 +29649,9 @@ export interface operations { 'repos/add-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29423,7 +29670,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29442,7 +29689,9 @@ export interface operations { 'repos/remove-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29461,7 +29710,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29471,7 +29720,7 @@ export interface operations { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -29488,7 +29737,9 @@ export interface operations { 'repos/rename-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29524,7 +29775,9 @@ export interface operations { 'checks/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -29559,7 +29812,7 @@ export interface operations { /** @description A reference for the run on the integrator's system. */ external_id?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @default queued * @enum {string} */ @@ -29570,7 +29823,7 @@ export interface operations { */ started_at?: string /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29580,15 +29833,15 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object) description. */ output?: { /** @description The title of the check run. */ title: string - /** @description The summary of the check run. This parameter supports Markdown. */ + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ summary: string - /** @description The details of the check run. This parameter supports Markdown. */ + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29601,7 +29854,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29612,7 +29865,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29622,7 +29875,7 @@ export interface operations { caption?: string }[] } - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: | [] | [ @@ -29691,9 +29944,11 @@ export interface operations { 'checks/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29714,9 +29969,11 @@ export interface operations { 'checks/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29754,12 +30011,12 @@ export interface operations { */ started_at?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @enum {string} */ status?: 'queued' | 'in_progress' | 'completed' /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29769,7 +30026,7 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object-1) description. */ output?: { /** @description **Required**. */ title?: string @@ -29777,7 +30034,7 @@ export interface operations { summary: string /** @description Can contain Markdown. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29790,7 +30047,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29801,7 +30058,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29811,7 +30068,7 @@ export interface operations { caption?: string }[] } - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: | [] | [ @@ -29876,13 +30133,15 @@ export interface operations { 'checks/list-annotations': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -29899,16 +30158,18 @@ export interface operations { } } /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ 'checks/rerequest-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29937,17 +30198,19 @@ export interface operations { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { - /** when the suite already existed */ + /** Response when the suite already exists */ 200: { content: { 'application/json': components['schemas']['check-suite'] @@ -29969,11 +30232,13 @@ export interface operations { } } } - /** 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. */ + /** 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -29988,7 +30253,7 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) description for details. */ auto_trigger_checks?: { /** @description The `id` of the GitHub App. */ app_id: number @@ -30010,9 +30275,11 @@ export interface operations { 'checks/get-suite': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_suite_id parameter */ + /** The unique identifier of the check suite. */ check_suite_id: components['parameters']['check-suite-id'] } } @@ -30033,19 +30300,21 @@ export interface operations { 'checks/list-for-suite': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_suite_id parameter */ + /** The unique identifier of the check suite. */ 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`. */ + /** Returns check runs with the specified `status`. */ 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`. */ + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ filter?: 'latest' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -30065,16 +30334,18 @@ export interface operations { } } /** - * 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. + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_suite_id parameter */ + /** The unique identifier of the check suite. */ check_suite_id: components['parameters']['check-suite-id'] } } @@ -30088,21 +30359,23 @@ export interface operations { } } /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ 'code-scanning/list-alerts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -30112,15 +30385,15 @@ export interface operations { tool_guid?: components['parameters']['tool-guid'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' + /** If specified, only code scanning alerts with this state will be returned. */ state?: components['schemas']['code-scanning-alert-state'] } } @@ -30146,7 +30419,9 @@ export interface operations { 'code-scanning/get-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -30169,7 +30444,9 @@ export interface operations { 'code-scanning/update-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -30191,6 +30468,7 @@ export interface operations { 'application/json': { state: components['schemas']['code-scanning-alert-set-state'] dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] } } } @@ -30204,7 +30482,9 @@ export interface operations { 'code-scanning/list-alert-instances': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -30212,7 +30492,7 @@ export interface operations { query: { /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of 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'] @@ -30252,7 +30532,9 @@ export interface operations { 'code-scanning/list-recent-analyses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -30262,7 +30544,7 @@ export interface operations { tool_guid?: components['parameters']['tool-guid'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of 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'] @@ -30306,7 +30588,9 @@ export interface operations { 'code-scanning/get-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ analysis_id: number @@ -30316,8 +30600,8 @@ export interface operations { /** Response */ 200: { content: { - 'application/json+sarif': string 'application/json': components['schemas']['code-scanning-analysis'] + 'application/json+sarif': { [key: string]: unknown } } } 403: components['responses']['code_scanning_forbidden_read'] @@ -30349,8 +30633,7 @@ export interface operations { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -30396,7 +30679,9 @@ export interface operations { 'code-scanning/delete-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ analysis_id: number @@ -30441,7 +30726,9 @@ export interface operations { 'code-scanning/upload-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -30450,1882 +30737,279 @@ export interface operations { 202: { content: { 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - 400: unknown - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - 413: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - ref: components['schemas']['code-scanning-ref'] - sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string - } - } - } - } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'code-scanning/get-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - sarif_id: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-status'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-in-repository-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - } - } - } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/repo-machines-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Required. The location to check for available machines. */ - location: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/list-collaborators': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['collaborator'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/check-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a collaborator */ - 204: never - /** Not Found if user is not a collaborator */ - 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - 'repos/add-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response when a new invitation is created */ - 201: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } - /** Response when person is already a collaborator */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - permissions?: string - } - } - } - } - 'repos/remove-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - 'repos/get-collaborator-permission-level': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** if user has admin permissions */ - 200: { - content: { - 'application/json': components['schemas']['repository-collaborator-permission'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - 'repos/list-commit-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - 'repos/get-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/delete-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - 'repos/update-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment */ - body: string - } - } - } - } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - 'reactions/list-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - 'reactions/create-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - 'reactions/delete-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/list-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - sha?: string - /** Only commits containing this file path will be returned. */ - path?: string - /** GitHub login or email address by which to filter by commit author. */ - author?: string - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - until?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit'][] - } - } - 400: components['responses']['bad_request'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - 'repos/list-branches-for-head-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-short'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - 'repos/list-comments-for-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - /** @description Relative path of the file to comment on. */ - path?: string - /** @description Line index in the diff to comment on. */ - position?: number - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - line?: number - } - } - } - } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - 'repos/list-pull-requests-associated-with-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-simple'][] - } - } - } - } - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/get-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/list-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - app_id?: number - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - check_runs: 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 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'][] - } - } - } - } - } - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - 'repos/get-combined-status-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-commit-status'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - 'repos/list-commit-statuses-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['status'][] - } - } - 301: components['responses']['moved_permanently'] - } - } - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - 'repos/get-community-profile-metrics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['community-profile'] - } - } - } - } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/compare-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - basehead: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comparison'] - } - } - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent - * object format. - * - * **Note**: - * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees - * API](https://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * The response will be an array of objects, one object for each item in the directory. - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value - * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). - * In the next major version of the API, the type will be returned as "submodule". - * - * #### If the content is a symlink - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the - * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific - * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out - * the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the - * github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - 'repos/get-content': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/vnd.github.v3.object': components['schemas']['content-tree'] - 'application/json': - | components['schemas']['content-directory'] - | components['schemas']['content-file'] - | components['schemas']['content-symlink'] - | components['schemas']['content-submodule'] - } - } - 302: components['responses']['found'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Creates a new file or replaces an existing file in a repository. */ - 'repos/create-or-update-file-contents': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The commit message. */ - message: string - /** @description The new file content, using Base64 encoding. */ - content: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string - } - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string - } - } - } - } - } - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - 'repos/delete-file': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['file-commit'] - } - } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description The commit message. */ - message: string - /** @description The blob SHA of the file being replaced. */ - sha: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description object containing information about the committer. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } - /** @description object containing information about the author. */ - author?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } - } - } - } - } - /** - * Lists contributors to the specified repository and sorts them by the number of commits per contributor in descending order. This endpoint may return information that is a few hours old because the GitHub REST API v3 caches contributor data to improve performance. - * - * GitHub identifies contributors by author email address. This endpoint groups contribution counts by GitHub user, which includes all associated email addresses. To improve performance, only the first 500 author email addresses in the repository link to GitHub users. The rest will appear as anonymous contributors without associated GitHub user information. - */ - 'repos/list-contributors': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Set to `1` or `true` to include anonymous contributors in results. */ - anon?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** if repository contains content */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['contributor'][] - } - } - /** Response if repository is empty */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/list-repo-secrets': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - secrets: components['schemas']['dependabot-secret'][] - } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-public-key': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['dependabot-public-key'] - } - } - } - } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['dependabot-secret'] - } - } - } - } - /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'dependabot/create-or-update-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response when creating a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string - } - } - } - } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/delete-repo-secret': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Simple filtering of deployments is available via query parameters: */ - 'repos/list-deployments': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The SHA recorded at creation time. */ - sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - environment?: string | null - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['deployment'][] - } - } - } - } - /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts - * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. - * - * #### Merge conflict response - * This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't - * be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. - * - * #### Failed commit status checks - * This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success` - * status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`. - */ - 'repos/create-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - 202: { - content: { - 'application/json': { - message?: string - } - } - } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - ref: string - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - task?: string - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - auto_merge?: boolean - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - required_contexts?: string[] - payload?: { [key: string]: unknown } | string - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - environment?: string - /** - * @description Short description of the deployment. - * @default - */ - description?: string | null - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - transient_environment?: boolean - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - production_environment?: boolean - } - } - } - } - 'repos/get-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. - * - * To set a deployment as inactive, you must: - * - * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * * Mark the active deployment as inactive by adding any non-successful deployment status. - * - * For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." - */ - 'repos/delete-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - } - /** Users with pull access can view deployment statuses for a deployment: */ - 'repos/list-deployment-statuses': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['deployment-status'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with `push` access can create deployment statuses for a given deployment. - * - * GitHub Apps require `read & write` access to "Deployments" and `read-only` access to "Repo contents" (for private repos). OAuth Apps require the `repo_deployment` scope. - */ - 'repos/create-deployment-status': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['deployment-status'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string + } + } + /** Bad Request if the sarif field is invalid */ + 400: unknown + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + 413: unknown + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + ref: components['schemas']['code-scanning-ref'] + sarif: components['schemas']['code-scanning-analysis-sarif-file'] /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ */ - environment?: 'production' | 'staging' | 'qa' + checkout_uri?: string /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - environment_url?: string - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean + started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string } } } } - /** Users with pull access can view a deployment status for a deployment: */ - 'repos/get-deployment-status': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + 'code-scanning/get-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - status_id: number + /** The SARIF ID obtained after uploading. */ + sarif_id: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-status'] } } - 404: components['responses']['not_found'] + 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - 'repos/create-dispatch-event': { + 'repos/codeowners-errors': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string + } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A custom webhook event name. */ - event_type: string - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { [key: string]: unknown } + 200: { + content: { + 'application/json': components['schemas']['codeowners-errors'] } } + /** Resource not found */ + 404: unknown } } /** - * Get all environments for a repository. + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * - * 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. + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ - 'repos/get-all-environments': { + 'repos/list-collaborators': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: 'outside' | 'direct' | 'all' + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: 'pull' | 'triage' | 'push' | 'maintain' | 'admin' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of environments in this repository - * @example 5 - */ - total_count?: number - environments?: components['schemas']['environment'][] - } + 'application/json': components['schemas']['collaborator'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/check-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } + /** Response if user is a collaborator */ + 204: never + /** Not Found if user is not a collaborator */ + 404: unknown } } /** - * 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)." + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * **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)." + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** * - * You must authenticate using an access token with the repo scope to use this endpoint. + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** + * + * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. */ - 'repos/create-or-update-environment': { + 'repos/add-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } 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: { + /** Response when a new invitation is created */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-invitation'] } } + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - wait_timer?: components['schemas']['wait-timer'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: - | { - type?: components['schemas']['deployment-reviewer-type'] - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number - }[] - | null - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - } | null + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** + * @default push + */ + permission?: string + } } } } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - 'repos/delete-an-environment': { + 'repos/remove-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Default response */ + /** Response */ 204: never } } - 'activity/list-repo-events': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + 'repos/get-collaborator-permission-level': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ + /** if user has admin permissions */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['repository-collaborator-permission'] } } + 404: components['responses']['not_found'] } } - 'repos/list-forks': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + 'repos/list-commit-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32336,200 +31020,172 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['commit-comment'][] } } - 400: components['responses']['bad_request'] } } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - 'repos/create-fork': { + 'repos/get-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['commit-comment'] } } - 400: components['responses']['bad_request'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description Optional parameter to specify the organization name if forking into an organization. */ - organization?: string - } | null + } + 'repos/delete-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } - 'git/create-blob': { + 'repos/update-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['short-blob'] + 'application/json': components['schemas']['commit-comment'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new blob's content. */ - content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - encoding?: string + /** @description The contents of the comment */ + body: string } } } } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - 'git/get-blob': { + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ + 'reactions/list-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - file_sha: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['blob'] + 'application/json': components['schemas']['reaction'][] } } - 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': { + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + 'reactions/create-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] } + } + /** Reaction created */ + 201: { content: { - 'application/json': components['schemas']['git-commit'] + 'application/json': components['schemas']['reaction'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message */ - message: string - /** @description The SHA of the tree object this commit points to */ - tree: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - parents?: string[] - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name: string - /** @description The email of the author (or committer) of the commit */ - email: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - signature?: string + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + * **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/enterprise-server@3.6/rest/reference/repos#comments). + */ + 'reactions/delete-for-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32559,44 +31215,26 @@ export interface operations { * | `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': { + 'repos/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string } query: { - /** Results per page (max 100) */ + /** 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 + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32607,152 +31245,83 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['git-ref'][] + 'application/json': components['schemas']['commit'][] } } + 400: components['responses']['bad_request'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] } } /** - * 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. + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * **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)". + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - 'git/get-ref': { + 'repos/list-branches-for-head-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } 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'] + 'application/json': components['schemas']['branch-short'][] } } 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string - /** @description The SHA1 value for this reference. */ - sha: string - /** @example "refs/heads/newbranch" */ - key?: string - } - } - } } - 'git/delete-ref': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + 'repos/list-comments-for-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - } - 'git/update-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + query: { + /** The number of results 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']['git-ref'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The SHA1 value to set this reference to */ - sha: string - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - force?: boolean + 200: { + headers: {} + content: { + 'application/json': components['schemas']['commit-comment'][] } } } } /** - * 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: + * Create a comment for a commit using its `:commit_sha`. * - * | 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. | + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'git/create-tag': { + 'repos/create-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { @@ -32762,42 +31331,64 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - tag: string - /** @description The tag message. */ - message: string - /** @description The SHA of the git object this is tagging. */ - object: string - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - type: 'commit' | 'tree' | 'blob' - /** @description An object with information about the individual creating the tag. */ - tagger?: { - /** @description The name of the author of the tag */ - name: string - /** @description The email of the author of the tag */ - email: string - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } + /** @description The contents of the comment. */ + body: string + /** @description Relative path of the file to comment on. */ + path?: string + /** @description Line index in the diff to comment on. */ + position?: number + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number + } + } + } + } + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + 'repos/list-pull-requests-associated-with-commit': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['pull-request-simple'][] } } } } /** + * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. + * + * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. + * + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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: @@ -32827,125 +31418,139 @@ export interface operations { * | `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': { + 'repos/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tag_sha: string + /** ref parameter */ + ref: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * **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. * - * 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)." + * 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. */ - 'git/create-tree': { + 'checks/list-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + app_id?: number } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['git-tree'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: { - /** @description The file referenced in the tree. */ - path?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - type?: 'blob' | 'tree' | 'commit' - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null - /** - * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - content?: string - }[] - /** - * @description The 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 + 'application/json': { + total_count: number + check_runs: components['schemas']['check-run'][] + } } } } } /** - * Returns a single tree using the SHA1 value for that tree. + * **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`. * - * 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. + * 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. */ - 'git/get-tree': { + 'checks/list-suites-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tree_sha: string + /** ref parameter */ + ref: 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 + /** Filters check suites by GitHub App `id`. */ + app_id?: number + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** The number of results per page (max 100). */ + per_page?: 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-tree'] + 'application/json': { + total_count: number + check_suites: components['schemas']['check-suite'][] + } } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'repos/list-webhooks': { + /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + 'repos/get-combined-status-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32954,408 +31559,539 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['hook'][] + 'application/json': components['schemas']['combined-commit-status'] } } 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. + * 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/create-webhook': { + 'repos/list-commit-statuses-for-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['status'][] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - 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'] - /** @example "abc" */ - token?: string - /** @example "sha256" */ - digest?: string - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - } | null - } + 301: components['responses']['moved_permanently'] } } - /** 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': { + /** + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * + * **Signature verification object** + * + * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: + * + * | Name | Type | Description | + * | ---- | ---- | ----------- | + * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | + * | `signature` | `string` | The signature that was extracted from the commit. | + * | `payload` | `string` | The value that was signed. | + * + * These are the possible values for `reason` in the `verification` object: + * + * | Value | Description | + * | ----- | ----------- | + * | `expired_key` | The key that made the signature is expired. | + * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | + * | `gpgverify_error` | There was an error communicating with the signature verification service. | + * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | + * | `unsigned` | The object does not include a signature. | + * | `unknown_signature_type` | A non-PGP signature was found in the commit. | + * | `no_user` | No user was associated with the `committer` email address in the commit. | + * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | + * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | + * | `unknown_key` | The key that made the signature has not been registered with any user's account. | + * | `malformed_signature` | There was an error parsing the signature. | + * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | + * | `valid` | None of the above errors applied, so the signature is considered to be verified. | + */ + 'repos/compare-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['commit-comparison'] } } 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } - 'repos/delete-webhook': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/vnd.github.object': components['schemas']['content-tree'] + 'application/json': + | components['schemas']['content-directory'] + | components['schemas']['content-file'] + | components['schemas']['content-symlink'] + | components['schemas']['content-submodule'] + } + } + 302: components['responses']['found'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } } - /** 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': { + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ + 'repos/create-or-update-file-contents': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['file-commit'] + } + } + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['file-commit'] } } 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description 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'] - /** @example "bar@example.com" */ - address?: string - /** @example "The Serious Room" */ - room?: string + /** @description The commit message. */ + message: string + /** @description The new file content, using Base64 encoding. */ + content: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string + } + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - add_events?: string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - remove_events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean } } } } /** - * 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)." + * Deletes a file in a repository. * - * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. - */ - 'repos/get-webhook-config-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - } - /** - * Updates the webhook configuration for a repository. To update more information about the webhook, including the `active` state and `events`, use "[Update a repository webhook](/rest/reference/orgs#update-a-repository-webhook)." + * 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. * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'repos/update-webhook-config-for-repo': { + 'repos/delete-file': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] + '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': { - 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'] + /** @description The commit message. */ + message: string + /** @description The blob SHA of the file being deleted. */ + sha: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } } } } } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - 'repos/list-webhook-deliveries': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** if repository contains content */ 200: { + headers: {} content: { - 'application/json': components['schemas']['hook-delivery-item'][] + 'application/json': components['schemas']['contributor'][] } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + /** Response if repository is empty */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Returns a delivery for a webhook configured in a repository. */ - 'repos/get-webhook-delivery': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/list-repo-secrets': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-delivery'] + 'application/json': { + total_count: number + secrets: components['schemas']['dependabot-secret'][] + } } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - 'repos/redeliver-webhook-delivery': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] - } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'repos/ping-webhook': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['dependabot-public-key'] + } + } } } - /** - * 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': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['dependabot-secret'] + } + } } } /** - * View the progress of an import. + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public * - * **Import status** + * 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# * - * This section includes details about the possible values of the `status` field of the Import Progress response. + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. * - * An import that does not have errors will progress through these steps: + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); * - * * `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. + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); * - * If there are problems, you will see one of these in the `status` field: + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * #### Example encrypting a secret using Ruby * - * **The project_choices field** + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. * - * 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. + * ```ruby + * require "rbnacl" + * require "base64" * - * **Git LFS related fields** + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") * - * * `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. + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - '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': { + 'dependabot/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ + /** Response when creating a secret */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['empty-object'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The URL of the originating repository. */ - vcs_url: string - /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} - */ - vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the username to provide to `vcs_url`. */ - vcs_username?: string - /** @description If authentication is required, the password to provide to `vcs_url`. */ - vcs_password?: string - /** @description For a tfvc import, the name of the project that is being imported. */ - tfvc_project?: string + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string } } } } - /** Stop an import for a repository. */ - 'migrations/cancel-import': { + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { @@ -33363,230 +32099,244 @@ export interface operations { 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': { - /** @description The username to provide to the originating repository. */ - vcs_username?: string - /** @description The password to provide to the originating repository. */ - vcs_password?: string - /** @example "git" */ - vcs?: string - /** @example "project1" */ - tfvc_project?: string - } | null - } - } - } - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - 'migrations/get-commit-authors': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + 'dependency-graph/diff-range': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string } query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components['parameters']['manifest-path'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['porter-author'][] + 'application/json': components['schemas']['dependency-graph-diff'] } } + 403: components['responses']['forbidden'] 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': { + /** Simple filtering of deployments is available via query parameters: */ + 'repos/list-deployments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - author_id: number + } + query: { + /** The SHA recorded at creation time. */ + sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['porter-author'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The new Git author email. */ - email?: string - /** @description The new Git author name. */ - name?: string + 'application/json': components['schemas']['deployment'][] } } } } - /** List files larger than 100MB found during the import */ - 'migrations/get-large-files': { + /** + * Deployments offer a few configurable parameters with certain defaults. + * + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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/enterprise-server@3.6/rest/commits/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['porter-large-file'][] + 'application/json': components['schemas']['deployment'] } } - } - } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - 'migrations/set-lfs-preference': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { + /** Merged branch response */ + 202: { content: { - 'application/json': components['schemas']['import'] + 'application/json': { + message?: string + } } } + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean + /** @description The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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]: unknown } | string + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false */ - use_lfs: 'opt_in' | 'opt_out' + transient_environment?: boolean + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean } } } } - /** - * 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': { + 'repos/get-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['installation'] + 'application/json': components['schemas']['deployment'] } } - 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with this repository and when the restriction expires. If there are no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user within the given repository. You must have owner or admin access to set these restrictions. If an interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - 'interactions/set-restrictions-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - /** Response */ - 409: unknown - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from the given repository. You must have owner or admin access to remove restrictions. If the interaction limit is set for the user or organization that owns this repository, you will receive a `409 Conflict` response and will not be able to use this endpoint to change the interaction limit for a single repository. */ - 'interactions/remove-restrictions-for-repo': { + /** + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." + */ + 'repos/delete-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ 204: never - /** Response */ - 409: unknown + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - 'repos/list-invitations': { + /** Users with pull access can view deployment statuses for a deployment: */ + 'repos/list-deployment-statuses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33597,175 +32347,154 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['repository-invitation'][] + 'application/json': components['schemas']['deployment-status'][] } } + 404: components['responses']['not_found'] } } - 'repos/delete-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/update-invitation': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['repository-invitation'] + 'application/json': components['schemas']['deployment-status'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. * @enum {string} */ - permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' - } - } - } - } - /** - * List issues in a repository. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/list-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** If an `integer` is passed, it should refer to a milestone by its `number` field. If the string `*` is passed, issues with any milestone are accepted. If the string `none` is passed, issues without milestones are returned. */ - milestone?: string - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** Can be the name of a user. Pass in `none` for issues with no assigned user, and `*` for issues assigned to any user. */ - assignee?: string - /** The user that created the issue. */ - creator?: string - /** A user that's mentioned in the issue. */ - mentioned?: string - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean + } + } + } + } + /** Users with pull access can view a deployment status for a deployment: */ + 'repos/get-deployment-status': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + status_id: number } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': components['schemas']['deployment-status'] } } - 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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: * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. */ - 'issues/create': { + 'repos/create-dispatch-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 204: never 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The title of the issue. */ - title: string | number - /** @description The contents of the issue. */ - body?: string - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - assignee?: string | null - milestone?: (string | number) | null - /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown } } } } } - /** By default, Issue Comments are ordered by ascending ID. */ - 'issues/list-comments-for-repo': { + /** + * Lists the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33774,88 +32503,134 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number + environments?: components['schemas']['environment'][] + } } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'issues/get-comment': { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['environment'] } } - 404: components['responses']['not_found'] - } - } - 'issues/delete-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never } } - 'issues/update-comment': { + /** + * 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-or-update-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['issue-comment'] + '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'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string - } + wait_timer?: components['schemas']['wait-timer'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components['schemas']['deployment-reviewer-type'] + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number + }[] + | null + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } | null } } } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - 'reactions/list-for-issue-comment': { + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + 'repos/delete-an-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } + } + responses: { + /** Default response */ + 204: never + } + } + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33864,297 +32639,326 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number + branch_policies: components['schemas']['deployment-branch-policy'][] + } } } - 404: components['responses']['not_found'] } } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - 'reactions/create-for-issue-comment': { + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { - /** Reaction exists */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 422: components['responses']['validation_failed'] + /** Response if the same branch name pattern already exists */ + 303: never + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } /** - * **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`. + * Gets a deployment branch policy for an environment. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * 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. */ - 'reactions/delete-for-issue-comment': { + 'repos/get-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['deployment-branch-policy'] + } + } } } - 'issues/list-events-for-repo': { + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/update-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-event'][] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] + } } } - 'issues/get-event': { + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/delete-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - event_id: number + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['issue-event'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 204: never } } - /** - * The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/get': { + 'activity/list-repo-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results 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']['issue'] + 'application/json': components['schemas']['event'][] } } - 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': { + 'repos/list-forks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + } + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['issue'] - } - } - 301: components['responses']['moved_permanently'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the issue. */ - title?: (string | number) | null - /** @description The contents of the issue. */ - body?: string | null - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - milestone?: (string | number) | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] + 'application/json': components['schemas']['minimal-repository'][] } } + 400: components['responses']['bad_request'] } } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - 'issues/add-assignees': { + /** + * 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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + 'repos/create-fork': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 201: { + 202: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['full-repository'] } } + 400: components['responses']['bad_request'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description 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[] - } + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string + } | null } } } - /** Removes one or more assignees from an issue. */ - 'issues/remove-assignees': { + 'git/create-blob': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['short-blob'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The new blob's content. */ + content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string } } } } - /** Issue Comments are ordered by ascending ID. */ - 'issues/list-comments': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + file_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['blob'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'issues/create-comment': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { @@ -34164,62 +32968,122 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['git-commit'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description The commit message */ + message: string + /** @description The SHA of the tree object this commit points to */ + tree: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[] + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string + /** @description The email of the author (or committer) of the commit */ + email: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description The [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 } } } } - 'issues/list-events': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-event-for-issue'][] + 'application/json': components['schemas']['git-commit'] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - 'issues/list-labels-on-issue': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** ref parameter */ + ref: string } } responses: { @@ -34227,325 +33091,369 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'][] } } - 410: components['responses']['gone'] } } - /** Removes any previous labels and sets the new labels for an issue. */ - 'issues/set-labels': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + 'git/get-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] } } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - labels?: [string, ...string[]] - } - | [string, ...string[]] - | { - labels?: [ - { - name: string - }, - ...{ - name: string - }[], - ] - } - | [ - { - name: string - }, - ...{ - name: string - }[], - ] - | string - } + 404: components['responses']['not_found'] } } - 'issues/add-labels': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] } } - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | { - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - labels?: [string, ...string[]] - } - | [string, ...string[]] - | { - labels?: [ - { - name: string - }, - ...{ - name: string - }[], - ] - } - | [ - { - name: string - }, - ...{ - name: string - }[], - ] - | string + 'application/json': { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string + /** @description The SHA1 value for this reference. */ + sha: string + /** @example "refs/heads/newbranch" */ + key?: string + } } } } - 'issues/remove-all-labels': { + 'git/delete-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } responses: { /** Response */ 204: never - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - /** 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': { + 'git/update-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - name: string + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['git-ref'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The SHA1 value to set this reference to */ + sha: string + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean } } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } /** - * Users with push access can lock an issue or pull request's conversation. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: * - * 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)." + * | 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. | */ - 'issues/lock': { + 'git/create-tag': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['git-tag'] + } + } 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string + /** @description The tag message. */ + message: string + /** @description The SHA of the git object this is tagging. */ + object: string /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. * @enum {string} */ - lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } | null - } - } - } - /** Users with push access can unlock an issue's conversation. */ - 'issues/unlock': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + type: 'commit' | 'tree' | 'blob' + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string + /** @description The email of the author of the tag */ + email: string + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + } } } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - 'reactions/list-for-issue': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + tag_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['git-tag'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - 'reactions/create-for-issue': { + /** + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + 'git/create-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['git-tree'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: 'blob' | 'tree' | 'commit' + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string + }[] /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} + * @description The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + * If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + base_tree?: string } } } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * 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. + * * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ - 'reactions/delete-for-issue': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'issues/list-events-for-timeline': { + 'git/get-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + tree_sha: string } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['timeline-issue-events'][] + 'application/json': components['schemas']['git-tree'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } } - 'repos/list-deploy-keys': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + 'repos/list-webhooks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34556,16 +33464,22 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['deploy-key'][] + 'application/json': components['schemas']['hook'][] } } + 404: components['responses']['not_found'] } } - /** You can create a read-only deploy key. */ - 'repos/create-deploy-key': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34576,236 +33490,323 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['hook'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A name for the key. */ - title?: string - /** @description The contents of the key. */ - key: string + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "abc" */ + token?: string + /** @example "sha256" */ + digest?: string + } /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] */ - read_only?: boolean - } + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } | null } } } - 'repos/get-deploy-key': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['hook'] } } 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': { + 'repos/delete-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - 'issues/list-labels-for-repo': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "bar@example.com" */ + address?: string + /** @example "The Serious Room" */ + room?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } + } } } - 'issues/create-label': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['label'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - name: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + 'application/json': components['schemas']['webhook-config'] } } } } - 'issues/get-label': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] + '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'] } } - 404: components['responses']['not_found'] } } - 'issues/delete-label': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + 'repos/list-webhook-deliveries': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['hook-delivery-item'][] + } + } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - 'issues/update-label': { + /** Returns a delivery for a webhook configured in a repository. */ + 'repos/get-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - new_name?: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + 'repos/redeliver-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['language'] - } - } + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - 'repos/enable-lfs-for-repo': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + 'repos/ping-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { - 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - 403: unknown + /** Response */ + 204: never + 404: components['responses']['not_found'] } } - 'repos/disable-lfs-for-repo': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * This method returns the contents of the repository's license file, if one is detected. + * 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. * - * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'licenses/get-for-repo': { + 'apps/get-repo-installation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34813,90 +33814,122 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['license-content'] + 'application/json': components['schemas']['installation'] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] } } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - 'repos/merge-upstream': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** The branch has been successfully synced with the upstream repository */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['merged-upstream'] + 'application/json': components['schemas']['repository-invitation'][] } } - /** The branch could not be synced because of a merge conflict */ - 409: unknown - /** The branch could not be synced for some other reason */ - 422: unknown } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string - } + } + 'repos/delete-invitation': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } + responses: { + /** Response */ + 204: never + } } - 'repos/merge': { + 'repos/update-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { - /** Successful Response (The resulting merge commit) */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['commit'] + 'application/json': components['schemas']['repository-invitation'] } } - /** Response when already merged */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - 404: unknown - /** Conflict when there is a merge conflict */ - 409: unknown - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - base: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - head: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - commit_message?: string + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' } } } } - 'issues/list-milestones': { + /** + * 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The state of the milestone. Either `open`, `closed`, or `all`. */ + /** 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. */ 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) */ + /** 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. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34907,16 +33940,25 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['milestone'][] + 'application/json': components['schemas']['issue'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/create-milestone': { + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'issues/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34927,149 +33969,156 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description The title of the issue. */ + title: string | number + /** @description The contents of the issue. */ + body?: string + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] } } } } - 'issues/get-milestone': { + /** By default, Issue Comments are ordered by ascending ID. */ + 'issues/list-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + } + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['issue-comment'][] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/delete-milestone': { + 'issues/get-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['issue-comment'] + } + } 404: components['responses']['not_found'] } } - 'issues/update-milestone': { + 'issues/delete-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['milestone'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the milestone. */ - title?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string - } - } + 204: never } } - 'issues/list-labels-for-milestone': { + 'issues/update-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue-comment'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The contents of the comment. */ + body: string } } } } - /** List all notifications for the current user. */ - 'activity/list-repo-notifications-for-authenticated-user': { + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ + 'reactions/list-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } 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) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35080,271 +34129,295 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + 'reactions/create-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 202: { + /** Reaction exists */ + 200: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['reaction'] } } - /** Reset Content */ - 205: unknown + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} */ - last_read_at?: string - } - } - } - } - 'repos/get-pages': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page'] + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } - 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': { + /** + * **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/enterprise-server@3.6/rest/reference/issues#comments). + */ + 'reactions/delete-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ 204: never - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean - source?: - | ('gh-pages' | 'master' | 'master /docs') - | { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - path: '/' | '/docs' - } - } - } } } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - 'repos/create-pages-site': { + 'issues/list-events-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['issue-event'][] } } - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The source branch and directory used to publish your Pages site. */ - source: { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - path?: '/' | '/docs' - } - } | null - } - } - } - 'repos/delete-pages-site': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } } - 'repos/list-pages-builds': { + 'issues/get-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + event_id: number } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['page-build'][] + 'application/json': components['schemas']['issue-event'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } /** - * 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. + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#issues) webhook. * - * 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. + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'repos/request-pages-build': { + 'issues/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page-build-status'] + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'repos/get-latest-pages-build': { + /** Issue owners and users with push access can edit an issue. */ + 'issues/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['issue'] + } + } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the issue. */ + title?: (string | number) | null + /** @description The contents of the issue. */ + body?: string | null + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'not_planned' | 'reopened') | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] } } } } - 'repos/get-pages-build': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + 'issues/add-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - build_id: number + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['issue'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] } } } } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - 'repos/get-pages-health-check': { + /** Removes one or more assignees from an issue. */ + 'issues/remove-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pages-health-check'] + 'application/json': components['schemas']['issue'] } } - /** Empty response */ - 202: { - content: { - 'application/json': components['schemas']['empty-object'] + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] } } - /** Custom domains are not available for GitHub Pages */ - 400: unknown - 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - 422: unknown } } - /** Lists the projects in a repository. Returns a `404 Not Found` status if projects are disabled in the repository. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ - 'projects/list-for-repo': { + /** Issue Comments are ordered by ascending ID. */ + 'issues/list-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35355,67 +34428,61 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project'][] + 'application/json': components['schemas']['issue-comment'][] } } - 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'issues/create-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['issue-comment'] } } - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the project. */ - name: string - /** @description The description of the project. */ - body?: string + /** @description The contents of the comment. */ + body: string } } } } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'pulls/list': { + 'issues/list-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35426,168 +34493,267 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'][] + 'application/json': components['schemas']['issue-event-for-issue'][] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] + 410: components['responses']['gone'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - 'pulls/create': { + 'issues/list-labels-on-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the new pull request. */ - title?: string - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean - /** @example 1 */ - issue?: number + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** 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': { + /** Removes any previous labels and sets the new labels for an issue. */ + 'issues/set-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: [string, ...string[]] + } + | [string, ...string[]] + | { + labels?: [ + { + name: string + }, + ...{ + name: string + }[], + ] + } + | [ + { + name: string + }, + ...{ + name: string + }[], + ] + | string + } } } - /** Provides details for a review comment. */ - 'pulls/get-review-comment': { + 'issues/add-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: [string, ...string[]] + } + | [string, ...string[]] + | { + labels?: [ + { + name: string + }, + ...{ + name: string + }[], + ] + } + | [ + { + name: string + }, + ...{ + name: string + }[], + ] + | string + } } } - /** Deletes a review comment. */ - 'pulls/delete-review-comment': { + 'issues/remove-all-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Enables you to edit a review comment. */ - 'pulls/update-review-comment': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'issues/lock': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The text of the reply to the review comment. */ - body: string - } + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' + } | null } } } - /** 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': { + /** Users with push access can unlock an issue's conversation. */ + 'issues/unlock': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ + 'reactions/list-for-issue': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + 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 a pull request review comment. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35602,26 +34768,29 @@ export interface operations { } } 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - 'reactions/create-for-pull-request-review-comment': { + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + 'reactions/create-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { - /** Reaction exists */ + /** Response */ 200: { content: { 'application/json': components['schemas']['reaction'] } } - /** Reaction created */ + /** Response */ 201: { content: { 'application/json': components['schemas']['reaction'] @@ -35633,7 +34802,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -35642,17 +34811,20 @@ export interface operations { } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/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 a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ - 'reactions/delete-for-pull-request-comment': { + 'reactions/delete-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -35661,147 +34833,147 @@ export interface operations { 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://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - */ - 'pulls/get': { + 'issues/list-events-for-timeline': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['timeline-issue-events'][] } } - 304: components['responses']['not_modified'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + 410: components['responses']['gone'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - 'pulls/update': { + 'repos/list-deploy-keys': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['deploy-key'][] + } + } + } + } + /** You can create a read-only deploy key. */ + 'repos/create-deploy-key': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['deploy-key'] } } - 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the pull request. */ + /** @description A name for the key. */ title?: string - /** @description The contents of the pull request. */ - body?: string + /** @description The contents of the key. */ + key: string /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." */ - state?: 'open' | 'closed' - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean + read_only?: boolean } } } } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-pr-for-authenticated-user': { + 'repos/get-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['deploy-key'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } + } + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } + responses: { + /** Response */ + 204: never + } } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments': { + 'issues/list-labels-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35812,26 +34984,19 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 404: components['responses']['not_found'] } } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-review-comment': { + 'issues/create-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { @@ -35841,455 +35006,438 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The text of the review comment. */ - body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id?: string - /** @description The relative path to the file that necessitates a comment. */ - path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number - /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. - * @enum {string} - */ - start_side?: 'LEFT' | 'RIGHT' | 'side' - /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 - */ - in_reply_to?: number + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string } } } } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-reply-for-review-comment': { + 'issues/get-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string - } - } - } } - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - 'pulls/list-commits': { + 'issues/delete-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + name: 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 */ + 204: never + } + } + 'issues/update-label': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + name: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit'][] + 'application/json': components['schemas']['label'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string } } } } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - 'pulls/list-files': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['language'] } } - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } - 'pulls/check-if-merged': { + 'repos/enable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response if pull request has been merged */ - 204: never - /** Not Found if pull request has not been merged */ - 404: unknown + 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/merge': { + 'repos/disable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** if merge was successful */ - 200: { - content: { - 'application/json': components['schemas']['pull-request-merge-result'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - 405: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } - } - } - /** Conflict if sha was provided and pull request head did not match */ - 409: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Title for the automatic commit message. */ - commit_title?: string - /** @description Extra detail to append to automatic commit message. */ - commit_message?: string - /** @description SHA that pull request head must match to allow merge. */ - sha?: string - /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. - * @enum {string} - */ - merge_method?: 'merge' | 'squash' | 'rebase' - } | null - } + /** Response */ + 204: never } } - 'pulls/list-requested-reviewers': { + /** + * This method returns the contents of the repository's license file, if one is detected. + * + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. + */ + 'licenses/get-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 'application/json': components['schemas']['license-content'] } } } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/request-reviewers': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + 'repos/merge-upstream': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ - 201: { + /** The branch has been successfully synced with the upstream repository */ + 200: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': components['schemas']['merged-upstream'] } } - 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ + /** The branch could not be synced because of a merge conflict */ + 409: unknown + /** The branch could not be synced for some other reason */ 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be requested. */ - reviewers?: string[] - /** @description An array of team `slug`s that will be requested. */ - team_reviewers?: string[] + /** @description The name of the branch which should be updated to match upstream. */ + branch: string } } } } - 'pulls/remove-requested-reviewers': { + 'repos/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ - 200: { + /** Successful Response (The resulting merge commit) */ + 201: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': components['schemas']['commit'] } } + /** Response when already merged */ + 204: never + 403: components['responses']['forbidden'] + /** Not Found when the base or head does not exist */ + 404: unknown + /** Conflict when there is a merge conflict */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be removed. */ - reviewers: string[] - /** @description An array of team `slug`s that will be removed. */ - team_reviewers?: string[] + /** @description The name of the base branch that the head will be merged into. */ + base: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string } } } } - /** The list of reviews returns in chronological order. */ - 'pulls/list-reviews': { + 'issues/list-milestones': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } query: { - /** Results per page (max 100) */ + /** 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' + /** The number of 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. */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review'][] + 'application/json': components['schemas']['milestone'][] } } + 404: components['responses']['not_found'] } } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - 'pulls/create-review': { + 'issues/create-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed_simple'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - commit_id?: string - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - body?: string + /** @description The title of the milestone. */ + title: string /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: { - /** @description The relative path to the file that necessitates a review comment. */ - path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number - /** @description Text of the review comment. */ - body: string - /** @example 28 */ - line?: number - /** @example RIGHT */ - side?: string - /** @example 26 */ - start_line?: number - /** @example LEFT */ - start_side?: string - }[] + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string } } } } - 'pulls/get-review': { + 'issues/get-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } 404: components['responses']['not_found'] } } - /** Update the review summary comment with new text. */ - 'pulls/update-review': { + 'issues/delete-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] + } + } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } + } + 'issues/update-milestone': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['milestone'] } } - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review. */ - body: string + /** @description The title of the milestone. */ + title?: string + /** + * @description The state of the milestone. Either `open` or `closed`. + * @default open + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string } } } } - 'pulls/delete-pending-review': { + 'issues/list-labels-for-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['label'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } } - /** List comments for a specific pull request review. */ - 'pulls/list-comments-for-review': { + /** Lists all notifications for the current user in the specified repository. */ + 'activity/list-repo-notifications-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36300,487 +35448,635 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['review-comment'][] + 'application/json': components['schemas']['thread'][] } } - 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': { + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': { + message?: string + url?: string + } } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Reset Content */ + 205: unknown } requestBody: { content: { 'application/json': { - /** @description The message for the pull request review dismissal */ - message: string - /** @example "APPROVE" */ - event?: string + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string } } } } - 'pulls/submit-review': { + 'repos/get-pages': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 'application/json': components['schemas']['page'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + } + } + /** Updates information for a GitHub Enterprise Server 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + 400: components['responses']['bad_request'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review */ - body?: string + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. * @enum {string} */ - event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + build_type?: 'legacy' | 'workflow' + source?: + | ('gh-pages' | 'master' | 'master /docs') + | { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: '/' | '/docs' + } } } } } - /** 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': { + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ + 'repos/create-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 202: { + 201: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['page'] } } - 403: components['responses']['forbidden'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: 'legacy' | 'workflow' + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: '/' | '/docs' + } } | null } } } - /** - * 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': { + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ + 'repos/delete-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] - } - } + 204: never 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } } - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - 'repos/get-readme-in-directory': { + 'repos/list-pages-builds': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - dir: string } query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['page-build'][] } } - 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). + * 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. * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + * 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/list-releases': { + 'repos/request-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: {} + 201: { content: { - 'application/json': components['schemas']['release'][] + 'application/json': components['schemas']['page-build-status'] } } - 404: components['responses']['not_found'] } } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-release': { + 'repos/get-latest-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['page-build'] } } - /** Not Found if the discussion category name is invalid */ - 404: { + } + } + 'repos/get-pages-build': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + build_id: number + } + } + responses: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['page-build'] } } - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The name of the tag. */ - tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string - /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false - */ - generate_release_notes?: boolean + } + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-repo': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['repository-pre-receive-hook'][] } } } } - /** 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': { + 'enterprise-admin/get-pre-receive-hook-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-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. */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 302: components['responses']['found'] - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] } } - 'repos/delete-release-asset': { + /** + * Deletes any overridden enforcement on this repository for the specified hook. + * + * Responds with effective values inherited from owner and/or global level. + */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { - /** Response */ - 204: never + /** Responds with effective values inherited from owner and/or global level. */ + 200: { + content: { + 'application/json': components['schemas']['repository-pre-receive-hook'] + } + } } } - /** Users with push access to the repository can edit a release asset. */ - 'repos/update-release-asset': { + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } } requestBody: { content: { 'application/json': { - /** @description The file name of the asset. */ - name?: string - /** @description An alternate short description of the asset. Used in place of the filename. */ - label?: string - /** @example "uploaded" */ - state?: string + /** + * @description The state of enforcement for the hook on this repository. + * @enum {string} + */ + enforcement?: 'enabled' | 'disabled' | 'testing' } } } } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - 'repos/generate-release-notes': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** Indicates the state of the projects to return. */ + state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** Name and body of generated release notes */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-notes-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 `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['project'] } } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The tag name for the release. This can be an existing tag or a new one. */ - tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - target_commitish?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - previous_tag_name?: string - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - configuration_file_path?: string + /** @description The name of the project. */ + name: string + /** @description The description of the project. */ + body?: string + } + } + } + } + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'pulls/list': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ + per_page?: 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'] } } /** - * View the latest published full release for the repository. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ - 'repos/get-latest-release': { + 'pulls/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number } } } } - /** Get a published release with the specified tag. */ - 'repos/get-release-by-tag': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** tag parameter */ - tag: string + } + query: { + sort?: 'created' | 'updated' | 'created_at' + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - 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': { + /** Provides details for a review comment. */ + 'pulls/get-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-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). */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request-review-comment'] } } 404: components['responses']['not_found'] } } - /** Users with push access to the repository can delete a release. */ - 'repos/delete-release': { + /** Deletes a review comment. */ + 'pulls/delete-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - /** Users with push access to the repository can edit a release. */ - 'repos/update-release': { + /** Enables you to edit a review comment. */ + 'pulls/update-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['pull-request-review-comment'] } } } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string + /** @description The text of the reply to the review comment. */ + body: string } } } } - 'repos/list-release-assets': { + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ + 'reactions/list-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36791,68 +36087,22 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - 'repos/upload-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - name: string - label?: string - } - } - responses: { - /** Response for successful upload */ - 201: { - content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['reaction'][] } } - /** Response if you upload an asset with the same filename as another uploaded asset */ - 422: unknown - } - requestBody: { - content: { - '*/*': string - } + 404: components['responses']['not_found'] } } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - 'reactions/create-for-release': { + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + 'reactions/create-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -36874,135 +36124,146 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the pull request review comment. * @enum {string} */ - content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ - 'secret-scanning/list-alerts-for-repo': { + 'reactions/delete-for-pull-request-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } 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'] + 204: never } } /** - * 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 'secret-scanning/get-alert': { + 'pulls/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + * 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. */ - 'secret-scanning/update-alert': { + 'pulls/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } - /** 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'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - state: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** @description The title of the pull request. */ + title?: string + /** @description The contents of the pull request. */ + body?: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean } } } } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-locations-for-alert': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components['parameters']['sort'] + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { @@ -37010,342 +36271,528 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['secret-scanning-location'][] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] } } /** - * Lists the people that have starred the repository. + * 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/enterprise-server@3.6/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. + * + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * - * 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: + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'activity/list-stargazers-for-repo': { + 'pulls/create-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] + 'application/json': components['schemas']['pull-request-review-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string + /** @description The relative path to the file that necessitates a comment. */ + path: string + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: 'LEFT' | 'RIGHT' | 'side' + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number + } + } + } } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 'repos/get-code-frequency-stats': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-reply-for-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 200: { + /** Response */ + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] } } - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - 'repos/get-commit-activity-stats': { + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ + 'pulls/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-activity'][] + 'application/json': components['schemas']['commit'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] } } - /** - * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - * - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 'repos/get-contributors-stats': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + 'pulls/list-files': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 503: components['responses']['service_unavailable'] + } + } + 'pulls/check-if-merged': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 200: { - content: { - 'application/json': components['schemas']['contributor-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + /** Response if pull request has been merged */ + 204: never + /** Not Found if pull request has not been merged */ + 404: unknown } } - /** - * 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** The array order is oldest week (index 0) to most recent week. */ + /** if merge was successful */ 200: { content: { - 'application/json': components['schemas']['participation-stats'] + 'application/json': components['schemas']['pull-request-merge-result'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Title for the automatic commit message. */ + commit_title?: string + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string + /** @description SHA that pull request head must match to allow merge. */ + sha?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: 'merge' | 'squash' | 'rebase' + } | null + } } } - /** - * 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': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + 'pulls/list-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-request'] } } - 204: components['responses']['no_content'] } } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - 'repos/create-commit-status': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/request-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - sha: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['status'] + 'application/json': components['schemas']['pull-request-simple'] } } + 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown } requestBody: { content: { 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string - /** @description A short description of the status. */ - description?: string - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[] + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[] } } } } - /** Lists the people watching the specified repository. */ - 'activity/list-watchers-for-repo': { + 'pulls/remove-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['pull-request-simple'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[] + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[] } } } } - 'activity/get-repo-subscription': { + /** The list of reviews returns in chronological order. */ + 'pulls/list-reviews': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if you subscribe to the repository */ + /** The list of reviews returns in chronological order. */ 200: { + headers: {} content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'][] } } - 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - 404: unknown } } - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - 'activity/set-repo-subscription': { + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description Determines if notifications should be received from this repository. */ - subscribed?: boolean - /** @description Determines if all notifications should be blocked from this repository. */ - ignored?: boolean + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. 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/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number + /** @description Text of the review comment. */ + body: string + /** @example 28 */ + line?: number + /** @example RIGHT */ + side?: string + /** @example 26 */ + start_line?: number + /** @example LEFT */ + start_side?: string + }[] } } } } - /** 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': { + 'pulls/get-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] } } - 'repos/list-tags': { + /** Update the review summary comment with new text. */ + 'pulls/update-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['tag'][] + 'application/json': components['schemas']['pull-request-review'] + } + } + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review. */ + body: string } } } } - /** - * 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': { + 'pulls/delete-pending-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - ref: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 302: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - 'repos/list-teams': { + /** List comments for a specific pull request review. */ + 'pulls/list-comments-for-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -37356,188 +36803,302 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['review-comment'][] } } + 404: components['responses']['not_found'] } } - 'repos/get-all-topics': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The message for the pull request review dismissal */ + message: string + /** + * @example "DISMISS" + * @enum {string} + */ + event?: 'DISMISS' + } + } } } - 'repos/replace-all-topics': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ + 'pulls/submit-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The body text of the pull request review */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['clone-traffic'] + 'application/json': { + message?: string + url?: string + } } } 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@3.6/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 + } } } - /** Get the top 10 popular contents over the last 14 days. */ - 'repos/get-top-paths': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Get the top 10 referrers over the last 14 days. */ - 'repos/get-top-referrers': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme-in-directory': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + dir: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['referrer-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['view-traffic'] + 'application/json': components['schemas']['release'][] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - 'repos/transfer': { + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-release': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 202: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['minimal-repository'] + 'application/json': components['schemas']['release'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: number[] + /** @description The name of the tag. */ + tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean } } } } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/check-vulnerability-alerts': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + 302: components['responses']['found'] + 404: components['responses']['not_found'] } } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/enable-vulnerability-alerts': { + 'repos/delete-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { @@ -37545,1107 +37106,990 @@ export interface operations { 204: never } } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/disable-vulnerability-alerts': { + /** Users with push access to the repository can edit a release asset. */ + 'repos/update-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The file name of the asset. */ + name?: string + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string + /** @example "uploaded" */ + state?: string + } + } } } - /** - * 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': { + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + 'repos/generate-release-notes': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - ref: string } } responses: { - /** Response */ - 302: never + /** Name and body of generated release notes */ + 200: { + content: { + 'application/json': components['schemas']['release-notes-content'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string + } + } } } /** - * 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: + * View the latest published full release for the repository. * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository + * 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/create-using-template': { + 'repos/get-latest-release': { parameters: { path: { - template_owner: string - template_repo: string + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['repository'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - owner?: string - /** @description The name of the new repository. */ - name: string - /** @description A short description of the new repository. */ - description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - include_all_branches?: boolean - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - private?: boolean + 200: { + content: { + 'application/json': components['schemas']['release'] } } } } - /** - * Lists all public repositories in the order that they were created. - * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. - */ - 'repos/list-public': { + /** Get a published release with the specified tag. */ + 'repos/get-release-by-tag': { parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components['parameters']['since-repo'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** tag parameter */ + tag: string } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['release'] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] + 404: components['responses']['not_found'] } } - /** 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': { + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ + 'repos/get-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['actions-secret'][] - } + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Users with push access to the repository can delete a release. */ + 'repos/delete-release': { parameters: { path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Users with push access to the repository can edit a release. */ + 'repos/update-release': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['release'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the tag. */ + tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean } } } } - /** 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': { + 'repos/list-release-assets': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['actions-secret'] + 'application/json': components['schemas']['release-asset'][] } } } } /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#create-a-release) to upload a release asset. * - * #### Example encrypting a secret using Ruby + * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * 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: * - * ```ruby - * require "rbnacl" - * require "base64" + * `application/zip` * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * GitHub Enterprise Server 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * 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. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * **Notes:** + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ - 'actions/create-or-update-environment-secret': { + 'repos/upload-release-asset': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + query: { + name: string + label?: string } } responses: { - /** Response when creating a secret */ + /** Response for successful upload */ 201: { content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['release-asset'] } } - /** Response when updating a secret */ - 204: never + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown } requestBody: { content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - } - } - } - } - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + '*/*': string } } - responses: { - /** Default 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': { + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + 'reactions/list-for-release': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - /** attributes to exclude */ - excludedAttributes?: string + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-group-list-enterprise'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** - * **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': { + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + 'reactions/create-for-release': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ 201: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - /** **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': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + 'reactions/delete-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists the status of each repository cache replica. */ + 'repos/list-cache-info': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Attributes to exclude. */ - excludedAttributes?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Status information for cache replicas */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': { + host: string + location: string + git: { + /** @enum {string} */ + sync_status: 'offline' | 'inactive' | 'in_sync' | 'not_in_sync' + /** Format: date-time */ + last_sync: string + } + }[] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/set-information-for-provisioned-enterprise-group': { + 'secret-scanning/list-alerts-for-repo': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] + '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'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-scim-group-from-enterprise': { + /** + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/get-alert': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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 */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'] + } + } + 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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). + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ - 'enterprise-admin/update-attribute-for-enterprise-group': { + 'secret-scanning/update-alert': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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']['scim-enterprise-group'] + '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': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: [ - { - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown - }, - ...{ - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown - }[], - ] + state: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] } } } } /** - * **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. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/list-provisioned-identities-enterprise': { + 'secret-scanning/list-locations-for-alert': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-user-list-enterprise'] + 'application/json': components['schemas']['secret-scanning-location'][] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **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. + * Lists the people that have starred the repository. * - * 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. + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ - 'enterprise-admin/provision-and-invite-enterprise-user': { + 'activity/list-stargazers-for-repo': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] } } + 422: components['responses']['validation_failed'] } } - /** **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': { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 'repos/get-code-frequency-stats': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['code-frequency-stat'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } - /** - * **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': { + /** 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: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + 'application/json': components['schemas']['commit-activity'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-user-from-enterprise': { + /** + * 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: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['contributor-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } /** - * **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`. + * 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`. * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * The array order is oldest week (index 0) to most recent week. */ - 'enterprise-admin/update-attribute-for-enterprise-user': { + 'repos/get-participation-stats': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** The array order is oldest week (index 0) to most recent week. */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { [key: string]: unknown }[] + 'application/json': components['schemas']['participation-stats'] } } + 404: components['responses']['not_found'] } } /** - * 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. + * Each array contains the day number, hour number, and number of commits: * - * 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. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * 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. + * 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. */ - 'scim/list-provisioned-identities': { + 'repos/get-punch-card-stats': { 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 + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** 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/scim+json': components['schemas']['scim-user-list'] + 'application/json': components['schemas']['code-frequency-stat'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 204: components['responses']['no_content'] } } - /** Provision organization membership for a user, and send an activation email to the email address. */ - 'scim/provision-and-invite-user': { + /** + * 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: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + sha: string } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['status'] } } - 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': { /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe + * @description The state of the status. + * @enum {string} */ - displayName?: string + state: 'error' | 'failure' | 'pending' | 'success' /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - name: { - givenName: string - familyName: string - formatted?: string - } + target_url?: string | null + /** @description A short description of the status. */ + description?: string | null /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default */ - emails: [ - { - value: string - primary?: boolean - type?: string - }, - ...{ - value: string - primary?: boolean - type?: string - }[], - ] - schemas?: string[] - externalId?: string - groups?: string[] - active?: boolean + context?: string } } } } - 'scim/get-provisioning-information-for-user': { + /** Lists the people watching the specified repository. */ + 'activity/list-watchers-for-repo': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['simple-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': { + 'activity/get-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + 404: unknown + } + } + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ + 'activity/set-repo-subscription': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['repository-subscription'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - externalId?: string - groups?: string[] - active?: boolean - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string - familyName: string - formatted?: string - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: [ - { - type?: string - value: string - primary?: boolean - }, - ...{ - type?: string - value: string - primary?: boolean - }[], - ] + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean } } } } - 'scim/delete-user-from-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ + 'activity/delete-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + } + } + 'repos/list-tags': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] + } + } } } /** - * 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`. + * This returns the tag protection states of a repository. * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * This information is only available to repository administrators. */ - 'scim/update-attribute-for-user': { + 'repos/list-tag-protection': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['tag-protection'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + 'repos/create-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { /** Response */ - 429: { + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['tag-protection'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - Operations: [ - { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: - | { - active?: boolean | null - userName?: string | null - externalId?: string | null - givenName?: string | null - familyName?: string | null - } - | { - value?: string - primary?: boolean - }[] - | string - }, - ...{ - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: - | { - active?: boolean | null - userName?: string | null - externalId?: string | null - givenName?: string | null - familyName?: string | null - } - | { - value?: string - primary?: boolean - }[] - | string - }[], - ] + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string } } } } /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. */ - 'search/code': { + 'repos/delete-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the tag protection. */ + tag_protection_id: components['parameters']['tag-protection-id'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + 'repos/list-teams': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'indexed' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38654,260 +38098,209 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['code-search-result-item'][] - } + 'application/json': components['schemas']['team'][] } } - 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': { + 'repos/get-all-topics': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'author-date' | 'committer-date' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['commit-search-result-item'][] - } + 'application/json': components['schemas']['topic'] } } - 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'repos/replace-all-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). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: - | 'comments' - | 'reactions' - | 'reactions-+1' - | 'reactions--1' - | 'reactions-smile' - | 'reactions-thinking_face' - | 'reactions-heart' - | 'reactions-tada' - | 'interactions' - | 'created' - | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[] + } + } + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + 'repos/transfer': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['issue-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[] } } - 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` + * 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. * - * The labels that best match the query appear first in the search results. + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ - 'search/labels': { + 'repos/download-zipball-archive': { parameters: { - query: { - /** The id of the repository. */ - repository_id: number - /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'created' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['label-search-result-item'][] - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 302: never } } /** - * 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). + * 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. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * - * 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: + * **OAuth scope requirements** * - * `q=tetris+language:assembly&sort=stars&order=desc` + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * 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. + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - 'search/repos': { + 'repos/create-using-template': { parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + template_owner: string + template_repo: string } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['repo-search-result-item'][] - } + 'application/json': components['schemas']['repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string + /** @description The name of the new repository. */ + name: string + /** @description A short description of the new repository. */ + description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } } /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` + * Lists all public repositories in the order that they were created. * - * 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. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ - 'search/topics': { + 'repos/list-public': { parameters: { query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components['parameters']['since-repo'] + /** Specifies the types of repositories to return. This endpoint will only list repositories available to all users on the enterprise. */ + visibility?: 'all' | 'public' } } responses: { /** Response */ 200: { + headers: { + Link?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['topic-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'][] } } 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** 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: { + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'followers' | 'repositories' | 'joined' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38916,215 +38309,312 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - incomplete_results: boolean - items: components['schemas']['user-search-result-item'][] + secrets: components['schemas']['actions-secret'][] } } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + 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']['team-full'] + 'application/json': components['schemas']['actions-public-key'] } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } } } /** - * **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. + * 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. * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * #### Example encrypting a secret using Node.js * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/update-legacy': { + 'actions/create-or-update-environment-secret': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - /** Response */ + /** Response when creating a secret */ 201: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['empty-object'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ - name: string - /** @description The description of the team. */ - description?: string - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string } } } } - /** - * **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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Default 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: { - /** 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'] + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + /** attributes to exclude */ + excludedAttributes?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion'][] + 'application/json': components['schemas']['scim-group-list-enterprise'] } } } } /** - * **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/). + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title: string - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] } } } } - /** - * **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': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + query: { + /** Attributes to exclude. */ + excludedAttributes?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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. */ - 'teams/delete-discussion-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] + } + } + } + } + /** **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: { @@ -39133,246 +38623,317 @@ export interface operations { } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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). */ - 'teams/update-discussion-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title?: string - /** @description The discussion post's body text. */ - body?: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: [ + { + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: unknown + }, + ...{ + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: 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 discussion comments](https://docs.github.com/rest/reference/teams#list-discussion-comments) endpoint. + * **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 Enterprise Server. 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 Enterprise Server account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. * - * 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/). + * 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ - 'teams/list-discussion-comments-legacy': { + 'enterprise-admin/list-provisioned-identities-enterprise': { 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'][] + 'application/json': components['schemas']['scim-user-list-enterprise'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * Provision enterprise membership for a user, and send organization invitation emails to the email address. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-comment-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/get-discussion-comment-legacy': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * 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`. * - * 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/). + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. */ - 'teams/update-discussion-comment-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/list-for-team-discussion-comment-legacy': { + /** **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: { - 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } + 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 "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * **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`. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` */ - 'reactions/create-for-team-discussion-comment-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: 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 reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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` * - * 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/). + * 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. */ - 'reactions/list-for-team-discussion-legacy': { + 'search/code': { 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) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39381,57 +38942,94 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['code-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * 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/enterprise-server@3.6/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` */ - 'reactions/create-for-team-discussion-legacy': { + 'search/commits': { parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['commit-search-result-item'][] + } } } + 304: components['responses']['not_modified'] } } /** - * **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. + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * - * 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:** 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)." */ - 'teams/list-pending-invitations-legacy': { + 'search/issues-and-pull-requests': { parameters: { - path: { - team_id: components['parameters']['team-id'] - } query: { - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39440,32 +39038,43 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['issue-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Team members will include the members of child teams. + * 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/enterprise-server@3.6/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. */ - 'teams/list-members-legacy': { + 'search/labels': { 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) */ + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39474,312 +39083,455 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['label-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } /** - * The "Get team member" endpoint (described below) is deprecated. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * To list members in a team, the team must be visible to the authenticated user. + * 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. */ - 'teams/get-member-legacy': { + 'search/repos': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if user is a member */ - 204: never - /** if user is not a member */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['repo-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * The "Add team member" endpoint (described below) is deprecated. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * 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: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * `q=ruby+is:featured` * - * 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)." + * 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. */ - 'teams/add-member-legacy': { + 'search/topics': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + q: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - 422: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['topic-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] } } /** - * The "Remove team member" endpoint (described below) is deprecated. + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * For example, if you're looking for a list of popular users, you might try this query: * - * 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. + * `q=tom+repos:%3E42+followers:%3E1000` * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 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. */ - 'teams/remove-member-legacy': { + 'search/users': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - /** Not Found if team synchronization is setup */ - 404: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['user-search-result-item'][] + } + } + } + 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 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. + * This endpoint allows you to check the status of the most recent configuration process: * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Note that you may need to wait several seconds after you start a process before you can check its status. * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. + * The different statuses are: * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | */ - 'teams/get-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/get-configuration-status': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['configuration-status'] + } } } + } + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + 'enterprise-admin/start-configuration-process': { + responses: { + /** Response */ + 202: unknown + } + } + /** Check your installation's maintenance status: */ + 'enterprise-admin/get-maintenance-status': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['maintenance-status'] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/enable-or-disable-maintenance-mode': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['maintenance-status'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description A JSON string with the attributes `enabled` and `when`. + * + * The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + * + * The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + */ + maintenance: string } } - 404: components['responses']['not_found'] } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + 'enterprise-admin/get-settings': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-settings'] + } + } + } + } + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). * - * 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. + * **Notes:** * - * 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. + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." */ - 'teams/add-or-update-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/set-settings': { + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings: string + } + } + } + } + 'enterprise-admin/get-all-authorized-ssh-keys': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/add-authorized-ssh-key': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string + } } } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/remove-authorized-ssh-key': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['ssh-key'][] } } - /** Forbidden if team synchronization is set up */ - 403: unknown - 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string } } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. * - * 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. + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/remove-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } + 'enterprise-admin/create-enterprise-server-license': { responses: { /** Response */ - 204: never - /** if team synchronization is set up */ - 403: unknown + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your _.ghl_ license file. */ + license: string + /** @description You **must** provide a password _only if_ you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. */ + password?: string + /** @description An optional JSON string containing the installation settings. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings?: string + } + } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * This API upgrades your license and also triggers the configuration process. * - * Lists the organization projects for a team. + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/list-projects-legacy': { + 'enterprise-admin/upgrade-license': { + responses: { + /** Response */ + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your new _.ghl_ license file. */ + license?: string + } + } + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ + 'teams/get-legacy': { parameters: { path: { + /** The unique identifier of the team. */ 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'][] + '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 [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * 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/check-permissions-for-project-legacy': { + 'teams/delete-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown + 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 [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) 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. + * 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/add-or-update-project-permissions-legacy': { + 'teams/update-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { + 201: { content: { - 'application/json': { - message?: string - documentation_url?: string - } + 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The name of the team. */ + name: string + /** @description The description of the team. */ + description?: string /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. * @enum {string} */ - permission?: 'read' | 'write' | 'admin' + privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#list-discussions) 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. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - 'teams/list-repos-legacy': { + 'teams/list-discussions-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39790,441 +39542,355 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['team-discussion'][] } } - 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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. * - * **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. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'teams/check-permissions-for-repo-legacy': { + 'teams/create-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { - /** Alternative response with extra repository information */ - 200: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['team-repository'] + 'application/json': components['schemas']['team-discussion'] } } - /** Response if repository is managed by this team */ - 204: never - /** Not Found if repository is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-or-update-repo-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The discussion post's title. */ + title: string + /** @description The discussion post's body text. */ + body: string /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false */ - permission?: 'pull' | 'push' | 'admin' + private?: boolean } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) 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. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-repo-legacy': { + 'teams/get-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 204: never + 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 [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. * - * List IdP groups connected to a team on GitHub. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/list-idp-groups-for-legacy': { + 'teams/delete-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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 [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. * - * 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. + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/create-or-update-idp-group-connections-legacy': { + 'teams/update-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['team-discussion'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - /** @example "caceab43fc9ffa20081c" */ - id?: string - /** @example "external-team-6c13e7288ef7" */ - name?: string - /** @example "moar cheese pleese" */ - description?: string - }[] - /** @example "I am not a timestamp" */ - synced_at?: string + /** @description The discussion post's title. */ + title?: string + /** @description The discussion post's body text. */ + body?: string } } } } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - 'teams/list-child-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 [List discussion comments](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussion-comments-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** if child teams exist */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['team-discussion-comment'][] } } - 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. + * **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'users/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } + 'teams/create-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } - 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: { + 201: { content: { - 'application/json': components['schemas']['private-user'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - name?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - email?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - blog?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - twitter_username?: string | null - /** - * @description The new company of the user. - * @example Acme corporation - */ - company?: string - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - location?: string - /** @description The new hiring availability of the user. */ - hireable?: boolean - /** @description The new short biography of the user. */ - bio?: string - } - } - } - } - /** List the users you've blocked on your personal account. */ - 'users/list-blocked-by-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] + /** @description The discussion comment's body text. */ + body: string } } - 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': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } 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: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team-discussion-comment'] } } } } - 'users/block': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'users/unblock': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } } } /** - * Lists the authenticated user's codespaces. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-for-authenticated-user': { + 'reactions/list-for-team-discussion-comment-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - repository_id?: components['parameters']['repository-id-in-query'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } + 'application/json': components['schemas']['reaction'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Creates a new codespace, owned by the authenticated user. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ - 'codespaces/create-for-authenticated-user': { + 'reactions/create-for-team-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } + } responses: { - /** Response when the codespace was successfully created */ + /** Response */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['reaction'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } requestBody: { content: { - 'application/json': - | { - /** @description Repository id for this codespace */ - repository_id: number - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - | { - /** @description Pull request number for this codespace */ - pull_request: { - /** @description Pull request number */ - pull_request_number: number - /** @description Repository id for this codespace */ - repository_id: number - } - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } } } } /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-secrets-for-authenticated-user': { + 'reactions/list-for-team-discussion-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40235,491 +39901,545 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['codespaces-secret'][] - } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - 'codespaces/get-public-key-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-user-public-key'] + 'application/json': components['schemas']['reaction'][] } } } } /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ - 'codespaces/get-secret-for-authenticated-user': { + 'reactions/create-for-team-discussion-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['codespaces-secret'] + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * Team members will include the members of child teams. + */ + 'teams/list-members-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** Filters members returned by their role in the team. */ + role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ + per_page?: 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. * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. * - * #### Example encrypting a secret using Ruby + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/get-member-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** if user is a member */ + 204: never + /** if user is not a member */ + 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * - * ```ruby - * require "rbnacl" - * require "base64" + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/create-or-update-secret-for-authenticated-user': { + 'teams/add-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response after successfully creaing a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ + /** Response */ 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: string[] - } - } + 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown } } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - 'codespaces/delete-secret-for-authenticated-user': { + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + /** Not Found if team synchronization is setup */ + 404: unknown } } /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ - 'codespaces/list-repositories-for-secret-for-authenticated-user': { + 'teams/get-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } + 'application/json': components['schemas']['team-membership'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. */ - 'codespaces/set-repositories-for-secret-for-authenticated-user': { + 'teams/add-or-update-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repositories were added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: number[] + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' } } } } /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/add-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ - 'codespaces/remove-repository-for-secret-for-authenticated-user': { + 'teams/remove-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repository was removed from the selected list */ + /** Response */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** if team synchronization is set up */ + 403: unknown } } /** - * Gets information about a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Lists the organization projects for a team. */ - 'codespaces/get-for-authenticated-user': { + 'teams/list-projects-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['team-project'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Deletes a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. */ - 'codespaces/delete-for-authenticated-user': { + 'teams/check-permissions-for-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 202: components['responses']['accepted'] - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown } } /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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. */ - 'codespaces/update-for-authenticated-user': { + 'teams/add-or-update-project-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': { + message?: string + documentation_url?: string + } } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A valid machine to transition this codespace to. */ - machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - recent_folders?: string[] + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' } } } } /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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. */ - 'codespaces/export-for-authenticated-user': { + 'teams/remove-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 202: { + 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 [List team repositories](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ + 'teams/list-repos-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['minimal-repository'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } /** - * Gets information about an export of a codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ - 'codespaces/get-export-details-for-authenticated-user': { + 'teams/check-permissions-for-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - export_id: components['parameters']['export-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** Alternative response with extra repository information */ 200: { content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['team-repository'] } } - 404: components['responses']['not_found'] + /** Response if repository is managed by this team */ + 204: never + /** Not Found if repository is not managed by this team */ + 404: unknown } } /** - * List the machine types a codespace can transition to use. + * **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/enterprise-server@3.6/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. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/codespace-machines-for-authenticated-user': { + 'teams/add-or-update-repo-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Starts a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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. */ - 'codespaces/start-for-authenticated-user': { + 'teams/remove-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } + 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 child teams`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ + 'teams/list-child-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - /** Payment required */ - 402: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team'][] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] } } /** - * Stops a user's codespace. + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. */ - 'codespaces/stop-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } + 'users/get-authenticated': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] } } + 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** Sets the visibility for your primary email addresses. */ - 'users/set-primary-email-visibility-for-authenticated-user': { + /** **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']['email'][] + 'application/json': components['schemas']['private-user'] } } 304: components['responses']['not_modified'] @@ -40732,10 +40452,39 @@ export interface operations { content: { 'application/json': { /** - * @description Denotes whether an email is publicly visible. - * @enum {string} + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj */ - visibility: 'public' | 'private' + twitter_username?: string | null + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string + /** @description The new hiring availability of the user. */ + hireable?: boolean + /** @description The new short biography of the user. */ + bio?: string } } } @@ -40744,7 +40493,7 @@ export interface operations { 'users/list-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40823,7 +40572,7 @@ export interface operations { 'users/list-followers-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40846,7 +40595,7 @@ export interface operations { 'users/list-followed-by-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40868,6 +40617,7 @@ export interface operations { 'users/check-person-is-followed-by-authenticated': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40886,13 +40636,14 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40909,6 +40660,7 @@ export interface operations { 'users/unfollow': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40921,11 +40673,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-gpg-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40945,7 +40697,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-gpg-key-for-authenticated-user': { parameters: {} responses: { @@ -40964,17 +40716,19 @@ export interface operations { requestBody: { content: { 'application/json': { + /** @description A descriptive name for the new key. */ + name?: string /** @description A GPG key in ASCII-armored format. */ armored_public_key: string } } } } - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40991,11 +40745,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -41012,7 +40766,7 @@ export interface operations { /** * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -41021,7 +40775,7 @@ export interface operations { 'apps/list-installations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41041,7 +40795,6 @@ export interface operations { 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] } } /** @@ -41049,18 +40802,18 @@ export interface operations { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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 */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41086,13 +40839,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/add-repo-to-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -41107,13 +40861,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/remove-repo-from-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -41125,74 +40880,30 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - 'interactions/get-restrictions-for-authenticated-user': { - responses: { - /** Default response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - 'interactions/set-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - 'interactions/remove-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 204: never - } - } /** * List issues across owned and member repositories assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-authenticated-user': { parameters: { query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41210,11 +40921,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-public-ssh-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41234,7 +40945,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-public-ssh-key-for-authenticated-user': { parameters: {} responses: { @@ -41264,11 +40975,11 @@ export interface operations { } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41285,11 +40996,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41302,57 +41013,12 @@ export interface operations { 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. */ + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ state?: 'active' | 'pending' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41375,6 +41041,7 @@ export interface operations { 'orgs/get-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41392,6 +41059,7 @@ export interface operations { 'orgs/update-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41422,7 +41090,7 @@ export interface operations { 'migrations/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41464,6 +41132,16 @@ export interface operations { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean /** * @description Do not include attachments in the migration * @example true @@ -41479,6 +41157,12 @@ export interface operations { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean /** * @description Exclude attributes from the API response to improve performance * @example [ @@ -41491,39 +41175,6 @@ export interface operations { } } } - /** - * 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: * @@ -41550,7 +41201,7 @@ export interface operations { 'migrations/get-archive-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } } @@ -41562,51 +41213,15 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - 'migrations/delete-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - 'migrations/unlock-repo-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists all the repositories for this user migration. */ 'migrations/list-repos-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41633,7 +41248,7 @@ export interface operations { 'orgs/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41652,221 +41267,7 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-authenticated-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/create-for-authenticated-user': { parameters: {} responses: { @@ -41879,7 +41280,6 @@ export interface operations { 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: { @@ -41899,11 +41299,11 @@ export interface operations { } } } - /** 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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ 'users/list-public-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41931,7 +41331,7 @@ export interface operations { 'repos/list-for-authenticated-user': { parameters: { query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + /** Limit results to repositories with the specified visibility. */ visibility?: 'all' | 'public' | 'private' /** * Comma-separated list of values. Can include: @@ -41940,17 +41340,13 @@ export interface operations { * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ + /** Limit results to repositories of the specified type. 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`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41978,7 +41374,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -42084,6 +41480,40 @@ export interface operations { * @example false */ delete_branch_on_merge?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether downloads are enabled. * @default true @@ -42104,7 +41534,7 @@ export interface operations { 'repos/list-invitations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42127,7 +41557,7 @@ export interface operations { 'repos/decline-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -42143,7 +41573,7 @@ export interface operations { 'repos/accept-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -42159,16 +41589,16 @@ export interface operations { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ '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). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42191,7 +41621,9 @@ export interface operations { 'activity/check-repo-is-starred-by-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42209,11 +41641,13 @@ export interface operations { } } } - /** 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'activity/star-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42229,7 +41663,9 @@ export interface operations { 'activity/unstar-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42246,7 +41682,7 @@ export interface operations { 'activity/list-watched-repos-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42265,11 +41701,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ 'teams/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42289,16 +41725,16 @@ export interface operations { } } /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -42318,15 +41754,16 @@ export interface operations { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ 'users/get-by-username': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42344,10 +41781,11 @@ export interface operations { 'activity/list-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42366,11 +41804,13 @@ export interface operations { 'activity/list-org-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42388,10 +41828,11 @@ export interface operations { 'activity/list-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42410,10 +41851,11 @@ export interface operations { 'users/list-followers-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42433,10 +41875,11 @@ export interface operations { 'users/list-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42455,6 +41898,7 @@ export interface operations { 'users/check-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] target_user: string } @@ -42470,12 +41914,13 @@ export interface operations { 'gists/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42496,10 +41941,11 @@ export interface operations { 'users/list-gpg-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42528,6 +41974,7 @@ export interface operations { 'users/get-context-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { @@ -42551,11 +41998,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-user-installation': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42572,10 +42020,11 @@ export interface operations { 'users/list-public-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42594,15 +42043,16 @@ export interface operations { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ 'orgs/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42618,240 +42068,16 @@ export interface operations { } } } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } 'projects/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42872,10 +42098,11 @@ export interface operations { 'activity/list-received-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42893,10 +42120,11 @@ export interface operations { 'activity/list-received-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42915,16 +42143,17 @@ export interface operations { 'repos/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Can be one of `all`, `owner`, `member`. */ + /** Limit results to repositories of the specified type. */ type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42940,88 +42169,49 @@ export interface operations { } } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-actions-billing-user': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'enterprise-admin/promote-user-to-be-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + 204: never } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-packages-billing-user': { + /** You can demote any user account except your own. */ + 'enterprise-admin/demote-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-shared-storage-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } + 204: never } } /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 'activity/list-repos-starred-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -43041,10 +42231,11 @@ export interface operations { 'activity/list-repos-watched-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -43060,6 +42251,54 @@ export interface operations { } } } + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'enterprise-admin/suspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being suspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + 'enterprise-admin/unsuspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being unsuspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } /** Get a random sentence from the Zen of GitHub */ 'meta/get-zen': { responses: { diff --git a/test/v3/expected/github.ts b/test/v3/expected/github.ts index 3ced80d9b..e2f1799ea 100644 --- a/test/v3/expected/github.ts +++ b/test/v3/expected/github.ts @@ -8,29 +8,146 @@ export interface paths { /** Get Hypermedia links to resources accessible in GitHub's REST API */ get: operations['meta/root'] } + '/admin/hooks': { + get: operations['enterprise-admin/list-global-webhooks'] + post: operations['enterprise-admin/create-global-webhook'] + } + '/admin/hooks/{hook_id}': { + get: operations['enterprise-admin/get-global-webhook'] + delete: operations['enterprise-admin/delete-global-webhook'] + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + patch: operations['enterprise-admin/update-global-webhook'] + } + '/admin/hooks/{hook_id}/pings': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + post: operations['enterprise-admin/ping-global-webhook'] + } + '/admin/keys': { + get: operations['enterprise-admin/list-public-keys'] + } + '/admin/keys/{key_ids}': { + delete: operations['enterprise-admin/delete-public-key'] + } + '/admin/ldap/teams/{team_id}/mapping': { + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + patch: operations['enterprise-admin/update-ldap-mapping-for-team'] + } + '/admin/ldap/teams/{team_id}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-team'] + } + '/admin/ldap/users/{username}/mapping': { + patch: operations['enterprise-admin/update-ldap-mapping-for-user'] + } + '/admin/ldap/users/{username}/sync': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + post: operations['enterprise-admin/sync-ldap-mapping-for-user'] + } + '/admin/organizations': { + post: operations['enterprise-admin/create-org'] + } + '/admin/organizations/{org}': { + patch: operations['enterprise-admin/update-org-name'] + } + '/admin/pre-receive-environments': { + get: operations['enterprise-admin/list-pre-receive-environments'] + post: operations['enterprise-admin/create-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}': { + get: operations['enterprise-admin/get-pre-receive-environment'] + /** + * If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ + */ + delete: operations['enterprise-admin/delete-pre-receive-environment'] + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + patch: operations['enterprise-admin/update-pre-receive-environment'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + post: operations['enterprise-admin/start-pre-receive-environment-download'] + } + '/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + get: operations['enterprise-admin/get-download-status-for-pre-receive-environment'] + } + '/admin/pre-receive-hooks': { + get: operations['enterprise-admin/list-pre-receive-hooks'] + post: operations['enterprise-admin/create-pre-receive-hook'] + } + '/admin/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook'] + delete: operations['enterprise-admin/delete-pre-receive-hook'] + patch: operations['enterprise-admin/update-pre-receive-hook'] + } + '/admin/tokens': { + /** Lists personal access tokens for all users, including admin users. */ + get: operations['enterprise-admin/list-personal-access-tokens'] + } + '/admin/tokens/{token_id}': { + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + delete: operations['enterprise-admin/delete-personal-access-token'] + } + '/admin/users': { + /** + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. + * + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. + * + * If the login name or email address is already associated with an account, the server will return a `422` response. + */ + post: operations['enterprise-admin/create-user'] + } + '/admin/users/{username}': { + /** + * Deleting a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. + * + * You can delete any user account except your own. + */ + delete: operations['enterprise-admin/delete-user'] + patch: operations['enterprise-admin/update-username-for-user'] + } + '/admin/users/{username}/authorizations': { + post: operations['enterprise-admin/create-impersonation-o-auth-token'] + delete: operations['enterprise-admin/delete-impersonation-o-auth-token'] + } '/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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`. */ + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] } @@ -38,7 +155,7 @@ export interface paths { /** * Returns a list of webhook deliveries for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/list-webhook-deliveries'] } @@ -46,7 +163,7 @@ export interface paths { /** * Returns a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-webhook-delivery'] } @@ -54,13 +171,13 @@ export interface paths { /** * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ post: operations['apps/redeliver-webhook-delivery'] } '/app/installations': { /** - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. */ @@ -70,13 +187,13 @@ export interface paths { /** * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ delete: operations['apps/delete-installation'] } @@ -84,37 +201,37 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * 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 Enterprise Server 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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"]`. + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). */ @@ -122,44 +239,44 @@ export interface paths { } '/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. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. You must also provide a valid OAuth `access_token` as an input parameter and the grant for the token's owner will be deleted. * Deleting an OAuth application's grant will also delete all OAuth tokens associated with the application for the user. Once deleted, the application will have no access to the user's account and will no longer be listed on [the application authorizations settings screen within GitHub](https://github.com/settings/applications#authorized). */ delete: operations['apps/delete-authorization'] } '/applications/{client_id}/token': { - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ + /** 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/enterprise-server@3.6/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. */ + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ patch: operations['apps/reset-token'] } '/applications/{client_id}/token/scoped': { - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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'] } '/apps/{app_slug}': { /** * **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). * - * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). * * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ @@ -167,39 +284,39 @@ export interface paths { } '/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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). + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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)." + * 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/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * * You can only send one of these scope keys at a time. */ @@ -212,9 +329,75 @@ export interface paths { get: operations['codes-of-conduct/get-conduct-code'] } '/emojis': { - /** Lists all the emojis available to use on GitHub. */ + /** Lists all the emojis available to use on GitHub Enterprise Server. */ get: operations['emojis/get'] } + '/enterprise/announcement': { + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + get: operations['enterprise-admin/get-announcement'] + /** Removes the global announcement banner in your enterprise. */ + delete: operations['enterprise-admin/remove-announcement'] + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + patch: operations['enterprise-admin/set-announcement'] + } + '/enterprise/settings/license': { + get: operations['enterprise-admin/get-license-information'] + } + '/enterprise/stats/all': { + get: operations['enterprise-admin/get-all-stats'] + } + '/enterprise/stats/comments': { + get: operations['enterprise-admin/get-comment-stats'] + } + '/enterprise/stats/gists': { + get: operations['enterprise-admin/get-gist-stats'] + } + '/enterprise/stats/hooks': { + get: operations['enterprise-admin/get-hooks-stats'] + } + '/enterprise/stats/issues': { + get: operations['enterprise-admin/get-issue-stats'] + } + '/enterprise/stats/milestones': { + get: operations['enterprise-admin/get-milestone-stats'] + } + '/enterprise/stats/orgs': { + get: operations['enterprise-admin/get-org-stats'] + } + '/enterprise/stats/pages': { + get: operations['enterprise-admin/get-pages-stats'] + } + '/enterprise/stats/pulls': { + get: operations['enterprise-admin/get-pull-request-stats'] + } + '/enterprise/stats/repos': { + get: operations['enterprise-admin/get-repo-stats'] + } + '/enterprise/stats/users': { + get: operations['enterprise-admin/get-user-stats'] + } + '/enterprises/{enterprise}/actions/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-enterprise'] + } + '/enterprises/{enterprise}/actions/cache/usage-policy': { + /** + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy-for-enterprise'] + /** + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + patch: operations['actions/set-actions-cache-usage-policy-for-enterprise'] + } '/enterprises/{enterprise}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. @@ -271,6 +454,25 @@ export interface paths { */ put: operations['enterprise-admin/set-allowed-actions-enterprise'] } + '/enterprises/{enterprise}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-enterprise'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-enterprise'] + } '/enterprises/{enterprise}/actions/runner-groups': { /** * Lists all self-hosted runner groups for an enterprise. @@ -472,46 +674,19 @@ export interface paths { '/enterprises/{enterprise}/secret-scanning/alerts': { /** * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ get: operations['secret-scanning/list-alerts-for-enterprise'] } - '/enterprises/{enterprise}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-actions-billing-ghe'] - } '/enterprises/{enterprise}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. - */ - get: operations['billing/get-github-advanced-security-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * The authenticated user must be an enterprise admin. - */ - get: operations['billing/get-github-packages-billing-ghe'] - } - '/enterprises/{enterprise}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * The authenticated user must be an enterprise admin. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['billing/get-shared-storage-billing-ghe'] + get: operations['billing/get-github-advanced-security-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. */ @@ -519,17 +694,17 @@ export interface paths { } '/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: + * GitHub Enterprise Server 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) + * * **Timeline**: The GitHub Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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. + * * **Security advisories**: A collection of public announcements that provide information about security-related vulnerabilities in software on GitHub Enterprise Server. * - * **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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ get: operations['activity/get-feeds'] } @@ -547,7 +722,7 @@ export interface paths { /** * 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. + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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'] } @@ -558,7 +733,7 @@ export interface paths { '/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. */ + /** Allows you to update a gist's description and to update, delete, or 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': { @@ -575,12 +750,11 @@ export interface paths { } '/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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ put: operations['gists/star'] delete: operations['gists/unstar'] } @@ -588,13 +762,13 @@ export interface paths { 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). */ + /** List all templates available to pass as an option when [creating a repository](https://docs.github.com/enterprise-server@3.6/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. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ get: operations['gitignore/get-template'] } @@ -602,7 +776,7 @@ export interface paths { /** * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ get: operations['apps/list-repos-accessible-to-installation'] } @@ -610,9 +784,9 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ delete: operations['apps/revoke-installation-access-token'] } @@ -626,7 +800,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list'] } @@ -643,60 +817,7 @@ export interface paths { /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ post: operations['markdown/render-raw'] } - '/marketplace_listing/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account'] - } - '/marketplace_listing/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans'] - } - '/marketplace_listing/plans/{plan_id}/accounts': { - /** - * Returns user and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan'] - } - '/marketplace_listing/stubbed/accounts/{account_id}': { - /** - * Shows whether the user or organization account actively subscribes to a plan listed by the authenticated GitHub App. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/get-subscription-plan-for-account-stubbed'] - } - '/marketplace_listing/stubbed/plans': { - /** - * Lists all plans that are part of your GitHub Marketplace listing. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-plans-stubbed'] - } - '/marketplace_listing/stubbed/plans/{plan_id}/accounts': { - /** - * Returns repository and organization accounts associated with the specified plan, including free plans. For per-seat pricing, you see the list of accounts that have purchased the plan, including the number of seats purchased. When someone submits a plan change that won't be processed until the end of their billing cycle, you will also see the upcoming pending change. - * - * GitHub Apps must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. OAuth Apps must use [basic authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) with their client ID and client secret to access this endpoint. - */ - get: operations['apps/list-accounts-for-plan-stubbed'] - } '/meta': { - /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." - * - * **Note:** The IP addresses shown in the documentation's response are only example values. You must always query the API directly to get the latest list of IP addresses. - */ get: operations['meta/get'] } '/networks/{owner}/{repo}/events': { @@ -705,16 +826,18 @@ export interface paths { '/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`. */ + /** Marks all notifications as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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}': { + /** Gets information about a notification thread. */ get: operations['activity/get-thread'] + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ 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). + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/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. */ @@ -724,10 +847,10 @@ export interface paths { * * 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. + * 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/enterprise-server@3.6/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`. */ + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ delete: operations['activity/delete-thread-subscription'] } '/octocat': { @@ -736,9 +859,9 @@ export interface paths { } '/organizations': { /** - * Lists all organizations, in the order that they were created on GitHub. + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * **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. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ get: operations['orgs/list'] } @@ -747,32 +870,43 @@ export interface paths { * List the custom repository roles available in this organization. In order to see custom * repository roles in an organization, the authenticated user must be an organization owner. * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - get: operations['orgs/list-custom-roles'] - } - '/organizations/{org}/team/{team_slug}/external-groups': { - /** - * Lists a connection between a team and an external group. + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] + get: operations['orgs/list-custom-roles'] } '/orgs/{org}': { /** * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server 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). + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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/cache/usage': { + /** + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-for-org'] + } + '/orgs/{org}/actions/cache/usage-by-repository': { + /** + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-by-repo-for-org'] + } '/orgs/{org}/actions/permissions': { /** * Gets the GitHub Actions permissions policy for repositories and allowed actions in an organization. @@ -838,14 +972,16 @@ export interface paths { '/orgs/{org}/actions/permissions/workflow': { /** * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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-default-workflow-permissions-organization'] /** * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. */ @@ -853,10 +989,7 @@ export interface paths { } '/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'] @@ -871,26 +1004,17 @@ export interface paths { } '/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'] @@ -905,70 +1029,43 @@ export interface paths { */ 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. + * 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. + * 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'] @@ -1171,58 +1268,37 @@ export interface paths { '/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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': { /** - * 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)." + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." */ get: operations['orgs/get-audit-log'] } - '/orgs/{org}/blocks': { - /** List the users blocked by an organization. */ - get: operations['orgs/list-blocked-users'] - } - '/orgs/{org}/blocks/{username}': { - get: operations['orgs/check-blocked-user'] - put: operations['orgs/block-user'] - delete: operations['orgs/unblock-user'] - } '/orgs/{org}/code-scanning/alerts': { /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * * GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/list-alerts-for-org'] } - '/orgs/{org}/credential-authorizations': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). - */ - get: operations['orgs/list-saml-sso-authorizations'] - } - '/orgs/{org}/credential-authorizations/{credential_id}': { - /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - * - * An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. - */ - delete: operations['orgs/remove-saml-sso-authorization'] - } '/orgs/{org}/dependabot/secrets': { /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-org-secrets'] @@ -1318,13 +1394,13 @@ export interface paths { '/orgs/{org}/dependabot/secrets/{secret_name}/repositories': { /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ get: operations['dependabot/list-selected-repos-for-org-secret'] - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/set-selected-repos-for-org-secret'] } '/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}': { - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ put: operations['dependabot/add-selected-repo-to-org-secret'] - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ delete: operations['dependabot/remove-selected-repo-from-org-secret'] } '/orgs/{org}/events': { @@ -1334,22 +1410,18 @@ export interface paths { /** * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/external-idp-group-info-for-org'] } '/orgs/{org}/external-groups': { /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ get: operations['teams/list-external-idp-groups-for-org'] } - '/orgs/{org}/failed_invitations': { - /** The return hash contains `failed_at` and `failed_reason` fields which represent the time at which the invitation failed and the reason for the failure. */ - get: operations['orgs/list-failed-invitations'] - } '/orgs/{org}/hooks': { get: operations['orgs/list-webhooks'] /** Here's how you can create a hook that posts payloads in JSON format: */ @@ -1389,14 +1461,14 @@ export interface paths { post: operations['orgs/redeliver-webhook-delivery'] } '/orgs/{org}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-org-installation'] } @@ -1404,36 +1476,6 @@ export interface paths { /** Lists all GitHub Apps in an organization. The installation count includes all GitHub Apps installed on repositories in the organization. You must be an organization owner with `admin:read` scope to use this endpoint. */ get: operations['orgs/list-app-installations'] } - '/orgs/{org}/interaction-limits': { - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - get: operations['interactions/get-restrictions-for-org'] - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - put: operations['interactions/set-restrictions-for-org'] - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - delete: operations['interactions/remove-restrictions-for-org'] - } - '/orgs/{org}/invitations': { - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - get: operations['orgs/list-pending-invitations'] - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - post: operations['orgs/create-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}': { - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - delete: operations['orgs/cancel-invitation'] - } - '/orgs/{org}/invitations/{invitation_id}/teams': { - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - get: operations['orgs/list-invitation-teams'] - } '/orgs/{org}/issues': { /** * List issues in an organization assigned to the authenticated user. @@ -1441,7 +1483,7 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-org'] } @@ -1461,7 +1503,7 @@ export interface paths { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -1496,114 +1538,31 @@ export interface paths { */ get: operations['migrations/get-status-for-org'] } - '/orgs/{org}/migrations/{migration_id}/archive': { - /** Fetches the URL to a migration archive. */ - get: operations['migrations/download-archive-for-org'] - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - delete: operations['migrations/delete-archive-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock': { - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - delete: operations['migrations/unlock-repo-for-org'] - } - '/orgs/{org}/migrations/{migration_id}/repositories': { - /** List all the repositories for this organization migration. */ - get: operations['migrations/list-repos-for-org'] - } '/orgs/{org}/outside_collaborators': { /** List all users who are outside collaborators of an organization. */ get: operations['orgs/list-outside-collaborators'] } '/orgs/{org}/outside_collaborators/{username}': { - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ put: operations['orgs/convert-member-to-outside-collaborator'] /** Removing a user from this list will remove them from all the organization's repositories. */ delete: operations['orgs/remove-outside-collaborator'] } - '/orgs/{org}/packages': { - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-organization'] - } - '/orgs/{org}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-organization'] - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-org'] - } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version in an organization. - * - * You must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-organization'] - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-org'] } - '/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-org'] + '/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-org'] + /** Removes any overrides for this hook at the org level for this org. */ + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-org'] + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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': { @@ -1615,7 +1574,7 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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'] @@ -1628,7 +1587,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -1639,56 +1598,23 @@ export interface paths { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ get: operations['secret-scanning/list-alerts-for-org'] } - '/orgs/{org}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-actions-billing-org'] - } '/orgs/{org}/settings/billing/advanced-security': { /** * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. - */ - get: operations['billing/get-github-advanced-security-billing-org'] - } - '/orgs/{org}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-github-packages-billing-org'] - } - '/orgs/{org}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - get: operations['billing/get-shared-storage-billing-org'] - } - '/orgs/{org}/team-sync/groups': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. * - * 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 total number of repositories with committer information is tracked by the `total_count` field. */ - get: operations['teams/list-idp-groups-for-org'] + get: operations['billing/get-github-advanced-security-billing-org'] } '/orgs/{org}/teams': { /** Lists all teams in an organization that are visible to the authenticated user. */ @@ -1702,7 +1628,7 @@ export interface paths { } '/orgs/{org}/teams/{team_slug}': { /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. */ @@ -1724,15 +1650,15 @@ export interface paths { } '/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ @@ -1740,19 +1666,19 @@ export interface paths { } '/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/). + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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}`. */ @@ -1760,15 +1686,15 @@ export interface paths { } '/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ @@ -1776,19 +1702,19 @@ export interface paths { } '/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/). + * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. */ @@ -1796,13 +1722,13 @@ export interface paths { } '/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ get: operations['reactions/list-for-team-discussion-comment-in-org'] /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ @@ -1812,19 +1738,19 @@ export interface paths { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ get: operations['reactions/list-for-team-discussion-in-org'] /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ @@ -1834,32 +1760,30 @@ export interface paths { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['reactions/delete-for-team-discussion'] } '/orgs/{org}/teams/{team_slug}/external-groups': { + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + get: operations['teams/list-linked-external-idp-groups-to-team-for-org'] /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ delete: operations['teams/unlink-external-idp-group-from-team-for-org'] /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ patch: operations['teams/link-external-idp-group-to-team-for-org'] } - '/orgs/{org}/teams/{team_slug}/invitations': { - /** - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/invitations`. - */ - get: operations['teams/list-pending-invitations-in-org'] - } '/orgs/{org}/teams/{team_slug}/members': { /** * Team members will include the members of child teams. @@ -1879,7 +1803,7 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ get: operations['teams/get-membership-for-user-in-org'] /** @@ -1887,7 +1811,7 @@ export interface paths { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -1901,7 +1825,7 @@ export interface paths { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ @@ -1947,7 +1871,7 @@ export interface paths { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -1955,7 +1879,7 @@ export interface paths { */ 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)." + * 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/enterprise-server@3.6/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}`. * @@ -1969,24 +1893,6 @@ export interface paths { */ delete: operations['teams/remove-repo-in-org'] } - '/orgs/{org}/teams/{team_slug}/team-sync/group-mappings': { - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - get: operations['teams/list-idp-groups-in-org'] - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - patch: operations['teams/create-or-update-idp-group-connections-in-org'] - } '/orgs/{org}/teams/{team_slug}/teams': { /** * Lists the child teams of the team specified by `{team_slug}`. @@ -2049,14 +1955,6 @@ export interface paths { */ get: operations['rate-limit/get'] } - '/reactions/{reaction_id}': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - delete: operations['reactions/delete-legacy'] - } '/repos/{owner}/{repo}': { /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ get: operations['repos/get'] @@ -2067,7 +1965,7 @@ export interface paths { * 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ patch: operations['repos/update'] } '/repos/{owner}/{repo}/actions/artifacts': { @@ -2089,6 +1987,28 @@ export interface paths { */ get: operations['actions/download-artifact'] } + '/repos/{owner}/{repo}/actions/cache/usage': { + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage'] + } + '/repos/{owner}/{repo}/actions/cache/usage-policy': { + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + get: operations['actions/get-actions-cache-usage-policy'] + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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. + */ + patch: operations['actions/set-actions-cache-usage-policy'] + } '/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'] @@ -2102,12 +2022,15 @@ export interface paths { */ get: operations['actions/download-job-logs-for-workflow-run'] } + '/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun': { + /** Re-run a job and its dependent jobs in 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. */ + post: operations['actions/re-run-job-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. + * 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'] /** @@ -2119,6 +2042,24 @@ export interface paths { */ put: operations['actions/set-github-actions-permissions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/access': { + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + get: operations['actions/get-workflow-access-to-repository'] + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + put: operations['actions/set-workflow-access-to-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)." @@ -2137,6 +2078,24 @@ export interface paths { */ put: operations['actions/set-allowed-actions-repository'] } + '/repos/{owner}/{repo}/actions/permissions/workflow': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + get: operations['actions/get-github-actions-default-workflow-permissions-repository'] + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + put: operations['actions/set-github-actions-default-workflow-permissions-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'] @@ -2242,7 +2201,7 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/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. */ @@ -2262,14 +2221,6 @@ export interface paths { /** Anyone with read access to the repository can use this endpoint. If the repository is private, you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/get-reviews-for-run'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/approve': { - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - post: operations['actions/approve-workflow-run'] - } '/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts': { /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ get: operations['actions/list-workflow-run-artifacts'] @@ -2284,7 +2235,7 @@ export interface paths { get: operations['actions/get-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs': { - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run-attempt'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs': { @@ -2301,7 +2252,7 @@ export interface paths { 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ get: operations['actions/list-jobs-for-workflow-run'] } '/repos/{owner}/{repo}/actions/runs/{run_id}/logs': { @@ -2325,7 +2276,7 @@ export interface paths { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ post: operations['actions/review-pending-deployments-for-run'] } @@ -2333,13 +2284,9 @@ export interface paths { /** Re-runs your workflow run using its `id`. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. */ post: operations['actions/re-run-workflow'] } - '/repos/{owner}/{repo}/actions/runs/{run_id}/timing': { - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-run-usage'] + '/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + post: operations['actions/re-run-workflow-failed-jobs'] } '/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. */ @@ -2469,20 +2416,12 @@ export interface paths { } '/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). + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). * * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. */ get: operations['actions/list-workflow-runs'] } - '/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing': { - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - get: operations['actions/get-workflow-usage'] - } '/repos/{owner}/{repo}/assignees': { /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ get: operations['issues/list-assignees'] @@ -2521,12 +2460,6 @@ export interface paths { */ delete: operations['repos/delete-autolink'] } - '/repos/{owner}/{repo}/automated-security-fixes': { - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - put: operations['repos/enable-automated-security-fixes'] - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - delete: operations['repos/disable-automated-security-fixes'] - } '/repos/{owner}/{repo}/branches': { get: operations['repos/list-branches'] } @@ -2757,7 +2690,7 @@ export interface paths { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -2803,7 +2736,7 @@ export interface paths { } '/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest': { /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ @@ -2813,12 +2746,12 @@ export interface paths { /** * **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. + * By default, check suites are automatically created when you create a [check run](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. */ + /** 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/enterprise-server@3.6/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}': { @@ -2839,7 +2772,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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. */ @@ -2847,16 +2780,16 @@ export interface paths { } '/repos/{owner}/{repo}/code-scanning/alerts': { /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read * permission to use this endpoint. * * The response includes a `most_recent_instance` object. * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). + * for the default branch (or for the specified Git reference if you used `ref` in the request). */ get: operations['code-scanning/list-alerts-for-repo'] } @@ -2949,8 +2882,7 @@ export interface paths { * * * `ref` * * `tool` - * * `analysis_key` - * * `environment` + * * `category` * * 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: @@ -3021,33 +2953,20 @@ export interface paths { /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ get: operations['code-scanning/get-sarif'] } - '/repos/{owner}/{repo}/codespaces': { - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-in-repository-for-authenticated-user'] + '/repos/{owner}/{repo}/codeowners/errors': { /** - * Creates a codespace owned by the authenticated user in the specified repository. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - post: operations['codespaces/create-with-repo-for-authenticated-user'] - } - '/repos/{owner}/{repo}/codespaces/machines': { - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/repo-machines-for-authenticated-user'] + get: operations['repos/codeowners-errors'] } '/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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * * Team members will include the members of child teams. * @@ -3069,17 +2988,23 @@ export interface paths { */ get: operations['repos/check-collaborator'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + * + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: * * ``` * Cannot assign {member} permission of {role name} * ``` * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). * - * 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). + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. * * **Rate limits** * @@ -3094,7 +3019,7 @@ export interface paths { } '/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/). + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). * * Comments are ordered by ascending ID. */ @@ -3106,16 +3031,16 @@ export interface paths { 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). */ + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ get: operations['reactions/list-for-commit-comment'] - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ post: operations['reactions/create-for-commit-comment'] } '/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). + * Delete a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ delete: operations['reactions/delete-for-commit-comment'] } @@ -3166,12 +3091,12 @@ export interface paths { /** * Create a comment for a commit using its `:commit_sha`. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['repos/create-commit-comment'] } '/repos/{owner}/{repo}/commits/{commit_sha}/pulls': { - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ get: operations['repos/list-pull-requests-associated-with-commit'] } '/repos/{owner}/{repo}/commits/{ref}': { @@ -3180,9 +3105,9 @@ export interface paths { * * **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. + * You can pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/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. + * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/enterprise-server@3.6/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** * @@ -3252,28 +3177,11 @@ export interface paths { */ get: operations['repos/list-commit-statuses-for-ref'] } - '/repos/{owner}/{repo}/community/profile': { - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - get: operations['repos/get-community-profile-metrics'] - } '/repos/{owner}/{repo}/compare/{basehead}': { /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * The response 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/enterprise-server@3.6/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. * @@ -3319,16 +3227,21 @@ export interface paths { * 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 + * Files and symlinks support [a custom media type](https://docs.github.com/enterprise-server@3.6/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 + * type](https://docs.github.com/enterprise-server@3.6/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). + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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. + * API](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. * * #### If the content is a directory * The response will be an array of objects, one object for each item in the directory. @@ -3350,7 +3263,11 @@ export interface paths { * 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. */ + /** + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. + * + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. + */ put: operations['repos/create-or-update-file-contents'] /** * Deletes a file in a repository. @@ -3360,6 +3277,8 @@ export interface paths { * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ delete: operations['repos/delete-file'] } @@ -3463,13 +3382,17 @@ export interface paths { /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ delete: operations['dependabot/delete-repo-secret'] } + '/repos/{owner}/{repo}/dependency-graph/compare/{basehead}': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + get: operations['dependency-graph/diff-range'] + } '/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 + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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 @@ -3481,7 +3404,7 @@ export interface paths { * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will * return a failure response. * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. @@ -3525,7 +3448,7 @@ export interface paths { * * 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)." + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ delete: operations['repos/delete-deployment'] } @@ -3545,7 +3468,7 @@ export interface paths { } '/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)." + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/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. * @@ -3560,28 +3483,68 @@ export interface paths { } '/repos/{owner}/{repo}/environments': { /** - * Get all environments for a repository. + * Lists the 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. */ + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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 name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." * * **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. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository 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}/environments/{environment_name}/deployment-branch-policies': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies'] + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + post: operations['repos/create-deployment-branch-policy'] + } + '/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}': { + /** + * Gets a deployment branch policy for an environment. + * + * 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-deployment-branch-policy'] + /** + * Updates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + put: operations['repos/update-deployment-branch-policy'] + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + delete: operations['repos/delete-deployment-branch-policy'] + } '/repos/{owner}/{repo}/events': { get: operations['activity/list-repo-events'] } @@ -3590,7 +3553,7 @@ export interface paths { /** * Create a fork for the authenticated user. * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * **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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). */ post: operations['repos/create-fork'] } @@ -3616,7 +3579,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3651,7 +3614,7 @@ export interface paths { * | 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. | + * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. | * | `signature` | `string` | The signature that was extracted from the commit. | * | `payload` | `string` | The value that was signed. | * @@ -3681,7 +3644,7 @@ export interface paths { * * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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`. */ @@ -3691,7 +3654,7 @@ export interface paths { /** * 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)". + * **Note:** You need to explicitly [request a pull request](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". */ get: operations['git/get-ref'] } @@ -3705,7 +3668,7 @@ export interface paths { } '/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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. * * **Signature verification object** * @@ -3775,7 +3738,9 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. */ post: operations['git/create-tree'] } @@ -3784,10 +3749,14 @@ export interface paths { * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. */ get: operations['git/get-tree'] } '/repos/{owner}/{repo}/hooks': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ get: operations['repos/list-webhooks'] /** * Repositories can have multiple webhooks installed. Each webhook should have a unique `config`. Multiple webhooks can @@ -3829,7 +3798,7 @@ export interface paths { post: operations['repos/redeliver-webhook-delivery'] } '/repos/{owner}/{repo}/hooks/{hook_id}/pings': { - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ post: operations['repos/ping-webhook'] } '/repos/{owner}/{repo}/hooks/{hook_id}/tests': { @@ -3840,90 +3809,14 @@ export interface paths { */ post: operations['repos/test-push-webhook'] } - '/repos/{owner}/{repo}/import': { - /** - * View the progress of an import. - * - * **Import status** - * - * This section includes details about the possible values of the `status` field of the Import Progress response. - * - * An import that does not have errors will progress through these steps: - * - * * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * * `complete` - the import is complete, and the repository is ready on GitHub. - * - * If there are problems, you will see one of these in the `status` field: - * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * - * **The project_choices field** - * - * When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - * - * **Git LFS related fields** - * - * This section includes details about Git LFS related fields that may be present in the Import Progress response. - * - * * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. - */ - get: operations['migrations/get-import-status'] - /** Start a source import to a GitHub repository using GitHub Importer. */ - put: operations['migrations/start-import'] - /** Stop an import for a repository. */ - delete: operations['migrations/cancel-import'] - /** - * An import can be updated with credentials or a project choice by passing in the appropriate parameters in this API - * request. If no parameters are provided, the import will be restarted. - */ - patch: operations['migrations/update-import'] - } - '/repos/{owner}/{repo}/import/authors': { - /** - * Each type of source control system represents authors in a different way. For example, a Git commit author has a display name and an email address, but a Subversion commit author just has a username. The GitHub Importer will make the author information valid, but the author might not be correct. For example, it will change the bare Subversion username `hubot` into something like `hubot `. - * - * This endpoint and the [Map a commit author](https://docs.github.com/rest/reference/migrations#map-a-commit-author) endpoint allow you to provide correct Git author information. - */ - get: operations['migrations/get-commit-authors'] - } - '/repos/{owner}/{repo}/import/authors/{author_id}': { - /** Update an author's identity for the import. Your application can continue updating authors any time before you push new commits to the repository. */ - patch: operations['migrations/map-commit-author'] - } - '/repos/{owner}/{repo}/import/large_files': { - /** List files larger than 100MB found during the import */ - get: operations['migrations/get-large-files'] - } - '/repos/{owner}/{repo}/import/lfs': { - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - patch: operations['migrations/set-lfs-preference'] - } '/repos/{owner}/{repo}/installation': { /** * Enables an authenticated GitHub App to find the repository's installation information. The installation's account type will be either an organization or a user account, depending which account the repository belongs to. * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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'] @@ -3939,13 +3832,13 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/list-for-repo'] /** * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create'] } @@ -3959,16 +3852,16 @@ export interface paths { 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). */ + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ get: operations['reactions/list-for-issue-comment'] - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ post: operations['reactions/create-for-issue-comment'] } '/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/issues/comments/:comment_id/reactions/:reaction_id`. * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * Delete a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ delete: operations['reactions/delete-for-issue-comment'] } @@ -3980,17 +3873,17 @@ export interface paths { } '/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 + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ get: operations['issues/get'] /** Issue owners and users with push access can edit an issue. */ @@ -4005,7 +3898,7 @@ export interface paths { '/repos/{owner}/{repo}/issues/{issue_number}/comments': { /** Issue Comments are ordered by ascending ID. */ get: operations['issues/list-comments'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['issues/create-comment'] } '/repos/{owner}/{repo}/issues/{issue_number}/events': { @@ -4026,23 +3919,23 @@ export interface paths { /** * 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)." + * 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/enterprise-server@3.6/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). */ + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ get: operations['reactions/list-for-issue'] - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ post: operations['reactions/create-for-issue'] } '/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * Delete a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). */ delete: operations['reactions/delete-for-issue'] } @@ -4080,7 +3973,7 @@ export interface paths { /** * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ get: operations['licenses/get-for-repo'] } @@ -4104,17 +3997,18 @@ export interface paths { get: operations['issues/list-labels-for-milestone'] } '/repos/{owner}/{repo}/notifications': { - /** List all notifications for the current user. */ + /** Lists all notifications for the current user in the specified repository. */ 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`. */ + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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). */ + /** Updates information for a GitHub Enterprise Server 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)." */ + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ post: operations['repos/create-pages-site'] + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ delete: operations['repos/delete-pages-site'] } '/repos/{owner}/{repo}/pages/builds': { @@ -4132,20 +4026,25 @@ export interface paths { '/repos/{owner}/{repo}/pages/builds/{build_id}': { get: operations['repos/get-pages-build'] } - '/repos/{owner}/{repo}/pages/health': { + '/repos/{owner}/{repo}/pre-receive-hooks': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + get: operations['enterprise-admin/list-pre-receive-hooks-for-repo'] + } + '/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}': { + get: operations['enterprise-admin/get-pre-receive-hook-for-repo'] /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. + * Deletes any overridden enforcement on this repository for the specified hook. * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + * Responds with effective values inherited from owner and/or global level. */ - get: operations['repos/get-pages-health-check'] + delete: operations['enterprise-admin/remove-pre-receive-hook-enforcement-for-repo'] + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + patch: operations['enterprise-admin/update-pre-receive-hook-enforcement-for-repo'] } '/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. */ + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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': { @@ -4156,9 +4055,7 @@ export interface paths { * * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ post: operations['pulls/create'] } @@ -4175,16 +4072,16 @@ export interface paths { 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). */ + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ get: operations['reactions/list-for-pull-request-review-comment'] - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ post: operations['reactions/create-for-pull-request-review-comment'] } '/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}': { /** * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * Delete a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ delete: operations['reactions/delete-for-pull-request-comment'] } @@ -4194,9 +4091,9 @@ export interface paths { * * 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)". + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub Enterprise Server 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: * @@ -4204,7 +4101,7 @@ export interface paths { * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. * - * Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ get: operations['pulls/get'] /** @@ -4214,25 +4111,17 @@ export interface paths { */ patch: operations['pulls/update'] } - '/repos/{owner}/{repo}/pulls/{pull_number}/codespaces': { - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-with-pr-for-authenticated-user'] - } '/repos/{owner}/{repo}/pulls/{pull_number}/comments': { /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ get: operations['pulls/list-review-comments'] /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. + * 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/enterprise-server@3.6/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. + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. * * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-review-comment'] } @@ -4240,12 +4129,12 @@ export interface paths { /** * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/create-reply-for-review-comment'] } '/repos/{owner}/{repo}/pulls/{pull_number}/commits': { - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ + /** 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/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ get: operations['pulls/list-commits'] } '/repos/{owner}/{repo}/pulls/{pull_number}/files': { @@ -4254,12 +4143,13 @@ export interface paths { } '/repos/{owner}/{repo}/pulls/{pull_number}/merge': { get: operations['pulls/check-if-merged'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ put: operations['pulls/merge'] } '/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ get: operations['pulls/list-requested-reviewers'] - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['pulls/request-reviewers'] delete: operations['pulls/remove-requested-reviewers'] } @@ -4267,11 +4157,11 @@ export interface paths { /** The list of reviews returns in chronological order. */ get: operations['pulls/list-reviews'] /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." * - * **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. + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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. */ @@ -4288,10 +4178,11 @@ export interface paths { 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. */ + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ post: operations['pulls/submit-review'] } '/repos/{owner}/{repo}/pulls/{pull_number}/update-branch': { @@ -4302,7 +4193,7 @@ export interface paths { /** * 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. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme'] } @@ -4310,13 +4201,13 @@ export interface paths { /** * Gets the README from a repository directory. * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. */ get: operations['repos/get-readme-in-directory'] } '/repos/{owner}/{repo}/releases': { /** - * This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://docs.github.com/rest/reference/repos#list-repository-tags). + * 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/enterprise-server@3.6/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. */ @@ -4324,19 +4215,19 @@ export interface paths { /** * Users with push access to the repository can create a release. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-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. */ + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. */ get: operations['repos/get-release-asset'] delete: operations['repos/delete-release-asset'] /** Users with push access to the repository can edit a release asset. */ patch: operations['repos/update-release-asset'] } '/repos/{owner}/{repo}/releases/generate-notes': { - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ post: operations['repos/generate-release-notes'] } '/repos/{owner}/{repo}/releases/latest': { @@ -4352,7 +4243,7 @@ export interface paths { 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). */ + /** **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/enterprise-server@3.6/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'] @@ -4362,8 +4253,8 @@ export interface paths { '/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. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * @@ -4371,25 +4262,41 @@ export interface paths { * * `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, + * GitHub Enterprise Server expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, * you'll still need to pass your authentication to be able to upload an asset. * * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. * * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ post: operations['repos/upload-release-asset'] } '/repos/{owner}/{repo}/releases/{release_id}/reactions': { - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + get: operations['reactions/list-for-release'] + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ post: operations['reactions/create-for-release'] } + '/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + delete: operations['reactions/delete-for-release'] + } + '/repos/{owner}/{repo}/replicas/caches': { + /** Lists the status of each repository cache replica. */ + get: operations['repos/list-cache-info'] + } '/repos/{owner}/{repo}/secret-scanning/alerts': { /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4397,13 +4304,17 @@ export interface paths { } '/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. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` 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. + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ @@ -4411,7 +4322,9 @@ export interface paths { } '/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations': { /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ @@ -4421,7 +4334,7 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-stargazers-for-repo'] } @@ -4478,14 +4391,34 @@ export interface paths { } '/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. */ + /** 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/enterprise-server@3.6/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). */ + /** 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/enterprise-server@3.6/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}/tags/protection': { + /** + * This returns the tag protection states of a repository. + * + * This information is only available to repository administrators. + */ + get: operations['repos/list-tag-protection'] + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + post: operations['repos/create-tag-protection'] + } + '/repos/{owner}/{repo}/tags/protection/{tag_protection_id}': { + /** + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + delete: operations['repos/delete-tag-protection'] + } '/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 @@ -4502,50 +4435,27 @@ export interface paths { get: operations['repos/get-all-topics'] put: operations['repos/replace-all-topics'] } - '/repos/{owner}/{repo}/traffic/clones': { - /** Get the total number of clones and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-clones'] - } - '/repos/{owner}/{repo}/traffic/popular/paths': { - /** Get the top 10 popular contents over the last 14 days. */ - get: operations['repos/get-top-paths'] - } - '/repos/{owner}/{repo}/traffic/popular/referrers': { - /** Get the top 10 referrers over the last 14 days. */ - get: operations['repos/get-top-referrers'] - } - '/repos/{owner}/{repo}/traffic/views': { - /** Get the total number of views and breakdown per day or week for the last 14 days. Timestamps are aligned to UTC midnight of the beginning of the day or week. Week begins on Monday. */ - get: operations['repos/get-views'] - } '/repos/{owner}/{repo}/transfer': { /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ post: operations['repos/transfer'] } - '/repos/{owner}/{repo}/vulnerability-alerts': { - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - get: operations['repos/check-vulnerability-alerts'] - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - put: operations['repos/enable-vulnerability-alerts'] - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - delete: operations['repos/disable-vulnerability-alerts'] - } '/repos/{owner}/{repo}/zipball/{ref}': { /** * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. + * + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ 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`. + * 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. If the repository is not public, 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/enterprise-server@3.6/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: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -4558,7 +4468,7 @@ export interface paths { * * Note: * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ get: operations['repos/list-public'] } @@ -4688,20 +4598,20 @@ export interface paths { * * 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 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 Enterprise Server. 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: + * 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 Enterprise Server 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 is granted access by the IdP and is not a member of the GitHub Enterprise Server 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. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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. + * 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ get: operations['enterprise-admin/list-provisioned-identities-enterprise'] /** @@ -4750,65 +4660,11 @@ export interface paths { */ 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). + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4829,10 +4685,10 @@ export interface paths { } '/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). + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * metadata](https://docs.github.com/enterprise-server@3.6/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: * @@ -4842,10 +4698,10 @@ export interface paths { } '/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). + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. * @@ -4859,9 +4715,9 @@ export interface paths { } '/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). + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4873,9 +4729,9 @@ export interface paths { } '/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). + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * 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/enterprise-server@3.6/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: * @@ -4887,9 +4743,9 @@ export interface paths { } '/search/topics': { /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). + * 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/enterprise-server@3.6/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: * @@ -4901,9 +4757,9 @@ export interface paths { } '/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). + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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). + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * * For example, if you're looking for a list of popular users, you might try this query: * @@ -4913,11 +4769,85 @@ export interface paths { */ get: operations['search/users'] } + '/setup/api/configcheck': { + /** + * This endpoint allows you to check the status of the most recent configuration process: + * + * Note that you may need to wait several seconds after you start a process before you can check its status. + * + * The different statuses are: + * + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | + */ + get: operations['enterprise-admin/get-configuration-status'] + } + '/setup/api/configure': { + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + post: operations['enterprise-admin/start-configuration-process'] + } + '/setup/api/maintenance': { + /** Check your installation's maintenance status: */ + get: operations['enterprise-admin/get-maintenance-status'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/enable-or-disable-maintenance-mode'] + } + '/setup/api/settings': { + /** + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). + * + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + get: operations['enterprise-admin/get-settings'] + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + * + * **Notes:** + * + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + */ + put: operations['enterprise-admin/set-settings'] + } + '/setup/api/settings/authorized-keys': { + get: operations['enterprise-admin/get-all-authorized-ssh-keys'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + post: operations['enterprise-admin/add-authorized-ssh-key'] + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + delete: operations['enterprise-admin/remove-authorized-ssh-key'] + } + '/setup/api/start': { + /** + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. + * + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. + * + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: + * + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/create-enterprise-server-license'] + } + '/setup/api/upgrade': { + /** + * This API upgrades your license and also triggers the configuration process. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + */ + post: operations['enterprise-admin/upgrade-license'] + } '/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * * To delete a team, the authenticated user must be an organization owner or team maintainer. * @@ -4925,7 +4855,7 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) endpoint. * * To edit a team, the authenticated user must either be an organization owner or a team maintainer. * @@ -4935,115 +4865,107 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-legacy'] } '/teams/{team_id}/discussions/{discussion_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion](https://docs.github.com/rest/reference/teams#get-a-discussion) endpoint. + * **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/enterprise-server@3.6/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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ post: operations['teams/create-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. + * **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/enterprise-server@3.6/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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ post: operations['reactions/create-for-team-discussion-comment-legacy'] } '/teams/{team_id}/discussions/{discussion_number}/reactions': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * **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/enterprise-server@3.6/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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ post: operations['reactions/create-for-team-discussion-legacy'] } - '/teams/{team_id}/invitations': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List pending team invitations`](https://docs.github.com/rest/reference/teams#list-pending-team-invitations) endpoint. - * - * The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. - */ - get: operations['teams/list-pending-invitations-legacy'] - } '/teams/{team_id}/members': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * * Team members will include the members of child teams. */ @@ -5053,7 +4975,7 @@ export interface paths { /** * 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. + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5061,33 +4983,33 @@ export interface paths { /** * 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. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * 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/enterprise-server@3.6/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. + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-member-legacy'] } '/teams/{team_id}/memberships/{username}': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get team membership for a user](https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. * * Team members will include the members of child teams. * @@ -5096,17 +5018,17 @@ export interface paths { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. * @@ -5114,19 +5036,19 @@ export interface paths { */ 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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. * * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ delete: operations['teams/remove-membership-for-user-legacy'] } '/teams/{team_id}/projects': { /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * * Lists the organization projects for a team. */ @@ -5134,72 +5056,54 @@ export interface paths { } '/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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. */ + /** **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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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: + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/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)." + * 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/enterprise-server@3.6/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. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * * If the authenticated user is an organization owner or a team maintainer, they can remove any repositories from the team. To remove a repository from a team as an organization member, the authenticated user must have admin access to the repository and must be able to see the team. NOTE: This does not delete the repository, it just removes it from the team. */ delete: operations['teams/remove-repo-legacy'] } - '/teams/{team_id}/team-sync/group-mappings': { - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - */ - get: operations['teams/list-idp-groups-for-legacy'] - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - */ - patch: operations['teams/create-or-update-idp-group-connections-legacy'] - } '/teams/{team_id}/teams': { - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ + /** **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/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ get: operations['teams/list-child-legacy'] } '/user': { @@ -5212,218 +5116,6 @@ export interface paths { /** **Note:** If your email is set to private and you send an `email` parameter as part of this request to update your profile, your privacy settings are still enforced: the email address will not be displayed on your public profile or via the API. */ patch: operations['users/update-authenticated'] } - '/user/blocks': { - /** List the users you've blocked on your personal account. */ - get: operations['users/list-blocked-by-authenticated-user'] - } - '/user/blocks/{username}': { - get: operations['users/check-blocked'] - put: operations['users/block'] - delete: operations['users/unblock'] - } - '/user/codespaces': { - /** - * Lists the authenticated user's codespaces. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/list-for-authenticated-user'] - /** - * Creates a new codespace, owned by the authenticated user. - * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/create-for-authenticated-user'] - } - '/user/codespaces/secrets': { - /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-secrets-for-authenticated-user'] - } - '/user/codespaces/secrets/public-key': { - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - get: operations['codespaces/get-public-key-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}': { - /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/get-secret-for-authenticated-user'] - /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - put: operations['codespaces/create-or-update-secret-for-authenticated-user'] - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - delete: operations['codespaces/delete-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories': { - /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - get: operations['codespaces/list-repositories-for-secret-for-authenticated-user'] - /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/set-repositories-for-secret-for-authenticated-user'] - } - '/user/codespaces/secrets/{secret_name}/repositories/{repository_id}': { - /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - put: operations['codespaces/add-repository-for-secret-for-authenticated-user'] - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - delete: operations['codespaces/remove-repository-for-secret-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}': { - /** - * Gets information about a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-for-authenticated-user'] - /** - * Deletes a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - delete: operations['codespaces/delete-for-authenticated-user'] - /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. - * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - patch: operations['codespaces/update-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports': { - /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/export-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/exports/{export_id}': { - /** - * Gets information about an export of a codespace. - * - * You must authenticate using a personal access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/get-export-details-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/machines': { - /** - * List the machine types a codespace can transition to use. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - get: operations['codespaces/codespace-machines-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/start': { - /** - * Starts a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/start-for-authenticated-user'] - } - '/user/codespaces/{codespace_name}/stop': { - /** - * Stops a user's codespace. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - post: operations['codespaces/stop-for-authenticated-user'] - } - '/user/email/visibility': { - /** Sets the visibility for your primary email addresses. */ - patch: operations['users/set-primary-email-visibility-for-authenticated-user'] - } '/user/emails': { /** Lists all of your email addresses, and specifies which one is visible to the public. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-emails-for-authenticated-user'] @@ -5443,7 +5135,7 @@ export interface paths { '/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)." + * 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/enterprise-server@3.6/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. */ @@ -5452,22 +5144,22 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-gpg-keys-for-authenticated-user'] - /** Adds a GPG key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-gpg-key-for-authenticated-user'] } '/user/gpg_keys/{gpg_key_id}': { - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-gpg-key-for-authenticated-user'] - /** Removes a GPG key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-gpg-key-for-authenticated-user'] } '/user/installations': { /** * Lists installations of your GitHub App that the authenticated user has explicit permission (`:read`, `:write`, or `:admin`) to access. * - * You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -5481,7 +5173,7 @@ export interface paths { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. */ @@ -5491,24 +5183,16 @@ export interface paths { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ put: operations['apps/add-repo-to-installation-for-authenticated-user'] /** * Remove a single repository from an installation. The authenticated user must have admin access to the repository. * - * You must use a personal access token (which you can create via the [command line](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ delete: operations['apps/remove-repo-from-installation-for-authenticated-user'] } - '/user/interaction-limits': { - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - get: operations['interactions/get-restrictions-for-authenticated-user'] - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - put: operations['interactions/set-restrictions-for-authenticated-user'] - /** Removes any interaction restrictions from your public repositories. */ - delete: operations['interactions/remove-restrictions-for-authenticated-user'] - } '/user/issues': { /** * List issues across owned and member repositories assigned to the authenticated user. @@ -5516,30 +5200,22 @@ export interface paths { * **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. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/list-public-ssh-keys-for-authenticated-user'] - /** Adds a public SSH key to the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth, or OAuth with at least `write:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ post: operations['users/create-public-ssh-key-for-authenticated-user'] } '/user/keys/{key_id}': { - /** View extended details for a single public SSH key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ get: operations['users/get-public-ssh-key-for-authenticated-user'] - /** Removes a public SSH key from the authenticated user's GitHub account. Requires that you are authenticated via Basic Auth or via OAuth with at least `admin:public_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ delete: operations['users/delete-public-ssh-key-for-authenticated-user'] } - '/user/marketplace_purchases': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user'] - } - '/user/marketplace_purchases/stubbed': { - /** Lists the active subscriptions for the authenticated user. You must use a [user-to-server OAuth access token](https://docs.github.com/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#identifying-users-on-your-site), created for a user who has authorized your GitHub App, to access this endpoint. . OAuth Apps must authenticate using an [OAuth token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/). */ - get: operations['apps/list-subscriptions-for-authenticated-user-stubbed'] - } '/user/memberships/orgs': { get: operations['orgs/list-memberships-for-authenticated-user'] } @@ -5553,19 +5229,6 @@ export interface paths { /** 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: @@ -5591,12 +5254,6 @@ export interface paths { * 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. */ @@ -5612,85 +5269,12 @@ export interface paths { */ get: operations['orgs/list-for-authenticated-user'] } - '/user/packages': { - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}': { - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-authenticated-user'] - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/restore': { - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-authenticated-user'] - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - delete: operations['packages/delete-package-version-for-authenticated-user'] - } - '/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - post: operations['packages/restore-package-version-for-authenticated-user'] - } '/user/projects': { + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. 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-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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ get: operations['users/list-public-emails-for-authenticated-user'] } '/user/repos': { @@ -5705,7 +5289,7 @@ export interface paths { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -5724,13 +5308,13 @@ export interface paths { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 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)." */ + /** 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/enterprise-server@3.6/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'] } @@ -5739,14 +5323,14 @@ export interface paths { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/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. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. */ get: operations['users/list'] } @@ -5754,11 +5338,11 @@ export interface paths { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ get: operations['users/get-by-username'] } @@ -5809,7 +5393,7 @@ export interface paths { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ get: operations['apps/get-user-installation'] } @@ -5821,90 +5405,10 @@ export interface paths { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ get: operations['orgs/list-for-user'] } - '/users/{username}/packages': { - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/list-packages-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}': { - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-for-user'] - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/restore': { - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions': { - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-all-package-versions-for-package-owned-by-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}': { - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - get: operations['packages/get-package-version-for-user'] - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - delete: operations['packages/delete-package-version-for-user'] - } - '/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore': { - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - post: operations['packages/restore-package-version-for-user'] - } '/users/{username}/projects': { get: operations['projects/list-for-user'] } @@ -5919,41 +5423,17 @@ export interface paths { /** Lists public repositories for the specified user. Note: For GitHub AE, this endpoint will list internal repositories for the specified user. */ get: operations['repos/list-for-user'] } - '/users/{username}/settings/billing/actions': { - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-actions-billing-user'] - } - '/users/{username}/settings/billing/packages': { - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-github-packages-billing-user'] - } - '/users/{username}/settings/billing/shared-storage': { - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - get: operations['billing/get-shared-storage-billing-user'] + '/users/{username}/site_admin': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + put: operations['enterprise-admin/promote-user-to-be-site-administrator'] + /** You can demote any user account except your own. */ + delete: operations['enterprise-admin/demote-site-administrator'] } '/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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ get: operations['activity/list-repos-starred-by-user'] } @@ -5961,6 +5441,18 @@ export interface paths { /** Lists repositories a user is watching. */ get: operations['activity/list-repos-watched-by-user'] } + '/users/{username}/suspended': { + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + put: operations['enterprise-admin/suspend-user'] + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + delete: operations['enterprise-admin/unsuspend-user'] + } '/zen': { /** Get a random sentence from the Zen of GitHub */ get: operations['meta/get-zen'] @@ -5969,13 +5461,142 @@ export interface paths { export interface components { schemas: { + root: { + /** Format: uri-template */ + current_user_url: string + /** Format: uri-template */ + current_user_authorizations_html_url: string + /** Format: uri-template */ + authorizations_url: string + /** Format: uri-template */ + code_search_url: string + /** Format: uri-template */ + commit_search_url: string + /** Format: uri-template */ + emails_url: string + /** Format: uri-template */ + emojis_url: string + /** Format: uri-template */ + events_url: string + /** Format: uri-template */ + feeds_url: string + /** Format: uri-template */ + followers_url: string + /** Format: uri-template */ + following_url: string + /** Format: uri-template */ + gists_url: string + /** Format: uri-template */ + hub_url: string + /** Format: uri-template */ + issue_search_url: string + /** Format: uri-template */ + issues_url: string + /** Format: uri-template */ + keys_url: string + /** Format: uri-template */ + label_search_url: string + /** Format: uri-template */ + notifications_url: string + /** Format: uri-template */ + organization_url: string + /** Format: uri-template */ + organization_repositories_url: string + /** Format: uri-template */ + organization_teams_url: string + /** Format: uri-template */ + public_gists_url: string + /** Format: uri-template */ + rate_limit_url: string + /** Format: uri-template */ + repository_url: string + /** Format: uri-template */ + repository_search_url: string + /** Format: uri-template */ + current_user_repositories_url: string + /** Format: uri-template */ + starred_url: string + /** Format: uri-template */ + starred_gists_url: string + /** Format: uri-template */ + topic_search_url?: string + /** Format: uri-template */ + user_url: string + /** Format: uri-template */ + user_organizations_url: string + /** Format: uri-template */ + user_repositories_url: string + /** Format: uri-template */ + user_search_url: string + } + 'global-hook': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + secret?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'global-hook-2': { + type?: string + id?: number + name?: string + active?: boolean + events?: string[] + config?: { + url?: string + content_type?: string + insecure_ssl?: string + } + updated_at?: string + created_at?: string + url?: string + ping_url?: string + } + 'public-key-full': { + id: number + key: string + user_id: number | null + repository_id: number | null + url: string + title: string + read_only: boolean + verified: boolean + /** Format: date-time */ + created_at: string + } & { + last_used: unknown + } + 'ldap-mapping-team': { + ldap_dn?: string + 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?: unknown | null + } /** - * Simple User - * @description Simple User + * Ldap Private User + * @description Ldap Private User */ - 'nullable-simple-user': { - name?: string | null - email?: string | null + 'ldap-mapping-user': { + ldap_dn?: string /** @example octocat */ login: string /** @example 1 */ @@ -6035,304 +5656,384 @@ export interface components { /** @example User */ type: string site_admin: boolean - /** @example "2020-07-09T00:17:55Z" */ - starred_at?: string - } | null + /** @example monalisa octocat */ + name: string | null + /** @example GitHub */ + company: string | null + /** @example https://github.com/blog */ + blog: string | null + /** @example San Francisco */ + location: string | null + /** + * Format: email + * @example octocat@github.com + */ + email: string | null + hireable: boolean | null + /** @example There once was... */ + bio: string | null + /** @example monalisa */ + twitter_username?: string | null + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number + /** @example 0 */ + following: number + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + created_at: string + /** + * Format: date-time + * @example 2008-01-14T04:33:35Z + */ + updated_at: string + /** @example 81 */ + private_gists: number + /** @example 100 */ + total_private_repos: number + /** @example 100 */ + owned_private_repos: number + /** @example 10000 */ + disk_usage: number + /** @example 8 */ + collaborators: number + /** @example true */ + two_factor_authentication: boolean + plan?: { + collaborators: number + name: string + space: number + private_repos: number + } + /** Format: date-time */ + suspended_at?: string | null + business_plus?: boolean + } /** - * GitHub app - * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + * Organization Simple + * @description Organization Simple */ - integration: { + 'organization-simple': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** - * @description Unique identifier of the GitHub app - * @example 37 + * Format: uri + * @example https://api.github.com/orgs/github */ - id: number + url: string /** - * @description The slug name of the GitHub app - * @example probot-owners + * Format: uri + * @example https://api.github.com/orgs/github/repos */ - slug?: string - /** @example MDExOkludGVncmF0aW9uMQ== */ - node_id: string - owner: components['schemas']['nullable-simple-user'] + repos_url: string /** - * @description The name of the GitHub app - * @example Probot Owners + * Format: uri + * @example https://api.github.com/orgs/github/events */ - name: string - /** @example The description of the app. */ + events_url: string + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ + issues_url: string + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ description: string | null + } + 'pre-receive-environment': { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + 'pre-receive-environment-download-status': { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + 'pre-receive-hook': { + id?: number + name?: string + enforcement?: string + script?: string + script_repository?: { + id?: number + full_name?: string + url?: string + html_url?: string + } + environment?: { + id?: number + name?: string + image_url?: string + url?: string + html_url?: string + default_environment?: boolean + created_at?: string + hooks_count?: number + download?: { + url?: string + state?: string + downloaded_at?: string | null + message?: string | null + } + } + allow_downstream_configuration?: boolean + } + /** + * Simple User + * @description Simple User + */ + 'nullable-simple-user': { + name?: string | null + email?: string | null + /** @example octocat */ + login: string + /** @example 1 */ + id: number + /** @example MDQ6VXNlcjE= */ + node_id: string /** * Format: uri - * @example https://example.com + * @example https://github.com/images/error/octocat_happy.gif */ - external_url: string + avatar_url: string + /** @example 41d064eb2195891e12d0413f63227ea7 */ + gravatar_id: string | null /** * Format: uri - * @example https://github.com/apps/super-ci + * @example https://api.github.com/users/octocat + */ + url: string + /** + * Format: uri + * @example https://github.com/octocat */ html_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/followers */ - created_at: string + followers_url: string + /** @example https://api.github.com/users/octocat/following{/other_user} */ + following_url: string + /** @example https://api.github.com/users/octocat/gists{/gist_id} */ + gists_url: string + /** @example https://api.github.com/users/octocat/starred{/owner}{/repo} */ + starred_url: string /** - * Format: date-time - * @example 2017-07-08T16:18:44-04:00 + * Format: uri + * @example https://api.github.com/users/octocat/subscriptions */ - updated_at: string + subscriptions_url: string /** - * @description The set of permissions for the GitHub app - * @example { - * "issues": "read", - * "deployments": "write" - * } + * Format: uri + * @example https://api.github.com/users/octocat/orgs */ - permissions: { - issues?: string - checks?: string - metadata?: string - contents?: string - deployments?: string - } & { [key: string]: string } + organizations_url: string /** - * @description The list of events for the GitHub app - * @example [ - * "label", - * "deployment" - * ] + * Format: uri + * @example https://api.github.com/users/octocat/repos */ - events: string[] + repos_url: string + /** @example https://api.github.com/users/octocat/events{/privacy} */ + events_url: string /** - * @description The number of installations associated with the GitHub app - * @example 5 + * Format: uri + * @example https://api.github.com/users/octocat/received_events */ - installations_count?: number - /** @example "Iv1.25b5d1e65ffc4022" */ - client_id?: string - /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ - client_secret?: string - /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ - webhook_secret?: string | null - /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ - pem?: string - } - /** - * Basic Error - * @description Basic Error - */ - 'basic-error': { - message?: string - documentation_url?: string - url?: string - status?: string - } - /** - * Validation Error Simple - * @description Validation Error Simple - */ - 'validation-error-simple': { - message: string - documentation_url: string - errors?: string[] - } - /** - * Format: uri - * @description The URL to which the payloads will be delivered. - * @example https://example.com/webhook - */ - 'webhook-config-url': string - /** - * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. - * @example "json" - */ - 'webhook-config-content-type': string - /** - * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - * @example "********" - */ - 'webhook-config-secret': string - 'webhook-config-insecure-ssl': string | number - /** - * Webhook Configuration - * @description 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'] - } + received_events_url: string + /** @example User */ + type: string + site_admin: boolean + /** @example "2020-07-09T00:17:55Z" */ + starred_at?: string + } | null /** - * Simple webhook delivery - * @description Delivery made by a webhook, without request and response information. + * App Permissions + * @description The permissions granted to the user-to-server access token. + * @example { + * "contents": "read", + * "issues": "read", + * "deployments": "write", + * "single_file": "read" + * } */ - 'hook-delivery-item': { + 'app-permissions': { /** - * @description Unique identifier of the webhook delivery. - * @example 42 + * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. + * @enum {string} */ - id: number + actions?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. + * @enum {string} */ - guid: string + administration?: 'read' | 'write' /** - * Format: date-time - * @description Time when the webhook delivery occurred. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token for checks on code. + * @enum {string} */ - delivered_at: string + checks?: 'read' | 'write' /** - * @description Whether the webhook delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. + * @enum {string} */ - redelivery: boolean + contents?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token for deployments and deployment statuses. + * @enum {string} */ - duration: number + deployments?: 'read' | 'write' /** - * @description Describes the response returned after attempting the delivery. - * @example failed to connect + * @description The level of permission to grant the access token for managing repository environments. + * @enum {string} */ - status: string + environments?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. + * @enum {string} */ - status_code: number + issues?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. + * @enum {string} */ - event: string + metadata?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token for packages published to GitHub Packages. + * @enum {string} */ - action: string | null + packages?: 'read' | 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. + * @enum {string} */ - installation_id: number | null + pages?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. + * @enum {string} */ - repository_id: number | null - } - /** - * Scim Error - * @description Scim Error - */ - 'scim-error': { - message?: string | null - documentation_url?: string | null - detail?: string | null - status?: number - scimType?: string | null - schemas?: string[] - } - /** - * Validation Error - * @description 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) - }[] - } - /** - * Webhook delivery - * @description Delivery made by a webhook. - */ - 'hook-delivery': { + pull_requests?: 'read' | 'write' /** - * @description Unique identifier of the delivery. - * @example 42 + * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. + * @enum {string} */ - id: number + repository_hooks?: 'read' | 'write' /** - * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). - * @example 58474f00-b361-11eb-836d-0e4f3503ccbe + * @description The level of permission to grant the access token to manage repository projects, columns, and cards. + * @enum {string} */ - guid: string + repository_projects?: 'read' | 'write' | 'admin' /** - * Format: date-time - * @description Time when the delivery was delivered. - * @example 2021-05-12T20:33:44Z + * @description The level of permission to grant the access token to view and manage secret scanning alerts. + * @enum {string} */ - delivered_at: string + secret_scanning_alerts?: 'read' | 'write' /** - * @description Whether the delivery is a redelivery. - * @example false + * @description The level of permission to grant the access token to manage repository secrets. + * @enum {string} */ - redelivery: boolean + secrets?: 'read' | 'write' /** - * @description Time spent delivering. - * @example 0.03 + * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. + * @enum {string} */ - duration: number + security_events?: 'read' | 'write' /** - * @description Description of the status of the attempted delivery - * @example failed to connect + * @description The level of permission to grant the access token to manage just a single file. + * @enum {string} */ - status: string + single_file?: 'read' | 'write' /** - * @description Status code received when delivery was made. - * @example 502 + * @description The level of permission to grant the access token for commit statuses. + * @enum {string} */ - status_code: number + statuses?: 'read' | 'write' /** - * @description The event that triggered the delivery. - * @example issues + * @description The level of permission to grant the access token to manage Dependabot alerts. + * @enum {string} */ - event: string + vulnerability_alerts?: 'read' | 'write' /** - * @description The type of activity for the event that triggered the delivery. - * @example opened + * @description The level of permission to grant the access token to update GitHub Actions workflow files. + * @enum {string} */ - action: string | null + workflows?: 'write' /** - * @description The id of the GitHub App installation associated with this event. - * @example 123 + * @description The level of permission to grant the access token for organization teams and members. + * @enum {string} */ - installation_id: number | null + members?: 'read' | 'write' /** - * @description The id of the repository associated with this event. - * @example 123 + * @description The level of permission to grant the access token to manage access to an organization. + * @enum {string} */ - repository_id: number | null + organization_administration?: 'read' | 'write' /** - * @description The URL target of the delivery. - * @example https://www.example.com + * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. + * @enum {string} */ - url?: string - request: { - /** @description The request headers sent with the webhook delivery. */ - headers: { [key: string]: unknown } | null - /** @description The webhook payload. */ - payload: { [key: string]: unknown } | null - } - response: { - /** @description The response headers received when the delivery was made. */ - headers: { [key: string]: unknown } | null - /** @description The response payload received. */ - payload: string | null - } + organization_hooks?: 'read' | 'write' + /** + * @description The level of permission to grant the access token for viewing an organization's plan. + * @enum {string} + */ + organization_plan?: 'read' + /** + * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). + * @enum {string} + */ + organization_projects?: 'read' | 'write' | 'admin' + /** + * @description The level of permission to grant the access token for organization packages published to GitHub Packages. + * @enum {string} + */ + organization_packages?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage organization secrets. + * @enum {string} + */ + organization_secrets?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. + * @enum {string} + */ + organization_self_hosted_runners?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to view and manage users blocked by the organization. + * @enum {string} + */ + organization_user_blocking?: 'read' | 'write' + /** + * @description The level of permission to grant the access token to manage team discussions and related comments. + * @enum {string} + */ + team_discussions?: 'read' | 'write' } /** * Simple User @@ -6403,217 +6104,409 @@ export interface components { /** @example "2020-07-09T00:17:55Z" */ starred_at?: string } - /** - * Enterprise - * @description An enterprise account - */ - enterprise: { - /** @description A short description of the enterprise. */ - description?: string | null + /** Scoped Installation */ + 'nullable-scoped-installation': { + permissions: components['schemas']['app-permissions'] /** - * Format: uri - * @example https://github.com/enterprises/octo-business + * @description Describe whether all repositories have been selected or there's a selection involved + * @enum {string} */ - html_url: string + repository_selection: 'all' | 'selected' + /** @example config.yaml */ + single_file_name: string | null + /** @example true */ + has_multiple_single_files?: boolean + /** + * @example [ + * "config.yml", + * ".github/issue_TEMPLATE.md" + * ] + */ + single_file_paths?: string[] /** * Format: uri - * @description The enterprise's website URL. + * @example https://api.github.com/users/octocat/repos */ - website_url?: string | null + repositories_url: string + account: components['schemas']['simple-user'] + } | null + /** + * Authorization + * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. + */ + authorization: { + id: number + /** Format: uri */ + url: string + /** @description 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 + /** Format: uri */ + url: string + } + note: string | null + /** Format: uri */ + note_url: string | null + /** Format: date-time */ + updated_at: string + /** Format: date-time */ + created_at: string + fingerprint: string | null + user?: components['schemas']['nullable-simple-user'] + installation?: components['schemas']['nullable-scoped-installation'] + /** Format: date-time */ + expires_at: string | null + } + /** + * GitHub app + * @description GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub. + */ + integration: { /** - * @description Unique identifier of the enterprise - * @example 42 + * @description Unique identifier of the GitHub app + * @example 37 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The slug name of the GitHub app + * @example probot-owners + */ + slug?: string + /** @example MDExOkludGVncmF0aW9uMQ== */ node_id: string + owner: components['schemas']['nullable-simple-user'] /** - * @description The name of the enterprise. - * @example Octo Business + * @description The name of the GitHub app + * @example Probot Owners */ name: string + /** @example The description of the app. */ + description: string | null /** - * @description The slug url identifier for the enterprise. - * @example octo-business + * Format: uri + * @example https://example.com */ - slug: string + external_url: string /** - * Format: date-time - * @example 2019-01-26T19:01:12Z + * Format: uri + * @example https://github.com/apps/super-ci */ - created_at: string | null + html_url: string /** * Format: date-time - * @example 2019-01-26T19:14:43Z + * @example 2017-07-08T16:18:44-04:00 */ - updated_at: string | null - /** Format: uri */ - avatar_url: string - } - /** - * App Permissions - * @description The permissions granted to the user-to-server access token. - * @example { - * "contents": "read", - * "issues": "read", - * "deployments": "write", - * "single_file": "read" - * } - */ - 'app-permissions': { + created_at: string /** - * @description The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @example 2017-07-08T16:18:44-04:00 */ - actions?: 'read' | 'write' + updated_at: string /** - * @description The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation. Can be one of: `read` or `write`. - * @enum {string} + * @description The set of permissions for the GitHub app + * @example { + * "issues": "read", + * "deployments": "write" + * } */ - administration?: 'read' | 'write' + permissions: { + issues?: string + checks?: string + metadata?: string + contents?: string + deployments?: string + } & { [key: string]: string } /** - * @description The level of permission to grant the access token for checks on code. Can be one of: `read` or `write`. - * @enum {string} + * @description The list of events for the GitHub app + * @example [ + * "label", + * "deployment" + * ] */ - checks?: 'read' | 'write' + events: string[] /** - * @description The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description The number of installations associated with the GitHub app + * @example 5 */ - contents?: 'read' | 'write' + installations_count?: number + /** @example "Iv1.25b5d1e65ffc4022" */ + client_id?: string + /** @example "1d4b2097ac622ba702d19de498f005747a8b21d3" */ + client_secret?: string + /** @example "6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b" */ + webhook_secret?: string | null + /** @example "-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END RSA PRIVATE KEY-----\n" */ + pem?: string + } + /** + * Basic Error + * @description Basic Error + */ + 'basic-error': { + message?: string + documentation_url?: string + url?: string + status?: string + } + /** + * Validation Error Simple + * @description Validation Error Simple + */ + 'validation-error-simple': { + message: string + documentation_url: string + errors?: string[] + } + /** + * Format: uri + * @description The URL to which the payloads will be delivered. + * @example https://example.com/webhook + */ + 'webhook-config-url': string + /** + * @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. + * @example "json" + */ + 'webhook-config-content-type': string + /** + * @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + * @example "********" + */ + 'webhook-config-secret': string + 'webhook-config-insecure-ssl': string | number + /** + * Webhook Configuration + * @description 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'] + } + /** + * Simple webhook delivery + * @description Delivery made by a webhook, without request and response information. + */ + 'hook-delivery-item': { /** - * @description The level of permission to grant the access token for deployments and deployment statuses. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the webhook delivery. + * @example 42 */ - deployments?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token for managing repository environments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - environments?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the webhook delivery occurred. + * @example 2021-05-12T20:33:44Z */ - issues?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the webhook delivery is a redelivery. + * @example false */ - metadata?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token for packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - packages?: 'read' | 'write' + duration: number /** - * @description The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. Can be one of: `read` or `write`. - * @enum {string} + * @description Describes the response returned after attempting the delivery. + * @example failed to connect */ - pages?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - pull_requests?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for a repository. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - repository_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token to manage repository projects, columns, and cards. Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - repository_projects?: 'read' | 'write' | 'admin' + action: string | null /** - * @description The level of permission to grant the access token to view and manage secret scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - secret_scanning_alerts?: 'read' | 'write' + installation_id: number | null /** - * @description The level of permission to grant the access token to manage repository secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - secrets?: 'read' | 'write' + repository_id: number | null + } + /** + * Scim Error + * @description Scim Error + */ + 'scim-error': { + message?: string | null + documentation_url?: string | null + detail?: string | null + status?: number + scimType?: string | null + schemas?: string[] + } + /** + * Validation Error + * @description 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) + }[] + } + /** + * Webhook delivery + * @description Delivery made by a webhook. + */ + 'hook-delivery': { /** - * @description The level of permission to grant the access token to view and manage security events like code scanning alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the delivery. + * @example 42 */ - security_events?: 'read' | 'write' + id: number /** - * @description The level of permission to grant the access token to manage just a single file. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier for the event (shared with all deliveries for all webhooks that subscribe to this event). + * @example 58474f00-b361-11eb-836d-0e4f3503ccbe */ - single_file?: 'read' | 'write' + guid: string /** - * @description The level of permission to grant the access token for commit statuses. Can be one of: `read` or `write`. - * @enum {string} + * Format: date-time + * @description Time when the delivery was delivered. + * @example 2021-05-12T20:33:44Z */ - statuses?: 'read' | 'write' + delivered_at: string /** - * @description The level of permission to grant the access token to manage Dependabot alerts. Can be one of: `read` or `write`. - * @enum {string} + * @description Whether the delivery is a redelivery. + * @example false */ - vulnerability_alerts?: 'read' | 'write' + redelivery: boolean /** - * @description The level of permission to grant the access token to update GitHub Actions workflow files. Can be one of: `write`. - * @enum {string} + * @description Time spent delivering. + * @example 0.03 */ - workflows?: 'write' + duration: number /** - * @description The level of permission to grant the access token for organization teams and members. Can be one of: `read` or `write`. - * @enum {string} + * @description Description of the status of the attempted delivery + * @example failed to connect */ - members?: 'read' | 'write' + status: string /** - * @description The level of permission to grant the access token to manage access to an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description Status code received when delivery was made. + * @example 502 */ - organization_administration?: 'read' | 'write' + status_code: number /** - * @description The level of permission to grant the access token to manage the post-receive hooks for an organization. Can be one of: `read` or `write`. - * @enum {string} + * @description The event that triggered the delivery. + * @example issues */ - organization_hooks?: 'read' | 'write' + event: string /** - * @description The level of permission to grant the access token for viewing an organization's plan. Can be one of: `read`. - * @enum {string} + * @description The type of activity for the event that triggered the delivery. + * @example opened */ - organization_plan?: 'read' + action: string | null /** - * @description The level of permission to grant the access token to manage organization projects and projects beta (where available). Can be one of: `read`, `write`, or `admin`. - * @enum {string} + * @description The id of the GitHub App installation associated with this event. + * @example 123 */ - organization_projects?: 'read' | 'write' | 'admin' + installation_id: number | null /** - * @description The level of permission to grant the access token for organization packages published to GitHub Packages. Can be one of: `read` or `write`. - * @enum {string} + * @description The id of the repository associated with this event. + * @example 123 */ - organization_packages?: 'read' | 'write' + repository_id: number | null /** - * @description The level of permission to grant the access token to manage organization secrets. Can be one of: `read` or `write`. - * @enum {string} + * @description The URL target of the delivery. + * @example https://www.example.com */ - organization_secrets?: 'read' | 'write' + url?: string + request: { + /** @description The request headers sent with the webhook delivery. */ + headers: { [key: string]: unknown } | null + /** @description The webhook payload. */ + payload: { [key: string]: unknown } | null + } + response: { + /** @description The response headers received when the delivery was made. */ + headers: { [key: string]: unknown } | null + /** @description The response payload received. */ + payload: string | null + } + } + /** + * Enterprise + * @description An enterprise account + */ + enterprise: { + /** @description A short description of the enterprise. */ + description?: string | null /** - * @description The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @example https://github.com/enterprises/octo-business */ - organization_self_hosted_runners?: 'read' | 'write' + html_url: string /** - * @description The level of permission to grant the access token to view and manage users blocked by the organization. Can be one of: `read` or `write`. - * @enum {string} + * Format: uri + * @description The enterprise's website URL. */ - organization_user_blocking?: 'read' | 'write' + website_url?: string | null /** - * @description The level of permission to grant the access token to manage team discussions and related comments. Can be one of: `read` or `write`. - * @enum {string} + * @description Unique identifier of the enterprise + * @example 42 */ - team_discussions?: 'read' | 'write' - } - /** - * Installation + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the enterprise. + * @example Octo Business + */ + name: string + /** + * @description The slug url identifier for the enterprise. + * @example octo-business + */ + slug: string + /** + * Format: date-time + * @example 2019-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2019-01-26T19:14:43Z + */ + updated_at: string | null + /** Format: uri */ + avatar_url: string + } + /** + * Installation * @description Installation */ installation: { @@ -6882,7 +6775,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -7061,6 +6957,41 @@ export interface components { allow_auto_merge?: boolean delete_branch_on_merge?: boolean allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' allow_merge_commit?: boolean subscribers_count?: number network_count?: number @@ -7084,6 +7015,52 @@ export interface components { * @example false */ delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether to allow merge commits for pull requests. * @default true @@ -7092,6 +7069,11 @@ export interface components { allow_merge_commit?: boolean /** @description Whether to allow forking this repo */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -7099,6 +7081,8 @@ export interface components { master_branch?: string /** @example "2020-07-09T00:17:42Z" */ starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean } /** * Installation Token @@ -7159,64 +7143,6 @@ export interface components { scopes: string[] user?: components['schemas']['nullable-simple-user'] } - /** Scoped Installation */ - 'nullable-scoped-installation': { - permissions: components['schemas']['app-permissions'] - /** - * @description Describe whether all repositories have been selected or there's a selection involved - * @enum {string} - */ - repository_selection: 'all' | 'selected' - /** @example config.yaml */ - single_file_name: string | null - /** @example true */ - has_multiple_single_files?: boolean - /** - * @example [ - * "config.yml", - * ".github/issue_TEMPLATE.md" - * ] - */ - single_file_paths?: string[] - /** - * Format: uri - * @example https://api.github.com/users/octocat/repos - */ - repositories_url: string - account: components['schemas']['simple-user'] - } | null - /** - * Authorization - * @description The authorization for an OAuth app, GitHub App, or a Personal Access Token. - */ - authorization: { - id: number - /** Format: uri */ - url: string - /** @description 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 - /** Format: uri */ - url: string - } - note: string | null - /** Format: uri */ - note_url: string | null - /** Format: date-time */ - updated_at: string - /** Format: date-time */ - created_at: string - fingerprint: string | null - user?: components['schemas']['nullable-simple-user'] - installation?: components['schemas']['nullable-scoped-installation'] - /** Format: date-time */ - expires_at: string | null - } /** * Code Of Conduct * @description Code Of Conduct @@ -7286,12 +7212,137 @@ export interface components { html_url: string | null } /** - * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * @description The announcement text in GitHub Flavored Markdown. For more information about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + * @example Very **important** announcement about _nothing_. + */ + 'announcement-message': string + /** + * Format: date-time + * @description The time at which the announcement expires. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. To set an announcement that never expires, omit this parameter, set it to `null`, or set it to an empty string. + * @example "2021-01-01T00:00:00.000-07:00" + */ + 'announcement-expiration': string | null + /** + * Enterprise Announcement + * @description Enterprise global announcement + */ + announcement: { + announcement: components['schemas']['announcement-message'] + expires_at?: components['schemas']['announcement-expiration'] + } + 'license-info': { + seats?: string | number + seats_used?: number + seats_available?: string | number + kind?: string + days_until_expiration?: number + expire_at?: string + } + /** Repository Enterprise Stats */ + 'enterprise-repository-overview': { + total_repos: number + root_repos: number + fork_repos: number + org_repos: number + total_pushes: number + total_wikis: number + } + /** Hooks Enterprise Stats */ + 'enterprise-hook-overview': { + total_hooks: number + active_hooks: number + inactive_hooks: number + } + /** Enterprise Pages Stats */ + 'enterprise-page-overview': { + total_pages: number + } + /** Enterprise Organization Stats */ + 'enterprise-organization-overview': { + total_orgs: number + disabled_orgs: number + total_teams: number + total_team_members: number + } + /** Enterprise User Stats */ + 'enterprise-user-overview': { + total_users: number + admin_users: number + suspended_users: number + } + /** Enterprise Pull Request Stats */ + 'enterprise-pull-request-overview': { + total_pulls: number + merged_pulls: number + mergeable_pulls: number + unmergeable_pulls: number + } + /** Enterprise Issue Stats */ + 'enterprise-issue-overview': { + total_issues: number + open_issues: number + closed_issues: number + } + /** Enterprise Milestone Stats */ + 'enterprise-milestone-overview': { + total_milestones: number + open_milestones: number + closed_milestones: number + } + /** Enterprise Gist Stats */ + 'enterprise-gist-overview': { + total_gists: number + private_gists: number + public_gists: number + } + /** Enterprise Comment Stats */ + 'enterprise-comment-overview': { + total_commit_comments: number + total_gist_comments: number + total_issue_comments: number + total_pull_request_comments: number + } + 'enterprise-overview': { + repos?: components['schemas']['enterprise-repository-overview'] + hooks?: components['schemas']['enterprise-hook-overview'] + pages?: components['schemas']['enterprise-page-overview'] + orgs?: components['schemas']['enterprise-organization-overview'] + users?: components['schemas']['enterprise-user-overview'] + pulls?: components['schemas']['enterprise-pull-request-overview'] + issues?: components['schemas']['enterprise-issue-overview'] + milestones?: components['schemas']['enterprise-milestone-overview'] + gists?: components['schemas']['enterprise-gist-overview'] + comments?: components['schemas']['enterprise-comment-overview'] + } + 'actions-cache-usage-org-enterprise': { + /** @description The count of active caches across all repositories of an enterprise or an organization. */ + total_active_caches_count: number + /** @description The total size in bytes of all active cache items across all repositories of an enterprise or an organization. */ + total_active_caches_size_in_bytes: number + } + /** + * Actions cache usage policy for an enterprise + * @description GitHub Actions cache usage policy for an enterprise. + */ + 'actions-cache-usage-policy-enterprise': { + /** + * @description For repositories in an enterprise, the default size limit for the sum of all caches in a repository, in gigabytes. + * @example 10 + */ + repo_cache_size_limit_in_gb?: number + /** + * @description For repositories in an enterprise, the maximum value that can be set as the limit for the sum of all caches in a repository, in gigabytes. + * @example 15 + */ + max_repo_cache_size_limit_in_gb?: number + } + /** + * @description The policy that controls the organizations in the enterprise that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-organizations': 'all' | 'none' | 'selected' /** - * @description The permissions policy that controls the actions that are allowed to run. Can be one of: `all`, `local_only`, or `selected`. + * @description The permissions policy that controls the actions that are allowed to run. * @enum {string} */ 'allowed-actions': 'all' | 'local_only' | 'selected' @@ -7304,52 +7355,26 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * Organization Simple - * @description Organization Simple - */ - 'organization-simple': { - /** @example github */ - login: string - /** @example 1 */ - id: number - /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ - node_id: string - /** - * Format: uri - * @example https://api.github.com/orgs/github - */ - url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/repos - */ - repos_url: string - /** - * Format: uri - * @example https://api.github.com/orgs/github/events - */ - events_url: string - /** @example https://api.github.com/orgs/github/hooks */ - hooks_url: string - /** @example https://api.github.com/orgs/github/issues */ - issues_url: string - /** @example https://api.github.com/orgs/github/members{/member} */ - members_url: string - /** @example https://api.github.com/orgs/github/public_members{/member} */ - public_members_url: string - /** @example https://github.com/images/error/octocat_happy.gif */ - avatar_url: string - /** @example A great organization */ - description: string | null - } 'selected-actions': { /** @description Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. */ - github_owned_allowed?: boolean - /** @description Whether actions in GitHub Marketplace from verified creators are allowed. Set to `true` to allow all GitHub Marketplace actions by verified creators. */ - verified_allowed?: boolean + github_owned_allowed: boolean /** @description Specifies a list of string-matching patterns to allow specific action(s). Wildcards, tags, and SHAs are allowed. For example, `monalisa/octocat@*`, `monalisa/octocat@v2`, `monalisa/*`." */ - patterns_allowed?: string[] + patterns_allowed: string[] + } + /** + * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows. + * @enum {string} + */ + 'actions-default-workflow-permissions': 'read' | 'write' + /** @description Whether GitHub Actions can approve pull requests. Enabling this can be a security risk. */ + 'actions-can-approve-pull-request-reviews': boolean + 'actions-get-default-workflow-permissions': { + default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] + } + 'actions-set-default-workflow-permissions': { + default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] + can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] } 'runner-groups-enterprise': { id: number @@ -7359,6 +7384,18 @@ export interface components { selected_organizations_url?: string runners_url: string allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Self hosted runner label @@ -7513,6 +7550,11 @@ export interface components { * @description The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ 'alert-created-at': string + /** + * Format: date-time + * @description The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + 'nullable-alert-updated-at': string | null /** * Format: uri * @description The REST API URL of the alert resource. @@ -7524,780 +7566,393 @@ export interface components { */ 'alert-html-url': string /** - * @description Sets the state of the secret scanning alert. Can be either `open` or `resolved`. You must provide `resolution` when you set the state to `resolved`. + * @description Sets the state of the secret scanning alert. You must provide `resolution` when you set the state to `resolved`. * @enum {string} */ 'secret-scanning-alert-state': 'open' | 'resolved' /** - * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`. + * @description **Required when the `state` is `resolved`.** The reason for resolving the alert. * @enum {string|null} */ 'secret-scanning-alert-resolution': (null | 'false_positive' | 'wont_fix' | 'revoked' | 'used_in_tests') | null /** - * Repository - * @description A git repository + * Simple Repository + * @description Simple Repository */ - 'nullable-repository': { + 'simple-repository': { /** - * @description Unique identifier of the repository - * @example 42 + * @description A unique identifier of the repository. + * @example 1296269 */ id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + /** + * @description The GraphQL identifier of the repository. + * @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + */ node_id: string /** * @description The name of the repository. - * @example Team Environment + * @example Hello-World */ name: string - /** @example octocat/Hello-World */ - full_name: string - license: components['schemas']['nullable-license-simple'] - organization?: components['schemas']['nullable-simple-user'] - forks: number - permissions?: { - admin: boolean - pull: boolean - triage?: boolean - push: boolean - maintain?: boolean - } - owner: components['schemas']['simple-user'] /** - * @description Whether the repository is private or public. - * @default false + * @description The full, globally unique, name of the repository. + * @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + /** @description Whether the repository is private. */ private: boolean /** * Format: uri + * @description The URL to view the repository on GitHub.com. * @example https://github.com/octocat/Hello-World */ html_url: string - /** @example This your first repo! */ + /** + * @description The repository description. + * @example This your first repo! + */ description: string | null + /** @description Whether the repository is a fork. */ fork: boolean /** * Format: uri + * @description The URL to get more information about the repository from the GitHub API. * @example https://api.github.com/repos/octocat/Hello-World */ url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + /** + * @description A template for the API URL to download the repository as an archive. + * @example https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + */ archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + /** + * @description A template for the API URL to list the available assignees for issues in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/assignees{/user} + */ assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + /** + * @description A template for the API URL to create or retrieve a raw Git blob in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + */ blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + /** + * @description A template for the API URL to get information about branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/branches{/branch} + */ branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + /** + * @description A template for the API URL to get information about collaborators of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + */ collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + /** + * @description A template for the API URL to get information about comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/comments{/number} + */ comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + /** + * @description A template for the API URL to get information about commits on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/commits{/sha} + */ commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + /** + * @description A template for the API URL to compare two commits or refs. + * @example https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + */ compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + /** + * @description A template for the API URL to get the contents of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contents/{+path} + */ contents_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors + * @description A template for the API URL to list the contributors to the repository. + * @example https://api.github.com/repos/octocat/Hello-World/contributors */ contributors_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments + * @description The API URL to list the deployments of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/deployments */ deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @description The API URL to list the downloads on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/downloads */ downloads_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @description The API URL to list the events of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/events */ events_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks + * @description The API URL to list the forks of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/forks */ forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + /** + * @description A template for the API URL to get information about Git commits of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + */ git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + /** + * @description A template for the API URL to get information about Git refs of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + */ git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + /** + * @description A template for the API URL to get information about Git tags of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + */ git_tags_url: string - /** @example git:github.com/octocat/Hello-World.git */ - git_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + /** + * @description A template for the API URL to get information about issue comments on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + */ issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + /** + * @description A template for the API URL to get information about issue events on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + */ issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** + * @description A template for the API URL to get information about issues on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/issues{/number} + */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + /** + * @description A template for the API URL to get information about deploy keys on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + */ keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + /** + * @description A template for the API URL to get information about labels of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/labels{/name} + */ labels_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages + * @description The API URL to get information about the languages of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/languages */ languages_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges + * @description The API URL to merge branches in the repository. + * @example https://api.github.com/repos/octocat/Hello-World/merges */ merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + /** + * @description A template for the API URL to get information about milestones of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/milestones{/number} + */ milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + /** + * @description A template for the API URL to get information about notifications on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + */ notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + /** + * @description A template for the API URL to get information about pull requests on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/pulls{/number} + */ pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + /** + * @description A template for the API URL to get information about releases on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/releases{/id} + */ releases_url: string - /** @example git@github.com:octocat/Hello-World.git */ - ssh_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers + * @description The API URL to list the stargazers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/stargazers */ stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + /** + * @description A template for the API URL to get information about statuses of a commit. + * @example https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + */ statuses_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers + * @description The API URL to list the subscribers on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscribers */ subscribers_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription + * @description The API URL to subscribe to notifications for this repository. + * @example https://api.github.com/repos/octocat/Hello-World/subscription */ subscription_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags + * @description The API URL to get information about tags on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/tags */ tags_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams + * @description The API URL to list the teams on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/teams */ teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - /** @example https://github.com/octocat/Hello-World.git */ - clone_url: string /** - * Format: uri - * @example git:git.example.com/octocat/Hello-World + * @description A template for the API URL to create or retrieve a raw Git tree of the repository. + * @example https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - mirror_url: string | null + trees_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks + * @description The API URL to list the hooks on the repository. + * @example https://api.github.com/repos/octocat/Hello-World/hooks */ hooks_url: string + } + 'organization-secret-scanning-alert': { + number?: components['schemas']['alert-number'] + created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['nullable-alert-updated-at'] + url?: components['schemas']['alert-url'] + html_url?: components['schemas']['alert-html-url'] /** * Format: uri - * @example https://svn.github.com/octocat/Hello-World + * @description The REST API URL of the code locations for this alert. */ - svn_url: string + locations_url?: string + state?: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] /** - * Format: uri - * @example https://github.com + * Format: date-time + * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - homepage: string | null - language: string | null - /** @example 9 */ - forks_count: number - /** @example 80 */ - stargazers_count: number - /** @example 80 */ - watchers_count: number - /** @example 108 */ - size: number + resolved_at?: string | null + resolved_by?: components['schemas']['nullable-simple-user'] + /** @description The type of secret that secret scanning detected. */ + secret_type?: string /** - * @description The default branch of the repository. - * @example master + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." */ - default_branch: string - /** @example 0 */ - open_issues_count: number + secret_type_display_name?: string + /** @description The secret that was detected. */ + secret?: string + repository?: components['schemas']['simple-repository'] + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] /** - * @description Whether this repository acts as a template that can be used to generate new repositories. - * @default false - * @example true + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - is_template?: boolean - topics?: string[] + push_protection_bypassed_at?: string | null + } + 'advanced-security-active-committers-user': { + user_login: string + /** @example 2021-11-03 */ + last_pushed_date: string + } + 'advanced-security-active-committers-repository': { + /** @example octocat/Hello-World */ + name: string + /** @example 25 */ + advanced_security_committers: number + advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] + } + 'advanced-security-active-committers': { + /** @example 25 */ + total_advanced_security_committers?: number + /** @example 2 */ + total_count?: number + repositories: components['schemas']['advanced-security-active-committers-repository'][] + } + /** + * Actor + * @description Actor + */ + actor: { + id: number + login: string + display_login?: string + gravatar_id: string | null + /** Format: uri */ + url: string + /** Format: uri */ + avatar_url: string + } + /** + * Milestone + * @description A collection of related issues and pull requests. + */ + 'nullable-milestone': { /** - * @description Whether issues are enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 */ - has_issues: boolean + url: string /** - * @description Whether projects are enabled. - * @default true - * @example true + * Format: uri + * @example https://github.com/octocat/Hello-World/milestones/v1.0 */ - has_projects: boolean + html_url: string /** - * @description Whether the wiki is enabled. - * @default true - * @example true + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels */ - has_wiki: boolean - has_pages: boolean + labels_url: string + /** @example 1002604 */ + id: number + /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ + node_id: string /** - * @description Whether downloads are enabled. - * @default true - * @example true + * @description The number of the milestone. + * @example 42 */ - has_downloads: boolean + number: number /** - * @description Whether the repository is archived. - * @default false + * @description The state of the milestone. + * @default open + * @example open + * @enum {string} */ - archived: boolean - /** @description Returns whether or not this repository disabled. */ - disabled: boolean + state: 'open' | 'closed' /** - * @description The repository visibility: public, private, or internal. - * @default public + * @description The title of the milestone. + * @example v1.0 */ - visibility?: string + title: string + /** @example Tracking milestone for version 1.0 */ + description: string | null + creator: components['schemas']['nullable-simple-user'] + /** @example 4 */ + open_issues: number + /** @example 8 */ + closed_issues: number /** * Format: date-time - * @example 2011-01-26T19:06:43Z + * @example 2011-04-10T20:09:31Z */ - pushed_at: string | null + created_at: string /** * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example 2014-03-03T18:58:10Z */ - created_at: string | null + updated_at: string /** * Format: date-time - * @example 2011-01-26T19:14:43Z + * @example 2013-02-12T13:22:01Z */ - updated_at: string | null + closed_at: string | null /** - * @description Whether to allow rebase merges for pull requests. - * @default true - * @example true - */ - 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 - } - 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 - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - allow_rebase_merge?: boolean - temp_clone_token?: string - allow_squash_merge?: boolean - allow_auto_merge?: boolean - delete_branch_on_merge?: boolean - allow_update_branch?: boolean - allow_merge_commit?: boolean - subscribers_count?: number - network_count?: number - } | null - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. - * @default true - * @example true - */ - allow_merge_commit?: boolean - /** @description Whether to allow forking this repo */ - allow_forking?: boolean - subscribers_count?: number - network_count?: number - open_issues: number - watchers: number - master_branch?: string - /** @example "2020-07-09T00:17:42Z" */ - starred_at?: string - } | null - /** - * Minimal Repository - * @description Minimal Repository - */ - 'minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads - */ - downloads_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events - */ - events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ - issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:14:43Z - */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number - /** @example 0 */ - watchers?: number - allow_forking?: boolean - } - 'organization-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'] - /** - * Format: uri - * @description The REST API URL of the code locations for this alert. - */ - locations_url?: string - state?: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] - /** - * Format: date-time - * @description The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - resolved_at?: string | null - resolved_by?: components['schemas']['nullable-simple-user'] - /** @description The type of secret that secret scanning detected. */ - secret_type?: string - /** @description The secret that was detected. */ - secret?: string - repository?: components['schemas']['minimal-repository'] - } - 'actions-billing-usage': { - /** @description The sum of the free and paid GitHub Actions minutes used. */ - total_minutes_used: number - /** @description The total paid GitHub Actions minutes used. */ - total_paid_minutes_used: number - /** @description The amount of free GitHub Actions minutes available. */ - included_minutes: number - minutes_used_breakdown: { - /** @description Total minutes used on Ubuntu runner machines. */ - UBUNTU?: number - /** @description Total minutes used on macOS runner machines. */ - MACOS?: number - /** @description Total minutes used on Windows runner machines. */ - WINDOWS?: number - } - } - 'advanced-security-active-committers-user': { - user_login: string - /** @example 2021-11-03 */ - last_pushed_date: string - } - 'advanced-security-active-committers-repository': { - /** @example octocat/Hello-World */ - name: string - /** @example 25 */ - advanced_security_committers: number - advanced_security_committers_breakdown: components['schemas']['advanced-security-active-committers-user'][] - } - 'advanced-security-active-committers': { - /** @example 25 */ - total_advanced_security_committers?: number - repositories: components['schemas']['advanced-security-active-committers-repository'][] - } - 'packages-billing-usage': { - /** @description Sum of the free and paid storage space (GB) for GitHuub Packages. */ - total_gigabytes_bandwidth_used: number - /** @description Total paid storage space (GB) for GitHuub Packages. */ - total_paid_gigabytes_bandwidth_used: number - /** @description Free storage space (GB) for GitHub Packages. */ - included_gigabytes_bandwidth: number - } - 'combined-billing-usage': { - /** @description Numbers of days left in billing cycle. */ - days_left_in_billing_cycle: number - /** @description Estimated storage space (GB) used in billing cycle. */ - estimated_paid_storage_for_month: number - /** @description Estimated sum of free and paid storage space (GB) used in billing cycle. */ - estimated_storage_for_month: number - } - /** - * Actor - * @description Actor - */ - actor: { - id: number - login: string - display_login?: string - gravatar_id: string | null - /** Format: uri */ - url: string - /** Format: uri */ - avatar_url: string - } - /** - * Milestone - * @description A collection of related issues and pull requests. - */ - 'nullable-milestone': { - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1 - */ - url: string - /** - * Format: uri - * @example https://github.com/octocat/Hello-World/milestones/v1.0 - */ - html_url: string - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World/milestones/1/labels - */ - labels_url: string - /** @example 1002604 */ - id: number - /** @example MDk6TWlsZXN0b25lMTAwMjYwNA== */ - node_id: string - /** - * @description The number of the milestone. - * @example 42 - */ - number: number - /** - * @description The state of the milestone. - * @default open - * @example open - * @enum {string} - */ - state: 'open' | 'closed' - /** - * @description The title of the milestone. - * @example v1.0 - */ - title: string - /** @example Tracking milestone for version 1.0 */ - description: string | null - creator: components['schemas']['nullable-simple-user'] - /** @example 4 */ - open_issues: number - /** @example 8 */ - closed_issues: number - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2013-02-12T13:22:01Z - */ - closed_at: string | null - /** - * Format: date-time - * @example 2012-10-09T23:39:01Z + * Format: date-time + * @example 2012-10-09T23:39:01Z */ due_on: string | null } | null @@ -8388,7 +8043,7 @@ export interface components { * @example OWNER * @enum {string} */ - author_association: 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' + 'author-association': 'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' /** Reaction Rollup */ 'reaction-rollup': { /** Format: uri */ @@ -8435,6 +8090,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -8499,7 +8160,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -8541,7 +8202,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -8870,7 +8531,7 @@ export interface components { * @example 2011-04-18T23:23:56Z */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Gist Commit @@ -9023,77 +8684,6 @@ export interface components { /** @example true */ featured: boolean } - /** - * Marketplace Listing Plan - * @description Marketplace Listing Plan - */ - 'marketplace-listing-plan': { - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313 - */ - url: string - /** - * Format: uri - * @example https://api.github.com/marketplace_listing/plans/1313/accounts - */ - accounts_url: string - /** @example 1313 */ - id: number - /** @example 3 */ - number: number - /** @example Pro */ - name: string - /** @example A professional-grade CI solution */ - description: string - /** @example 1099 */ - monthly_price_in_cents: number - /** @example 11870 */ - yearly_price_in_cents: number - /** @example flat-rate */ - price_model: string - /** @example true */ - has_free_trial: boolean - unit_name: string | null - /** @example published */ - state: string - /** - * @example [ - * "Up to 25 private repositories", - * "11 concurrent builds" - * ] - */ - bullets: string[] - } - /** - * Marketplace Purchase - * @description Marketplace Purchase - */ - 'marketplace-purchase': { - url: string - type: string - id: number - login: string - organization_billing_email?: string - email?: string | 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 - 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'] - } - } /** * Api Overview * @description Api Overview @@ -9101,42 +8691,6 @@ export interface components { 'api-overview': { /** @example true */ verifiable_password_authentication: boolean - ssh_key_fingerprints?: { - SHA256_RSA?: string - SHA256_DSA?: string - SHA256_ECDSA?: string - SHA256_ED25519?: string - } - /** - * @example [ - * "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl" - * ] - */ - ssh_keys?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - hooks?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - web?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - api?: string[] - /** - * @example [ - * "127.0.0.1/32" - * ] - */ - git?: string[] /** * @example [ * "13.65.0.0/16", @@ -9147,32 +8701,222 @@ export interface components { packages?: string[] /** * @example [ - * "192.30.252.153/32", - * "192.30.252.154/32" + * "192.168.7.15/32", + * "192.168.7.16/32" * ] */ - pages?: string[] + dependabot?: string[] + /** @example 3.6.0 */ + installed_version?: string + } + /** + * Minimal Repository + * @description Minimal Repository + */ + 'minimal-repository': { + /** @example 1296269 */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** @example Hello-World */ + name: string + /** @example octocat/Hello-World */ + full_name: string + owner: components['schemas']['simple-user'] + private: boolean /** - * @example [ - * "54.158.161.132", - * "54.226.70.38" - * ] + * Format: uri + * @example https://github.com/octocat/Hello-World */ - importer?: string[] + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean /** - * @example [ - * "13.64.0.0/16", - * "13.65.0.0/16" - * ] + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors */ - actions?: string[] + contributors_url: string /** - * @example [ - * "192.168.7.15/32", - * "192.168.7.16/32" - * ] + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments */ - dependabot?: string[] + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + git_url?: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + ssh_url?: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + clone_url?: string + mirror_url?: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + svn_url?: string + homepage?: string | null + language?: string | null + forks_count?: number + stargazers_count?: number + watchers_count?: number + /** @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. */ + 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 + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at?: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at?: string | null + permissions?: { + admin?: boolean + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + /** @example admin */ + role_name?: string + temp_clone_token?: string + delete_branch_on_merge?: boolean + subscribers_count?: number + network_count?: number + code_of_conduct?: components['schemas']['code-of-conduct'] + license?: { + key?: string + name?: string + spdx_id?: string + url?: string + node_id?: string + } | null + /** @example 0 */ + forks?: number + /** @example 0 */ + open_issues?: number + /** @example 0 */ + watchers?: number + allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Thread @@ -9230,47 +8974,11 @@ export interface components { * @description Custom repository roles created by organization administrators */ 'organization-custom-repository-role': { + /** @description The unique identifier of the custom role. */ id: number + /** @description The name of the custom role. */ name: string } - /** - * ExternalGroups - * @description A list of external groups available to be connected to a team - */ - 'external-groups': { - /** - * @description An array of external groups available to be mapped to a team - * @example [ - * { - * "group_id": 1, - * "group_name": "group-azuread-test", - * "updated_at": "2021-01-03 22:27:15:000 -700" - * }, - * { - * "group_id": 2, - * "group_name": "group-azuread-test2", - * "updated_at": "2021-06-03 22:27:15:000 -700" - * } - * ] - */ - groups?: { - /** - * @description The internal ID of the group - * @example 1 - */ - group_id: number - /** - * @description The display name of the group - * @example group-azuread-test - */ - group_name: string - /** - * @description The time of the last update for this group - * @example 2019-06-03 22:27:15:000 -700 - */ - updated_at: string - }[] - } /** * Organization Full * @description Organization Full @@ -9396,11 +9104,34 @@ export interface components { members_can_create_private_pages?: boolean /** @example false */ members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean /** Format: date-time */ updated_at: string } /** - * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`. + * Actions Cache Usage by repository + * @description GitHub Actions Cache Usage by repository. + */ + 'actions-cache-usage-by-repository': { + /** + * @description The repository owner and name for the cache usage being shown. + * @example octo-org/Hello-World + */ + full_name: string + /** + * @description The sum of the size in bytes of all the active cache items in the repository. + * @example 2322142 + */ + active_caches_size_in_bytes: number + /** + * @description The number of active caches in the repository. + * @example 3 + */ + active_caches_count: number + } + /** + * @description The policy that controls the repositories in the organization that are allowed to run GitHub Actions. * @enum {string} */ 'enabled-repositories': 'all' | 'none' | 'selected' @@ -9411,21 +9142,6 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } - /** - * @description The default workflow permissions granted to the GITHUB_TOKEN when running workflows in an organization. - * @enum {string} - */ - 'actions-default-workflow-permissions': 'read' | 'write' - /** @description Whether GitHub Actions can submit approving pull request reviews. */ - 'actions-can-approve-pull-request-reviews': boolean - 'actions-get-default-workflow-permissions': { - default_workflow_permissions: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews: components['schemas']['actions-can-approve-pull-request-reviews'] - } - 'actions-set-default-workflow-permissions': { - default_workflow_permissions?: components['schemas']['actions-default-workflow-permissions'] - can_approve_pull_request_reviews?: components['schemas']['actions-can-approve-pull-request-reviews'] - } 'runner-groups-org': { id: number name: string @@ -9437,6 +9153,18 @@ export interface components { inherited: boolean inherited_allows_public_repositories?: boolean allows_public_repositories: boolean + /** + * @description If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified. + * @default false + */ + workflow_restrictions_read_only?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } /** * Actions Secret for an Organization @@ -9492,6 +9220,10 @@ export interface components { * @description An object without any properties. */ 'empty-object': { [key: string]: unknown } + /** @description The name of the tool used to generate the code scanning analysis. */ + 'code-scanning-analysis-tool-name': string + /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ + 'code-scanning-analysis-tool-guid': string | null /** * @description State of a code scanning alert. * @enum {string} @@ -9511,17 +9243,19 @@ export interface components { * Format: date-time * @description The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-fixed-at': string | null + 'alert-fixed-at': string | null /** * Format: date-time * @description The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. */ - 'code-scanning-alert-dismissed-at': string | null + 'alert-dismissed-at': string | null /** - * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. Can be one of: `false positive`, `won't fix`, and `used in tests`. + * @description **Required when the state is dismissed.** The reason for dismissing or closing the alert. * @enum {string|null} */ 'code-scanning-alert-dismissed-reason': (null | 'false positive' | "won't fix" | 'used in tests') | null + /** @description The dismissal comment associated with the dismissal of the alert. */ + 'code-scanning-alert-dismissed-comment': string | null 'code-scanning-alert-rule': { /** @description A unique identifier for the rule used to detect the alert. */ id?: string | null @@ -9545,13 +9279,11 @@ export interface components { tags?: string[] | null /** @description Detailed documentation for the rule as GitHub Flavored Markdown. */ help?: string | null + /** @description A link to the documentation for the rule used to detect the alert. */ + help_uri?: string | null } - /** @description The name of the tool used to generate the code scanning analysis. */ - 'code-scanning-analysis-tool-name': string /** @description The version of the tool used to generate the code scanning analysis. */ 'code-scanning-analysis-tool-version': string | null - /** @description The GUID of the tool used to generate the code scanning analysis, if provided in the uploaded SARIF data. */ - 'code-scanning-analysis-tool-guid': string | null 'code-scanning-analysis-tool': { name?: components['schemas']['code-scanning-analysis-tool-name'] version?: components['schemas']['code-scanning-analysis-tool-version'] @@ -9607,82 +9339,15 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] - repository: components['schemas']['minimal-repository'] - } - /** - * Credential Authorization - * @description Credential Authorization - */ - 'credential-authorization': { - /** - * @description User login that owns the underlying credential. - * @example monalisa - */ - login: string - /** - * @description Unique identifier for the credential. - * @example 1 - */ - credential_id: number - /** - * @description Human-readable description of the credential type. - * @example SSH Key - */ - credential_type: string - /** - * @description Last eight characters of the credential. Only included in responses with credential_type of personal access token. - * @example 12345678 - */ - token_last_eight?: string - /** - * Format: date-time - * @description Date when the credential was authorized for use. - * @example 2011-01-26T19:06:43Z - */ - credential_authorized_at: string - /** - * @description List of oauth scopes the token has been granted. - * @example [ - * "user", - * "repo" - * ] - */ - scopes?: string[] - /** - * @description Unique string to distinguish the credential. Only included in responses with credential_type of SSH Key. - * @example jklmnop12345678 - */ - fingerprint?: string - /** - * Format: date-time - * @description Date when the credential was last accessed. May be null if it was never accessed - * @example 2011-01-26T19:06:43Z - */ - credential_accessed_at: string | null - /** @example 12345678 */ - authorized_credential_id: number | null - /** - * @description The title given to the ssh key. This will only be present when the credential is an ssh key. - * @example my ssh key - */ - authorized_credential_title?: string | null - /** - * @description The note given to the token. This will only be present when the credential is a token. - * @example my token - */ - authorized_credential_note?: string | null - /** - * Format: date-time - * @description The expiry for the token. This will only be present when the credential is a token. - */ - authorized_credential_expires_at?: string | null + repository: components['schemas']['simple-repository'] } /** * Dependabot Secret for an Organization @@ -9811,23 +9476,42 @@ export interface components { }[] } /** - * Organization Invitation - * @description Organization Invitation + * ExternalGroups + * @description A list of external groups available to be connected to a team */ - 'organization-invitation': { - id: number - login: string | null - email: string | null - role: string - created_at: string - failed_at?: string | null - failed_reason?: string | null - inviter: components['schemas']['simple-user'] - team_count: number - /** @example "MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x" */ - node_id: string - /** @example "https://api.github.com/organizations/16/invitations/1/teams" */ - invitation_teams_url: string + 'external-groups': { + /** + * @description An array of external groups available to be mapped to a team + * @example [ + * { + * "group_id": 1, + * "group_name": "group-azuread-test", + * "updated_at": "2021-01-03 22:27:15:000 -700" + * }, + * { + * "group_id": 2, + * "group_name": "group-azuread-test2", + * "updated_at": "2021-06-03 22:27:15:000 -700" + * } + * ] + */ + groups?: { + /** + * @description The internal ID of the group + * @example 1 + */ + group_id: number + /** + * @description The display name of the group + * @example group-azuread-test + */ + group_name: string + /** + * @description The time of the last update for this group + * @example 2019-06-03 22:27:15:000 -700 + */ + updated_at: string + }[] } /** * Org Hook @@ -9885,38 +9569,150 @@ export interface components { type: string } /** - * @description The type of GitHub user that can comment, open issues, or create pull requests while the interaction limit is in effect. Can be one of: `existing_users`, `contributors_only`, `collaborators_only`. - * @example collaborators_only - * @enum {string} + * Org Membership + * @description Org Membership */ - 'interaction-group': 'existing_users' | 'contributors_only' | 'collaborators_only' + 'org-membership': { + /** + * Format: uri + * @example https://api.github.com/orgs/octocat/memberships/defunkt + */ + url: string + /** + * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. + * @example active + * @enum {string} + */ + state: 'active' | 'pending' + /** + * @description The user's membership type in the organization. + * @example admin + * @enum {string} + */ + role: 'admin' | 'member' | 'billing_manager' + /** + * Format: uri + * @example https://api.github.com/orgs/octocat + */ + organization_url: string + organization: components['schemas']['organization-simple'] + user: components['schemas']['nullable-simple-user'] + permissions?: { + can_create_repository: boolean + } + } /** - * Interaction Limits - * @description Interaction limit settings. + * Migration + * @description A migration. */ - 'interaction-limit-response': { - limit: components['schemas']['interaction-group'] - /** @example repository */ - origin: string + migration: { + /** @example 79 */ + id: number + owner: components['schemas']['nullable-simple-user'] + /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ + guid: string + /** @example pending */ + state: string + /** @example true */ + lock_repositories: boolean + exclude_metadata: boolean + exclude_git_data: boolean + exclude_attachments: boolean + exclude_releases: boolean + exclude_owner_projects: boolean + org_metadata_only: boolean + repositories: components['schemas']['repository'][] + /** + * Format: uri + * @example https://api.github.com/orgs/octo-org/migrations/79 + */ + url: string /** * Format: date-time - * @example 2018-08-17T04:18:39Z + * @example 2015-07-06T15:33:38-07:00 */ - expires_at: string + created_at: string + /** + * Format: date-time + * @example 2015-07-06T15:33:38-07:00 + */ + updated_at: string + node_id: string + /** Format: uri */ + archive_url?: string + exclude?: unknown[] + } + 'org-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string + allow_downstream_configuration?: boolean } /** - * @description The duration of the interaction restriction. Can be one of: `one_day`, `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`. - * @example one_month - * @enum {string} - */ - 'interaction-expiry': 'one_day' | 'three_days' | 'one_week' | 'one_month' | 'six_months' - /** - * Interaction Restrictions - * @description Limit interactions to a specific type of user for a specified duration + * Project + * @description Projects are a way to organize columns and cards of work. */ - 'interaction-limit': { - limit: components['schemas']['interaction-group'] - expiry?: components['schemas']['interaction-expiry'] + project: { + /** + * Format: uri + * @example https://api.github.com/repos/api-playground/projects-test + */ + owner_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604 + */ + url: string + /** + * Format: uri + * @example https://github.com/api-playground/projects-test/projects/12 + */ + html_url: string + /** + * Format: uri + * @example https://api.github.com/projects/1002604/columns + */ + columns_url: string + /** @example 1002604 */ + id: number + /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ + node_id: string + /** + * @description Name of the project + * @example Week One Sprint + */ + name: string + /** + * @description Body of the project + * @example This project represents the sprint of the first week in January + */ + body: string | null + /** @example 1 */ + number: number + /** + * @description State of the project; either 'open' or 'closed' + * @example open + */ + state: string + creator: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @example 2011-04-10T20:09:31Z + */ + created_at: string + /** + * Format: date-time + * @example 2014-03-03T18:58:10Z + */ + updated_at: string + /** + * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. + * @enum {string} + */ + organization_permission?: 'read' | 'write' | 'admin' | 'none' + /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ + private?: boolean } /** * Team Simple @@ -10008,496 +9804,134 @@ export interface components { parent: components['schemas']['nullable-team-simple'] } /** - * Org Membership - * @description Org Membership + * Team Organization + * @description Team Organization */ - 'org-membership': { + 'team-organization': { + /** @example github */ + login: string + /** @example 1 */ + id: number + /** @example MDEyOk9yZ2FuaXphdGlvbjE= */ + node_id: string /** * Format: uri - * @example https://api.github.com/orgs/octocat/memberships/defunkt + * @example https://api.github.com/orgs/github */ url: string - /** - * @description The state of the member in the organization. The `pending` state indicates the user has not yet accepted an invitation. - * @example active - * @enum {string} - */ - state: 'active' | 'pending' - /** - * @description The user's membership type in the organization. - * @example admin - * @enum {string} - */ - role: 'admin' | 'member' | 'billing_manager' - /** - * Format: uri - * @example https://api.github.com/orgs/octocat - */ - organization_url: string - organization: components['schemas']['organization-simple'] - user: components['schemas']['nullable-simple-user'] - permissions?: { - can_create_repository: boolean - } - } - /** - * Migration - * @description A migration. - */ - migration: { - /** @example 79 */ - id: number - owner: components['schemas']['nullable-simple-user'] - /** @example 0b989ba4-242f-11e5-81e1-c7b6966d2516 */ - guid: string - /** @example pending */ - state: string - /** @example true */ - lock_repositories: boolean - exclude_metadata: boolean - exclude_git_data: boolean - exclude_attachments: boolean - exclude_releases: boolean - exclude_owner_projects: boolean - repositories: components['schemas']['repository'][] - /** - * Format: uri - * @example https://api.github.com/orgs/octo-org/migrations/79 - */ - url: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - created_at: string - /** - * Format: date-time - * @example 2015-07-06T15:33:38-07:00 - */ - updated_at: string - node_id: string - /** Format: uri */ - archive_url?: string - exclude?: unknown[] - } - /** - * Minimal Repository - * @description Minimal Repository - */ - 'nullable-minimal-repository': { - /** @example 1296269 */ - id: number - /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ - node_id: string - /** @example Hello-World */ - name: string - /** @example octocat/Hello-World */ - full_name: string - owner: components['schemas']['simple-user'] - private: boolean - /** - * Format: uri - * @example https://github.com/octocat/Hello-World - */ - html_url: string - /** @example This your first repo! */ - description: string | null - fork: boolean - /** - * Format: uri - * @example https://api.github.com/repos/octocat/Hello-World - */ - url: string - /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ - archive_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ - assignees_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ - blobs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ - branches_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ - collaborators_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ - comments_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ - commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ - compare_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ - contents_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/contributors - */ - contributors_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/deployments - */ - deployments_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/downloads + * @example https://api.github.com/orgs/github/repos */ - downloads_url: string + repos_url: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/events + * @example https://api.github.com/orgs/github/events */ events_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/forks - */ - forks_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ - git_commits_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ - git_refs_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ - git_tags_url: string - git_url?: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ - issue_comment_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ - issue_events_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + /** @example https://api.github.com/orgs/github/hooks */ + hooks_url: string + /** @example https://api.github.com/orgs/github/issues */ issues_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ - keys_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ - labels_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/languages - */ - languages_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/merges - */ - merges_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ - milestones_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ - notifications_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ - pulls_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ - releases_url: string - ssh_url?: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/stargazers - */ - stargazers_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ - statuses_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscribers - */ - subscribers_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/subscription - */ - subscription_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/tags - */ - tags_url: string - /** - * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/teams - */ - teams_url: string - /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ - trees_url: string - clone_url?: string - mirror_url?: string | null + /** @example https://api.github.com/orgs/github/members{/member} */ + members_url: string + /** @example https://api.github.com/orgs/github/public_members{/member} */ + public_members_url: string + /** @example https://github.com/images/error/octocat_happy.gif */ + avatar_url: string + /** @example A great organization */ + description: string | null + /** @example github */ + name?: string + /** @example GitHub */ + company?: string /** * Format: uri - * @example http://api.github.com/repos/octocat/Hello-World/hooks - */ - 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 - /** - * Format: date-time - * @example 2011-01-26T19:06:43Z - */ - pushed_at?: string | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z + * @example https://github.com/blog */ - created_at?: string | null + blog?: string + /** @example San Francisco */ + location?: string /** - * Format: date-time - * @example 2011-01-26T19:14:43Z + * Format: email + * @example octocat@github.com */ - updated_at?: string | null - permissions?: { - admin?: boolean - maintain?: boolean - push?: boolean - triage?: boolean - pull?: boolean - } - /** @example admin */ - role_name?: string - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - delete_branch_on_merge?: boolean - subscribers_count?: number - network_count?: number - code_of_conduct?: components['schemas']['code-of-conduct'] - license?: { - key?: string - name?: string - spdx_id?: string - url?: string - node_id?: string - } | null - /** @example 0 */ - forks?: number - /** @example 0 */ - open_issues?: number + email?: string + /** @example github */ + twitter_username?: string | null + /** @example true */ + is_verified?: boolean + /** @example true */ + has_organization_projects: boolean + /** @example true */ + has_repository_projects: boolean + /** @example 2 */ + public_repos: number + /** @example 1 */ + public_gists: number + /** @example 20 */ + followers: number /** @example 0 */ - watchers?: number - allow_forking?: boolean - } | null - /** - * Package - * @description A software package - */ - package: { - /** - * @description Unique identifier of the package. - * @example 1 - */ - id: number - /** - * @description The name of the package. - * @example super-linter - */ - name: string - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @example https://api.github.com/orgs/github/packages/container/super-linter */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - html_url: string - /** - * @description The number of versions of the package. - * @example 1 - */ - version_count: number - /** - * @example private - * @enum {string} - */ - visibility: 'private' | 'public' - owner?: components['schemas']['nullable-simple-user'] - repository?: components['schemas']['nullable-minimal-repository'] - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - } - /** - * Package Version - * @description A version of a software package - */ - 'package-version': { - /** - * @description Unique identifier of the package version. - * @example 1 - */ - id: number - /** - * @description The name of the package version. - * @example latest - */ - name: string - /** @example https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 */ - url: string - /** @example https://github.com/orgs/github/packages/container/package/super-linter */ - package_html_url: string - /** @example https://github.com/orgs/github/packages/container/super-linter/786068 */ - html_url?: string - /** @example MIT */ - license?: string - description?: string - /** - * Format: date-time - * @example 2011-04-10T20:09:31Z - */ - created_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - updated_at: string - /** - * Format: date-time - * @example 2014-03-03T18:58:10Z - */ - deleted_at?: string - /** Package Version Metadata */ - metadata?: { - /** - * @example docker - * @enum {string} - */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** Container Metadata */ - container?: { - tags: string[] - } - /** Docker Metadata */ - docker?: { - tag?: string[] - } & { - tags: unknown - } - } - } - /** - * Project - * @description Projects are a way to organize columns and cards of work. - */ - project: { - /** - * Format: uri - * @example https://api.github.com/repos/api-playground/projects-test - */ - owner_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604 - */ - url: string + following: number /** * Format: uri - * @example https://github.com/api-playground/projects-test/projects/12 + * @example https://github.com/octocat */ html_url: string - /** - * Format: uri - * @example https://api.github.com/projects/1002604/columns - */ - columns_url: string - /** @example 1002604 */ - id: number - /** @example MDc6UHJvamVjdDEwMDI2MDQ= */ - node_id: string - /** - * @description Name of the project - * @example Week One Sprint - */ - name: string - /** - * @description Body of the project - * @example This project represents the sprint of the first week in January - */ - body: string | null - /** @example 1 */ - number: number - /** - * @description State of the project; either 'open' or 'closed' - * @example open - */ - state: string - creator: components['schemas']['nullable-simple-user'] /** * Format: date-time - * @example 2011-04-10T20:09:31Z + * @example 2008-01-14T04:33:35Z */ created_at: string + /** @example Organization */ + type: string + /** @example 100 */ + total_private_repos?: number + /** @example 100 */ + owned_private_repos?: number + /** @example 81 */ + private_gists?: number | null + /** @example 10000 */ + disk_usage?: number | null + /** @example 8 */ + collaborators?: number | null /** - * Format: date-time - * @example 2014-03-03T18:58:10Z + * Format: email + * @example org@example.com */ + billing_email?: string | null + plan?: { + name: string + space: number + private_repos: number + filled_seats?: number + seats?: number + } + default_repository_permission?: string | null + /** @example true */ + members_can_create_repositories?: boolean | null + /** @example true */ + two_factor_requirement_enabled?: boolean | null + /** @example all */ + members_allowed_repository_creation_type?: string + /** @example true */ + members_can_create_public_repositories?: boolean + /** @example true */ + members_can_create_private_repositories?: boolean + /** @example true */ + members_can_create_internal_repositories?: boolean + /** @example true */ + members_can_create_pages?: boolean + /** @example true */ + members_can_create_public_pages?: boolean + /** @example true */ + members_can_create_private_pages?: boolean + /** @example false */ + members_can_fork_private_repositories?: boolean | null + /** @example false */ + web_commit_signoff_required?: boolean + /** Format: date-time */ updated_at: string - /** - * @description The baseline permission that all organization members have on this project. Only present if owner is an organization. - * @enum {string} - */ - organization_permission?: 'read' | 'write' | 'admin' | 'none' - /** @description Whether or not this project can be seen by everyone. Only present if owner is an organization. */ - private?: boolean - } - /** - * GroupMapping - * @description External Groups to be mapped to a team for membership - */ - 'group-mapping': { - /** - * @description Array of groups to be mapped to this team - * @example [ - * { - * "group_id": "111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa", - * "group_name": "saml-azuread-test", - * "group_description": "A group of Developers working on AzureAD SAML SSO" - * }, - * { - * "group_id": "2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2", - * "group_name": "saml-azuread-test2", - * "group_description": "Another group of Developers working on AzureAD SAML SSO" - * } - * ] - */ - groups?: { - /** - * @description The ID of the group - * @example 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - */ - group_id: string - /** - * @description The name of the group - * @example saml-azuread-test - */ - group_name: string - /** - * @description a description of the group - * @example A group of Developers working on AzureAD SAML SSO - */ - group_description: string - /** - * @description synchronization status for this group mapping - * @example unsynced - */ - status?: string - /** - * @description the time of the last sync for this group-mapping - * @example 2019-06-03 22:27:15:000 -700 - */ - synced_at?: string | null - }[] } /** * Full Team @@ -10564,7 +9998,7 @@ export interface components { * @example 2017-08-17T12:37:15Z */ updated_at: string - organization: components['schemas']['organization-full'] + organization: components['schemas']['team-organization'] /** * @description Distinguished Name (DN) that team maps to within LDAP environment * @example uid=example,ou=users,dc=github,dc=com @@ -10772,10 +10206,10 @@ export interface components { } } /** - * Team Repository - * @description A team's access to a repository. + * Repository + * @description A git repository */ - 'team-repository': { + 'nullable-repository': { /** * @description Unique identifier of the repository * @example 42 @@ -10791,6 +10225,7 @@ export interface components { /** @example octocat/Hello-World */ full_name: string license: components['schemas']['nullable-license-simple'] + organization?: components['schemas']['nullable-simple-user'] forks: number permissions?: { admin: boolean @@ -10799,9 +10234,7 @@ export interface components { push: boolean maintain?: boolean } - /** @example admin */ - role_name?: string - owner: components['schemas']['nullable-simple-user'] + owner: components['schemas']['simple-user'] /** * @description Whether the repository is private or public. * @default false @@ -10959,7 +10392,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** * @description The default branch of the repository. @@ -11033,28 +10469,522 @@ export interface components { * @example true */ allow_rebase_merge?: boolean - template_repository?: components['schemas']['nullable-repository'] - temp_clone_token?: string - /** - * @description Whether to allow squash merges for pull requests. - * @default true - * @example true - */ - allow_squash_merge?: boolean - /** - * @description Whether to allow Auto-merge to be used on pull requests. - * @default false - * @example false - */ - allow_auto_merge?: boolean - /** - * @description Whether to delete head branches when pull requests are merged - * @default false - * @example false - */ - delete_branch_on_merge?: boolean - /** - * @description Whether to allow merge commits for pull requests. + 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 + maintain?: boolean + push?: boolean + triage?: boolean + pull?: boolean + } + allow_rebase_merge?: boolean + temp_clone_token?: string + allow_squash_merge?: boolean + allow_auto_merge?: boolean + delete_branch_on_merge?: boolean + allow_update_branch?: boolean + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + allow_merge_commit?: boolean + subscribers_count?: number + network_count?: number + } | null + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging. + * @default false + * @example false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** + * @description Whether to allow merge commits for pull requests. + * @default true + * @example true + */ + allow_merge_commit?: boolean + /** @description Whether to allow forking this repo */ + allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + */ + web_commit_signoff_required?: boolean + subscribers_count?: number + network_count?: number + open_issues: number + watchers: number + master_branch?: string + /** @example "2020-07-09T00:17:42Z" */ + starred_at?: string + /** @description Whether anonymous git access is enabled for this repository */ + anonymous_access_enabled?: boolean + } | null + /** + * Team Repository + * @description A team's access to a repository. + */ + 'team-repository': { + /** + * @description Unique identifier of the repository + * @example 42 + */ + id: number + /** @example MDEwOlJlcG9zaXRvcnkxMjk2MjY5 */ + node_id: string + /** + * @description The name of the repository. + * @example Team Environment + */ + name: string + /** @example octocat/Hello-World */ + full_name: string + license: components['schemas']['nullable-license-simple'] + forks: number + permissions?: { + admin: boolean + pull: boolean + triage?: boolean + push: boolean + maintain?: boolean + } + /** @example admin */ + role_name?: string + owner: components['schemas']['nullable-simple-user'] + /** + * @description Whether the repository is private or public. + * @default false + */ + private: boolean + /** + * Format: uri + * @example https://github.com/octocat/Hello-World + */ + html_url: string + /** @example This your first repo! */ + description: string | null + fork: boolean + /** + * Format: uri + * @example https://api.github.com/repos/octocat/Hello-World + */ + url: string + /** @example http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} */ + archive_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/assignees{/user} */ + assignees_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} */ + blobs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/branches{/branch} */ + branches_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} */ + collaborators_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/comments{/number} */ + comments_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/commits{/sha} */ + commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} */ + compare_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/contents/{+path} */ + contents_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/contributors + */ + contributors_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/deployments + */ + deployments_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/downloads + */ + downloads_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/events + */ + events_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/forks + */ + forks_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} */ + git_commits_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} */ + git_refs_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} */ + git_tags_url: string + /** @example git:github.com/octocat/Hello-World.git */ + git_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} */ + issue_comment_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues/events{/number} */ + issue_events_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/issues{/number} */ + issues_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/keys{/key_id} */ + keys_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/labels{/name} */ + labels_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/languages + */ + languages_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/merges + */ + merges_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/milestones{/number} */ + milestones_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} */ + notifications_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/pulls{/number} */ + pulls_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/releases{/id} */ + releases_url: string + /** @example git@github.com:octocat/Hello-World.git */ + ssh_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/stargazers + */ + stargazers_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/statuses/{sha} */ + statuses_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscribers + */ + subscribers_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/subscription + */ + subscription_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/tags + */ + tags_url: string + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/teams + */ + teams_url: string + /** @example http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} */ + trees_url: string + /** @example https://github.com/octocat/Hello-World.git */ + clone_url: string + /** + * Format: uri + * @example git:git.example.com/octocat/Hello-World + */ + mirror_url: string | null + /** + * Format: uri + * @example http://api.github.com/repos/octocat/Hello-World/hooks + */ + hooks_url: string + /** + * Format: uri + * @example https://svn.github.com/octocat/Hello-World + */ + svn_url: string + /** + * Format: uri + * @example https://github.com + */ + homepage: string | null + language: string | null + /** @example 9 */ + forks_count: number + /** @example 80 */ + stargazers_count: number + /** @example 80 */ + watchers_count: number + /** @example 108 */ + size: number + /** + * @description The default branch of the repository. + * @example master + */ + default_branch: string + /** @example 0 */ + open_issues_count: number + /** + * @description Whether this repository acts as a template that can be used to generate new repositories. + * @default false + * @example true + */ + is_template?: boolean + topics?: string[] + /** + * @description Whether issues are enabled. + * @default true + * @example true + */ + has_issues: boolean + /** + * @description Whether projects are enabled. + * @default true + * @example true + */ + has_projects: boolean + /** + * @description Whether the wiki is enabled. + * @default true + * @example true + */ + has_wiki: boolean + has_pages: boolean + /** + * @description Whether downloads are enabled. + * @default true + * @example true + */ + has_downloads: boolean + /** + * @description Whether the repository is archived. + * @default false + */ + archived: boolean + /** @description Returns whether or not this repository disabled. */ + disabled: boolean + /** + * @description The repository visibility: public, private, or internal. + * @default public + */ + visibility?: string + /** + * Format: date-time + * @example 2011-01-26T19:06:43Z + */ + pushed_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:01:12Z + */ + created_at: string | null + /** + * Format: date-time + * @example 2011-01-26T19:14:43Z + */ + updated_at: string | null + /** + * @description Whether to allow rebase merges for pull requests. + * @default true + * @example true + */ + allow_rebase_merge?: boolean + template_repository?: components['schemas']['nullable-repository'] + temp_clone_token?: string + /** + * @description Whether to allow squash merges for pull requests. + * @default true + * @example true + */ + allow_squash_merge?: boolean + /** + * @description Whether to allow Auto-merge to be used on pull requests. + * @default false + * @example false + */ + allow_auto_merge?: boolean + /** + * @description Whether to delete head branches when pull requests are merged + * @default false + * @example false + */ + delete_branch_on_merge?: boolean + /** + * @description Whether to allow merge commits for pull requests. * @default true * @example true */ @@ -11065,6 +10995,12 @@ export interface components { * @example false */ allow_forking?: boolean + /** + * @description Whether to require contributors to sign off on web-based commits + * @default false + * @example false + */ + web_commit_signoff_required?: boolean subscribers_count?: number network_count?: number open_issues: number @@ -11219,6 +11155,20 @@ export interface components { */ html_url: string | null } + 'security-and-analysis': { + advanced_security?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + secret_scanning_push_protection?: { + /** @enum {string} */ + status?: 'enabled' | 'disabled' + } + } | null /** * Full Repository * @description Full Repository @@ -11386,7 +11336,10 @@ export interface components { stargazers_count: number /** @example 80 */ watchers_count: number - /** @example 108 */ + /** + * @description The size of the repository. Size is calculated hourly. When a repository is initially created, the size is 0. + * @example 108 + */ size: number /** @example master */ default_branch: string @@ -11455,7 +11408,51 @@ export interface components { /** @example true */ allow_merge_commit?: boolean /** @example true */ + allow_update_branch?: boolean + /** @example false */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @example PR_TITLE + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @example PR_TITLE + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @example PR_BODY + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' + /** @example true */ allow_forking?: boolean + /** @example false */ + web_commit_signoff_required?: boolean /** @example 42 */ subscribers_count: number /** @example 0 */ @@ -11474,16 +11471,7 @@ export interface components { */ anonymous_access_enabled?: boolean code_of_conduct?: components['schemas']['code-of-conduct-simple'] - security_and_analysis?: { - advanced_security?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - secret_scanning?: { - /** @enum {string} */ - status?: 'enabled' | 'disabled' - } - } | null + security_and_analysis?: components['schemas']['security-and-analysis'] } /** * Artifact @@ -11516,12 +11504,35 @@ export interface components { expires_at: string | null /** Format: date-time */ updated_at: string | null + workflow_run?: { + /** @example 10 */ + id?: number + /** @example 42 */ + repository_id?: number + /** @example 42 */ + head_repository_id?: number + /** @example main */ + head_branch?: string + /** @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ + head_sha?: string + } | null } /** - * Job - * @description Information of a job execution in a workflow run + * Actions cache usage policy for repository + * @description GitHub Actions cache usage policy for repository. */ - job: { + 'actions-cache-usage-policy-for-repository': { + /** + * @description The size limit for the sum of all caches, in gigabytes. + * @example 14 + */ + repo_cache_size_limit_in_gb: number + } + /** + * Job + * @description Information of a job execution in a workflow run + */ + job: { /** * @description The id of the job. * @example 21 @@ -11559,8 +11570,9 @@ export interface components { /** * @description The outcome of the job. * @example success + * @enum {string|null} */ - conclusion: string | null + conclusion: ('success' | 'failure' | 'neutral' | 'cancelled' | 'skipped' | 'timed_out' | 'action_required') | null /** * Format: date-time * @description The time that the job started, in ISO 8601 format. @@ -11650,6 +11662,23 @@ export interface components { allowed_actions?: components['schemas']['allowed-actions'] selected_actions_url?: components['schemas']['selected-actions-url'] } + 'actions-workflow-access-to-repository': { + /** + * @description Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + * repository. `none` means access is only possible from workflows in this repository. + * @enum {string} + */ + access_level: 'none' | 'organization' | 'enterprise' + } + /** + * Referenced workflow + * @description A workflow referenced/reused by the initial caller workflow + */ + 'referenced-workflow': { + path: string + sha: string + ref?: string + } /** Pull Request Minimal */ 'pull-request-minimal': { id: number @@ -11723,10 +11752,15 @@ export interface components { /** @example master */ head_branch: string | null /** - * @description The SHA of the head commit that points to the version of the worflow being run. + * @description The SHA of the head commit that points to the version of the workflow being run. * @example 009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d */ head_sha: string + /** + * @description The full path of the workflow + * @example octocat/octo-repo/.github/workflows/ci.yml@main + */ + path: string /** * @description The auto incrementing run number for the workflow run. * @example 106 @@ -11737,6 +11771,7 @@ export interface components { * @example 1 */ run_attempt?: number + referenced_workflows?: components['schemas']['referenced-workflow'][] | null /** @example push */ event: string /** @example completed */ @@ -11760,6 +11795,8 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string + actor?: components['schemas']['simple-user'] + triggering_actor?: components['schemas']['simple-user'] /** * Format: date-time * @description The start time of the latest run. Resets on re-run. @@ -11810,6 +11847,8 @@ export interface components { head_repository: components['schemas']['minimal-repository'] /** @example 5 */ head_repository_id?: number + } & { + display_title: unknown } /** * Environment Approval @@ -11861,7 +11900,7 @@ export interface components { comment: string } /** - * @description The type of reviewer. Must be one of: `User` or `Team` + * @description The type of reviewer. * @example User * @enum {string} */ @@ -11983,39 +12022,6 @@ export interface components { production_environment?: boolean performed_via_github_app?: components['schemas']['nullable-integration'] } - /** - * Workflow Run Usage - * @description Workflow Run Usage - */ - 'workflow-run-usage': { - billable: { - UBUNTU?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - MACOS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - WINDOWS?: { - total_ms: number - jobs: number - job_runs?: { - job_id: number - duration_ms: number - }[] - } - } - run_duration_ms?: number - } /** * Actions Secret * @description Set secrets for GitHub Actions. @@ -12071,23 +12077,6 @@ export interface components { */ deleted_at?: string } - /** - * Workflow Usage - * @description Workflow Usage - */ - 'workflow-usage': { - billable: { - UBUNTU?: { - total_ms?: number - } - MACOS?: { - total_ms?: number - } - WINDOWS?: { - total_ms?: number - } - } - } /** * Autolink reference * @description An autolink reference. @@ -12149,6 +12138,8 @@ export interface components { users?: components['schemas']['simple-user'][] /** @description The list of teams with review dismissal access. */ teams?: components['schemas']['team'][] + /** @description The list of apps with review dismissal access. */ + apps?: components['schemas']['integration'][] /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions" */ url?: string /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/users" */ @@ -12156,13 +12147,15 @@ export interface components { /** @example "https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams" */ teams_url?: string } - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of users allowed to bypass pull request requirements. */ users?: components['schemas']['simple-user'][] /** @description The list of teams allowed to bypass pull request requirements. */ teams?: components['schemas']['team'][] - } | null + /** @description The list of apps allowed to bypass pull request requirements. */ + apps?: components['schemas']['integration'][] + } /** @example true */ dismiss_stale_reviews: boolean /** @example true */ @@ -12292,6 +12285,9 @@ export interface components { allow_deletions?: { enabled?: boolean } + block_creations?: { + enabled?: boolean + } required_conversation_resolution?: { enabled?: boolean } @@ -12527,10 +12523,12 @@ export interface components { teams_url: string users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } bypass_pull_request_allowances?: { users: components['schemas']['simple-user'][] teams: components['schemas']['team'][] + apps?: components['schemas']['integration'][] } } required_signatures?: { @@ -12560,6 +12558,9 @@ export interface components { required_conversation_resolution?: { enabled?: boolean } + block_creations?: { + enabled: boolean + } } /** * Deployment @@ -12815,10 +12816,11 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule-summary'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] @@ -12831,16 +12833,17 @@ export interface components { html_url: components['schemas']['alert-html-url'] instances_url: components['schemas']['alert-instances-url'] state: components['schemas']['code-scanning-alert-state'] - fixed_at?: components['schemas']['code-scanning-alert-fixed-at'] + fixed_at?: components['schemas']['alert-fixed-at'] dismissed_by: components['schemas']['nullable-simple-user'] - dismissed_at: components['schemas']['code-scanning-alert-dismissed-at'] + dismissed_at: components['schemas']['alert-dismissed-at'] dismissed_reason: components['schemas']['code-scanning-alert-dismissed-reason'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] rule: components['schemas']['code-scanning-alert-rule'] tool: components['schemas']['code-scanning-analysis-tool'] most_recent_instance: components['schemas']['code-scanning-alert-instance'] } /** - * @description Sets the state of the code scanning alert. Can be one of `open` or `dismissed`. You must provide `dismissed_reason` when you set the state to `dismissed`. + * @description Sets the state of the code scanning alert. You must provide `dismissed_reason` when you set the state to `dismissed`. * @enum {string} */ 'code-scanning-alert-set-state': 'open' | 'dismissed' @@ -12904,7 +12907,7 @@ export interface components { */ confirm_delete_url: string | null } - /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." */ + /** @description A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/sarif-support-for-code-scanning)." */ 'code-scanning-analysis-sarif-file': string 'code-scanning-sarifs-receipt': { id?: components['schemas']['code-scanning-analysis-sarif-id'] @@ -12929,222 +12932,50 @@ export interface components { errors?: string[] | null } /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'nullable-codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null - } | null - /** - * Codespace - * @description A codespace. + * CODEOWNERS errors + * @description A list of errors found in a repo's CODEOWNERS file */ - codespace: { - /** @example 1 */ - id: number - /** - * @description Automatically generated name of this codespace. - * @example monalisa-octocat-hello-world-g4wpq6h95q - */ - name: string - /** - * @description UUID identifying this codespace's environment. - * @example 26a7c758-7299-4a73-b978-5a92a7ae98a0 - */ - environment_id: string | null - owner: components['schemas']['simple-user'] - billable_owner: components['schemas']['simple-user'] - repository: components['schemas']['minimal-repository'] - machine: components['schemas']['nullable-codespace-machine'] - /** - * @description Whether the codespace was created from a prebuild. - * @example false - */ - prebuild: boolean | null - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - created_at: string - /** - * Format: date-time - * @example 2011-01-26T19:01:12Z - */ - updated_at: string - /** - * Format: date-time - * @description Last known time this codespace was started. - * @example 2011-01-26T19:01:12Z - */ - last_used_at: string - /** - * @description State of this codespace. - * @example Available - * @enum {string} - */ - state: - | 'Unknown' - | 'Created' - | 'Queued' - | 'Provisioning' - | 'Available' - | 'Awaiting' - | 'Unavailable' - | 'Deleted' - | 'Moved' - | 'Shutdown' - | 'Archived' - | 'Starting' - | 'ShuttingDown' - | 'Failed' - | 'Exporting' - | 'Updating' - | 'Rebuilding' - /** - * Format: uri - * @description API URL for this codespace. - */ - url: string - /** @description Details about the codespace's git repository. */ - git_status: { + 'codeowners-errors': { + errors: { /** - * @description The number of commits the local repository is ahead of the remote. - * @example 0 + * @description The line number where this errors occurs. + * @example 7 */ - ahead?: number + line: number /** - * @description The number of commits the local repository is behind the remote. - * @example 0 + * @description The column number where this errors occurs. + * @example 3 */ - behind?: number - /** @description Whether the local repository has unpushed changes. */ - has_unpushed_changes?: boolean - /** @description Whether the local repository has uncommitted changes. */ - has_uncommitted_changes?: boolean + column: number /** - * @description The current branch (or SHA if in detached HEAD state) of the local repository. - * @example main + * @description The contents of the line where the error occurs. + * @example * user */ - ref?: string - } - /** - * @description The Azure region where this codespace is located. - * @example WestUs2 - * @enum {string} - */ - location: 'EastUs' | 'SouthEastAsia' | 'WestEurope' | 'WestUs2' - /** - * @description The number of minutes of inactivity after which this codespace will be automatically stopped. - * @example 60 - */ - idle_timeout_minutes: number | null - /** - * Format: uri - * @description URL to access this codespace on the web. - */ - web_url: string - /** - * Format: uri - * @description API URL to access available alternate machine types for this codespace. - */ - machines_url: string - /** - * Format: uri - * @description API URL to start this codespace. - */ - start_url: string - /** - * Format: uri - * @description API URL to stop this codespace. - */ - stop_url: string - /** - * Format: uri - * @description API URL for the Pull Request associated with this codespace, if any. - */ - pulls_url: string | null - recent_folders: string[] - runtime_constraints?: { - /** @description The privacy settings a user can select from when forwarding a port. */ - allowed_port_privacy_settings?: string[] | null - } - } - /** - * Codespace machine - * @description A description of the machine powering a codespace. - */ - 'codespace-machine': { - /** - * @description The name of the machine. - * @example standardLinux - */ - name: string - /** - * @description The display name of the machine includes cores, memory, and storage. - * @example 4 cores, 8 GB RAM, 64 GB storage - */ - display_name: string - /** - * @description The operating system of the machine. - * @example linux - */ - operating_system: string - /** - * @description How much storage is available to the codespace. - * @example 68719476736 - */ - storage_in_bytes: number - /** - * @description How much memory is available to the codespace. - * @example 8589934592 - */ - memory_in_bytes: number - /** - * @description How many cores are available to the codespace. - * @example 4 - */ - cpus: number - /** - * @description Whether a prebuild is currently available when creating a codespace for this machine and repository. If a branch was not specified as a ref, the default branch will be assumed. Value will be "null" if prebuilds are not supported or prebuild availability could not be determined. Value is the type of prebuild available, or "none" if none are available. - * @example blob - * @enum {string|null} - */ - prebuild_availability: ('none' | 'blob' | 'pool') | null + source?: string + /** + * @description The type of error. + * @example Invalid owner + */ + kind: string + /** + * @description Suggested action to fix the error. This will usually be `null`, but is provided for some common errors. + * @example The pattern `/` will never match anything, did you mean `*` instead? + */ + suggestion?: string | null + /** + * @description A human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting). + * @example Invalid owner on line 7: + * + * * user + * ^ + */ + message: string + /** + * @description The path of the file where the error occured. + * @example .github/CODEOWNERS + */ + path: string + }[] } /** * Collaborator @@ -13220,7 +13051,7 @@ export interface components { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } /** * Repository Invitation @@ -13331,7 +13162,7 @@ export interface components { admin: boolean } /** @example admin */ - role_name: string + role_name?: string } | null /** * Repository Collaborator Permission @@ -13364,7 +13195,7 @@ export interface components { created_at: string /** Format: date-time */ updated_at: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } /** @@ -13390,7 +13221,7 @@ export interface components { * Auto merge * @description The status of auto merging a pull request. */ - auto_merge: { + 'auto-merge': { enabled_by: components['schemas']['simple-user'] /** * @description The merge method to use. @@ -13532,8 +13363,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -13548,7 +13379,7 @@ export interface components { state: string context: string /** Format: uri */ - target_url: string + target_url: string | null required?: boolean | null /** Format: uri */ avatar_url: string | null @@ -13584,68 +13415,13 @@ export interface components { id: number node_id: string state: string - description: string - target_url: string + description: string | null + target_url: string | null context: string created_at: string updated_at: string creator: components['schemas']['nullable-simple-user'] } - /** - * Code Of Conduct Simple - * @description Code of Conduct Simple - */ - 'nullable-code-of-conduct-simple': { - /** - * Format: uri - * @example https://api.github.com/repos/github/docs/community/code_of_conduct - */ - url: string - /** @example citizen_code_of_conduct */ - key: string - /** @example Citizen Code of Conduct */ - name: string - /** - * Format: uri - * @example https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - */ - html_url: string | null - } | null - /** Community Health File */ - 'nullable-community-health-file': { - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - } | null - /** - * Community Profile - * @description Community Profile - */ - 'community-profile': { - /** @example 100 */ - health_percentage: number - /** @example My first repository on GitHub! */ - description: string | null - /** @example example.com */ - documentation: string | null - files: { - code_of_conduct: components['schemas']['nullable-code-of-conduct-simple'] - code_of_conduct_file: components['schemas']['nullable-community-health-file'] - license: components['schemas']['nullable-license-simple'] - contributing: components['schemas']['nullable-community-health-file'] - readme: components['schemas']['nullable-community-health-file'] - issue_template: components['schemas']['nullable-community-health-file'] - pull_request_template: components['schemas']['nullable-community-health-file'] - } - /** - * Format: date-time - * @example 2017-02-28T19:09:29Z - */ - updated_at: string | null - /** @example true */ - content_reports_enabled?: boolean - } /** * Commit Comparison * @description Commit Comparison @@ -13751,7 +13527,8 @@ export interface components { * @description A list of directory items */ 'content-directory': { - type: string + /** @enum {string} */ + type: 'dir' | 'file' | 'submodule' | 'symlink' size: number name: string path: string @@ -13779,7 +13556,8 @@ export interface components { * @description Content File */ 'content-file': { - type: string + /** @enum {string} */ + type: 'file' encoding: string size: number name: string @@ -13812,7 +13590,8 @@ export interface components { * @description An object describing a symlink */ 'content-symlink': { - type: string + /** @enum {string} */ + type: 'symlink' target: string size: number name: string @@ -13836,11 +13615,12 @@ export interface components { } } /** - * Symlink Content - * @description An object describing a symlink + * Submodule Content + * @description An object describing a submodule */ 'content-submodule': { - type: string + /** @enum {string} */ + type: 'submodule' /** Format: uri */ submodule_git_url: string size: number @@ -13968,6 +13748,38 @@ export interface components { /** Format: date-time */ updated_at: string } + /** + * Dependency Graph Diff + * @description A diff of the dependencies between two commits. + */ + 'dependency-graph-diff': { + /** @enum {string} */ + change_type: 'added' | 'removed' + /** @example path/to/package-lock.json */ + manifest: string + /** @example npm */ + ecosystem: string + /** @example @actions/core */ + name: string + /** @example 1.0.0 */ + version: string + /** @example pkg:/npm/%40actions/core@1.1.0 */ + package_url: string | null + /** @example MIT */ + license: string | null + /** @example https://github.com/github/actions */ + source_repository_url: string | null + vulnerabilities: { + /** @example critical */ + severity: string + /** @example GHSA-rf4j-j272-fj86 */ + advisory_ghsa_id: string + /** @example A summary of the advisory. */ + advisory_summary: string + /** @example https://github.com/advisories/GHSA-rf4j-j272-fj86 */ + advisory_url: string + }[] + }[] /** * Deployment Status * @description The status of a deployment. @@ -14050,7 +13862,7 @@ export interface components { */ 'wait-timer': number /** @description The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. */ - deployment_branch_policy: { + 'deployment-branch-policy-settings': { /** @description Whether only branches with branch protection rules can deploy to this environment. If `protected_branches` is `true`, `custom_branch_policies` must be `false`; if `protected_branches` is `false`, `custom_branch_policies` must be `true`. */ protected_branches: boolean /** @description Whether only branches that match the specified name patterns can deploy to this environment. If `custom_branch_policies` is `true`, `protected_branches` must be `false`; if `custom_branch_policies` is `false`, `protected_branches` must be `true`. */ @@ -14121,7 +13933,36 @@ export interface components { type: string } )[] - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } + /** + * Deployment branch policy + * @description Details of a deployment branch policy. + */ + 'deployment-branch-policy': { + /** + * @description The unique identifier of the branch policy. + * @example 361471 + */ + id?: number + /** @example MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= */ + node_id?: string + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * @example release/* + */ + name?: string + } + /** Deployment branch policy name pattern */ + 'deployment-branch-policy-name-pattern': { + /** + * @description The name pattern that branches must match in order to deploy to the environment. + * + * Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*\/*`. + * For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + * @example release/* + */ + name: string } /** * Short Blob @@ -14438,86 +14279,6 @@ export interface components { deliveries_url?: string last_response: components['schemas']['hook-response'] } - /** - * Import - * @description A repository import from an external source. - */ - import: { - vcs: string | null - use_lfs?: boolean - /** @description The URL of the originating repository. */ - vcs_url: string - svc_root?: string - tfvc_project?: string - /** @enum {string} */ - status: - | 'auth' - | 'error' - | 'none' - | 'detecting' - | 'choose' - | 'auth_failed' - | 'importing' - | 'mapping' - | 'waiting_to_push' - | 'pushing' - | 'complete' - | 'setup' - | 'unknown' - | 'detection_found_multiple' - | 'detection_found_nothing' - | 'detection_needs_auth' - status_text?: string | null - 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 - }[] - message?: string - authors_count?: number | null - /** Format: uri */ - url: string - /** Format: uri */ - html_url: string - /** Format: uri */ - authors_url: string - /** Format: uri */ - repository_url: string - svn_root?: string - } - /** - * Porter Author - * @description Porter Author - */ - 'porter-author': { - id: number - remote_id: string - remote_name: string - email: string - name: string - /** Format: uri */ - url: string - /** Format: uri */ - import_url: string - } - /** - * Porter Large File - * @description Porter Large File - */ - 'porter-large-file': { - ref_name: string - path: string - oid: string - size: number - } /** * Issue * @description Issues are a great way to keep track of tasks, enhancements, and bugs for your projects. @@ -14550,6 +14311,12 @@ export interface components { * @example open */ state: string + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'reopened' | 'not_planned') | null /** * @description Title of the issue * @example Widget creation fails in Safari on OS X 10.8 @@ -14614,7 +14381,7 @@ export interface components { timeline_url?: string repository?: components['schemas']['repository'] performed_via_github_app?: components['schemas']['nullable-integration'] - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] reactions?: components['schemas']['reaction-rollup'] } | null /** @@ -14698,7 +14465,7 @@ export interface components { 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'] + author_association?: components['schemas']['author-association'] lock_reason?: string | null performed_via_github_app?: components['schemas']['nullable-integration'] } @@ -15097,7 +14864,7 @@ export interface components { updated_at: string /** Format: uri */ issue_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] performed_via_github_app?: components['schemas']['nullable-integration'] reactions?: components['schemas']['reaction-rollup'] } @@ -15251,7 +15018,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Pull Request Review Comment @@ -15289,12 +15056,12 @@ export interface components { */ path: string /** - * @description The line index in the diff to which the comment applies. + * @description The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. * @example 1 */ position: number /** - * @description The index of the original line in the diff to which the comment applies. + * @description The index of the original line in the diff to which the comment applies. This field is deprecated; use `original_line` instead. * @example 4 */ original_position: number @@ -15341,7 +15108,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: { /** @@ -15454,6 +15221,22 @@ export interface components { performed_via_github_app: components['schemas']['nullable-integration'] assignee: components['schemas']['simple-user'] } + /** + * State Change Issue Event + * @description State Change Issue Event + */ + 'state-change-issue-event': { + 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 + performed_via_github_app: components['schemas']['nullable-integration'] + state_reason?: string | null + } /** * Timeline Event * @description Timeline Event @@ -15480,6 +15263,7 @@ export interface components { | components['schemas']['timeline-commit-commented-event'] | components['schemas']['timeline-assigned-issue-event'] | components['schemas']['timeline-unassigned-issue-event'] + | components['schemas']['state-change-issue-event'] /** * Deploy Key * @description An SSH key granting access to a single repository. @@ -15689,6 +15473,12 @@ export interface components { * @example https://example.com */ html_url?: string + /** + * @description The process in which the Page will be built. + * @example legacy + * @enum {string|null} + */ + build_type?: ('legacy' | 'workflow') | null source?: components['schemas']['pages-source-hash'] /** * @description Whether the GitHub Pages site is publicly visible. If set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. @@ -15734,71 +15524,11 @@ export interface components { /** @example queued */ status: string } - /** - * Pages Health Check Status - * @description Pages Health Check Status - */ - 'pages-health-check': { - domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } - alt_domain?: { - host?: string - uri?: string - nameservers?: string - dns_resolves?: boolean - is_proxied?: boolean | null - is_cloudflare_ip?: boolean | null - is_fastly_ip?: boolean | null - is_old_ip_address?: boolean | null - is_a_record?: boolean | null - has_cname_record?: boolean | null - has_mx_records_present?: boolean | null - is_valid_domain?: boolean - is_apex_domain?: boolean - should_be_a_record?: boolean | null - is_cname_to_github_user_domain?: boolean | null - is_cname_to_pages_dot_github_dot_com?: boolean | null - is_cname_to_fastly?: boolean | null - is_pointed_to_github_pages_ip?: boolean | null - is_non_github_pages_ip_present?: boolean | null - is_pages_domain?: boolean - is_served_by_pages?: boolean | null - is_valid?: boolean - reason?: string | null - responds_to_https?: boolean - enforces_https?: boolean - https_error?: string | null - is_https_eligible?: boolean | null - caa_error?: string | null - } | null + 'repository-pre-receive-hook': { + id?: number + name?: string + enforcement?: string + configuration_url?: string } /** * Team Simple @@ -16123,6 +15853,7 @@ export interface components { updated_at: string allow_forking?: boolean is_template?: boolean + web_commit_signoff_required?: boolean } | null sha: string user: { @@ -16296,6 +16027,7 @@ export interface components { /** Format: date-time */ updated_at: string allow_forking?: boolean + web_commit_signoff_required?: boolean } sha: string user: { @@ -16337,8 +16069,8 @@ export interface components { review_comment: components['schemas']['link'] self: components['schemas']['link'] } - author_association: components['schemas']['author_association'] - auto_merge: components['schemas']['auto_merge'] + author_association: components['schemas']['author-association'] + auto_merge: components['schemas']['auto-merge'] /** * @description Indicates whether or not the pull request is a draft. * @example false @@ -16434,7 +16166,7 @@ export interface components { commit_id: string body_html?: string body_text?: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] } /** * Legacy Review Comment @@ -16489,7 +16221,7 @@ export interface components { * @example https://api.github.com/repos/octocat/Hello-World/pulls/1 */ pull_request_url: string - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] _links: { self: components['schemas']['link'] html: components['schemas']['link'] @@ -16611,11 +16343,6 @@ export interface components { body_html?: string body_text?: string mentions_count?: number - /** - * Format: uri - * @description The URL of the release discussion. - */ - discussion_url?: string reactions?: components['schemas']['reaction-rollup'] } /** @@ -16634,6 +16361,7 @@ export interface components { 'secret-scanning-alert': { number?: components['schemas']['alert-number'] created_at?: components['schemas']['alert-created-at'] + updated_at?: components['schemas']['alert-updated-at'] url?: components['schemas']['alert-url'] html_url?: components['schemas']['alert-html-url'] /** @@ -16651,8 +16379,21 @@ export interface components { resolved_by?: components['schemas']['nullable-simple-user'] /** @description The type of secret that secret scanning detected. */ secret_type?: string + /** + * @description User-friendly name for the detected secret, matching the `secret_type`. + * For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + */ + secret_type_display_name?: string /** @description The secret that was detected. */ secret?: string + /** @description Whether push protection was bypassed for the detected secret. */ + push_protection_bypassed?: boolean | null + push_protection_bypassed_by?: components['schemas']['nullable-simple-user'] + /** + * Format: date-time + * @description The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + push_protection_bypassed_at?: string | null } /** @description Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. */ 'secret-scanning-location-commit': { @@ -16812,6 +16553,22 @@ export interface components { tarball_url: string node_id: string } + /** + * Tag protection + * @description Tag protection + */ + 'tag-protection': { + /** @example 2 */ + id?: number + /** @example 2011-01-26T19:01:12Z */ + created_at?: string + /** @example 2011-01-26T19:01:12Z */ + updated_at?: string + /** @example true */ + enabled?: boolean + /** @example v1.* */ + pattern: string + } /** * Topic * @description A topic aggregates entities that are related to a subject. @@ -16819,61 +16576,6 @@ export interface components { topic: { names: string[] } - /** Traffic */ - traffic: { - /** Format: date-time */ - timestamp: string - uniques: number - count: number - } - /** - * Clone Traffic - * @description Clone Traffic - */ - 'clone-traffic': { - /** @example 173 */ - count: number - /** @example 128 */ - uniques: number - clones: components['schemas']['traffic'][] - } - /** - * Content Traffic - * @description Content Traffic - */ - 'content-traffic': { - /** @example /github/hubot */ - path: string - /** @example github/hubot: A customizable life embetterment robot. */ - title: string - /** @example 3542 */ - count: number - /** @example 2225 */ - uniques: number - } - /** - * Referrer Traffic - * @description Referrer Traffic - */ - 'referrer-traffic': { - /** @example Google */ - referrer: string - /** @example 4 */ - count: number - /** @example 3 */ - uniques: number - } - /** - * View Traffic - * @description View Traffic - */ - 'view-traffic': { - /** @example 14850 */ - count: number - /** @example 3782 */ - uniques: number - views: components['schemas']['traffic'][] - } 'scim-group-list-enterprise': { schemas: string[] totalResults: number @@ -16970,125 +16672,6 @@ export interface components { location?: string } } - /** - * SCIM /Users - * @description SCIM /Users provisioning endpoints - */ - 'scim-user': { - /** @description SCIM schema used. */ - schemas: string[] - /** - * @description Unique identifier of an external identity - * @example 1b78eada-9baa-11e6-9eb6-a431576d590e - */ - id: string - /** - * @description The ID of the User. - * @example a7b0f98395 - */ - externalId: string | null - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string | null - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string | null - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string | null - familyName: string | null - formatted?: string | null - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - value: string - primary?: boolean - }[] - /** - * @description The active status of the User. - * @example true - */ - active: boolean - meta: { - /** @example User */ - resourceType?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - created?: string - /** - * Format: date-time - * @example 2019-01-24T22:45:36.000Z - */ - lastModified?: string - /** - * Format: uri - * @example https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - */ - location?: string - } - /** @description The ID of the organization. */ - organization_id?: number - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - operations?: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: string | { [key: string]: unknown } | unknown[] - }[] - /** @description associated groups */ - groups?: { - value?: string - display?: string - }[] - } - /** - * SCIM User List - * @description SCIM User List - */ - 'scim-user-list': { - /** @description SCIM schema used. */ - schemas: string[] - /** @example 3 */ - totalResults: number - /** @example 10 */ - itemsPerPage: number - /** @example 1 */ - startIndex: number - Resources: components['schemas']['scim-user'][] - } /** Search Result Text Matches */ 'search-result-text-matches': { object_url?: string @@ -17207,6 +16790,7 @@ export interface components { description?: string | null }[] state: string + state_reason?: string | null assignee: components['schemas']['nullable-simple-user'] milestone: components['schemas']['nullable-milestone'] comments: number @@ -17231,7 +16815,7 @@ export interface components { } body?: string score: number - author_association: components['schemas']['author_association'] + author_association: components['schemas']['author-association'] draft?: boolean repository?: components['schemas']['repository'] body_html?: string @@ -17378,6 +16962,8 @@ export interface components { delete_branch_on_merge?: boolean allow_forking?: boolean is_template?: boolean + /** @example false */ + web_commit_signoff_required?: boolean } /** * Topic Search Result Item @@ -17474,6 +17060,163 @@ export interface components { /** Format: date-time */ suspended_at?: string | null } + 'configuration-status': { + status?: string + progress?: { + status: string + key: string + }[] + } + 'maintenance-status': { + status?: string + scheduled_time?: string + connection_services?: { + name: string + number: number + }[] + } + 'enterprise-settings': { + enterprise?: { + private_mode?: boolean + public_pages?: boolean + subdomain_isolation?: boolean + signup_enabled?: boolean + github_hostname?: string + identicons_host?: string + http_proxy?: string | null + auth_mode?: string + expire_sessions?: boolean + admin_password?: string | null + configuration_id?: number + configuration_run_count?: number + avatar?: { + enabled?: boolean + uri?: string + } + customer?: { + name?: string + email?: string + uuid?: string + secret_key_data?: string + public_key_data?: string + } + license?: { + seats?: number + evaluation?: boolean + perpetual?: boolean + unlimited_seating?: boolean + support_key?: string + ssh_allowed?: boolean + cluster_support?: boolean + expire_at?: string + } + github_ssl?: { + enabled?: boolean + cert?: string | null + key?: string | null + } + ldap?: { + host?: string | null + port?: number + base?: unknown[] + uid?: string | null + bind_dn?: string | null + password?: string | null + method?: string + search_strategy?: string + user_groups?: unknown[] + admin_group?: string | null + virtual_attribute_enabled?: boolean + recursive_group_search?: boolean + posix_support?: boolean + user_sync_emails?: boolean + user_sync_keys?: boolean + user_sync_interval?: number + team_sync_interval?: number + sync_enabled?: boolean + reconciliation?: { + user?: string | null + org?: string | null + } + profile?: { + uid?: string + name?: string | null + mail?: string | null + key?: string | null + } + } + cas?: { + url?: string | null + } + saml?: { + sso_url?: string | null + certificate?: string | null + certificate_path?: string | null + issuer?: string | null + idp_initiated_sso?: boolean + disable_admin_demote?: boolean + } + github_oauth?: { + client_id?: string + client_secret?: string + organization_name?: string + organization_team?: string + } + smtp?: { + enabled?: boolean + address?: string + authentication?: string + port?: string + domain?: string + username?: string + user_name?: string + enable_starttls_auto?: boolean + password?: string + 'discard-to-noreply-address'?: boolean + support_address?: string + support_address_type?: string + noreply_address?: string + } + ntp?: { + primary_server?: string + secondary_server?: string + } + timezone?: string | null + snmp?: { + enabled?: boolean + community?: string + } + syslog?: { + enabled?: boolean + server?: string | null + protocol_name?: string + } + assets?: string | null + pages?: { + enabled?: boolean + } + collectd?: { + enabled?: boolean + server?: string | null + port?: number + encryption?: string | null + username?: string | null + password?: string | null + } + mapping?: { + enabled?: boolean + tileserver?: string | null + basemap?: string + token?: string | null + } + load_balancer?: string | null + } + run_list?: string[] + } + 'ssh-key': { + key?: string + 'pretty-print'?: string + } /** * Private User * @description Private User @@ -17597,84 +17340,6 @@ export interface components { business_plus?: boolean ldap_dn?: string } - /** - * Codespaces Secret - * @description Secrets for a GitHub Codespace. - */ - 'codespaces-secret': { - /** - * @description The name of the secret. - * @example SECRET_NAME - */ - name: string - /** Format: date-time */ - created_at: string - /** Format: date-time */ - updated_at: string - /** - * @description Visibility of a secret - * @enum {string} - */ - visibility: 'all' | 'private' | 'selected' - /** - * Format: uri - * @example https://api.github.com/user/secrets/SECRET_NAME/repositories - */ - selected_repositories_url: string - } - /** - * CodespacesUserPublicKey - * @description The public key used for setting user Codespaces' Secrets. - */ - 'codespaces-user-public-key': { - /** - * @description The identifier for the key. - * @example 1234567 - */ - key_id: string - /** - * @description The Base64 encoded public key. - * @example hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - */ - key: string - } - /** - * Fetches information about an export of a codespace. - * @description An export of a codespace. Also, latest export details for a codespace can be fetched with id = latest - */ - 'codespace-export-details': { - /** - * @description State of the latest export - * @example succeeded | failed | in_progress - */ - state?: string | null - /** - * Format: date-time - * @description Completion time of the last export operation - * @example 2021-01-01T19:01:12Z - */ - completed_at?: string | null - /** - * @description Name of the exported branch - * @example codespace-monalisa-octocat-hello-world-g4wpq6h95q - */ - branch?: string | null - /** - * @description Git commit SHA of the exported branch - * @example fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - */ - sha?: string | null - /** - * @description Id for the export details - * @example latest - */ - id?: string - /** - * @description Url for fetching export details - * @example https://api.github.com/user/codespaces/:name/exports/latest - */ - export_url?: string - } /** * Email * @description Email @@ -17699,6 +17364,8 @@ export interface components { 'gpg-key': { /** @example 3 */ id: number + /** @example Octocat's GPG Key */ + name?: string | null primary_key_id: number | null /** @example 3262EFF25BA0D270 */ key_id: string @@ -17707,7 +17374,7 @@ export interface components { /** * @example [ * { - * "email": "mastahyeti@users.noreply.github.com", + * "email": "octocat@users.noreply.github.com", * "verified": true * } * ] @@ -17730,7 +17397,8 @@ export interface components { * "can_encrypt_storage": true, * "can_certify": false, * "created_at": "2016-03-24T11:31:04-06:00", - * "expires_at": null + * "expires_at": null, + * "revoked": false * } * ] */ @@ -17748,6 +17416,7 @@ export interface components { created_at?: string expires_at?: string | null raw_key?: string | null + revoked?: boolean }[] /** @example true */ can_sign: boolean @@ -17762,6 +17431,8 @@ export interface components { created_at: string /** Format: date-time */ expires_at: string | null + /** @example true */ + revoked: boolean raw_key: string | null } /** @@ -17778,47 +17449,6 @@ export interface components { verified: boolean read_only: boolean } - /** Marketplace Account */ - 'marketplace-account': { - /** Format: uri */ - url: string - id: number - type: string - node_id?: string - login: string - /** Format: email */ - email?: string | null - /** Format: email */ - organization_billing_email?: string | null - } - /** - * User Marketplace Purchase - * @description User Marketplace Purchase - */ - 'user-marketplace-purchase': { - /** @example monthly */ - billing_cycle: string - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - next_billing_date: string | null - unit_count: number | null - /** @example true */ - on_free_trial: boolean - /** - * Format: date-time - * @example 2017-11-11T00:00:00Z - */ - free_trial_ends_on: string | null - /** - * Format: date-time - * @example 2017-11-02T01:12:12Z - */ - updated_at: string | null - account: components['schemas']['marketplace-account'] - plan: components['schemas']['marketplace-listing-plan'] - } /** * Starred Repository * @description Starred Repository @@ -17854,7 +17484,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed_simple: { content: { 'application/json': components['schemas']['validation-error-simple'] @@ -17867,7 +17497,7 @@ export interface components { 'application/scim+json': components['schemas']['scim-error'] } } - /** Validation failed */ + /** Validation failed, or the endpoint has been spammed. */ validation_failed: { content: { 'application/json': components['schemas']['validation-error'] @@ -17879,15 +17509,6 @@ export interface components { 'application/json': { [key: string]: unknown } } } - /** Preview header missing */ - preview_header_missing: { - content: { - 'application/json': { - message: string - documentation_url: string - } - } - } /** Forbidden */ forbidden: { content: { @@ -17980,7 +17601,7 @@ export interface components { 'application/json': components['schemas']['basic-error'] } } - /** Response if the repository is archived or if github advanced security is not enabled for this repository */ + /** 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'] @@ -17990,72 +17611,59 @@ export interface components { found: unknown /** A header with no content is returned. */ no_content: 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: { - /** @description Results per page (max 100) */ + /** @description The number of results per page (max 100). */ 'per-page': number + /** @description Page number of the results to fetch. */ + page: number + /** @description The unique identifier of the hook. */ + 'hook-id': number + /** @description The direction to sort the results by. */ + direction: 'asc' | 'desc' + /** @description The unique identifier of the key. */ + 'key-ids': string + /** @description The unique identifier of the team. */ + 'team-id': number + /** @description The handle for the GitHub user account. */ + username: string + /** @description The organization name. The name is not case sensitive. */ + org: string + /** @description The unique identifier of the pre-receive environment. */ + 'pre-receive-environment-id': number + /** @description The unique identifier of the pre-receive hook. */ + 'pre-receive-hook-id': number + /** @description The unique identifier of the token. */ + 'token-id': number /** @description Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor: string 'delivery-id': number - /** @description Page number of the results to fetch. */ - page: number /** @description Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ since: string - /** @description installation_id parameter */ + /** @description The unique identifier of the installation. */ 'installation-id': number - /** @description grant_id parameter */ + /** @description The unique identifier of the grant. */ 'grant-id': number - /** @description The client ID of your GitHub app. */ + /** @description The client ID of the GitHub app. */ 'client-id': string 'app-slug': string - /** @description authorization_id parameter */ + /** @description The client ID of the OAuth app. */ + 'oauth-client-id': string + /** @description The unique identifier of the authorization. */ 'authorization-id': number /** @description The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: string - /** @description Unique identifier of an organization. */ + /** @description The unique identifier of the organization. */ 'org-id': number + /** @description Only return runner groups that are allowed to be used by this organization. */ + 'visible-to-organization': string /** @description Unique identifier of the self-hosted runner group. */ 'runner-group-id': number /** @description Unique identifier of the self-hosted runner. */ 'runner-id': number /** @description The name of a self-hosted runner's custom label. */ 'runner-label-name': string - /** @description 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). */ + /** @description A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). */ 'audit-log-phrase': string /** * @description The event types to include: @@ -18067,9 +17675,9 @@ export interface components { * The default is `web`. */ 'audit-log-include': 'web' | 'git' | 'all' - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ 'audit-log-after': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ 'audit-log-before': string /** * @description The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. @@ -18081,31 +17689,27 @@ export interface components { 'secret-scanning-alert-state': 'open' | 'resolved' /** * @description A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ 'secret-scanning-alert-secret-type': string /** @description A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ 'secret-scanning-alert-resolution': string - /** @description A 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. */ + /** @description The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + 'secret-scanning-alert-sort': 'created' | 'updated' + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ 'pagination-before': string - /** @description A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ + /** @description A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ 'pagination-after': string - /** @description gist_id parameter */ + /** @description The unique identifier of the gist. */ 'gist-id': string - /** @description comment_id parameter */ + /** @description The unique identifier of the comment. */ 'comment-id': number /** @description A list of comma separated label names. Example: `bug,ui,@high` */ labels: string - /** @description One of `asc` (ascending) or `desc` (descending). */ - direction: 'asc' | 'desc' - /** @description account_id parameter */ - 'account-id': number - /** @description plan_id parameter */ - 'plan-id': number - /** @description One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ - sort: 'created' | 'updated' + /** @description The account owner of the repository. The name is not case sensitive. */ owner: string + /** @description The name of the repository. The name is not case sensitive. */ repo: string /** @description If `true`, show notifications marked as read. */ all: boolean @@ -18113,45 +17717,41 @@ export interface components { participating: boolean /** @description Only show notifications updated before the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ before: string - /** @description thread_id parameter */ + /** @description The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ 'thread-id': number /** @description An organization ID. Only return organizations with an ID greater than this ID. */ 'since-org': number - org: string - /** @description team_slug parameter */ - 'team-slug': string + /** @description The unique identifier of the repository. */ 'repository-id': number - /** @description secret_name parameter */ + /** @description Only return runner groups that are allowed to be used by this repository. */ + 'visible-to-repository': string + /** @description The name of the secret. */ 'secret-name': string - username: string - /** @description group_id parameter */ + /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ + 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] + /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ + 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] + /** @description The unique identifier of the group. */ 'group-id': number - 'hook-id': number - /** @description invitation_id parameter */ - 'invitation-id': number - /** @description migration_id parameter */ + /** @description The unique identifier of the migration. */ 'migration-id': number - /** @description repo_name parameter */ - 'repo-name': string - /** @description The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - 'package-visibility': 'public' | 'private' | 'internal' - /** @description The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - 'package-type': 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** @description The name of the package. */ - 'package-name': string - /** @description Unique identifier of the package version. */ - 'package-version-id': number + /** @description The slug of the team name. */ + 'team-slug': string + /** @description The number that identifies the discussion. */ 'discussion-number': number + /** @description The number that identifies the comment. */ 'comment-number': number + /** @description The unique identifier of the reaction. */ 'reaction-id': number + /** @description The unique identifier of the project. */ 'project-id': number - /** @description card_id parameter */ + /** @description The unique identifier of the card. */ 'card-id': number - /** @description column_id parameter */ + /** @description The unique identifier of the column. */ 'column-id': number - /** @description artifact_id parameter */ + /** @description The unique identifier of the artifact. */ 'artifact-id': number - /** @description job_id parameter */ + /** @description The unique identifier of the job. */ 'job-id': number /** @description Returns someone's workflow runs. Use the login for the user who created the `push` associated with the check suite or workflow run. */ actor: string @@ -18159,7 +17759,7 @@ export interface components { 'workflow-run-branch': string /** @description Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event: string - /** @description 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)." */ + /** @description Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. */ 'workflow-run-status': | 'completed' | 'action_required' @@ -18174,61 +17774,64 @@ export interface components { | 'queued' | 'requested' | 'waiting' - /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** @description Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created: string /** @description If `true` pull requests are omitted from the response (empty array). */ 'exclude-pull-requests': boolean /** @description Returns workflow runs with the `check_suite_id` that you specify. */ 'workflow-run-check-suite-id': number - /** @description The id of the workflow run. */ + /** @description The unique identifier of the workflow run. */ 'run-id': number /** @description The attempt number of the workflow run. */ 'attempt-number': number /** @description The ID of the workflow. You can also pass the workflow file name as a string. */ 'workflow-id': number | string - /** @description autolink_id parameter */ + /** @description The unique identifier of the autolink. */ 'autolink-id': number /** @description The name of the branch. */ branch: string - /** @description check_run_id parameter */ + /** @description The unique identifier of the check run. */ 'check-run-id': number - /** @description check_suite_id parameter */ + /** @description The unique identifier of the check suite. */ 'check-suite-id': number /** @description Returns check runs with the specified `name`. */ 'check-name': string - /** @description Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ + /** @description Returns check runs with the specified `status`. */ status: 'queued' | 'in_progress' | 'completed' - /** @description The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - 'tool-name': components['schemas']['code-scanning-analysis-tool-name'] - /** @description The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - 'tool-guid': components['schemas']['code-scanning-analysis-tool-guid'] /** @description The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ 'git-ref': components['schemas']['code-scanning-ref'] /** @description The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ 'alert-number': components['schemas']['alert-number'] - /** @description commit_sha parameter */ + /** @description The SHA of the commit. */ 'commit-sha': string + /** @description The full path, relative to the repository root, of the dependency manifest file. */ + 'manifest-path': string /** @description deployment_id parameter */ 'deployment-id': number - /** @description The name of the environment */ + /** @description The name of the environment. */ 'environment-name': string - /** @description A user ID. Only return users with an ID greater than this ID. */ - 'since-user': number - /** @description issue_number parameter */ + /** @description The unique identifier of the branch policy. */ + 'branch-policy-id': number + /** @description The unique identifier of the invitation. */ + 'invitation-id': number + /** @description The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort: 'created' | 'updated' + /** @description The number that identifies the issue. */ 'issue-number': number - /** @description key_id parameter */ + /** @description The unique identifier of the key. */ 'key-id': number - /** @description milestone_number parameter */ + /** @description The number that identifies the milestone. */ 'milestone-number': number + /** @description The number that identifies the pull request. */ 'pull-number': number - /** @description review_id parameter */ + /** @description The unique identifier of the review. */ 'review-id': number - /** @description asset_id parameter */ + /** @description The unique identifier of the asset. */ 'asset-id': number - /** @description release_id parameter */ + /** @description The unique identifier of the release. */ 'release-id': number - /** @description Must be one of: `day`, `week`. */ - per: '' | 'day' | 'week' + /** @description The unique identifier of the tag protection. */ + 'tag-protection-id': number /** @description A repository ID. Only return repositories with an ID greater than this ID. */ 'since-repo': number /** @description Used for pagination: the index of the first result to return. */ @@ -18237,19 +17840,14 @@ export interface components { count: number /** @description Identifier generated by the GitHub SCIM endpoint. */ 'scim-group-id': string - /** @description scim_user_id parameter */ + /** @description The unique identifier of the SCIM user. */ 'scim-user-id': string /** @description Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ order: 'desc' | 'asc' - 'team-id': number - /** @description ID of the Repository to filter on */ - 'repository-id-in-query': number - /** @description The name of the codespace. */ - 'codespace-name': string - /** @description The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - 'export-id': string - /** @description gpg_key_id parameter */ + /** @description The unique identifier of the GPG key. */ 'gpg-key-id': number + /** @description A user ID. Only return users with an ID greater than this ID. */ + 'since-user': number } headers: { link?: string @@ -18269,628 +17867,627 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': { - /** Format: uri-template */ - current_user_url: string - /** Format: uri-template */ - current_user_authorizations_html_url: string - /** Format: uri-template */ - authorizations_url: string - /** Format: uri-template */ - code_search_url: string - /** Format: uri-template */ - commit_search_url: string - /** Format: uri-template */ - emails_url: string - /** Format: uri-template */ - emojis_url: string - /** Format: uri-template */ - events_url: string - /** Format: uri-template */ - feeds_url: string - /** Format: uri-template */ - followers_url: string - /** Format: uri-template */ - following_url: string - /** Format: uri-template */ - gists_url: string - /** Format: uri-template */ - hub_url: string - /** Format: uri-template */ - issue_search_url: string - /** Format: uri-template */ - issues_url: string - /** Format: uri-template */ - keys_url: string - /** Format: uri-template */ - label_search_url: string - /** Format: uri-template */ - notifications_url: string - /** Format: uri-template */ - organization_url: string - /** Format: uri-template */ - organization_repositories_url: string - /** Format: uri-template */ - organization_teams_url: string - /** Format: uri-template */ - public_gists_url: string - /** Format: uri-template */ - rate_limit_url: string - /** Format: uri-template */ - repository_url: string - /** Format: uri-template */ - repository_search_url: string - /** Format: uri-template */ - current_user_repositories_url: string - /** Format: uri-template */ - starred_url: string - /** Format: uri-template */ - starred_gists_url: string - /** Format: uri-template */ - topic_search_url?: string - /** Format: uri-template */ - user_url: string - /** Format: uri-template */ - user_organizations_url: string - /** Format: uri-template */ - user_repositories_url: string - /** Format: uri-template */ - user_search_url: string - } + 'application/json': components['schemas']['root'] } } } } - /** - * 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: {} + 'enterprise-admin/list-global-webhooks': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['global-hook'][] } } } } - /** 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 - } - } + 'enterprise-admin/create-global-webhook': { responses: { /** Response */ 201: { content: { - 'application/json': components['schemas']['integration'] & - ({ - client_id: string - client_secret: string - webhook_secret: string | null - pem: string - } & { [key: string]: unknown }) + 'application/json': components['schemas']['global-hook'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] } requestBody: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': { + /** @description Must be passed as "web". */ + name: string + /** @description Key/value pairs to provide settings for this webhook. */ + config: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } } } } - /** - * Returns the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-config-for-app': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['webhook-config'] - } + 'enterprise-admin/get-global-webhook': { + parameters: { + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } - } - /** - * Updates the webhook configuration for a GitHub App. For more information about configuring a webhook for your app, see "[Creating a GitHub App](/developers/apps/creating-a-github-app)." - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] - } - } - } - requestBody: { - content: { - 'application/json': { - 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'] + 'application/json': components['schemas']['global-hook'] } } } } - /** - * Returns a list of webhook deliveries for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/list-webhook-deliveries': { + 'enterprise-admin/delete-global-webhook': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + path: { + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 204: never } } - /** - * Returns a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-webhook-delivery': { + /** Parameters that are not provided will be overwritten with the default value or removed if no default exists. */ + 'enterprise-admin/update-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['global-hook-2'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. */ + config?: { + /** @description The URL to which the payloads will be delivered. */ + url: string + /** @description The media type used to serialize the payloads. Supported values include `json` and `form`. The default is `form`. */ + content_type?: string + /** @description If provided, the `secret` will be used as the `key` to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) header. */ + secret?: string + /** @description 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.** */ + insecure_ssl?: string + } + /** @description The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) that trigger this webhook. A global webhook can be triggered by `user` and `organization` events. Default: `user` and `organization`. */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] } } - /** - * Redeliver a delivery for the webhook configured for a GitHub App. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/redeliver-webhook-delivery': { + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the webhook. */ + 'enterprise-admin/ping-global-webhook': { parameters: { path: { - delivery_id: components['parameters']['delivery-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + /** Response */ + 204: never } } - /** - * 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': { + 'enterprise-admin/list-public-keys': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of 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 + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'accessed' + /** Only show public keys accessed after the given time. */ + since?: string } } responses: { - /** The permissions the installation has are included under the `permissions` key. */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['installation'][] + 'application/json': components['schemas']['public-key-full'][] } } } } - /** - * Enables an authenticated GitHub App to find an installation's information using the installation id. - * - * You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - */ - 'apps/get-installation': { + 'enterprise-admin/delete-public-key': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the key. */ + key_ids: components['parameters']['key-ids'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) endpoint to create a team with LDAP mapping. */ + 'enterprise-admin/update-ldap-mapping-for-team': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['installation'] + 'application/json': components['schemas']['ldap-mapping-team'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } - 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-team': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/update-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['installation-token'] + 'application/json': components['schemas']['ldap-mapping-user'] } } - 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': { - /** @description List of repository names that the token should have access to */ - repositories?: string[] - /** - * @description List of repository IDs that the token should have access to - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. */ + ldap_dn: string } } } } - /** - * 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': { + /** Note that this API call does not automatically initiate an LDAP sync. Rather, if a `201` is returned, the sync job is queued successfully, and is performed when the instance is ready. */ + 'enterprise-admin/sync-ldap-mapping-for-user': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 201: { + content: { + 'application/json': { + status?: string + } + } + } } } - /** - * 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': { + 'enterprise-admin/create-org': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['organization-simple'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's username. */ + login: string + /** @description The login of the user who will manage this organization. */ + admin: string + /** @description The organization's display name. */ + profile_name?: string + } + } + } + } + 'enterprise-admin/update-org-name': { parameters: { path: { - /** installation_id parameter */ - installation_id: components['parameters']['installation-id'] + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 202: { + content: { + 'application/json': { + message?: string + url?: string + } + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization's new name. */ + login: string + } + } } } - /** - * **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': { + 'enterprise-admin/list-pre-receive-environments': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['application-grant'][] + 'application/json': components['schemas']['pre-receive-environment'][] } } - 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': { + 'enterprise-admin/create-pre-receive-environment': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The new pre-receive environment's name. */ + name: string + /** @description URL from which to download a tarball of this environment. */ + image_url: string + } + } + } + } + 'enterprise-admin/get-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['application-grant'] + 'application/json': components['schemas']['pre-receive-environment'] } } - 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 attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. * - * 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). + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Cannot delete environment that has hooks_ + * * _Cannot delete environment when download is in progress_ */ - 'oauth-authorizations/delete-grant': { + 'enterprise-admin/delete-pre-receive-environment': { parameters: { path: { - /** grant_id parameter */ - grant_id: components['parameters']['grant-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } } - /** - * 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': { + /** You cannot modify the default environment. If you attempt to modify the default environment, you will receive a `422 Unprocessable Entity` response. */ + 'enterprise-admin/update-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment'] + } + } + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } + } + } } requestBody: { content: { 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + /** @description This pre-receive environment's new name. */ + name?: string + /** @description URL from which to download a tarball of this environment. */ + image_url?: string } } } } - /** OAuth applications can use a special API method for checking OAuth token validity without exceeding the normal rate limits for failed login attempts. Authentication works differently with this particular endpoint. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) to use this endpoint, where the username is the OAuth application `client_id` and the password is its `client_secret`. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/check-token': { + /** + * Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + * + * If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + * + * The possible error messages are: + * + * * _Cannot modify or delete the default environment_ + * * _Can not start a new download when a download is in progress_ + */ + 'enterprise-admin/start-pre-receive-environment-download': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** Client Errors */ + 422: { + content: { + 'application/json': { + message?: string + errors?: { + resource?: string + code?: string + message?: string + }[] + } } } } } - /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. */ - 'apps/delete-token': { + /** In addition to seeing the download status at the "[Get a pre-receive environment](#get-a-pre-receive-environment)" endpoint, there is also this separate endpoint for just the download status. */ + 'enterprise-admin/get-download-status-for-pre-receive-environment': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive environment. */ + pre_receive_environment_id: components['parameters']['pre-receive-environment-id'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The OAuth access token used to authenticate to the GitHub API. */ - access_token: string + 200: { + content: { + 'application/json': components['schemas']['pre-receive-environment-download-status'] } } } } - /** 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': { + 'enterprise-admin/list-pre-receive-hooks': { parameters: { - path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property to sort the results by. */ + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'][] + } + } + } + } + 'enterprise-admin/create-pre-receive-hook': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The access_token of the OAuth application. */ - access_token: string + /** @description The name of the hook. */ + name: string + /** @description The script that the hook runs. */ + script: string + /** @description The GitHub repository where the script is kept. */ + script_repository: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment: { [key: string]: unknown } + /** @description The state of enforcement for this hook. default: `disabled` */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. default: `false` */ + allow_downstream_configuration?: boolean } } } } - /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) when accessing this endpoint, using the OAuth application's `client_id` and `client_secret` as the username and password. Invalid tokens will return `404 NOT FOUND`. */ - 'apps/scope-token': { + 'enterprise-admin/get-pre-receive-hook': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['pre-receive-hook'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The OAuth access token used to authenticate to the GitHub API. - * @example e72e16c7e42f292c6912e7710c838347ae178b4a - */ - access_token: string - /** - * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. - * @example octocat - */ - target?: string - /** - * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. - * @example 1 - */ - target_id?: number - /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ - repositories?: string[] - /** - * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. - * @example [ - * 1 - * ] - */ - repository_ids?: number[] - permissions?: components['schemas']['app-permissions'] - } + } + 'enterprise-admin/delete-pre-receive-hook': { + parameters: { + path: { + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } + responses: { + /** 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://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. - */ - 'apps/get-by-slug': { + 'enterprise-admin/update-pre-receive-hook': { parameters: { path: { - app_slug: components['parameters']['app-slug'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['integration'] + 'application/json': components['schemas']['pre-receive-hook'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the hook. */ + name?: string + /** @description The script that the hook runs. */ + script?: string + /** @description The GitHub repository where the script is kept. */ + script_repository?: { [key: string]: unknown } + /** @description The pre-receive environment where the script is executed. */ + environment?: { [key: string]: unknown } + /** @description The state of enforcement for this hook. */ + enforcement?: string + /** @description Whether enforcement can be overridden at the org or repo level. */ + allow_downstream_configuration?: boolean } } - 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': { + /** Lists personal access tokens for all users, including admin users. */ + 'enterprise-admin/list-personal-access-tokens': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** The client ID of your GitHub app. */ - client_id?: string } } responses: { @@ -18901,788 +18498,680 @@ export interface operations { 'application/json': components['schemas']['authorization'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + } + } + /** Deletes a personal access token. Returns a `403 - Forbidden` status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error. */ + 'enterprise-admin/delete-personal-access-token': { + parameters: { + path: { + /** The unique identifier of the token. */ + token_id: components['parameters']['token-id'] + } + } + responses: { + /** Response */ + 204: never } } /** - * **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). + * If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. * - * 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)." + * The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. * - * To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - * - * You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - * - * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + * If the login name or email address is already associated with an account, the server will return a `422` response. */ - 'oauth-authorizations/create-authorization': { - parameters: {} + 'enterprise-admin/create-user': { responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['authorization'] + 'application/json': components['schemas']['simple-user'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The user's username. */ + login: string /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems + * @description **Required for built-in authentication.** The user's email + * address. This parameter can be omitted when using CAS, LDAP, or SAML. + * For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description The OAuth app client key for which to create the token. */ - client_id?: string - /** @description The OAuth app client secret for which to create the token. */ - client_secret?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + email?: string } } } } /** - * **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 a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. * - * **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/). + * You can delete any user account except your own. */ - 'oauth-authorizations/get-or-create-authorization-for-app': { + 'enterprise-admin/delete-user': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ - 200: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['authorization'] - } + /** Response */ + 204: never + } + } + 'enterprise-admin/update-username-for-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } - /** **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 - } + } + responses: { + /** Response */ + 202: { content: { - 'application/json': components['schemas']['authorization'] + 'application/json': { + message?: string + url?: string + } } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + /** @description The user's new username. */ + login: string } } } } - /** - * **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': { + 'enterprise-admin/create-impersonation-o-auth-token': { parameters: { path: { - /** The client ID of your GitHub app. */ - client_id: components['parameters']['client-id'] - fingerprint: string + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** if returning an existing token */ + /** Response when getting an existing impersonation OAuth token */ 200: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - /** Response if returning a new token */ + /** Response when creating a new impersonation OAuth token */ 201: { - headers: { - Location?: string - } content: { 'application/json': components['schemas']['authorization'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The OAuth app client secret for which to create the token. */ - client_secret: string - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string + /** @description A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + scopes?: string[] } } } } - /** **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': { + 'enterprise-admin/delete-impersonation-o-auth-token': { parameters: { path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } + responses: { + /** Response */ + 204: never + } + } + /** + * 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/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']['authorization'] + 'application/json': components['schemas']['integration'] } } - 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': { + /** Use this endpoint to complete the handshake necessary when implementing the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] + code: string } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 201: { + content: { + 'application/json': components['schemas']['integration'] & + ({ + client_id: string + client_secret: string + webhook_secret: string | null + pem: string + } & { [key: string]: unknown }) + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * **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)." + * 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 can only send one of these scope keys at a time. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'oauth-authorizations/update-authorization': { - parameters: { - path: { - /** authorization_id parameter */ - authorization_id: components['parameters']['authorization-id'] - } - } + 'apps/get-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['authorization'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description A list of scopes that this authorization is in. - * @example [ - * "public_repo", - * "user" - * ] - */ - scopes?: string[] | null - /** @description A list of scopes to add to this authorization. */ - add_scopes?: string[] - /** @description A list of scopes to remove from this authorization. */ - remove_scopes?: string[] - /** - * @description A note to remind you what the OAuth token is for. - * @example Update all gems - */ - note?: string - /** @description A URL to remind you what app the OAuth token is for. */ - note_url?: string - /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ - fingerprint?: string + 'application/json': components['schemas']['webhook-config'] } } } } - 'codes-of-conduct/get-all-codes-of-conduct': { - parameters: {} + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/update-webhook-config-for-app': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['code-of-conduct'][] + 'application/json': components['schemas']['webhook-config'] } } - 304: components['responses']['not_modified'] - } - } - 'codes-of-conduct/get-conduct-code': { - parameters: { - path: { - key: string - } } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-of-conduct'] + 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'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] } } - /** Lists all the emojis available to use on GitHub. */ - 'emojis/get': { - parameters: {} + /** + * Returns a list of webhook deliveries for the webhook configured for a GitHub App. + * + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/list-webhook-deliveries': { + parameters: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] + } + } responses: { /** Response */ 200: { content: { - 'application/json': { [key: string]: string } + 'application/json': components['schemas']['hook-delivery-item'][] } } - 304: components['responses']['not_modified'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Returns a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-github-actions-permissions-enterprise': { + 'apps/get-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-enterprise-permissions'] + 'application/json': components['schemas']['hook-delivery'] } } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + * Redeliver a delivery for the webhook configured for a GitHub App. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-github-actions-permissions-enterprise': { + 'apps/redeliver-webhook-delivery': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + delivery_id: components['parameters']['delivery-id'] } } responses: { - /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_organizations: components['schemas']['enabled-organizations'] - allowed_actions?: components['schemas']['allowed-actions'] - } - } + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } /** - * 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * The permissions the installation has are included under the `permissions` key. */ - 'enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise': { + 'apps/list-installations': { 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) */ + /** The number of 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: { - /** Response */ + /** The permissions the installation has are included under the `permissions` key. */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 'application/json': components['schemas']['installation'][] } } } } /** - * 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)." + * Enables an authenticated GitHub App to find an installation's information using the installation id. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise': { + 'apps/get-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of organization IDs to enable for GitHub Actions. */ - selected_organization_ids: number[] + 200: { + content: { + 'application/json': components['schemas']['installation'] } } + 404: components['responses']['not_found'] } } /** - * 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)." + * 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/enable-selected-organization-github-actions-enterprise': { + 'apps/delete-installation': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/disable-selected-organization-github-actions-enterprise': { + 'apps/create-installation-access-token': { 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'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 204: never + 201: { + content: { + 'application/json': components['schemas']['installation-token'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository names that the token should have access to */ + repositories?: string[] + /** + * @description List of repository IDs that the token should have access to + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * 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 Enterprise Server API or webhook events is blocked for that account. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/get-allowed-actions-enterprise': { + 'apps/suspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['selected-actions'] - } - } + 204: never + 404: components['responses']['not_found'] } } /** - * 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)." + * Removes a GitHub App installation suspension. * - * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ - 'enterprise-admin/set-allowed-actions-enterprise': { + 'apps/unsuspend-installation': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the installation. */ + installation_id: components['parameters']['installation-id'] } } responses: { /** Response */ 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['selected-actions'] - } + 404: components['responses']['not_found'] } } /** - * Lists all self-hosted runner groups for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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/enterprise-server@3.6/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"]`. */ - 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { + 'oauth-authorizations/list-grants': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-enterprise'][] - } + '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'] } } - /** - * Creates a new self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/create-self-hosted-runner-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organization. Can be one of: `all` or `selected` - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + 'application/json': components['schemas']['application-grant'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Gets a specific self-hosted runner group for an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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). */ - 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { + 'oauth-authorizations/delete-grant': { 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'] + /** The unique identifier of the grant. */ + grant_id: components['parameters']['grant-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-groups-enterprise'] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Deletes a self-hosted runner group for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). */ - 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { + 'apps/delete-authorization': { 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string + } + } } } - /** - * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-enterprise'] + 'application/json': components['schemas']['authorization'] } } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name?: string - /** - * @description Visibility of a runner group. You can select all organizations or select individual organizations. Can be one of: `all` or `selected` - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' - /** - * @description Whether the runner group can be used by `public` repositories. - * @default false - */ - allows_public_repositories?: boolean + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Lists the organizations with access to a self-hosted runner group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { + /** OAuth application owners can revoke a single token for an OAuth application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - organizations: components['schemas']['organization-simple'][] - } + 204: never + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth access token used to authenticate to the GitHub API. */ + access_token: string } } } } - /** - * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { + /** 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/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of organization IDs that can access the runner group. */ - selected_organization_ids: number[] + /** @description The access_token of the OAuth application. */ + access_token: string } } } } - /** - * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { + /** Use a non-scoped user-to-server OAuth access token to create a repository scoped and/or permission scoped user-to-server OAuth access token. You can specify which repositories the token can access and which permissions are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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 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'] + /** The client ID of the GitHub app. */ + client_id: components['parameters']['client-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['authorization'] + } + } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The OAuth access token used to authenticate to the GitHub API. + * @example e72e16c7e42f292c6912e7710c838347ae178b4a + */ + access_token: string + /** + * @description The name of the user or organization to scope the user-to-server access token to. **Required** unless `target_id` is specified. + * @example octocat + */ + target?: string + /** + * @description The ID of the user or organization to scope the user-to-server access token to. **Required** unless `target` is specified. + * @example 1 + */ + target_id?: number + /** @description The list of repository names to scope the user-to-server access token to. `repositories` may not be specified if `repository_ids` is specified. */ + repositories?: string[] + /** + * @description The list of repository IDs to scope the user-to-server access token to. `repository_ids` may not be specified if `repositories` is specified. + * @example [ + * 1 + * ] + */ + repository_ids?: number[] + permissions?: components['schemas']['app-permissions'] + } + } } } /** - * 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)." + * **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`). * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { + 'apps/get-by-slug': { 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'] + app_slug: components['parameters']['app-slug'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['integration'] + } + } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists the self-hosted runners that are in a specific enterprise group. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The client ID of your GitHub app. */ + client_id?: string } } responses: { @@ -19690,504 +19179,698 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - runners: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'][] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/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/enterprise-server@3.6/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 Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + * + * Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). */ - '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'] - } - } + 'oauth-authorizations/create-authorization': { + parameters: {} responses: { /** Response */ - 204: never + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description The OAuth app client key for which to create the token. */ + client_id?: string + /** @description The OAuth app client secret for which to create the token. */ + client_secret?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string } } } } /** - * Adds a self-hosted runner to a runner group configured in an enterprise. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` - * scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + * + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). */ - 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] } } responses: { - /** Response */ - 204: never + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } + } } } /** - * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." */ - 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { + 'oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint': { 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'] + /** The client ID of the OAuth app. */ + client_id: components['parameters']['oauth-client-id'] + fingerprint: string } } responses: { - /** Response */ - 204: never + /** if returning an existing token */ + 200: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + /** Response if returning a new token */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['authorization'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The OAuth app client secret for which to create the token. */ + client_secret: string + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + } + } } } - /** - * Lists all self-hosted runners configured for an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-self-hosted-runners-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** 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'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count?: number - runners?: components['schemas']['runner'][] - } + 'application/json': components['schemas']['authorization'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * Lists binaries for the runner application that you can download and run. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-runner-applications-for-enterprise': { + /** **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['runner-application'][] - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * Returns a token that you can pass to the `config` script. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using registration token + * **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." * - * ``` - * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - * ``` + * You can only send one of these scope keys at a time. */ - 'enterprise-admin/create-registration-token-for-enterprise': { + 'oauth-authorizations/update-authorization': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The unique identifier of the authorization. */ + authorization_id: components['parameters']['authorization-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['authorization'] } } + 422: components['responses']['validation_failed'] } - } - /** - * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - * - * #### Example using remove token - * - * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - * endpoint. - * - * ``` - * ./config.sh remove --token TOKEN - * ``` - */ - 'enterprise-admin/create-remove-token-for-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + requestBody: { + content: { + 'application/json': { + /** + * @description A list of scopes that this authorization is in. + * @example [ + * "public_repo", + * "user" + * ] + */ + scopes?: string[] | null + /** @description A list of scopes to add to this authorization. */ + add_scopes?: string[] + /** @description A list of scopes to remove from this authorization. */ + remove_scopes?: string[] + /** + * @description A note to remind you what the OAuth token is for. + * @example Update all gems + */ + note?: string + /** @description A URL to remind you what app the OAuth token is for. */ + note_url?: string + /** @description A unique string to distinguish an authorization from others created for the same client ID and user. */ + fingerprint?: string + } } } + } + 'codes-of-conduct/get-all-codes-of-conduct': { + parameters: {} responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': components['schemas']['code-of-conduct'][] } } + 304: components['responses']['not_modified'] } } - /** - * Gets a specific self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/get-self-hosted-runner-for-enterprise': { + 'codes-of-conduct/get-conduct-code': { 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'] + key: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner'] + 'application/json': components['schemas']['code-of-conduct'] } } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { - parameters: { - path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** Lists all the emojis available to use on GitHub Enterprise Server. */ + 'emojis/get': { + parameters: {} + responses: { + /** Response */ + 200: { + content: { + 'application/json': { [key: string]: string } + } + } + 304: components['responses']['not_modified'] + } + } + /** Gets the current message and expiration date of the global announcement banner in your enterprise. */ + 'enterprise-admin/get-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } } } + } + /** Removes the global announcement banner in your enterprise. */ + 'enterprise-admin/remove-announcement': { responses: { /** Response */ 204: never } } - /** - * Lists all labels for a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - */ - 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { + /** Sets the message and expiration time for the global announcement banner in your enterprise. */ + 'enterprise-admin/set-announcement': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['announcement'] + } + } + } + requestBody: { + content: { + 'application/json': components['schemas']['announcement'] + } + } + } + 'enterprise-admin/get-license-information': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['license-info'] + } + } + } + } + 'enterprise-admin/get-all-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-overview'] + } + } + } + } + 'enterprise-admin/get-comment-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-comment-overview'] + } + } + } + } + 'enterprise-admin/get-gist-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-gist-overview'] + } + } + } + } + 'enterprise-admin/get-hooks-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-hook-overview'] + } + } + } + } + 'enterprise-admin/get-issue-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-issue-overview'] + } + } + } + } + 'enterprise-admin/get-milestone-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-milestone-overview'] + } + } + } + } + 'enterprise-admin/get-org-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-organization-overview'] + } + } + } + } + 'enterprise-admin/get-pages-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-page-overview'] + } + } + } + } + 'enterprise-admin/get-pull-request-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-pull-request-overview'] + } + } + } + } + 'enterprise-admin/get-repo-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-repository-overview'] + } + } + } + } + 'enterprise-admin/get-user-stats': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-user-overview'] + } + } + } + } + /** + * Gets the total GitHub Actions cache usage for an enterprise. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + */ + 'actions/get-actions-cache-usage-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } + } } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Gets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { + 'actions/get-actions-cache-usage-policy-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** Response */ + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } } /** - * Add custom labels to a self-hosted runner configured in an enterprise. - * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * Sets the GitHub Actions cache usage policy for an enterprise. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { + 'actions/set-actions-cache-usage-policy-for-enterprise': { parameters: { path: { /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ enterprise: components['parameters']['enterprise'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } + 'application/json': components['schemas']['actions-cache-usage-policy-enterprise'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * enterprise. Returns the remaining read-only labels from the runner. + * Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + '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'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-enterprise-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an enterprise. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. * - * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { + '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'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_organizations: components['schemas']['enabled-organizations'] + allowed_actions?: components['schemas']['allowed-actions'] + } + } } } - /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ - 'enterprise-admin/get-audit-log': { + /** + * 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: { - /** 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } } } } } /** - * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + * 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. */ - 'secret-scanning/list-alerts-for-enterprise': { + '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'] } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-secret-scanning-alert'][] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of organization IDs to enable for GitHub Actions. */ + selected_organization_ids: number[] } } - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-github-actions-billing-ghe': { + '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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + 204: never } } /** - * Gets the GitHub Advanced Security active committers for an enterprise per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + * 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. */ - 'billing/get-github-advanced-security-billing-ghe': { + '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'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { - /** Success */ - 200: { - content: { - 'application/json': components['schemas']['advanced-security-active-committers'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] + /** Response */ + 204: never } } /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-github-packages-billing-ghe': { + '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. */ @@ -20198,19 +19881,17 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['packages-billing-usage'] + 'application/json': components['schemas']['selected-actions'] } } } } /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + * 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)." * - * The authenticated user must be an enterprise admin. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. */ - 'billing/get-shared-storage-billing-ghe': { + '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. */ @@ -20219,268 +19900,250 @@ export interface operations { } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['selected-actions'] } } } - /** 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': { + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + * + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. + */ + 'actions/get-github-actions-default-workflow-permissions-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { - /** Response */ + /** Success response */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] } } - 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: + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + * whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." * - * * **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. + * You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + * GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. */ - 'activity/get-feeds': { - parameters: {} + 'actions/set-github-actions-default-workflow-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']['feed'] - } + /** Success response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] } } } - /** Lists the authenticated user's gists or if called anonymously, this endpoint returns all public gists: */ - 'gists/list': { + /** + * Lists all self-hosted runner groups for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runner-groups-for-enterprise': { parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } query: { - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this organization. */ + visible_to_organization?: components['parameters']['visible-to-organization'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': { + total_count: number + runner_groups: components['schemas']['runner-groups-enterprise'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] } } /** - * Allows you to add a new gist with one or more files. + * Creates a new self-hosted runner group for an enterprise. * - * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'gists/create': { - parameters: {} + '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: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['gist-simple'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organization. + * @enum {string} */ - description?: string + visibility?: 'selected' | 'all' + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] /** - * @description Names and content for the files that make up the gist - * @example { - * "hello.rb": { - * "content": "puts \"Hello, World!\"" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - files: { - [key: string]: { - /** @description Content of the file */ - content: string - } - } - public?: boolean | ('true' | 'false') + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } /** - * List public gists sorted by most recently updated to least recently updated. + * Gets a specific self-hosted runner group for an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'gists/list-public': { + 'enterprise-admin/get-self-hosted-runner-group-for-enterprise': { 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'] + 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: { - headers: {} content: { - 'application/json': components['schemas']['base-gist'][] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } } - /** List the authenticated user's starred gists: */ - 'gists/list-starred': { + /** + * Deletes a self-hosted runner group for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/delete-self-hosted-runner-group-from-enterprise': { parameters: { - 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'] + 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: { - headers: {} - content: { - 'application/json': components['schemas']['base-gist'][] - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + 204: never } } - 'gists/get': { + /** + * Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/update-self-hosted-runner-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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']['gist-simple'] + 'application/json': components['schemas']['runner-groups-enterprise'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] - } - } - 'gists/delete': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Allows you to update or delete a gist file and rename gist files. Files from the previous version of the gist that aren't explicitly changed during an edit are unchanged. */ - 'gists/update': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-simple'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description Name of the runner group. */ + name?: string /** - * @description Description of the gist - * @example Example Ruby script + * @description Visibility of a runner group. You can select all organizations or select individual organizations. + * @default all + * @enum {string} */ - description?: string + visibility?: 'selected' | 'all' /** - * @description Names of files to be updated - * @example { - * "hello.rb": { - * "content": "blah", - * "filename": "goodbye.rb" - * } - * } + * @description Whether the runner group can be used by `public` repositories. + * @default false */ - files?: { [key: string]: { [key: string]: unknown } } - } | null + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] + } } } } - 'gists/list-comments': { + /** + * Lists the organizations with access to a self-hosted runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20489,153 +20152,99 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['gist-comment'][] + 'application/json': { + total_count: number + organizations: components['schemas']['organization-simple'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/create-comment': { + /** + * Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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 */ - 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'] + 204: never } requestBody: { content: { 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } - } - } - 'gists/get-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] + /** @description List of organization IDs that can access the runner group. */ + selected_organization_ids: number[] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden_gist'] - 404: components['responses']['not_found'] } } - 'gists/delete-comment': { + /** + * Adds an organization to the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - 'gists/update-comment': { - parameters: { - path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['gist-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The comment text. - * @example Body of the attachment - */ - body: string - } - } } } - 'gists/list-commits': { + /** + * Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise': { parameters: { path: { - /** 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'] + /** 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'] + /** The unique identifier of the organization. */ + org_id: components['parameters']['org-id'] } } 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'] + 204: never } } - 'gists/list-forks': { + /** + * Lists the self-hosted runners that are in a specific enterprise group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -20646,408 +20255,436 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['gist-simple'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** **Note**: This was previously `/gists/:gist_id/fork`. */ - 'gists/fork': { + /** + * Replaces the list of self-hosted runners that are part of an enterprise runner group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-self-hosted-runners-in-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** 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 */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['base-gist'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'gists/check-is-starred': { + /** + * Adds a self-hosted runner to a runner group configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` + * scope to use this endpoint. + */ + 'enterprise-admin/add-self-hosted-runner-to-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response if gist is starred */ + /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - /** Not Found if gist is not starred */ - 404: { - content: { - 'application/json': { [key: string]: unknown } - } - } } } - /** Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'gists/star': { + /** + * Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - 'gists/unstar': { + /** + * Lists all self-hosted runners configured for an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-self-hosted-runners-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + headers: {} + content: { + 'application/json': { + total_count?: number + runners?: components['schemas']['runner'][] + } + } + } } } - 'gists/get-revision': { + /** + * Lists binaries for the runner application that you can download and run. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/list-runner-applications-for-enterprise': { parameters: { path: { - /** gist_id parameter */ - gist_id: components['parameters']['gist-id'] - sha: string + /** 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']['gist-simple'] + 'application/json': components['schemas']['runner-application'][] } } - 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: {} + /** + * Returns a token that you can pass to the `config` script. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using registration token + * + * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * + * ``` + * ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + * ``` + */ + 'enterprise-admin/create-registration-token-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': string[] + 'application/json': components['schemas']['authentication-token'] } } - 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. + * Returns a token that you can pass to the `config` script to remove a self-hosted runner from an enterprise. The token expires after one hour. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + * + * #### Example using remove token + * + * To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + * endpoint. + * + * ``` + * ./config.sh remove --token TOKEN + * ``` */ - 'gitignore/get-template': { + 'enterprise-admin/create-remove-token-for-enterprise': { parameters: { path: { - name: string + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['gitignore-template'] + 'application/json': components['schemas']['authentication-token'] } } - 304: components['responses']['not_modified'] } } /** - * List repositories that an app installation can access. + * Gets a specific self-hosted runner configured in an enterprise. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/list-repos-accessible-to-installation': { + 'enterprise-admin/get-self-hosted-runner-for-enterprise': { parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** 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: { - headers: {} content: { - 'application/json': { - total_count: number - repositories: components['schemas']['repository'][] - /** @example selected */ - repository_selection?: string - } + 'application/json': components['schemas']['runner'] } } - 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. + * 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 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/revoke-installation-access-token': { - parameters: {} + 'enterprise-admin/delete-self-hosted-runner-from-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + } + } responses: { /** Response */ 204: never } } /** - * 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. - * + * Lists all labels for a self-hosted runner configured in an enterprise. * - * **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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'issues/list': { + 'enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise': { parameters: { - query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ - filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ - state?: 'open' | 'closed' | 'all' - /** A list of comma separated label names. Example: `bug,ui,@high` */ - labels?: components['parameters']['labels'] - /** What to sort results by. Can be either `created`, `updated`, `comments`. */ - sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - collab?: boolean - orgs?: boolean - owned?: boolean - pulls?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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: { - headers: {} - content: { - 'application/json': components['schemas']['issue'][] - } - } - 304: components['responses']['not_modified'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'licenses/get-all-commonly-used': { + /** + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise': { parameters: { - query: { - featured?: boolean - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + 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']['license-simple'][] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] } } - 304: components['responses']['not_modified'] } } - 'licenses/get': { + /** + * Add custom labels to a self-hosted runner configured in an enterprise. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise': { parameters: { path: { - license: string + /** 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']['license'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - } - } - 'markdown/render': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: { - 'Content-Length'?: string - } - content: { - 'text/html': string - } - } - 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The Markdown text to render in HTML. */ - text: string - /** - * @description The rendering mode. Can be either `markdown` or `gfm`. - * @default markdown - * @example markdown - * @enum {string} - */ - mode?: 'markdown' | 'gfm' - /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ - context?: string + /** @description The names of the custom labels to add to the runner. */ + labels: string[] } } } } - /** You must send Markdown as plain text (using a `Content-Type` header of `text/plain` or `text/x-markdown`) to this endpoint, rather than using JSON format. In raw mode, [GitHub Flavored Markdown](https://github.github.com/gfm/) is not supported and Markdown will be rendered in plain format like a README.md file. Markdown content must be 400 KB or less. */ - 'markdown/render-raw': { - parameters: {} - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'text/html': string - } + /** + * Remove all custom labels from a self-hosted runner configured in an + * enterprise. Returns the remaining read-only labels from the runner. + * + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + */ + 'enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise': { + parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - 304: components['responses']['not_modified'] } - requestBody: { - content: { - 'text/plain': string - 'text/x-markdown': string - } + responses: { + 200: components['responses']['actions_runner_labels_readonly'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } /** - * 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. + * Remove a custom label from a self-hosted runner configured + * in an enterprise. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. * - * 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. + * You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. */ - 'apps/get-subscription-plan-for-account': { + 'enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['marketplace-purchase'] - } - } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** - * 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': { + /** Gets the audit log for an enterprise. To use this endpoint, you must be an enterprise admin, and you must use an access token with the `admin:enterprise` scope. */ + 'enterprise-admin/get-audit-log': { parameters: { + path: { + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ + before?: components['parameters']['audit-log-before'] + /** + * The order of audit log events. To list newest events first, specify `desc`. To list oldest events first, specify `asc`. + * + * The default is `desc`. + */ + order?: components['parameters']['audit-log-order'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['audit-log-event'][] } } - 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. + * Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + * To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). */ - 'apps/list-accounts-for-plan': { + 'secret-scanning/list-alerts-for-enterprise': { parameters: { path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] } 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) */ + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] } } responses: { @@ -21055,47 +20692,48 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': components['schemas']['organization-secret-scanning-alert'][] } } - 401: components['responses']['requires_authentication'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * Gets the GitHub Advanced Security active committers for an enterprise per repository. + * + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. * - * 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. + * The total number of repositories with committer information is tracked by the `total_count` field. */ - 'apps/get-subscription-plan-for-account-stubbed': { + 'billing/get-github-advanced-security-billing-ghe': { parameters: { path: { - /** account_id parameter */ - account_id: components['parameters']['account-id'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Success */ 200: { content: { - 'application/json': components['schemas']['marketplace-purchase'] + 'application/json': components['schemas']['advanced-security-active-committers'] } } - 401: components['responses']['requires_authentication'] - /** Not Found when the account has not purchased the listing */ - 404: unknown + 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * 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': { + /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21104,31 +20742,46 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['marketplace-listing-plan'][] + 'application/json': components['schemas']['event'][] } } - 401: components['responses']['requires_authentication'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 503: components['responses']['service_unavailable'] } } /** - * 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 Enterprise Server 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 Enterprise Server global public timeline + * * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. * - * 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. + * **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. */ - 'apps/list-accounts-for-plan-stubbed': { - parameters: { - path: { - /** plan_id parameter */ - plan_id: components['parameters']['plan-id'] + '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: { - /** 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) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21139,37 +20792,73 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['marketplace-purchase'][] + 'application/json': components['schemas']['base-gist'][] } } - 401: components['responses']['requires_authentication'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + * Allows you to add a new gist with one or more files. * - * **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. + * **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. */ - 'meta/get': { + 'gists/create': { parameters: {} responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['api-overview'] + 'application/json': components['schemas']['gist-simple'] } } 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Description of the gist + * @example Example Ruby script + */ + description?: string + /** + * @description Names and content for the files that make up the gist + * @example { + * "hello.rb": { + * "content": "puts \"Hello, World!\"" + * } + * } + */ + files: { + [key: string]: { + /** @description Content of the file */ + content: string + } + } + public?: boolean | ('true' | 'false') + } + } } } - 'activity/list-public-events-for-repo-network': { + /** + * List public gists sorted by most recently updated to least recently updated. + * + * Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } query: { - /** Results per page (max 100) */ + /** 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21178,29 +20867,23 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['base-gist'][] } } - 301: components['responses']['moved_permanently'] 304: components['responses']['not_modified'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** List all notifications for the current user, sorted by most recently updated. */ - 'activity/list-notifications-for-authenticated-user': { + /** List the authenticated user's starred gists: */ + 'gists/list-starred': { 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21211,186 +20894,229 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['base-gist'][] } } 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: {} + 'gists/get': { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - } + 'application/json': components['schemas']['gist-simple'] } } - /** Reset Content */ - 205: unknown 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - requestBody: { - content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. - */ - last_read_at?: string - /** @description Whether the notification has been read. */ - read?: boolean - } - } + 403: components['responses']['forbidden_gist'] + 404: components['responses']['not_found'] } } - 'activity/get-thread': { + 'gists/delete': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['thread'] - } - } + 204: never 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - 'activity/mark-thread-as-read': { + /** Allows you to update a gist's description and to update, delete, or 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: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Reset Content */ - 205: unknown - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['gist-simple'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The description of the gist. + * @example Example Ruby script + */ + description?: string + /** + * @description The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + * (including extension) of the targeted gist file. For example: `hello.py`. + * + * To delete a file, set the whole file to null. For example: `hello.py : null`. + * @example { + * "hello.rb": { + * "content": "blah", + * "filename": "goodbye.rb" + * } + * } + */ + files?: { [key: string]: { [key: string]: unknown } } + } | null + } } } - /** - * 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': { + 'gists/list-comments': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-subscription'] + 'application/json': components['schemas']['gist-comment'][] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'gists/create-comment': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['thread-subscription'] + 'application/json': components['schemas']['gist-comment'] } } 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { /** - * @description Whether to block all notifications from a thread. - * @default false + * @description The comment text. + * @example Body of the attachment */ - ignored?: boolean + body: string } } } } - /** 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': { + 'gists/get-comment': { parameters: { path: { - /** thread_id parameter */ - thread_id: components['parameters']['thread-id'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + 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: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Get the octocat as ASCII art */ - 'meta/get-octocat': { + 'gists/update-comment': { parameters: { - query: { - /** The words to show in Octocat's speech bubble */ - s?: string + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/octocat-stream': string + 'application/json': components['schemas']['gist-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The comment text. + * @example Body of the attachment + */ + body: string } } } } - /** - * 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': { + 'gists/list-commits': { parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } query: { - /** An organization ID. Only return organizations with an ID greater than this ID. */ - since?: components['parameters']['since-org'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { @@ -21400,271 +21126,176 @@ export interface operations { Link?: string } content: { - 'application/json': components['schemas']['organization-simple'][] + 'application/json': components['schemas']['gist-commit'][] } } 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * List the custom repository roles available in this organization. In order to see custom - * repository roles in an organization, the authenticated user must be an organization owner. - * - * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". - */ - 'orgs/list-custom-roles': { + 'gists/list-forks': { parameters: { path: { - organization_id: string + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response - list of custom role names */ + /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of custom roles in this organization - * @example 3 - */ - total_count?: number - custom_roles?: components['schemas']['organization-custom-repository-role'][] - } + 'application/json': components['schemas']['gist-simple'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * Lists a connection between a team and an external group. - * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. - */ - 'teams/list-linked-external-idp-groups-to-team-for-org': { + 'gists/fork': { parameters: { path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['external-groups'] + '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'] } } - /** - * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). - * - * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub plan. See "[Authenticating with GitHub Apps](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub plan information' below." - */ - 'orgs/get': { + 'gists/check-is-starred': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { - /** Response */ - 200: { + /** Response if gist is starred */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + /** Not Found if gist is not starred */ + 404: { content: { - 'application/json': components['schemas']['organization-full'] + 'application/json': { [key: string]: unknown } } } - 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': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'gists/star': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['organization-full'] - } - } - 409: components['responses']['conflict'] - /** Validation failed */ - 422: { - content: { - 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] - } - } + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } - requestBody: { - content: { - 'application/json': { - /** @description Billing email address. This address is not publicized. */ - billing_email?: string - /** @description The company name. */ - company?: string - /** @description The publicly visible email address. */ - email?: string - /** @description The Twitter username of the company. */ - twitter_username?: string - /** @description The location. */ - location?: string - /** @description The shorthand name of the company. */ - name?: string - /** @description The description of the company. */ - description?: string - /** @description Toggles whether an organization can use organization projects. */ - has_organization_projects?: boolean - /** @description Toggles whether repositories that belong to the organization can use repository projects. */ - has_repository_projects?: boolean - /** - * @description Default permission level members have for organization repositories: - * \* `read` - can pull, but not push to or administer this repository. - * \* `write` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push, and administer this repository. - * \* `none` - no permissions granted by default. - * @default read - * @enum {string} - */ - default_repository_permission?: 'read' | 'write' | 'admin' | 'none' - /** - * @description Toggles the ability of non-admin organization members to create repositories. Can be one of: - * \* `true` - all organization members can create repositories. - * \* `false` - only organization owners can create repositories. - * Default: `true` - * **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. - * @default true - */ - members_can_create_repositories?: boolean - /** - * @description Toggles whether organization members can create internal repositories, which are visible to all enterprise members. You can only allow members to create internal repositories if your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one of: - * \* `true` - all organization members can create internal repositories. - * \* `false` - only organization owners can create internal repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_internal_repositories?: boolean - /** - * @description Toggles whether organization members can create private repositories, which are visible to organization members with permission. Can be one of: - * \* `true` - all organization members can create private repositories. - * \* `false` - only organization owners can create private repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_private_repositories?: boolean - /** - * @description Toggles whether organization members can create public repositories, which are visible to anyone. Can be one of: - * \* `true` - all organization members can create public repositories. - * \* `false` - only organization owners can create public repositories. - * Default: `true`. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. - */ - members_can_create_public_repositories?: boolean - /** - * @description Specifies which types of repositories non-admin organization members can create. Can be one of: - * \* `all` - all organization members can create public and private repositories. - * \* `private` - members can create private repositories. This option is only available to repositories that are part of an organization on GitHub Enterprise Cloud. - * \* `none` - only admin members can create repositories. - * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. - * @enum {string} - */ - members_allowed_repository_creation_type?: 'all' | 'private' | 'none' - /** - * @description Toggles whether organization members can create GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create GitHub Pages sites. - * \* `false` - no organization members can create GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_pages?: boolean - /** - * @description Toggles whether organization members can create public GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create public GitHub Pages sites. - * \* `false` - no organization members can create public GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_public_pages?: boolean - /** - * @description Toggles whether organization members can create private GitHub Pages sites. Can be one of: - * \* `true` - all organization members can create private GitHub Pages sites. - * \* `false` - no organization members can create private GitHub Pages sites. Existing published sites will not be impacted. - * @default true - */ - members_can_create_private_pages?: boolean - /** - * @description Toggles whether organization members can fork private organization repositories. Can be one of: - * \* `true` - all organization members can fork private repositories within the organization. - * \* `false` - no organization members can fork private repositories within the organization. - * @default false - */ - members_can_fork_private_repositories?: boolean - /** @example "http://github.blog" */ - blog?: string - } + } + 'gists/unstar': { + parameters: { + path: { + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] } } + responses: { + /** Response */ + 204: never + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } } - /** - * 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': { + 'gists/get-revision': { parameters: { path: { - org: components['parameters']['org'] + /** The unique identifier of the gist. */ + gist_id: components['parameters']['gist-id'] + sha: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['actions-organization-permissions'] + '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/enterprise-server@3.6/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'] } } /** - * 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. + * The API also allows fetching the source of a single template. + * Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. */ - 'actions/set-github-actions-permissions-organization': { + 'gitignore/get-template': { parameters: { path: { - org: components['parameters']['org'] + name: string } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - enabled_repositories: components['schemas']['enabled-repositories'] - allowed_actions?: components['schemas']['allowed-actions'] + 200: { + content: { + 'application/json': components['schemas']['gitignore-template'] } } + 304: components['responses']['not_modified'] } } /** - * 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)." + * List repositories that an app installation can access. * - * 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. + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/list-selected-repositories-enabled-github-actions-organization': { + 'apps/list-repos-accessible-to-installation': { parameters: { - path: { - org: components['parameters']['org'] - } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21673,175 +21304,196 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number repositories: components['schemas']['repository'][] + /** @example selected */ + repository_selection?: string } } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * 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)." + * Revokes the installation token you're using to authenticate as an installation and access this endpoint. * - * 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. + * 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. + * + * You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. */ - 'actions/set-selected-repositories-enabled-github-actions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } + 'apps/revoke-installation-access-token': { + parameters: {} responses: { /** Response */ 204: never } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs to enable for GitHub Actions. */ - selected_repository_ids: number[] - } - } - } } /** - * Adds a repository to the list of selected repositories that are enabled for GitHub Actions in an organization. To use this endpoint, the organization permission policy for `enabled_repositories` must be must be configured to `selected`. For more information, see "[Set GitHub Actions permissions for an organization](#set-github-actions-permissions-for-an-organization)." + * 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. * - * 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. + * + * **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ - 'actions/enable-selected-repository-github-actions-organization': { + 'issues/list': { parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + query: { + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ + filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' + /** Indicates the state of the issues to return. */ + state?: 'open' | 'closed' | 'all' + /** A list of comma separated label names. Example: `bug,ui,@high` */ + labels?: components['parameters']['labels'] + /** What to sort results by. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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 + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue'][] + } + } + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + 'licenses/get-all-commonly-used': { parameters: { - path: { - org: components['parameters']['org'] - repository_id: components['parameters']['repository-id'] + query: { + featured?: boolean + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['license-simple'][] + } + } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'licenses/get': { parameters: { path: { - org: components['parameters']['org'] + license: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': components['schemas']['license'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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'] - } - } + 'markdown/render': { + parameters: {} responses: { /** Response */ - 204: never + 200: { + headers: { + 'Content-Length'?: string + } + content: { + 'text/html': string + } + } + 304: components['responses']['not_modified'] } requestBody: { content: { - 'application/json': components['schemas']['selected-actions'] + 'application/json': { + /** @description The Markdown text to render in HTML. */ + text: string + /** + * @description The rendering mode. + * @default markdown + * @example markdown + * @enum {string} + */ + mode?: 'markdown' | 'gfm' + /** @description The repository context to use when creating references in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` will change the text `#42` into an HTML link to issue 42 in the `octo-org/octo-repo` repository. */ + context?: string + } } } } - /** - * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - * as well if GitHub Actions can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/get-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] - } - } + /** 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: { - 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + 'text/html': string } } + 304: components['responses']['not_modified'] } - } - /** - * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - * can submit approving pull request reviews. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. - */ - 'actions/set-github-actions-default-workflow-permissions-organization': { - parameters: { - path: { - org: components['parameters']['org'] + requestBody: { + content: { + 'text/plain': string + 'text/x-markdown': string } } + } + 'meta/get': { + parameters: {} responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + 200: { + content: { + 'application/json': components['schemas']['api-overview'] + } } + 304: components['responses']['not_modified'] } } - /** - * 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': { + 'activity/list-public-events-for-repo-network': { parameters: { path: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -21851,372 +21503,416 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': { - total_count: number - runner_groups: components['schemas']['runner-groups-org'][] - } + 'application/json': components['schemas']['event'][] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** - * 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': { + /** List all notifications for the current user, sorted by most recently updated. */ + 'activity/list-notifications-for-authenticated-user': { parameters: { - path: { - org: components['parameters']['org'] + 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'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 50). */ + per_page?: number } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['runner-groups-org'] + '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" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) endpoint and pass the query parameter `all=false`. */ + 'activity/mark-notifications-as-read': { + parameters: {} + responses: { + /** Response */ + 202: { + content: { + 'application/json': { + message?: string + } } } + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string - /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. Can be one of: `all`, `selected`, or `private`. - * @default all - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids?: number[] - /** @description List of runner IDs to add to the runner group. */ - runners?: number[] /** - * @description Whether the runner group can be used by `public` repositories. - * @default false + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. */ - allows_public_repositories?: boolean + last_read_at?: string + /** @description Whether the notification has been read. */ + read?: boolean } } } } - /** - * 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': { + /** Gets information about a notification thread. */ + 'activity/get-thread': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['thread'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + } + } + /** Marks a thread as "read." Marking a thread as "read" is equivalent to clicking a notification in your notification inbox on GitHub Enterprise Server: https://github.com/notifications. */ + 'activity/mark-thread-as-read': { + parameters: { + path: { + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] + } + } + responses: { + /** Reset Content */ + 205: unknown + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] } } /** - * 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. + * This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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. */ - 'actions/delete-self-hosted-runner-group-from-org': { + 'activity/get-thread-subscription-for-authenticated-user': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['thread-subscription'] + } + } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } /** - * 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)." + * 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**. * - * Updates the `name` and `visibility` of a self-hosted runner group in an organization. + * 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. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. */ - 'actions/update-self-hosted-runner-group-for-org': { + 'activity/set-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-groups-org'] + 'application/json': components['schemas']['thread-subscription'] } } + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } requestBody: { content: { 'application/json': { - /** @description Name of the runner group. */ - name: string /** - * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. Can be one of: `all`, `selected`, or `private`. - * @enum {string} - */ - visibility?: 'selected' | 'all' | 'private' - /** - * @description Whether the runner group can be used by `public` repositories. + * @description Whether to block all notifications from a thread. * @default false */ - allows_public_repositories?: boolean + ignored?: boolean } } } } - /** - * 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': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) endpoint and set `ignore` to `true`. */ + 'activity/delete-thread-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the notification thread. This corresponds to the value returned in the `id` field when you retrieve notifications (for example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). */ + thread_id: components['parameters']['thread-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } - } - } + 204: never + 304: components['responses']['not_modified'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] } } - /** - * 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': { + /** Get the octocat as ASCII art */ + 'meta/get-octocat': { parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] + query: { + /** The words to show in Octocat's speech bubble */ + s?: string } } responses: { /** Response */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description List of repository IDs that can access the runner group. */ - selected_repository_ids: number[] + 200: { + content: { + 'application/octocat-stream': string } } } } /** - * 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)." + * Lists all organizations, in the order that they were created on GitHub Enterprise Server. * - * You must authenticate using an access token with the `admin:org` - * scope to use this endpoint. + * **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. */ - 'actions/add-repo-access-to-self-hosted-runner-group-in-org': { + 'orgs/list': { 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'] + query: { + /** An organization ID. Only return organizations with an ID greater than this ID. */ + since?: components['parameters']['since-org'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 204: never + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['organization-simple'][] + } + } + 304: components['responses']['not_modified'] } } /** - * 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)." - * + * List the custom repository roles available in this organization. In order to see custom + * repository roles in an organization, the authenticated user must be an organization owner. * - * 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)." + * To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + * GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". */ - 'actions/remove-repo-access-to-self-hosted-runner-group-in-org': { + 'orgs/list-custom-roles': { 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'] + /** The unique identifier of the organization. */ + organization_id: string } } responses: { - /** Response */ - 204: never + /** Response - list of custom role names */ + 200: { + content: { + 'application/json': { + /** + * @description The number of custom roles in this organization + * @example 3 + */ + total_count?: number + custom_roles?: components['schemas']['organization-custom-repository-role'][] + } + } + } } } /** - * 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. + * To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." */ - 'actions/list-self-hosted-runners-in-group-for-org': { + 'orgs/get': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'][] - } + 'application/json': components['schemas']['organization-full'] } } + 404: components['responses']['not_found'] } } /** - * 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. + * **Parameter Deprecation Notice:** GitHub Enterprise Server 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). * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. */ - 'actions/set-self-hosted-runners-in-group-for-org': { + 'orgs/update': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['organization-full'] + } + } + 409: components['responses']['conflict'] + /** Validation failed */ + 422: { + content: { + 'application/json': components['schemas']['validation-error'] | components['schemas']['validation-error-simple'] + } + } } requestBody: { content: { 'application/json': { - /** @description List of runner IDs to add to the runner group. */ - runners: number[] + /** @description Billing email address. This address is not publicized. */ + billing_email?: string + /** @description The company name. */ + company?: string + /** @description The publicly visible email address. */ + email?: string + /** @description The Twitter username of the company. */ + twitter_username?: string + /** @description The location. */ + location?: string + /** @description The shorthand name of the company. */ + name?: string + /** @description The description of the company. */ + description?: string + /** @description Whether an organization can use organization projects. */ + has_organization_projects?: boolean + /** @description Whether repositories that belong to the organization can use repository projects. */ + has_repository_projects?: boolean + /** + * @description Default permission level members have for organization repositories. + * @default read + * @enum {string} + */ + default_repository_permission?: 'read' | 'write' | 'admin' | 'none' + /** + * @description Whether of non-admin organization members can create repositories. **Note:** A parameter can override this parameter. See `members_allowed_repository_creation_type` in this table for details. + * @default true + */ + members_can_create_repositories?: boolean + /** @description 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+. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_internal_repositories?: boolean + /** @description Whether organization members can create private repositories, which are visible to organization members with permission. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_private_repositories?: boolean + /** @description Whether organization members can create public repositories, which are visible to anyone. For more information, see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" in the GitHub Help documentation. */ + members_can_create_public_repositories?: boolean + /** + * @description Specifies which types of repositories non-admin organization members can create. + * **Note:** This parameter is deprecated and will be removed in the future. Its return value ignores internal repositories. Using this parameter overrides values set in `members_can_create_repositories`. See the parameter deprecation notice in the operation description for details. + * @enum {string} + */ + members_allowed_repository_creation_type?: 'all' | 'private' | 'none' + /** + * @description Whether organization members can create GitHub Pages sites. Existing published sites will not be impacted. + * @default true + */ + members_can_create_pages?: boolean + /** + * @description Whether organization members can fork private organization repositories. + * @default false + */ + members_can_fork_private_repositories?: boolean + /** + * @description Whether contributors to organization repositories are required to sign off on commits they make through GitHub's web interface. + * @default false + */ + web_commit_signoff_required?: boolean + /** @example "http://github.blog" */ + blog?: string } } } } /** - * 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. + * Gets the total GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/add-self-hosted-runner-to-group-for-org': { + 'actions/get-actions-cache-usage-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * The self-hosted runner groups REST API is available with GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)." - * - * - * Removes a self-hosted runner from a group configured in an organization. The runner is then returned to the default group. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. - */ - 'actions/remove-self-hosted-runner-from-group-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner group. */ - runner_group_id: components['parameters']['runner-group-id'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['actions-cache-usage-org-enterprise'] + } } } - responses: { - /** Response */ - 204: never - } } /** - * Lists all self-hosted runners configured in an organization. - * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * Lists repositories and their GitHub Actions cache usage for an organization. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. */ - 'actions/list-self-hosted-runners-for-org': { + 'actions/get-actions-cache-usage-by-repo-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22229,20 +21925,21 @@ export interface operations { content: { 'application/json': { total_count: number - runners: components['schemas']['runner'][] + repository_cache_usages: components['schemas']['actions-cache-usage-by-repository'][] } } } } } /** - * Lists binaries for the runner application that you can download and run. + * 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. + * 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-runner-applications-for-org': { + 'actions/get-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22250,101 +21947,105 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['runner-application'][] + 'application/json': components['schemas']['actions-organization-permissions'] } } } } /** - * 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 + * Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. * - * Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + * 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. * - * ``` - * ./config.sh --url https://github.com/octo-org --token TOKEN - * ``` + * 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/create-registration-token-for-org': { + 'actions/set-github-actions-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 201: { - content: { - 'application/json': components['schemas']['authentication-token'] + 204: never + } + requestBody: { + content: { + 'application/json': { + enabled_repositories: components['schemas']['enabled-repositories'] + allowed_actions?: components['schemas']['allowed-actions'] } } } } /** - * 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. + * 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)." * - * ``` - * ./config.sh remove --token TOKEN - * ``` + * 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/create-remove-token-for-org': { + 'actions/list-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['authentication-token'] + 'application/json': { + total_count: number + repositories: components['schemas']['repository'][] + } } } } } /** - * Gets a specific self-hosted runner configured in an 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. + * 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-self-hosted-runner-for-org': { + 'actions/set-selected-repositories-enabled-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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'] + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs to enable for GitHub Actions. */ + selected_repository_ids: number[] } } } } /** - * 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. + * 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. + * 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/delete-self-hosted-runner-from-org': { + 'actions/enable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { @@ -22353,346 +22054,434 @@ export interface operations { } } /** - * Lists all labels for a self-hosted runner configured in an 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. + * 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-labels-for-self-hosted-runner-for-org': { + 'actions/disable-selected-repository-github-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] + /** Response */ + 204: never } } /** - * Remove all previous custom labels and set the new custom labels for a specific - * self-hosted runner configured in an organization. + * 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. + * 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-custom-labels-for-self-hosted-runner-for-org': { + 'actions/get-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ - labels: string[] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['selected-actions'] } } } } /** - * Add custom labels to a self-hosted runner configured in an 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)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/add-custom-labels-to-self-hosted-runner-for-org': { + 'actions/set-allowed-actions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Response */ + 204: never } requestBody: { content: { - 'application/json': { - /** @description The names of the custom labels to add to the runner. */ - labels: string[] - } + 'application/json': components['schemas']['selected-actions'] } } } /** - * Remove all custom labels from a self-hosted runner configured in an - * organization. Returns the remaining read-only labels from the runner. + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + * as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-all-custom-labels-from-self-hosted-runner-for-org': { + 'actions/get-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] } } responses: { - 200: components['responses']['actions_runner_labels_readonly'] - 404: components['responses']['not_found'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } } } /** - * Remove a custom label from a self-hosted runner configured - * in an organization. Returns the remaining labels from the runner. - * - * This endpoint returns a `404 Not Found` status if the custom label is not - * present on the runner. + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + * can submit approving pull request reviews. For more information, see + * "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)." * - * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + * 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/remove-custom-label-from-self-hosted-runner-for-org': { + 'actions/set-github-actions-default-workflow-permissions-organization': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the self-hosted runner. */ - runner_id: components['parameters']['runner-id'] - /** The name of a self-hosted runner's custom label. */ - name: components['parameters']['runner-label-name'] } } responses: { - 200: components['responses']['actions_runner_labels'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** Only return runner groups that are allowed to be used by this repository. */ + visible_to_repository?: components['parameters']['visible-to-repository'] } } responses: { /** Response */ 200: { - headers: {} content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-actions-secret'][] + runner_groups: components['schemas']['runner-groups-org'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['runner-groups-org'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Name of the runner group. */ + name: string + /** + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories. + * @default all + * @enum {string} + */ + visibility?: 'selected' | 'all' | 'private' + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids?: number[] + /** @description List of runner IDs to add to the runner group. */ + runners?: number[] + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-actions-secret'] + 'application/json': components['schemas']['runner-groups-org'] } } } } /** - * Creates or updates an organization secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - * use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/create-or-update-org-secret': { + 'actions/delete-self-hosted-runner-group-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + 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']['empty-object'] + 'application/json': components['schemas']['runner-groups-org'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + /** @description Name of the runner group. */ + name: string /** - * @description Configures the access that repositories have to the organization secret. Can be one of: - * \- `all` - All repositories in an organization can access the secret. - * \- `private` - Private repositories in an organization can access the secret. - * \- `selected` - Only specific repositories can access the secret. + * @description Visibility of a runner group. You can select all repositories, select individual repositories, or all private repositories. * @enum {string} */ - visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] + visibility?: 'selected' | 'all' | 'private' + /** + * @description Whether the runner group can be used by `public` repositories. + * @default false + */ + allows_public_repositories?: boolean + /** + * @description If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array. + * @default false + */ + restricted_to_workflows?: boolean + /** @description List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`. */ + selected_workflows?: string[] } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { /** Response */ 204: never } + requestBody: { + content: { + 'application/json': { + /** @description List of repository IDs that can access the runner group. */ + selected_repository_ids: number[] + } + } + } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** + * 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: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - repositories: components['schemas']['minimal-repository'][] + runners: components['schemas']['runner'][] } } } } } - /** 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': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] } } responses: { @@ -22702,96 +22491,92 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids: number[] + /** @description List of runner IDs to add to the runner group. */ + runners: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/add-selected-repo-to-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** 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: { - /** No Content when repository was added to the selected list */ + /** Response */ 204: never - /** Conflict when visibility type is not set to selected */ - 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint. */ - 'actions/remove-selected-repo-from-org-secret': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** Unique identifier of the self-hosted runner group. */ + runner_group_id: components['parameters']['runner-group-id'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response when repository was removed from the selected list */ + /** Response */ 204: never - /** Conflict when visibility type not set to selected */ - 409: unknown } } /** - * 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)." + * Lists all self-hosted runners configured in an organization. * - * This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/get-audit-log': { + 'actions/list-self-hosted-runners-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['audit-log-event'][] + 'application/json': { + total_count: number + runners: components['schemas']['runner'][] + } } } } } - /** List the users blocked by an organization. */ - 'orgs/list-blocked-users': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22799,151 +22584,243 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['runner-application'][] } } - 415: components['responses']['preview_header_missing'] } } - 'orgs/check-blocked-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { - /** If the user is blocked: */ - 204: never - /** If the user is not blocked: */ - 404: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['authentication-token'] } } } } - 'orgs/block-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] + 201: { + content: { + 'application/json': components['schemas']['authentication-token'] + } + } } } - 'orgs/unblock-user': { + /** + * 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - username: components['parameters']['username'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['runner'] + } + } } } /** - * Lists all code scanning alerts for the default branch (usually `main` - * or `master`) for all eligible repositories in an organization. - * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * 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. * - * GitHub Apps must have the `security_events` read permission to use this endpoint. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'code-scanning/list-alerts-for-org': { + 'actions/delete-self-hosted-runner-from-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - query: { - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. */ - before?: components['parameters']['pagination-before'] - /** A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. */ - after?: components['parameters']['pagination-after'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - /** Can be one of `created`, `updated`. */ - sort?: 'created' | 'updated' + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['code-scanning-organization-alert-items'][] - } + 204: never + } + } + /** + * Lists all labels for a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/list-labels-for-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - 403: components['responses']['code_scanning_forbidden_read'] + } + responses: { + 200: components['responses']['actions_runner_labels'] 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all previous custom labels and set the new custom labels for a specific + * self-hosted runner configured in an organization. * - * An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/list-saml-sso-authorizations': { + 'actions/set-custom-labels-for-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list of credentials authorizations for an organization to a specific login */ - login?: string + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to set for the runner. You can pass an empty array to remove all custom labels. */ + labels: string[] + } + } + } + } + /** + * Add custom labels to a self-hosted runner configured in an organization. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/add-custom-labels-to-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + 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']['credential-authorization'][] + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The names of the custom labels to add to the runner. */ + labels: string[] } } } } /** - * Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + * Remove all custom labels from a self-hosted runner configured in an + * organization. Returns the remaining read-only labels from the runner. * - * 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. + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. */ - 'orgs/remove-saml-sso-authorization': { + 'actions/remove-all-custom-labels-from-self-hosted-runner-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - credential_id: number + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] } } responses: { - /** Response */ - 204: never + 200: components['responses']['actions_runner_labels_readonly'] 404: components['responses']['not_found'] } } - /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-org-secrets': { + /** + * Remove a custom label from a self-hosted runner configured + * in an organization. Returns the remaining labels from the runner. + * + * This endpoint returns a `404 Not Found` status if the custom label is not + * present on the runner. + * + * You must authenticate using an access token with the `admin:org` scope to use this endpoint. + */ + 'actions/remove-custom-label-from-self-hosted-runner-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** Unique identifier of the self-hosted runner. */ + runner_id: components['parameters']['runner-id'] + /** The name of a self-hosted runner's custom label. */ + name: components['parameters']['runner-label-name'] + } + } + responses: { + 200: components['responses']['actions_runner_labels'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + } + /** Lists 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -22956,16 +22833,17 @@ export interface operations { content: { 'application/json': { total_count: number - secrets: components['schemas']['organization-dependabot-secret'][] + secrets: components['schemas']['organization-actions-secret'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-public-key': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -22973,17 +22851,18 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + '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 `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/get-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -22991,7 +22870,7 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['organization-dependabot-secret'] + 'application/json': components['schemas']['organization-actions-secret'] } } } @@ -22999,8 +22878,8 @@ export interface operations { /** * Creates or updates an organization secret with an encrypted value. Encrypt your secret using * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - * permission to use this endpoint. + * 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 * @@ -23073,11 +22952,12 @@ export interface operations { * puts Base64.strict_encode64(encrypted_secret) * ``` */ - 'dependabot/create-or-update-org-secret': { + 'actions/create-or-update-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23094,30 +22974,28 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string /** - * @description 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. + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. * @enum {string} */ visibility: 'all' | 'private' | 'selected' - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ - selected_repository_ids?: string[] + /** @description 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/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: number[] } } } } - /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/delete-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23126,18 +23004,19 @@ export interface operations { 204: never } } - /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/list-selected-repos-for-org-secret': { + /** 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } query: { /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -23153,12 +23032,13 @@ export interface operations { } } } - /** Replaces all repositories for an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/set-selected-repos-for-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -23169,18 +23049,19 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Add selected repository to an organization secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) endpoints. */ selected_repository_ids: number[] } } } } - /** Adds a repository to an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/add-selected-repo-to-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23192,12 +23073,13 @@ export interface operations { 409: unknown } } - /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ - 'dependabot/remove-selected-repo-from-org-secret': { + /** 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] repository_id: number } @@ -23209,13 +23091,45 @@ export interface operations { 409: unknown } } - 'activity/list-public-org-events': { - parameters: { - path: { - org: components['parameters']['org'] + /** + * Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. + * + * By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + * + * Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." + */ + 'orgs/get-audit-log': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** A search phrase. For more information, see [Searching the audit log](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23225,72 +23139,345 @@ export interface operations { /** Response */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['audit-log-event'][] } } } } /** - * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'teams/external-idp-group-info-for-org': { + 'code-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** group_id parameter */ - group_id: components['parameters']['group-id'] + } + 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'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results before this cursor. */ + before?: components['parameters']['pagination-before'] + /** A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for results after this cursor. */ + after?: components['parameters']['pagination-after'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['external-group'] + 'application/json': components['schemas']['code-scanning-organization-alert-items'][] + } + } + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] + } + } + /** Lists all secrets available in an organization without revealing their encrypted values. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-org-secrets': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + 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-dependabot-secret'][] + } + } + } + } + } + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-public-key': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['dependabot-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 `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/get-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['organization-dependabot-secret'] } } } } /** - * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * Creates or updates an organization secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + * permission to use this endpoint. + * + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/list-external-idp-groups-for-org': { + 'dependabot/create-or-update-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response when creating a secret */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + /** Response when updating a secret */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an organization public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string + /** + * @description Which type of organization repositories have access to the organization secret. `selected` means only the repositories specified by `selected_repository_ids` can access the secret. + * @enum {string} + */ + visibility: 'all' | 'private' | 'selected' + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can manage the list of selected repositories using the [List selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids?: string[] + } + } + } + } + /** Deletes a secret in an organization using the secret name. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/delete-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** Lists all repositories that have been selected when the `visibility` for repository access to a secret is set to `selected`. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/list-selected-repos-for-org-secret': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } query: { - /** Results per page (max 100) */ + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page token */ - page?: number - /** Limits the list to groups containing the text in the group name */ - display_name?: string } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['external-groups'] + 'application/json': { + total_count: number + repositories: components['schemas']['minimal-repository'][] + } + } + } + } + } + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/set-selected-repos-for-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description An array of repository ids that can access the organization secret. You can only provide a list of repository ids when the `visibility` is set to `selected`. You can add and remove individual repositories using the [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) endpoints. */ + selected_repository_ids: number[] } } } } - /** 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': { + /** 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/add-selected-repo-to-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** No Content when repository was added to the selected list */ + 204: never + /** Conflict when visibility type is not set to selected */ + 409: unknown + } + } + /** Removes a repository from an organization secret when the `visibility` for repository access is set to `selected`. The visibility is set when you [Create or update an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization permission to use this endpoint. */ + 'dependabot/remove-selected-repo-from-org-secret': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + repository_id: number + } + } + responses: { + /** Response when repository was removed from the selected list */ + 204: never + /** Conflict when visibility type not set to selected */ + 409: unknown + } + } + 'activity/list-public-org-events': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23299,21 +23486,75 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': components['schemas']['event'][] + } + } + } + } + /** + * Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/external-idp-group-info-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The unique identifier of the group. */ + group_id: components['parameters']['group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-group'] + } + } + } + } + /** + * Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-external-idp-groups-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page token */ + page?: number + /** Limits the list to groups containing the text in the group name */ + display_name?: string + } + } + responses: { + /** Response */ + 200: { + headers: { + Link?: string + } + content: { + 'application/json': components['schemas']['external-groups'] } } - 404: components['responses']['not_found'] } } 'orgs/list-webhooks': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23334,6 +23575,7 @@ export interface operations { 'orgs/create-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23355,7 +23597,7 @@ export interface operations { 'application/json': { /** @description Must be passed as "web". */ name: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-hook-config-params). */ config: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23367,7 +23609,7 @@ export interface operations { password?: string } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23386,7 +23628,9 @@ export interface operations { 'orgs/get-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23403,7 +23647,9 @@ export interface operations { 'orgs/delete-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23417,7 +23663,9 @@ export interface operations { 'orgs/update-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23434,7 +23682,7 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). */ + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-hook-config-params). */ config?: { url: components['schemas']['webhook-config-url'] content_type?: components['schemas']['webhook-config-content-type'] @@ -23442,7 +23690,7 @@ export interface operations { insecure_ssl?: components['schemas']['webhook-config-insecure-ssl'] } /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. * @default [ * "push" * ] @@ -23467,7 +23715,9 @@ export interface operations { 'orgs/get-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23488,7 +23738,9 @@ export interface operations { 'orgs/update-webhook-config-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23515,11 +23767,13 @@ export interface operations { 'orgs/list-webhook-deliveries': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ cursor?: components['parameters']['cursor'] @@ -23540,7 +23794,9 @@ export interface operations { 'orgs/get-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23560,7 +23816,9 @@ export interface operations { 'orgs/redeliver-webhook-delivery': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] delivery_id: components['parameters']['delivery-id'] } @@ -23571,11 +23829,13 @@ export interface operations { 422: components['responses']['validation_failed'] } } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ 'orgs/ping-webhook': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the hook. */ hook_id: components['parameters']['hook-id'] } } @@ -23588,11 +23848,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-org-installation': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -23609,10 +23870,11 @@ export interface operations { 'orgs/list-app-installations': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23631,203 +23893,34 @@ export interface operations { } } } - /** Shows which type of GitHub user can interact with this organization and when the restriction expires. If there is no restrictions, you will see an empty response. */ - 'interactions/get-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - } - } - /** Temporarily restricts interactions to a certain type of GitHub user in any public repository in the given organization. You must be an organization owner to set these restrictions. Setting the interaction limit at the organization level will overwrite any interaction limits that are set for individual repositories owned by the organization. */ - 'interactions/set-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes all interaction restrictions from public repositories in the given organization. You must be an organization owner to remove restrictions. */ - 'interactions/remove-restrictions-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** The return hash contains a `role` field which refers to the Organization Invitation role and will be one of the following values: `direct_member`, `admin`, `billing_manager`, `hiring_manager`, or `reinstate`. If the invitee is not a GitHub member, the `login` field in the return hash will be `null`. */ - 'orgs/list-pending-invitations': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['organization-invitation'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'orgs/create-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['organization-invitation'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description **Required unless you provide `email`**. GitHub user ID for the person you are inviting. */ - invitee_id?: number - /** @description **Required unless you provide `invitee_id`**. Email address of the person you are inviting, which can be an existing GitHub user. */ - email?: string - /** - * @description Specify role for new member. Can be one of: - * \* `admin` - Organization owners with full administrative rights to the organization and complete access to all repositories and teams. - * \* `direct_member` - Non-owner organization members with ability to see other members and join teams by invitation. - * \* `billing_manager` - Non-owner organization members with ability to manage the billing settings of your organization. - * @default direct_member - * @enum {string} - */ - role?: 'admin' | 'direct_member' | 'billing_manager' - /** @description Specify IDs for the teams you want to invite new members to. */ - team_ids?: number[] - } - } - } - } - /** - * Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). - */ - 'orgs/cancel-invitation': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - } - /** List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner. */ - 'orgs/list-invitation-teams': { - parameters: { - path: { - org: components['parameters']['org'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['team'][] - } - } - 404: components['responses']['not_found'] - } - } /** * List issues in an organization assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23848,23 +23941,15 @@ export interface operations { 'orgs/list-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ 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 members returned in the list. `2fa_disabled` means that only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. This options is only available for organization owners. */ 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. - */ + /** Filter members returned by their role. */ role?: 'all' | 'admin' | 'member' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -23878,8 +23963,6 @@ export interface operations { 'application/json': components['schemas']['simple-user'][] } } - /** Response if requester is not an organization member */ - 302: never 422: components['responses']['validation_failed'] } } @@ -23887,7 +23970,9 @@ export interface operations { 'orgs/check-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23904,7 +23989,9 @@ export interface operations { 'orgs/remove-member': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23918,7 +24005,9 @@ export interface operations { 'orgs/get-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23936,7 +24025,7 @@ export interface operations { /** * 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. + * * 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/enterprise-server@3.6/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. * @@ -23947,7 +24036,9 @@ export interface operations { 'orgs/set-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23984,7 +24075,9 @@ export interface operations { 'orgs/remove-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -23999,10 +24092,11 @@ export interface operations { 'migrations/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24024,6 +24118,7 @@ export interface operations { 'migrations/start-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24048,6 +24143,16 @@ export interface operations { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @default false + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @default false + */ + exclude_git_data?: boolean /** * @description Indicates whether attachments should be excluded from the migration (to reduce migration archive file size). * @default false @@ -24066,6 +24171,13 @@ export interface operations { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean + /** @description Exclude related items from being returned in the response in order to improve performance of the request. The array can include any of: `"repositories"`. */ exclude?: 'repositories'[] } } @@ -24084,8 +24196,9 @@ export interface operations { 'migrations/get-status-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { @@ -24108,96 +24221,20 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Fetches the URL to a migration archive. */ - 'migrations/download-archive-for-org': { + /** List all users who are outside collaborators of an organization. */ + 'orgs/list-outside-collaborators': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 302: never - 404: components['responses']['not_found'] - } - } - /** Deletes a previous migration archive. Migration archives are automatically deleted after seven days. */ - 'migrations/delete-archive-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository that was locked for migration. You should unlock each migrated repository and [delete them](https://docs.github.com/rest/reference/repos#delete-a-repository) when the migration is complete and you no longer need the source data. */ - 'migrations/unlock-repo-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** List all the repositories for this organization migration. */ - 'migrations/list-repos-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['minimal-repository'][] - } - } - 404: components['responses']['not_found'] - } - } - /** List all users who are outside collaborators of an organization. */ - 'orgs/list-outside-collaborators': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** - * Filter the list of outside collaborators. Can be one of: - * \* `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled. - * \* `all`: All outside collaborators. - */ - filter?: '2fa_disabled' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + } + query: { + /** Filter the list of outside collaborators. `2fa_disabled` means that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) enabled will be returned. */ + filter?: '2fa_disabled' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { @@ -24210,11 +24247,13 @@ export interface operations { } } } - /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". */ + /** When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 'orgs/convert-member-to-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24227,16 +24266,29 @@ export interface operations { } /** User was converted */ 204: never - /** Forbidden if user is the last owner of the organization or not a member of the organization */ + /** Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." */ 403: unknown 404: components['responses']['not_found'] } + requestBody: { + content: { + 'application/json': { + /** + * @description When set to `true`, the request will be performed asynchronously. Returns a 202 status code when the job is successfully queued. + * @default false + */ + async?: boolean + } + } + } } /** Removing a user from this list will remove them from all the organization's repositories. */ 'orgs/remove-outside-collaborator': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24254,249 +24306,110 @@ export interface operations { } } } - /** - * Lists all packages in an organization readable by the user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-organization': { + /** List all pre-receive hooks that are enabled or testing for this organization as well as any disabled hooks that can be configured at the organization level. Globally disabled pre-receive hooks that do not allow downstream configuration are not listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-org': { parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The sort order for the response collection. */ + sort?: 'created' | 'updated' | 'name' + } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'][] + 'application/json': components['schemas']['org-pre-receive-hook'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] } } - /** - * Gets a specific package in an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-organization': { + 'enterprise-admin/get-pre-receive-hook-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } } - /** - * Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-org': { + /** Removes any overrides for this hook at the org level for this org. */ + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by an organization. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'][] + 'application/json': components['schemas']['org-pre-receive-hook'] } } - 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': { + /** For pre-receive hooks which are allowed to be configured at the org level, you can set `enforcement` and `allow_downstream_configuration` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-org': { parameters: { path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['package-version'] + 'application/json': components['schemas']['org-pre-receive-hook'] } } } - } - /** - * Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] + requestBody: { + content: { + 'application/json': { + /** @description The state of enforcement for the hook on this repository. */ + enforcement?: string + /** @description Whether repositories can override enforcement. */ + allow_downstream_configuration?: boolean + } } } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version in an organization. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-org': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - org: components['parameters']['org'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } } /** Lists the projects in an organization. Returns a `404 Not Found` status if projects are disabled in the organization. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24513,10 +24426,11 @@ export interface operations { 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. */ + /** Creates an organization project board. Returns a `410 Gone` status if projects are disabled in the organization or if the organization does not have existing classic projects. 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24548,10 +24462,11 @@ export interface operations { 'orgs/list-public-members': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24570,7 +24485,9 @@ export interface operations { 'orgs/check-public-membership-for-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24584,12 +24501,14 @@ export interface operations { /** * 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)." + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'orgs/set-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24602,7 +24521,9 @@ export interface operations { 'orgs/remove-public-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -24615,16 +24536,17 @@ export interface operations { 'repos/list-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Specifies the types of repositories you want returned. Can be one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, `member`, `internal`. Default: `all`. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ + /** Specifies the types of repositories you want returned. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. However, the `internal` value is not yet supported when a GitHub App calls this API with an installation access token. */ type?: 'all' | 'public' | 'private' | 'forks' | 'sources' | 'member' | 'internal' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: when using `full_name`: `asc`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24645,7 +24567,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository @@ -24653,6 +24575,7 @@ export interface operations { 'repos/create-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24744,6 +24667,46 @@ export interface operations { * @default false */ delete_branch_on_merge?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' } } } @@ -24751,12 +24714,14 @@ export interface operations { /** * Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. * To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ 'secret-scanning/list-alerts-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { @@ -24764,15 +24729,19 @@ export interface operations { state?: components['parameters']['secret-scanning-alert-state'] /** * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. */ secret_type?: components['parameters']['secret-scanning-alert-secret-type'] /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -24789,39 +24758,22 @@ export interface operations { } } /** - * Gets the summary of the free and paid GitHub Actions minutes used. + * Gets the GitHub Advanced Security active committers for an organization per repository. * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-actions-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } - } - } - /** - * Gets the GitHub Advanced Security active committers for an organization per repository. - * Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - * If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + * + * The total number of repositories with committer information is tracked by the `total_count` field. */ 'billing/get-github-advanced-security-billing-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24837,87 +24789,15 @@ export interface operations { 403: components['responses']['code_scanning_forbidden_read'] } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-github-packages-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `repo` or `admin:org` scope. - */ - 'billing/get-shared-storage-billing-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." - */ - 'teams/list-idp-groups-for-org': { - parameters: { - path: { - org: components['parameters']['org'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page token */ - page?: string - } - } - responses: { - /** Response */ - 200: { - headers: { - Link?: string - } - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } /** Lists all teams in an organization that are visible to the authenticated user. */ 'teams/list': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -24942,6 +24822,7 @@ export interface operations { 'teams/create': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -24979,29 +24860,30 @@ export interface operations { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ permission?: 'pull' | 'push' /** @description The ID of a team to set as the parent team. */ parent_team_id?: number + /** @description The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the "[Update LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" endpoint to change the LDAP DN. For more information, see "[Using LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." */ + ldap_dn?: string } } } } /** - * Gets a team using the team's `slug`. GitHub generates the `slug` from the team `name`. + * Gets a team using the team's `slug`. GitHub Enterprise Server 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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25025,8 +24907,9 @@ export interface operations { 'teams/delete-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25043,18 +24926,28 @@ export interface operations { 'teams/update-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ 201: { content: { 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { @@ -25074,10 +24967,7 @@ export interface operations { */ privacy?: 'secret' | 'closed' /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. * @default pull * @enum {string} */ @@ -25089,21 +24979,22 @@ export interface operations { } } /** - * 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/). + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25122,17 +25013,18 @@ export interface operations { } } /** - * 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/). + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. */ 'teams/create-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25161,16 +25053,18 @@ export interface operations { } } /** - * 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 a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25184,16 +25078,18 @@ export interface operations { } } /** - * 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 a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25203,16 +25099,18 @@ export interface operations { } } /** - * 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/). + * 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/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25236,22 +25134,24 @@ export interface operations { } } /** - * 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/). + * List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } query: { - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25268,18 +25168,20 @@ export interface operations { } } /** - * 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/). + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. */ 'teams/create-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25301,17 +25203,20 @@ export interface operations { } } /** - * 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 a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25325,17 +25230,20 @@ export interface operations { } } /** - * 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/). + * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25345,17 +25253,20 @@ export interface operations { } } /** - * 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/). + * Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } @@ -25377,23 +25288,26 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25410,22 +25324,25 @@ export interface operations { } } /** - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. */ 'reactions/create-for-team-discussion-comment-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] } } responses: { - /** Response */ + /** Response when the reaction type has already been added to this team discussion comment */ 200: { content: { 'application/json': components['schemas']['reaction'] @@ -25442,7 +25359,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25453,16 +25370,20 @@ export interface operations { /** * **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 a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion-comment': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ comment_number: components['parameters']['comment-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25472,22 +25393,24 @@ export interface operations { } } /** - * 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/). + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ 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. */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25504,16 +25427,18 @@ export interface operations { } } /** - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. */ 'reactions/create-for-team-discussion-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] } } @@ -25535,7 +25460,7 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. * @enum {string} */ content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' @@ -25546,15 +25471,18 @@ export interface operations { /** * **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 a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'reactions/delete-for-team-discussion': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The number that identifies the discussion. */ discussion_number: components['parameters']['discussion-number'] + /** The unique identifier of the reaction. */ reaction_id: components['parameters']['reaction-id'] } } @@ -25563,16 +25491,40 @@ export interface operations { 204: never } } + /** + * Lists a connection between a team and an external group. + * + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + */ + 'teams/list-linked-external-idp-groups-to-team-for-org': { + parameters: { + path: { + /** The organization name. The name is not case sensitive. */ + org: components['parameters']['org'] + /** The slug of the team name. */ + team_slug: components['parameters']['team-slug'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['external-groups'] + } + } + } + } /** * Deletes a connection between a team and an external group. * - * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'teams/unlink-external-idp-group-from-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25584,13 +25536,14 @@ export interface operations { /** * Creates a connection between a team and an external group. Only one external group can be linked to a team. * - * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + * You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. */ 'teams/link-external-idp-group-to-team-for-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } } @@ -25614,35 +25567,6 @@ export interface operations { } } } - /** - * 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. * @@ -25651,19 +25575,15 @@ export interface operations { 'teams/list-members-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ 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. - */ + /** Filters members returned by their role in the team. */ role?: 'member' | 'maintainer' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25689,14 +25609,16 @@ export interface operations { * **Note:** * The response contains the `state` of the membership and the member's `role`. * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ 'teams/get-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25716,7 +25638,7 @@ export interface operations { * * Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. * @@ -25727,9 +25649,11 @@ export interface operations { 'teams/add-or-update-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25749,9 +25673,7 @@ export interface operations { content: { 'application/json': { /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. + * @description The role that this user should have in the team. * @default member * @enum {string} */ @@ -25765,16 +25687,18 @@ export interface operations { * * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** 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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * * **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. */ 'teams/remove-membership-for-user-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -25793,12 +25717,13 @@ export interface operations { 'teams/list-projects-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25822,9 +25747,11 @@ export interface operations { 'teams/check-permissions-for-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25847,9 +25774,11 @@ export interface operations { 'teams/add-or-update-project-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25870,11 +25799,7 @@ export interface operations { content: { 'application/json': { /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." * @enum {string} */ permission?: 'read' | 'write' | 'admin' @@ -25890,9 +25815,11 @@ export interface operations { 'teams/remove-project-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -25909,12 +25836,13 @@ export interface operations { 'teams/list-repos-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -25933,7 +25861,7 @@ export interface operations { /** * 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. + * 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/enterprise-server@3.6/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. * @@ -25942,10 +25870,13 @@ export interface operations { 'teams/check-permissions-for-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -25963,7 +25894,7 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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}`. * @@ -25972,10 +25903,13 @@ export interface operations { 'teams/add-or-update-repo-permissions-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -25987,19 +25921,10 @@ export interface operations { content: { 'application/json': { /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * \* `maintain` - team members can manage the repository without access to sensitive or destructive actions. Recommended for project managers. Only applies to repositories owned by organizations. - * \* `triage` - team members can proactively manage issues and pull requests without write access. Recommended for contributors who triage a repository. Only applies to repositories owned by organizations. - * \* custom repository role name - A custom repository role if the owning organization has defined any. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @description The permission to grant the team on 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. * @default push - * @enum {string} */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' + permission?: string } } } @@ -26012,10 +25937,13 @@ export interface operations { 'teams/remove-repo-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26024,69 +25952,6 @@ export interface operations { 204: never } } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * List IdP groups connected to a team on GitHub. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/list-idp-groups-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - } - /** - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Creates, updates, or removes a connection between a team and an IdP group. When adding groups to a team, you must include all new and existing groups to avoid replacing existing groups with the new ones. Specifying an empty `groups` array will remove all connections for a team. - * - * **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. - */ - 'teams/create-or-update-idp-group-connections-in-org': { - parameters: { - path: { - org: components['parameters']['org'] - /** team_slug parameter */ - team_slug: components['parameters']['team-slug'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups?: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - }[] - } - } - } - } /** * Lists the child teams of the team specified by `{team_slug}`. * @@ -26095,12 +25960,13 @@ export interface operations { 'teams/list-child-in-org': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] - /** team_slug parameter */ + /** The slug of the team name. */ team_slug: components['parameters']['team-slug'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26119,7 +25985,7 @@ export interface operations { 'projects/get-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26139,7 +26005,7 @@ export interface operations { 'projects/delete-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26164,7 +26030,7 @@ export interface operations { 'projects/update-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26201,7 +26067,7 @@ export interface operations { 'projects/move-card': { parameters: { path: { - /** card_id parameter */ + /** The unique identifier of the card. */ card_id: components['parameters']['card-id'] } } @@ -26265,7 +26131,7 @@ export interface operations { 'projects/get-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26285,7 +26151,7 @@ export interface operations { 'projects/delete-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26300,7 +26166,7 @@ export interface operations { 'projects/update-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26330,13 +26196,13 @@ export interface operations { 'projects/list-cards': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ 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`. */ + /** Filters the project cards that are returned by the card's state. */ archived_state?: 'all' | 'archived' | 'not_archived' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26358,7 +26224,7 @@ export interface operations { 'projects/create-card': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26421,7 +26287,7 @@ export interface operations { 'projects/move-column': { parameters: { path: { - /** column_id parameter */ + /** The unique identifier of the column. */ column_id: components['parameters']['column-id'] } } @@ -26453,6 +26319,7 @@ export interface operations { 'projects/get': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26472,6 +26339,7 @@ export interface operations { 'projects/delete': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26498,6 +26366,7 @@ export interface operations { 'projects/update': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26558,17 +26427,13 @@ export interface operations { 'projects/list-collaborators': { parameters: { path: { + /** The unique identifier of the project. */ 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. - */ + /** Filters the collaborators by their affiliation. `outside` means outside collaborators of a project that are not a member of the project's organization. `direct` means collaborators with permissions to a project, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26593,7 +26458,9 @@ export interface operations { 'projects/add-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26624,7 +26491,9 @@ export interface operations { 'projects/remove-collaborator': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26642,7 +26511,9 @@ export interface operations { 'projects/get-permission-for-user': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -26663,10 +26534,11 @@ export interface operations { 'projects/list-columns': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26688,6 +26560,7 @@ export interface operations { 'projects/create-column': { parameters: { path: { + /** The unique identifier of the project. */ project_id: components['parameters']['project-id'] } } @@ -26734,31 +26607,13 @@ export interface operations { 404: components['responses']['not_found'] } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Reactions API. We recommend migrating your existing code to use the new delete reactions endpoints. For more information, see this [blog post](https://developer.github.com/changes/2020-02-26-new-delete-reactions-endpoints/). - * - * OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), when deleting a [team discussion](https://docs.github.com/rest/reference/teams#discussions) or [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). - */ - 'reactions/delete-legacy': { - parameters: { - path: { - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 410: components['responses']['gone'] - } - } /** The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network. */ 'repos/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26783,7 +26638,9 @@ export interface operations { 'repos/delete': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26803,11 +26660,13 @@ export interface operations { 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. */ + /** **Note**: To edit a repository's topics, use the [Replace all repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) endpoint. */ 'repos/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -26834,7 +26693,7 @@ export interface operations { homepage?: string /** * @description Either `true` to make the repository private or `false` to make it public. Default: `false`. - * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. + * **Note**: You will get a `422` error if the organization restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) to organization owners and a non-owner tries to change the value of private. * @default false */ private?: boolean @@ -26843,7 +26702,16 @@ export interface operations { * @enum {string} */ visibility?: 'public' | 'private' | 'internal' - /** @description Specify which security and analysis features to enable or disable. For example, to enable GitHub Advanced Security, use this data in the body of the PATCH request: `{"security_and_analysis": {"advanced_security": {"status": "enabled"}}}`. If you have admin permissions for a private repository covered by an Advanced Security license, you can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. */ + /** + * @description Specify which security and analysis features to enable or disable for the repository. + * + * To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + * + * For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + * `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + * + * You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + */ security_and_analysis?: { /** @description Use the `status` property to enable or disable GitHub Advanced Security for this repository. For more information, see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." */ advanced_security?: { @@ -26855,6 +26723,11 @@ export interface operations { /** @description Can be `enabled` or `disabled`. */ status?: string } + /** @description Use the `status` property to enable or disable secret scanning push protection for this repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." */ + secret_scanning_push_protection?: { + /** @description Can be `enabled` or `disabled`. */ + status?: string + } } | null /** * @description Either `true` to enable issues for this repository or `false` to disable them. @@ -26903,6 +26776,51 @@ export interface operations { * @default false */ delete_branch_on_merge?: boolean + /** + * @description Either `true` to always allow a pull request head branch that is behind its base branch to be updated even if it is not required to be up to date before merging, or false otherwise. + * @default false + */ + allow_update_branch?: boolean + /** + * @deprecated + * @description Either `true` to allow squash-merge commits to use pull request title, or `false` to use commit message. **This property has been deprecated. Please use `squash_merge_commit_title` instead. + * @default false + */ + use_squash_pr_title_as_default?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description `true` to archive this repository. **Note**: You cannot unarchive repositories through the API. * @default false @@ -26913,6 +26831,11 @@ export interface operations { * @default false */ allow_forking?: boolean + /** + * @description Either `true` to require contributors to sign off on web-based commits, or `false` to not require contributors to sign off on web-based commits. + * @default false + */ + web_commit_signoff_required?: boolean } } } @@ -26921,11 +26844,13 @@ export interface operations { 'actions/list-artifacts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -26948,9 +26873,11 @@ export interface operations { 'actions/get-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -26967,9 +26894,11 @@ export interface operations { 'actions/delete-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] } } @@ -26987,9 +26916,11 @@ export interface operations { 'actions/download-artifact': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** artifact_id parameter */ + /** The unique identifier of the artifact. */ artifact_id: components['parameters']['artifact-id'] archive_format: string } @@ -26997,15 +26928,88 @@ export interface operations { responses: { /** Response */ 302: never + 410: components['responses']['gone'] + } + } + /** + * Gets GitHub Actions cache usage for a repository. + * The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + * 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-actions-cache-usage': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-by-repository'] + } + } + } + } + /** + * Gets GitHub Actions cache usage policy for a repository. + * You must authenticate using an access token with the `repo` scope to use this endpoint. + * GitHub Apps must have the `actions:read` permission to use this endpoint. + */ + 'actions/get-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } + } + } + } + /** + * Sets GitHub Actions cache usage policy for a repository. + * 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/set-actions-cache-usage-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-cache-usage-policy-for-repository'] + } } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27027,9 +27031,11 @@ export interface operations { 'actions/download-job-logs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** job_id parameter */ + /** The unique identifier of the job. */ job_id: components['parameters']['job-id'] } } @@ -27038,16 +27044,50 @@ export interface operations { 302: never } } + /** Re-run a job and its dependent jobs in 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/re-run-job-for-workflow-run': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the job. */ + job_id: components['parameters']['job-id'] + } + } + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['empty-object'] + } + } + 403: components['responses']['forbidden'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } + } /** * 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. + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27070,7 +27110,9 @@ export interface operations { 'actions/set-github-actions-permissions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27087,6 +27129,57 @@ export interface operations { } } } + /** + * Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/get-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } + } + /** + * Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + * This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + * repository `administration` permission to use this endpoint. + */ + 'actions/set-workflow-access-to-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-workflow-access-to-repository'] + } + } + } /** * 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)." * @@ -27095,7 +27188,9 @@ export interface operations { 'actions/get-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27120,7 +27215,9 @@ export interface operations { 'actions/set-allowed-actions-repository': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27134,15 +27231,70 @@ export interface operations { } } } + /** + * Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + * as well as if GitHub Actions can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/get-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['actions-get-default-workflow-permissions'] + } + } + } + } + /** + * Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + * can submit approving pull request reviews. + * For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + */ + 'actions/set-github-actions-default-workflow-permissions-repository': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Success response */ + 204: never + /** Conflict response when changing a setting is prevented by the owning organization or enterprise */ + 409: unknown + } + requestBody: { + content: { + 'application/json': components['schemas']['actions-set-default-workflow-permissions'] + } + } + } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27169,7 +27321,9 @@ export interface operations { 'actions/list-runner-applications-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27197,7 +27351,9 @@ export interface operations { 'actions/create-registration-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27225,7 +27381,9 @@ export interface operations { 'actions/create-remove-token-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27247,7 +27405,9 @@ export interface operations { 'actions/get-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27271,7 +27431,9 @@ export interface operations { 'actions/delete-self-hosted-runner-from-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27291,7 +27453,9 @@ export interface operations { 'actions/list-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27312,7 +27476,9 @@ export interface operations { 'actions/set-custom-labels-for-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27341,7 +27507,9 @@ export interface operations { 'actions/add-custom-labels-to-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27371,7 +27539,9 @@ export interface operations { 'actions/remove-all-custom-labels-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27395,7 +27565,9 @@ export interface operations { 'actions/remove-custom-label-from-self-hosted-runner-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** Unique identifier of the self-hosted runner. */ runner_id: components['parameters']['runner-id'] @@ -27410,14 +27582,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -27427,13 +27601,13 @@ export interface operations { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -27458,9 +27632,11 @@ export interface operations { 'actions/get-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { @@ -27485,9 +27661,11 @@ export interface operations { 'actions/delete-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27500,9 +27678,11 @@ export interface operations { 'actions/get-reviews-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27515,42 +27695,19 @@ export interface operations { } } } - /** - * Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." - * - * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. - */ - 'actions/approve-workflow-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The id of the workflow run. */ - run_id: components['parameters']['run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['empty-object'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists artifacts for a workflow run. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. */ 'actions/list-workflow-run-artifacts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27578,9 +27735,11 @@ export interface operations { 'actions/get-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27599,19 +27758,21 @@ export interface operations { } } } - /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). */ + /** Lists jobs for a specific workflow run attempt. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run-attempt': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27640,9 +27801,11 @@ export interface operations { 'actions/download-workflow-run-attempt-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] /** The attempt number of the workflow run. */ attempt_number: components['parameters']['attempt-number'] @@ -27657,9 +27820,11 @@ export interface operations { 'actions/cancel-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27667,28 +27832,27 @@ export interface operations { /** Response */ 202: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } + 409: components['responses']['conflict'] } } - /** 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). */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). */ 'actions/list-jobs-for-workflow-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier 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. - */ + /** Filters jobs by their `completed_at` timestamp. `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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27716,9 +27880,11 @@ export interface operations { 'actions/download-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27731,9 +27897,11 @@ export interface operations { 'actions/delete-workflow-run-logs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27752,9 +27920,11 @@ export interface operations { 'actions/get-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27770,14 +27940,16 @@ export interface operations { /** * 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. + * Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. */ 'actions/review-pending-deployments-for-run': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27801,7 +27973,7 @@ export interface operations { */ environment_ids: number[] /** - * @description Whether to approve or reject deployment to the specified environments. Must be one of: `approved` or `rejected` + * @description Whether to approve or reject deployment to the specified environments. * @example approved * @enum {string} */ @@ -27819,9 +27991,11 @@ export interface operations { 'actions/re-run-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } @@ -27829,43 +28003,65 @@ export interface operations { /** Response */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } - /** - * Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-run-usage': { + /** Re-run all of the failed jobs and their dependent jobs in a workflow run using the `id` of the workflow run. You must authenticate using an access token with the `repo` scope to use this endpoint. */ + 'actions/re-run-workflow-failed-jobs': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The id of the workflow run. */ + /** The unique identifier of the workflow run. */ run_id: components['parameters']['run-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['workflow-run-usage'] + 'application/json': components['schemas']['empty-object'] } } } + requestBody: { + content: { + 'application/json': { + /** + * @description Whether to enable debug logging for the re-run. + * @default false + */ + enable_debug_logging?: boolean + } | null + } + } } /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -27888,7 +28084,9 @@ export interface operations { 'actions/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -27905,9 +28103,11 @@ export interface operations { 'actions/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28000,9 +28200,11 @@ export interface operations { 'actions/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28010,7 +28212,7 @@ export interface operations { /** Response when creating a secret */ 201: { content: { - 'application/json': { [key: string]: unknown } + 'application/json': components['schemas']['empty-object'] } } /** Response when updating a secret */ @@ -28019,7 +28221,7 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) endpoint. */ + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) endpoint. */ encrypted_value?: string /** @description ID of the key you used to encrypt the secret. */ key_id?: string @@ -28031,9 +28233,11 @@ export interface operations { 'actions/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ + /** The name of the secret. */ secret_name: components['parameters']['secret-name'] } } @@ -28046,11 +28250,13 @@ export interface operations { 'actions/list-repo-workflows': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28073,7 +28279,9 @@ export interface operations { 'actions/get-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28096,7 +28304,9 @@ export interface operations { 'actions/disable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28117,7 +28327,9 @@ export interface operations { 'actions/create-workflow-dispatch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28146,7 +28358,9 @@ export interface operations { 'actions/enable-workflow': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28158,14 +28372,16 @@ export interface operations { } } /** - * 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). + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] @@ -28177,13 +28393,13 @@ export interface operations { branch?: components['parameters']['workflow-run-branch'] /** Returns workflow run triggered by the event you specify. For example, `push`, `pull_request` or `issue`. For more information, see "[Events that trigger workflows](https://docs.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows)." */ event?: components['parameters']['event'] - /** Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. For a list of the possible `status` and `conclusion` options, see "[Create a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." */ + /** 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`. */ status?: components['parameters']['workflow-run-status'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ + /** Returns workflow runs created within the given date-time range. For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." */ created?: components['parameters']['created'] /** If `true` pull requests are omitted from the response (empty array). */ exclude_pull_requests?: components['parameters']['exclude-pull-requests'] @@ -28204,38 +28420,17 @@ export interface operations { } } } - /** - * Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `actions:read` permission to use this endpoint. - */ - 'actions/get-workflow-usage': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the workflow. You can also pass the workflow file name as a string. */ - workflow_id: components['parameters']['workflow-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['workflow-usage'] - } - } - } - } /** Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) for issues in a repository. */ 'issues/list-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28262,7 +28457,9 @@ export interface operations { 'issues/check-user-can-be-assigned': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] assignee: string } @@ -28286,7 +28483,9 @@ export interface operations { 'repos/list-autolinks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { @@ -28307,7 +28506,9 @@ export interface operations { 'repos/create-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -28328,8 +28529,13 @@ export interface operations { 'application/json': { /** @description The prefix appended by a number will generate a link any time it is found in an issue, pull request, or commit. */ key_prefix: string - /** @description The URL must contain for the reference number. */ + /** @description The URL must contain `` for the reference number. */ url_template: string + /** + * @description Whether this autolink reference matches alphanumeric characters. If true, the `` parameter of the `url_template` matches alphanumeric characters `A-Z` (case insensitive), `0-9`, and `-`. If false, this autolink reference only matches numeric characters. + * @default true + */ + is_alphanumeric?: boolean } } } @@ -28342,9 +28548,11 @@ export interface operations { 'repos/get-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28366,9 +28574,11 @@ export interface operations { 'repos/delete-autolink': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** autolink_id parameter */ + /** The unique identifier of the autolink. */ autolink_id: components['parameters']['autolink-id'] } } @@ -28378,42 +28588,18 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Enables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/enable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Disables automated security fixes for a repository. The authenticated user must have admin access to the repository. For more information, see "[Configuring automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". */ - 'repos/disable-automated-security-fixes': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - } - } 'repos/list-branches': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -28433,7 +28619,9 @@ export interface operations { 'repos/get-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28448,14 +28636,15 @@ export interface operations { } 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] } } /** Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ 'repos/get-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28483,7 +28672,9 @@ export interface operations { 'repos/update-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28524,12 +28715,14 @@ export interface operations { enforce_admins: boolean | null /** @description Require at least one approving review on a pull request, before merging. Set to `null` to disable. */ required_pull_request_reviews: { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28537,13 +28730,15 @@ export interface operations { require_code_owner_reviews?: boolean /** @description Specify the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } | null /** @description Restrict who can push to the protected branch. User, app, and team `restrictions` are only available for organization-owned repositories. Set to `null` to disable. */ restrictions: { @@ -28560,6 +28755,8 @@ export interface operations { allow_force_pushes?: boolean | null /** @description Allows deletion of the protected branch by anyone with write access to the repository. Set to `false` to prevent deletion of the protected branch. Default: `false`. For more information, see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" in the GitHub Help documentation. */ allow_deletions?: boolean + /** @description If set to `true`, the `restrictions` branch protection settings which limits who can push will also block pushes which create new branches, unless the push is initiated by a user, team, or app which has the ability to push. Set to `true` to restrict new branch creation. Default: `false`. */ + block_creations?: boolean /** @description Requires all conversations on code to be resolved before a pull request can be merged into a branch that matches this rule. Set to `false` to disable. Default: `false`. */ required_conversation_resolution?: boolean } @@ -28570,7 +28767,9 @@ export interface operations { 'repos/delete-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28586,7 +28785,9 @@ export interface operations { 'repos/get-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28609,7 +28810,9 @@ export interface operations { 'repos/set-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28632,7 +28835,9 @@ export interface operations { 'repos/delete-admin-branch-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28648,7 +28853,9 @@ export interface operations { 'repos/get-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28667,7 +28874,9 @@ export interface operations { 'repos/delete-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28689,7 +28898,9 @@ export interface operations { 'repos/update-pull-request-review-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28707,12 +28918,14 @@ export interface operations { requestBody: { content: { 'application/json': { - /** @description Specify which users and teams can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ + /** @description Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories. */ dismissal_restrictions?: { /** @description The list of user `login`s with dismissal access */ users?: string[] /** @description The list of team `slug`s with dismissal access */ teams?: string[] + /** @description The list of app `slug`s with dismissal access */ + apps?: string[] } /** @description Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit. */ dismiss_stale_reviews?: boolean @@ -28720,13 +28933,15 @@ export interface operations { require_code_owner_reviews?: boolean /** @description Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers. */ required_approving_review_count?: number - /** @description Allow specific users or teams to bypass pull request requirements. Set to `null` to disable. */ + /** @description Allow specific users, teams, or apps to bypass pull request requirements. */ bypass_pull_request_allowances?: { /** @description The list of user `login`s allowed to bypass pull request requirements. */ users?: string[] /** @description The list of team `slug`s allowed to bypass pull request requirements. */ teams?: string[] - } | null + /** @description The list of app `slug`s allowed to bypass pull request requirements. */ + apps?: string[] + } } } } @@ -28741,7 +28956,9 @@ export interface operations { 'repos/get-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28765,7 +28982,9 @@ export interface operations { 'repos/create-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28789,7 +29008,9 @@ export interface operations { 'repos/delete-commit-signature-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28805,7 +29026,9 @@ export interface operations { 'repos/get-status-checks-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28825,7 +29048,9 @@ export interface operations { 'repos/remove-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28844,7 +29069,9 @@ export interface operations { 'repos/update-status-check-protection': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28885,7 +29112,9 @@ export interface operations { 'repos/get-all-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28905,7 +29134,9 @@ export interface operations { 'repos/set-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28925,7 +29156,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28936,7 +29167,9 @@ export interface operations { 'repos/add-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28957,7 +29190,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -28968,7 +29201,9 @@ export interface operations { 'repos/remove-status-check-contexts': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -28988,7 +29223,7 @@ export interface operations { content: { 'application/json': | { - /** @description contexts parameter */ + /** @description The name of the status checks */ contexts: string[] } | string[] @@ -29005,7 +29240,9 @@ export interface operations { 'repos/get-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29029,7 +29266,9 @@ export interface operations { 'repos/delete-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29048,7 +29287,9 @@ export interface operations { 'repos/get-apps-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29076,7 +29317,9 @@ export interface operations { 'repos/set-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29114,7 +29357,9 @@ export interface operations { 'repos/add-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29152,7 +29397,9 @@ export interface operations { 'repos/remove-app-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29186,7 +29433,9 @@ export interface operations { 'repos/get-teams-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29214,7 +29463,9 @@ export interface operations { 'repos/set-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29233,7 +29484,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29252,7 +29503,9 @@ export interface operations { 'repos/add-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29271,7 +29524,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29290,7 +29543,9 @@ export interface operations { 'repos/remove-team-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29309,7 +29564,7 @@ export interface operations { content: { 'application/json': | { - /** @description teams parameter */ + /** @description The slug values for teams */ teams: string[] } | string[] @@ -29324,7 +29579,9 @@ export interface operations { 'repos/get-users-with-access-to-protected-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29352,7 +29609,9 @@ export interface operations { 'repos/set-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29371,7 +29630,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29390,7 +29649,9 @@ export interface operations { 'repos/add-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29409,7 +29670,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29428,7 +29689,9 @@ export interface operations { 'repos/remove-user-access-restrictions': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29447,7 +29710,7 @@ export interface operations { content: { 'application/json': | { - /** @description users parameter */ + /** @description The username for users */ users: string[] } | string[] @@ -29457,7 +29720,7 @@ export interface operations { /** * 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)". + * **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/enterprise-server@3.6/github/administering-a-repository/renaming-a-branch)". * * The permissions required to use this endpoint depends on whether you are renaming the default branch. * @@ -29474,7 +29737,9 @@ export interface operations { 'repos/rename-branch': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] /** The name of the branch. */ branch: components['parameters']['branch'] @@ -29510,7 +29775,9 @@ export interface operations { 'checks/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -29545,7 +29812,7 @@ export interface operations { /** @description A reference for the run on the integrator's system. */ external_id?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @default queued * @enum {string} */ @@ -29556,7 +29823,7 @@ export interface operations { */ started_at?: string /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, additional details should be provided on the site specified by `details_url`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29566,15 +29833,15 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object) description. */ output?: { /** @description The title of the check run. */ title: string - /** @description The summary of the check run. This parameter supports Markdown. */ + /** @description The summary of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ summary: string - /** @description The details of the check run. This parameter supports Markdown. */ + /** @description The details of the check run. This parameter supports Markdown. **Maximum length**: 65535 characters. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible on GitHub in the **Checks** and **Files changed** tab of the pull request. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about how you can view annotations on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) description for details about how to use this parameter. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29587,7 +29854,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29598,7 +29865,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29608,7 +29875,7 @@ export interface operations { caption?: string }[] } - /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) to your app. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Displays a button on GitHub that can be clicked to alert your app to do additional tasks. For example, a code linting app can display a button that automatically fixes detected errors. The button created in this object is displayed after the check run completes. When a user clicks the button, GitHub sends the [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string @@ -29629,9 +29896,11 @@ export interface operations { 'checks/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29652,9 +29921,11 @@ export interface operations { 'checks/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } } @@ -29692,12 +29963,12 @@ export interface operations { */ started_at?: string /** - * @description The current status. Can be one of `queued`, `in_progress`, or `completed`. + * @description The current status. * @enum {string} */ status?: 'queued' | 'in_progress' | 'completed' /** - * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. Can be one of `action_required`, `cancelled`, `failure`, `neutral`, `success`, `skipped`, `stale`, or `timed_out`. + * @description **Required if you provide `completed_at` or a `status` of `completed`**. The final conclusion of the check. * **Note:** Providing `conclusion` will automatically set the `status` parameter to `completed`. You cannot change a check run conclusion to `stale`, only GitHub can set this. * @enum {string} */ @@ -29707,7 +29978,7 @@ export interface operations { * @description The time the check completed. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ completed_at?: string - /** @description 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. */ + /** @description Check runs can accept a variety of data in the `output` object, including a `title` and `summary` and can optionally provide descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object-1) description. */ output?: { /** @description **Required**. */ title?: string @@ -29715,7 +29986,7 @@ export interface operations { summary: string /** @description Can contain Markdown. */ text?: string - /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds information from your analysis to specific lines of code. Annotations are visible in GitHub's pull request UI. Annotations are visible in GitHub's pull request UI. The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) endpoint. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run. For details about annotations in the UI, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ annotations?: { /** @description The path of the file to add an annotation to. For example, `assets/css/main.css`. */ path: string @@ -29728,7 +29999,7 @@ export interface operations { /** @description The end column of the annotation. Annotations only support `start_column` and `end_column` on the same line. Omit this parameter if `start_line` and `end_line` have different values. */ end_column?: number /** - * @description The level of the annotation. Can be one of `notice`, `warning`, or `failure`. + * @description The level of the annotation. * @enum {string} */ annotation_level: 'notice' | 'warning' | 'failure' @@ -29739,7 +30010,7 @@ export interface operations { /** @description Details about this annotation. The maximum size is 64 KB. */ raw_details?: string }[] - /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) description for details. */ + /** @description Adds images to the output displayed in the GitHub pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) description for details. */ images?: { /** @description The alternative text for the image. */ alt: string @@ -29749,7 +30020,7 @@ export interface operations { caption?: string }[] } - /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) description. To learn more about check runs and requested actions, see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." */ + /** @description Possible further actions the integrator can perform, which a user may trigger. Each action includes a `label`, `identifier` and `description`. A maximum of three actions are accepted. See the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." */ actions?: { /** @description The text to be displayed on a button in the web UI. The maximum size is 20 characters. */ label: string @@ -29766,13 +30037,15 @@ export interface operations { 'checks/list-annotations': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** check_run_id parameter */ + /** The unique identifier of the check run. */ check_run_id: components['parameters']['check-run-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -29789,1774 +30062,163 @@ export interface operations { } } /** - * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + * Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. * * To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. */ 'checks/rerequest-run': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_run_id parameter */ - check_run_id: components['parameters']['check-run-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ - 403: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - 404: components['responses']['not_found'] - /** Validation error if the check run is not rerequestable */ - 422: { - content: { - 'application/json': components['schemas']['basic-error'] - } - } - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array and a `null` value for `head_branch`. - * - * By default, check suites are automatically created when you create a [check run](https://docs.github.com/rest/reference/checks#check-runs). You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "[Update repository preferences for check suites](https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. - */ - 'checks/create-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** when the suite already existed */ - 200: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - /** Response when the suite was created */ - 201: { - content: { - 'application/json': components['schemas']['check-suite'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The sha of the head commit. */ - head_sha: string - } - } - } - } - /** Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually [Create a check suite](https://docs.github.com/rest/reference/checks#create-a-check-suite). You must have admin permissions in the repository to set preferences for check suites. */ - 'checks/set-suites-preferences': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['check-suite-preference'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) description for details. */ - auto_trigger_checks?: { - /** @description The `id` of the GitHub App. */ - app_id: number - /** - * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. - * @default true - */ - setting: boolean - }[] - } - } - } - } - /** - * **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'][] - } - } - } - } - } - /** - * Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the [`check_suite` webhook](https://docs.github.com/webhooks/event-payloads/#check_suite) event with the action `rerequested`. When a check suite is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - * - * To rerequest a check suite, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. - */ - 'checks/rerequest-suite': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** check_suite_id parameter */ - check_suite_id: components['parameters']['check-suite-id'] - } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - } - } - /** - * Lists all open code scanning alerts for the default branch (usually `main` - * or `master`). You must use an access token with the `security_events` scope to use - * this endpoint with private repos, the `public_repo` scope also grants permission to read - * security events on public repos only. GitHub Apps must have the `security_events` read - * permission to use this endpoint. - * - * The response includes a `most_recent_instance` object. - * This provides details of the most recent instance of this alert - * for the default branch or for the specified Git reference - * (if you used `ref` in the request). - */ - 'code-scanning/list-alerts-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - /** One of `asc` (ascending) or `desc` (descending). */ - direction?: components['parameters']['direction'] - /** Can be one of `created`, `updated`, `number`. */ - sort?: 'created' | 'updated' | 'number' - /** Set to `open`, `closed, `fixed`, or `dismissed` to list code scanning alerts in a specific state. */ - state?: components['schemas']['code-scanning-alert-state'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-items'][] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The instances field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The same information can now be retrieved via a GET request to the URL specified by `instances_url`. - */ - 'code-scanning/get-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ - 'code-scanning/update-alert': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert'] - } - } - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - state: components['schemas']['code-scanning-alert-set-state'] - dismissed_reason?: components['schemas']['code-scanning-alert-dismissed-reason'] - } - } - } - } - /** - * Lists all instances of the specified code scanning alert. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - */ - 'code-scanning/list-alert-instances': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ - alert_number: components['parameters']['alert-number'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the results you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['parameters']['git-ref'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-alert-instance'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the details of all code scanning analyses for a repository, - * starting with the most recent. - * The response is paginated and you can use the `page` and `per_page` parameters - * to list the analyses you're interested in. - * By default 30 analyses are listed per page. - * - * The `rules_count` field in the response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * **Deprecation notice**: - * The `tool_name` field is deprecated and will, in future, not be included in the response for this endpoint. The example response reflects this change. The tool name can now be found inside the `tool` field. - */ - 'code-scanning/list-recent-analyses': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** The name of a code scanning tool. Only results by this tool will be listed. You can specify the tool by using either `tool_name` or `tool_guid`, but not both. */ - tool_name?: components['parameters']['tool-name'] - /** The GUID of a code scanning tool. Only results by this tool will be listed. Note that some code scanning tools may not include a GUID in their analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, but not both. */ - tool_guid?: components['parameters']['tool-guid'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The Git reference for the analyses you want to list. The `ref` for a branch can be formatted either as `refs/heads/` or simply ``. To reference a pull request use `refs/pull//merge`. */ - ref?: components['schemas']['code-scanning-ref'] - /** Filter analyses belonging to the same SARIF upload. */ - sarif_id?: components['schemas']['code-scanning-analysis-sarif-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis'][] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Gets a specified code scanning analysis for a repository. - * You must use an access token with the `security_events` scope to use this endpoint with private repos, - * the `public_repo` scope also grants permission to read security events on public repos only. - * GitHub Apps must have the `security_events` read permission to use this endpoint. - * - * The default JSON response contains fields that describe the analysis. - * This includes the Git reference and commit SHA to which the analysis relates, - * the datetime of the analysis, the name of the code scanning tool, - * and the number of alerts. - * - * The `rules_count` field in the default response give the number of rules - * that were run in the analysis. - * For very old analyses this data is not available, - * and `0` is returned in this field. - * - * If you use the Accept header `application/sarif+json`, - * the response contains the analysis data that was uploaded. - * This is formatted as - * [SARIF version 2.1.0](https://docs.oasis-open.org/sarif/sarif/v2.1.0/cs01/sarif-v2.1.0-cs01.html). - */ - 'code-scanning/get-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json+sarif': string - 'application/json': components['schemas']['code-scanning-analysis'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Deletes a specified code scanning analysis from a repository. For - * private repositories, you must use an access token with the `repo` scope. For public repositories, - * you must use an access token with `public_repo` scope. - * GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * You can delete one analysis at a time. - * To delete a series of analyses, start with the most recent analysis and work backwards. - * Conceptually, the process is similar to the undo function in a text editor. - * - * When you list the analyses for a repository, - * one or more will be identified as deletable in the response: - * - * ``` - * "deletable": true - * ``` - * - * An analysis is deletable when it's the most recent in a set of analyses. - * Typically, a repository will have multiple sets of analyses - * for each enabled code scanning tool, - * where a set is determined by a unique combination of analysis values: - * - * * `ref` - * * `tool` - * * `analysis_key` - * * `environment` - * - * If you attempt to delete an analysis that is not the most recent in a set, - * you'll get a 400 response with the message: - * - * ``` - * Analysis specified is not deletable. - * ``` - * - * The response from a successful `DELETE` operation provides you with - * two alternative URLs for deleting the next analysis in the set: - * `next_analysis_url` and `confirm_delete_url`. - * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - * in a set. This is a useful option if you want to preserve at least one analysis - * for the specified tool in your repository. - * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - * in the 200 response is `null`. - * - * As an example of the deletion process, - * let's imagine that you added a workflow that configured a particular code scanning tool - * to analyze the code in a repository. This tool has added 15 analyses: - * 10 on the default branch, and another 5 on a topic branch. - * You therefore have two separate sets of analyses for this tool. - * You've now decided that you want to remove all of the analyses for the tool. - * To do this you must make 15 separate deletion requests. - * To start, you must find an analysis that's identified as deletable. - * Each set of analyses always has one that's identified as deletable. - * Having found the deletable analysis for one of the two sets, - * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - * Then repeat the process for the second set. - * The procedure therefore consists of a nested loop: - * - * **Outer loop**: - * * List the analyses for the repository, filtered by tool. - * * Parse this list to find a deletable analysis. If found: - * - * **Inner loop**: - * * Delete the identified analysis. - * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. - * - * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - */ - 'code-scanning/delete-analysis': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ - analysis_id: number - } - query: { - /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ - confirm_delete?: string | null - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-analysis-deletion'] - } - } - 400: components['responses']['bad_request'] - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - 503: components['responses']['service_unavailable'] - } - } - /** - * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - * - * There are two places where you can upload code scanning results. - * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - * - * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - * - * ``` - * gzip -c analysis-data.sarif | base64 -w0 - * ``` - * - * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. - * - * The `202 Accepted`, response includes an `id` value. - * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. - * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." - */ - 'code-scanning/upload-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 202: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-receipt'] - } - } - /** Bad Request if the sarif field is invalid */ - 400: unknown - 403: components['responses']['code_scanning_forbidden_write'] - 404: components['responses']['not_found'] - /** Payload Too Large if the sarif field is too large */ - 413: unknown - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] - ref: components['schemas']['code-scanning-ref'] - sarif: components['schemas']['code-scanning-analysis-sarif-file'] - /** - * Format: uri - * @description The base directory used in the analysis, as it appears in the SARIF file. - * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - * @example file:///github/workspace/ - */ - checkout_uri?: string - /** - * Format: date-time - * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - started_at?: string - /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ - tool_name?: string - } - } - } - } - /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ - 'code-scanning/get-sarif': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The SARIF ID obtained after uploading. */ - sarif_id: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['code-scanning-sarifs-status'] - } - } - 403: components['responses']['code_scanning_forbidden_read'] - /** Not Found if the sarif id does not match any upload */ - 404: unknown - 503: components['responses']['service_unavailable'] - } - } - /** - * Lists the codespaces associated to a specified repository and the authenticated user. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/list-in-repository-for-authenticated-user': { - parameters: { - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Creates a codespace owned by the authenticated user in the specified repository. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-repo-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response when the codespace was successfully created */ - 201: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - } - } - } - /** - * List the machine types available for a given repository based on its configuration. - * - * Location is required. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/repo-machines-for-authenticated-user': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Required. The location to check for available machines. */ - location: string - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } - } - } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/list-collaborators': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** - * Filter collaborators returned by their affiliation. Can be one of: - * \* `outside`: All outside collaborators of an organization-owned repository. - * \* `direct`: All collaborators with permissions to an organization-owned repository, regardless of organization membership status. - * \* `all`: All collaborators the authenticated user can see. - */ - affiliation?: 'outside' | 'direct' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['collaborator'][] - } - } - 404: components['responses']['not_found'] - } - } - /** - * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - * - * Team members will include the members of child teams. - * - * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - * endpoint. - */ - 'repos/check-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response if user is a collaborator */ - 204: never - /** Not Found if user is not a collaborator */ - 404: unknown - } - } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - * - * ``` - * Cannot assign {member} permission of {role name} - * ``` - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - * - * The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - * - * **Rate limits** - * - * You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - */ - 'repos/add-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response when a new invitation is created */ - 201: { - content: { - 'application/json': components['schemas']['repository-invitation'] - } - } - /** Response when person is already a collaborator */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** Can be one of: - * \* `pull` - can pull, but not push to or administer this repository. - * \* `push` - can pull and push, but not administer this repository. - * \* `admin` - can pull, push and administer this repository. - * \* `maintain` - Recommended for project managers who need to manage the repository without access to sensitive or destructive actions. - * \* `triage` - Recommended for contributors who need to proactively manage issues and pull requests without write access. - * \* custom repository role name - A custom repository role, if the owning organization has defined any. - * @default push - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' | 'maintain' | 'triage' - /** @example "push" */ - permissions?: string - } - } - } - } - 'repos/remove-collaborator': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ - 'repos/get-collaborator-permission-level': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - username: components['parameters']['username'] - } - } - responses: { - /** if user has admin permissions */ - 200: { - content: { - 'application/json': components['schemas']['repository-collaborator-permission'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Commit Comments use [these custom media types](https://docs.github.com/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/rest/overview/media-types/). - * - * Comments are ordered by ascending ID. - */ - 'repos/list-commit-comments-for-repo': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - 'repos/get-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - } - 'repos/delete-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - 'repos/update-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment */ - body: string - } - } - } - } - /** List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). */ - 'reactions/list-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - query: { - /** Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a commit comment. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } - 404: components['responses']['not_found'] - } - } - /** Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ - 'reactions/create-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the commit comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } - } - } - /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/comments/:comment_id/reactions/:reaction_id`. - * - * Delete a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - */ - 'reactions/delete-for-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/list-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - query: { - /** SHA or branch to start listing commits from. Default: the repository’s default branch (usually `master`). */ - sha?: string - /** Only commits containing this file path will be returned. */ - path?: string - /** GitHub login or email address by which to filter by commit author. */ - author?: string - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Only commits before this date will be returned. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - until?: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit'][] - } - } - 400: components['responses']['bad_request'] - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] - } - } - /** - * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. - */ - 'repos/list-branches-for-head-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['branch-short'][] - } - } - 422: components['responses']['validation_failed'] - } - } - /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ - 'repos/list-comments-for-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['commit-comment'][] - } - } - } - } - /** - * Create a comment for a commit using its `:commit_sha`. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-commit-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['commit-comment'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The contents of the comment. */ - body: string - /** @description Relative path of the file to comment on. */ - path?: string - /** @description Line index in the diff to comment on. */ - position?: number - /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ - line?: number - } - } - } - } - /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. Additional preview headers may be required to see certain details for associated pull requests, such as whether a pull request is in a draft state. For more information about previews that might affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) endpoint. */ - 'repos/list-pull-requests-associated-with-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['pull-request-simple'][] - } - } - } - } - /** - * Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint. - * - * **Note:** If there are more than 300 files in the commit diff, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing. - * - * You can pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch `diff` and `patch` formats. Diffs with binary data will have no `patch` property. - * - * To return only the SHA-1 hash of the commit reference, you can provide the `sha` custom [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) in the `Accept` header. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/get-commit': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - /** - * **Note:** The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty `pull_requests` array. - * - * Lists check runs for a commit ref. The `ref` can be a SHA, branch name, or a tag name. GitHub Apps must have the `checks:read` permission on a private repository or pull access to a public repository to get check runs. OAuth Apps and authenticated users must have the `repo` scope to get check runs in a private repository. - */ - 'checks/list-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Returns check runs with the specified `name`. */ - check_name?: components['parameters']['check-name'] - /** Returns check runs with the specified `status`. Can be one of `queued`, `in_progress`, or `completed`. */ - status?: components['parameters']['status'] - /** Filters check runs by their `completed_at` timestamp. Can be one of `latest` (returning the most recent check runs) or `all`. */ - filter?: 'latest' | 'all' - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - app_id?: number - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': { - total_count: number - check_runs: 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 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'][] - } - } - } - } - } - /** - * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. - * - * - * Additionally, a combined `state` is returned. The `state` is one of: - * - * * **failure** if any of the contexts report as `error` or `failure` - * * **pending** if there are no statuses or a context is `pending` - * * **success** if the latest status for all contexts is `success` - */ - 'repos/get-combined-status-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-commit-status'] - } - } - 404: components['responses']['not_found'] - } - } - /** - * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. - * - * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. - */ - 'repos/list-commit-statuses-for-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - } - } - responses: { - /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['status'][] - } - } - 301: components['responses']['moved_permanently'] - } - } - /** - * This endpoint will return all community profile metrics, including an - * overall health score, repository description, the presence of documentation, detected - * code of conduct, detected license, and the presence of ISSUE\_TEMPLATE, PULL\_REQUEST\_TEMPLATE, - * README, and CONTRIBUTING files. - * - * The `health_percentage` score is defined as a percentage of how many of - * these four documents are present: README, CONTRIBUTING, LICENSE, and - * CODE_OF_CONDUCT. For example, if all four documents are present, then - * the `health_percentage` is `100`. If only one is present, then the - * `health_percentage` is `25`. - * - * `content_reports_enabled` is only returned for organization-owned repositories. - */ - 'repos/get-community-profile-metrics': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['community-profile'] - } - } - } - } - /** - * The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. - * - * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. - * - * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. - * - * **Working with large comparisons** - * - * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." - * - * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. - * - * **Signature verification object** - * - * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: - * - * | Name | Type | Description | - * | ---- | ---- | ----------- | - * | `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. | - * | `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. | - * | `signature` | `string` | The signature that was extracted from the commit. | - * | `payload` | `string` | The value that was signed. | - * - * These are the possible values for `reason` in the `verification` object: - * - * | Value | Description | - * | ----- | ----------- | - * | `expired_key` | The key that made the signature is expired. | - * | `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. | - * | `gpgverify_error` | There was an error communicating with the signature verification service. | - * | `gpgverify_unavailable` | The signature verification service is currently unavailable. | - * | `unsigned` | The object does not include a signature. | - * | `unknown_signature_type` | A non-PGP signature was found in the commit. | - * | `no_user` | No user was associated with the `committer` email address in the commit. | - * | `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. | - * | `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. | - * | `unknown_key` | The key that made the signature has not been registered with any user's account. | - * | `malformed_signature` | There was an error parsing the signature. | - * | `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. | - * | `valid` | None of the above errors applied, so the signature is considered to be verified. | - */ - 'repos/compare-commits': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ - basehead: string - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['commit-comparison'] - } - } - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Gets the contents of a file or directory in a repository. Specify the file path or directory in `:path`. If you omit - * `:path`, you will receive the contents of the repository's root directory. See the description below regarding what the API response includes for directories. - * - * Files and symlinks support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) for - * retrieving the raw content or rendered HTML (when supported). All content types support [a custom media - * type](https://docs.github.com/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent - * object format. - * - * **Note**: - * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/rest/reference/git#trees). - * * This API has an upper limit of 1,000 files for a directory. If you need to retrieve more files, use the [Git Trees - * API](https://docs.github.com/rest/reference/git#get-a-tree). - * * This API supports files up to 1 megabyte in size. - * - * #### If the content is a directory - * The response will be an array of objects, one object for each item in the directory. - * When listing the contents of a directory, submodules have their "type" specified as "file". Logically, the value - * _should_ be "submodule". This behavior exists in API v3 [for backwards compatibility purposes](https://git.io/v1YCW). - * In the next major version of the API, the type will be returned as "submodule". - * - * #### If the content is a symlink - * If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the - * API responds with the content of the file (in the format shown in the example. Otherwise, the API responds with an object - * describing the symlink itself. - * - * #### If the content is a submodule - * The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific - * commit within the submodule repository. Git uses the given URL when cloning the submodule repository, and checks out - * the submodule at that specific commit. - * - * If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the - * github.com URLs (`html_url` and `_links["html"]`) will have null values. - */ - 'repos/get-content': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** path parameter */ - path: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the check run. */ + check_run_id: components['parameters']['check-run-id'] } } responses: { /** Response */ - 200: { + 201: { 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'] + 'application/json': { [key: string]: unknown } + } + } + /** Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub App */ + 403: { + content: { + 'application/json': components['schemas']['basic-error'] } } - 302: components['responses']['found'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Validation error if the check run is not rerequestable */ + 422: { + content: { + 'application/json': components['schemas']['basic-error'] + } + } } } - /** Creates a new file or replaces an existing file in a repository. */ - 'repos/create-or-update-file-contents': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { - /** Response */ + /** Response when the suite already exists */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - /** Response */ + /** Response when the suite was created */ 201: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The new file content, using Base64 encoding. */ - content: string - /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ - sha?: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description The person that committed the file. Default: the authenticated user. */ - committer?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-05T13:13:22+05:00" */ - date?: string - } - /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ - author?: { - /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ - name: string - /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ - email: string - /** @example "2013-01-15T17:13:22+05:00" */ - date?: string - } + /** @description The sha of the head commit. */ + head_sha: string } } } } - /** - * Deletes a file in a repository. - * - * You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author. - * - * The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used. - * - * You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code. - */ - 'repos/delete-file': { + /** 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** path parameter */ - path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['file-commit'] + 'application/json': components['schemas']['check-suite-preference'] } } - 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The commit message. */ - message: string - /** @description The blob SHA of the file being replaced. */ - sha: string - /** @description The branch name. Default: the repository’s default branch (usually `master`) */ - branch?: string - /** @description object containing information about the committer. */ - committer?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } - /** @description object containing information about the author. */ - author?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - } + /** @description Enables or disables automatic creation of CheckSuite events upon pushes to the repository. Enabled by default. See the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) description for details. */ + auto_trigger_checks?: { + /** @description The `id` of the GitHub App. */ + app_id: number + /** + * @description Set to `true` to enable automatic creation of CheckSuite events upon pushes to the repository, or `false` to disable them. + * @default true + */ + setting: boolean + }[] } } } } /** - * Lists 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. + * **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`. * - * 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. + * 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. */ - 'repos/list-contributors': { + 'checks/get-suite': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { - /** if repository contains content */ + /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['contributor'][] + 'application/json': components['schemas']['check-suite'] } } - /** Response if repository is empty */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } } - /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/list-repo-secrets': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } query: { - /** Results per page (max 100) */ + /** Returns check runs with the specified `name`. */ + check_name?: components['parameters']['check-name'] + /** Returns check runs with the specified `status`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -31569,653 +30231,689 @@ export interface operations { content: { 'application/json': { total_count: number - secrets: components['schemas']['dependabot-secret'][] + check_runs: components['schemas']['check-run'][] } } } } } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-public-key': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the check suite. */ + check_suite_id: components['parameters']['check-suite-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['dependabot-public-key'] + 'application/json': { [key: string]: unknown } } } } } - /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/get-repo-secret': { + /** + * Lists code scanning alerts. + * + * To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + * + * GitHub Apps must have the `security_events` read + * permission to use this endpoint. + * + * The response includes a `most_recent_instance` object. + * This provides details of the most recent instance of this alert + * for the default branch (or for the specified Git reference if you used `ref` in the request). + */ + 'code-scanning/list-alerts-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + } + 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'] + /** The number of 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'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The property by which to sort the results. */ + sort?: 'created' | 'updated' + /** If specified, only code scanning alerts with this state will be returned. */ + state?: components['schemas']['code-scanning-alert-state'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['dependabot-secret'] + 'application/json': components['schemas']['code-scanning-alert-items'][] } } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * Creates or updates a repository secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - * permission to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * **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`. */ - 'dependabot/create-or-update-repo-secret': { + 'code-scanning/get-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response when updating a secret */ - 204: never - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ - encrypted_value?: string - /** @description ID of the key you used to encrypt the secret. */ - key_id?: string + 'application/json': components['schemas']['code-scanning-alert'] } } + 304: components['responses']['not_modified'] + 403: components['responses']['code_scanning_forbidden_read'] + 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } - /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ - 'dependabot/delete-repo-secret': { + /** Updates the status of a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. */ + 'code-scanning/update-alert': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** 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 */ - 204: never + 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'] + dismissed_comment?: components['schemas']['code-scanning-alert-dismissed-comment'] + } + } } } - /** Simple filtering of deployments is available via query parameters: */ - 'repos/list-deployments': { + /** + * Lists all instances of the specified code scanning alert. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. + */ + 'code-scanning/list-alert-instances': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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: { - /** The SHA recorded at creation time. */ - sha?: string - /** The name of the ref. This can be a branch, tag, or SHA. */ - ref?: string - /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ - task?: string - /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ - environment?: string | null - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of 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: { - headers: {} content: { - 'application/json': components['schemas']['deployment'][] + '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'] } } /** - * Deployments offer a few configurable parameters with certain defaults. - * - * The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - * before we merge a pull request. - * - * The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - * multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - * makes it easier to track which environments have requested deployments. The default environment is `production`. - * - * The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - * the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - * the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - * return a failure response. - * - * By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - * state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - * specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - * not require any contexts or create any commit statuses, the deployment will always succeed. - * - * The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - * field that will be passed on when a deployment event is dispatched. - * - * The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - * be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - * application with debugging enabled. - * - * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - * - * #### Merged branch response - * You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - * a deployment. This auto-merge happens when: - * * Auto-merge option is enabled in the repository - * * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * * There are no merge conflicts + * 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. * - * If there are no new commits in the base branch, a new request to create a deployment should give a successful - * response. + * 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. * - * #### 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. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * #### 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`. + * **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. */ - 'repos/create-deployment': { + 'code-scanning/list-recent-analyses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } - } - responses: { - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['deployment'] - } - } - /** Merged branch response */ - 202: { - content: { - 'application/json': { - message?: string - } - } - } - /** Conflict when there is a merge conflict or the commit's status checks failed */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The ref to deploy. This can be a branch, tag, or SHA. */ - ref: string - /** - * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - * @default deploy - */ - task?: string - /** - * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. - * @default true - */ - auto_merge?: boolean - /** @description The [status](https://docs.github.com/rest/reference/commits#commit-statuses) contexts to verify against commit status checks. If you omit this parameter, GitHub verifies all unique contexts before creating a deployment. To bypass checking entirely, pass an empty array. Defaults to all unique contexts. */ - required_contexts?: string[] - payload?: { [key: string]: unknown } | string - /** - * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). - * @default production - */ - environment?: string - /** - * @description Short description of the deployment. - * @default - */ - description?: string | null - /** - * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` - * @default false - */ - transient_environment?: boolean - /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ - production_environment?: boolean - } - } - } - } - 'repos/get-deployment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + 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'] + /** The number of 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']['deployment'] + 'application/json': components['schemas']['code-scanning-analysis'][] } } + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] + 503: components['responses']['service_unavailable'] } } /** - * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * Gets a specified code scanning analysis for a repository. + * You must use an access token with the `security_events` scope to use this endpoint with private repos, + * the `public_repo` scope also grants permission to read security events on public repos only. + * GitHub Apps must have the `security_events` read permission to use this endpoint. * - * To set a deployment as inactive, you must: + * 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. * - * * 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. + * 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. * - * 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)." + * 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). */ - 'repos/delete-deployment': { + 'code-scanning/get-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['code-scanning-analysis'] + 'application/json+sarif': { [key: string]: unknown } + } + } + 403: components['responses']['code_scanning_forbidden_read'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + 503: components['responses']['service_unavailable'] } } - /** Users with pull access can view deployment statuses for a deployment: */ - 'repos/list-deployment-statuses': { + /** + * Deletes a specified code scanning analysis from a repository. For + * private repositories, you must use an access token with the `repo` scope. For public repositories, + * you must use an access token with `public_repo` scope. + * GitHub Apps must have the `security_events` write permission to use this endpoint. + * + * You can delete one analysis at a time. + * To delete a series of analyses, start with the most recent analysis and work backwards. + * Conceptually, the process is similar to the undo function in a text editor. + * + * When you list the analyses for a repository, + * one or more will be identified as deletable in the response: + * + * ``` + * "deletable": true + * ``` + * + * An analysis is deletable when it's the most recent in a set of analyses. + * Typically, a repository will have multiple sets of analyses + * for each enabled code scanning tool, + * where a set is determined by a unique combination of analysis values: + * + * * `ref` + * * `tool` + * * `category` + * + * If you attempt to delete an analysis that is not the most recent in a set, + * you'll get a 400 response with the message: + * + * ``` + * Analysis specified is not deletable. + * ``` + * + * The response from a successful `DELETE` operation provides you with + * two alternative URLs for deleting the next analysis in the set: + * `next_analysis_url` and `confirm_delete_url`. + * Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + * in a set. This is a useful option if you want to preserve at least one analysis + * for the specified tool in your repository. + * Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + * When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + * in the 200 response is `null`. + * + * As an example of the deletion process, + * let's imagine that you added a workflow that configured a particular code scanning tool + * to analyze the code in a repository. This tool has added 15 analyses: + * 10 on the default branch, and another 5 on a topic branch. + * You therefore have two separate sets of analyses for this tool. + * You've now decided that you want to remove all of the analyses for the tool. + * To do this you must make 15 separate deletion requests. + * To start, you must find an analysis that's identified as deletable. + * Each set of analyses always has one that's identified as deletable. + * Having found the deletable analysis for one of the two sets, + * delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + * Then repeat the process for the second set. + * The procedure therefore consists of a nested loop: + * + * **Outer loop**: + * * List the analyses for the repository, filtered by tool. + * * Parse this list to find a deletable analysis. If found: + * + * **Inner loop**: + * * Delete the identified analysis. + * * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + * + * The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + */ + 'code-scanning/delete-analysis': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] + /** The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` operation. */ + analysis_id: number } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** Allow deletion if the specified analysis is the last in a set. If you attempt to delete the final analysis in a set without setting this parameter to `true`, you'll get a 400 response with the message: `Analysis is last of its type and deletion may result in the loss of historical alert data. Please specify confirm_delete.` */ + confirm_delete?: string | null } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['deployment-status'][] + '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'] } } /** - * Users with `push` access can create deployment statuses for a given deployment. + * Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. * - * 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. + * There are two places where you can upload code scanning results. + * - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + * - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + * + * You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + * + * ``` + * gzip -c analysis-data.sarif | base64 -w0 + * ``` + * + * SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + * + * The `202 Accepted`, response includes an `id` value. + * You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + * For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." */ - 'repos/create-deployment-status': { + 'code-scanning/upload-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 202: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-receipt'] } } - 422: components['responses']['validation_failed'] + /** Bad Request if the sarif field is invalid */ + 400: unknown + 403: components['responses']['code_scanning_forbidden_write'] + 404: components['responses']['not_found'] + /** Payload Too Large if the sarif field is too large */ + 413: unknown + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { + commit_sha: components['schemas']['code-scanning-analysis-commit-sha'] + ref: components['schemas']['code-scanning-ref'] + sarif: components['schemas']['code-scanning-analysis-sarif-file'] /** - * @description The state of the status. Can be one of `error`, `failure`, `inactive`, `in_progress`, `queued`, `pending`, or `success`. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. - * @enum {string} - */ - state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. - * @default - */ - target_url?: string - /** - * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` - * @default - */ - log_url?: string - /** - * @description A short description of the status. The maximum description length is 140 characters. - * @default - */ - description?: string - /** - * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. - * @enum {string} + * Format: uri + * @description The base directory used in the analysis, as it appears in the SARIF file. + * This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + * @example file:///github/workspace/ */ - environment?: 'production' | 'staging' | 'qa' + checkout_uri?: string /** - * @description Sets the URL for accessing your environment. Default: `""` - * @default + * Format: date-time + * @description The time that the analysis run began. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - environment_url?: string - /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ - auto_inactive?: boolean + started_at?: string + /** @description The name of the tool used to generate the code scanning analysis. If this parameter is not used, the tool name defaults to "API". If the uploaded SARIF contains a tool GUID, this will be available for filtering using the `tool_guid` parameter of operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. */ + tool_name?: string } } } } - /** Users with pull access can view a deployment status for a deployment: */ - 'repos/get-deployment-status': { + /** Gets information about a SARIF upload, including the status and the URL of the analysis that was uploaded so that you can retrieve details of the analysis. For more information, see "[Get a code scanning analysis for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. */ + 'code-scanning/get-sarif': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** deployment_id parameter */ - deployment_id: components['parameters']['deployment-id'] - status_id: number + /** The SARIF ID obtained after uploading. */ + sarif_id: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deployment-status'] + 'application/json': components['schemas']['code-scanning-sarifs-status'] } } - 404: components['responses']['not_found'] + 403: components['responses']['code_scanning_forbidden_read'] + /** Not Found if the sarif id does not match any upload */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub to trigger a GitHub Actions workflow or GitHub App webhook. You must configure your GitHub Actions workflow or GitHub App to run when the `repository_dispatch` event occurs. For an example `repository_dispatch` webhook payload, see "[RepositoryDispatchEvent](https://docs.github.com/webhooks/event-payloads/#repository_dispatch)." - * - * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. - * - * This endpoint requires write access to the repository by providing either: - * - * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * List any syntax errors that are detected in the CODEOWNERS + * file. * - * This input example shows how you can use the `client_payload` as a test to debug your workflow. + * For more information about the correct CODEOWNERS syntax, + * see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." */ - 'repos/create-dispatch-event': { + 'repos/codeowners-errors': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** A branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository's default branch (e.g. `main`) */ + ref?: string + } } responses: { /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A custom webhook event name. */ - event_type: string - /** @description JSON payload with extra information about the webhook event that your action or worklow may use. */ - client_payload?: { [key: string]: unknown } + 200: { + content: { + 'application/json': components['schemas']['codeowners-errors'] } } + /** Resource not found */ + 404: unknown } } /** - * Get all environments for a repository. + * 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. + * Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. * - * 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. + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. */ - 'repos/get-all-environments': { + 'repos/list-collaborators': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** Filter collaborators returned by their affiliation. `outside` means all outside collaborators of an organization-owned repository. `direct` means all collaborators with permissions to an organization-owned repository, regardless of organization membership status. `all` means all collaborators the authenticated user can see. */ + affiliation?: 'outside' | 'direct' | 'all' + /** Filter collaborators by the permissions they have on the repository. If not specified, all collaborators will be returned. */ + permission?: 'pull' | 'triage' | 'push' | 'maintain' | 'admin' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - /** - * @description The number of environments in this repository - * @example 5 - */ - total_count?: number - environments?: components['schemas']['environment'][] - } + 'application/json': components['schemas']['collaborator'][] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** + * For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + * + * Team members will include the members of child teams. + * + * You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + * endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + * endpoint. + */ + 'repos/check-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['environment'] - } - } + /** Response if user is a collaborator */ + 204: never + /** Not Found if user is not a collaborator */ + 404: unknown } } /** - * 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)." + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. * - * **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)." + * Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." * - * **Note:** To create or update secrets for an environment, see "[Secrets](/rest/reference/actions#secrets)." + * For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: + * + * ``` + * Cannot assign {member} permission of {role name} + * ``` + * + * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#invitations). + * + * **Updating an existing collaborator's permission level** + * + * The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. + * + * **Rate limits** * - * You must authenticate using an access token with the repo scope to use this endpoint. + * 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/create-or-update-environment': { + 'repos/add-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } 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: { + /** Response when a new invitation is created */ + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-invitation'] } } + /** + * Response when: + * - an existing collaborator is added as a collaborator + * - an organization member is added as an individual collaborator + * - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + */ + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - wait_timer?: components['schemas']['wait-timer'] - /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ - reviewers?: - | { - type?: components['schemas']['deployment-reviewer-type'] - /** - * @description The id of the user or team who can review the deployment - * @example 4532992 - */ - id?: number - }[] - | null - deployment_branch_policy?: components['schemas']['deployment_branch_policy'] - } | null + /** + * @description The permission to grant the collaborator. **Only valid on organization-owned repositories.** + * @default push + */ + permission?: string + } } } } - /** You must authenticate using an access token with the repo scope to use this endpoint. */ - 'repos/delete-an-environment': { + 'repos/remove-collaborator': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Default response */ + /** Response */ 204: never } } - 'activity/list-repo-events': { + /** Checks the repository permission of a collaborator. The possible repository permissions are `admin`, `write`, `read`, and `none`. */ + 'repos/get-collaborator-permission-level': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response */ + /** if user has admin permissions */ 200: { content: { - 'application/json': components['schemas']['event'][] + 'application/json': components['schemas']['repository-collaborator-permission'] } } + 404: components['responses']['not_found'] } } - 'repos/list-forks': { + /** + * Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). + * + * Comments are ordered by ascending ID. + */ + 'repos/list-commit-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The sort order. Can be either `newest`, `oldest`, or `stargazers`. */ - sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -32226,200 +30924,172 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['commit-comment'][] } } - 400: components['responses']['bad_request'] } } - /** - * Create a fork for the authenticated user. - * - * **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - */ - 'repos/create-fork': { + 'repos/get-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': components['schemas']['full-repository'] + 'application/json': components['schemas']['commit-comment'] } } - 400: components['responses']['bad_request'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description Optional parameter to specify the organization name if forking into an organization. */ - organization?: string - } | null + } + 'repos/delete-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } - 'git/create-blob': { + 'repos/update-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['short-blob'] + 'application/json': components['schemas']['commit-comment'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new blob's content. */ - content: string - /** - * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. - * @default utf-8 - */ - encoding?: string + /** @description The contents of the comment */ + body: string } } } } - /** - * The `content` in the response will always be Base64 encoded. - * - * _Note_: This API supports blobs up to 100 megabytes in size. - */ - 'git/get-blob': { + /** List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). */ + 'reactions/list-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - file_sha: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['blob'] + 'application/json': components['schemas']['reaction'][] } } - 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': { + /** Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). A response with an HTTP `200` status means that you already added the reaction type to this commit comment. */ + 'reactions/create-for-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] } + } + /** Reaction created */ + 201: { content: { - 'application/json': components['schemas']['git-commit'] + 'application/json': components['schemas']['reaction'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The commit message */ - message: string - /** @description The SHA of the tree object this commit points to */ - tree: string - /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ - parents?: string[] - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name: string - /** @description The email of the author (or committer) of the commit */ - email: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description 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?: { - /** @description The name of the author (or committer) of the commit */ - name?: string - /** @description The email of the author (or committer) of the commit */ - email?: string - /** - * Format: date-time - * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string - } - /** @description The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) of the commit. GitHub adds the signature to the `gpgsig` header of the created commit. For a commit signature to be verifiable by Git or GitHub, it must be an ASCII-armored detached PGP signature over the string commit as it would be written to the object database. To pass a `signature` parameter, you need to first manually create a valid PGP signature, which can be complicated. You may find it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) to create signed commits. */ - signature?: string + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the commit comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). - * + * **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/enterprise-server@3.6/rest/reference/repos#comments). + */ + 'reactions/delete-for-commit-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + /** * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32449,89 +31119,113 @@ export interface operations { * | `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': { + 'repos/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** commit_sha parameter */ - commit_sha: components['parameters']['commit-sha'] + } + 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 + /** The number of results per page (max 100). */ + per_page?: 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-commit'] + 'application/json': components['schemas']['commit'][] } } + 400: components['responses']['bad_request'] 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 500: components['responses']['internal_error'] } } /** - * 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)". + * Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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`. + * Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. */ - 'git/list-matching-refs': { + 'repos/list-branches-for-head-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['git-ref'][] + 'application/json': components['schemas']['branch-short'][] } } + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** Use the `:commit_sha` to specify the commit that will have its comments listed. */ + 'repos/list-comments-for-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['commit-comment'][] } } - 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': { + /** + * Create a comment for a commit using its `:commit_sha`. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-commit-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { @@ -32541,73 +31235,63 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['git-ref'] + 'application/json': components['schemas']['commit-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ - ref: string - /** @description The SHA1 value for this reference. */ - sha: string - /** @example "refs/heads/newbranch" */ - key?: string + /** @description The contents of the comment. */ + body: string + /** @description Relative path of the file to comment on. */ + path?: string + /** @description Line index in the diff to comment on. */ + position?: number + /** @description **Deprecated**. Use **position** parameter instead. Line number in the file to comment on. */ + line?: number } } } } - 'git/delete-ref': { + /** Lists the merged pull request that introduced the commit to the repository. If the commit is not present in the default branch, additionally returns open pull requests associated with the commit. The results may include open and closed pull requests. */ + 'repos/list-pull-requests-associated-with-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } - } - responses: { - /** Response */ - 204: never - 422: components['responses']['validation_failed'] - } - } - 'git/update-ref': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** ref parameter */ - ref: string + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The SHA1 value to set this reference to */ - sha: string - /** - * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. - * @default false - */ - force?: boolean + 'application/json': components['schemas']['pull-request-simple'][] } } } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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** * @@ -32638,56 +31322,200 @@ export interface operations { * | `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': { + 'repos/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit'] } } + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } - requestBody: { - content: { - 'application/json': { - /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ - tag: string - /** @description The tag message. */ - message: string - /** @description The SHA of the git object this is tagging. */ - object: string - /** - * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. - * @enum {string} - */ - type: 'commit' | 'tree' | 'blob' - /** @description An object with information about the individual creating the tag. */ - tagger?: { - /** @description The name of the author of the tag */ - name: string - /** @description The email of the author of the tag */ - email: string - /** - * Format: date-time - * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - date?: string + } + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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`. */ + status?: components['parameters']['status'] + /** Filters check runs by their `completed_at` timestamp. `latest` returns the most recent check runs. */ + filter?: 'latest' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + app_id?: number + } + } + responses: { + /** Response */ + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + check_runs: 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 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + /** The number of results per page (max 100). */ + 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'][] } } } } } /** + * Users with pull access in a repository can access a combined view of commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. + * + * + * Additionally, a combined `state` is returned. The `state` is one of: + * + * * **failure** if any of the contexts report as `error` or `failure` + * * **pending** if there are no statuses or a context is `pending` + * * **success** if the latest status for all contexts is `success` + */ + 'repos/get-combined-status-for-ref': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['combined-commit-status'] + } + } + 404: components['responses']['not_found'] + } + } + /** + * Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one. + * + * This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + */ + 'repos/list-commit-statuses-for-ref': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** ref parameter */ + ref: string + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'] + } + } + /** + * The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + * + * The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + * + * The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + * + * **Working with large comparisons** + * + * To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + * + * When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * * **Signature verification object** * * The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object: @@ -32717,766 +31545,996 @@ export interface operations { * | `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': { + 'repos/compare-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - tag_sha: string + /** The base branch and head branch to compare. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tag'] + 'application/json': components['schemas']['commit-comparison'] } } 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } /** - * 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. + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#custom-media-types) to ensure the content is returned in a consistent + * object format. + * + * **Notes**: + * * To get a repository's contents recursively, you can [recursively get the tree](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#get-a-tree). + * * Download URLs expire and are meant to be used just once. To ensure the download URL does not expire, please use the contents API to obtain a fresh download URL for each download. + * #### Size limits + * If the requested file's size is: + * * 1 MB or smaller: All features of this endpoint are supported. + * * Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) are supported. Both will work as normal, except that when using the `object` media type, the `content` field will be an empty string and the `encoding` field will be `"none"`. To get the contents of these larger files, use the `raw` media type. + * * Greater than 100 MB: This endpoint is not supported. + * + * #### 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 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)." + * 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. */ - 'git/create-tree': { + 'repos/get-content': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['git-tree'] + 'application/vnd.github.object': components['schemas']['content-tree'] + 'application/json': + | components['schemas']['content-directory'] + | components['schemas']['content-file'] + | components['schemas']['content-symlink'] + | components['schemas']['content-submodule'] } } + 302: components['responses']['found'] 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ - tree: { - /** @description The file referenced in the tree. */ - path?: string - /** - * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. - * @enum {string} - */ - mode?: '100644' | '100755' | '040000' | '160000' | '120000' - /** - * @description Either `blob`, `tree`, or `commit`. - * @enum {string} - */ - type?: 'blob' | 'tree' | 'commit' - /** - * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - sha?: string | null - /** - * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. - * - * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. - */ - content?: string - }[] - /** - * @description The 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 - } - } } } /** - * Returns a single tree using the SHA1 value for that tree. + * Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. * - * 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. + * **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'git/get-tree': { + 'repos/create-or-update-file-contents': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 + /** path parameter */ + path: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['git-tree'] + 'application/json': components['schemas']['file-commit'] } } - 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: {} + 201: { content: { - 'application/json': components['schemas']['hook'][] + 'application/json': components['schemas']['file-commit'] } } 404: components['responses']['not_found'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The commit message. */ + message: string + /** @description The new file content, using Base64 encoding. */ + content: string + /** @description **Required if you are updating a file**. The blob SHA of the file being replaced. */ + sha?: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description The person that committed the file. Default: the authenticated user. */ + committer?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-05T13:13:22+05:00" */ + date?: string + } + /** @description The author of the file. Default: The `committer` or the authenticated user if you omit `committer`. */ + author?: { + /** @description The name of the author or committer of the commit. You'll receive a `422` status code if `name` is omitted. */ + name: string + /** @description The email of the author or committer of the commit. You'll receive a `422` status code if `email` is omitted. */ + email: string + /** @example "2013-01-15T17:13:22+05:00" */ + date?: string + } + } + } } } /** - * 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. + * 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. + * + * **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. */ - 'repos/create-webhook': { + 'repos/delete-file': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** path parameter */ + path: string } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['hook'] + 'application/json': components['schemas']['file-commit'] } } - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ - name?: string - /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). */ - config?: { - 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'] - /** @example "abc" */ - token?: string - /** @example "sha256" */ - digest?: string + /** @description The commit message. */ + message: string + /** @description The blob SHA of the file being deleted. */ + sha: string + /** @description The branch name. Default: the repository’s default branch (usually `master`) */ + branch?: string + /** @description object containing information about the committer. */ + committer?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. - * @default [ - * "push" - * ] - */ - events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean - } | null + /** @description object containing information about the author. */ + author?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + } + } } } } - /** 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + } + query: { + /** Set to `1` or `true` to include anonymous contributors in results. */ + anon?: string + /** The number of 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']['hook'] + 'application/json': components['schemas']['contributor'][] } } + /** Response if repository is empty */ + 204: never + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] } } - 'repos/delete-webhook': { + /** Lists all secrets available in a repository without revealing their encrypted values. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/list-repo-secrets': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] + 200: { + headers: {} + content: { + 'application/json': { + total_count: number + secrets: components['schemas']['dependabot-secret'][] + } + } + } } } - /** 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': { + /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with read access to the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-public-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['hook'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description 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'] - /** @example "bar@example.com" */ - address?: string - /** @example "The Serious Room" */ - room?: string - } - /** - * @description Determines what [events](https://docs.github.com/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. - * @default [ - * "push" - * ] - */ - events?: string[] - /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ - add_events?: string[] - /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ - remove_events?: string[] - /** - * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. - * @default true - */ - active?: boolean + 'application/json': components['schemas']['dependabot-public-key'] } } } } - /** - * 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': { + /** Gets a single repository secret without revealing its encrypted value. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/get-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['dependabot-secret'] } } } } /** - * 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)." + * Creates or updates a repository secret with an encrypted value. Encrypt your secret using + * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + * token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + * permission to use this endpoint. * - * Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + * #### Example encrypting a secret using Node.js + * + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'repos/update-webhook-config-for-repo': { + 'dependabot/create-or-update-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { + /** Response when creating a secret */ + 201: { content: { - 'application/json': components['schemas']['webhook-config'] + 'application/json': components['schemas']['empty-object'] } } + /** Response when updating a secret */ + 204: never } 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'] + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get a repository public key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) endpoint. */ + encrypted_value?: string + /** @description ID of the key you used to encrypt the secret. */ + key_id?: string } } } } - /** Returns a list of webhook deliveries for a webhook configured in a repository. */ - 'repos/list-webhook-deliveries': { + /** Deletes a secret in a repository using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository permission to use this endpoint. */ + 'dependabot/delete-repo-secret': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ - cursor?: components['parameters']['cursor'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['hook-delivery-item'][] - } - } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 204: never } } - /** Returns a delivery for a webhook configured in a repository. */ - 'repos/get-webhook-delivery': { + /** Gets the diff of the dependency changes between two commits of a repository, based on the changes to the dependency manifests made in those commits. */ + 'dependency-graph/diff-range': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] + /** The base and head Git revisions to compare. The Git revisions will be resolved to commit SHAs. Named revisions will be resolved to their corresponding HEAD commits, and an appropriate merge base will be determined. This parameter expects the format `{base}...{head}`. */ + basehead: string + } + query: { + /** The full path, relative to the repository root, of the dependency manifest file. */ + name?: components['parameters']['manifest-path'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['hook-delivery'] + 'application/json': components['schemas']['dependency-graph-diff'] } } - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** Redeliver a webhook delivery for a webhook configured in a repository. */ - 'repos/redeliver-webhook-delivery': { + /** Simple filtering of deployments is available via query parameters: */ + 'repos/list-deployments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] - delivery_id: components['parameters']['delivery-id'] } - } - responses: { - 202: components['responses']['accepted'] - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - } - /** This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) to be sent to the hook. */ - 'repos/ping-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + query: { + /** The SHA recorded at creation time. */ + sha?: string + /** The name of the ref. This can be a branch, tag, or SHA. */ + ref?: string + /** The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). */ + task?: string + /** The name of the environment that was deployed to (e.g., `staging` or `production`). */ + environment?: string | null + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - } - } - /** - * This will trigger the hook with the latest push to the current repository if the hook is subscribed to `push` events. If the hook is not subscribed to `push` events, the server will respond with 204 but no test POST will be generated. - * - * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` - */ - 'repos/test-push-webhook': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - hook_id: components['parameters']['hook-id'] + 200: { + headers: {} + content: { + 'application/json': components['schemas']['deployment'][] + } } } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - } } /** - * View the progress of an import. + * Deployments offer a few configurable parameters with certain defaults. * - * **Import status** + * The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them + * before we merge a pull request. * - * This section includes details about the possible values of the `status` field of the Import Progress response. + * 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`. * - * An import that does not have errors will progress through these steps: + * 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. * - * * `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. + * By default, [commit statuses](https://docs.github.com/enterprise-server@3.6/rest/commits/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. * - * If there are problems, you will see one of these in the `status` field: + * 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. * - * * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. + * The `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. * - * **The project_choices field** + * Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. * - * 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. + * #### 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 * - * **Git LFS related fields** + * If there are no new commits in the base branch, a new request to create a deployment should give a successful + * response. * - * This section includes details about Git LFS related fields that may be present in the Import Progress 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. * - * * `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. + * #### 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`. */ - 'migrations/get-import-status': { + 'repos/create-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['import'] + 'application/json': components['schemas']['deployment'] } } - 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 - } + /** Merged branch response */ + 202: { content: { - 'application/json': components['schemas']['import'] + 'application/json': { + message?: string + } } } - 404: components['responses']['not_found'] + /** Conflict when there is a merge conflict or the commit's status checks failed */ + 409: unknown 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The URL of the originating repository. */ - vcs_url: string + /** @description The ref to deploy. This can be a branch, tag, or SHA. */ + ref: string /** - * @description The originating VCS type. Can be one of `subversion`, `git`, `mercurial`, or `tfvc`. Please be aware that without this parameter, the import job will take additional time to detect the VCS type before beginning the import. This detection step will be reflected in the response. - * @enum {string} + * @description Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + * @default deploy + */ + task?: string + /** + * @description Attempts to automatically merge the default branch into the requested ref, if it's behind the default branch. + * @default true + */ + auto_merge?: boolean + /** @description The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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]: unknown } | string + /** + * @description Name for the target deployment environment (e.g., `production`, `staging`, `qa`). + * @default production + */ + environment?: string + /** + * @description Short description of the deployment. + * @default + */ + description?: string | null + /** + * @description Specifies if the given environment is specific to the deployment and will no longer exist at some point in the future. Default: `false` + * @default false */ - vcs?: 'subversion' | 'git' | 'mercurial' | 'tfvc' - /** @description If authentication is required, the username to provide to `vcs_url`. */ - vcs_username?: string - /** @description If authentication is required, the password to provide to `vcs_url`. */ - vcs_password?: string - /** @description For a tfvc import, the name of the project that is being imported. */ - tfvc_project?: string + transient_environment?: boolean + /** @description Specifies if the given environment is one that end-users directly interact with. Default: `true` when `environment` is `production` and `false` otherwise. */ + production_environment?: boolean } } } } - /** Stop an import for a repository. */ - 'migrations/cancel-import': { + 'repos/get-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['deployment'] + } + } + 404: components['responses']['not_found'] } } /** - * 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. + * If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + * + * To set a deployment as inactive, you must: + * + * * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * * Mark the active deployment as inactive by adding any non-successful deployment status. + * + * For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." */ - 'migrations/update-import': { + 'repos/delete-deployment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The username to provide to the originating repository. */ - vcs_username?: string - /** @description The password to provide to the originating repository. */ - vcs_password?: string - /** @example "git" */ - vcs?: string - /** @example "project1" */ - tfvc_project?: string - } | null - } + 204: never + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - /** - * 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': { + /** Users with pull access can view deployment statuses for a deployment: */ + 'repos/list-deployment-statuses': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } query: { - /** A user ID. Only return users with an ID greater than this ID. */ - since?: components['parameters']['since-user'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['porter-author'][] + 'application/json': components['schemas']['deployment-status'][] } } 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - author_id: number + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['porter-author'] + 'application/json': components['schemas']['deployment-status'] } } - 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new Git author email. */ - email?: string - /** @description The new Git author name. */ - name?: string + /** + * @description The state of the status. When you set a transient deployment to `inactive`, the deployment will be shown as `destroyed` in GitHub. + * @enum {string} + */ + state: 'error' | 'failure' | 'inactive' | 'in_progress' | 'queued' | 'pending' | 'success' + /** + * @description The target URL to associate with this status. This URL should contain output to keep the user updated while the task is running or serve as historical information for what happened in the deployment. **Note:** It's recommended to use the `log_url` parameter, which replaces `target_url`. + * @default + */ + target_url?: string + /** + * @description The full URL of the deployment's output. This parameter replaces `target_url`. We will continue to accept `target_url` to support legacy uses, but we recommend replacing `target_url` with `log_url`. Setting `log_url` will automatically set `target_url` to the same value. Default: `""` + * @default + */ + log_url?: string + /** + * @description A short description of the status. The maximum description length is 140 characters. + * @default + */ + description?: string + /** + * @description Name for the target deployment environment, which can be changed when setting a deploy status. For example, `production`, `staging`, or `qa`. + * @enum {string} + */ + environment?: 'production' | 'staging' | 'qa' + /** + * @description Sets the URL for accessing your environment. Default: `""` + * @default + */ + environment_url?: string + /** @description Adds a new `inactive` status to all prior non-transient, non-production environment deployments with the same repository and `environment` name as the created status's deployment. An `inactive` status is only added to deployments that had a `success` state. Default: `true` */ + auto_inactive?: boolean } } } } - /** List files larger than 100MB found during the import */ - 'migrations/get-large-files': { + /** Users with pull access can view a deployment status for a deployment: */ + 'repos/get-deployment-status': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** deployment_id parameter */ + deployment_id: components['parameters']['deployment-id'] + status_id: number } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['porter-large-file'][] + 'application/json': components['schemas']['deployment-status'] } } + 404: components['responses']['not_found'] } } - /** You can import repositories from Subversion, Mercurial, and TFS that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). You can learn more about our LFS feature and working with large files [on our help site](https://docs.github.com/articles/versioning-large-files/). */ - 'migrations/set-lfs-preference': { + /** + * You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/webhooks/event-payloads/#repository_dispatch)." + * + * The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + * + * This endpoint requires write access to the repository by providing either: + * + * - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + * - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + * + * This input example shows how you can use the `client_payload` as a test to debug your workflow. + */ + 'repos/create-dispatch-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['import'] - } - } + 204: never 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description Can be one of `opt_in` (large files will be stored using Git LFS) or `opt_out` (large files will be removed during the import). - * @enum {string} - */ - use_lfs: 'opt_in' | 'opt_out' + /** @description A custom webhook event name. Must be 100 characters or fewer. */ + event_type: string + /** @description JSON payload with extra information about the webhook event that your action or workflow may use. The maximum number of top-level properties is 10. */ + client_payload?: { [key: string]: unknown } } } } } /** - * 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. + * Lists the environments for a repository. * - * 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. + * 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. */ - 'apps/get-repo-installation': { + 'repos/get-all-environments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results 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']['installation'] + 'application/json': { + /** + * @description The number of environments in this repository + * @example 5 + */ + total_count?: number + environments?: components['schemas']['environment'][] + } } } - 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': { + /** + * **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + * + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } + 'application/json': components['schemas']['environment'] } } } } - /** 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': { + /** + * 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + * + * **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-or-update-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['interaction-limit-response'] + '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'] } } - /** Response */ - 409: unknown } requestBody: { content: { - 'application/json': components['schemas']['interaction-limit'] + 'application/json': { + wait_timer?: components['schemas']['wait-timer'] + /** @description The people or teams that may review jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. */ + reviewers?: + | { + type?: components['schemas']['deployment-reviewer-type'] + /** + * @description The id of the user or team who can review the deployment + * @example 4532992 + */ + id?: number + }[] + | null + deployment_branch_policy?: components['schemas']['deployment-branch-policy-settings'] + } | null } } } - /** 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': { + /** You must authenticate using an access token with the repo scope to use this endpoint. */ + 'repos/delete-an-environment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { - /** Response */ + /** Default response */ 204: never - /** Response */ - 409: unknown } } - /** When authenticating as a user with admin rights to a repository, this endpoint will list all currently open repository invitations. */ - 'repos/list-invitations': { + /** + * Lists the deployment branch policies for an environment. + * + * 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/list-deployment-branch-policies': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33485,177 +32543,145 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['repository-invitation'][] + 'application/json': { + /** + * @description The number of deployment branch policies for the environment. + * @example 2 + */ + total_count: number + branch_policies: components['schemas']['deployment-branch-policy'][] + } } } } } - 'repos/delete-invitation': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] - } - } - responses: { - /** Response */ - 204: never - } - } - 'repos/update-invitation': { + /** + * Creates a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/create-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** invitation_id parameter */ - invitation_id: components['parameters']['invitation-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-invitation'] + 'application/json': components['schemas']['deployment-branch-policy'] } } + /** Response if the same branch name pattern already exists */ + 303: never + /** Not Found or `deployment_branch_policy.custom_branch_policies` property for the environment is set to false */ + 404: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. - * @enum {string} - */ - permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' - } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } /** - * List issues in a repository. + * Gets a deployment branch policy for an environment. * - * **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. + * 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. */ - 'issues/list-for-repo': { + 'repos/get-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue'][] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 301: components['responses']['moved_permanently'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } /** - * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * Updates a deployment branch policy for an environment. * - * This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. */ - 'issues/create': { + 'repos/update-deployment-branch-policy': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } + 200: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['deployment-branch-policy'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } requestBody: { content: { - 'application/json': { - /** @description The title of the issue. */ - title: string | number - /** @description The contents of the issue. */ - body?: string - /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ - assignee?: string | null - milestone?: (string | number) | null - /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } + 'application/json': components['schemas']['deployment-branch-policy-name-pattern'] } } } - /** By default, Issue Comments are ordered by ascending ID. */ - 'issues/list-comments-for-repo': { + /** + * Deletes a deployment branch policy for an environment. + * + * You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. + */ + 'repos/delete-deployment-branch-policy': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The unique identifier of the branch policy. */ + branch_policy_id: components['parameters']['branch-policy-id'] + } + } + responses: { + /** Response */ + 204: never + } + } + 'activity/list-repo-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -33664,172 +32690,304 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['event'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'issues/get-comment': { + 'repos/list-forks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + } + query: { + /** The sort order. `stargazers` will sort by star count. */ + sort?: 'newest' | 'oldest' | 'stargazers' | 'watchers' + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['minimal-repository'][] } } - 404: components['responses']['not_found'] + 400: components['responses']['bad_request'] } } - 'issues/delete-comment': { + /** + * 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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + */ + 'repos/create-fork': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 204: never + 202: { + content: { + 'application/json': components['schemas']['full-repository'] + } + } + 400: components['responses']['bad_request'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Optional parameter to specify the organization name if forking into an organization. */ + organization?: string + } | null + } } } - 'issues/update-comment': { + 'git/create-blob': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['short-blob'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 409: components['responses']['conflict'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description The new blob's content. */ + content: string + /** + * @description The encoding used for `content`. Currently, `"utf-8"` and `"base64"` are supported. + * @default utf-8 + */ + encoding?: string } } } } - /** List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). */ - 'reactions/list-for-issue-comment': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + file_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['blob'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ - 'reactions/create-for-issue-comment': { + /** + * 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 the 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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 */ + /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['git-commit'] } } + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The commit message */ + message: string + /** @description The SHA of the tree object this commit points to */ + tree: string + /** @description The SHAs of the commits that were the parents of this commit. If omitted or empty, the commit will be written as a root commit. For a single parent, an array of one SHA should be provided; for a merge commit, an array of more than one should be provided. */ + parents?: string[] + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name: string + /** @description The email of the author (or committer) of the commit */ + email: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description 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?: { + /** @description The name of the author (or committer) of the commit */ + name?: string + /** @description The email of the author (or committer) of the commit */ + email?: string + /** + * Format: date-time + * @description Indicates when this commit was authored (or committed). This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } + /** @description The [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 } } } } /** - * **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`. + * 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 the 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: * - * Delete a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + * | 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. | */ - 'reactions/delete-for-issue-comment': { + 'git/get-commit': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] + /** The SHA of the commit. */ + commit_sha: components['parameters']['commit-sha'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['git-commit'] + } + } + 404: components['responses']['not_found'] } } - 'issues/list-events-for-repo': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** ref parameter */ + ref: string } } responses: { @@ -33837,214 +32995,270 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['issue-event'][] + 'application/json': components['schemas']['git-ref'][] } } - 422: components['responses']['validation_failed'] } } - 'issues/get-event': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". + */ + 'git/get-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - event_id: number + /** ref parameter */ + ref: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['issue-event'] + 'application/json': components['schemas']['git-ref'] } } - 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://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - * to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. - * - * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this - * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by - * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. - */ - 'issues/get': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-ref'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the fully qualified reference (ie: `refs/heads/master`). If it doesn't start with 'refs' and have at least two slashes, it will be rejected. */ + ref: string + /** @description The SHA1 value for this reference. */ + sha: string + /** @example "refs/heads/newbranch" */ + key?: string } } - 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': { + 'git/delete-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** ref parameter */ + ref: string } } 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'] + 204: never 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the issue. */ - title?: (string | number) | null - /** @description The contents of the issue. */ - body?: string | null - /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ - assignee?: string | null - /** - * @description State of the issue. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - milestone?: (string | number) | null - /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ - labels?: ( - | string - | { - id?: number - name?: string - description?: string | null - color?: string | null - } - )[] - /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ - assignees?: string[] - } - } } } - /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ - 'issues/add-assignees': { + 'git/update-ref': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The name of the fully qualified reference to update. For example, `refs/heads/master`. If the value doesn't start with `refs` and have at least two slashes, it will be rejected. */ + ref: string } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-ref'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Usernames of people to assign this issue to. _NOTE: Only users with push access can add assignees to an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] + /** @description The SHA1 value to set this reference to */ + sha: string + /** + * @description Indicates whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. + * @default false + */ + force?: boolean } } } } - /** Removes one or more assignees from an issue. */ - 'issues/remove-assignees': { + /** + * 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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['issue'] + 'application/json': components['schemas']['git-tag'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ - assignees?: string[] + /** @description The tag's name. This is typically a version (e.g., "v0.0.1"). */ + tag: string + /** @description The tag message. */ + message: string + /** @description The SHA of the git object this is tagging. */ + object: string + /** + * @description The type of the object we're tagging. Normally this is a `commit` but it can also be a `tree` or a `blob`. + * @enum {string} + */ + type: 'commit' | 'tree' | 'blob' + /** @description An object with information about the individual creating the tag. */ + tagger?: { + /** @description The name of the author of the tag */ + name: string + /** @description The email of the author of the tag */ + email: string + /** + * Format: date-time + * @description When this object was tagged. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + date?: string + } } } } } - /** Issue Comments are ordered by ascending ID. */ - 'issues/list-comments': { + /** + * **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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + tag_sha: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['issue-comment'][] + 'application/json': components['schemas']['git-tag'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'issues/create-comment': { + /** + * 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + * + * Returns an error if you try to delete a file that does not exist. + */ + 'git/create-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { @@ -34054,59 +33268,96 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['issue-comment'] + 'application/json': components['schemas']['git-tree'] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The contents of the comment. */ - body: string + /** @description Objects (of `path`, `mode`, `type`, and `sha`) specifying a tree structure. */ + tree: { + /** @description The file referenced in the tree. */ + path?: string + /** + * @description The file mode; one of `100644` for file (blob), `100755` for executable (blob), `040000` for subdirectory (tree), `160000` for submodule (commit), or `120000` for a blob that specifies the path of a symlink. + * @enum {string} + */ + mode?: '100644' | '100755' | '040000' | '160000' | '120000' + /** + * @description Either `blob`, `tree`, or `commit`. + * @enum {string} + */ + type?: 'blob' | 'tree' | 'commit' + /** + * @description The SHA1 checksum ID of the object in the tree. Also called `tree.sha`. If the value is `null` then the file will be deleted. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + sha?: string | null + /** + * @description The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or `tree.sha`. + * + * **Note:** Use either `tree.sha` or `content` to specify the contents of the entry. Using both `tree.sha` and `content` will return an error. + */ + content?: string + }[] + /** + * @description The 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 } } } } - 'issues/list-events': { + /** + * 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. + * + * + * **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. + */ + 'git/get-tree': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + tree_sha: string } query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** 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: { - headers: {} content: { - 'application/json': components['schemas']['issue-event-for-issue'][] + 'application/json': components['schemas']['git-tree'] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/list-labels-on-issue': { + /** Lists webhooks for a repository. `last response` may return null if there have not been any deliveries within 30 days. */ + 'repos/list-webhooks': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34117,305 +33368,374 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'][] } } - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - /** Removes any previous labels and sets the new labels for an issue. */ - 'issues/set-labels': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } - 410: components['responses']['gone'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': - | { - /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string + 'application/json': { + /** @description Use `web` to create a webhook. Default: `web`. This parameter only accepts the value `web`. */ + name?: string + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "abc" */ + token?: string + /** @example "sha256" */ + digest?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. + * @default [ + * "push" + * ] + */ + events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } | null } } } - 'issues/add-labels': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': - | { - /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." */ - labels?: string[] - } - | string[] - | { - labels?: { - name: string - }[] - } - | { - name: string - }[] - | string - } + 404: components['responses']['not_found'] } } - 'issues/remove-all-labels': { + 'repos/delete-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never - 410: components['responses']['gone'] + 404: components['responses']['not_found'] } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - name: string + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['hook'] } } 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Key/value pairs to provide settings for this webhook. [These are defined below](https://docs.github.com/enterprise-server@3.6/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'] + /** @example "bar@example.com" */ + address?: string + /** @example "The Serious Room" */ + room?: string + } + /** + * @description Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) the hook is triggered for. This replaces the entire array of events. + * @default [ + * "push" + * ] + */ + events?: string[] + /** @description Determines a list of events to be added to the list of events that the Hook triggers for. */ + add_events?: string[] + /** @description Determines a list of events to be removed from the list of events that the Hook triggers for. */ + remove_events?: string[] + /** + * @description Determines if notifications are sent when the webhook is triggered. Set to `true` to send notifications. + * @default true + */ + active?: boolean + } + } } } /** - * Users with push access can lock an issue or pull request's conversation. + * 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)." * - * 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)." + * Access tokens must have the `read:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:read` permission. */ - 'issues/lock': { + 'repos/get-webhook-config-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: - * \* `off-topic` - * \* `too heated` - * \* `resolved` - * \* `spam` - * @enum {string} - */ - lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' - } | null + 200: { + content: { + 'application/json': components['schemas']['webhook-config'] + } } } } - /** Users with push access can unlock an issue's conversation. */ - 'issues/unlock': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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'] + } + } } } - /** List the reactions to an [issue](https://docs.github.com/rest/reference/issues). */ - 'reactions/list-for-issue': { + /** Returns a list of webhook deliveries for a webhook configured in a repository. */ + 'repos/list-webhook-deliveries': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-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. */ - content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the `link` header for the next and previous page cursors. */ + cursor?: components['parameters']['cursor'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': components['schemas']['hook-delivery-item'][] } } - 404: components['responses']['not_found'] - 410: components['responses']['gone'] + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] } } - /** Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ - 'reactions/create-for-issue': { + /** Returns a delivery for a webhook configured in a repository. */ + 'repos/get-webhook-delivery': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['hook-delivery'] } } - /** Response */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } + 400: components['responses']['bad_request'] + 422: components['responses']['validation_failed'] + } + } + /** Redeliver a webhook delivery for a webhook configured in a repository. */ + 'repos/redeliver-webhook-delivery': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] + delivery_id: components['parameters']['delivery-id'] } + } + responses: { + 202: components['responses']['accepted'] + 400: components['responses']['bad_request'] 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the issue. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } + } + /** This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) to be sent to the hook. */ + 'repos/ping-webhook': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } + responses: { + /** Response */ + 204: never + 404: components['responses']['not_found'] + } } /** - * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + * 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. * - * Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + * **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` */ - 'reactions/delete-for-issue': { + 'repos/test-push-webhook': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - reaction_id: components['parameters']['reaction-id'] + /** The unique identifier of the hook. */ + hook_id: components['parameters']['hook-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - 'issues/list-events-for-timeline': { + /** + * 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + */ + 'apps/get-repo-installation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** issue_number parameter */ - issue_number: components['parameters']['issue-number'] - } - query: { - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['timeline-issue-events'][] + 'application/json': components['schemas']['installation'] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] - 410: components['responses']['gone'] } } - 'repos/list-deploy-keys': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34426,90 +33746,94 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['deploy-key'][] + 'application/json': components['schemas']['repository-invitation'][] } } } } - /** You can create a read-only deploy key. */ - 'repos/create-deploy-key': { + 'repos/delete-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['deploy-key'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description A name for the key. */ - title?: string - /** @description The contents of the key. */ - key: string - /** - * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. - * - * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." - */ - read_only?: boolean - } - } + 204: never } } - 'repos/get-deploy-key': { + 'repos/update-invitation': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** key_id parameter */ - key_id: components['parameters']['key-id'] + /** The unique identifier of the invitation. */ + invitation_id: components['parameters']['invitation-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['deploy-key'] + 'application/json': components['schemas']['repository-invitation'] } } - 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'] + requestBody: { + content: { + 'application/json': { + /** + * @description The permissions that the associated user will have on the repository. Valid values are `read`, `write`, `maintain`, `triage`, and `admin`. + * @enum {string} + */ + permissions?: 'read' | 'write' | 'maintain' | 'triage' | 'admin' + } } } - responses: { - /** Response */ - 204: never - } } - 'issues/list-labels-for-repo': { + /** + * 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/list-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Results per page (max 100) */ + /** 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. */ + 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. */ + sort?: 'created' | 'updated' | 'comments' + /** The direction to sort the results by. */ + 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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34520,16 +33844,25 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/create-label': { + /** + * Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + * + * This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'issues/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -34540,49 +33873,105 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['issue'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } requestBody: { content: { 'application/json': { - /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - name: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + /** @description The title of the issue. */ + title: string | number + /** @description The contents of the issue. */ + body?: string + /** @description Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_ */ + assignee?: string | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] } } } } - 'issues/get-label': { + /** By default, Issue Comments are ordered by ascending ID. */ + 'issues/list-comments-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + } + query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['issue-comment'][] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - 'issues/delete-label': { + 'issues/get-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the comment. */ + 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -34590,76 +33979,121 @@ export interface operations { 204: never } } - 'issues/update-label': { + 'issues/update-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - name: string + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['label'] + 'application/json': components['schemas']['issue-comment'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ - new_name?: string - /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ - color?: string - /** @description A short description of the label. Must be 100 characters or fewer. */ - description?: string + /** @description The contents of the comment. */ + body: string } } } } - /** Lists languages for the specified repository. The value shown for each language is the number of bytes of code written in that language. */ - 'repos/list-languages': { + /** List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). */ + 'reactions/list-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + query: { + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['language'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - 'repos/enable-lfs-for-repo': { + /** Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). A response with an HTTP `200` status means that you already added the reaction type to this issue comment. */ + 'reactions/create-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { - 202: components['responses']['accepted'] - /** - * We will return a 403 with one of the following messages: - * - * - Git LFS support not enabled because Git LFS is globally disabled. - * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - * - Git LFS support not enabled because Git LFS is disabled for . - */ - 403: unknown + /** Reaction exists */ + 200: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } + } } } - 'repos/disable-lfs-for-repo': { + /** + * **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/enterprise-server@3.6/rest/reference/issues#comments). + */ + 'reactions/delete-for-issue-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -34667,247 +34101,292 @@ export interface operations { 204: never } } - /** - * This method returns the contents of the repository's license file, if one is detected. - * - * Similar to [Get repository content](https://docs.github.com/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. - */ - 'licenses/get-for-repo': { + 'issues/list-events-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['license-content'] + 'application/json': components['schemas']['issue-event'][] } } + 422: components['responses']['validation_failed'] } } - /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ - 'repos/merge-upstream': { + 'issues/get-event': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + event_id: number } } responses: { - /** The branch has been successfully synced with the upstream repository */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['merged-upstream'] - } - } - /** The branch could not be synced because of a merge conflict */ - 409: unknown - /** The branch could not be synced for some other reason */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the branch which should be updated to match upstream. */ - branch: string + 'application/json': components['schemas']['issue-event'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'repos/merge': { + /** + * The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + * [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + * the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + * returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + * access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + * to the [`issues`](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + */ + 'issues/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { - /** Successful Response (The resulting merge commit) */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['commit'] - } - } - /** Response when already merged */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found when the base or head does not exist */ - 404: unknown - /** Conflict when there is a merge conflict */ - 409: unknown - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The name of the base branch that the head will be merged into. */ - base: string - /** @description The head to merge. This can be a branch name or a commit SHA1. */ - head: string - /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ - commit_message?: string + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'issues/list-milestones': { + /** Issue owners and users with push access can edit an issue. */ + 'issues/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['milestone'][] + 'application/json': components['schemas']['issue'] } } + 301: components['responses']['moved_permanently'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the issue. */ + title?: (string | number) | null + /** @description The contents of the issue. */ + body?: string | null + /** @description Login for the user that this issue should be assigned to. **This field is deprecated.** */ + assignee?: string | null + /** + * @description State of the issue. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** + * @description The reason for the current state + * @example not_planned + * @enum {string|null} + */ + state_reason?: ('completed' | 'not_planned' | 'reopened') | null + milestone?: (string | number) | null + /** @description Labels to associate with this issue. Pass one or more Labels to _replace_ the set of Labels on this Issue. Send an empty array (`[]`) to clear all Labels from the Issue. _NOTE: Only users with push access can set labels for issues. Labels are silently dropped otherwise._ */ + labels?: ( + | string + | { + id?: number + name?: string + description?: string | null + color?: string | null + } + )[] + /** @description Logins for Users to assign to this issue. Pass one or more user logins to _replace_ the set of assignees on this Issue. Send an empty array (`[]`) to clear all assignees from the Issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._ */ + assignees?: string[] + } + } } } - 'issues/create-milestone': { + /** Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced. */ + 'issues/add-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description 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[] } } } } - 'issues/get-milestone': { + /** Removes one or more assignees from an issue. */ + 'issues/remove-assignees': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description Usernames of assignees to remove from an issue. _NOTE: Only users with push access can remove assignees from an issue. Assignees are silently ignored otherwise._ */ + assignees?: string[] } } - 404: components['responses']['not_found'] } } - 'issues/delete-milestone': { + /** Issue Comments are ordered by ascending ID. */ + 'issues/list-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never + 200: { + headers: {} + content: { + 'application/json': components['schemas']['issue-comment'][] + } + } 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - 'issues/update-milestone': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'issues/create-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['milestone'] + 'application/json': components['schemas']['issue-comment'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The title of the milestone. */ - title?: string - /** - * @description The state of the milestone. Either `open` or `closed`. - * @default open - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description A description of the milestone. */ - description?: string - /** - * Format: date-time - * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. - */ - due_on?: string + /** @description The contents of the comment. */ + body: string } } } } - 'issues/list-labels-for-milestone': { + 'issues/list-events': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** milestone_number parameter */ - milestone_number: components['parameters']['milestone-number'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34918,28 +34397,24 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['label'][] + 'application/json': components['schemas']['issue-event-for-issue'][] } } + 410: components['responses']['gone'] } } - /** List all notifications for the current user. */ - 'activity/list-repo-notifications-for-authenticated-user': { + 'issues/list-labels-on-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -34950,157 +34425,219 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['thread'][] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** 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': { + /** Removes any previous labels and sets the new labels for an issue. */ + 'issues/set-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['label'][] } } - /** Reset Content */ - 205: unknown + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] } requestBody: { content: { - 'application/json': { - /** - * Format: date-time - * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. - */ - last_read_at?: string - } + 'application/json': + | { + /** @description The names of the labels to set for the issue. The labels you set replace any existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also add labels to the existing labels for an issue. For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string } } } - 'repos/get-pages': { + 'issues/add-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['label'][] } } + 301: components['responses']['moved_permanently'] 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': + | { + /** @description The names of the labels to add to the issue's existing labels. You can pass an empty array to remove all labels. Alternatively, you can pass a single label as a `string` or an `array` of labels directly, but GitHub recommends passing an object with the `labels` key. You can also replace all of the labels for an issue. For more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." */ + labels?: string[] + } + | string[] + | { + labels?: { + name: string + }[] + } + | { + name: string + }[] + | string + } } } - /** 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': { + 'issues/remove-all-labels': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never - 400: components['responses']['bad_request'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ - cname?: string | null - /** @description Specify whether HTTPS should be enforced for the repository. */ - https_enforced?: boolean - /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ - public?: boolean - source?: - | ('gh-pages' | 'master' | 'master /docs') - | { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. - * @enum {string} - */ - path: '/' | '/docs' - } - } - } + 301: components['responses']['moved_permanently'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** Configures a GitHub Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." */ - 'repos/create-pages-site': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + name: string } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page'] + 'application/json': components['schemas']['label'][] } } - 409: components['responses']['conflict'] + 301: components['responses']['moved_permanently'] + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'issues/lock': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The source branch and directory used to publish your Pages site. */ - source: { - /** @description The repository branch used to publish your site's source files. */ - branch: string - /** - * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` - * @default / - * @enum {string} - */ - path?: '/' | '/docs' - } + /** + * @description The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons: + * \* `off-topic` + * \* `too heated` + * \* `resolved` + * \* `spam` + * @enum {string} + */ + lock_reason?: 'off-topic' | 'too heated' | 'resolved' | 'spam' } | null } } } - 'repos/delete-pages-site': { + /** Users with push access can unlock an issue's conversation. */ + 'issues/unlock': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ 204: never + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'repos/list-pages-builds': { + /** List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). */ + 'reactions/list-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to an issue. */ + content?: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35111,110 +34648,114 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['page-build'][] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] + 410: components['responses']['gone'] } } - /** - * 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': { + /** Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). A response with an HTTP `200` status means that you already added the reaction type to this issue. */ + 'reactions/create-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['page-build-status'] + 'application/json': components['schemas']['reaction'] } } - } - } - 'repos/get-latest-pages-build': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['page-build'] + 'application/json': components['schemas']['reaction'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the issue. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - 'repos/get-pages-build': { + /** + * **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/enterprise-server@3.6/rest/reference/issues/). + */ + 'reactions/delete-for-issue': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - build_id: number + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['page-build'] - } - } + 204: never } } - /** - * Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - * - * The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - * - * Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. - */ - 'repos/get-pages-health-check': { + 'issues/list-events-for-timeline': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the issue. */ + issue_number: components['parameters']['issue-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['pages-health-check'] - } - } - /** Empty response */ - 202: { - content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['timeline-issue-events'][] } } - /** Custom domains are not available for GitHub Pages */ - 400: unknown 404: components['responses']['not_found'] - /** There isn't a CNAME for this page */ - 422: unknown + 410: components['responses']['gone'] } } - /** 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': { + 'repos/list-deploy-keys': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35225,148 +34766,98 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['project'][] + 'application/json': components['schemas']['deploy-key'][] } } - 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': { + /** You can create a read-only deploy key. */ + 'repos/create-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['project'] + 'application/json': components['schemas']['deploy-key'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 410: components['responses']['gone'] - 422: components['responses']['validation_failed_simple'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the project. */ - name: string - /** @description The description of the project. */ - body?: string + /** @description A name for the key. */ + title?: string + /** @description The contents of the key. */ + key: string + /** + * @description If `true`, the key will only be able to read repository contents. Otherwise, the key will be able to read and write. + * + * Deploy keys with write access can perform the same actions as an organization member with admin access, or a collaborator on a personal repository. For more information, see "[Repository permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)" and "[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/)." + */ + read_only?: boolean } } } } - /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ - 'pulls/list': { + 'repos/get-deploy-key': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'][] + 'application/json': components['schemas']['deploy-key'] } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] + 404: components['responses']['not_found'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - * - * You can create a new pull request. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. - */ - 'pulls/create': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the key. */ + key_id: components['parameters']['key-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request'] - } - } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The title of the new pull request. */ - title?: string - /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ - head: string - /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ - base: string - /** @description The contents of the pull request. */ - body?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean - /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ - draft?: boolean - /** @example 1 */ - issue?: number - } - } + 204: never } } - /** 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': { + 'issues/list-labels-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - sort?: 'created' | 'updated' | 'created_at' - /** Can be either `asc` or `desc`. Ignored without `sort` parameter. */ - direction?: 'asc' | 'desc' - /** Only show notifications updated after the given time. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - since?: components['parameters']['since'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35377,153 +34868,160 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['label'][] } } + 404: components['responses']['not_found'] } } - /** Provides details for a review comment. */ - 'pulls/get-review-comment': { + 'issues/create-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['label'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + name: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string + } + } + } + } + 'issues/get-label': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } 404: components['responses']['not_found'] } } - /** Deletes a review comment. */ - 'pulls/delete-review-comment': { + 'issues/delete-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ 204: never - 404: components['responses']['not_found'] } } - /** Enables you to edit a review comment. */ - 'pulls/update-review-comment': { + 'issues/update-label': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] + name: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['label'] } } } requestBody: { content: { 'application/json': { - /** @description The text of the reply to the review comment. */ - body: string + /** @description The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png ":strawberry:"). For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." */ + new_name?: string + /** @description The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`. */ + color?: string + /** @description A short description of the label. Must be 100 characters or fewer. */ + description?: string } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'][] + 'application/json': components['schemas']['language'] } } - 404: components['responses']['not_found'] } } - /** Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ - 'reactions/create-for-pull-request-review-comment': { + 'repos/enable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] } } responses: { - /** Reaction exists */ - 200: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - /** Reaction created */ - 201: { - content: { - 'application/json': components['schemas']['reaction'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the pull request review comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' - } - } + 202: components['responses']['accepted'] + /** + * We will return a 403 with one of the following messages: + * + * - Git LFS support not enabled because Git LFS is globally disabled. + * - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + * - Git LFS support not enabled because Git LFS is disabled for . + */ + 403: unknown } } - /** - * **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': { + 'repos/disable-lfs-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -35532,146 +35030,113 @@ export interface operations { } } /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * Lists details of a pull request by providing its number. - * - * When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - * - * The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - * - * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - * - * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * This method returns the contents of the repository's license file, if one is detected. * - * 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. + * Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. */ - 'pulls/get': { + 'licenses/get-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['license-content'] } } - 304: components['responses']['not_modified'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** - * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - */ - 'pulls/update': { + /** Sync a branch of a forked repository to keep it up-to-date with the upstream repository. */ + 'repos/merge-upstream': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** The branch has been successfully synced with the upstream repository */ 200: { content: { - 'application/json': components['schemas']['pull-request'] + 'application/json': components['schemas']['merged-upstream'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] + /** The branch could not be synced because of a merge conflict */ + 409: unknown + /** The branch could not be synced for some other reason */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description The title of the pull request. */ - title?: string - /** @description The contents of the pull request. */ - body?: string - /** - * @description State of this Pull Request. Either `open` or `closed`. - * @enum {string} - */ - state?: 'open' | 'closed' - /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ - base?: string - /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ - maintainer_can_modify?: boolean + /** @description The name of the branch which should be updated to match upstream. */ + branch: string } } } } - /** - * Creates a codespace owned by the authenticated user for the specified pull request. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. - */ - 'codespaces/create-with-pr-for-authenticated-user': { + 'repos/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { - /** Response when the codespace was successfully created */ + /** Successful Response (The resulting merge commit) */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['commit'] } } - 401: components['responses']['requires_authentication'] + /** Response when already merged */ + 204: never 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + /** Not Found when the base or head does not exist */ + 404: unknown + /** Conflict when there is a merge conflict */ + 409: unknown + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number + /** @description The name of the base branch that the head will be merged into. */ + base: string + /** @description The head to merge. This can be a branch name or a commit SHA1. */ + head: string + /** @description Commit message to use for the merge commit. If omitted, a default message will be used. */ + commit_message?: string } } } } - /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ - 'pulls/list-review-comments': { + 'issues/list-milestones': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** 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' - /** 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35682,26 +35147,19 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-comment'][] + 'application/json': components['schemas']['milestone'][] } } + 404: components['responses']['not_found'] } } - /** - * Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - * - * You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - * - * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-review-comment': { + 'issues/create-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { @@ -35711,214 +35169,125 @@ export interface operations { Location?: string } content: { - 'application/json': components['schemas']['pull-request-review-comment'] + 'application/json': components['schemas']['milestone'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The text of the review comment. */ - body: string - /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ - commit_id?: string - /** @description The relative path to the file that necessitates a comment. */ - path?: string - /** @description **Required without `comfort-fade` preview unless using `in_reply_to`**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. */ - position?: number - /** - * @description **Required with `comfort-fade` preview unless using `in_reply_to`**. In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. - * @enum {string} - */ - side?: 'LEFT' | 'RIGHT' - /** @description **Required with `comfort-fade` preview unless using `in_reply_to`**. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ - line?: number - /** @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ - start_line?: number + /** @description The title of the milestone. */ + title: string /** - * @description **Required when using multi-line comments unless using `in_reply_to`**. To create multi-line comments, you must use the `comfort-fade` preview header. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - start_side?: 'LEFT' | 'RIGHT' | 'side' + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string /** - * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. - * @example 2 + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. */ - in_reply_to?: number - } - } - } - } - /** - * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'pulls/create-reply-for-review-comment': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** comment_id parameter */ - comment_id: components['parameters']['comment-id'] - } - } - responses: { - /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['pull-request-review-comment'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The text of the review comment. */ - body: string + due_on?: string } } } } - /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/rest/reference/repos#list-commits) endpoint. */ - 'pulls/list-commits': { + 'issues/get-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['commit'][] + 'application/json': components['schemas']['milestone'] } } + 404: components['responses']['not_found'] } } - /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ - 'pulls/list-files': { + 'issues/delete-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['diff-entry'][] - } - } - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] - } - } - 'pulls/check-if-merged': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - } - } - responses: { - /** Response if pull request has been merged */ 204: never - /** Not Found if pull request has not been merged */ - 404: unknown + 404: components['responses']['not_found'] } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/merge': { + 'issues/update-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } } responses: { - /** if merge was successful */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-merge-result'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - /** Method Not Allowed if merge cannot be performed */ - 405: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } - } - } - /** Conflict if sha was provided and pull request head did not match */ - 409: { - content: { - 'application/json': { - message?: string - documentation_url?: string - } + 'application/json': components['schemas']['milestone'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description Title for the automatic commit message. */ - commit_title?: string - /** @description Extra detail to append to automatic commit message. */ - commit_message?: string - /** @description SHA that pull request head must match to allow merge. */ - sha?: string + /** @description The title of the milestone. */ + title?: string /** - * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @description The state of the milestone. Either `open` or `closed`. + * @default open * @enum {string} */ - merge_method?: 'merge' | 'squash' | 'rebase' - } | null + state?: 'open' | 'closed' + /** @description A description of the milestone. */ + description?: string + /** + * Format: date-time + * @description The milestone due date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + */ + due_on?: string + } } } } - 'pulls/list-requested-reviewers': { + 'issues/list-labels-for-milestone': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + /** The number that identifies the milestone. */ + milestone_number: components['parameters']['milestone-number'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -35929,237 +35298,216 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['pull-request-review-request'] + 'application/json': components['schemas']['label'][] } } } } - /** This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'pulls/request-reviewers': { + /** Lists all notifications for the current user in the specified repository. */ + 'activity/list-repo-notifications-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + } + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { + headers: {} content: { - 'application/json': components['schemas']['pull-request-simple'] - } - } - 403: components['responses']['forbidden'] - /** Unprocessable Entity if user is not a collaborator */ - 422: unknown - } - requestBody: { - content: { - 'application/json': { - /** @description An array of user `login`s that will be requested. */ - reviewers?: string[] - /** @description An array of team `slug`s that will be requested. */ - team_reviewers?: string[] + 'application/json': components['schemas']['thread'][] } } } } - 'pulls/remove-requested-reviewers': { + /** Marks all notifications in a repository as "read" for the current user. If the number of notifications is too large to complete in one request, you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['pull-request-simple'] + 'application/json': { + message?: string + url?: string + } } } - 422: components['responses']['validation_failed'] + /** Reset Content */ + 205: unknown } requestBody: { content: { 'application/json': { - /** @description An array of user `login`s that will be removed. */ - reviewers: string[] - /** @description An array of team `slug`s that will be removed. */ - team_reviewers?: string[] + /** + * Format: date-time + * @description Describes the last point that notifications were checked. Anything updated since this time will not be marked as read. If you omit this parameter, all notifications are marked as read. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp. + */ + last_read_at?: string } } } } - /** The list of reviews returns in chronological order. */ - 'pulls/list-reviews': { + 'repos/get-pages': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. */ + /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['pull-request-review'][] + 'application/json': components['schemas']['page'] } } + 404: components['responses']['not_found'] } } - /** - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - * - * Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - * - * **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. - * - * The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - */ - 'pulls/create-review': { + /** Updates information for a GitHub Enterprise Server 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + 204: never + 400: components['responses']['bad_request'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ - commit_id?: string - /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ - body?: string + /** @description Specify a custom domain for the repository. Sending a `null` value will remove the custom domain. For more about custom domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." */ + cname?: string | null + /** @description Specify whether HTTPS should be enforced for the repository. */ + https_enforced?: boolean + /** @description Configures access controls for the GitHub Pages site. If public is set to `true`, the site is accessible to anyone on the internet. If set to `false`, the site will only be accessible to users who have at least `read` access to the repository that published the site. This includes anyone in your Enterprise if the repository is set to `internal` visibility. This feature is only available to repositories in an organization on an Enterprise plan. */ + public?: boolean /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By leaving this blank, you set the review action state to `PENDING`, which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @description The process by which the GitHub Pages site will be built. `workflow` means that the site is built by a custom GitHub Actions workflow. `legacy` means that the site is built by GitHub when changes are pushed to a specific branch. * @enum {string} */ - event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' - /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ - comments?: { - /** @description The relative path to the file that necessitates a review comment. */ - path: string - /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ - position?: number - /** @description Text of the review comment. */ - body: string - /** @example 28 */ - line?: number - /** @example RIGHT */ - side?: string - /** @example 26 */ - start_line?: number - /** @example LEFT */ - start_side?: string - }[] - } - } - } - } - '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'] + build_type?: 'legacy' | 'workflow' + source?: + | ('gh-pages' | 'master' | 'master /docs') + | { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. + * @enum {string} + */ + path: '/' | '/docs' + } } } - 404: components['responses']['not_found'] } } - /** Update the review summary comment with new text. */ - 'pulls/update-review': { + /** Configures a GitHub Enterprise Server Pages site. For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." You must be an admin of the repository in order to use this operation. */ + 'repos/create-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['pull-request-review'] + 'application/json': components['schemas']['page'] } } - 422: components['responses']['validation_failed_simple'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The body text of the pull request review. */ - body: string - } + /** + * @description The process in which the Page will be built. Possible values are `"legacy"` and `"workflow"`. + * @enum {string} + */ + build_type?: 'legacy' | 'workflow' + /** @description The source branch and directory used to publish your Pages site. */ + source?: { + /** @description The repository branch used to publish your site's source files. */ + branch: string + /** + * @description The repository directory that includes the source files for the Pages site. Allowed paths are `/` or `/docs`. Default: `/` + * @default / + * @enum {string} + */ + path?: '/' | '/docs' + } + } | null } } } - 'pulls/delete-pending-review': { + /** Deletes a GitHub Pages site. You must be an admin of the repository in order to use this operation. */ + 'repos/delete-pages-site': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] - } - } + 204: never 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] + 409: components['responses']['conflict'] + 422: components['responses']['validation_failed'] } } - /** List comments for a specific pull request review. */ - 'pulls/list-comments-for-review': { + 'repos/list-pages-builds': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36170,487 +35518,449 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['review-comment'][] + 'application/json': components['schemas']['page-build'][] } } - 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': { + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The message for the pull request review dismissal */ - message: string - /** @example "APPROVE" */ - event?: string + 'application/json': components['schemas']['page-build-status'] } } } } - 'pulls/submit-review': { + 'repos/get-latest-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] - /** review_id parameter */ - review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['pull-request-review'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed_simple'] - } - requestBody: { - content: { - 'application/json': { - /** @description The body text of the pull request review */ - body?: string - /** - * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. - * @enum {string} - */ - event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + 'application/json': components['schemas']['page-build'] } } } } - /** 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': { + 'repos/get-pages-build': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - pull_number: components['parameters']['pull-number'] + build_id: number } } responses: { /** Response */ - 202: { + 200: { content: { - 'application/json': { - message?: string - url?: string - } + 'application/json': components['schemas']['page-build'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" endpoint to find the most recent commit SHA. Default: SHA of the pull request's current HEAD ref. */ - expected_head_sha?: string - } | null - } } } - /** - * 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': { + /** List all pre-receive hooks that are enabled or testing for this repository as well as any disabled hooks that are allowed to be enabled at the repository level. Pre-receive hooks that are disabled at a higher level and are not configurable will not be listed. */ + 'enterprise-admin/list-pre-receive-hooks-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + sort?: 'created' | 'updated' | 'name' } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['repository-pre-receive-hook'][] } } - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - /** - * Gets the README from a repository directory. - * - * READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. - */ - 'repos/get-readme-in-directory': { + 'enterprise-admin/get-pre-receive-hook-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** The alternate path to look for a README file */ - dir: string - } - query: { - /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ - ref?: string + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['content-file'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 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). + * Deletes any overridden enforcement on this repository for the specified hook. * - * Information about published releases are available to everyone. Only users with push access will receive listings for draft releases. + * Responds with effective values inherited from owner and/or global level. */ - 'repos/list-releases': { + 'enterprise-admin/remove-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { - /** Response */ + /** Responds with effective values inherited from owner and/or global level. */ 200: { - headers: {} content: { - 'application/json': components['schemas']['release'][] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 404: components['responses']['not_found'] } } - /** - * Users with push access to the repository can create a release. - * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - */ - 'repos/create-release': { + /** For pre-receive hooks which are allowed to be configured at the repo level, you can set `enforcement` */ + 'enterprise-admin/update-pre-receive-hook-enforcement-for-repo': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the pre-receive hook. */ + pre_receive_hook_id: components['parameters']['pre-receive-hook-id'] } } responses: { /** Response */ - 201: { - headers: { - Location?: string - } - content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['repository-pre-receive-hook'] } } - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** - * @description `true` to create a draft (unpublished) release, `false` to create a published one. - * @default false - */ - draft?: boolean - /** - * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. - * @default false - */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string /** - * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. - * @default false + * @description The state of enforcement for the hook on this repository. + * @enum {string} */ - generate_release_notes?: boolean + enforcement?: 'enabled' | 'disabled' | 'testing' } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] + } + query: { + /** Indicates the state of the projects to return. */ + state?: 'open' | 'closed' | 'all' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'][] } } - 302: components['responses']['found'] + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - } - } - 'repos/delete-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] - } - } - responses: { - /** Response */ - 204: never + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } } - /** Users with push access to the repository can edit a release asset. */ - 'repos/update-release-asset': { + /** Creates a repository project board. Returns a `410 Gone` status if projects are disabled in the repository or if the repository does not have existing classic projects. 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** asset_id parameter */ - asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['project'] } } + 401: components['responses']['requires_authentication'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 410: components['responses']['gone'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description The file name of the asset. */ - name?: string - /** @description An alternate short description of the asset. Used in place of the filename. */ - label?: string - /** @example "uploaded" */ - state?: string + /** @description The name of the project. */ + name: string + /** @description The description of the project. */ + body?: string } } } } - /** Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ - 'repos/generate-release-notes': { + /** Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. */ + 'pulls/list': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month. */ + sort?: 'created' | 'updated' | 'popularity' | 'long-running' + /** The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`. */ + direction?: 'asc' | 'desc' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } } responses: { - /** Name and body of generated release notes */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['release-notes-content'] - } - } - 404: components['responses']['not_found'] - } - requestBody: { - content: { - 'application/json': { - /** @description The tag name for the release. This can be an existing tag or a new one. */ - tag_name: string - /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ - target_commitish?: string - /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ - previous_tag_name?: string - /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ - configuration_file_path?: string + 'application/json': components['schemas']['pull-request-simple'][] } } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } /** - * View the latest published full release for the repository. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * 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. + * 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. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. */ - 'repos/get-latest-release': { + 'pulls/create': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request'] + } + } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The title of the new pull request. Required unless `issue` is specified. */ + title?: string + /** @description The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`. */ + head: string + /** @description The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository. */ + base: string + /** @description The contents of the pull request. */ + body?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean + /** @description Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more. */ + draft?: boolean + /** + * @description An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified. + * @example 1 + */ + issue?: number } } } } - /** Get a published release with the specified tag. */ - 'repos/get-release-by-tag': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** tag parameter */ - tag: string + } + query: { + sort?: 'created' | 'updated' | 'created_at' + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: 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'] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - 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': { + /** Provides details for a review comment. */ + 'pulls/get-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-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). */ + /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] + 'application/json': components['schemas']['pull-request-review-comment'] } } 404: components['responses']['not_found'] } } - /** Users with push access to the repository can delete a release. */ - 'repos/delete-release': { + /** Deletes a review comment. */ + 'pulls/delete-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 204: never + 404: components['responses']['not_found'] } } - /** Users with push access to the repository can edit a release. */ - 'repos/update-release': { + /** Enables you to edit a review comment. */ + 'pulls/update-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['release'] - } - } - /** Not Found if the discussion category name is invalid */ - 404: { - content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['pull-request-review-comment'] } } } requestBody: { content: { 'application/json': { - /** @description The name of the tag. */ - tag_name?: string - /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ - target_commitish?: string - /** @description The name of the release. */ - name?: string - /** @description Text describing the contents of the tag. */ - body?: string - /** @description `true` makes the release a draft, and `false` publishes the release. */ - draft?: boolean - /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ - prerelease?: boolean - /** @description If specified, a discussion of the specified category is created and linked to the release. The value must be a category that already exists in the repository. If there is already a discussion linked to the release, this parameter is ignored. For more information, see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." */ - discussion_category_name?: string + /** @description The text of the reply to the review comment. */ + body: string } } } } - 'repos/list-release-assets': { + /** List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ + 'reactions/list-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -36661,68 +35971,22 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['release-asset'][] - } - } - } - } - /** - * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/rest/overview/resources-in-the-rest-api#hypermedia) to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the `upload_url` returned in - * the response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) to upload a release asset. - * - * You need to use an HTTP client which supports [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this endpoint. - * - * Most libraries will set the required `Content-Length` header automatically. Use the required `Content-Type` header to provide the media type of the asset. For a list of media types, see [Media Types](https://www.iana.org/assignments/media-types/media-types.xhtml). For example: - * - * `application/zip` - * - * GitHub expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body. Everything else about the endpoint is the same as the rest of the API. For example, - * you'll still need to pass your authentication to be able to upload an asset. - * - * When an upstream failure occurs, you will receive a `502 Bad Gateway` status. This may leave an empty asset with a state of `starter`. It can be safely deleted. - * - * **Notes:** - * * GitHub renames asset filenames that have special characters, non-alphanumeric characters, and leading or trailing periods. The "[List assets for a release](https://docs.github.com/rest/reference/repos#list-assets-for-a-release)" - * endpoint lists the renamed filenames. For more information and help, contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). - * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. - */ - 'repos/upload-release-asset': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] - } - query: { - name: string - label?: string - } - } - responses: { - /** Response for successful upload */ - 201: { - content: { - 'application/json': components['schemas']['release-asset'] + 'application/json': components['schemas']['reaction'][] } } - /** Response if you upload an asset with the same filename as another uploaded asset */ - 422: unknown - } - requestBody: { - content: { - '*/*': string - } + 404: components['responses']['not_found'] } } - /** Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ - 'reactions/create-for-release': { + /** Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). A response with an HTTP `200` status means that you already added the reaction type to this pull request review comment. */ + 'reactions/create-for-pull-request-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - /** release_id parameter */ - release_id: components['parameters']['release-id'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] } } responses: { @@ -36744,135 +36008,146 @@ export interface operations { content: { 'application/json': { /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the release. + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the pull request review comment. * @enum {string} */ - content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). */ - 'secret-scanning/list-alerts-for-repo': { + 'reactions/delete-for-pull-request-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ - state?: components['parameters']['secret-scanning-alert-state'] - /** - * A comma-separated list of secret types to return. By default all secret types are returned. - * See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - * for a complete list of secret types (API slug). - */ - secret_type?: components['parameters']['secret-scanning-alert-secret-type'] - /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ - resolution?: components['parameters']['secret-scanning-alert-resolution'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } 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'] + 204: never } } /** - * 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + * Lists details of a pull request by providing its number. + * + * When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + * + * The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + * + * * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + * + * Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ - 'secret-scanning/get-alert': { + 'pulls/get': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** Response */ + /** Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } 304: components['responses']['not_modified'] - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown + 404: components['responses']['not_found'] + 500: components['responses']['internal_error'] 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. + * Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + * 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. */ - 'secret-scanning/update-alert': { + 'pulls/update': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['secret-scanning-alert'] + 'application/json': components['schemas']['pull-request'] } } - /** 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'] + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - state: components['schemas']['secret-scanning-alert-state'] - resolution?: components['schemas']['secret-scanning-alert-resolution'] + /** @description The title of the pull request. */ + title?: string + /** @description The contents of the pull request. */ + body?: string + /** + * @description State of this Pull Request. Either `open` or `closed`. + * @enum {string} + */ + state?: 'open' | 'closed' + /** @description The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository. */ + base?: string + /** @description Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request. */ + maintainer_can_modify?: boolean } } } } - /** - * Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - * - * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. - */ - 'secret-scanning/list-locations-for-alert': { + /** Lists all review comments for a pull request. By default, review comments are in ascending order by ID. */ + 'pulls/list-review-comments': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } query: { + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ + sort?: components['parameters']['sort'] + /** The direction to sort results. 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] } } responses: { @@ -36880,342 +36155,528 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['secret-scanning-location'][] + 'application/json': components['schemas']['pull-request-review-comment'][] } } - /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ - 404: unknown - 503: components['responses']['service_unavailable'] } } /** - * Lists the people that have starred the repository. + * 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/enterprise-server@3.6/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 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: + * The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + * + * **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'activity/list-stargazers-for-repo': { + 'pulls/create-review-comment': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { - headers: {} + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] + 'application/json': components['schemas']['pull-request-review-comment'] } } + 403: components['responses']['forbidden'] 422: components['responses']['validation_failed'] } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + /** @description The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the `position`. */ + commit_id: string + /** @description The relative path to the file that necessitates a comment. */ + path: string + /** + * @deprecated + * @description **This parameter is deprecated. Use `line` instead**. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note above. + */ + position?: number + /** + * @description In a split diff view, the side of the diff that the pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" in the GitHub Help documentation. + * @enum {string} + */ + side?: 'LEFT' | 'RIGHT' + /** @description The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to. */ + line: number + /** @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_line` is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. */ + start_line?: number + /** + * @description **Required when using multi-line comments unless using `in_reply_to`**. The `start_side` is the starting side of the diff that the comment applies to. Can be `LEFT` or `RIGHT`. To learn more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" in the GitHub Help documentation. See `side` in this table for additional context. + * @enum {string} + */ + start_side?: 'LEFT' | 'RIGHT' | 'side' + /** + * @description The ID of the review comment to reply to. To find the ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). When specified, all parameters other than `body` in the request body are ignored. + * @example 2 + */ + in_reply_to?: number + } + } + } } - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ - 'repos/get-code-frequency-stats': { + /** + * Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'pulls/create-reply-for-review-comment': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the comment. */ + comment_id: components['parameters']['comment-id'] + } + } + responses: { + /** Response */ + 201: { + headers: { + Location?: string + } + content: { + 'application/json': components['schemas']['pull-request-review-comment'] + } + } + 404: components['responses']['not_found'] + } + requestBody: { + content: { + 'application/json': { + /** @description The text of the review comment. */ + body: string + } + } + } + } + /** Lists a maximum of 250 commits for a pull request. To receive a complete commit list for pull requests with more than 250 commits, use the [List commits](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-commits) endpoint. */ + 'pulls/list-commits': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['commit'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] } } - /** Returns the last year of commit activity grouped by week. The `days` array is a group of commits per day, starting on `Sunday`. */ - 'repos/get-commit-activity-stats': { + /** **Note:** Responses include a maximum of 3000 files. The paginated response returns 30 files per page by default. */ + 'pulls/list-files': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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-activity'][] + 'application/json': components['schemas']['diff-entry'][] } } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + 422: components['responses']['validation_failed'] + 500: components['responses']['internal_error'] + 503: components['responses']['service_unavailable'] } } - /** - * 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': { + 'pulls/check-if-merged': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** - * * `w` - Start of the week, given as a [Unix timestamp](http://en.wikipedia.org/wiki/Unix_time). - * * `a` - Number of additions - * * `d` - Number of deletions - * * `c` - Number of commits - */ - 200: { - content: { - 'application/json': components['schemas']['contributor-activity'][] - } - } - 202: components['responses']['accepted'] - 204: components['responses']['no_content'] + /** Response if pull request has been merged */ + 204: never + /** Not Found if pull request has not been merged */ + 404: unknown } } - /** - * 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': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/merge': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { - /** The array order is oldest week (index 0) to most recent week. */ + /** if merge was successful */ 200: { content: { - 'application/json': components['schemas']['participation-stats'] + 'application/json': components['schemas']['pull-request-merge-result'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + /** Method Not Allowed if merge cannot be performed */ + 405: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + /** Conflict if sha was provided and pull request head did not match */ + 409: { + content: { + 'application/json': { + message?: string + documentation_url?: string + } + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description Title for the automatic commit message. */ + commit_title?: string + /** @description Extra detail to append to automatic commit message. */ + commit_message?: string + /** @description SHA that pull request head must match to allow merge. */ + sha?: string + /** + * @description Merge method to use. Possible values are `merge`, `squash` or `rebase`. Default is `merge`. + * @enum {string} + */ + merge_method?: 'merge' | 'squash' | 'rebase' + } | null + } } } - /** - * 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': { + /** Gets the users or teams whose review is requested for a pull request. Once a requested reviewer submits a review, they are no longer considered a requested reviewer. Their review will instead be returned by the [List reviews for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) operation. */ + 'pulls/list-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } 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. */ + /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['code-frequency-stat'][] + 'application/json': components['schemas']['pull-request-review-request'] } } - 204: components['responses']['no_content'] } } - /** - * Users with push access in a repository can create commit statuses for a given SHA. - * - * Note: there is a limit of 1000 statuses per `sha` and `context` within a repository. Attempts to create more than 1000 statuses will result in a validation error. - */ - 'repos/create-commit-status': { + /** This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ + 'pulls/request-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - sha: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 201: { - headers: { - Location?: string - } content: { - 'application/json': components['schemas']['status'] + 'application/json': components['schemas']['pull-request-simple'] } } + 403: components['responses']['forbidden'] + /** Unprocessable Entity if user is not a collaborator */ + 422: unknown } requestBody: { content: { 'application/json': { - /** - * @description The state of the status. Can be one of `error`, `failure`, `pending`, or `success`. - * @enum {string} - */ - state: 'error' | 'failure' | 'pending' | 'success' - /** - * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. - * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: - * `http://ci.example.com/user/repo/build/sha` - */ - target_url?: string - /** @description A short description of the status. */ - description?: string - /** - * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. - * @default default - */ - context?: string + /** @description An array of user `login`s that will be requested. */ + reviewers?: string[] + /** @description An array of team `slug`s that will be requested. */ + team_reviewers?: string[] } } } } - /** Lists the people watching the specified repository. */ - 'activity/list-watchers-for-repo': { + 'pulls/remove-requested-reviewers': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': components['schemas']['pull-request-simple'] + } + } + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of user `login`s that will be removed. */ + reviewers: string[] + /** @description An array of team `slug`s that will be removed. */ + team_reviewers?: string[] } } } } - 'activity/get-repo-subscription': { + /** The list of reviews returns in chronological order. */ + 'pulls/list-reviews': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if you subscribe to the repository */ + /** The list of reviews returns in chronological order. */ 200: { + headers: {} content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'][] } } - 403: components['responses']['forbidden'] - /** Not Found if you don't subscribe to the repository */ - 404: unknown } } - /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/rest/reference/activity#delete-a-repository-subscription) completely. */ - 'activity/set-repo-subscription': { + /** + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * + * Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + * + * **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/enterprise-server@3.6/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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['repository-subscription'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description Determines if notifications should be received from this repository. */ - subscribed?: boolean - /** @description Determines if all notifications should be blocked from this repository. */ - ignored?: boolean + /** @description The SHA of the commit that needs a review. Not using the latest commit SHA may render your review comment outdated if a subsequent commit modifies the line you specify as the `position`. Defaults to the most recent commit in the pull request when you do not specify a value. */ + commit_id?: string + /** @description **Required** when using `REQUEST_CHANGES` or `COMMENT` for the `event` parameter. The body text of the pull request review. */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. 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/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) when you are ready. + * @enum {string} + */ + event?: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' + /** @description Use the following table to specify the location, destination, and contents of the draft review comment. */ + comments?: { + /** @description The relative path to the file that necessitates a review comment. */ + path: string + /** @description The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. For help finding the position value, read the note below. */ + position?: number + /** @description Text of the review comment. */ + body: string + /** @example 28 */ + line?: number + /** @example RIGHT */ + side?: string + /** @example 26 */ + start_line?: number + /** @example LEFT */ + start_side?: string + }[] } } } } - /** 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': { + 'pulls/get-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] } } - 'repos/list-tags': { + /** Update the review summary comment with new text. */ + 'pulls/update-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['tag'][] + 'application/json': components['schemas']['pull-request-review'] + } + } + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The body text of the pull request review. */ + body: string } } } } - /** - * 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': { + 'pulls/delete-pending-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - ref: string + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ - 302: never + 200: { + content: { + 'application/json': components['schemas']['pull-request-review'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] } } - 'repos/list-teams': { + /** List comments for a specific pull request review. */ + 'pulls/list-comments-for-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -37226,188 +36687,302 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['review-comment'][] } } + 404: components['responses']['not_found'] } } - 'repos/get-all-topics': { + /** **Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description The message for the pull request review dismissal */ + message: string + /** + * @example "DISMISS" + * @enum {string} + */ + event?: 'DISMISS' + } + } } } - 'repos/replace-all-topics': { + /** Submits a pending review for a pull request. For more information about creating a pending review for a pull request, see "[Create a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." */ + 'pulls/submit-review': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] + /** The unique identifier of the review. */ + review_id: components['parameters']['review-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['topic'] + 'application/json': components['schemas']['pull-request-review'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed_simple'] } requestBody: { content: { 'application/json': { - /** @description 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[] + /** @description The body text of the pull request review */ + body?: string + /** + * @description The review action you want to perform. The review actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When you leave this blank, the API returns _HTTP 422 (Unrecognizable entity)_ and sets the review action state to `PENDING`, which means you will need to re-submit the pull request review using a review action. + * @enum {string} + */ + event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT' } } } } - /** 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': { + /** 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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] - } - query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number that identifies the pull request. */ + pull_number: components['parameters']['pull-number'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': components['schemas']['clone-traffic'] + 'application/json': { + message?: string + url?: string + } } } 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** @description The expected SHA of the pull request's HEAD ref. This is the most recent commit on the pull request's branch. If the expected SHA does not match the pull request's HEAD, you will receive a `422 Unprocessable Entity` status. You can use the "[List commits](https://docs.github.com/enterprise-server@3.6/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 + } } } - /** Get the top 10 popular contents over the last 14 days. */ - 'repos/get-top-paths': { + /** + * Gets the preferred README for a repository. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ 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-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** Get the top 10 referrers over the last 14 days. */ - 'repos/get-top-referrers': { + /** + * Gets the README from a repository directory. + * + * READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + */ + 'repos/get-readme-in-directory': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The alternate path to look for a README file */ + dir: string + } + query: { + /** The name of the commit/branch/tag. Default: the repository’s default branch (usually `master`) */ + ref?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['referrer-traffic'][] + 'application/json': components['schemas']['content-file'] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } - /** 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': { + /** + * 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/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } query: { - /** Must be one of: `day`, `week`. */ - per?: components['parameters']['per'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['view-traffic'] + 'application/json': components['schemas']['release'][] } } - 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } - /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ - 'repos/transfer': { + /** + * Users with push access to the repository can create a release. + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + */ + 'repos/create-release': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } responses: { /** Response */ - 202: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': components['schemas']['minimal-repository'] + 'application/json': components['schemas']['release'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The username or organization name the repository will be transferred to. */ - new_owner: string - /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ - team_ids?: number[] + /** @description The name of the tag. */ + tag_name: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** + * @description `true` to create a draft (unpublished) release, `false` to create a published one. + * @default false + */ + draft?: boolean + /** + * @description `true` to identify the release as a prerelease. `false` to identify the release as a full release. + * @default false + */ + prerelease?: boolean + /** + * @description Whether to automatically generate the name and body for this release. If `name` is specified, the specified name will be used; otherwise, a name will be automatically generated. If `body` is specified, the body will be pre-pended to the automatically generated notes. + * @default false + */ + generate_release_notes?: boolean } } } } - /** Shows whether dependency alerts are enabled or disabled for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/check-vulnerability-alerts': { + /** To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { - /** Response if repository is enabled with vulnerability alerts */ - 204: never - /** Not Found if repository is not enabled with vulnerability alerts */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } + } + 302: components['responses']['found'] + 404: components['responses']['not_found'] } } - /** Enables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/enable-vulnerability-alerts': { + 'repos/delete-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { @@ -37415,437 +36990,360 @@ export interface operations { 204: never } } - /** Disables dependency alerts and the dependency graph for a repository. The authenticated user must have admin access to the repository. For more information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". */ - 'repos/disable-vulnerability-alerts': { + /** Users with push access to the repository can edit a release asset. */ + 'repos/update-release-asset': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] + /** The unique identifier of the asset. */ + asset_id: components['parameters']['asset-id'] } } responses: { /** Response */ - 204: never - } - } - /** - * Gets a redirect URL to download a zip archive for a repository. If you omit `:ref`, the repository’s default branch (usually - * `master`) will be used. Please make sure your HTTP framework is configured to follow redirects or you will need to use - * the `Location` header to make a second `GET` request. - * **Note**: For private repositories, these links are temporary and expire after five minutes. - */ - 'repos/download-zipball-archive': { - parameters: { - path: { - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - ref: string + 200: { + content: { + 'application/json': components['schemas']['release-asset'] + } } } - responses: { - /** Response */ - 302: never + requestBody: { + content: { + 'application/json': { + /** @description The file name of the asset. */ + name?: string + /** @description An alternate short description of the asset. Used in place of the filename. */ + label?: string + /** @example "uploaded" */ + state?: string + } + } } } - /** - * Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://docs.github.com/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - * - * **OAuth scope requirements** - * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - * - * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * * `repo` scope to create a private repository - */ - 'repos/create-using-template': { + /** Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). The body content will be markdown formatted and contain information like the changes since last release and users who contributed. The generated release notes are not saved anywhere. They are intended to be generated and used when creating a new release. */ + 'repos/generate-release-notes': { parameters: { path: { - template_owner: string - template_repo: string + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ - 201: { - headers: { - Location?: string - } + /** Name and body of generated release notes */ + 200: { content: { - 'application/json': components['schemas']['repository'] + 'application/json': components['schemas']['release-notes-content'] } } + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ - owner?: string - /** @description The name of the new repository. */ - name: string - /** @description A short description of the new repository. */ - description?: string - /** - * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. - * @default false - */ - include_all_branches?: boolean - /** - * @description Either `true` to create a new private repository or `false` to create a new public one. - * @default false - */ - private?: boolean + /** @description The tag name for the release. This can be an existing tag or a new one. */ + tag_name: string + /** @description Specifies the commitish value that will be the target for the release's tag. Required if the supplied tag_name does not reference an existing tag. Ignored if the tag_name already exists. */ + target_commitish?: string + /** @description The name of the previous tag to use as the starting point for the release notes. Use to manually specify the range for the set of changes considered as part this release. */ + previous_tag_name?: string + /** @description Specifies a path to a file in the repository containing configuration settings used for generating the release notes. If unspecified, the configuration file located in the repository at '.github/release.yml' or '.github/release.yaml' will be used. If that is not present, the default configuration will be used. */ + configuration_file_path?: string } } } } /** - * Lists all public repositories in the order that they were created. + * View the latest published full release for the repository. * - * Note: - * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + * 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/list-public': { + 'repos/get-latest-release': { parameters: { - query: { - /** A repository ID. Only return repositories with an ID greater than this ID. */ - since?: components['parameters']['since-repo'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { - headers: { - Link?: string - } content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['release'] } } - 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': { + /** Get a published release with the specified tag. */ + 'repos/get-release-by-tag': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** tag parameter */ + tag: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['actions-secret'][] - } + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ + 'repos/get-release': { parameters: { path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** **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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia). */ 200: { content: { - 'application/json': components['schemas']['actions-public-key'] + 'application/json': components['schemas']['release'] } } + 404: components['responses']['not_found'] } } - /** 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': { + /** Users with push access to the repository can delete a release. */ + 'repos/delete-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-secret'] - } - } + 204: never } } - /** - * Creates or updates an environment secret with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - * token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - * this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` - * - * #### Example encrypting a secret using Ruby - * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - * - * ```ruby - * require "rbnacl" - * require "base64" - * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) - * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") - * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` - */ - 'actions/create-or-update-environment-secret': { + /** Users with push access to the repository can edit a release. */ + 'repos/update-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response when creating a secret */ - 201: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['empty-object'] + 'application/json': components['schemas']['release'] } } - /** Response when updating a secret */ - 204: never } requestBody: { content: { 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string + /** @description The name of the tag. */ + tag_name?: string + /** @description Specifies the commitish value that determines where the Git tag is created from. Can be any branch or commit SHA. Unused if the Git tag already exists. Default: the repository's default branch (usually `master`). */ + target_commitish?: string + /** @description The name of the release. */ + name?: string + /** @description Text describing the contents of the tag. */ + body?: string + /** @description `true` makes the release a draft, and `false` publishes the release. */ + draft?: boolean + /** @description `true` to identify the release as a prerelease, `false` to identify the release as a full release. */ + prerelease?: boolean } } } } - /** Deletes a secret in an environment using the secret name. You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use this endpoint. */ - 'actions/delete-environment-secret': { - parameters: { - path: { - repository_id: components['parameters']['repository-id'] - /** The name of the environment */ - environment_name: components['parameters']['environment-name'] - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - } - } - responses: { - /** Default response */ - 204: never - } - } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/list-provisioned-groups-enterprise': { + 'repos/list-release-assets': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string - /** attributes to exclude */ - excludedAttributes?: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-group-list-enterprise'] + 'application/json': components['schemas']['release-asset'][] } } } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/repos#create-a-release) to upload a release asset. * - * 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. + * 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 Enterprise Server 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 Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)" + * endpoint lists the renamed filenames. For more information and help, contact [GitHub Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). + * * If you upload an asset with the same filename as another uploaded asset, you'll receive an error and must delete the old file before you can re-upload the new asset. */ - 'enterprise-admin/provision-and-invite-enterprise-group': { + 'repos/upload-release-asset': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + } + query: { + name: string + label?: string } } responses: { - /** Response */ + /** Response for successful upload */ 201: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['release-asset'] } } + /** Response if you upload an asset with the same filename as another uploaded asset */ + 422: unknown } requestBody: { content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] - } + '*/*': string } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/get-provisioning-information-for-enterprise-group': { + /** List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). */ + 'reactions/list-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } query: { - /** Attributes to exclude. */ - excludedAttributes?: string + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). Omit this parameter to list all reactions to a release. */ + content?: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'][] } } + 404: components['responses']['not_found'] } } - /** - * **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': { + /** Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). A response with a `Status: 200 OK` means that you already added the reaction type to this release. */ + 'reactions/create-for-release': { parameters: { path: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] } } responses: { - /** Response */ + /** Reaction exists */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-group'] + 'application/json': components['schemas']['reaction'] + } + } + /** Reaction created */ + 201: { + content: { + 'application/json': components['schemas']['reaction'] } } + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ - displayName: string - members?: { - /** @description The SCIM user ID for a user. */ - value: string - }[] + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the release. + * @enum {string} + */ + content: '+1' | 'laugh' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-scim-group-from-enterprise': { + /** + * **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + * + * Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + */ + 'reactions/delete-for-release': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the release. */ + release_id: components['parameters']['release-id'] + /** The unique identifier of the reaction. */ + reaction_id: components['parameters']['reaction-id'] } } responses: { @@ -37853,626 +37351,629 @@ export interface operations { 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': { + /** Lists the status of each repository cache replica. */ + 'repos/list-cache-info': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** Response */ + /** Status information for cache replicas */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-group'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { - /** @enum {string} */ - op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' - path?: string - /** @description Can be any value - string, number, array or object. */ - value?: unknown + 'application/json': { + host: string + location: string + git: { + /** @enum {string} */ + sync_status: 'offline' | 'inactive' | 'in_sync' | 'not_in_sync' + /** Format: date-time */ + last_sync: string + } }[] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } } /** - * **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. + * Lists secret scanning alerts for an eligible repository, from newest to oldest. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. */ - 'enterprise-admin/list-provisioned-identities-enterprise': { + 'secret-scanning/list-alerts-for-repo': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } query: { - /** Used for pagination: the index of the first result to return. */ - startIndex?: components['parameters']['start-index'] - /** Used for pagination: the number of results to return. */ - count?: components['parameters']['count'] - /** filter results */ - filter?: string + /** Set to `open` or `resolved` to only list secret scanning alerts in a specific state. */ + state?: components['parameters']['secret-scanning-alert-state'] + /** + * A comma-separated list of secret types to return. By default all secret types are returned. + * See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + * for a complete list of secret types. + */ + secret_type?: components['parameters']['secret-scanning-alert-secret-type'] + /** A comma-separated list of resolutions. Only secret scanning alerts with one of these resolutions are listed. Valid resolutions are `false_positive`, `wont_fix`, `revoked`, `pattern_edited`, `pattern_deleted` or `used_in_tests`. */ + resolution?: components['parameters']['secret-scanning-alert-resolution'] + /** The property to sort the results by. `created` means when the alert was created. `updated` means when the alert was updated or resolved. */ + sort?: components['parameters']['secret-scanning-alert-sort'] + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-user-list-enterprise'] + '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'] } } /** - * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + * Gets a single secret scanning alert detected in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * Provision enterprise membership for a user, and send organization invitation emails to the email address. + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/get-alert': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The number that identifies an alert. You can find this at the end of the URL for a code scanning alert within GitHub, and in the `number` field in the response from the `GET /repos/{owner}/{repo}/code-scanning/alerts` operation. */ + alert_number: components['parameters']['alert-number'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['secret-scanning-alert'] + } + } + 304: components['responses']['not_modified'] + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] + } + } + /** + * Updates the status of a secret scanning alert in an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. * - * 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. + * GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. */ - 'enterprise-admin/provision-and-invite-enterprise-user': { + 'secret-scanning/update-alert': { parameters: { path: { - /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ - enterprise: components['parameters']['enterprise'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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 */ - 201: { + 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + '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': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + state: components['schemas']['secret-scanning-alert-state'] + resolution?: components['schemas']['secret-scanning-alert-resolution'] } } } } - /** **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': { + /** + * Lists all locations for a given secret scanning alert for an eligible repository. + * To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + * For public repositories, you may instead use the `public_repo` scope. + * + * GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + */ + 'secret-scanning/list-locations-for-alert': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + 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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['secret-scanning-location'][] } } + /** Repository is public, or secret scanning is disabled for the repository, or the resource is not found */ + 404: unknown + 503: components['responses']['service_unavailable'] } } /** - * **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`. + * Lists the people that have starred the repository. * - * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ - 'enterprise-admin/set-information-for-provisioned-enterprise-user': { + 'activity/list-stargazers-for-repo': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['simple-user'][] | components['schemas']['stargazer'][] } } + 422: components['responses']['validation_failed'] } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description The username for the user. */ - userName: string - name: { - /** @description The first name of the user. */ - givenName: string - /** @description The last name of the user. */ - familyName: string - } - /** @description List of user emails. */ - emails: { - /** @description The email address. */ - value: string - /** @description The type of email address. */ - type: string - /** @description Whether this email address is the primary address. */ - primary: boolean - }[] - /** @description List of SCIM group IDs the user is a member of. */ - groups?: { - value?: string - }[] + } + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 'repos/get-code-frequency-stats': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Returns a weekly aggregate of the number of additions and deletions pushed to a repository. */ + 200: { + content: { + 'application/json': components['schemas']['code-frequency-stat'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } - /** **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. */ - 'enterprise-admin/delete-user-from-enterprise': { + /** 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: { - /** 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 204: never + 200: { + content: { + 'application/json': components['schemas']['commit-activity'][] + } + } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] } } /** - * **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`. + * Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: * - * ``` - * { - * "Operations":[{ - * "op":"replace", - * "value":{ - * "active":false - * } - * }] - * } - * ``` + * * `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 */ - 'enterprise-admin/update-attribute-for-enterprise-user': { + 'repos/get-contributors-stats': { 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'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['scim-enterprise-user'] + 'application/json': components['schemas']['contributor-activity'][] } } + 202: components['responses']['accepted'] + 204: components['responses']['no_content'] + } + } + /** + * Returns the total commit counts for the `owner` and total commit counts in `all`. `all` is everyone combined, including the `owner` in the last 52 weeks. If you'd like to get the commit counts for non-owners, you can subtract `owner` from `all`. + * + * The array order is oldest week (index 0) to most recent week. + */ + 'repos/get-participation-stats': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } } - requestBody: { - content: { - 'application/json': { - /** @description The SCIM schema URIs. */ - schemas: string[] - /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ - Operations: { [key: string]: unknown }[] + 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'] } } /** - * 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. + * Each array contains the day number, hour number, and number of commits: * - * 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. + * * `0-6`: Sunday - Saturday + * * `0-23`: Hour of day + * * Number of commits * - * 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. + * 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. */ - 'scim/list-provisioned-identities': { + 'repos/get-punch-card-stats': { 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 + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** 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/scim+json': components['schemas']['scim-user-list'] + 'application/json': components['schemas']['code-frequency-stat'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 204: components['responses']['no_content'] } } - /** Provision organization membership for a user, and send an activation email to the email address. */ - 'scim/provision-and-invite-user': { + /** + * 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: { - org: components['parameters']['org'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + sha: string } } responses: { /** Response */ 201: { + headers: { + Location?: string + } content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['status'] } } - 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': { /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe + * @description The state of the status. + * @enum {string} */ - displayName?: string + state: 'error' | 'failure' | 'pending' | 'success' /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } + * @description The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + * For example, if your continuous integration system is posting build status, you would want to provide the deep link for the build output for this specific SHA: + * `http://ci.example.com/user/repo/build/sha` */ - name: { - givenName: string - familyName: string - formatted?: string - } + target_url?: string | null + /** @description A short description of the status. */ + description?: string | null /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] + * @description A string label to differentiate this status from the status of other systems. This field is case-insensitive. + * @default default */ - emails: { - value: string - primary?: boolean - type?: string - }[] - schemas?: string[] - externalId?: string - groups?: string[] - active?: boolean + context?: string } } } } - 'scim/get-provisioning-information-for-user': { + /** Lists the people watching the specified repository. */ + 'activity/list-watchers-for-repo': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['simple-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': { + 'activity/get-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** if you subscribe to the repository */ + 200: { + content: { + 'application/json': components['schemas']['repository-subscription'] + } + } + 403: components['responses']['forbidden'] + /** Not Found if you don't subscribe to the repository */ + 404: unknown + } + } + /** If you would like to watch a repository, set `subscribed` to `true`. If you would like to ignore notifications made within a repository, set `ignored` to `true`. If you would like to stop watching a repository, [delete the repository's subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) completely. */ + 'activity/set-repo-subscription': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['repository-subscription'] } } - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description The name of the user, suitable for display to end-users - * @example Jon Doe - */ - displayName?: string - externalId?: string - groups?: string[] - active?: boolean - /** - * @description Configured by the admin. Could be an email, login, or username - * @example someone@example.com - */ - userName: string - /** - * @example { - * "givenName": "Jane", - * "familyName": "User" - * } - */ - name: { - givenName: string - familyName: string - formatted?: string - } - /** - * @description user emails - * @example [ - * { - * "value": "someone@example.com", - * "primary": true - * }, - * { - * "value": "another@example.com", - * "primary": false - * } - * ] - */ - emails: { - type?: string - value: string - primary?: boolean - }[] + /** @description Determines if notifications should be received from this repository. */ + subscribed?: boolean + /** @description Determines if all notifications should be blocked from this repository. */ + ignored?: boolean } } } } - 'scim/delete-user-from-org': { + /** 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). */ + 'activity/delete-repo-subscription': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + } + } + 'repos/list-tags': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: 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'][] + } + } } } /** - * 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. + * This returns the tag protection states of a repository. * - * **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 - * } - * }] - * } - * ``` + * This information is only available to repository administrators. */ - 'scim/update-attribute-for-user': { + 'repos/list-tag-protection': { parameters: { path: { - org: components['parameters']['org'] - /** scim_user_id parameter */ - scim_user_id: components['parameters']['scim-user-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ 200: { content: { - 'application/scim+json': components['schemas']['scim-user'] + 'application/json': components['schemas']['tag-protection'][] } } - 304: components['responses']['not_modified'] - 400: components['responses']['scim_bad_request'] - 403: components['responses']['scim_forbidden'] - 404: components['responses']['scim_not_found'] + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * This creates a tag protection state for a repository. + * This endpoint is only available to repository administrators. + */ + 'repos/create-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { /** Response */ - 429: { + 201: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['tag-protection'] } } + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] } requestBody: { content: { 'application/json': { - schemas?: string[] - /** - * @description Set of operations to be performed - * @example [ - * { - * "op": "replace", - * "value": { - * "active": false - * } - * } - * ] - */ - Operations: { - /** @enum {string} */ - op: 'add' | 'remove' | 'replace' - path?: string - value?: - | { - active?: boolean | null - userName?: string | null - externalId?: string | null - givenName?: string | null - familyName?: string | null - } - | { - value?: string - primary?: boolean - }[] - | string - }[] + /** @description An optional glob pattern to match against when enforcing tag protection. */ + pattern: string } } } } /** - * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). - * - * When searching for code, you can get text match metadata for the file **content** and file **path** fields when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to find the definition of the `addClass` function inside [jQuery](https://github.com/jquery/jquery) repository, your query would look something like this: - * - * `q=addClass+in:file+language:js+repo:jquery/jquery` - * - * This query searches for the keyword `addClass` within a file's contents. The query limits the search to files where the language is JavaScript in the `jquery/jquery` repository. - * - * #### Considerations for code search - * - * Due to the complexity of searching code, there are a few restrictions on how searches are performed: - * - * * Only the _default branch_ is considered. In most cases, this will be the `master` branch. - * * Only files smaller than 384 KB are searchable. - * * You must always include at least one search term when searching source code. For example, searching for [`language:go`](https://github.com/search?utf8=%E2%9C%93&q=language%3Ago&type=Code) is not valid, while [`amazing - * language:go`](https://github.com/search?utf8=%E2%9C%93&q=amazing+language%3Ago&type=Code) is. + * This deletes a tag protection state for a repository. + * This endpoint is only available to repository administrators. */ - 'search/code': { + 'repos/delete-tag-protection': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + /** The unique identifier of the tag protection. */ + tag_protection_id: components['parameters']['tag-protection-id'] + } + } + responses: { + /** Response */ + 204: never + 403: components['responses']['forbidden'] + 404: components['responses']['not_found'] + } + } + /** + * 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: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string + } + } + responses: { + /** Response */ + 302: never + } + } + 'repos/list-teams': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/articles/searching-code/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query. Can only be `indexed`, which indicates how recently a file has been indexed by the GitHub search infrastructure. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'indexed' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38481,260 +37982,209 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['code-search-result-item'][] - } + 'application/json': components['schemas']['team'][] } } - 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': { + 'repos/get-all-topics': { parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/articles/searching-commits/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by `author-date` or `committer-date`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'author-date' | 'committer-date' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['commit-search-result-item'][] - } + 'application/json': components['schemas']['topic'] } } - 304: components['responses']['not_modified'] + 404: components['responses']['not_found'] } } - /** - * 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': { + 'repos/replace-all-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). See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by the number of `comments`, `reactions`, `reactions-+1`, `reactions--1`, `reactions-smile`, `reactions-thinking_face`, `reactions-heart`, `reactions-tada`, or `interactions`. You can also sort results by how recently the items were `created` or `updated`, Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: - | 'comments' - | 'reactions' - | 'reactions-+1' - | 'reactions--1' - | 'reactions-smile' - | 'reactions-thinking_face' - | 'reactions-heart' - | 'reactions-tada' - | 'interactions' - | 'created' - | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['topic'] + } + } + 404: components['responses']['not_found'] + 422: components['responses']['validation_failed_simple'] + } + requestBody: { + content: { + 'application/json': { + /** @description An array of topics to add to the repository. Pass one or more topics to _replace_ the set of existing topics. Send an empty array (`[]`) to clear all topics from the repository. **Note:** Topic `names` cannot contain uppercase letters. */ + names: string[] + } + } + } + } + /** A transfer request will need to be accepted by the new owner when transferring a personal repository to another user. The response will contain the original `owner`, and the transfer will continue asynchronously. For more details on the requirements to transfer personal and organization-owned repositories, see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). */ + 'repos/transfer': { + parameters: { + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { + 202: { content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['issue-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The username or organization name the repository will be transferred to. */ + new_owner: string + /** @description ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. */ + team_ids?: number[] } } - 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` + * 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. * - * The labels that best match the query appear first in the search results. + * **Note**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. */ - 'search/labels': { + 'repos/download-zipball-archive': { parameters: { - query: { - /** The id of the repository. */ - repository_id: number - /** The search keywords. This endpoint does not accept qualifiers in the query. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Sorts the results of your query by when the label was `created` or `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'created' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] + ref: string } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['label-search-result-item'][] - } - } - } - 304: components['responses']['not_modified'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 302: never } } /** - * 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). + * 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. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. * - * For example, if you want to search for popular Tetris repositories written in assembly code, your query might look like this: + * **OAuth scope requirements** * - * `q=tetris+language:assembly&sort=stars&order=desc` + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * - * 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. + * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * * `repo` scope to create a private repository */ - 'search/repos': { + 'repos/create-using-template': { parameters: { - query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + path: { + template_owner: string + template_repo: string } } responses: { /** Response */ - 200: { + 201: { + headers: { + Location?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['repo-search-result-item'][] - } + 'application/json': components['schemas']['repository'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The organization or person who will own the new repository. To create a new repository in an organization, the authenticated user must be a member of the specified organization. */ + owner?: string + /** @description The name of the new repository. */ + name: string + /** @description A short description of the new repository. */ + description?: string + /** + * @description Set to `true` to include the directory structure and files from all branches in the template repository, and not just the default branch. Default: `false`. + * @default false + */ + include_all_branches?: boolean + /** + * @description Either `true` to create a new private repository or `false` to create a new public one. + * @default false + */ + private?: boolean } } - 304: components['responses']['not_modified'] - 422: components['responses']['validation_failed'] - 503: components['responses']['service_unavailable'] } } /** - * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - * - * When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - * - * For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - * - * `q=ruby+is:featured` + * Lists all public repositories in the order that they were created. * - * 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. + * Note: + * - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + * - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. */ - 'search/topics': { + 'repos/list-public': { parameters: { query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). */ - q: string - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] + /** A repository ID. Only return repositories with an ID greater than this ID. */ + since?: components['parameters']['since-repo'] + /** Specifies the types of repositories to return. This endpoint will only list repositories available to all users on the enterprise. */ + visibility?: 'all' | 'public' } } responses: { /** Response */ 200: { + headers: { + Link?: string + } content: { - 'application/json': { - total_count: number - incomplete_results: boolean - items: components['schemas']['topic-search-result-item'][] - } + 'application/json': components['schemas']['minimal-repository'][] } } 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] } } - /** - * 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': { + /** 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: { + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + } query: { - /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as GitHub.com. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/articles/searching-users/)" for a detailed list of qualifiers. */ - q: string - /** Sorts the results of your query by number of `followers` or `repositories`, or when the person `joined` GitHub. Default: [best match](https://docs.github.com/rest/reference/search#ranking-search-results) */ - sort?: 'followers' | 'repositories' | 'joined' - /** Determines whether the first search result returned is the highest number of matches (`desc`) or lowest number of matches (`asc`). This parameter is ignored unless you provide `sort`. */ - order?: components['parameters']['order'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -38743,215 +38193,312 @@ export interface operations { responses: { /** Response */ 200: { + headers: {} content: { 'application/json': { total_count: number - incomplete_results: boolean - items: components['schemas']['user-search-result-item'][] + secrets: components['schemas']['actions-secret'][] } } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + 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']['team-full'] + 'application/json': components['schemas']['actions-public-key'] } } - 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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { /** Response */ - 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + 200: { + content: { + 'application/json': components['schemas']['actions-secret'] + } + } } } /** - * **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. + * 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. * - * To edit a team, the authenticated user must either be an organization owner or a team maintainer. + * #### Example encrypting a secret using Node.js * - * **Note:** With nested teams, the `privacy` for parent teams cannot be `secret`. + * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + * + * ``` + * const sodium = require('tweetsodium'); + * + * const key = "base64-encoded-public-key"; + * const value = "plain-text-secret"; + * + * // Convert the message and key to Uint8Array's (Buffer implements that interface) + * const messageBytes = Buffer.from(value); + * const keyBytes = Buffer.from(key, 'base64'); + * + * // Encrypt using LibSodium. + * const encryptedBytes = sodium.seal(messageBytes, keyBytes); + * + * // Base64 the encrypted secret + * const encrypted = Buffer.from(encryptedBytes).toString('base64'); + * + * console.log(encrypted); + * ``` + * + * + * #### Example encrypting a secret using Python + * + * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + * + * ``` + * from base64 import b64encode + * from nacl import encoding, public + * + * def encrypt(public_key: str, secret_value: str) -> str: + * """Encrypt a Unicode string using the public key.""" + * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + * sealed_box = public.SealedBox(public_key) + * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + * return b64encode(encrypted).decode("utf-8") + * ``` + * + * #### Example encrypting a secret using C# + * + * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + * + * ``` + * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * + * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * + * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + * ``` + * + * #### Example encrypting a secret using Ruby + * + * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * + * ```ruby + * require "rbnacl" + * require "base64" + * + * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + * public_key = RbNaCl::PublicKey.new(key) + * + * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + * encrypted_secret = box.encrypt("my_secret") + * + * # Print the base64 encoded secret + * puts Base64.strict_encode64(encrypted_secret) + * ``` */ - 'teams/update-legacy': { + 'actions/create-or-update-environment-secret': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] } } responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-full'] - } - } - /** Response */ + /** Response when creating a secret */ 201: { content: { - 'application/json': components['schemas']['team-full'] + 'application/json': components['schemas']['empty-object'] } } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] + /** Response when updating a secret */ + 204: never } requestBody: { content: { 'application/json': { - /** @description The name of the team. */ - name: string - /** @description The description of the team. */ - description?: string - /** - * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: - * **For a non-nested team:** - * \* `secret` - only visible to organization owners and members of this team. - * \* `closed` - visible to all members of this organization. - * **For a parent or child team:** - * \* `closed` - visible to all members of this organization. - * @enum {string} - */ - privacy?: 'secret' | 'closed' - /** - * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. Can be one of: - * \* `pull` - team members can pull, but not push to or administer newly-added repositories. - * \* `push` - team members can pull and push, but not administer newly-added repositories. - * \* `admin` - team members can pull, push and administer newly-added repositories. - * @default pull - * @enum {string} - */ - permission?: 'pull' | 'push' | 'admin' - /** @description The ID of a team to set as the parent team. */ - parent_team_id?: number | null + /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get an environment public key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) endpoint. */ + encrypted_value: string + /** @description ID of the key you used to encrypt the secret. */ + key_id: string } } } } - /** - * **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': { + /** 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: { - team_id: components['parameters']['team-id'] + /** The unique identifier of the repository. */ + repository_id: components['parameters']['repository-id'] + /** The name of the environment. */ + environment_name: components['parameters']['environment-name'] + /** The name of the secret. */ + secret_name: components['parameters']['secret-name'] + } + } + responses: { + /** Default 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: { - /** 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'] + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string + /** attributes to exclude */ + excludedAttributes?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion'][] + 'application/json': components['schemas']['scim-group-list-enterprise'] } } } } /** - * **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/). + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title: string - /** @description The discussion post's body text. */ - body: string - /** - * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. - * @default false - */ - private?: boolean + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] } } } } - /** - * **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': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + query: { + /** Attributes to exclude. */ + excludedAttributes?: string } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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. */ - 'teams/delete-discussion-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** Identifier generated by the GitHub SCIM endpoint. */ + scim_group_id: components['parameters']['scim-group-id'] + } + } + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['scim-enterprise-group'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The name of the SCIM group. This must match the GitHub organization that the group maps to. */ + displayName: string + members?: { + /** @description The SCIM user ID for a user. */ + value: string + }[] + } + } + } + } + /** **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: { @@ -38960,246 +38507,308 @@ export interface operations { } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * 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). */ - 'teams/update-discussion-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-group': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion'] + 'application/json': components['schemas']['scim-enterprise-group'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion post's title. */ - title?: string - /** @description The discussion post's body text. */ - body?: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { + /** @enum {string} */ + op: 'add' | 'Add' | 'remove' | 'Remove' | 'replace' | 'Replace' + path?: string + /** @description Can be any value - string, number, array or object. */ + value?: unknown + }[] } } } } /** - * **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. + * **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 Enterprise Server. 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 Enterprise Server account after completing SSO: + * + * 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. * - * 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/). + * 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + * - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. */ - 'teams/list-discussion-comments-legacy': { + 'enterprise-admin/list-provisioned-identities-enterprise': { 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + } + query: { + /** Used for pagination: the index of the first result to return. */ + startIndex?: components['parameters']['start-index'] + /** Used for pagination: the number of results to return. */ + count?: components['parameters']['count'] + /** filter results */ + filter?: string } } responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['team-discussion-comment'][] + 'application/json': components['schemas']['scim-user-list-enterprise'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * 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/). + * Provision enterprise membership for a user, and send organization invitation emails to the email address. * - * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * 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. */ - 'teams/create-discussion-comment-legacy': { + 'enterprise-admin/provision-and-invite-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + /** 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']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Get a discussion comment](https://docs.github.com/rest/reference/teams#get-a-discussion-comment) endpoint. - * - * Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/get-discussion-comment-legacy': { + /** **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: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } } /** - * **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. + * **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. * - * Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'teams/delete-discussion-comment-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] - } - } - responses: { - /** Response */ - 204: never - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Update a discussion comment](https://docs.github.com/rest/reference/teams#update-a-discussion-comment) endpoint. + * 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`. * - * 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/). + * **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. */ - 'teams/update-discussion-comment-legacy': { + 'enterprise-admin/set-information-for-provisioned-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-discussion-comment'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** @description The discussion comment's body text. */ - body: string + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description The username for the user. */ + userName: string + name: { + /** @description The first name of the user. */ + givenName: string + /** @description The last name of the user. */ + familyName: string + } + /** @description List of user emails. */ + emails: { + /** @description The email address. */ + value: string + /** @description The type of email address. */ + type: string + /** @description Whether this email address is the primary address. */ + primary: boolean + }[] + /** @description List of SCIM group IDs the user is a member of. */ + groups?: { + value?: string + }[] } } } } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List reactions for a team discussion comment`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. - * - * List the reactions to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - */ - 'reactions/list-for-team-discussion-comment-legacy': { + /** **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: { - 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'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 200: { - headers: {} - content: { - 'application/json': components['schemas']['reaction'][] - } - } + 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 "[Create reaction for a team discussion comment](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + * **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`. * - * Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + * ``` + * { + * "Operations":[{ + * "op":"replace", + * "value":{ + * "active":false + * } + * }] + * } + * ``` */ - 'reactions/create-for-team-discussion-comment-legacy': { + 'enterprise-admin/update-attribute-for-enterprise-user': { parameters: { path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] - comment_number: components['parameters']['comment-number'] + /** The slug version of the enterprise name. You can also substitute this value with the enterprise id. */ + enterprise: components['parameters']['enterprise'] + /** The unique identifier of the SCIM user. */ + scim_user_id: components['parameters']['scim-user-id'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] + 'application/json': components['schemas']['scim-enterprise-user'] } } } requestBody: { content: { 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion comment. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + /** @description The SCIM schema URIs. */ + schemas: string[] + /** @description Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). */ + Operations: { [key: string]: 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 reactions for a team discussion`](https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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` * - * 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/). + * 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. */ - 'reactions/list-for-team-discussion-legacy': { + 'search/code': { 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) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39208,57 +38817,94 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['reaction'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['code-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`Create reaction for a team discussion`](https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + * 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/enterprise-server@3.6/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` */ - 'reactions/create-for-team-discussion-legacy': { + 'search/commits': { parameters: { - path: { - team_id: components['parameters']['team-id'] - discussion_number: components['parameters']['discussion-number'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 201: { + 200: { content: { - 'application/json': components['schemas']['reaction'] - } - } - } - requestBody: { - content: { - 'application/json': { - /** - * @description The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) to add to the team discussion. - * @enum {string} - */ - content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['commit-search-result-item'][] + } } } + 304: components['responses']['not_modified'] } } /** - * **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. + * Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. * - * 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:** 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)." */ - 'teams/list-pending-invitations-legacy': { + 'search/issues-and-pull-requests': { parameters: { - path: { - team_id: components['parameters']['team-id'] - } query: { - /** Results per page (max 100) */ + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39267,32 +38913,43 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['organization-invitation'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['issue-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] + 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 new [`List team members`](https://docs.github.com/rest/reference/teams#list-team-members) endpoint. + * Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * Team members will include the members of child teams. + * 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/enterprise-server@3.6/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. */ - 'teams/list-members-legacy': { + 'search/labels': { 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) */ + /** 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/enterprise-server@3.6/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/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39301,312 +38958,455 @@ export interface operations { responses: { /** Response */ 200: { - headers: {} content: { - 'application/json': components['schemas']['simple-user'][] + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['label-search-result-item'][] + } } } + 304: components['responses']['not_modified'] + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } } /** - * The "Get team member" endpoint (described below) is deprecated. + * Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * To list members in a team, the team must be visible to the authenticated user. + * 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. */ - 'teams/get-member-legacy': { + 'search/repos': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" for a detailed list of qualifiers. */ + q: string + /** Sorts the results of your query by number of `stars`, `forks`, or `help-wanted-issues` or how recently the items were `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { - /** if user is a member */ - 204: never - /** if user is not a member */ - 404: unknown + /** Response */ + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['repo-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] + 422: components['responses']['validation_failed'] + 503: components['responses']['service_unavailable'] } } /** - * The "Add team member" endpoint (described below) is deprecated. + * Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. * - * 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. + * 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/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + * 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: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * `q=ruby+is:featured` * - * 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)." + * 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. */ - 'teams/add-member-legacy': { + 'search/topics': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). */ + q: string + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - 403: components['responses']['forbidden'] - /** Not Found if team synchronization is set up */ - 404: unknown - /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ - 422: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['topic-search-result-item'][] + } + } + } + 304: components['responses']['not_modified'] } } /** - * The "Remove team member" endpoint (described below) is deprecated. + * Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). * - * 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. + * When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/rest/reference/search#text-match-metadata). * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * For example, if you're looking for a list of popular users, you might try this query: * - * 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. + * `q=tom+repos:%3E42+followers:%3E1000` * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 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. */ - 'teams/remove-member-legacy': { + 'search/users': { parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + query: { + /** The query contains one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub Enterprise Server. The REST API supports the same qualifiers as the web interface for GitHub Enterprise Server. To learn more about the format of the query, see [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/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 Enterprise Server. Default: [best match](https://docs.github.com/enterprise-server@3.6/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'] + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ - 204: never - /** Not Found if team synchronization is setup */ - 404: unknown + 200: { + content: { + 'application/json': { + total_count: number + incomplete_results: boolean + items: components['schemas']['user-search-result-item'][] + } + } + } + 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 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. + * This endpoint allows you to check the status of the most recent configuration process: * - * To get a user's membership with a team, the team must be visible to the authenticated user. + * Note that you may need to wait several seconds after you start a process before you can check its status. * - * **Note:** - * The response contains the `state` of the membership and the member's `role`. + * The different statuses are: * - * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + * | Status | Description | + * | ------------- | --------------------------------- | + * | `PENDING` | The job has not started yet | + * | `CONFIGURING` | The job is running | + * | `DONE` | The job has finished correctly | + * | `FAILED` | The job has finished unexpectedly | */ - 'teams/get-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/get-configuration-status': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['configuration-status'] + } } } + } + /** This endpoint allows you to start a configuration process at any time for your updated settings to take effect: */ + 'enterprise-admin/start-configuration-process': { + responses: { + /** Response */ + 202: unknown + } + } + /** Check your installation's maintenance status: */ + 'enterprise-admin/get-maintenance-status': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['maintenance-status'] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/enable-or-disable-maintenance-mode': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['maintenance-status'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description A JSON string with the attributes `enabled` and `when`. + * + * The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + * + * The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + */ + maintenance: string } } - 404: components['responses']['not_found'] } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - * - * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * **Note:** You cannot retrieve the management console password with the Enterprise administration API. + */ + 'enterprise-admin/get-settings': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['enterprise-settings'] + } + } + } + } + /** + * Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). * - * 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. + * **Notes:** * - * 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. + * - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + * - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." */ - 'teams/add-or-update-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] + 'enterprise-admin/set-settings': { + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A JSON string with the new settings. Note that you only need to pass the specific settings you want to modify. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings: string + } + } + } + } + 'enterprise-admin/get-all-authorized-ssh-keys': { + responses: { + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/add-authorized-ssh-key': { + responses: { + /** Response */ + 201: { + content: { + 'application/json': components['schemas']['ssh-key'][] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string + } } } + } + /** **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ + 'enterprise-admin/remove-authorized-ssh-key': { responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['team-membership'] + 'application/json': components['schemas']['ssh-key'][] } } - /** Forbidden if team synchronization is set up */ - 403: unknown - 404: components['responses']['not_found'] - /** Unprocessable Entity if you attempt to add an organization to a team */ - 422: unknown } requestBody: { content: { - 'application/json': { - /** - * @description The role that this user should have in the team. Can be one of: - * \* `member` - a normal member of the team. - * \* `maintainer` - a team maintainer. Able to add/remove other team members, promote other team members to team maintainer, and edit the team's name and description. - * @default member - * @enum {string} - */ - role?: 'member' | 'maintainer' + 'application/x-www-form-urlencoded': { + /** @description The public SSH key. */ + authorized_key: string } } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. * - * 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. + * When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: * - * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + * 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. + * + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/remove-membership-for-user-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - username: components['parameters']['username'] - } - } + 'enterprise-admin/create-enterprise-server-license': { responses: { /** Response */ - 204: never - /** if team synchronization is set up */ - 403: unknown + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your _.ghl_ license file. */ + license: string + /** @description You **must** provide a password _only if_ you are uploading your license for the first time. If you previously set a password through the web interface, you don't need this parameter. */ + password?: string + /** @description An optional JSON string containing the installation settings. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). */ + settings?: string + } + } } } /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List team projects`](https://docs.github.com/rest/reference/teams#list-team-projects) endpoint. + * This API upgrades your license and also triggers the configuration process. * - * Lists the organization projects for a team. + * **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). */ - 'teams/list-projects-legacy': { + 'enterprise-admin/upgrade-license': { + responses: { + /** Response */ + 202: unknown + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The content of your new _.ghl_ license file. */ + license?: string + } + } + } + } + /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) endpoint. */ + 'teams/get-legacy': { parameters: { path: { + /** The unique identifier of the team. */ 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'][] + '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 [Check team permissions for a project](https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-team) endpoint. * - * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + * 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/check-permissions-for-project-legacy': { + 'teams/delete-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['team-project'] - } - } - /** Not Found if project is not managed by this team */ - 404: unknown + 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 [Add or update team project permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions) endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-team) 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. + * 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/add-or-update-project-permissions-legacy': { + 'teams/update-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] } } responses: { + /** Response when the updated information already exists */ + 200: { + content: { + 'application/json': components['schemas']['team-full'] + } + } /** Response */ - 204: never - /** Forbidden if the project is not owned by the organization */ - 403: { + 201: { content: { - 'application/json': { - message?: string - documentation_url?: string - } + 'application/json': components['schemas']['team-full'] } } + 403: components['responses']['forbidden'] 404: components['responses']['not_found'] 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The name of the team. */ + name: string + /** @description The description of the team. */ + description?: string /** - * @description The permission to grant to the team for this project. Can be one of: - * \* `read` - team members can read, but not write to or administer this project. - * \* `write` - team members can read and write, but not administer this project. - * \* `admin` - team members can read, write and administer this project. - * Default: the team's `permission` attribute will be used to determine what permission to grant the team on this project. Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." + * @description The level of privacy this team should have. Editing teams without specifying this parameter leaves `privacy` intact. The options are: + * **For a non-nested team:** + * \* `secret` - only visible to organization owners and members of this team. + * \* `closed` - visible to all members of this organization. + * **For a parent or child team:** + * \* `closed` - visible to all members of this organization. * @enum {string} */ - permission?: 'read' | 'write' | 'admin' + privacy?: 'secret' | 'closed' + /** + * @description **Deprecated**. The permission that new repositories will be added to the team with when none is specified. + * @default pull + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' + /** @description The ID of a team to set as the parent team. */ + parent_team_id?: number | null } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#list-discussions) 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. + * List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-project-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - project_id: components['parameters']['project-id'] - } - } - responses: { - /** Response */ - 204: never - 404: components['responses']['not_found'] - 415: components['responses']['preview_header_missing'] - 422: components['responses']['validation_failed'] - } - } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [List team repositories](https://docs.github.com/rest/reference/teams#list-team-repositories) endpoint. */ - 'teams/list-repos-legacy': { + 'teams/list-discussions-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -39617,441 +39417,355 @@ export interface operations { 200: { headers: {} content: { - 'application/json': components['schemas']['minimal-repository'][] + 'application/json': components['schemas']['team-discussion'][] } } - 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 [`Create a discussion`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. * - * **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. + * Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). * - * 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: + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'teams/check-permissions-for-repo-legacy': { + 'teams/create-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] } } responses: { - /** Alternative response with extra repository information */ - 200: { + /** Response */ + 201: { content: { - 'application/json': components['schemas']['team-repository'] + 'application/json': components['schemas']['team-discussion'] } } - /** Response if repository is managed by this team */ - 204: never - /** Not Found if repository is not managed by this team */ - 404: unknown - } - } - /** - * **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new "[Add or update team repository permissions](https://docs.github.com/rest/reference/teams#add-or-update-team-repository-permissions)" endpoint. - * - * To add a repository to a team or update the team's permission on a repository, the authenticated user must have admin access to the repository, and must be able to see the team. The repository must be owned by the organization, or a direct fork of a repository owned by the organization. You will get a `422 Unprocessable Entity` status if you attempt to add a repository to a team that is not owned by the organization. - * - * Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - */ - 'teams/add-or-update-repo-permissions-legacy': { - parameters: { - path: { - team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] - } - } - responses: { - /** Response */ - 204: never - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { + /** @description The discussion post's title. */ + title: string + /** @description The discussion post's body text. */ + body: string /** - * @description The permission to grant the team on this repository. Can be one of: - * \* `pull` - team members can pull, but not push to or administer this repository. - * \* `push` - team members can pull and push, but not administer this repository. - * \* `admin` - team members can pull, push and administer this repository. - * - * If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. - * @enum {string} + * @description Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to `true` to create a private post. + * @default false */ - permission?: 'pull' | 'push' | 'admin' + private?: boolean } } } } /** - * **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. + * **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) 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. + * Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/remove-repo-legacy': { + 'teams/get-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] - owner: components['parameters']['owner'] - repo: components['parameters']['repo'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 204: never + 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 [`List IdP groups for a team`](https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. * - * List IdP groups connected to a team on GitHub. + * Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/list-idp-groups-for-legacy': { + 'teams/delete-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['group-mapping'] - } - } - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 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 [`Create or update IdP group connections`](https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections) endpoint. - * - * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. * - * 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. + * 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'teams/create-or-update-idp-group-connections-legacy': { + 'teams/update-discussion-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['group-mapping'] + 'application/json': components['schemas']['team-discussion'] } } - 403: components['responses']['forbidden'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description The IdP groups you want to connect to a GitHub team. When updating, the new `groups` object will replace the original one. You must include any existing groups that you don't want to remove. */ - groups: { - /** @description ID of the IdP group. */ - group_id: string - /** @description Name of the IdP group. */ - group_name: string - /** @description Description of the IdP group. */ - group_description: string - /** @example "caceab43fc9ffa20081c" */ - id?: string - /** @example "external-team-6c13e7288ef7" */ - name?: string - /** @example "moar cheese pleese" */ - description?: string - }[] - /** @example "I am not a timestamp" */ - synced_at?: string + /** @description The discussion post's title. */ + title?: string + /** @description The discussion post's body text. */ + body?: string } } } } - /** **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`List child teams`](https://docs.github.com/rest/reference/teams#list-child-teams) endpoint. */ - 'teams/list-child-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 [List discussion comments](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/list-discussion-comments-legacy': { parameters: { path: { + /** The unique identifier of the team. */ team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } query: { - /** Results per page (max 100) */ + /** The direction to sort the results by. */ + direction?: components['parameters']['direction'] + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] } } responses: { - /** if child teams exist */ + /** Response */ 200: { headers: {} content: { - 'application/json': components['schemas']['team'][] + 'application/json': components['schemas']['team-discussion-comment'][] } } - 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. + * **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. * - * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + * Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + * + * This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. */ - 'users/get-authenticated': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] - } + 'teams/create-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } - 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: { + 201: { content: { - 'application/json': components['schemas']['private-user'] + 'application/json': components['schemas']['team-discussion-comment'] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** - * @description The new name of the user. - * @example Omar Jahandar - */ - name?: string - /** - * @description The publicly visible email address of the user. - * @example omar@example.com - */ - email?: string - /** - * @description The new blog URL of the user. - * @example blog.example.com - */ - blog?: string - /** - * @description The new Twitter username of the user. - * @example therealomarj - */ - twitter_username?: string | null - /** - * @description The new company of the user. - * @example Acme corporation - */ - company?: string - /** - * @description The new location of the user. - * @example Berlin, Germany - */ - location?: string - /** @description The new hiring availability of the user. */ - hireable?: boolean - /** @description The new short biography of the user. */ - bio?: string - } - } - } - } - /** List the users you've blocked on your personal account. */ - 'users/list-blocked-by-authenticated-user': { - parameters: {} - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['simple-user'][] + /** @description The discussion comment's body text. */ + body: string } } - 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': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/get-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } 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: { + /** Response */ + 200: { content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team-discussion-comment'] } } } } - 'users/block': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/delete-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] } } - 'users/unblock': { + /** + * **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + */ + 'teams/update-discussion-comment-legacy': { parameters: { path: { - username: components['parameters']['username'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] } } responses: { /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] + 200: { + content: { + 'application/json': components['schemas']['team-discussion-comment'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** @description The discussion comment's body text. */ + body: string + } + } } } /** - * Lists the authenticated user's codespaces. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-for-authenticated-user': { + 'reactions/list-for-team-discussion-comment-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] - /** ID of the Repository to filter on */ - repository_id?: components['parameters']['repository-id-in-query'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': { - total_count: number - codespaces: components['schemas']['codespace'][] - } + 'application/json': components['schemas']['reaction'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Creates a new codespace, owned by the authenticated user. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. * - * This endpoint requires either a `repository_id` OR a `pull_request` but not both. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. */ - 'codespaces/create-for-authenticated-user': { + 'reactions/create-for-team-discussion-comment-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + /** The number that identifies the comment. */ + comment_number: components['parameters']['comment-number'] + } + } responses: { - /** Response when the codespace was successfully created */ + /** Response */ 201: { content: { - 'application/json': components['schemas']['codespace'] - } - } - /** Response when the codespace creation partially failed but is being retried in the background */ - 202: { - content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['reaction'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] } requestBody: { content: { - 'application/json': - | { - /** @description Repository id for this codespace */ - repository_id: number - /** @description Git ref (typically a branch name) for this codespace */ - ref?: string - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } - | { - /** @description Pull request number for this codespace */ - pull_request: { - /** @description Pull request number */ - pull_request_number: number - /** @description Repository id for this codespace */ - repository_id: number - } - /** @description Location for this codespace */ - location: string - /** @description Machine type to use for this codespace */ - machine?: string - /** @description Working directory for this codespace */ - working_directory?: string - /** @description Time in minutes before codespace stops from inactivity */ - idle_timeout_minutes?: number - } + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion comment. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' + } } } } /** - * Lists all secrets available for a user's Codespaces without revealing their - * encrypted values. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + * + * List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ - 'codespaces/list-secrets-for-authenticated-user': { + 'reactions/list-for-team-discussion-legacy': { parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] + } query: { - /** Results per page (max 100) */ + /** Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/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' + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40062,491 +39776,545 @@ export interface operations { 200: { headers: {} content: { - 'application/json': { - total_count: number - secrets: components['schemas']['codespaces-secret'][] - } - } - } - } - } - /** Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. Anyone with one of the 'read:user' or 'user' scopes in their personal access token. User must have Codespaces access to use this endpoint. */ - 'codespaces/get-public-key-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespaces-user-public-key'] + 'application/json': components['schemas']['reaction'][] } } } } /** - * Gets a secret available to a user's codespaces without revealing its encrypted value. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + * + * Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. */ - 'codespaces/get-secret-for-authenticated-user': { + 'reactions/create-for-team-discussion-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The number that identifies the discussion. */ + discussion_number: components['parameters']['discussion-number'] } } responses: { /** Response */ - 200: { + 201: { content: { - 'application/json': components['schemas']['codespaces-secret'] + 'application/json': components['schemas']['reaction'] + } + } + } + requestBody: { + content: { + 'application/json': { + /** + * @description The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) to add to the team discussion. + * @enum {string} + */ + content: '+1' | '-1' | 'laugh' | 'confused' | 'heart' | 'hooray' | 'rocket' | 'eyes' } } } } /** - * Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - * [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - * - * #### Example encrypting a secret using Node.js - * - * Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - * - * ``` - * const sodium = require('tweetsodium'); - * - * const key = "base64-encoded-public-key"; - * const value = "plain-text-secret"; - * - * // Convert the message and key to Uint8Array's (Buffer implements that interface) - * const messageBytes = Buffer.from(value); - * const keyBytes = Buffer.from(key, 'base64'); - * - * // Encrypt using LibSodium. - * const encryptedBytes = sodium.seal(messageBytes, keyBytes); - * - * // Base64 the encrypted secret - * const encrypted = Buffer.from(encryptedBytes).toString('base64'); - * - * console.log(encrypted); - * ``` - * - * - * #### Example encrypting a secret using Python - * - * Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - * - * ``` - * from base64 import b64encode - * from nacl import encoding, public - * - * def encrypt(public_key: str, secret_value: str) -> str: - * """Encrypt a Unicode string using the public key.""" - * public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - * sealed_box = public.SealedBox(public_key) - * encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - * return b64encode(encrypted).decode("utf-8") - * ``` - * - * #### Example encrypting a secret using C# - * - * Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - * - * ``` - * var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - * var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + * **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. * - * var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + * Team members will include the members of child teams. + */ + 'teams/list-members-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** Filters members returned by their role in the team. */ + role?: 'member' | 'maintainer' | 'all' + /** The number of results per page (max 100). */ + per_page?: 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. * - * Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - * ``` + * We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint instead. It allows you to get both active and pending memberships. * - * #### Example encrypting a secret using Ruby + * To list members in a team, the team must be visible to the authenticated user. + */ + 'teams/get-member-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** if user is a member */ + 204: never + /** if user is not a member */ + 404: unknown + } + } + /** + * The "Add team member" endpoint (described below) is deprecated. * - * Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + * We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. * - * ```ruby - * require "rbnacl" - * require "base64" + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. * - * key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - * public_key = RbNaCl::PublicKey.new(key) + * 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. * - * box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - * encrypted_secret = box.encrypt("my_secret") + * **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 Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." * - * # Print the base64 encoded secret - * puts Base64.strict_encode64(encrypted_secret) - * ``` + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/create-or-update-secret-for-authenticated-user': { + 'teams/add-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** Response after successfully creaing a secret */ - 201: { - content: { - 'application/json': { [key: string]: unknown } - } - } - /** Response after successfully updating a secret */ + /** Response */ 204: never - 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': { - /** @description Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) using the public key retrieved from the [Get the public key for the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) endpoint. */ - encrypted_value: string - /** @description ID of the key you used to encrypt the secret. */ - key_id: string - /** @description An array of repository ids that can access the user secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids?: string[] - } - } + 403: components['responses']['forbidden'] + /** Not Found if team synchronization is set up */ + 404: unknown + /** Unprocessable Entity if you attempt to add an organization to a team or you attempt to add a user to a team when they are not a member of at least one other team in the same organization */ + 422: unknown } } - /** Deletes a secret from a user's codespaces using the secret name. Deleting the secret will remove access from all codespaces that were allowed to access the secret. You must authenticate using an access token with the `user` scope to use this endpoint. User must have Codespaces access to use this endpoint. */ - 'codespaces/delete-secret-for-authenticated-user': { + /** + * The "Remove team member" endpoint (described below) is deprecated. + * + * We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + */ + 'teams/remove-member-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 204: never + /** Not Found if team synchronization is setup */ + 404: unknown } } /** - * List the repositories that have been granted the ability to use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + * + * Team members will include the members of child teams. + * + * To get a user's membership with a team, the team must be visible to the authenticated user. + * + * **Note:** + * The response contains the `state` of the membership and the member's `role`. + * + * The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). */ - 'codespaces/list-repositories-for-secret-for-authenticated-user': { + 'teams/get-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { /** Response */ 200: { content: { - 'application/json': { - total_count: number - repositories: components['schemas']['minimal-repository'][] - } + 'application/json': components['schemas']['team-membership'] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Select the repositories that will use a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + * + * If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + * + * If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. */ - 'codespaces/set-repositories-for-secret-for-authenticated-user': { + 'teams/add-or-update-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repositories were added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-membership'] + } + } + /** Forbidden if team synchronization is set up */ + 403: unknown 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Unprocessable Entity if you attempt to add an organization to a team */ + 422: unknown } requestBody: { content: { 'application/json': { - /** @description An array of repository ids for which a codespace can access the secret. You can manage the list of selected repositories using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) endpoints. */ - selected_repository_ids: number[] + /** + * @description The role that this user should have in the team. + * @default member + * @enum {string} + */ + role?: 'member' | 'maintainer' } } } } /** - * Adds a repository to the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. - */ - 'codespaces/add-repository-for-secret-for-authenticated-user': { - parameters: { - path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number - } - } - responses: { - /** No Content when repository was added to the selected list */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] - } - } - /** - * Removes a repository from the selected repositories for a user's codespace secret. - * You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + * + * Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + * + * To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + * + * **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." */ - 'codespaces/remove-repository-for-secret-for-authenticated-user': { + 'teams/remove-membership-for-user-legacy': { parameters: { path: { - /** secret_name parameter */ - secret_name: components['parameters']['secret-name'] - repository_id: number + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] } } responses: { - /** No Content when repository was removed from the selected list */ + /** Response */ 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** if team synchronization is set up */ + 403: unknown } } /** - * Gets information about a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Lists the organization projects for a team. */ - 'codespaces/get-for-authenticated-user': { + 'teams/list-projects-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] } } responses: { /** Response */ 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['team-project'][] } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Deletes a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. */ - 'codespaces/delete-for-authenticated-user': { + 'teams/check-permissions-for-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { - 202: components['responses']['accepted'] - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] + /** Response */ + 200: { + content: { + 'application/json': components['schemas']['team-project'] + } + } + /** Not Found if project is not managed by this team */ + 404: unknown } } /** - * Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + * **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. * - * If you specify a new machine type it will be applied the next time your codespace is started. - * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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. */ - 'codespaces/update-for-authenticated-user': { + 'teams/add-or-update-project-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 200: { + 204: never + /** Forbidden if the project is not owned by the organization */ + 403: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': { + message?: string + documentation_url?: string + } } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] + 422: components['responses']['validation_failed'] } requestBody: { content: { 'application/json': { - /** @description A valid machine to transition this codespace to. */ - machine?: string - /** @description Recently opened folders inside the codespace. It is currently used by the clients to determine the folder path to load the codespace in. */ - recent_folders?: string[] + /** + * @description The permission to grant to the team for 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 this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + * @enum {string} + */ + permission?: 'read' | 'write' | 'admin' } } } } /** - * Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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. */ - 'codespaces/export-for-authenticated-user': { + 'teams/remove-project-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The unique identifier of the project. */ + project_id: components['parameters']['project-id'] } } responses: { /** Response */ - 202: { + 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 [List team repositories](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-repositories) endpoint. */ + 'teams/list-repos-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + } + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** Response */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['minimal-repository'][] } } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 422: components['responses']['validation_failed'] - 500: components['responses']['internal_error'] } } /** - * Gets information about an export of a codespace. + * **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-repository) endpoint. * - * You must authenticate using a personal access token with the `codespace` scope to use this 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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: */ - 'codespaces/get-export-details-for-authenticated-user': { + 'teams/check-permissions-for-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - /** The ID of the export operation, or `latest`. Currently only `latest` is currently supported. */ - export_id: components['parameters']['export-id'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { - /** Response */ + /** Alternative response with extra repository information */ 200: { content: { - 'application/json': components['schemas']['codespace-export-details'] + 'application/json': components['schemas']['team-repository'] } } - 404: components['responses']['not_found'] + /** Response if repository is managed by this team */ + 204: never + /** Not Found if repository is not managed by this team */ + 404: unknown } } /** - * List the machine types a codespace can transition to use. + * **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/enterprise-server@3.6/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. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ - 'codespaces/codespace-machines-for-authenticated-user': { + 'teams/add-or-update-repo-permissions-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': { - total_count: number - machines: components['schemas']['codespace-machine'][] - } + 204: never + 403: components['responses']['forbidden'] + 422: components['responses']['validation_failed'] + } + requestBody: { + content: { + 'application/json': { + /** + * @description The permission to grant the team on this repository. If no permission is specified, the team's `permission` attribute will be used to determine what permission to grant the team on this repository. + * @enum {string} + */ + permission?: 'pull' | 'push' | 'admin' } } - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } /** - * Starts a user's codespace. + * **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/enterprise-server@3.6/rest/reference/teams#remove-a-repository-from-a-team) endpoint. * - * You must authenticate using an access token with the `codespace` scope to use this 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. */ - 'codespaces/start-for-authenticated-user': { + 'teams/remove-repo-legacy': { parameters: { path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] + /** The account owner of the repository. The name is not case sensitive. */ + owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ + repo: components['parameters']['repo'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['codespace'] - } + 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 child teams`](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams) endpoint. */ + 'teams/list-child-legacy': { + parameters: { + path: { + /** The unique identifier of the team. */ + team_id: components['parameters']['team-id'] } - 304: components['responses']['not_modified'] - 400: components['responses']['bad_request'] - 401: components['responses']['requires_authentication'] - /** Payment required */ - 402: { + query: { + /** The number of results per page (max 100). */ + per_page?: components['parameters']['per-page'] + /** Page number of the results to fetch. */ + page?: components['parameters']['page'] + } + } + responses: { + /** if child teams exist */ + 200: { + headers: {} content: { - 'application/json': components['schemas']['basic-error'] + 'application/json': components['schemas']['team'][] } } 403: components['responses']['forbidden'] 404: components['responses']['not_found'] - 409: components['responses']['conflict'] - 500: components['responses']['internal_error'] + 422: components['responses']['validation_failed'] } } /** - * Stops a user's codespace. + * If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. * - * You must authenticate using an access token with the `codespace` scope to use this endpoint. + * If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. */ - 'codespaces/stop-for-authenticated-user': { - parameters: { - path: { - /** The name of the codespace. */ - codespace_name: components['parameters']['codespace-name'] - } - } + 'users/get-authenticated': { + parameters: {} responses: { /** Response */ 200: { content: { - 'application/json': components['schemas']['codespace'] + 'application/json': components['schemas']['private-user'] | components['schemas']['public-user'] } } + 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - 500: components['responses']['internal_error'] } } - /** Sets the visibility for your primary email addresses. */ - 'users/set-primary-email-visibility-for-authenticated-user': { + /** **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']['email'][] + 'application/json': components['schemas']['private-user'] } } 304: components['responses']['not_modified'] @@ -40559,10 +40327,39 @@ export interface operations { content: { 'application/json': { /** - * @description Denotes whether an email is publicly visible. - * @enum {string} + * @description The new name of the user. + * @example Omar Jahandar + */ + name?: string + /** + * @description The publicly visible email address of the user. + * @example omar@example.com + */ + email?: string + /** + * @description The new blog URL of the user. + * @example blog.example.com + */ + blog?: string + /** + * @description The new Twitter username of the user. + * @example therealomarj */ - visibility: 'public' | 'private' + twitter_username?: string | null + /** + * @description The new company of the user. + * @example Acme corporation + */ + company?: string + /** + * @description The new location of the user. + * @example Berlin, Germany + */ + location?: string + /** @description The new hiring availability of the user. */ + hireable?: boolean + /** @description The new short biography of the user. */ + bio?: string } } } @@ -40571,7 +40368,7 @@ export interface operations { 'users/list-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40650,7 +40447,7 @@ export interface operations { 'users/list-followers-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40673,7 +40470,7 @@ export interface operations { 'users/list-followed-by-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40695,6 +40492,7 @@ export interface operations { 'users/check-person-is-followed-by-authenticated': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40713,13 +40511,14 @@ export interface operations { } } /** - * 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)." + * 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/enterprise-server@3.6/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: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40736,6 +40535,7 @@ export interface operations { 'users/unfollow': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -40748,11 +40548,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-gpg-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40772,7 +40572,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-gpg-key-for-authenticated-user': { parameters: {} responses: { @@ -40791,17 +40591,19 @@ export interface operations { requestBody: { content: { 'application/json': { + /** @description A descriptive name for the new key. */ + name?: string /** @description A GPG key in ASCII-armored format. */ armored_public_key: string } } } } - /** View extended details for a single GPG key. Requires that you are authenticated via Basic Auth or via OAuth with at least `read:gpg_key` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40818,11 +40620,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-gpg-key-for-authenticated-user': { parameters: { path: { - /** gpg_key_id parameter */ + /** The unique identifier of the GPG key. */ gpg_key_id: components['parameters']['gpg-key-id'] } } @@ -40839,7 +40641,7 @@ export interface operations { /** * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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. * @@ -40848,7 +40650,7 @@ export interface operations { 'apps/list-installations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40868,7 +40670,6 @@ export interface operations { 304: components['responses']['not_modified'] 401: components['responses']['requires_authentication'] 403: components['responses']['forbidden'] - 415: components['responses']['preview_header_missing'] } } /** @@ -40876,18 +40677,18 @@ export interface operations { * * 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. + * You must use a [user-to-server OAuth access token](https://docs.github.com/enterprise-server@3.6/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 */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -40913,13 +40714,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/add-repo-to-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -40934,13 +40736,14 @@ export interface operations { /** * 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. + * You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. */ 'apps/remove-repo-from-installation-for-authenticated-user': { parameters: { path: { - /** installation_id parameter */ + /** The unique identifier of the installation. */ installation_id: components['parameters']['installation-id'] + /** The unique identifier of the repository. */ repository_id: components['parameters']['repository-id'] } } @@ -40952,74 +40755,30 @@ export interface operations { 404: components['responses']['not_found'] } } - /** Shows which type of GitHub user can interact with your public repositories and when the restriction expires. */ - 'interactions/get-restrictions-for-authenticated-user': { - responses: { - /** Default response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] | { [key: string]: unknown } - } - } - /** Response when there are no restrictions */ - 204: never - } - } - /** Temporarily restricts which type of GitHub user can interact with your public repositories. Setting the interaction limit at the user level will overwrite any interaction limits that are set for individual repositories owned by the user. */ - 'interactions/set-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['interaction-limit-response'] - } - } - 422: components['responses']['validation_failed'] - } - requestBody: { - content: { - 'application/json': components['schemas']['interaction-limit'] - } - } - } - /** Removes any interaction restrictions from your public repositories. */ - 'interactions/remove-restrictions-for-authenticated-user': { - responses: { - /** Response */ - 204: never - } - } /** * List issues across owned and member repositories assigned to the authenticated user. * * **Note**: GitHub's REST API v3 considers every pull request an issue, but not every issue is a pull request. For this * reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by * the `pull_request` key. Be aware that the `id` of a pull request returned from "Issues" endpoints will be an _issue id_. To find out the pull - * request id, use the "[List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests)" endpoint. + * request id, use the "[List pull requests](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. */ 'issues/list-for-authenticated-user': { parameters: { query: { - /** - * Indicates which sorts of issues to return. Can be one of: - * \* `assigned`: Issues assigned to you - * \* `created`: Issues created by you - * \* `mentioned`: Issues mentioning you - * \* `subscribed`: Issues you're subscribed to updates for - * \* `all` or `repos`: All issues the authenticated user can see, regardless of participation or creation - */ + /** Indicates which sorts of issues to return. `assigned` means issues assigned to you. `created` means issues created by you. `mentioned` means issues mentioning you. `subscribed` means issues you're subscribed to updates for. `all` or `repos` means all issues you can see, regardless of participation or creation. */ filter?: 'assigned' | 'created' | 'mentioned' | 'subscribed' | 'repos' | 'all' - /** Indicates the state of the issues to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the issues to return. */ 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`. */ + /** What to sort results by. */ sort?: 'created' | 'updated' | 'comments' - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41037,11 +40796,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/list-public-ssh-keys-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41061,7 +40820,7 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/create-public-ssh-key-for-authenticated-user': { parameters: {} responses: { @@ -41091,11 +40850,11 @@ export interface operations { } } } - /** 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/get-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41112,11 +40871,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). */ 'users/delete-public-ssh-key-for-authenticated-user': { parameters: { path: { - /** key_id parameter */ + /** The unique identifier of the key. */ key_id: components['parameters']['key-id'] } } @@ -41129,57 +40888,12 @@ export interface operations { 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. */ + /** Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. */ state?: 'active' | 'pending' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41202,6 +40916,7 @@ export interface operations { 'orgs/get-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41219,6 +40934,7 @@ export interface operations { 'orgs/update-membership-for-authenticated-user': { parameters: { path: { + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } } @@ -41249,7 +40965,7 @@ export interface operations { 'migrations/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41291,6 +41007,16 @@ export interface operations { * @example true */ lock_repositories?: boolean + /** + * @description Indicates whether metadata should be excluded and only git source should be included for the migration. + * @example true + */ + exclude_metadata?: boolean + /** + * @description Indicates whether the repository git data should be excluded from the migration. + * @example true + */ + exclude_git_data?: boolean /** * @description Do not include attachments in the migration * @example true @@ -41306,6 +41032,12 @@ export interface operations { * @example true */ exclude_owner_projects?: boolean + /** + * @description Indicates whether this should only include organization metadata (repositories array should be empty and will ignore other flags). + * @default false + * @example true + */ + org_metadata_only?: boolean /** * @description Exclude attributes from the API response to improve performance * @example [ @@ -41318,39 +41050,6 @@ export interface operations { } } } - /** - * 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: * @@ -41377,7 +41076,7 @@ export interface operations { 'migrations/get-archive-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } } @@ -41389,51 +41088,15 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** Deletes a previous migration archive. Downloadable migration archives are automatically deleted after seven days. Migration metadata, which is returned in the [List user migrations](https://docs.github.com/rest/reference/migrations#list-user-migrations) and [Get a user migration status](https://docs.github.com/rest/reference/migrations#get-a-user-migration-status) endpoints, will continue to be available even after an archive is deleted. */ - 'migrations/delete-archive-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** Unlocks a repository. You can lock repositories when you [start a user migration](https://docs.github.com/rest/reference/migrations#start-a-user-migration). Once the migration is complete you can unlock each repository to begin using it again or [delete the repository](https://docs.github.com/rest/reference/repos#delete-a-repository) if you no longer need the source data. Returns a status of `404 Not Found` if the repository is not locked. */ - 'migrations/unlock-repo-for-authenticated-user': { - parameters: { - path: { - /** migration_id parameter */ - migration_id: components['parameters']['migration-id'] - /** repo_name parameter */ - repo_name: components['parameters']['repo-name'] - } - } - responses: { - /** Response */ - 204: never - 304: components['responses']['not_modified'] - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } /** Lists all the repositories for this user migration. */ 'migrations/list-repos-for-authenticated-user': { parameters: { path: { - /** migration_id parameter */ + /** The unique identifier of the migration. */ migration_id: components['parameters']['migration-id'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41460,7 +41123,7 @@ export interface operations { 'orgs/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41479,221 +41142,7 @@ export interface operations { 403: components['responses']['forbidden'] } } - /** - * Lists packages owned by the authenticated user within the user's namespace. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-authenticated-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - } - } - /** - * Gets a specific package for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package owned by the authenticated user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - } - query: { - /** Page number of the results to fetch. */ - page?: components['parameters']['page'] - /** Results per page (max 100) */ - per_page?: components['parameters']['per-page'] - /** The state of the package, either active or deleted. */ - state?: 'active' | 'deleted' - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a package owned by the authenticated user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/delete-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a package version owned by the authenticated user. - * - * You can restore a deleted package version under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/restore-package-version-for-authenticated-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } + /** Creates a user project board. Returns a `410 Gone` status if the user does not have existing classic projects. If you do not have sufficient privileges to perform this action, a `401 Unauthorized` or `410 Gone` status is returned. */ 'projects/create-for-authenticated-user': { parameters: {} responses: { @@ -41706,7 +41155,6 @@ export interface operations { 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: { @@ -41726,11 +41174,11 @@ export interface operations { } } } - /** 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. */ + /** Lists your publicly visible email address, which you can set with the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) endpoint. This endpoint is accessible with the `user:email` scope. */ 'users/list-public-emails-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41758,7 +41206,7 @@ export interface operations { 'repos/list-for-authenticated-user': { parameters: { query: { - /** Can be one of `all`, `public`, or `private`. Note: For GitHub AE, can be one of `all`, `internal`, or `private`. */ + /** Limit results to repositories with the specified visibility. */ visibility?: 'all' | 'public' | 'private' /** * Comma-separated list of values. Can include: @@ -41767,17 +41215,13 @@ export interface operations { * \* `organization_member`: Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on. */ affiliation?: string - /** - * Can be one of `all`, `owner`, `public`, `private`, `member`. Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, `member`. Default: `all` - * - * Will cause a `422` error if used in the same request as **visibility** or **affiliation**. Will cause a `422` error if used in the same request as **visibility** or **affiliation**. - */ + /** Limit results to repositories of the specified type. 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`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41805,7 +41249,7 @@ export interface operations { * * **OAuth scope requirements** * - * When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + * When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * * * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * * `repo` scope to create a private repository. @@ -41911,6 +41355,40 @@ export interface operations { * @example false */ delete_branch_on_merge?: boolean + /** + * @description The default value for a squash merge commit title: + * + * - `PR_TITLE` - default to the pull request's title. + * - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + * @enum {string} + */ + squash_merge_commit_title?: 'PR_TITLE' | 'COMMIT_OR_PR_TITLE' + /** + * @description The default value for a squash merge commit message: + * + * - `PR_BODY` - default to the pull request's body. + * - `COMMIT_MESSAGES` - default to the branch's commit messages. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + squash_merge_commit_message?: 'PR_BODY' | 'COMMIT_MESSAGES' | 'BLANK' + /** + * @description The default value for a merge commit title. + * + * - `PR_TITLE` - default to the pull request's title. + * - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + * @enum {string} + */ + merge_commit_title?: 'PR_TITLE' | 'MERGE_MESSAGE' + /** + * @description The default value for a merge commit message. + * + * - `PR_TITLE` - default to the pull request's title. + * - `PR_BODY` - default to the pull request's body. + * - `BLANK` - default to a blank commit message. + * @enum {string} + */ + merge_commit_message?: 'PR_BODY' | 'PR_TITLE' | 'BLANK' /** * @description Whether downloads are enabled. * @default true @@ -41931,7 +41409,7 @@ export interface operations { 'repos/list-invitations-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -41954,7 +41432,7 @@ export interface operations { 'repos/decline-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -41970,7 +41448,7 @@ export interface operations { 'repos/accept-invitation-for-authenticated-user': { parameters: { path: { - /** invitation_id parameter */ + /** The unique identifier of the invitation. */ invitation_id: components['parameters']['invitation-id'] } } @@ -41986,16 +41464,16 @@ export interface operations { /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ '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). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42018,7 +41496,9 @@ export interface operations { 'activity/check-repo-is-starred-by-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42036,11 +41516,13 @@ export interface operations { } } } - /** 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)." */ + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ 'activity/star-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42056,7 +41538,9 @@ export interface operations { 'activity/unstar-repo-for-authenticated-user': { parameters: { path: { + /** The account owner of the repository. The name is not case sensitive. */ owner: components['parameters']['owner'] + /** The name of the repository. The name is not case sensitive. */ repo: components['parameters']['repo'] } } @@ -42073,7 +41557,7 @@ export interface operations { 'activity/list-watched-repos-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42092,11 +41576,11 @@ export interface operations { 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/). */ + /** 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). */ 'teams/list-for-authenticated-user': { parameters: { query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42116,16 +41600,16 @@ export interface operations { } } /** - * Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + * Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + * Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] } } @@ -42145,15 +41629,16 @@ export interface operations { /** * 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" + * GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + * 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/enterprise-server@3.6/rest/reference/users#emails)". */ 'users/get-by-username': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42171,10 +41656,11 @@ export interface operations { 'activity/list-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42193,11 +41679,13 @@ export interface operations { 'activity/list-org-events-for-authenticated-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] + /** The organization name. The name is not case sensitive. */ org: components['parameters']['org'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42215,10 +41703,11 @@ export interface operations { 'activity/list-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42237,10 +41726,11 @@ export interface operations { 'users/list-followers-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42260,10 +41750,11 @@ export interface operations { 'users/list-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42282,6 +41773,7 @@ export interface operations { 'users/check-following-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] target_user: string } @@ -42297,12 +41789,13 @@ export interface operations { 'gists/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ 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) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42323,10 +41816,11 @@ export interface operations { 'users/list-gpg-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42355,6 +41849,7 @@ export interface operations { 'users/get-context-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { @@ -42378,11 +41873,12 @@ export interface operations { /** * 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. + * You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. */ 'apps/get-user-installation': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } @@ -42399,10 +41895,11 @@ export interface operations { 'users/list-public-keys-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42421,15 +41918,16 @@ export interface operations { /** * List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. * - * This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + * 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. */ 'orgs/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42445,240 +41943,16 @@ export interface operations { } } } - /** - * Lists all packages in a user's namespace for which the requesting user has access. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/list-packages-for-user': { - parameters: { - query: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: 'npm' | 'maven' | 'rubygems' | 'docker' | 'nuget' | 'container' - /** The selected visibility of the packages. Can be one of `public`, `private`, or `internal`. Only `container` package_types currently support `internal` visibility properly. For other ecosystems `internal` is synonymous with `private`. This parameter is optional and only filters an existing result set. */ - visibility?: components['parameters']['package-visibility'] - } - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - } - } - /** - * Gets a specific package metadata for a public package owned by a user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package'] - } - } - } - } - /** - * Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores an entire package for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - query: { - /** package token */ - token?: string - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Returns all package versions for a public package owned by a specified user. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-all-package-versions-for-package-owned-by-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'][] - } - } - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Gets a specific package version for a public package owned by a specified user. - * - * At this time, to use this endpoint, you must authenticate using an access token with the `packages:read` scope. - * If `package_type` is not `container`, your token must also include the `repo` scope. - */ - 'packages/get-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['package-version'] - } - } - } - } - /** - * Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - */ - 'packages/delete-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } - /** - * Restores a specific package version for a user. - * - * You can restore a deleted package under the following conditions: - * - The package was deleted within the last 30 days. - * - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - * - * To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - * - If `package_type` is not `container`, your token must also include the `repo` scope. - * - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - */ - 'packages/restore-package-version-for-user': { - parameters: { - path: { - /** The type of supported package. Can be one of `npm`, `maven`, `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) have the type `container`. You can use the type `docker` to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if these have now been migrated to the Container registry. */ - package_type: components['parameters']['package-type'] - /** The name of the package. */ - package_name: components['parameters']['package-name'] - username: components['parameters']['username'] - /** Unique identifier of the package version. */ - package_version_id: components['parameters']['package-version-id'] - } - } - responses: { - /** Response */ - 204: never - 401: components['responses']['requires_authentication'] - 403: components['responses']['forbidden'] - 404: components['responses']['not_found'] - } - } 'projects/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Indicates the state of the projects to return. Can be either `open`, `closed`, or `all`. */ + /** Indicates the state of the projects to return. */ state?: 'open' | 'closed' | 'all' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42699,10 +41973,11 @@ export interface operations { 'activity/list-received-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42720,10 +41995,11 @@ export interface operations { 'activity/list-received-public-events-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42742,16 +42018,17 @@ export interface operations { 'repos/list-for-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Can be one of `all`, `owner`, `member`. */ + /** Limit results to repositories of the specified type. */ type?: 'all' | 'owner' | 'member' - /** Can be one of `created`, `updated`, `pushed`, `full_name`. */ + /** The property to sort the results by. */ sort?: 'created' | 'updated' | 'pushed' | 'full_name' - /** Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, otherwise `desc` */ + /** The order to sort by. Default: `asc` when using `full_name`, otherwise `desc`. */ direction?: 'asc' | 'desc' - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42767,88 +42044,49 @@ export interface operations { } } } - /** - * Gets the summary of the free and paid GitHub Actions minutes used. - * - * Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-actions-billing-user': { + /** 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." */ + 'enterprise-admin/promote-user-to-be-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['actions-billing-usage'] - } - } + 204: never } } - /** - * Gets the free and paid storage used for GitHub Packages in gigabytes. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-github-packages-billing-user': { + /** You can demote any user account except your own. */ + 'enterprise-admin/demote-site-administrator': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } } responses: { /** Response */ - 200: { - content: { - 'application/json': components['schemas']['packages-billing-usage'] - } - } - } - } - /** - * Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - * - * Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - * - * Access tokens must have the `user` scope. - */ - 'billing/get-shared-storage-billing-user': { - parameters: { - path: { - username: components['parameters']['username'] - } - } - responses: { - /** Response */ - 200: { - content: { - 'application/json': components['schemas']['combined-billing-usage'] - } - } + 204: never } } /** * 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: + * You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. */ 'activity/list-repos-starred-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** One of `created` (when the repository was starred) or `updated` (when it was last pushed to). */ + /** The property to sort the results by. `created` means when the repository was starred. `updated` means when the repository was last pushed to. */ sort?: components['parameters']['sort'] - /** One of `asc` (ascending) or `desc` (descending). */ + /** The direction to sort the results by. */ direction?: components['parameters']['direction'] - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42868,10 +42106,11 @@ export interface operations { 'activity/list-repos-watched-by-user': { parameters: { path: { + /** The handle for the GitHub user account. */ username: components['parameters']['username'] } query: { - /** Results per page (max 100) */ + /** The number of results per page (max 100). */ per_page?: components['parameters']['per-page'] /** Page number of the results to fetch. */ page?: components['parameters']['page'] @@ -42887,6 +42126,54 @@ export interface operations { } } } + /** + * If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + * + * You can suspend any user account except your own. + * + * 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + */ + 'enterprise-admin/suspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being suspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Suspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } + /** If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), this API is disabled and will return a `403` response. Active Directory LDAP-authenticated users cannot be unsuspended using the API. */ + 'enterprise-admin/unsuspend-user': { + parameters: { + path: { + /** The handle for the GitHub user account. */ + username: components['parameters']['username'] + } + } + responses: { + /** Response */ + 204: never + } + requestBody: { + content: { + 'application/json': { + /** @description The reason the user is being unsuspended. This message will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). If you don't provide a `reason`, it will default to "Unsuspended via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ is the person who performed the action. */ + reason?: string + } | null + } + } + } /** Get a random sentence from the Zen of GitHub */ 'meta/get-zen': { responses: { diff --git a/test/v3/expected/petstore.additional.ts b/test/v3/expected/petstore.additional.ts index 332bf1b5c..461108330 100644 --- a/test/v3/expected/petstore.additional.ts +++ b/test/v3/expected/petstore.additional.ts @@ -5,7 +5,9 @@ export interface paths { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } & { [key: string]: unknown } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } & { [key: string]: unknown } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } & { [key: string]: unknown } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } & { [key: string]: unknown } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } & { [key: string]: unknown } @@ -108,11 +153,14 @@ export interface components { name?: string } & { [key: string]: unknown } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { message?: string } & { [key: string]: unknown } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } & { [key: string]: unknown } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } & { [key: string]: unknown } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export interface operations { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/v3/expected/petstore.exported-type.ts b/test/v3/expected/petstore.exported-type.ts index a70d99e64..fd979df27 100644 --- a/test/v3/expected/petstore.exported-type.ts +++ b/test/v3/expected/petstore.exported-type.ts @@ -5,7 +5,9 @@ export type paths = { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export type paths = { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export type paths = { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export type paths = { export type components = { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } @@ -108,11 +153,14 @@ export type components = { name?: string } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export type components = { message?: string } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export type operations = { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export type operations = { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export type operations = { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export type operations = { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export type operations = { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export type operations = { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export type operations = { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export type operations = { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export type operations = { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export type operations = { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export type operations = { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export type operations = { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export type operations = { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export type operations = { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export type operations = { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export type operations = { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/v3/expected/petstore.immutable.ts b/test/v3/expected/petstore.immutable.ts index 62bbe98ef..e15100963 100644 --- a/test/v3/expected/petstore.immutable.ts +++ b/test/v3/expected/petstore.immutable.ts @@ -5,7 +5,9 @@ export interface paths { readonly '/pet': { + /** Update an existing pet by Id */ readonly put: operations['updatePet'] + /** Add a new pet to the store */ readonly post: operations['addPet'] } readonly '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { readonly get: operations['findPetsByStatus'] } readonly '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ readonly get: operations['findPetsByTags'] } readonly '/pet/{petId}': { /** Returns a single pet */ readonly get: operations['getPetById'] readonly post: operations['updatePetWithForm'] + /** delete a pet */ readonly delete: operations['deletePet'] } readonly '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { readonly get: operations['getInventory'] } readonly '/store/order': { + /** Place a new order in the store */ readonly post: operations['placeOrder'] } readonly '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ readonly get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ readonly delete: operations['deleteOrder'] } readonly '/user': { /** This can only be done by the logged in user. */ readonly post: operations['createUser'] } - readonly '/user/createWithArray': { - readonly post: operations['createUsersWithArrayInput'] - } readonly '/user/createWithList': { + /** Creates list of users with given input array */ readonly post: operations['createUsersWithListInput'] } readonly '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { readonly schemas: { readonly Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ readonly id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ readonly petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ readonly quantity?: number /** Format: date-time */ readonly shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ readonly status?: 'placed' | 'approved' | 'delivered' - /** @default false */ readonly complete?: boolean } + readonly Customer: { + /** + * Format: int64 + * @example 100000 + */ + readonly id?: number + /** @example fehguy */ + readonly username?: string + readonly address?: readonly components['schemas']['Address'][] + } + readonly Address: { + /** @example 437 Lytton */ + readonly street?: string + /** @example Palo Alto */ + readonly city?: string + /** @example CA */ + readonly state?: string + /** @example 94301 */ + readonly zip?: string + } readonly Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ readonly id?: number + /** @example Dogs */ readonly name?: string } readonly User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ readonly id?: number + /** @example theUser */ readonly username?: string + /** @example John */ readonly firstName?: string + /** @example James */ readonly lastName?: string + /** @example john@email.com */ readonly email?: string + /** @example 12345 */ readonly password?: string + /** @example 12345 */ readonly phone?: string /** * Format: int32 * @description User Status + * @example 1 */ readonly userStatus?: number } @@ -108,11 +153,14 @@ export interface components { readonly name?: string } readonly Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ readonly id?: number - readonly category?: components['schemas']['Category'] /** @example doggie */ readonly name: string + readonly category?: components['schemas']['Category'] readonly photoUrls: readonly string[] readonly tags?: readonly components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { readonly message?: string } } + readonly requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + readonly content: { + readonly 'application/json': components['schemas']['Pet'] + readonly 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + readonly content: { + readonly 'application/json': readonly components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ readonly updatePet: { readonly responses: { + /** Successful operation */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['Pet'] + readonly 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ readonly 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ readonly 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ readonly requestBody: { readonly content: { readonly 'application/json': components['schemas']['Pet'] readonly 'application/xml': components['schemas']['Pet'] + readonly 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ readonly addPet: { readonly responses: { + /** Successful operation */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['Pet'] + readonly 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ readonly 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ readonly requestBody: { readonly content: { readonly 'application/json': components['schemas']['Pet'] readonly 'application/xml': components['schemas']['Pet'] + readonly 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { readonly parameters: { readonly query: { /** Status values that need to be considered for filter */ - readonly status: readonly ('available' | 'pending' | 'sold')[] + readonly status?: 'available' | 'pending' | 'sold' } } readonly responses: { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': readonly components['schemas']['Pet'][] readonly 'application/json': readonly components['schemas']['Pet'][] + readonly 'application/xml': readonly components['schemas']['Pet'][] } } /** Invalid status value */ readonly 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ readonly findPetsByTags: { readonly parameters: { readonly query: { /** Tags to filter by */ - readonly tags: readonly string[] + readonly tags?: readonly string[] } } readonly responses: { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': readonly components['schemas']['Pet'][] readonly 'application/json': readonly components['schemas']['Pet'][] + readonly 'application/xml': readonly components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': components['schemas']['Pet'] readonly 'application/json': components['schemas']['Pet'] + readonly 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ readonly petId: number } + readonly query: { + /** Name of pet that needs to be updated */ + readonly name?: string + /** Status of pet that needs to be updated */ + readonly status?: string + } } readonly responses: { /** Invalid input */ readonly 405: unknown } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - readonly name?: string - /** @description Updated status of the pet */ - readonly status?: string - } - } - } } + /** delete a pet */ readonly deletePet: { readonly parameters: { readonly header: { @@ -256,10 +334,8 @@ export interface operations { } } readonly responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ readonly 400: unknown - /** Pet not found */ - readonly 404: unknown } } readonly uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ readonly petId: number } + readonly query: { + /** Additional Metadata */ + readonly additionalMetadata?: string + } } readonly responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'multipart/form-data': { - /** @description Additional data to pass to server */ - readonly additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - readonly file?: string - } + readonly 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ readonly placeOrder: { readonly responses: { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': components['schemas']['Order'] readonly 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - readonly 400: unknown + /** Invalid input */ + readonly 405: unknown } - /** order placed for purchasing the pet */ readonly requestBody: { readonly content: { - readonly '*/*': components['schemas']['Order'] + readonly 'application/json': components['schemas']['Order'] + readonly 'application/xml': components['schemas']['Order'] + readonly 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ readonly getOrderById: { readonly parameters: { readonly path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ readonly orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': components['schemas']['Order'] readonly 'application/json': components['schemas']['Order'] + readonly 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { readonly 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ readonly deleteOrder: { readonly parameters: { readonly path: { @@ -362,36 +435,38 @@ export interface operations { readonly createUser: { readonly responses: { /** successful operation */ - readonly default: unknown - } - /** Created user object */ - readonly requestBody: { - readonly content: { - readonly '*/*': components['schemas']['User'] + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['User'] + readonly 'application/xml': components['schemas']['User'] + } } } - } - readonly createUsersWithArrayInput: { - readonly responses: { - /** successful operation */ - readonly default: unknown - } - /** List of user object */ + /** Created user object */ readonly requestBody: { readonly content: { - readonly '*/*': readonly components['schemas']['User'][] + readonly 'application/json': components['schemas']['User'] + readonly 'application/xml': components['schemas']['User'] + readonly 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ readonly createUsersWithListInput: { readonly responses: { + /** Successful operation */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['User'] + readonly 'application/xml': components['schemas']['User'] + } + } /** successful operation */ readonly default: unknown } - /** List of user object */ readonly requestBody: { readonly content: { - readonly '*/*': readonly components['schemas']['User'][] + readonly 'application/json': readonly components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { readonly parameters: { readonly query: { /** The user name for login */ - readonly username: string + readonly username?: string /** The password for login in clear text */ - readonly password: string + readonly password?: string } } readonly responses: { @@ -423,6 +498,7 @@ export interface operations { } } readonly logoutUser: { + readonly parameters: {} readonly responses: { /** successful operation */ readonly default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ readonly 200: { readonly content: { - readonly 'application/xml': components['schemas']['User'] readonly 'application/json': components['schemas']['User'] + readonly 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { readonly updateUser: { readonly parameters: { readonly path: { - /** name that need to be updated */ + /** name that need to be deleted */ readonly username: string } } readonly responses: { - /** Invalid user supplied */ - readonly 400: unknown - /** User not found */ - readonly 404: unknown + /** successful operation */ + readonly default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ readonly requestBody: { readonly content: { - readonly '*/*': components['schemas']['User'] + readonly 'application/json': components['schemas']['User'] + readonly 'application/xml': components['schemas']['User'] + readonly 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/v3/expected/petstore.support-array-length.ts b/test/v3/expected/petstore.support-array-length.ts index a0c0ff3f1..1af6c687b 100644 --- a/test/v3/expected/petstore.support-array-length.ts +++ b/test/v3/expected/petstore.support-array-length.ts @@ -5,7 +5,9 @@ export interface paths { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } @@ -108,11 +153,14 @@ export interface components { name?: string } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { message?: string } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export interface operations { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/v3/expected/petstore.ts b/test/v3/expected/petstore.ts index a0c0ff3f1..1af6c687b 100644 --- a/test/v3/expected/petstore.ts +++ b/test/v3/expected/petstore.ts @@ -5,7 +5,9 @@ export interface paths { '/pet': { + /** Update an existing pet by Id */ put: operations['updatePet'] + /** Add a new pet to the store */ post: operations['addPet'] } '/pet/findByStatus': { @@ -13,13 +15,14 @@ export interface paths { get: operations['findPetsByStatus'] } '/pet/findByTags': { - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** 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 a pet */ delete: operations['deletePet'] } '/pet/{petId}/uploadImage': { @@ -30,22 +33,21 @@ export interface paths { get: operations['getInventory'] } '/store/order': { + /** Place a new order in the store */ post: operations['placeOrder'] } '/store/order/{orderId}': { - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ get: operations['getOrderById'] - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** 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': { + /** Creates list of users with given input array */ post: operations['createUsersWithListInput'] } '/user/login': { @@ -66,39 +68,82 @@ export interface paths { export interface components { schemas: { Order: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - /** Format: int64 */ + /** + * Format: int64 + * @example 198772 + */ petId?: number - /** Format: int32 */ + /** + * Format: int32 + * @example 7 + */ quantity?: number /** Format: date-time */ shipDate?: string /** * @description Order Status + * @example approved * @enum {string} */ status?: 'placed' | 'approved' | 'delivered' - /** @default false */ complete?: boolean } + Customer: { + /** + * Format: int64 + * @example 100000 + */ + id?: number + /** @example fehguy */ + username?: string + address?: components['schemas']['Address'][] + } + Address: { + /** @example 437 Lytton */ + street?: string + /** @example Palo Alto */ + city?: string + /** @example CA */ + state?: string + /** @example 94301 */ + zip?: string + } Category: { - /** Format: int64 */ + /** + * Format: int64 + * @example 1 + */ id?: number + /** @example Dogs */ name?: string } User: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number + /** @example theUser */ username?: string + /** @example John */ firstName?: string + /** @example James */ lastName?: string + /** @example john@email.com */ email?: string + /** @example 12345 */ password?: string + /** @example 12345 */ phone?: string /** * Format: int32 * @description User Status + * @example 1 */ userStatus?: number } @@ -108,11 +153,14 @@ export interface components { name?: string } Pet: { - /** Format: int64 */ + /** + * Format: int64 + * @example 10 + */ id?: number - category?: components['schemas']['Category'] /** @example doggie */ name: string + category?: components['schemas']['Category'] photoUrls: string[] tags?: components['schemas']['Tag'][] /** @@ -128,11 +176,34 @@ export interface components { message?: string } } + requestBodies: { + /** Pet object that needs to be added to the store */ + Pet: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } + /** List of user object */ + UserArray: { + content: { + 'application/json': components['schemas']['User'][] + } + } + } } export interface operations { + /** Update an existing pet by Id */ updatePet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid ID supplied */ 400: unknown /** Pet not found */ @@ -140,24 +211,34 @@ export interface operations { /** Validation exception */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Update an existent pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } + /** Add a new pet to the store */ addPet: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] + } + } /** Invalid input */ 405: unknown } - /** Pet object that needs to be added to the store */ + /** Create a new pet in the store */ requestBody: { content: { 'application/json': components['schemas']['Pet'] 'application/xml': components['schemas']['Pet'] + 'application/x-www-form-urlencoded': components['schemas']['Pet'] } } } @@ -166,35 +247,35 @@ export interface operations { parameters: { query: { /** Status values that need to be considered for filter */ - status: ('available' | 'pending' | 'sold')[] + status?: 'available' | 'pending' | 'sold' } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid status value */ 400: unknown } } - /** Muliple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ + /** Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. */ findPetsByTags: { parameters: { query: { /** Tags to filter by */ - tags: string[] + tags?: string[] } } responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'][] 'application/json': components['schemas']['Pet'][] + 'application/xml': components['schemas']['Pet'][] } } /** Invalid tag value */ @@ -213,8 +294,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Pet'] 'application/json': components['schemas']['Pet'] + 'application/xml': components['schemas']['Pet'] } } /** Invalid ID supplied */ @@ -229,22 +310,19 @@ export interface operations { /** ID of pet that needs to be updated */ petId: number } + query: { + /** Name of pet that needs to be updated */ + name?: string + /** Status of pet that needs to be updated */ + status?: string + } } responses: { /** Invalid input */ 405: unknown } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Updated name of the pet */ - name?: string - /** @description Updated status of the pet */ - status?: string - } - } - } } + /** delete a pet */ deletePet: { parameters: { header: { @@ -256,10 +334,8 @@ export interface operations { } } responses: { - /** Invalid ID supplied */ + /** Invalid pet value */ 400: unknown - /** Pet not found */ - 404: unknown } } uploadFile: { @@ -268,6 +344,10 @@ export interface operations { /** ID of pet to update */ petId: number } + query: { + /** Additional Metadata */ + additionalMetadata?: string + } } responses: { /** successful operation */ @@ -279,15 +359,7 @@ export interface operations { } requestBody: { content: { - 'multipart/form-data': { - /** @description Additional data to pass to server */ - additionalMetadata?: string - /** - * Format: binary - * @description file to upload - */ - file?: string - } + 'application/octet-stream': string } } } @@ -302,30 +374,31 @@ export interface operations { } } } + /** Place a new order in the store */ placeOrder: { responses: { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] } } - /** Invalid Order */ - 400: unknown + /** Invalid input */ + 405: unknown } - /** order placed for purchasing the pet */ requestBody: { content: { - '*/*': components['schemas']['Order'] + 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] + 'application/x-www-form-urlencoded': components['schemas']['Order'] } } } - /** For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions */ + /** For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. */ getOrderById: { parameters: { path: { - /** ID of pet that needs to be fetched */ + /** ID of order that needs to be fetched */ orderId: number } } @@ -333,8 +406,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['Order'] 'application/json': components['schemas']['Order'] + 'application/xml': components['schemas']['Order'] } } /** Invalid ID supplied */ @@ -343,7 +416,7 @@ export interface operations { 404: unknown } } - /** For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors */ + /** For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors */ deleteOrder: { parameters: { path: { @@ -362,36 +435,38 @@ export interface operations { createUser: { responses: { /** successful operation */ - default: unknown - } - /** Created user object */ - requestBody: { - content: { - '*/*': components['schemas']['User'] + default: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } } } - } - createUsersWithArrayInput: { - responses: { - /** successful operation */ - default: unknown - } - /** List of user object */ + /** Created user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } + /** Creates list of users with given input array */ createUsersWithListInput: { responses: { + /** Successful operation */ + 200: { + content: { + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + } + } /** successful operation */ default: unknown } - /** List of user object */ requestBody: { content: { - '*/*': components['schemas']['User'][] + 'application/json': components['schemas']['User'][] } } } @@ -399,9 +474,9 @@ export interface operations { parameters: { query: { /** The user name for login */ - username: string + username?: string /** The password for login in clear text */ - password: string + password?: string } } responses: { @@ -423,6 +498,7 @@ export interface operations { } } logoutUser: { + parameters: {} responses: { /** successful operation */ default: unknown @@ -439,8 +515,8 @@ export interface operations { /** successful operation */ 200: { content: { - 'application/xml': components['schemas']['User'] 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] } } /** Invalid username supplied */ @@ -453,20 +529,20 @@ export interface operations { updateUser: { parameters: { path: { - /** name that need to be updated */ + /** name that need to be deleted */ username: string } } responses: { - /** Invalid user supplied */ - 400: unknown - /** User not found */ - 404: unknown + /** successful operation */ + default: unknown } - /** Updated user object */ + /** Update an existent user in the store */ requestBody: { content: { - '*/*': components['schemas']['User'] + 'application/json': components['schemas']['User'] + 'application/xml': components['schemas']['User'] + 'application/x-www-form-urlencoded': components['schemas']['User'] } } } diff --git a/test/v3/expected/stripe.additional.ts b/test/v3/expected/stripe.additional.ts index 38b378d95..15cf6dbfa 100644 --- a/test/v3/expected/stripe.additional.ts +++ b/test/v3/expected/stripe.additional.ts @@ -4,14 +4,6 @@ */ 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'] @@ -278,6 +270,20 @@ export interface paths { */ post: operations['PostApplicationFeesIdRefunds'] } + '/v1/apps/secrets': { + /**

List all secrets stored on the given scope.

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

Create or replace a secret in the secret store.

*/ + post: operations['PostAppsSecrets'] + } + '/v1/apps/secrets/delete': { + /**

Deletes a secret from the secret store by name and scope.

*/ + post: operations['PostAppsSecretsDelete'] + } + '/v1/apps/secrets/find': { + /**

Finds a secret in the secret store by name and scope.

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

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export interface paths { /**

Creates a session of the customer portal.

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

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

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

Retrieves the Bitcoin receiver with the given ID.

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

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

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

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

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

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

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

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetChargesSearch'] + } '/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'] @@ -502,6 +501,15 @@ export interface paths { /**

Creates a new customer object.

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

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

Retrieves a Customer object.

*/ get: operations['GetCustomersCustomer'] @@ -574,15 +582,41 @@ export interface paths { /**

Delete a specified source for a given customer.

*/ delete: operations['DeleteCustomersCustomerCardsId'] } + '/v1/customers/{customer}/cash_balance': { + /**

Retrieves a customer’s cash balance.

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

Changes the settings on a customer’s cash balance.

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

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

*/ + get: operations['GetCustomersCustomerCashBalanceTransactions'] + } + '/v1/customers/{customer}/cash_balance_transactions/{transaction}': { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

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

Removes the currently applied discount on a customer.

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

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

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

Returns a list of PaymentMethods for a given Customer

*/ get: operations['GetCustomersCustomerPaymentMethods'] } + '/v1/customers/{customer}/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + get: operations['GetCustomersCustomerPaymentMethodsPaymentMethod'] + } '/v1/customers/{customer}/sources': { /**

List sources for a specified customer.

*/ get: operations['GetCustomersCustomerSources'] @@ -716,6 +750,34 @@ export interface paths { /**

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

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetFinancialConnectionsAccounts'] + } + '/v1/financial_connections/accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetFinancialConnectionsAccountsAccount'] + } + '/v1/financial_connections/accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostFinancialConnectionsAccountsAccountDisconnect'] + } + '/v1/financial_connections/accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetFinancialConnectionsAccountsAccountOwners'] + } + '/v1/financial_connections/accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostFinancialConnectionsAccountsAccountRefresh'] + } + '/v1/financial_connections/sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostFinancialConnectionsSessions'] + } + '/v1/financial_connections/sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetFinancialConnectionsSessionsSession'] + } '/v1/identity/verification_reports': { /**

List all verification reports.

*/ get: operations['GetIdentityVerificationReports'] @@ -803,9 +865,18 @@ export interface paths { '/v1/invoices': { /**

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

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

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

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

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

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

@@ -863,18 +934,6 @@ export interface paths { /**

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'] @@ -953,22 +1012,42 @@ export interface paths { /**

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostLinkAccountSessions'] + } + '/v1/link_account_sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetLinkAccountSessionsSession'] + } + '/v1/linked_accounts': { + /**

Returns a list of Financial Connections Account objects.

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

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetLinkedAccountsAccount'] + } + '/v1/linked_accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostLinkedAccountsAccountDisconnect'] + } + '/v1/linked_accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetLinkedAccountsAccountOwners'] + } + '/v1/linked_accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostLinkedAccountsAccountRefresh'] + } '/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.

*/ + /**

Creates a new open order object.

*/ post: operations['PostOrders'] } '/v1/orders/{id}': { @@ -977,13 +1056,21 @@ export interface paths { /**

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

Cancels the order as well as the payment intent if one is attached.

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

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetOrdersIdLineItems'] + } + '/v1/orders/{id}/reopen': { + /**

Reopens a submitted order.

*/ + post: operations['PostOrdersIdReopen'] } - '/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/orders/{id}/submit': { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

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

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export interface paths { */ post: operations['PostPaymentIntents'] } + '/v1/payment_intents/search': { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPaymentIntentsSearch'] + } '/v1/payment_intents/{intent}': { /** *

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

@@ -1022,11 +1118,17 @@ export interface paths { */ post: operations['PostPaymentIntentsIntent'] } + '/v1/payment_intents/{intent}/apply_customer_balance': { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

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

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

* - *

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

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ post: operations['PostPaymentIntentsIntentCancel'] } @@ -1070,6 +1172,35 @@ export interface paths { */ post: operations['PostPaymentIntentsIntentConfirm'] } + '/v1/payment_intents/{intent}/increment_authorization': { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

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

Verifies microdeposits on a PaymentIntent object.

*/ post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] @@ -1091,7 +1222,7 @@ export interface paths { get: operations['GetPaymentLinksPaymentLinkLineItems'] } '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

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

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

@@ -1101,7 +1232,7 @@ export interface paths { post: operations['PostPaymentMethods'] } '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

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

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

*/ post: operations['PostPaymentMethodsPaymentMethod'] @@ -1112,9 +1243,11 @@ export interface paths { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export interface paths { post: operations['PostPaymentMethodsPaymentMethodAttach'] } '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ post: operations['PostPaymentMethodsPaymentMethodDetach'] } '/v1/payouts': { @@ -1176,6 +1309,15 @@ export interface paths { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ post: operations['PostPrices'] } + '/v1/prices/search': { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPricesSearch'] + } '/v1/prices/{price}': { /**

Retrieves the price with the given ID.

*/ get: operations['GetPricesPrice'] @@ -1188,6 +1330,15 @@ export interface paths { /**

Creates a new product object.

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

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetProductsSearch'] + } '/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'] @@ -1282,29 +1433,6 @@ export interface paths { /**

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'] @@ -1321,6 +1449,14 @@ export interface paths { */ post: operations['PostRefundsRefund'] } + '/v1/refunds/{refund}/cancel': { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

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

Returns a list of Report Runs, with the most recent appearing first.

*/ get: operations['GetReportingReportRuns'] @@ -1533,9 +1669,26 @@ export interface paths { '/v1/subscriptions': { /**

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

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

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

*/ + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

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

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetSubscriptionsSearch'] + } '/v1/subscriptions/{subscription_exposed_id}': { /**

Retrieves the subscription with the given ID.

*/ get: operations['GetSubscriptionsSubscriptionExposedId'] @@ -1555,7 +1708,7 @@ export interface paths { delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] } '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ get: operations['GetTaxCodes'] } '/v1/tax_codes/{id}': { @@ -1574,6 +1727,20 @@ export interface paths { /**

Updates an existing tax rate.

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

Returns a list of Configuration objects.

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

Creates a new Configuration object.

*/ + post: operations['PostTerminalConfigurations'] + } + '/v1/terminal/configurations/{configuration}': { + /**

Retrieves a Configuration object.

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

Updates a new Configuration object.

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

Deletes a Configuration object.

*/ + delete: operations['DeleteTerminalConfigurationsConfiguration'] + } '/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'] @@ -1609,6 +1776,110 @@ export interface paths { /**

Deletes a Reader object.

*/ delete: operations['DeleteTerminalReadersReader'] } + '/v1/terminal/readers/{reader}/cancel_action': { + /**

Cancels the current reader action.

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

Initiates a payment flow on a Reader.

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

Initiates a setup intent flow on a Reader.

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

Sets reader display to show cart details.

*/ + post: operations['PostTerminalReadersReaderSetReaderDisplay'] + } + '/v1/test_helpers/customers/{customer}/fund_cash_balance': { + /**

Create an incoming testmode bank transfer

*/ + post: operations['PostTestHelpersCustomersCustomerFundCashBalance'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/deliver': { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingDeliver'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/fail': { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingFail'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/return': { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingReturn'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/ship': { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingShip'] + } + '/v1/test_helpers/refunds/{refund}/expire': { + /**

Expire a refund with a status of requires_action.

*/ + post: operations['PostTestHelpersRefundsRefundExpire'] + } + '/v1/test_helpers/terminal/readers/{reader}/present_payment_method': { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + post: operations['PostTestHelpersTerminalReadersReaderPresentPaymentMethod'] + } + '/v1/test_helpers/test_clocks': { + /**

Returns a list of your test clocks.

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

Creates a new test clock that can be attached to new customers and quotes.

*/ + post: operations['PostTestHelpersTestClocks'] + } + '/v1/test_helpers/test_clocks/{test_clock}': { + /**

Retrieves a test clock.

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

Deletes a test clock.

*/ + delete: operations['DeleteTestHelpersTestClocksTestClock'] + } + '/v1/test_helpers/test_clocks/{test_clock}/advance': { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + post: operations['PostTestHelpersTestClocksTestClockAdvance'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/fail': { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdFail'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/return': { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdReturn'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed': { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdSucceed'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/fail': { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdFail'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/post': { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdPost'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/return': { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdReturn'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail': { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post': { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return': { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn'] + } + '/v1/test_helpers/treasury/received_credits': { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedCredits'] + } + '/v1/test_helpers/treasury/received_debits': { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

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

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export interface paths { */ post: operations['PostTransfersTransferReversalsId'] } + '/v1/treasury/credit_reversals': { + /**

Returns a list of CreditReversals.

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

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + post: operations['PostTreasuryCreditReversals'] + } + '/v1/treasury/credit_reversals/{credit_reversal}': { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + get: operations['GetTreasuryCreditReversalsCreditReversal'] + } + '/v1/treasury/debit_reversals': { + /**

Returns a list of DebitReversals.

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

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + post: operations['PostTreasuryDebitReversals'] + } + '/v1/treasury/debit_reversals/{debit_reversal}': { + /**

Retrieves a DebitReversal object.

*/ + get: operations['GetTreasuryDebitReversalsDebitReversal'] + } + '/v1/treasury/financial_accounts': { + /**

Returns a list of FinancialAccounts.

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

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccounts'] + } + '/v1/treasury/financial_accounts/{financial_account}': { + /**

Retrieves the details of a FinancialAccount.

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

Updates the details of a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccount'] + } + '/v1/treasury/financial_accounts/{financial_account}/features': { + /**

Retrieves Features information associated with the FinancialAccount.

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

Updates the Features associated with a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccountFeatures'] + } + '/v1/treasury/inbound_transfers': { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

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

Creates an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfers'] + } + '/v1/treasury/inbound_transfers/{id}': { + /**

Retrieves the details of an existing InboundTransfer.

*/ + get: operations['GetTreasuryInboundTransfersId'] + } + '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel': { + /**

Cancels an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfersInboundTransferCancel'] + } + '/v1/treasury/outbound_payments': { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

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

Creates an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPayments'] + } + '/v1/treasury/outbound_payments/{id}': { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + get: operations['GetTreasuryOutboundPaymentsId'] + } + '/v1/treasury/outbound_payments/{id}/cancel': { + /**

Cancel an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPaymentsIdCancel'] + } + '/v1/treasury/outbound_transfers': { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

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

Creates an OutboundTransfer.

*/ + post: operations['PostTreasuryOutboundTransfers'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}': { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + get: operations['GetTreasuryOutboundTransfersOutboundTransfer'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel': { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + post: operations['PostTreasuryOutboundTransfersOutboundTransferCancel'] + } + '/v1/treasury/received_credits': { + /**

Returns a list of ReceivedCredits.

*/ + get: operations['GetTreasuryReceivedCredits'] + } + '/v1/treasury/received_credits/{id}': { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + get: operations['GetTreasuryReceivedCreditsId'] + } + '/v1/treasury/received_debits': { + /**

Returns a list of ReceivedDebits.

*/ + get: operations['GetTreasuryReceivedDebits'] + } + '/v1/treasury/received_debits/{id}': { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + get: operations['GetTreasuryReceivedDebitsId'] + } + '/v1/treasury/transaction_entries': { + /**

Retrieves a list of TransactionEntry objects.

*/ + get: operations['GetTreasuryTransactionEntries'] + } + '/v1/treasury/transaction_entries/{id}': { + /**

Retrieves a TransactionEntry object.

*/ + get: operations['GetTreasuryTransactionEntriesId'] + } + '/v1/treasury/transactions': { + /**

Retrieves a list of Transaction objects.

*/ + get: operations['GetTreasuryTransactions'] + } + '/v1/treasury/transactions/{id}': { + /**

Retrieves the details of an existing Transaction.

*/ + get: operations['GetTreasuryTransactionsId'] + } '/v1/webhook_endpoints': { /**

Returns a list of your webhook endpoints.

*/ get: operations['GetWebhookEndpoints'] @@ -1718,7 +2101,7 @@ export interface components { country?: string /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ created?: number /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1809,6 +2192,11 @@ export interface components { * @enum {string} */ acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + affirm_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1829,6 +2217,16 @@ export interface components { * @enum {string} */ bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + bank_transfer_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + blik_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1884,11 +2282,21 @@ export interface components { * @enum {string} */ klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + konbini_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the legacy payments capability of the account. * @enum {string} */ legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + link_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1899,6 +2307,16 @@ export interface components { * @enum {string} */ p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + paynow_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + promptpay_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1924,6 +2342,16 @@ export interface components { * @enum {string} */ transfers?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + treasury?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + us_bank_account_ach_payments?: 'active' | 'inactive' | 'pending' } & { [key: string]: unknown } /** AccountCapabilityFutureRequirements */ account_capability_future_requirements: { @@ -1986,6 +2414,10 @@ export interface components { decline_on?: components['schemas']['account_decline_charge_on'] /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ statement_descriptor_prefix?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } & { [key: string]: unknown } /** AccountDashboardSettings */ account_dashboard_settings: { @@ -2057,6 +2489,10 @@ export interface components { statement_descriptor_kana?: string | null /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ statement_descriptor_kanji?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } & { [key: string]: unknown } /** AccountPayoutSettings */ account_payout_settings: { @@ -2104,6 +2540,7 @@ export interface components { code: | 'invalid_address_city_state_postal_code' | 'invalid_street_address' + | 'invalid_tos_acceptance' | 'invalid_value_other' | 'verification_document_address_mismatch' | 'verification_document_address_missing' @@ -2167,6 +2604,16 @@ export interface components { payments: components['schemas']['account_payments_settings'] payouts?: components['schemas']['account_payout_settings'] sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + treasury?: components['schemas']['account_treasury_settings'] + } & { [key: string]: unknown } + /** AccountTermsOfService */ + account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string } & { [key: string]: unknown } /** AccountTOSAcceptance */ account_tos_acceptance: { @@ -2182,6 +2629,10 @@ export interface components { /** @description The user agent of the browser from which the account representative accepted their service agreement */ user_agent?: string | null } & { [key: string]: unknown } + /** AccountTreasurySettings */ + account_treasury_settings: { + tos_acceptance?: components['schemas']['account_terms_of_service'] + } & { [key: string]: unknown } /** AccountUnificationAccountController */ account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2207,39 +2658,6 @@ export interface components { /** @description State, county, province, or region. */ state?: string | null } & { [key: string]: unknown } - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: ((string | components['schemas']['customer'] | components['schemas']['deleted_customer']) & { [key: string]: unknown }) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } & { [key: string]: unknown } /** APIErrors */ api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2349,9 +2767,49 @@ export interface components { url: string } & { [key: string]: unknown } } & { [key: string]: unknown } + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + 'apps.secret': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description If true, indicates that this secret has been deleted */ + deleted?: boolean + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apps.secret' + /** @description The plaintext secret value to be stored. */ + payload?: string | null + scope: components['schemas']['secret_service_resource_scope'] + } & { [key: string]: unknown } /** AutomaticTax */ automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ enabled: boolean /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2569,6 +3027,94 @@ export interface components { */ status: string } & { [key: string]: unknown } + /** BankConnectionsResourceAccountholder */ + bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account?: (string | components['schemas']['account']) & { [key: string]: unknown } + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer?: (string | components['schemas']['customer']) & { [key: string]: unknown } + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + type: 'account' | 'customer' + } & { [key: string]: unknown } + /** BankConnectionsResourceBalance */ + bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + as_of: number + cash?: components['schemas']['bank_connections_resource_balance_api_resource_cash_balance'] + credit?: components['schemas']['bank_connections_resource_balance_api_resource_credit_balance'] + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + current: { [key: string]: number } + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + type: 'cash' | 'credit' + } & { [key: string]: unknown } + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + available?: { [key: string]: number } | null + } & { [key: string]: unknown } + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + used?: { [key: string]: number } | null + } & { [key: string]: unknown } + /** BankConnectionsResourceBalanceRefresh */ + bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } & { [key: string]: unknown } + /** BankConnectionsResourceLinkAccountSessionFilters */ + bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + countries?: string[] | null + } & { [key: string]: unknown } + /** BankConnectionsResourceOwnershipRefresh */ + bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } & { [key: string]: unknown } /** billing_details */ billing_details: { /** @description Billing address. */ @@ -2588,7 +3134,9 @@ export interface components { /** @description Whether the configuration is active and can be used to create portal sessions. */ active: boolean /** @description ID of the Connect Application that created the configuration. */ - application?: string | null + application?: + | ((string | components['schemas']['application'] | components['schemas']['deleted_application']) & { [key: string]: unknown }) + | null business_profile: components['schemas']['portal_business_profile'] /** * Format: unix-time @@ -2604,6 +3152,7 @@ export interface components { is_default: boolean /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + login_page: components['schemas']['portal_login_page'] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null /** @@ -2711,101 +3260,10 @@ export interface components { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ on_behalf_of?: string | null /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string + return_url?: string | null /** @description The short-lived URL of the session that gives customers access to the customer portal. */ url: string } & { [key: string]: unknown } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null - } & { [key: string]: unknown } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } & { [key: string]: unknown } /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2905,8 +3363,8 @@ export interface components { * @enum {string} */ object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: ((string | components['schemas']['recipient']) & { [key: string]: unknown }) | null + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + status?: string | null /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ tokenization_method?: string | null } & { [key: string]: unknown } @@ -2927,6 +3385,24 @@ export interface components { } & { [key: string]: unknown } /** card_mandate_payment_method_details */ card_mandate_payment_method_details: { [key: string]: unknown } + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + available?: { [key: string]: number } | null + /** @description The ID of the customer whose cash balance this object represents. */ + customer: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'cash_balance' + settings: components['schemas']['customer_balance_customer_balance_settings'] + } & { [key: string]: unknown } /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2968,6 +3444,8 @@ export interface components { description?: string | null /** @description Whether the charge has been disputed. */ disputed: boolean + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction?: ((string | components['schemas']['balance_transaction']) & { [key: string]: unknown }) | null /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ failure_code?: string | null /** @description Message to user further explaining reason for charge failure if available. */ @@ -2989,8 +3467,6 @@ export interface components { object: 'charge' /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ on_behalf_of?: ((string | components['schemas']['account']) & { [key: string]: unknown }) | null - /** @description ID of the order this charge is for if one exists. */ - order?: ((string | components['schemas']['order']) & { [key: string]: unknown }) | null /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ outcome?: (components['schemas']['charge_outcome'] & { [key: string]: unknown }) | null /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ @@ -3001,6 +3477,7 @@ export interface components { payment_method?: string | null /** @description Details about the payment method at the time of the transaction. */ payment_method_details?: (components['schemas']['payment_method_details'] & { [key: string]: unknown }) | null + radar_options?: components['schemas']['radar_radar_options'] /** @description This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3013,7 +3490,7 @@ export interface components { * RefundList * @description A list of refunds that have been applied to the charge. */ - refunds: { + refunds?: { /** @description Details about each object. */ data: components['schemas']['refund'][] /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3094,7 +3571,7 @@ export interface components { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ 'checkout.session': { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ @@ -3123,6 +3600,11 @@ export interface components { consent?: (components['schemas']['payment_pages_checkout_session_consent'] & { [key: string]: unknown }) | null /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ consent_collection?: (components['schemas']['payment_pages_checkout_session_consent_collection'] & { [key: string]: unknown }) | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null /** @@ -3138,7 +3620,7 @@ export interface components { * @enum {string|null} */ customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ customer_details?: (components['schemas']['payment_pages_checkout_session_customer_details'] & { [key: string]: unknown }) | null /** * @description If provided, this value will be used when the Customer object is created. @@ -3242,6 +3724,11 @@ export interface components { payment_intent?: ((string | components['schemas']['payment_intent']) & { [key: string]: unknown }) | null /** @description The ID of the Payment Link that created this Session. */ payment_link?: ((string | components['schemas']['payment_link']) & { [key: string]: unknown }) | null + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + payment_method_collection?: ('always' | 'if_required') | null /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options?: (components['schemas']['checkout_session_payment_method_options'] & { [key: string]: unknown }) | null /** @@ -3260,16 +3747,16 @@ export interface components { recovered_from?: string | null /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ setup_intent?: ((string | components['schemas']['setup_intent']) & { [key: string]: unknown }) | null - /** @description Shipping information for this Checkout Session. */ - shipping?: (components['schemas']['shipping'] & { [key: string]: unknown }) | null /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: | (components['schemas']['payment_pages_checkout_session_shipping_address_collection'] & { [key: string]: unknown }) | null + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: (components['schemas']['payment_pages_checkout_session_shipping_cost'] & { [key: string]: unknown }) | null + /** @description Shipping information for this Checkout Session. */ + shipping_details?: (components['schemas']['shipping'] & { [key: string]: unknown }) | null /** @description The shipping rate options applied to this Session. */ shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: ((string | components['schemas']['shipping_rate']) & { [key: string]: unknown }) | null /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3293,7 +3780,10 @@ export interface components { tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] /** @description Tax and discount details for the computed total amount. */ total_details?: (components['schemas']['payment_pages_checkout_session_total_details'] & { [key: string]: unknown }) | null - /** @description The URL to the Checkout Session. */ + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ url?: string | null } & { [key: string]: unknown } /** CheckoutAcssDebitMandateOptions */ @@ -3323,27 +3813,359 @@ export interface components { */ currency?: 'cad' | 'usd' mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } + /** CheckoutAffirmPaymentMethodOptions */ + checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutAlipayPaymentMethodOptions */ + checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutAuBecsDebitPaymentMethodOptions */ + checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutBacsDebitPaymentMethodOptions */ + checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** CheckoutBancontactPaymentMethodOptions */ + checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** CheckoutBoletoPaymentMethodOptions */ checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** CheckoutCardInstallmentsOptions */ + checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + enabled?: boolean + } & { [key: string]: unknown } + /** CheckoutCardPaymentMethodOptions */ + checkout_card_payment_method_options: { + installments?: components['schemas']['checkout_card_installments_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string + } & { [key: string]: unknown } + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + checkout_customer_balance_bank_transfer_payment_method_options: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } & { [key: string]: unknown } + /** CheckoutCustomerBalancePaymentMethodOptions */ + checkout_customer_balance_payment_method_options: { + bank_transfer?: components['schemas']['checkout_customer_balance_bank_transfer_payment_method_options'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutEpsPaymentMethodOptions */ + checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutFpxPaymentMethodOptions */ + checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutGiropayPaymentMethodOptions */ + checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutGrabPayPaymentMethodOptions */ + checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutIdealPaymentMethodOptions */ + checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutKlarnaPaymentMethodOptions */ + checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** CheckoutKonbiniPaymentMethodOptions */ + checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } & { [key: string]: unknown } /** CheckoutOxxoPaymentMethodOptions */ checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutP24PaymentMethodOptions */ + checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutPaynowPaymentMethodOptions */ + checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutPixPaymentMethodOptions */ + checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + expires_after_seconds?: number | null + } & { [key: string]: unknown } + /** CheckoutSepaDebitPaymentMethodOptions */ + checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } & { [key: string]: unknown } /** CheckoutSessionPaymentMethodOptions */ checkout_session_payment_method_options: { acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + affirm?: components['schemas']['checkout_affirm_payment_method_options'] + afterpay_clearpay?: components['schemas']['checkout_afterpay_clearpay_payment_method_options'] + alipay?: components['schemas']['checkout_alipay_payment_method_options'] + au_becs_debit?: components['schemas']['checkout_au_becs_debit_payment_method_options'] + bacs_debit?: components['schemas']['checkout_bacs_debit_payment_method_options'] + bancontact?: components['schemas']['checkout_bancontact_payment_method_options'] boleto?: components['schemas']['checkout_boleto_payment_method_options'] + card?: components['schemas']['checkout_card_payment_method_options'] + customer_balance?: components['schemas']['checkout_customer_balance_payment_method_options'] + eps?: components['schemas']['checkout_eps_payment_method_options'] + fpx?: components['schemas']['checkout_fpx_payment_method_options'] + giropay?: components['schemas']['checkout_giropay_payment_method_options'] + grabpay?: components['schemas']['checkout_grab_pay_payment_method_options'] + ideal?: components['schemas']['checkout_ideal_payment_method_options'] + klarna?: components['schemas']['checkout_klarna_payment_method_options'] + konbini?: components['schemas']['checkout_konbini_payment_method_options'] oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + p24?: components['schemas']['checkout_p24_payment_method_options'] + paynow?: components['schemas']['checkout_paynow_payment_method_options'] + pix?: components['schemas']['checkout_pix_payment_method_options'] + sepa_debit?: components['schemas']['checkout_sepa_debit_payment_method_options'] + sofort?: components['schemas']['checkout_sofort_payment_method_options'] + us_bank_account?: components['schemas']['checkout_us_bank_account_payment_method_options'] + } & { [key: string]: unknown } + /** CheckoutSofortPaymentMethodOptions */ + checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** CheckoutUsBankAccountPaymentMethodOptions */ + checkout_us_bank_account_payment_method_options: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' } & { [key: string]: unknown } /** ConnectCollectionTransfer */ connect_collection_transfer: { @@ -3407,8 +4229,8 @@ export interface components { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3421,6 +4243,8 @@ export interface components { created: number /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ currency?: string | null + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['coupon_currency_option'] } /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3460,6 +4284,11 @@ export interface components { /** @description A list of product IDs this coupon applies to */ products: string[] } & { [key: string]: unknown } + /** CouponCurrencyOption */ + coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: number + } & { [key: string]: unknown } /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3534,12 +4363,16 @@ export interface components { * @enum {string} */ status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ subtotal: number + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + subtotal_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ tax_amounts: components['schemas']['credit_note_tax_amount'][] /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ total: number + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax?: number | null /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3555,6 +4388,8 @@ export interface components { credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Description of the item being credited. */ description?: string | null /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3590,6 +4425,11 @@ export interface components { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } & { [key: string]: unknown } /** CreditNoteTaxAmount */ credit_note_tax_amount: { @@ -3600,6 +4440,34 @@ export interface components { /** @description The tax rate that was applied to get this tax amount. */ tax_rate: (string | components['schemas']['tax_rate']) & { [key: string]: unknown } } & { [key: string]: unknown } + /** CurrencyOption */ + currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: (components['schemas']['custom_unit_amount'] & { [key: string]: unknown }) | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['price_tier'][] + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null + } & { [key: string]: unknown } + /** CustomUnitAmount */ + custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + maximum?: number | null + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum?: number | null + /** @description The starting unit amount which can be updated by the customer. */ + preset?: number | null + } & { [key: string]: unknown } /** * Customer * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -3611,6 +4479,8 @@ export interface components { address?: (components['schemas']['address'] & { [key: string]: unknown }) | null /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ balance?: number + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + cash_balance?: (components['schemas']['cash_balance'] & { [key: string]: unknown }) | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3624,14 +4494,9 @@ 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?: - | (( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) & { [key: string]: unknown }) + | ((string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) & { + [key: string]: unknown + }) | null /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. @@ -3647,6 +4512,8 @@ export interface components { email?: string | null /** @description Unique identifier for the object. */ id: string + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + invoice_credit_balance?: { [key: string]: number } /** @description The prefix for the customer used to generate unique invoice numbers. */ invoice_prefix?: string | null invoice_settings?: components['schemas']['invoice_setting_customer_setting'] @@ -3675,13 +4542,9 @@ export interface components { */ sources?: { /** @description Details about each object. */ - data: (( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) & { [key: string]: unknown })[] + data: ((components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) & { + [key: string]: unknown + })[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -3732,6 +4595,8 @@ export interface components { /** @description The URL where this list can be accessed. */ url: string } & { [key: string]: unknown } + /** @description ID of the test clock this customer belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** customer_acceptance */ customer_acceptance: { @@ -3748,6 +4613,53 @@ export interface components { */ type: 'offline' | 'online' } & { [key: string]: unknown } + /** CustomerBalanceCustomerBalanceSettings */ + customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + reconciliation_mode: 'automatic' | 'manual' + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: (string | components['schemas']['payment_intent']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + bank_transfer: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer'] + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + eu_bank_transfer?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer'] + /** @description The user-supplied reference field on the bank transfer. */ + reference?: string | null + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + bic?: string | null + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4?: string | null + /** @description The full name of the sender, as supplied by the sending bank. */ + sender_name?: string | null + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: (string | components['schemas']['refund']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: (string | components['schemas']['payment_intent']) & { [key: string]: unknown } + } & { [key: string]: unknown } /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3803,6 +4715,46 @@ export interface components { | 'unapplied_from_invoice' | 'unspent_receiver_credit' } & { [key: string]: unknown } + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + customer_cash_balance_transaction: { + applied_to_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer whose available cash balance changed as a result of this transaction. */ + customer: (string | components['schemas']['customer']) & { [key: string]: unknown } + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + ending_balance: number + funded?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + net_amount: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_cash_balance_transaction' + refunded_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction'] + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + type: 'applied_to_payment' | 'funded' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'unapplied_from_payment' + unapplied_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction'] + } & { [key: string]: unknown } /** CustomerTax */ customer_tax: { /** @@ -3842,8 +4794,8 @@ export interface components { */ object: 'account' } & { [key: string]: unknown } - /** AlipayDeletedAccount */ - deleted_alipay_account: { + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3855,10 +4807,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'alipay_account' + object: 'apple_pay_domain' } & { [key: string]: unknown } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { + /** DeletedApplication */ + deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3866,11 +4818,13 @@ export interface components { deleted: true /** @description Unique identifier for the object. */ id: string + /** @description The name of the application. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'apple_pay_domain' + object: 'application' } & { [key: string]: unknown } /** DeletedBankAccount */ deleted_bank_account: { @@ -3889,21 +4843,6 @@ export interface components { */ object: 'bank_account' } & { [key: string]: unknown } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } & { [key: string]: unknown } /** DeletedCard */ deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4017,12 +4956,7 @@ export interface components { object: 'invoiceitem' } & { [key: string]: unknown } /** Polymorphic */ - deleted_payment_source: ( - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] - ) & { [key: string]: unknown } + deleted_payment_source: (components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card']) & { [key: string]: unknown } /** DeletedPerson */ deleted_person: { /** @@ -4113,8 +5047,8 @@ export interface components { */ object: 'radar.value_list_item' } & { [key: string]: unknown } - /** DeletedTransferRecipient */ - deleted_recipient: { + /** DeletedSku */ + deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4126,10 +5060,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'recipient' + object: 'sku' } & { [key: string]: unknown } - /** DeletedSku */ - deleted_sku: { + /** DeletedSubscriptionItem */ + deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4141,10 +5075,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'sku' + object: 'subscription_item' } & { [key: string]: unknown } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { + /** deleted_tax_id */ + deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4156,10 +5090,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'subscription_item' + object: 'tax_id' } & { [key: string]: unknown } - /** deleted_tax_id */ - deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + 'deleted_terminal.configuration': { /** * @description Always true for a deleted object * @enum {boolean} @@ -4171,7 +5105,7 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'tax_id' + object: 'terminal.configuration' } & { [key: string]: unknown } /** TerminalLocationDeletedLocation */ 'deleted_terminal.location': { @@ -4203,6 +5137,21 @@ export interface components { */ object: 'terminal.reader' } & { [key: string]: unknown } + /** DeletedTestClock */ + 'deleted_test_helpers.test_clock': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'test_helpers.test_clock' + } & { [key: string]: unknown } /** NotificationWebhookEndpointDeleted */ deleted_webhook_endpoint: { /** @@ -4218,22 +5167,10 @@ export interface components { */ object: 'webhook_endpoint' } & { [key: string]: unknown } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } & { [key: string]: unknown } /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4404,6 +5341,16 @@ export interface components { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number } & { [key: string]: unknown } + /** EmailSent */ + email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + email_sent_at: number + /** @description The recipient's email address. */ + email_sent_to: string + } & { [key: string]: unknown } /** EphemeralKey */ ephemeral_key: { /** @@ -4631,6 +5578,7 @@ export interface components { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** @description The size in bytes of the file object. */ size: number /** @description A user friendly title for the document. */ @@ -4675,6 +5623,175 @@ export interface components { /** @description The publicly accessible URL to download the file. */ url?: string | null } & { [key: string]: unknown } + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + 'financial_connections.account': { + /** @description The account holder that this account belongs to. */ + account_holder?: (components['schemas']['bank_connections_resource_accountholder'] & { [key: string]: unknown }) | null + /** @description The most recent information about the account's balance. */ + balance?: (components['schemas']['bank_connections_resource_balance'] & { [key: string]: unknown }) | null + /** @description The state of the most recent attempt to refresh the account balance. */ + balance_refresh?: (components['schemas']['bank_connections_resource_balance_refresh'] & { [key: string]: unknown }) | null + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + category: 'cash' | 'credit' | 'investment' | 'other' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the institution that holds this account. */ + institution_name: string + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account' + /** @description The most recent information about the account's owners. */ + ownership?: ((string | components['schemas']['financial_connections.account_ownership']) & { [key: string]: unknown }) | null + /** @description The state of the most recent attempt to refresh the account owners. */ + ownership_refresh?: (components['schemas']['bank_connections_resource_ownership_refresh'] & { [key: string]: unknown }) | null + /** @description The list of permissions granted by this account. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] | null + /** + * @description The status of the link to the account. + * @enum {string} + */ + status: 'active' | 'disconnected' | 'inactive' + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + subcategory: 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings' + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + supported_payment_method_types: ('link' | 'us_bank_account')[] + } & { [key: string]: unknown } + /** BankConnectionsResourceOwner */ + 'financial_connections.account_owner': { + /** @description The email address of the owner. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The full name of the owner. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_owner' + /** @description The ownership object that this owner belongs to. */ + ownership: string + /** @description The raw phone number of the owner. */ + phone?: string | null + /** @description The raw physical address of the owner. */ + raw_address?: string | null + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + refreshed_at?: number | null + } & { [key: string]: unknown } + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + 'financial_connections.account_ownership': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_ownership' + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + owners: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + 'financial_connections.session': { + /** @description The account holder for whom accounts are collected in this session. */ + account_holder?: (components['schemas']['bank_connections_resource_accountholder'] & { [key: string]: unknown }) | null + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + accounts: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + /** @description A value that will be passed to the client to launch the authentication flow. */ + client_secret: string + filters?: components['schemas']['bank_connections_resource_link_account_session_filters'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.session' + /** @description Permissions requested for accounts collected during this session. */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } & { [key: string]: unknown } /** FinancialReportingFinanceReportRunRunParameters */ financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4700,6 +5817,118 @@ export interface components { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ timezone?: string } & { [key: string]: unknown } + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + funding_instructions: { + bank_transfer: components['schemas']['funding_instructions_bank_transfer'] + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + funding_type: 'bank_transfer' + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'funding_instructions' + } & { [key: string]: unknown } + /** FundingInstructionsBankTransfer */ + funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + country: string + /** @description A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** + * @description The bank_transfer type + * @enum {string} + */ + type: 'eu_bank_transfer' | 'jp_bank_transfer' + } & { [key: string]: unknown } + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + funding_instructions_bank_transfer_financial_address: { + iban?: components['schemas']['funding_instructions_bank_transfer_iban_record'] + sort_code?: components['schemas']['funding_instructions_bank_transfer_sort_code_record'] + spei?: components['schemas']['funding_instructions_bank_transfer_spei_record'] + /** @description The payment networks supported by this FinancialAddress */ + supported_networks?: ('bacs' | 'fps' | 'sepa' | 'spei' | 'zengin')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'iban' | 'sort_code' | 'spei' | 'zengin' + zengin?: components['schemas']['funding_instructions_bank_transfer_zengin_record'] + } & { [key: string]: unknown } + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The BIC/SWIFT code of the account. */ + bic: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** @description The IBAN of the account. */ + iban: string + } & { [key: string]: unknown } + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The account number */ + account_number: string + /** @description The six-digit sort code */ + sort_code: string + } & { [key: string]: unknown } + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + bank_code: string + /** @description The short banking institution name */ + bank_name: string + /** @description The CLABE number */ + clabe: string + } & { [key: string]: unknown } + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + account_holder_name?: string | null + /** @description The account number */ + account_number?: string | null + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null + /** @description The bank code of the account */ + bank_code?: string | null + /** @description The bank name of the account */ + bank_name?: string | null + /** @description The branch code of the account */ + branch_code?: string | null + /** @description The branch name of the account */ + branch_name?: string | null + } & { [key: string]: unknown } /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -5004,7 +6233,7 @@ export interface components { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5050,6 +6279,42 @@ export interface components { /** @description The user’s verified data. */ verified_outputs?: (components['schemas']['gelato_verified_outputs'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } + /** InboundTransfers */ + inbound_transfers: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['inbound_transfers_payment_method_details_us_bank_account'] + } & { [key: string]: unknown } + /** inbound_transfers_payment_method_details_us_bank_account */ + inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + network: 'ach' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } & { [key: string]: unknown } /** * Invoice * @description Invoices are statements of amounts owed by a customer, and are either @@ -5096,8 +6361,12 @@ export interface components { amount_due: number /** @description The amount, in %s, that was paid. */ amount_paid: number - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ amount_remaining: number + /** @description ID of the Connect Application that created the invoice. */ + application?: + | ((string | components['schemas']['application'] | components['schemas']['deleted_application']) & { [key: string]: unknown }) + | null /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ application_fee_amount?: number | null /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5163,14 +6432,9 @@ export interface components { default_payment_method?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ default_source?: - | (( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) & { [key: string]: unknown }) + | ((string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) & { + [key: string]: unknown + }) | null /** @description The tax rates applied to this invoice, if any. */ default_tax_rates: components['schemas']['tax_rate'][] @@ -5189,6 +6453,8 @@ export interface components { ending_balance?: number | null /** @description Footer displayed on the invoice. */ footer?: string | null + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice?: (components['schemas']['invoices_from_invoice'] & { [key: string]: unknown }) | null /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ hosted_invoice_url?: string | null /** @description Unique identifier for the object. */ @@ -5197,6 +6463,8 @@ export interface components { invoice_pdf?: string | null /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ last_finalization_error?: (components['schemas']['api_errors'] & { [key: string]: unknown }) | null + /** @description The ID of the most recent non-draft revision of this invoice */ + latest_revision?: ((string | components['schemas']['invoice']) & { [key: string]: unknown }) | null /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5257,6 +6525,8 @@ export interface components { quote?: ((string | components['schemas']['quote']) & { [key: string]: unknown }) | null /** @description This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number?: string | null + /** @description Options for invoice PDF rendering. */ + rendering_options?: (components['schemas']['invoice_setting_rendering_options'] & { [key: string]: unknown }) | null /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ starting_balance: number /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5271,15 +6541,21 @@ export interface components { subscription?: ((string | components['schemas']['subscription']) & { [key: string]: unknown }) | null /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ subtotal: number + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal_excluding_tax?: number | null /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ tax?: number | null + /** @description ID of the test clock this invoice belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null threshold_reason?: components['schemas']['invoice_threshold_reason'] /** @description Total after discounts and taxes. */ total: number /** @description The aggregate amounts calculated per discount across all line items. */ total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + total_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ total_tax_amounts: components['schemas']['invoice_tax_amount'][] /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ @@ -5290,6 +6566,11 @@ export interface components { */ webhooks_delivered_at?: number | null } & { [key: string]: unknown } + /** invoice_installments_card */ + invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + enabled?: boolean | null + } & { [key: string]: unknown } /** InvoiceItemThresholdReason */ invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5301,12 +6582,12 @@ export interface components { invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ end: number /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ start: number } & { [key: string]: unknown } @@ -5349,12 +6630,52 @@ export interface components { } & { [key: string]: unknown } /** invoice_payment_method_options_card */ invoice_payment_method_options_card: { + installments?: components['schemas']['invoice_installments_card'] /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic') | null } & { [key: string]: unknown } + /** invoice_payment_method_options_customer_balance */ + invoice_payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + } & { [key: string]: unknown } + /** invoice_payment_method_options_customer_balance_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer'] + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + type?: string | null + } & { [key: string]: unknown } + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } & { [key: string]: unknown } + /** invoice_payment_method_options_konbini */ + invoice_payment_method_options_konbini: { [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account */ + invoice_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['invoice_payment_method_options_us_bank_account_linked_account_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } /** InvoiceSettingCustomField */ invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5370,12 +6691,19 @@ export interface components { default_payment_method?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null /** @description Default footer to be displayed on invoices for this customer. */ footer?: string | null + /** @description Default options for invoice PDF rendering for this customer. */ + rendering_options?: (components['schemas']['invoice_setting_rendering_options'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** InvoiceSettingQuoteSetting */ invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number | null } & { [key: string]: unknown } + /** InvoiceSettingRenderingOptions */ + invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display?: string | null + } & { [key: string]: unknown } /** InvoiceSettingSubscriptionScheduleSetting */ invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5458,6 +6786,8 @@ export interface components { subscription_item?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: components['schemas']['tax_rate'][] | null + /** @description ID of the test clock this invoice item belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null /** @description Unit amount (in the `currency` specified) of the invoice item. */ unit_amount?: number | null /** @@ -5466,6 +6796,25 @@ export interface components { */ unit_amount_decimal?: string | null } & { [key: string]: unknown } + /** InvoicesFromInvoice */ + invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + action: string + /** @description The invoice that was cloned. */ + invoice: (string | components['schemas']['invoice']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** InvoicesLineItemsCreditedItems */ + invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + invoice: string + /** @description Credited invoice line items */ + invoice_line_items: string[] + } & { [key: string]: unknown } + /** InvoicesLineItemsProrationDetails */ + invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items?: (components['schemas']['invoices_line_items_credited_items'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } /** InvoicesPaymentMethodOptions */ invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ @@ -5474,9 +6823,17 @@ export interface components { bancontact?: (components['schemas']['invoice_payment_method_options_bancontact'] & { [key: string]: unknown }) | null /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ card?: (components['schemas']['invoice_payment_method_options_card'] & { [key: string]: unknown }) | null + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + customer_balance?: (components['schemas']['invoice_payment_method_options_customer_balance'] & { [key: string]: unknown }) | null + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini?: (components['schemas']['invoice_payment_method_options_konbini'] & { [key: string]: unknown }) | null + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + us_bank_account?: (components['schemas']['invoice_payment_method_options_us_bank_account'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** InvoicesPaymentSettings */ invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + default_mandate?: string | null /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ payment_method_options?: (components['schemas']['invoices_payment_method_options'] & { [key: string]: unknown }) | null /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ @@ -5490,12 +6847,18 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null @@ -5503,13 +6866,14 @@ export interface components { /** InvoicesResourceInvoiceTaxID */ invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -5521,10 +6885,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -5544,6 +6910,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -5576,38 +6943,6 @@ export interface components { */ voided_at?: number | null } & { [key: string]: unknown } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: (string | components['schemas']['charge']) & { [key: string]: unknown } - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } & { [key: string]: unknown } /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5667,6 +7002,8 @@ export interface components { status: 'closed' | 'pending' | 'reversed' /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ transactions: components['schemas']['issuing.transaction'][] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + treasury?: (components['schemas']['issuing_authorization_treasury'] & { [key: string]: unknown }) | null verification_data: components['schemas']['issuing_authorization_verification_data'] /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null @@ -5682,14 +7019,14 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: ('lost' | 'stolen') | null + cancellation_reason?: ('design_rejected' | 'lost' | 'stolen') | null cardholder: components['schemas']['issuing.cardholder'] /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ currency: string /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ cvc?: string @@ -5697,6 +7034,8 @@ export interface components { exp_month: number /** @description The expiration year of the card. */ exp_year: number + /** @description The financial account this card is attached to. */ + financial_account?: string | null /** @description Unique identifier for the object. */ id: string /** @description The last 4 digits of the card number. */ @@ -5792,7 +7131,7 @@ export interface components { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number /** @description List of balance transactions associated with the dispute. */ balance_transactions?: components['schemas']['balance_transaction'][] | null @@ -5822,6 +7161,8 @@ export interface components { status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' /** @description The transaction being disputed. */ transaction: (string | components['schemas']['issuing.transaction']) & { [key: string]: unknown } + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: (components['schemas']['issuing_dispute_treasury'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** * IssuingSettlement @@ -5918,6 +7259,8 @@ export interface components { object: 'issuing.transaction' /** @description Additional purchase information that is optionally provided by the merchant. */ purchase_details?: (components['schemas']['issuing_transaction_purchase_details'] & { [key: string]: unknown }) | null + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: (components['schemas']['issuing_transaction_treasury'] & { [key: string]: unknown }) | null /** * @description The nature of the transaction. * @enum {string} @@ -6006,6 +7349,15 @@ export interface components { | 'webhook_declined' | 'webhook_timeout' } & { [key: string]: unknown } + /** IssuingAuthorizationTreasury */ + issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: string[] + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: string[] + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction?: string | null + } & { [key: string]: unknown } /** IssuingAuthorizationVerificationData */ issuing_authorization_verification_data: { /** @@ -6650,6 +8002,8 @@ export interface components { * @enum {string|null} */ carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** @description Additional information that may be required for clearing customs. */ + customs?: (components['schemas']['issuing_card_shipping_customs'] & { [key: string]: unknown }) | null /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6657,6 +8011,10 @@ export interface components { eta?: number | null /** @description Recipient name. */ name: string + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + phone_number?: string | null + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + require_signature?: boolean | null /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -6677,9 +8035,14 @@ export interface components { */ type: 'bulk' | 'individual' } & { [key: string]: unknown } + /** IssuingCardShippingCustoms */ + issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + eori_number?: string | null + } & { [key: string]: unknown } /** IssuingCardSpendingLimit */ issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -7638,7 +9001,7 @@ export interface components { } & { [key: string]: unknown } /** IssuingCardholderSpendingLimit */ issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -8095,6 +9458,13 @@ export interface components { */ received_at?: number | null } & { [key: string]: unknown } + /** IssuingDisputeTreasury */ + issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: string + } & { [key: string]: unknown } /** IssuingTransactionAmountDetails */ issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8176,13 +9546,24 @@ export interface components { /** @description The unit cost of the item in cents. */ unit_cost?: number | null } & { [key: string]: unknown } + /** IssuingTransactionTreasury */ + issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + received_credit?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + received_debit?: string | null + } & { [key: string]: unknown } /** * LineItem * @description A line item. */ item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: number /** @description Total before any discounts or taxes are applied. */ amount_subtotal: number + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: number /** @description Total after discounts and taxes. */ amount_total: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8200,6 +9581,12 @@ export interface components { object: 'item' /** @description The price used to generate the line item. */ price?: (components['schemas']['price'] & { [key: string]: unknown }) | null + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + product?: (string | components['schemas']['product'] | components['schemas']['deleted_product']) & { [key: string]: unknown } /** @description The quantity of products being purchased. */ quantity?: number | null /** @description The taxes applied to the line item. */ @@ -8342,6 +9729,8 @@ export interface components { line_item: { /** @description The amount, in %s. */ amount: number + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8370,6 +9759,8 @@ export interface components { price?: (components['schemas']['price'] & { [key: string]: unknown }) | null /** @description Whether this is a proration. */ proration: boolean + /** @description Additional details for proration line items */ + proration_details?: (components['schemas']['invoices_line_items_proration_details'] & { [key: string]: unknown }) | null /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ quantity?: number | null /** @description The subscription that the invoice item pertains to, if any. */ @@ -8385,6 +9776,11 @@ export interface components { * @enum {string} */ type: 'invoiceitem' | 'subscription' + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } & { [key: string]: unknown } /** LineItemsDiscountAmount */ line_items_discount_amount: { @@ -8398,6 +9794,13 @@ export interface components { amount: number rate: components['schemas']['tax_rate'] } & { [key: string]: unknown } + /** linked_account_options_us_bank_account */ + linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } & { [key: string]: unknown } /** LoginLink */ login_link: { /** @@ -8478,17 +9881,50 @@ export interface components { /** @description The URL that will contain the mandate that the customer has signed. */ url: string } & { [key: string]: unknown } + /** mandate_blik */ + mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } & { [key: string]: unknown } + /** mandate_link */ + mandate_link: { [key: string]: unknown } /** mandate_multi_use */ mandate_multi_use: { [key: string]: unknown } + /** mandate_options_off_session_details_blik */ + mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + amount?: number | null + /** @description Currency of each recurring payment. */ + currency?: string | null + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + interval?: ('day' | 'month' | 'week' | 'year') | null + /** @description Frequency indicator of each recurring payment. */ + interval_count?: number | null + } & { [key: string]: unknown } /** mandate_payment_method_details */ mandate_payment_method_details: { acss_debit?: components['schemas']['mandate_acss_debit'] au_becs_debit?: components['schemas']['mandate_au_becs_debit'] bacs_debit?: components['schemas']['mandate_bacs_debit'] + blik?: components['schemas']['mandate_blik'] card?: components['schemas']['card_mandate_payment_method_details'] + link?: components['schemas']['mandate_link'] sepa_debit?: components['schemas']['mandate_sepa_debit'] /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['mandate_us_bank_account'] } & { [key: string]: unknown } /** mandate_sepa_debit */ mandate_sepa_debit: { @@ -8504,6 +9940,8 @@ export interface components { /** @description On a single use mandate, the currency of the payment. */ currency: string } & { [key: string]: unknown } + /** mandate_us_bank_account */ + mandate_us_bank_account: { [key: string]: unknown } /** networks */ networks: { /** @description All available networks for the card. */ @@ -8535,24 +9973,33 @@ export interface components { user_agent?: string | null } & { [key: string]: unknown } /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: ((string | components['schemas']['charge']) & { [key: string]: unknown }) | null + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + amount_subtotal: number + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + amount_total: number + /** @description ID of the Connect application that created the Order, if any. */ + application?: ((string | components['schemas']['application']) & { [key: string]: unknown }) | null + automatic_tax?: components['schemas']['orders_v2_resource_automatic_tax'] + /** @description Customer billing details associated with the order. */ + billing_details?: (components['schemas']['orders_v2_resource_billing_details'] & { [key: string]: unknown }) | null + /** @description The fields on the Order that can be updated from the client */ + client_permissions?: (components['schemas']['orders_v2_resource_client_permissions'] & { [key: string]: unknown }) | null + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + client_secret?: string | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8560,16 +10007,33 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ customer?: ((string | components['schemas']['customer'] | components['schemas']['deleted_customer']) & { [key: string]: unknown }) | null - /** @description The email address of the customer placing the order. */ - email?: string | null - /** @description External coupon code to load for this order. */ - external_coupon_code?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + discounts?: ((string | components['schemas']['discount']) & { [key: string]: unknown })[] | null /** @description Unique identifier for the object. */ id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components['schemas']['order_item'][] + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + ip_address?: string | null + /** + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + */ + line_items?: { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -8579,101 +10043,381 @@ export interface components { * @enum {string} */ object: 'order' + payment: components['schemas']['orders_v2_resource_payment'] + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: (components['schemas']['orders_v2_resource_shipping_cost'] & { [key: string]: unknown }) | null + /** @description Customer shipping information associated with the order. */ + shipping_details?: (components['schemas']['orders_v2_resource_shipping_details'] & { [key: string]: unknown }) | null /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * @description The overall status of the order. + * @enum {string} */ - returns?: - | ({ - /** @description Details about each object. */ - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown }) + status: 'canceled' | 'complete' | 'open' | 'processing' | 'submitted' + tax_details?: components['schemas']['orders_v2_resource_tax_details'] + total_details: components['schemas']['orders_v2_resource_total_details'] + } & { [key: string]: unknown } + /** orders_payment_method_options_afterpay_clearpay */ + orders_payment_method_options_afterpay_clearpay: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + reference?: string | null + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** OrdersV2ResourceAutomaticPaymentMethods */ + orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + enabled: boolean + } & { [key: string]: unknown } + /** OrdersV2ResourceAutomaticTax */ + orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + enabled: boolean + /** + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} + */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } & { [key: string]: unknown } + /** OrdersV2ResourceBillingDetails */ + orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + /** @description Email address for the order. */ + email?: string | null + /** @description Full name for the order. */ + name?: string | null + /** @description Billing phone number for the order (including extension). */ + phone?: string | null + } & { [key: string]: unknown } + /** OrdersV2ResourceCardPaymentMethodOptions */ + orders_v2_resource_card_payment_method_options: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** OrdersV2ResourceClientPermissions */ + orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + billing_details?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + promotion_codes?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + shipping_details?: ('allow' | 'disallow') | null + } & { [key: string]: unknown } + /** OrdersV2ResourcePayment */ + orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + payment_intent?: ((string | components['schemas']['payment_intent']) & { [key: string]: unknown }) | null + /** @description Settings describing how the order should configure generated PaymentIntents. */ + settings?: (components['schemas']['orders_v2_resource_payment_settings'] & { [key: string]: unknown }) | null + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + status?: + | ( + | 'canceled' + | 'complete' + | 'not_required' + | 'processing' + | 'requires_action' + | 'requires_capture' + | 'requires_confirmation' + | 'requires_payment_method' + ) | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: (components['schemas']['shipping'] & { [key: string]: unknown }) | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - /** @description The timestamps at which the order status was updated. */ - status_transitions?: (components['schemas']['status_transitions'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** OrdersV2ResourcePaymentMethodOptions */ + orders_v2_resource_payment_method_options: { + acss_debit?: components['schemas']['payment_intent_payment_method_options_acss_debit'] + afterpay_clearpay?: components['schemas']['orders_payment_method_options_afterpay_clearpay'] + alipay?: components['schemas']['payment_method_options_alipay'] + bancontact?: components['schemas']['payment_method_options_bancontact'] + card?: components['schemas']['orders_v2_resource_card_payment_method_options'] + customer_balance?: components['schemas']['payment_method_options_customer_balance'] + ideal?: components['schemas']['payment_method_options_ideal'] + klarna?: components['schemas']['payment_method_options_klarna'] + link?: components['schemas']['payment_intent_payment_method_options_link'] + oxxo?: components['schemas']['payment_method_options_oxxo'] + p24?: components['schemas']['payment_method_options_p24'] + paypal?: components['schemas']['payment_method_options_paypal'] + sepa_debit?: components['schemas']['payment_intent_payment_method_options_sepa_debit'] + sofort?: components['schemas']['payment_method_options_sofort'] + wechat_pay?: components['schemas']['payment_method_options_wechat_pay'] + } & { [key: string]: unknown } + /** OrdersV2ResourcePaymentSettings */ + orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + automatic_payment_methods?: (components['schemas']['orders_v2_resource_automatic_payment_methods'] & { [key: string]: unknown }) | null + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + payment_method_options?: (components['schemas']['orders_v2_resource_payment_method_options'] & { [key: string]: unknown }) | null + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + /** @description The URL to redirect the customer to after they authenticate their payment. */ + return_url?: string | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + transfer_data?: (components['schemas']['orders_v2_resource_transfer_data'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** OrdersV2ResourceShippingCost */ + orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: ((string | components['schemas']['shipping_rate']) & { [key: string]: unknown }) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } & { [key: string]: unknown } + /** OrdersV2ResourceShippingDetails */ + orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + /** @description Recipient name. */ + name?: string | null + /** @description Recipient phone (including extension). */ + phone?: string | null + } & { [key: string]: unknown } + /** OrdersV2ResourceTaxDetails */ + orders_v2_resource_tax_details: { /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} */ - updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string + tax_exempt: 'exempt' | 'none' | 'reverse' + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + tax_ids: components['schemas']['orders_v2_resource_tax_details_resource_tax_id'][] } & { [key: string]: unknown } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + orders_v2_resource_tax_details_resource_tax_id: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: ((string | components['schemas']['sku']) & { [key: string]: unknown }) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null } & { [key: string]: unknown } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number + /** OrdersV2ResourceTotalDetails */ + orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + amount_discount: number + /** @description This is the sum of all the shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['orders_v2_resource_total_details_api_resource_breakdown'] + } & { [key: string]: unknown } + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } & { [key: string]: unknown } + /** OrdersV2ResourceTransferData */ + orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + amount?: number | null + /** @description ID of the Connected account receiving the transfer. */ + destination: (string | components['schemas']['account']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** OutboundPaymentsPaymentMethodDetails */ + outbound_payments_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['outbound_payments_payment_method_details_financial_account'] /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ + type: 'financial_account' | 'us_bank_account' + us_bank_account?: components['schemas']['outbound_payments_payment_method_details_us_bank_account'] + } & { [key: string]: unknown } + /** outbound_payments_payment_method_details_financial_account */ + outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ id: string - /** @description The items included in this order return. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails used to send funds. * @enum {string} */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: ((string | components['schemas']['order']) & { [key: string]: unknown }) | null - /** @description The ID of the refund issued for this return. */ - refund?: ((string | components['schemas']['refund']) & { [key: string]: unknown }) | null + network: 'stripe' + } & { [key: string]: unknown } + /** outbound_payments_payment_method_details_us_bank_account */ + outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } & { [key: string]: unknown } + /** OutboundTransfersPaymentMethodDetails */ + outbound_transfers_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['outbound_transfers_payment_method_details_us_bank_account'] + } & { [key: string]: unknown } + /** outbound_transfers_payment_method_details_us_bank_account */ + outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null } & { [key: string]: unknown } /** PackageDimensions */ package_dimensions: { @@ -8686,11 +10430,25 @@ export interface components { /** @description Width, in inches. */ width: number } & { [key: string]: unknown } + /** PaymentFlowsAmountDetails */ + payment_flows_amount_details: { + tip?: components['schemas']['payment_flows_amount_details_resource_tip'] + } & { [key: string]: unknown } + /** PaymentFlowsAmountDetailsResourceTip */ + payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + amount?: number + } & { [key: string]: unknown } /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ enabled: boolean } & { [key: string]: unknown } + /** PaymentFlowsInstallmentOptions */ + payment_flows_installment_options: { + enabled: boolean + plan?: components['schemas']['payment_method_details_card_installments_plan'] + } & { [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipay */ payment_flows_private_payment_methods_alipay: { [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -8730,6 +10488,7 @@ export interface components { amount: number /** @description Amount that can be captured from this PaymentIntent. */ amount_capturable?: number + amount_details?: components['schemas']['payment_flows_amount_details'] /** @description Amount that was collected by this PaymentIntent. */ amount_received?: number /** @description ID of the Connect application that created the PaymentIntent. */ @@ -8777,9 +10536,9 @@ export interface components { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ client_secret?: string | null /** @enum {string} */ @@ -8858,12 +10617,20 @@ export interface components { transfer_group?: string | null } & { [key: string]: unknown } /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown } + payment_intent_card_processing: { + customer_notification?: components['schemas']['payment_intent_processing_customer_notification'] + } & { [key: string]: unknown } /** PaymentIntentNextAction */ payment_intent_next_action: { alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + card_await_notification?: components['schemas']['payment_intent_next_action_card_await_notification'] + display_bank_transfer_instructions?: components['schemas']['payment_intent_next_action_display_bank_transfer_instructions'] + konbini_display_details?: components['schemas']['payment_intent_next_action_konbini'] oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + paynow_display_qr_code?: components['schemas']['payment_intent_next_action_paynow_display_qr_code'] + pix_display_qr_code?: components['schemas']['payment_intent_next_action_pix_display_qr_code'] + promptpay_display_qr_code?: components['schemas']['payment_intent_next_action_promptpay_display_qr_code'] redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ type: string @@ -8899,6 +10666,34 @@ export interface components { /** @description The URL to the downloadable boleto voucher PDF. */ pdf?: string | null } & { [key: string]: unknown } + /** PaymentIntentNextActionCardAwaitNotification */ + payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: number | null + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + customer_approval_required?: boolean | null + } & { [key: string]: unknown } + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining?: number | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** @description A list of financial addresses that can be used to fund the customer balance */ + financial_addresses?: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url?: string | null + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference?: string | null + /** + * @description Type of bank transfer + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } /** PaymentIntentNextActionDisplayOxxoDetails */ payment_intent_next_action_display_oxxo_details: { /** @@ -8911,6 +10706,89 @@ export interface components { /** @description OXXO reference number. */ number?: string | null } & { [key: string]: unknown } + /** payment_intent_next_action_konbini */ + payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + expires_at: number + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url?: string | null + stores: components['schemas']['payment_intent_next_action_konbini_stores'] + } & { [key: string]: unknown } + /** payment_intent_next_action_konbini_familymart */ + payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } & { [key: string]: unknown } + /** payment_intent_next_action_konbini_lawson */ + payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } & { [key: string]: unknown } + /** payment_intent_next_action_konbini_ministop */ + payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } & { [key: string]: unknown } + /** payment_intent_next_action_konbini_seicomart */ + payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } & { [key: string]: unknown } + /** payment_intent_next_action_konbini_stores */ + payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + familymart?: (components['schemas']['payment_intent_next_action_konbini_familymart'] & { [key: string]: unknown }) | null + /** @description Lawson instruction details. */ + lawson?: (components['schemas']['payment_intent_next_action_konbini_lawson'] & { [key: string]: unknown }) | null + /** @description Ministop instruction details. */ + ministop?: (components['schemas']['payment_intent_next_action_konbini_ministop'] & { [key: string]: unknown }) | null + /** @description Seicomart instruction details. */ + seicomart?: (components['schemas']['payment_intent_next_action_konbini_seicomart'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** PaymentIntentNextActionPaynowDisplayQrCode */ + payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The image_url_png string used to render QR code */ + image_url_png: string + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string + } & { [key: string]: unknown } + /** PaymentIntentNextActionPixDisplayQrCode */ + payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data?: string + /** @description The date (unix timestamp) when the PIX expires. */ + expires_at?: number + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url?: string + /** @description The image_url_png string used to render png QR code */ + image_url_png?: string + /** @description The image_url_svg string used to render svg QR code */ + image_url_svg?: string + } & { [key: string]: unknown } + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: string + /** @description The image_url_png string used to render QR code, can be used as */ + image_url_png: string + /** @description The image_url_svg string used to render QR code, can be used as */ + image_url_svg: string + } & { [key: string]: unknown } /** PaymentIntentNextActionRedirectToUrl */ payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -8927,6 +10805,11 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } & { [key: string]: unknown } /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8947,9 +10830,9 @@ export interface components { nonce_str: string /** @description package is static value */ package: string - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ prepay_id: string /** @description A signature */ sign: string @@ -8958,7 +10841,7 @@ export interface components { } & { [key: string]: unknown } /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ native_url: string } & { [key: string]: unknown } /** PaymentIntentPaymentMethodOptions */ @@ -8967,6 +10850,10 @@ export interface components { | components['schemas']['payment_intent_payment_method_options_acss_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + affirm?: ( + | components['schemas']['payment_method_options_affirm'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } afterpay_clearpay?: ( | components['schemas']['payment_method_options_afterpay_clearpay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8987,6 +10874,10 @@ export interface components { | components['schemas']['payment_method_options_bancontact'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + blik?: ( + | components['schemas']['payment_intent_payment_method_options_blik'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } boleto?: ( | components['schemas']['payment_method_options_boleto'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8999,6 +10890,10 @@ export interface components { | components['schemas']['payment_method_options_card_present'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + customer_balance?: ( + | components['schemas']['payment_method_options_customer_balance'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } eps?: ( | components['schemas']['payment_intent_payment_method_options_eps'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9027,6 +10922,14 @@ export interface components { | components['schemas']['payment_method_options_klarna'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + konbini?: ( + | components['schemas']['payment_method_options_konbini'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + link?: ( + | components['schemas']['payment_intent_payment_method_options_link'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } oxxo?: ( | components['schemas']['payment_method_options_oxxo'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9035,6 +10938,18 @@ export interface components { | components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + paynow?: ( + | components['schemas']['payment_method_options_paynow'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + pix?: ( + | components['schemas']['payment_method_options_pix'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + promptpay?: ( + | components['schemas']['payment_method_options_promptpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } sepa_debit?: ( | components['schemas']['payment_intent_payment_method_options_sepa_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9043,6 +10958,10 @@ export interface components { | components['schemas']['payment_method_options_sofort'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] ) & { [key: string]: unknown } + us_bank_account?: ( + | components['schemas']['payment_intent_payment_method_options_us_bank_account'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } wechat_pay?: ( | components['schemas']['payment_method_options_wechat_pay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9051,6 +10970,15 @@ export interface components { /** payment_intent_payment_method_options_acss_debit */ payment_intent_payment_method_options_acss_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} @@ -9058,15 +10986,34 @@ export interface components { verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } /** payment_intent_payment_method_options_au_becs_debit */ - payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } + payment_intent_payment_method_options_au_becs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_blik */ + payment_intent_payment_method_options_blik: { [key: string]: unknown } /** payment_intent_payment_method_options_card */ payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** * @description Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ installments?: (components['schemas']['payment_method_options_card_installments'] & { [key: string]: unknown }) | null + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: (components['schemas']['payment_method_options_card_mandate_options'] & { [key: string]: unknown }) | null /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9086,9 +11033,42 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string } & { [key: string]: unknown } /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown } + payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_link */ + payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } & { [key: string]: unknown } /** payment_intent_payment_method_options_mandate_options_acss_debit */ payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9111,6 +11091,33 @@ export interface components { /** payment_intent_payment_method_options_sepa_debit */ payment_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_us_bank_account */ + payment_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } /** PaymentIntentProcessing */ payment_intent_processing: { @@ -9121,8 +11128,24 @@ export interface components { */ type: 'card' } & { [key: string]: unknown } + /** PaymentIntentProcessingCustomerNotification */ + payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + approval_requested?: boolean | null + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + completes_at?: number | null + } & { [key: string]: unknown } /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + installments?: components['schemas']['payment_flows_installment_options'] /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9132,6 +11155,11 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } /** * PaymentLink @@ -9157,6 +11185,15 @@ export interface components { * @enum {string} */ billing_address_collection: 'auto' | 'required' + /** @description When set, provides configuration to gather active consent from customers. */ + consent_collection?: (components['schemas']['payment_links_resource_consent_collection'] & { [key: string]: unknown }) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + customer_creation: 'always' | 'if_required' /** @description Unique identifier for the object. */ id: string /** @@ -9187,13 +11224,56 @@ export interface components { object: 'payment_link' /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ on_behalf_of?: ((string | components['schemas']['account']) & { [key: string]: unknown }) | null + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data?: (components['schemas']['payment_links_resource_payment_intent_data'] & { [key: string]: unknown }) | null + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + payment_method_collection: 'always' | 'if_required' /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | null + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | null phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] /** @description Configuration for collecting the customer's shipping address. */ shipping_address_collection?: (components['schemas']['payment_links_resource_shipping_address_collection'] & { [key: string]: unknown }) | null + /** @description The shipping rate options applied to the session. */ + shipping_options: components['schemas']['payment_links_resource_shipping_option'][] + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + submit_type: 'auto' | 'book' | 'donate' | 'pay' /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ subscription_data?: (components['schemas']['payment_links_resource_subscription_data'] & { [key: string]: unknown }) | null + tax_id_collection: components['schemas']['payment_links_resource_tax_id_collection'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ transfer_data?: (components['schemas']['payment_links_resource_transfer_data'] & { [key: string]: unknown }) | null /** @description The public URL that can be shared with customers. */ @@ -9224,6 +11304,32 @@ export interface components { /** @description The URL the customer will be redirected to after the purchase is complete. */ url: string } & { [key: string]: unknown } + /** PaymentLinksResourceConsentCollection */ + payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null + } & { [key: string]: unknown } + /** PaymentLinksResourcePaymentIntentData */ + payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + capture_method?: ('automatic' | 'manual') | null + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + setup_future_usage?: ('off_session' | 'on_session') | null + } & { [key: string]: unknown } /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9472,11 +11578,25 @@ export interface components { | 'ZZ' )[] } & { [key: string]: unknown } + /** PaymentLinksResourceShippingOption */ + payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number + /** @description The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: (string | components['schemas']['shipping_rate']) & { [key: string]: unknown } + } & { [key: string]: unknown } /** PaymentLinksResourceSubscriptionData */ payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days?: number | null } & { [key: string]: unknown } + /** PaymentLinksResourceTaxIdCollection */ + payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + enabled: boolean + } & { [key: string]: unknown } /** PaymentLinksResourceTransferData */ payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ @@ -9487,19 +11607,21 @@ export interface components { /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to * Customer objects to store instrument details for future payments. * * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). */ payment_method: { acss_debit?: components['schemas']['payment_method_acss_debit'] + affirm?: components['schemas']['payment_method_affirm'] afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_bacs_debit'] bancontact?: components['schemas']['payment_method_bancontact'] billing_details: components['schemas']['billing_details'] + blik?: components['schemas']['payment_method_blik'] boleto?: components['schemas']['payment_method_boleto'] card?: components['schemas']['payment_method_card'] card_present?: components['schemas']['payment_method_card_present'] @@ -9510,6 +11632,7 @@ export interface components { created: number /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ customer?: ((string | components['schemas']['customer']) & { [key: string]: unknown }) | null + customer_balance?: components['schemas']['payment_method_customer_balance'] eps?: components['schemas']['payment_method_eps'] fpx?: components['schemas']['payment_method_fpx'] giropay?: components['schemas']['payment_method_giropay'] @@ -9519,6 +11642,8 @@ export interface components { ideal?: components['schemas']['payment_method_ideal'] interac_present?: components['schemas']['payment_method_interac_present'] klarna?: components['schemas']['payment_method_klarna'] + konbini?: components['schemas']['payment_method_konbini'] + link?: components['schemas']['payment_method_link'] /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -9530,6 +11655,10 @@ export interface components { object: 'payment_method' oxxo?: components['schemas']['payment_method_oxxo'] p24?: components['schemas']['payment_method_p24'] + paynow?: components['schemas']['payment_method_paynow'] + pix?: components['schemas']['payment_method_pix'] + promptpay?: components['schemas']['payment_method_promptpay'] + radar_options?: components['schemas']['radar_radar_options'] sepa_debit?: components['schemas']['payment_method_sepa_debit'] sofort?: components['schemas']['payment_method_sofort'] /** @@ -9538,14 +11667,17 @@ export interface components { */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -9553,11 +11685,18 @@ export interface components { | 'ideal' | 'interac_present' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + us_bank_account?: components['schemas']['payment_method_us_bank_account'] wechat_pay?: components['schemas']['payment_method_wechat_pay'] } & { [key: string]: unknown } /** payment_method_acss_debit */ @@ -9573,6 +11712,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } & { [key: string]: unknown } + /** payment_method_affirm */ + payment_method_affirm: { [key: string]: unknown } /** payment_method_afterpay_clearpay */ payment_method_afterpay_clearpay: { [key: string]: unknown } /** payment_method_au_becs_debit */ @@ -9595,6 +11736,8 @@ export interface components { } & { [key: string]: unknown } /** payment_method_bancontact */ payment_method_bancontact: { [key: string]: unknown } + /** payment_method_blik */ + payment_method_blik: { [key: string]: unknown } /** payment_method_boleto */ payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -9697,19 +11840,24 @@ export interface components { /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ shipping_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } + /** payment_method_customer_balance */ + payment_method_customer_balance: { [key: string]: unknown } /** payment_method_details */ payment_method_details: { ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] ach_debit?: components['schemas']['payment_method_details_ach_debit'] acss_debit?: components['schemas']['payment_method_details_acss_debit'] + affirm?: components['schemas']['payment_method_details_affirm'] afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] bancontact?: components['schemas']['payment_method_details_bancontact'] + blik?: components['schemas']['payment_method_details_blik'] boleto?: components['schemas']['payment_method_details_boleto'] card?: components['schemas']['payment_method_details_card'] card_present?: components['schemas']['payment_method_details_card_present'] + customer_balance?: components['schemas']['payment_method_details_customer_balance'] eps?: components['schemas']['payment_method_details_eps'] fpx?: components['schemas']['payment_method_details_fpx'] giropay?: components['schemas']['payment_method_details_giropay'] @@ -9717,9 +11865,14 @@ export interface components { ideal?: components['schemas']['payment_method_details_ideal'] interac_present?: components['schemas']['payment_method_details_interac_present'] klarna?: components['schemas']['payment_method_details_klarna'] + konbini?: components['schemas']['payment_method_details_konbini'] + link?: components['schemas']['payment_method_details_link'] multibanco?: components['schemas']['payment_method_details_multibanco'] oxxo?: components['schemas']['payment_method_details_oxxo'] p24?: components['schemas']['payment_method_details_p24'] + paynow?: components['schemas']['payment_method_details_paynow'] + pix?: components['schemas']['payment_method_details_pix'] + promptpay?: components['schemas']['payment_method_details_promptpay'] 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'] @@ -9729,6 +11882,7 @@ export interface components { * It contains information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['payment_method_details_us_bank_account'] wechat?: components['schemas']['payment_method_details_wechat'] wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] } & { [key: string]: unknown } @@ -9776,6 +11930,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } & { [key: string]: unknown } + /** payment_method_details_affirm */ + payment_method_details_affirm: { [key: string]: unknown } /** payment_method_details_afterpay_clearpay */ payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -9829,6 +11985,8 @@ export interface components { */ verified_name?: string | null } & { [key: string]: unknown } + /** payment_method_details_blik */ + payment_method_details_blik: { [key: string]: unknown } /** payment_method_details_boleto */ payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -9862,6 +12020,8 @@ export interface components { installments?: (components['schemas']['payment_method_details_card_installments'] & { [key: string]: unknown }) | null /** @description The last four digits of the card. */ last4?: string | null + /** @description ID of the mandate used to make this payment or created by it. */ + mandate?: string | null /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null /** @description Populated if this transaction used 3D Secure authentication. */ @@ -9905,265 +12065,275 @@ export interface components { amount_authorized?: number | null /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null - /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: (components['schemas']['payment_method_details_card_present_receipt'] & { [key: string]: unknown }) | null - } & { [key: string]: unknown } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } & { [key: string]: unknown } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } & { [key: string]: unknown } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null - } & { [key: string]: unknown } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null - } & { [key: string]: unknown } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } & { [key: string]: unknown } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null - } & { [key: string]: unknown } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } & { [key: string]: unknown } - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null - } & { [key: string]: unknown } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: ((string | components['schemas']['mandate']) & { [key: string]: unknown }) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - verified_name?: string | null - } & { [key: string]: unknown } - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null + capture_before?: number + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + incremental_authorization_supported: boolean + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: boolean + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: (components['schemas']['payment_method_details_card_present_receipt'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } & { [key: string]: unknown } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } & { [key: string]: unknown } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: (components['schemas']['address'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** payment_method_details_customer_balance */ + payment_method_details_customer_balance: { [key: string]: unknown } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } & { [key: string]: unknown } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null + } & { [key: string]: unknown } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } & { [key: string]: unknown } + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null + } & { [key: string]: unknown } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: ((string | components['schemas']['mandate']) & { [key: string]: unknown }) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } & { [key: string]: unknown } + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ cardholder_name?: string | null /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10231,10 +12401,25 @@ export interface components { payment_method_category?: string | null /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ preferred_locale?: string | null } & { [key: string]: unknown } + /** payment_method_details_konbini */ + payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store?: (components['schemas']['payment_method_details_konbini_store'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** payment_method_details_konbini_store */ + payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + chain?: ('familymart' | 'lawson' | 'ministop' | 'seicomart') | null + } & { [key: string]: unknown } + /** payment_method_details_link */ + payment_method_details_link: { [key: string]: unknown } /** payment_method_details_multibanco */ payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10291,6 +12476,21 @@ export interface components { */ verified_name?: string | null } & { [key: string]: unknown } + /** payment_method_details_paynow */ + payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + reference?: string | null + } & { [key: string]: unknown } + /** payment_method_details_pix */ + payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + bank_transaction_id?: string | null + } & { [key: string]: unknown } + /** payment_method_details_promptpay */ + payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + reference?: string | null + } & { [key: string]: unknown } /** payment_method_details_sepa_debit */ payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10336,6 +12536,27 @@ export interface components { } & { [key: string]: unknown } /** payment_method_details_stripe_account */ payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_us_bank_account */ + payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } & { [key: string]: unknown } /** payment_method_details_wechat */ payment_method_details_wechat: { [key: string]: unknown } /** payment_method_details_wechat_pay */ @@ -10348,7 +12569,7 @@ export interface components { /** payment_method_eps */ payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ bank?: @@ -10363,6 +12584,7 @@ export interface components { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -10468,18 +12690,78 @@ export interface components { /** @description The customer's date of birth, if provided. */ dob?: (components['schemas']['payment_flows_private_payment_methods_klarna_dob'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } + /** payment_method_konbini */ + payment_method_konbini: { [key: string]: unknown } + /** payment_method_link */ + payment_method_link: { + /** @description Account owner's email address. */ + email?: string | null + /** @description Token used for persistent Link logins. */ + persistent_token?: string + } & { [key: string]: unknown } + /** payment_method_options_affirm */ + payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** payment_method_options_afterpay_clearpay */ payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ reference?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } & { [key: string]: unknown } /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown } + payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } & { [key: string]: unknown } /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown } + payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } /** payment_method_options_bancontact */ payment_method_options_bancontact: { /** @@ -10487,11 +12769,29 @@ export interface components { * @enum {string} */ preferred_language: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } & { [key: string]: unknown } /** payment_method_options_boleto */ payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } & { [key: string]: unknown } /** payment_method_options_card_installments */ payment_method_options_card_installments: { @@ -10502,30 +12802,255 @@ export interface components { /** @description Installment plan selected for this PaymentIntent. */ plan?: (components['schemas']['payment_method_details_card_installments_plan'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } + /** payment_method_options_card_mandate_options */ + payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } & { [key: string]: unknown } /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown } + payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + request_extended_authorization?: boolean | null + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + request_incremental_authorization_support?: boolean | null + } & { [key: string]: unknown } + /** payment_method_options_customer_balance */ + payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_customer_balance_bank_transfer */ + payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } & { [key: string]: unknown } + /** payment_method_options_customer_balance_eu_bank_account */ + payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } & { [key: string]: unknown } /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown } + payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown } + payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown } + payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown } + payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } & { [key: string]: unknown } /** payment_method_options_interac_present */ payment_method_options_interac_present: { [key: string]: unknown } /** payment_method_options_klarna */ payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ preferred_locale?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_konbini */ + payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number?: string | null + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: number | null + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } & { [key: string]: unknown } /** payment_method_options_oxxo */ payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } & { [key: string]: unknown } /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown } + payment_method_options_p24: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_paynow */ + payment_method_options_paynow: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_paypal */ + payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale?: string | null + } & { [key: string]: unknown } + /** payment_method_options_pix */ + payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds?: number | null + /** @description The timestamp at which the Pix expires. */ + expires_at?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_promptpay */ + payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } /** payment_method_options_sofort */ payment_method_options_sofort: { /** @@ -10533,6 +13058,15 @@ export interface components { * @enum {string|null} */ preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } & { [key: string]: unknown } /** payment_method_options_wechat_pay */ payment_method_options_wechat_pay: { @@ -10543,8 +13077,17 @@ export interface components { * @enum {string|null} */ client?: ('android' | 'ios' | 'web') | null - } & { [key: string]: unknown } - /** payment_method_oxxo */ + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_oxxo */ payment_method_oxxo: { [key: string]: unknown } /** payment_method_p24 */ payment_method_p24: { @@ -10582,6 +13125,12 @@ export interface components { ) | null } & { [key: string]: unknown } + /** payment_method_paynow */ + payment_method_paynow: { [key: string]: unknown } + /** payment_method_pix */ + payment_method_pix: { [key: string]: unknown } + /** payment_method_promptpay */ + payment_method_promptpay: { [key: string]: unknown } /** payment_method_sepa_debit */ payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10602,6 +13151,31 @@ export interface components { /** @description Two-letter ISO code representing the country the bank account is located in. */ country?: string | null } & { [key: string]: unknown } + /** payment_method_us_bank_account */ + payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description The name of the bank. */ + bank_name?: string | null + /** @description The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Contains information about US bank account networks that can be used. */ + networks?: (components['schemas']['us_bank_account_networks'] & { [key: string]: unknown }) | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } & { [key: string]: unknown } /** payment_method_wechat_pay */ payment_method_wechat_pay: { [key: string]: unknown } /** PaymentPagesCheckoutSessionAfterExpiration */ @@ -10645,6 +13219,11 @@ export interface components { * @enum {string|null} */ promotions?: ('opt_in' | 'opt_out') | null + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + terms_of_service?: 'accepted' | null } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -10654,23 +13233,32 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: 'auto' | null + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address?: (components['schemas']['address'] & { [key: string]: unknown }) | null /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email?: string | null - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name?: string | null + /** @description The customer's phone number after a completed Checkout Session. */ phone?: string | null /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionPhoneNumberCollection */ @@ -10924,6 +13512,19 @@ export interface components { | 'ZZ' )[] } & { [key: string]: unknown } + /** PaymentPagesCheckoutSessionShippingCost */ + payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: ((string | components['schemas']['shipping_rate']) & { [key: string]: unknown }) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionShippingOption */ payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ @@ -10934,13 +13535,14 @@ export interface components { /** PaymentPagesCheckoutSessionTaxID */ payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -10952,10 +13554,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -10975,6 +13579,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -10991,27 +13596,25 @@ export interface components { } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionTotalDetails */ payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] } & { [key: string]: unknown } /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } & { [key: string]: unknown } /** Polymorphic */ payment_source: ( | components['schemas']['account'] - | components['schemas']['alipay_account'] | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] | components['schemas']['card'] | components['schemas']['source'] ) & { [key: string]: unknown } @@ -11143,6 +13746,8 @@ export interface components { id: string /** @description Whether the person's `id_number` was provided. */ id_number_provided?: boolean + /** @description Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided?: boolean /** @description The person's last name. */ last_name?: string | null /** @description The Kana variation of the person's last name (Japan only). */ @@ -11167,6 +13772,7 @@ export interface components { * @enum {string} */ political_exposure?: 'existing' | 'none' + registered_address?: components['schemas']['address'] relationship?: components['schemas']['person_relationship'] requirements?: (components['schemas']['person_requirements'] & { [key: string]: unknown }) | null /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ @@ -11335,9 +13941,9 @@ export interface components { /** @description The messaging shown to customers in the portal. */ headline?: string | null /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string + privacy_policy_url?: string | null /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string + terms_of_service_url?: string | null } & { [key: string]: unknown } /** PortalCustomerUpdate */ portal_customer_update: { @@ -11360,6 +13966,17 @@ export interface components { /** @description Whether the feature is enabled. */ enabled: boolean } & { [key: string]: unknown } + /** PortalLoginPage */ + portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + enabled: boolean + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + url?: string | null + } & { [key: string]: unknown } /** PortalPaymentMethodUpdate */ portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -11438,6 +14055,10 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['currency_option'] } + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: (components['schemas']['custom_unit_amount'] & { [key: string]: unknown }) | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -11522,6 +14143,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: ((string | components['schemas']['price']) & { [key: string]: unknown }) | null /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string | null /** @description Unique identifier for the object. */ @@ -11532,7 +14155,7 @@ export interface components { livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string /** * @description String representing the object's type. Objects of the same type share the same value. @@ -11545,7 +14168,7 @@ export interface components { shippable?: boolean | null /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: ((string | components['schemas']['tax_code']) & { [key: string]: unknown }) | null /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string | null @@ -11559,7 +14182,7 @@ export interface components { } & { [key: string]: unknown } /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ promotion_code: { @@ -11597,8 +14220,15 @@ export interface components { /** @description Number of times this promotion code has been used. */ times_redeemed: number } & { [key: string]: unknown } + /** PromotionCodeCurrencyOption */ + promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: number + } & { [key: string]: unknown } /** PromotionCodesResourceRestrictions */ promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['promotion_code_currency_option'] } /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ first_time_transaction: boolean /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -11616,6 +14246,10 @@ export interface components { amount_subtotal: number /** @description Total after discounts and taxes are applied. */ amount_total: number + /** @description ID of the Connect Application that created the quote. */ + application?: + | ((string | components['schemas']['application'] | components['schemas']['deleted_application']) & { [key: string]: unknown }) + | null /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ application_fee_amount?: number | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -11700,6 +14334,8 @@ export interface components { subscription_data: components['schemas']['quotes_resource_subscription_data'] /** @description The subscription schedule that was created or updated from this quote. */ subscription_schedule?: ((string | components['schemas']['subscription_schedule']) & { [key: string]: unknown }) | null + /** @description ID of the test clock this quote belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null total_details: components['schemas']['quotes_resource_total_details'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ transfer_data?: (components['schemas']['quotes_resource_transfer_data'] & { [key: string]: unknown }) | null @@ -11762,6 +14398,8 @@ export interface components { } & { [key: string]: unknown } /** QuotesResourceSubscriptionData */ quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -11772,19 +14410,19 @@ export interface components { } & { [key: string]: unknown } /** QuotesResourceTotalDetails */ quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] } & { [key: string]: unknown } /** QuotesResourceTotalDetailsResourceBreakdown */ quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } & { [key: string]: unknown } /** QuotesResourceTransferData */ @@ -11932,6 +14570,14 @@ export interface components { /** @description The identifier of the value list this item belongs to. */ value_list: string } & { [key: string]: unknown } + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + session?: string + } & { [key: string]: unknown } /** RadarReviewResourceLocation */ radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -11956,65 +14602,15 @@ export interface components { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null } & { [key: string]: unknown } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: (components['schemas']['bank_account'] & { [key: string]: unknown }) | null - /** CardList */ - cards?: - | ({ - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown }) - | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: ((string | components['schemas']['card']) & { [key: string]: unknown }) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - email?: string | null - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: ((string | components['schemas']['account']) & { [key: string]: unknown }) | null - /** @description Full, legal name of the recipient. */ - name?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - object: 'recipient' - rolled_back_from?: (string | components['schemas']['account']) & { [key: string]: unknown } - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string + network: 'stripe' } & { [key: string]: unknown } /** Recurring */ recurring: { @@ -12066,8 +14662,11 @@ export interface components { failure_reason?: string /** @description Unique identifier for the object. */ id: string + /** @description Email to which refund instructions, if required, are sent to. */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null + next_action?: components['schemas']['refund_next_action'] /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12084,11 +14683,27 @@ export interface components { receipt_number?: string | null /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ source_transfer_reversal?: ((string | components['schemas']['transfer_reversal']) & { [key: string]: unknown }) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ status?: string | null /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ transfer_reversal?: ((string | components['schemas']['transfer_reversal']) & { [key: string]: unknown }) | null } & { [key: string]: unknown } + /** RefundNextAction */ + refund_next_action: { + /** @description Contains the refund details. */ + display_details?: (components['schemas']['refund_next_action_display_details'] & { [key: string]: unknown }) | null + /** @description Type of the next action to perform. */ + type: string + } & { [key: string]: unknown } + /** RefundNextActionDisplayDetails */ + refund_next_action_display_details: { + email_sent: components['schemas']['email_sent'] + /** + * Format: unix-time + * @description The expiry timestamp. + */ + expires_at: number + } & { [key: string]: unknown } /** * reporting_report_run * @description The Report Run object represents an instance of a report type generated with @@ -12304,6 +14919,16 @@ export interface components { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean } & { [key: string]: unknown } + /** SecretServiceResourceScope */ + secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + type: 'account' | 'user' + /** @description The user ID, if type is set to "user" */ + user?: string + } & { [key: string]: unknown } /** sepa_debit_generated_from */ sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ @@ -12321,6 +14946,12 @@ export interface components { setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ application?: ((string | components['schemas']['application']) & { [key: string]: unknown }) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12328,6 +14959,12 @@ export interface components { created: number /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ customer?: ((string | components['schemas']['customer'] | components['schemas']['deleted_customer']) & { [key: string]: unknown }) | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12357,14 +14994,17 @@ export interface components { au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + blik?: components['schemas']['setup_attempt_payment_method_details_blik'] boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] card?: components['schemas']['setup_attempt_payment_method_details_card'] card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + link?: components['schemas']['setup_attempt_payment_method_details_link'] sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ type: string + us_bank_account?: components['schemas']['setup_attempt_payment_method_details_us_bank_account'] } & { [key: string]: unknown } /** setup_attempt_payment_method_details_acss_debit */ setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } @@ -12398,6 +15038,8 @@ export interface components { */ verified_name?: string | null } & { [key: string]: unknown } + /** setup_attempt_payment_method_details_blik */ + setup_attempt_payment_method_details_blik: { [key: string]: unknown } /** setup_attempt_payment_method_details_boleto */ setup_attempt_payment_method_details_boleto: { [key: string]: unknown } /** setup_attempt_payment_method_details_card */ @@ -12466,6 +15108,8 @@ export interface components { */ verified_name?: string | null } & { [key: string]: unknown } + /** setup_attempt_payment_method_details_link */ + setup_attempt_payment_method_details_link: { [key: string]: unknown } /** setup_attempt_payment_method_details_sepa_debit */ setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } /** setup_attempt_payment_method_details_sofort */ @@ -12494,6 +15138,8 @@ export interface components { */ verified_name?: string | null } & { [key: string]: unknown } + /** setup_attempt_payment_method_details_us_bank_account */ + setup_attempt_payment_method_details_us_bank_account: { [key: string]: unknown } /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -12522,6 +15168,12 @@ export interface components { setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ application?: ((string | components['schemas']['application']) & { [key: string]: unknown }) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -12530,7 +15182,7 @@ export interface components { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, 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 /** @@ -12546,6 +15198,12 @@ export interface components { customer?: ((string | components['schemas']['customer'] | components['schemas']['deleted_customer']) & { [key: string]: unknown }) | null /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description The error encountered in the previous SetupIntent confirmation. */ @@ -12612,12 +15270,35 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } & { [key: string]: unknown } /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { - acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + acss_debit?: ( + | components['schemas']['setup_intent_payment_method_options_acss_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + blik?: ( + | components['schemas']['setup_intent_payment_method_options_blik'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } card?: components['schemas']['setup_intent_payment_method_options_card'] - sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + link?: ( + | components['schemas']['setup_intent_payment_method_options_link'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + sepa_debit?: ( + | components['schemas']['setup_intent_payment_method_options_sepa_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } + us_bank_account?: ( + | components['schemas']['setup_intent_payment_method_options_us_bank_account'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + ) & { [key: string]: unknown } } & { [key: string]: unknown } /** setup_intent_payment_method_options_acss_debit */ setup_intent_payment_method_options_acss_debit: { @@ -12633,14 +15314,65 @@ export interface components { */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } + /** setup_intent_payment_method_options_blik */ + setup_intent_payment_method_options_blik: { + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_blik'] + } & { [key: string]: unknown } /** setup_intent_payment_method_options_card */ setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: (components['schemas']['setup_intent_payment_method_options_card_mandate_options'] & { [key: string]: unknown }) | null + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null } & { [key: string]: unknown } + /** setup_intent_payment_method_options_card_mandate_options */ + setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_link */ + setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + } & { [key: string]: unknown } /** setup_intent_payment_method_options_mandate_options_acss_debit */ setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -12660,41 +15392,60 @@ export interface components { */ transaction_type?: ('business' | 'personal') | null } & { [key: string]: unknown } + /** setup_intent_payment_method_options_mandate_options_blik */ + setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } & { [key: string]: unknown } /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } /** setup_intent_payment_method_options_sepa_debit */ setup_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] } & { [key: string]: unknown } + /** setup_intent_payment_method_options_us_bank_account */ + setup_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } /** Shipping */ shipping: { address?: components['schemas']['address'] /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null /** @description Recipient name. */ - name?: string | null + name?: string /** @description Recipient phone (including extension). */ phone?: string | null /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ tracking_number?: string | null } & { [key: string]: unknown } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: (components['schemas']['delivery_estimate'] & { [key: string]: unknown }) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } & { [key: string]: unknown } /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -12725,7 +15476,7 @@ export interface components { * @enum {string|null} */ tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: ((string | components['schemas']['tax_code']) & { [key: string]: unknown }) | null /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -12733,6 +15484,16 @@ export interface components { */ type: 'fixed_amount' } & { [key: string]: unknown } + /** ShippingRateCurrencyOption */ + shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } /** ShippingRateDeliveryEstimate */ shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ @@ -12756,6 +15517,8 @@ export interface components { amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['shipping_rate_currency_option'] } } & { [key: string]: unknown } /** SigmaScheduledQueryRunError */ sigma_scheduled_query_run_error: { @@ -12770,8 +15533,6 @@ export interface components { * the `size: large`, `color: red` version of that shirt. * * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). */ sku: { /** @description Whether the SKU is available for purchase. */ @@ -13346,29 +16107,6 @@ export interface components { qr_code_url?: string | null statement_descriptor?: string } & { [key: string]: unknown } - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null - } & { [key: string]: unknown } /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -13376,12 +16114,16 @@ export interface components { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ subscription: { + /** @description ID of the Connect Application that created the subscription. */ + application?: + | ((string | components['schemas']['application'] | components['schemas']['deleted_application']) & { [key: string]: unknown }) + | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ application_fee_percent?: number | null automatic_tax: components['schemas']['subscription_automatic_tax'] /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ @@ -13408,6 +16150,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -13426,17 +16170,14 @@ export interface components { default_payment_method?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_source?: - | (( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) & { [key: string]: unknown }) + | ((string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) & { + [key: string]: unknown + }) | null /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string | null /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ discount?: (components['schemas']['discount'] & { [key: string]: unknown }) | null /** @@ -13509,6 +16250,8 @@ export interface components { * @enum {string} */ status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description ID of the test clock this subscription belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ transfer_data?: (components['schemas']['subscription_transfer_data'] & { [key: string]: unknown }) | null /** @@ -13569,6 +16312,11 @@ export interface components { /** subscription_payment_method_options_card */ subscription_payment_method_options_card: { mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -13592,6 +16340,10 @@ export interface components { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + application?: + | ((string | components['schemas']['application'] | components['schemas']['deleted_application']) & { [key: string]: unknown }) + | null /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -13644,6 +16396,8 @@ export interface components { status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' /** @description ID of the subscription managed by the subscription schedule. */ subscription?: ((string | components['schemas']['subscription']) & { [key: string]: unknown }) | null + /** @description ID of the test clock this subscription schedule belongs to. */ + test_clock?: ((string | components['schemas']['test_helpers.test_clock']) & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** * SubscriptionScheduleAddInvoiceItem @@ -13689,7 +16443,7 @@ export interface components { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ application_fee_percent?: number | null @@ -13708,10 +16462,14 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: ((string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) & { [key: string]: unknown }) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description The end of this phase of the subscription schedule. @@ -13721,6 +16479,8 @@ export interface components { invoice_settings?: (components['schemas']['invoice_setting_subscription_schedule_setting'] & { [key: string]: unknown }) | null /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ items: components['schemas']['subscription_schedule_configuration_item'][] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + metadata?: { [key: string]: string } | null /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -13758,6 +16518,8 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: ((string | components['schemas']['payment_method']) & { [key: string]: unknown }) | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description The subscription schedule's default invoice settings. */ invoice_settings?: (components['schemas']['invoice_setting_subscription_schedule_setting'] & { [key: string]: unknown }) | null /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -13800,6 +16562,12 @@ export interface components { bancontact?: (components['schemas']['invoice_payment_method_options_bancontact'] & { [key: string]: unknown }) | null /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ card?: (components['schemas']['subscription_payment_method_options_card'] & { [key: string]: unknown }) | null + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance?: (components['schemas']['invoice_payment_method_options_customer_balance'] & { [key: string]: unknown }) | null + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini?: (components['schemas']['invoice_payment_method_options_konbini'] & { [key: string]: unknown }) | null + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account?: (components['schemas']['invoice_payment_method_options_us_bank_account'] & { [key: string]: unknown }) | null } & { [key: string]: unknown } /** SubscriptionsResourcePaymentSettings */ subscriptions_resource_payment_settings: { @@ -13816,15 +16584,26 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + save_default_payment_method?: ('off' | 'on_subscription') | null } & { [key: string]: unknown } /** * SubscriptionsResourcePendingUpdate @@ -13834,7 +16613,7 @@ export interface components { subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number | null /** @@ -13854,7 +16633,7 @@ export interface components { } & { [key: string]: unknown } /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -13918,13 +16697,14 @@ export interface components { */ object: 'tax_id' /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -13936,10 +16716,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -13959,6 +16741,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -14027,6 +16810,26 @@ export interface components { */ tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null } & { [key: string]: unknown } + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + 'terminal.configuration': { + bbpos_wisepos_e?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + /** @description Unique identifier for the object. */ + id: string + /** @description Whether this Configuration is the default for your account */ + is_account_default?: boolean | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.configuration' + tipping?: components['schemas']['terminal_configuration_configuration_resource_tipping'] + verifone_p400?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + } & { [key: string]: unknown } /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14052,6 +16855,8 @@ export interface components { */ 'terminal.location': { address: components['schemas']['address'] + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string /** @description The display name of the location. */ display_name: string /** @description Unique identifier for the object. */ @@ -14073,13 +16878,15 @@ export interface components { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ 'terminal.reader': { + /** @description The most recent action performed by the reader. */ + action?: (components['schemas']['terminal_reader_reader_resource_reader_action'] & { [key: string]: unknown }) | null /** @description The current software version of the reader. */ device_sw_version?: string | null /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + device_type: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | 'verifone_P400' /** @description Unique identifier for the object. */ id: string /** @description The local IP address of the reader. */ @@ -14102,38 +16909,164 @@ export interface components { /** @description The networking status of the reader. */ status?: string | null } & { [key: string]: unknown } + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + fixed_amounts?: number[] | null + /** @description Percentages displayed when collecting a tip */ + percentages?: number[] | null + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + splashscreen?: (string | components['schemas']['file']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** TerminalConfigurationConfigurationResourceTipping */ + terminal_configuration_configuration_resource_tipping: { + aud?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + cad?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + chf?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + czk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + dkk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + eur?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + gbp?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + hkd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + myr?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nok?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nzd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sek?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sgd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + usd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + } & { [key: string]: unknown } /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description List of line items in the cart. */ + line_items: components['schemas']['terminal_reader_reader_resource_line_item'][] + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax?: number | null + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: number + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader + */ + terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: components['schemas']['card'] + /** @description Description of the line item. */ + description: string + /** @description The quantity of the line item. */ + quantity: number + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + skip_tipping?: boolean + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + payment_intent: (string | components['schemas']['payment_intent']) & { [key: string]: unknown } + process_config?: components['schemas']['terminal_reader_reader_resource_process_config'] + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string + /** @description Most recent SetupIntent processed by the reader. */ + setup_intent: (string | components['schemas']['setup_intent']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + failure_code?: string | null + /** @description Detailed failure message, only set if status is `failed`. */ + failure_message?: string | null + process_payment_intent?: components['schemas']['terminal_reader_reader_resource_process_payment_intent_action'] + process_setup_intent?: components['schemas']['terminal_reader_reader_resource_process_setup_intent_action'] + set_reader_display?: components['schemas']['terminal_reader_reader_resource_set_reader_display_action'] + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + status: 'failed' | 'in_progress' | 'succeeded' + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + type: 'process_payment_intent' | 'process_setup_intent' | 'set_reader_display' + } & { [key: string]: unknown } + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + cart?: (components['schemas']['terminal_reader_reader_resource_cart'] & { [key: string]: unknown }) | null + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + type: 'cart' + } & { [key: string]: unknown } + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + 'test_helpers.test_clock': { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + deletes_after: number + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + /** @description The custom name supplied at creation. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string + object: 'test_helpers.test_clock' + /** + * @description The status of the Test Clock. + * @enum {string} + */ + status: 'advancing' | 'internal_failure' | 'ready' } & { [key: string]: unknown } /** three_d_secure_details */ three_d_secure_details: { @@ -14147,7 +17080,7 @@ export interface components { * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + result?: ('attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error') | null /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. @@ -14253,7 +17186,8 @@ export interface components { * @enum {string} */ object: 'topup' - source: components['schemas']['source'] + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + source?: (components['schemas']['source'] & { [key: string]: unknown }) | null /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ statement_descriptor?: string | null /** @@ -14330,7 +17264,7 @@ export interface components { /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ source_transaction?: ((string | components['schemas']['charge']) & { [key: string]: unknown }) | null /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null + source_type?: string /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null } & { [key: string]: unknown } @@ -14420,6 +17354,1074 @@ export interface components { */ round: 'down' | 'up' } & { [key: string]: unknown } + /** + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ + 'treasury.credit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.credit_reversal' + /** @description The ReceivedCredit being reversed. */ + received_credit: string + /** + * @description Status of the CreditReversal + * @enum {string} + */ + status: 'canceled' | 'posted' | 'processing' + status_transitions: components['schemas']['treasury_received_credits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: ((string | components['schemas']['treasury.transaction']) & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + 'treasury.debit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Other flows linked to a DebitReversal. */ + linked_flows?: (components['schemas']['treasury_received_debits_resource_debit_reversal_linked_flows'] & { [key: string]: unknown }) | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'card' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.debit_reversal' + /** @description The ReceivedDebit being reversed. */ + received_debit: string + /** + * @description Status of the DebitReversal + * @enum {string} + */ + status: 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_received_debits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: ((string | components['schemas']['treasury.transaction']) & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + 'treasury.financial_account': { + /** @description The array of paths to active Features in the Features hash. */ + active_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + balance: components['schemas']['treasury_financial_accounts_resource_balance'] + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + features?: components['schemas']['treasury.financial_account_features'] + /** @description The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: components['schemas']['treasury_financial_accounts_resource_financial_address'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account' + /** @description The array of paths to pending Features in the Features hash. */ + pending_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions?: + | (components['schemas']['treasury_financial_accounts_resource_platform_restrictions'] & { [key: string]: unknown }) + | null + /** @description The array of paths to restricted Features in the Features hash. */ + restricted_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + status: 'closed' | 'open' + status_details: components['schemas']['treasury_financial_accounts_resource_status_details'] + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + supported_currencies: string[] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + 'treasury.financial_account_features': { + card_issuing?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + deposit_insurance?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + financial_addresses?: components['schemas']['treasury_financial_accounts_resource_financial_addresses_features'] + inbound_transfers?: components['schemas']['treasury_financial_accounts_resource_inbound_transfers'] + intra_stripe_flows?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account_features' + outbound_payments?: components['schemas']['treasury_financial_accounts_resource_outbound_payments'] + outbound_transfers?: components['schemas']['treasury_financial_accounts_resource_outbound_transfers'] + } & { [key: string]: unknown } + /** + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + */ + 'treasury.inbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details?: (components['schemas']['treasury_inbound_transfers_resource_failure_details'] & { [key: string]: unknown }) | null + /** @description The FinancialAccount that received the funds. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + linked_flows: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.inbound_transfer' + /** @description The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: string + /** @description Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details?: (components['schemas']['inbound_transfers'] & { [key: string]: unknown }) | null + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned?: boolean | null + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: string + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: ((string | components['schemas']['treasury.transaction']) & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_payment': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + destination_payment_method?: string | null + /** @description Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details?: (components['schemas']['outbound_payments_payment_method_details'] & { [key: string]: unknown }) | null + /** @description Details about the end user. */ + end_user_details?: + | (components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_end_user_details'] & { [key: string]: unknown }) + | null + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_payment' + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details?: (components['schemas']['treasury_outbound_payments_resource_returned_status'] & { [key: string]: unknown }) | null + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: string + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: (string | components['schemas']['treasury.transaction']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method?: string | null + destination_payment_method_details: components['schemas']['outbound_transfers_payment_method_details'] + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_transfer' + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details?: (components['schemas']['treasury_outbound_transfers_resource_returned_details'] & { [key: string]: unknown }) | null + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: string + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_transfers_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: (string | components['schemas']['treasury.transaction']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + 'treasury.received_credit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'other') | null + /** @description The FinancialAccount that received the funds. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_credits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The rails used to send the funds. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' | 'us_domestic_wire' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_credit' + /** @description Details describing when a ReceivedCredit may be reversed. */ + reversal_details?: (components['schemas']['treasury_received_credits_resource_reversal_details'] & { [key: string]: unknown }) | null + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: ((string | components['schemas']['treasury.transaction']) & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + 'treasury.received_debit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'insufficient_funds' | 'other') | null + /** @description The FinancialAccount that funds were pulled from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_debits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_debit' + /** @description Details describing when a ReceivedDebit might be reversed. */ + reversal_details?: (components['schemas']['treasury_received_debits_resource_reversal_details'] & { [key: string]: unknown }) | null + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: ((string | components['schemas']['treasury.transaction']) & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + 'treasury.transaction': { + /** @description Amount (in cents) transferred. */ + amount: number + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + entries?: + | ({ + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown }) + | null + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description ID of the flow that created the Transaction. */ + flow?: string | null + /** @description Details of the flow that created the Transaction. */ + flow_details?: (components['schemas']['treasury_transactions_resource_flow_details'] & { [key: string]: unknown }) | null + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction' + /** + * @description Status of the Transaction. + * @enum {string} + */ + status: 'open' | 'posted' | 'void' + status_transitions: components['schemas']['treasury_transactions_resource_abstract_transaction_resource_status_transitions'] + } & { [key: string]: unknown } + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + 'treasury.transaction_entry': { + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + effective_at: number + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description Token of the flow associated with the TransactionEntry. */ + flow?: string | null + /** @description Details of the flow associated with the TransactionEntry. */ + flow_details?: (components['schemas']['treasury_transactions_resource_flow_details'] & { [key: string]: unknown }) | null + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction_entry' + /** @description The Transaction associated with this object. */ + transaction: (string | components['schemas']['treasury.transaction']) & { [key: string]: unknown } + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'credit_reversal_posting' + | 'debit_reversal' + | 'inbound_transfer' + | 'inbound_transfer_return' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'other' + | 'outbound_payment' + | 'outbound_payment_cancellation' + | 'outbound_payment_failure' + | 'outbound_payment_posting' + | 'outbound_payment_return' + | 'outbound_transfer' + | 'outbound_transfer_cancellation' + | 'outbound_transfer_failure' + | 'outbound_transfer_posting' + | 'outbound_transfer_return' + | 'received_credit' + | 'received_debit' + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name: string + /** @description The account number. */ + account_number?: string | null + /** @description The last four characters of the account number. */ + account_number_last4: string + /** @description Name of the bank. */ + bank_name: string + /** @description Routing number for the account. */ + routing_number: string + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + cash: { [key: string]: number } + /** @description Funds not spendable yet, but will become available at a later time. */ + inbound_pending: { [key: string]: number } + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: { [key: string]: number } + } & { [key: string]: unknown } + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + reasons: ('account_rejected' | 'closed_by_platform' | 'other')[] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + treasury_financial_accounts_resource_financial_address: { + aba?: components['schemas']['treasury_financial_accounts_resource_aba_record'] + /** @description The list of networks that the address supports */ + supported_networks?: ('ach' | 'us_domestic_wire')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'aba' + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + treasury_financial_accounts_resource_financial_addresses_features: { + aba?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_inbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + treasury_financial_accounts_resource_outbound_payments: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_outbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + inbound_flows?: ('restricted' | 'unrestricted') | null + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + outbound_flows?: ('restricted' | 'unrestricted') | null + } & { [key: string]: unknown } + /** TreasuryFinancialAccountsResourceStatusDetails */ + treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + closed?: (components['schemas']['treasury_financial_accounts_resource_closed_status_details'] & { [key: string]: unknown }) | null + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + requested: boolean + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + status: 'active' | 'pending' | 'restricted' + /** @description Additional details; includes at least one entry when the status is not `active`. */ + status_details: components['schemas']['treasury_financial_accounts_resource_toggles_setting_status_details'][] + } & { [key: string]: unknown } + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + code: + | 'activating' + | 'capability_not_requested' + | 'financial_account_closed' + | 'rejected_other' + | 'rejected_unsupported_business' + | 'requirements_past_due' + | 'requirements_pending_verification' + | 'restricted_by_platform' + | 'restricted_other' + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + resolution?: ('contact_stripe' | 'provide_information' | 'remove_restriction') | null + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + restriction?: 'inbound_flows' | 'outbound_flows' + } & { [key: string]: unknown } + /** TreasuryInboundTransfersResourceFailureDetails */ + treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } & { [key: string]: unknown } + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + received_debit?: string | null + } & { [key: string]: unknown } + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + succeeded_at?: number | null + } & { [key: string]: unknown } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + ip_address?: string | null + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: boolean + } & { [key: string]: unknown } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + returned_at?: number | null + } & { [key: string]: unknown } + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: (string | components['schemas']['treasury.transaction']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** TreasuryOutboundTransfersResourceReturnedDetails */ + treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: (string | components['schemas']['treasury.transaction']) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** TreasuryOutboundTransfersResourceStatusTransitions */ + treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + returned_at?: number | null + } & { [key: string]: unknown } + /** TreasuryReceivedCreditsResourceLinkedFlows */ + treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal?: string | null + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction?: string | null + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + source_flow?: string | null + /** @description The expandable object of the source flow. */ + source_flow_details?: (components['schemas']['treasury_received_credits_resource_source_flows_details'] & { [key: string]: unknown }) | null + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type?: string | null + } & { [key: string]: unknown } + /** TreasuryReceivedCreditsResourceReversalDetails */ + treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } & { [key: string]: unknown } + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + treasury_received_credits_resource_source_flows_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + payout?: components['schemas']['payout'] + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } & { [key: string]: unknown } + /** TreasuryReceivedCreditsResourceStatusTransitions */ + treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + posted_at?: number | null + } & { [key: string]: unknown } + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute?: string | null + } & { [key: string]: unknown } + /** TreasuryReceivedDebitsResourceLinkedFlows */ + treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal?: string | null + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer?: string | null + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction?: string | null + } & { [key: string]: unknown } + /** TreasuryReceivedDebitsResourceReversalDetails */ + treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } & { [key: string]: unknown } + /** TreasuryReceivedDebitsResourceStatusTransitions */ + treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + completed_at?: number | null + } & { [key: string]: unknown } + /** TreasurySharedResourceBillingDetails */ + treasury_shared_resource_billing_details: { + address: components['schemas']['address'] + /** @description Email address. */ + email?: string | null + /** @description Full name. */ + name?: string | null + } & { [key: string]: unknown } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + balance?: 'payments' + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['received_payment_method_details_financial_account'] + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card?: string + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + type: 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account' + us_bank_account?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_us_bank_account'] + } & { [key: string]: unknown } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + bank_name?: string | null + /** @description The last four digits of the bank account number. */ + last4?: string | null + /** @description The routing number for the bank account. */ + routing_number?: string | null + } & { [key: string]: unknown } + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + void_at?: number | null + } & { [key: string]: unknown } + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + cash: number + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: number + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: number + } & { [key: string]: unknown } + /** TreasuryTransactionsResourceFlowDetails */ + treasury_transactions_resource_flow_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + debit_reversal?: components['schemas']['treasury.debit_reversal'] + inbound_transfer?: components['schemas']['treasury.inbound_transfer'] + issuing_authorization?: components['schemas']['issuing.authorization'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + outbound_transfer?: components['schemas']['treasury.outbound_transfer'] + received_credit?: components['schemas']['treasury.received_credit'] + received_debit?: components['schemas']['treasury.received_debit'] + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + } & { [key: string]: unknown } + /** us_bank_account_networks */ + us_bank_account_networks: { + /** @description The preferred network. */ + preferred?: string | null + /** @description All supported networks. */ + supported: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } /** * UsageRecord * @description Usage records allow you to report customer usage and metrics to Stripe for @@ -14520,13 +18522,19 @@ export interface components { } export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { + /**

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']['three_d_secure'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14538,93 +18546,21 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Retrieves a 3D Secure object.

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

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

+ * + *

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

+ */ + PostAccount: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

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

- * - *

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

- */ - PostAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14693,6 +18629,10 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + affirm_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -14709,6 +18649,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + blik_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ boleto_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -14753,10 +18701,18 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + konbini_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ legacy_payments?: { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + link_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ oxxo_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -14765,6 +18721,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + paynow_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -14784,6 +18748,14 @@ export interface operations { transfers?: { requested?: boolean } & { [key: string]: unknown } + /** capability_param */ + treasury?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * company_specs @@ -14909,7 +18881,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -14960,6 +18932,7 @@ export interface operations { full_name_aliases?: (string[] | '') & { [key: string]: unknown } gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -14968,6 +18941,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -15015,6 +18997,8 @@ export interface operations { cvc_failure?: boolean } & { [key: string]: unknown } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_prefix_kanji?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } /** payments_settings_specs */ payments?: { @@ -15036,6 +19020,16 @@ export interface operations { } & { [key: string]: unknown } statement_descriptor?: string } & { [key: string]: unknown } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * tos_acceptance_specs @@ -15604,8 +19598,6 @@ export interface operations { account: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -15763,6 +19755,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15781,6 +19775,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -15952,6 +19958,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15970,6 +19978,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16184,6 +20204,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16202,6 +20224,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16373,6 +20407,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16391,6 +20427,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16625,6 +20673,10 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + affirm_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -16641,6 +20693,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + blik_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ boleto_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -16685,10 +20745,18 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + konbini_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ legacy_payments?: { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + link_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ oxxo_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -16697,6 +20765,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + paynow_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -16716,6 +20792,14 @@ export interface operations { transfers?: { requested?: boolean } & { [key: string]: unknown } + /** capability_param */ + treasury?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * company_specs @@ -16801,7 +20885,7 @@ export interface operations { } & { [key: string]: unknown } } & { [key: string]: unknown } } & { [key: string]: unknown } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ country?: string /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ default_currency?: string @@ -16843,7 +20927,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -16894,6 +20978,7 @@ export interface operations { full_name_aliases?: (string[] | '') & { [key: string]: unknown } gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -16902,6 +20987,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -16949,6 +21043,8 @@ export interface operations { cvc_failure?: boolean } & { [key: string]: unknown } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_prefix_kanji?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } /** payments_settings_specs */ payments?: { @@ -16970,6 +21066,16 @@ export interface operations { } & { [key: string]: unknown } statement_descriptor?: string } & { [key: string]: unknown } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * tos_acceptance_specs @@ -17106,6 +21212,10 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + affirm_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -17122,6 +21232,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + blik_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ boleto_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -17166,10 +21284,18 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + konbini_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ legacy_payments?: { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + link_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ oxxo_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -17178,6 +21304,14 @@ export interface operations { requested?: boolean } & { [key: string]: unknown } /** capability_param */ + paynow_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } & { [key: string]: unknown } @@ -17197,6 +21331,14 @@ export interface operations { transfers?: { requested?: boolean } & { [key: string]: unknown } + /** capability_param */ + treasury?: { + requested?: boolean + } & { [key: string]: unknown } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * company_specs @@ -17322,7 +21464,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -17373,6 +21515,7 @@ export interface operations { full_name_aliases?: (string[] | '') & { [key: string]: unknown } gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -17381,6 +21524,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -17428,6 +21580,8 @@ export interface operations { cvc_failure?: boolean } & { [key: string]: unknown } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_prefix_kanji?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } /** payments_settings_specs */ payments?: { @@ -17449,6 +21603,16 @@ export interface operations { } & { [key: string]: unknown } statement_descriptor?: string } & { [key: string]: unknown } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } } & { [key: string]: unknown } /** * tos_acceptance_specs @@ -18048,8 +22212,6 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -18214,6 +22376,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18232,6 +22396,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18404,6 +22580,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18422,6 +22600,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18644,6 +22834,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18662,6 +22854,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18834,6 +23038,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18852,6 +23058,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19350,7 +23568,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -19360,6 +23578,172 @@ export interface operations { } } } + /**

List all secrets stored on the given scope.

*/ + GetAppsSecrets: { + 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 + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } & { [key: string]: unknown } + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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']['apps.secret'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create or replace a secret in the secret store.

*/ + PostAppsSecrets: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number + /** @description A name for the secret that's unique within the scope. */ + name: string + /** @description The plaintext secret value to be stored. */ + payload: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } & { [key: string]: unknown } + } + } + } + } + /**

Deletes a secret from the secret store by name and scope.

*/ + PostAppsSecretsDelete: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } & { [key: string]: unknown } + } + } + } + } + /**

Finds a secret in the secret store by name and scope.

*/ + GetAppsSecretsFind: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A name for the secret that's unique within the scope. */ + name: string + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } & { [key: string]: unknown } + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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.

@@ -19667,8 +24051,8 @@ export interface operations { */ business_profile: { headline?: string - privacy_policy_url: string - terms_of_service_url: string + privacy_policy_url?: string + terms_of_service_url?: string } & { [key: string]: unknown } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: (string | '') & { [key: string]: unknown } @@ -19681,7 +24065,7 @@ export interface operations { features: { /** customer_update_creation_param */ customer_update?: { - allowed_updates: (('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '') & { [key: string]: unknown } + allowed_updates?: (('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '') & { [key: string]: unknown } enabled: boolean } & { [key: string]: unknown } /** invoice_list_param */ @@ -19736,6 +24120,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } & { [key: string]: unknown } } & { [key: string]: unknown } + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } } @@ -19805,8 +24196,8 @@ export interface operations { */ business_profile?: { headline?: string - privacy_policy_url?: string - terms_of_service_url?: string + privacy_policy_url?: (string | '') & { [key: string]: unknown } + terms_of_service_url?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: (string | '') & { [key: string]: unknown } @@ -19874,6 +24265,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } & { [key: string]: unknown } } & { [key: string]: unknown } + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } @@ -19965,188 +24363,6 @@ export interface operations { } } } - /**

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

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

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

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

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

*/ GetCharges: { parameters: { @@ -20229,7 +24445,7 @@ export interface operations { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ application_fee_amount?: number /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ capture?: boolean @@ -20272,6 +24488,13 @@ export interface operations { metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ on_behalf_of?: string + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } & { [key: string]: unknown } /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string /** @@ -20313,6 +24536,57 @@ export interface operations { } } } + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetChargesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['charge'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

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: { @@ -20631,6 +24905,7 @@ export interface operations { amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } payment_intent?: string @@ -20715,11 +24990,23 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' payment_intent?: string /** @enum {string} */ reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' @@ -20797,6 +25084,12 @@ export interface operations { GetCheckoutSessions: { parameters: { query: { + /** Only return the Checkout Sessions for the Customer specified. */ + customer?: string + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details?: { + email: string + } & { [key: string]: unknown } /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -20900,8 +25193,12 @@ export interface operations { */ consent_collection?: { /** @enum {string} */ - promotions?: 'auto' + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' } & { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -20922,7 +25219,8 @@ export interface operations { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -20957,7 +25255,7 @@ export interface operations { expand?: string[] /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ expires_at?: number /** @@ -20965,7 +25263,7 @@ export interface operations { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ line_items?: ({ /** adjustable_quantity_params */ @@ -20974,7 +25272,6 @@ export interface operations { maximum?: number minimum?: number } & { [key: string]: unknown } - description?: string dynamic_tax_rates?: string[] price?: string /** price_data_with_product_data */ @@ -21096,6 +25393,16 @@ export interface operations { } & { [key: string]: unknown } transfer_group?: string } & { [key: string]: unknown } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -21116,26 +25423,168 @@ export interface operations { transaction_type?: 'business' | 'personal' } & { [key: string]: unknown } /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown } /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ boleto?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string + statement_descriptor_suffix_kanji?: string + } & { [key: string]: unknown } + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown } /** payment_method_options_param */ oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown } + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown } + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number + } & { [key: string]: unknown } + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' } & { [key: string]: unknown } /** payment_method_options_param */ wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown } } & { [key: string]: unknown } /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -21145,23 +25594,31 @@ export interface operations { */ payment_method_types?: ( | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] /** @@ -21453,6 +25910,13 @@ export interface operations { fixed_amount?: { amount: number currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } + } } & { [key: string]: unknown } metadata?: { [key: string]: string } /** @enum {string} */ @@ -21477,11 +25941,7 @@ export interface operations { subscription_data?: { application_fee_percent?: number default_tax_rates?: string[] - items?: ({ - plan: string - quantity?: number - tax_rates?: string[] - } & { [key: string]: unknown })[] + description?: string metadata?: { [key: string]: string } /** transfer_data_specs */ transfer_data?: { @@ -21789,6 +26249,12 @@ export interface operations { } & { [key: string]: unknown } /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ currency?: string + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } & { [key: string]: unknown } + } /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -21872,6 +26338,12 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } & { [key: string]: unknown } + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -21992,9 +26464,9 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ credit_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -22017,7 +26489,7 @@ export interface operations { memo?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ out_of_band_amount?: number /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -22026,7 +26498,7 @@ export interface operations { reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** @description ID of an existing refund to link this credit note to. */ refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -22036,9 +26508,9 @@ export interface operations { GetCreditNotesPreview: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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[] @@ -22061,13 +26533,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -22095,9 +26567,9 @@ export interface operations { GetCreditNotesPreviewLines: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22124,13 +26596,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22335,6 +26807,8 @@ 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 + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock?: string } } responses: { @@ -22399,8 +26873,19 @@ export interface operations { } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } & { [key: string]: unknown } + } & { [key: string]: unknown } coupon?: string /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ description?: string @@ -22424,6 +26909,13 @@ export interface operations { ) & { [key: string]: unknown } default_payment_method?: string footer?: string + rendering_options?: ( + | ({ + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } @@ -22475,6 +26967,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -22486,10 +26979,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -22509,6 +27004,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -22516,9 +27012,62 @@ export interface operations { | 'za_vat' value: string } & { [key: string]: unknown })[] + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string + } + } + } + } + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetCustomersSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['customer'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } /**

Retrieves a Customer object.

*/ GetCustomersCustomer: { @@ -22591,7 +27140,7 @@ export interface operations { } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ balance?: number /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ bank_account?: ( @@ -22628,6 +27177,17 @@ export interface operations { } & { [key: string]: unknown }) | string ) & { [key: string]: unknown } + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } & { [key: string]: unknown } + } & { [key: string]: unknown } coupon?: string /** @description ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string @@ -22665,6 +27225,13 @@ export interface operations { ) & { [key: string]: unknown } default_payment_method?: string footer?: string + rendering_options?: ( + | ({ + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } @@ -22708,8 +27275,6 @@ export interface operations { * @enum {string} */ tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: ('now' | number) & { [key: string]: unknown } } } } @@ -22814,7 +27379,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ currency: string @@ -23459,7 +28024,8 @@ export interface operations { } } } - GetCustomersCustomerDiscount: { + /**

Retrieves a customer’s cash balance.

*/ + GetCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23473,7 +28039,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23489,8 +28055,8 @@ export interface operations { } } } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { + /**

Changes the settings on a customer’s cash balance.

*/ + PostCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23500,7 +28066,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23512,81 +28078,23 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetCustomersCustomerPaymentMethods: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' } & { [key: string]: unknown } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { + /**

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

*/ + GetCustomersCustomerCashBalanceTransactions: { parameters: { path: { customer: string @@ -23598,8 +28106,6 @@ 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 - /** 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 } @@ -23610,13 +28116,313 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: (( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) & { [key: string]: unknown })[] + data: components['schemas']['customer_cash_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactionsTransaction: { + 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_cash_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + PostCustomersCustomerFundingInstructions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['funding_instructions'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: 'bank_transfer' + } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetCustomersCustomerPaymentMethods: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + GetCustomersCustomerPaymentMethodsPaymentMethod: { + parameters: { + path: { + customer: string + payment_method: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: ((components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) & { + [key: string]: unknown + })[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -23963,7 +28769,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: ({ price?: string /** one_time_price_data */ @@ -23983,7 +28789,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -23995,7 +28801,7 @@ export interface operations { backdate_start_date?: number /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ @@ -24020,6 +28826,8 @@ export interface operations { collection_method?: 'charge_automatically' | 'send_invoice' /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string + /** @description Three-letter [ISO currency 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 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24110,10 +28918,38 @@ export interface operations { description?: string } & { [key: string]: unknown } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } payment_method_types?: ( | ( @@ -24125,16 +28961,24 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' ) & { [key: string]: unknown } + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } & { [key: string]: unknown } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: ( @@ -24148,9 +28992,7 @@ export interface operations { /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24229,7 +29071,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: ({ price?: string /** one_time_price_data */ @@ -24249,7 +29091,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -24381,10 +29223,38 @@ export interface operations { description?: string } & { [key: string]: unknown } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } payment_method_types?: ( | ( @@ -24396,16 +29266,24 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' ) & { [key: string]: unknown } + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } & { [key: string]: unknown } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: ( @@ -24419,11 +29297,7 @@ export interface operations { /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24624,13 +29498,14 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -24642,10 +29517,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -24665,6 +29542,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -25188,6 +30066,7 @@ export interface operations { 200: { content: { 'application/json': { + /** @description Details about each object. */ data: components['schemas']['file_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean @@ -25240,7 +30119,7 @@ export interface operations { * @description A future timestamp after which the link will no longer be usable. */ expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ file: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } @@ -25348,6 +30227,7 @@ export interface operations { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -25434,6 +30314,7 @@ export interface operations { | 'identity_document' | 'pci_document' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' } } } @@ -25469,6 +30350,284 @@ export interface operations { } } } + /**

Returns a list of Financial Connections Account objects.

*/ + GetFinancialConnectionsAccounts: { + parameters: { + query: { + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + customer?: string + } & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an Financial Connections Account.

*/ + GetFinancialConnectionsAccountsAccount: { + 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']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostFinancialConnectionsAccountsAccountDisconnect: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Lists all owners for a given Account

*/ + GetFinancialConnectionsAccountsAccountOwners: { + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostFinancialConnectionsAccountsAccountRefresh: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] + } + } + } + } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostFinancialConnectionsSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' + } & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } & { [key: string]: unknown } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } + } + } + } + /**

Retrieves the details of a Financial Connections Session

*/ + GetFinancialConnectionsSessionsSession: { + 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']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

List all verification reports.

*/ GetIdentityVerificationReports: { parameters: { @@ -25927,7 +31086,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ amount?: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string @@ -25953,7 +31112,7 @@ export interface operations { metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25982,11 +31141,11 @@ export interface operations { subscription?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -26048,7 +31207,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ amount?: number /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ description?: string @@ -26068,7 +31227,7 @@ export interface operations { metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -26095,11 +31254,11 @@ export interface operations { quantity?: number /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ tax_rates?: (string[] | '') & { [key: string]: unknown } - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -26204,7 +31363,7 @@ export interface operations { } } } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ PostInvoices: { responses: { /** Successful response. */ @@ -26225,7 +31384,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: (string[] | '') & { [key: string]: unknown } - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ auto_advance?: boolean @@ -26241,6 +31400,8 @@ export interface operations { * @enum {string} */ collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** @description A list of up to 4 custom fields to be displayed on the invoice. */ custom_fields?: ( | ({ @@ -26250,7 +31411,7 @@ export interface operations { | '' ) & { [key: string]: unknown } /** @description The ID of the customer who will be billed. */ - customer: string + customer?: string /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -26278,6 +31439,15 @@ export interface operations { expand?: string[] /** @description Footer to be displayed on the invoice. */ footer?: string + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: { + /** @enum {string} */ + action: 'revision' + invoice: string + } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ @@ -26287,6 +31457,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: ( @@ -26310,11 +31481,51 @@ export interface operations { ) & { [key: string]: unknown } card?: ( | ({ + /** installments_param */ + installments?: { + enabled?: boolean + plan?: ( + | ({ + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } payment_method_types?: ( | ( @@ -26326,20 +31537,39 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' ) & { [key: string]: unknown } } & { [key: string]: unknown } + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + pending_invoice_items_behavior?: 'exclude' | 'include' | 'include_and_require' + /** @description Options for invoice PDF rendering. */ + rendering_options?: ( + | ({ + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ subscription?: string /** * transfer_data_specs @@ -26353,6 +31583,57 @@ export interface operations { } } } + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetInvoicesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoice'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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

* @@ -26369,6 +31650,8 @@ export interface operations { } & { [key: string]: unknown } /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ coupon?: string + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26412,6 +31695,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26423,10 +31707,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26446,6 +31732,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26549,13 +31836,7 @@ export interface operations { quantity?: number tax_rates?: (string[] | '') & { [key: string]: unknown } } & { [key: string]: unknown })[] - /** - * 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`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26597,6 +31878,8 @@ export interface operations { } & { [key: string]: unknown } /** The code of the coupon to apply. If `subscription` or `subscription_items` is provided, the invoice returned will preview updating or creating a subscription with that coupon. Otherwise, it will preview applying that coupon to the customer for the next upcoming invoice from among the customer's subscriptions. The invoice can be previewed without a coupon by passing this value as an empty string. */ coupon?: string + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26640,6 +31923,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26651,10 +31935,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26674,6 +31960,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26783,13 +32070,7 @@ export interface operations { quantity?: number tax_rates?: (string[] | '') & { [key: string]: unknown } } & { [key: string]: unknown })[] - /** - * 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`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26897,7 +32178,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: (string[] | '') & { [key: string]: unknown } - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ auto_advance?: boolean @@ -26957,6 +32238,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: ( @@ -26980,11 +32262,51 @@ export interface operations { ) & { [key: string]: unknown } card?: ( | ({ + /** installments_param */ + installments?: { + enabled?: boolean + plan?: ( + | ({ + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } payment_method_types?: ( | ( @@ -26996,17 +32318,31 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' ) & { [key: string]: unknown } } & { [key: string]: unknown } + /** @description Options for invoice PDF rendering. */ + rendering_options?: ( + | ({ + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ @@ -27191,6 +32527,8 @@ export interface operations { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ forgive?: boolean + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ off_session?: boolean /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -27267,88 +32605,6 @@ export interface operations { } } } - /**

Returns a list of issuer fraud records.

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

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

- * - *

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

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

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

*/ GetIssuingAuthorizations: { parameters: { @@ -27671,7 +32927,7 @@ export interface operations { } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ name: string /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ phone_number?: string @@ -29661,6 +34917,7 @@ export interface operations { currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + financial_account?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } /** @description The card this is meant to be a replacement for (if any). */ @@ -29684,7 +34941,13 @@ export interface operations { postal_code: string state?: string } & { [key: string]: unknown } + /** customs_param */ + customs?: { + eori_number?: string + } & { [key: string]: unknown } name: string + phone_number?: string + require_signature?: boolean /** @enum {string} */ service?: 'express' | 'priority' | 'standard' /** @enum {string} */ @@ -31624,6 +36887,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31714,8 +36979,15 @@ export interface operations { expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string + } & { [key: string]: unknown } } } } @@ -31775,6 +37047,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -32143,22 +37417,13 @@ export interface operations { } } } - /**

Retrieves a Mandate object.

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostLinkAccountSessions: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['mandate'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32170,83 +37435,54 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - GetOrderReturns: { - parameters: { - query: { - /** Date this return was created. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } & { [key: string]: unknown } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } } - /**

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

*/ - GetOrderReturnsId: { + /**

Retrieves the details of a Financial Connections Session

*/ + GetLinkAccountSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - id: string + session: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32262,75 +37498,25 @@ export interface operations { } } } - /**

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

*/ - GetOrders: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetLinkedAccounts: { parameters: { query: { - /** Date this order was created. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return orders for the given customer. */ - customer?: string + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + customer?: string + } & { [key: string]: unknown } /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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 orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: { - canceled?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - fulfilled?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - paid?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - returned?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: string[] } } responses: { @@ -32338,7 +37524,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['order'][] + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32364,13 +37551,22 @@ export interface operations { } } } - /**

Creates a new order object.

*/ - PostOrders: { + /**

Retrieves the details of an Financial Connections Account.

*/ + GetLinkedAccountsAccount: { + 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']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32382,66 +37578,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: ({ - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - name: string - phone?: string - } & { [key: string]: unknown } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostLinkedAccountsAccountDisconnect: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32453,22 +37605,49 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - PostOrdersId: { + /**

Lists all owners for a given Account

*/ + GetLinkedAccountsAccountOwners: { parameters: { path: { - id: string + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: 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': components['schemas']['order'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -32480,44 +37659,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } & { [key: string]: unknown } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

*/ - PostOrdersIdPay: { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostLinkedAccountsAccountRefresh: { parameters: { path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32530,34 +37687,30 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] } } } } - /**

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

Retrieves a Mandate object.

*/ + GetMandatesMandate: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + mandate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['mandate'] } } /** Error response. */ @@ -32569,40 +37722,15 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: ( - | ({ - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - } & { [key: string]: unknown })[] - | '' - ) & { [key: string]: unknown } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { + /**

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: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** 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 @@ -32619,7 +37747,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['payment_intent'][] + data: components['schemas']['order'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32645,24 +37773,13 @@ export interface operations { } } } - /** - *

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

Creates a new open order object.

*/ + PostOrders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -32675,289 +37792,121 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * automatic_tax + * @description Settings for automatic tax calculation for this order. */ - automatic_payment_methods?: { + automatic_tax?: { enabled: boolean } & { [key: string]: unknown } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: ( + | ({ + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + email?: string + name?: string + phone?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } & { [key: string]: unknown } /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** - * @description 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. - */ + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: ( + | ({ + coupon?: string + discount?: string + promotion_code?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } & { [key: string]: unknown } + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: ({ + description?: string + discounts?: ( + | ({ + coupon?: string + discount?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string /** @enum {string} */ - type: 'offline' | 'online' - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: (boolean | ('one_off' | 'recurring')) & { [key: string]: unknown } - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } & { [key: string]: unknown } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } & { [key: string]: unknown } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } & { [key: string]: unknown } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: ( + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: (string[] | '') & { [key: string]: unknown } + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + name: string + package_dimensions?: ( | ({ - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - email?: (string | '') & { [key: string]: unknown } - name?: string - phone?: string - } & { [key: string]: unknown } - /** param */ - boleto?: { - tax_id: string - } & { [key: string]: unknown } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } & { [key: string]: unknown } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } & { [key: string]: unknown } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } & { [key: string]: unknown } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } & { [key: string]: unknown } - } & { [key: string]: unknown } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } & { [key: string]: unknown } - /** param */ - sepa_debit?: { - iban: string - } & { [key: string]: unknown } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + shippable?: boolean + tax_code?: string + url?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: ( - | ({ + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** create_params */ + settings: { + application_fee_amount?: number + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { /** payment_intent_payment_method_options_mandate_options_param */ mandate_options?: { custom_mandate_url?: (string | '') & { [key: string]: unknown } @@ -32968,74 +37917,74 @@ export interface operations { transaction_type?: 'business' | 'personal' } & { [key: string]: unknown } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - afterpay_clearpay?: ( - | ({ + } & { [key: string]: unknown } + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' reference?: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - alipay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - au_becs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bacs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bancontact?: ( - | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + bancontact?: { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - boleto?: ( - | ({ - expires_after_days?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card?: ( - | ({ - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: ( - | ({ - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown } + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' } & { [key: string]: unknown } /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + funding_type?: 'bank_transfer' /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + ideal?: { /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - eps?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - fpx?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - giropay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - grabpay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - ideal?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - interac_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - klarna?: ( - | ({ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -33046,136 +37995,245 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - oxxo?: ( - | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + oxxo?: { expires_after_days?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - p24?: ( - | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' tos_shown_and_accepted?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - sepa_debit?: ( - | ({ + } & { [key: string]: unknown } + /** payment_intent_payment_method_options_param */ + sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - sofort?: ( - | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + sofort?: { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - wechat_pay?: ( - | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown } + /** payment_method_options_param */ + wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data */ + transfer_data?: { + amount?: number + destination: string + } & { [key: string]: unknown } } & { [key: string]: unknown } - carrier?: string - name: string - phone?: string - tracking_number?: string } & { [key: string]: unknown } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: ( + | ({ + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } + } + } & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string + /** @enum {string} */ + type?: 'fixed_amount' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Shipping details for the order. */ + shipping_details?: ( + | ({ + /** validated_optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + name: string + phone?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number - destination: string + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: ({ + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + } & { [key: string]: unknown })[] } & { [key: string]: unknown } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean } } } } - /** - *

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

- * - *

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

- * - *

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

- */ - GetPaymentIntentsIntent: { + /**

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: { - /** 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 + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33191,26 +38249,18 @@ export interface operations { } } } - /** - *

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

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

*/ + PostOrdersId: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33223,399 +38273,387 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: (number | '') & { [key: string]: unknown } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string /** - * @description 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. + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: ( + | ({ + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + email?: string + name?: string + phone?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } & { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: ( + | ({ + coupon?: string + discount?: string + promotion_code?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } & { [key: string]: unknown } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } & { [key: string]: unknown } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ + description?: string + discounts?: ( + | ({ + coupon?: string + discount?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } + id?: string + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } & { [key: string]: unknown } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: ( + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: (string[] | '') & { [key: string]: unknown } + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + name: string + package_dimensions?: ( | ({ - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - email?: (string | '') & { [key: string]: unknown } - name?: string - phone?: string - } & { [key: string]: unknown } - /** param */ - boleto?: { - tax_id: string - } & { [key: string]: unknown } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } & { [key: string]: unknown } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } & { [key: string]: unknown } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' + shippable?: boolean + tax_code?: string + url?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** update_params */ + settings: { + application_fee_amount?: (number | '') & { [key: string]: unknown } + /** update_params */ + payment_method_options?: { + acss_debit?: ( + | ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + afterpay_clearpay?: ( + | ({ + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + alipay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + ideal?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + klarna?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + link?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + oxxo?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + p24?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sepa_debit?: ( + | ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sofort?: ( + | ({ + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + wechat_pay?: ( + | ({ + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: (string | '') & { [key: string]: unknown } + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_data?: ( + | ({ + amount?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } & { [key: string]: unknown } - /** param */ - sepa_debit?: { - iban: string - } & { [key: string]: unknown } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } & { [key: string]: unknown } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } } & { [key: string]: unknown } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: ( - | ({ - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: (string | '') & { [key: string]: unknown } - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: ( + | ({ + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - afterpay_clearpay?: ( - | ({ - reference?: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - alipay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - au_becs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bacs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bancontact?: ( - | ({ - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - boleto?: ( - | ({ - expires_after_days?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card?: ( - | ({ - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: ( - | ({ - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } + } } & { [key: string]: unknown } + metadata?: { [key: string]: string } /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - eps?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - fpx?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - giropay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - grabpay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - ideal?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - interac_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - klarna?: ( - | ({ - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - oxxo?: ( - | ({ - expires_after_days?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - p24?: ( - | ({ - tos_shown_and_accepted?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - sepa_debit?: ( - | ({ - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - sofort?: ( - | ({ - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - wechat_pay?: ( - | ({ - app_id?: string + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: (string | '') & { [key: string]: unknown } - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: ( + type?: 'fixed_amount' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Shipping details for the order. */ + shipping_details?: ( | ({ - /** optional_fields_address */ + /** validated_optional_fields_address */ address: { city?: string country?: string @@ -33624,46 +38662,86 @@ export interface operations { postal_code?: string state?: string } & { [key: string]: unknown } - carrier?: string name: string phone?: string - tracking_number?: string } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: ({ + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + } & { [key: string]: unknown })[] } & { [key: string]: unknown } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string } } } } - /** - *

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

- * - *

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

- */ - PostPaymentIntentsIntentCancel: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + PostOrdersIdCancel: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33676,35 +38754,73 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /** - *

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

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Reopens a submitted order.

*/ + PostOrdersIdReopen: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33717,61 +38833,114 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number + } + } + } + } + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + PostOrdersIdSubmit: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number + } + } + } + } + /**

Returns a list of PaymentIntents.

*/ + GetPaymentIntents: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return PaymentIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string } & { [key: string]: unknown } } } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } } } /** - *

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).

+ *

Creates a PaymentIntent object.

* - *

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.

+ *

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.

* - *

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.

+ *

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.

*/ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostPaymentIntents: { responses: { /** Successful response. */ 200: { @@ -33789,48 +38958,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. */ + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ mandate?: string - /** @description This hash contains details about the Mandate to create */ - mandate_data?: ( - | ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'offline' | 'online' - } & { [key: string]: unknown } - } & { [key: string]: unknown }) - | ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'online' - } & { [key: string]: unknown } - } & { [key: string]: unknown }) - ) & { [key: string]: unknown } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'offline' | 'online' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ off_session?: (boolean | ('one_off' | 'recurring')) & { [key: string]: unknown } - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ payment_method?: string /** * payment_method_data_params @@ -33846,6 +39042,8 @@ export interface operations { transit_number: string } & { [key: string]: unknown } /** param */ + affirm?: { [key: string]: unknown } + /** param */ afterpay_clearpay?: { [key: string]: unknown } /** param */ alipay?: { [key: string]: unknown } @@ -33879,10 +39077,14 @@ export interface operations { phone?: string } & { [key: string]: unknown } /** param */ + blik?: { [key: string]: unknown } + /** param */ boleto?: { tax_id: string } & { [key: string]: unknown } /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ eps?: { /** @enum {string} */ bank?: @@ -33896,6 +39098,7 @@ export interface operations { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -33973,6 +39176,10 @@ export interface operations { year: number } & { [key: string]: unknown } } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } metadata?: { [key: string]: string } /** param */ oxxo?: { [key: string]: unknown } @@ -34007,6 +39214,16 @@ export interface operations { | 'volkswagen_bank' } & { [key: string]: unknown } /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ sepa_debit?: { iban: string } & { [key: string]: unknown } @@ -34018,23 +39235,42 @@ export interface operations { /** @enum {string} */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } /** param */ wechat_pay?: { [key: string]: unknown } } & { [key: string]: unknown } @@ -34055,34 +39291,79 @@ export interface operations { transaction_type?: 'business' | 'personal' } & { [key: string]: unknown } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - afterpay_clearpay?: ( + affirm?: ( | ({ - reference?: string + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - alipay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - au_becs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bacs_debit?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - bancontact?: ( + afterpay_clearpay?: ( | ({ /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - boleto?: ( + alipay?: ( | ({ - expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - card?: ( + au_becs_debit?: ( | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bacs_debit?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + blik?: ( + | ({ + code?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + boleto?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' cvc_token?: string /** installments_param */ installments?: { @@ -34098,31 +39379,110 @@ export interface operations { | '' ) & { [key: string]: unknown } } & { [key: string]: unknown } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } /** @enum {string} */ network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' /** @enum {string} */ setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_suffix_kanji?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card_present?: ( + | ({ + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + eps?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + fpx?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + giropay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + grabpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + ideal?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - card_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - eps?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - fpx?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - giropay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - grabpay?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } - ideal?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } interac_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } klarna?: ( | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -34133,38 +39493,99 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ( + | ({ + confirmation_number?: string + expires_after_days?: (number | '') & { [key: string]: unknown } + expires_at?: (number | '') & { [key: string]: unknown } + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + link?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } oxxo?: ( | ({ expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } p24?: ( | ({ + /** @enum {string} */ + setup_future_usage?: 'none' tos_shown_and_accepted?: boolean } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + paynow?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + pix?: ( + | ({ + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + promptpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } sepa_debit?: ( | ({ /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } @@ -34172,6 +39593,26 @@ export interface operations { | ({ /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } @@ -34180,19 +39621,24 @@ export interface operations { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } } & { [key: string]: unknown } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: (string | '') & { [key: string]: unknown } /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ return_url?: string /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -34200,48 +39646,85 @@ export interface operations { * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: ( - | ({ - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - carrier?: string - name: string - phone?: string - tracking_number?: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + carrier?: string + name: string + phone?: string + tracking_number?: string + } & { [key: string]: unknown } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } & { [key: string]: unknown } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean } } } } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPaymentIntentsSearch: { parameters: { - path: { - intent: 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + data: components['schemas']['payment_intent'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -34253,49 +39736,34 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your payment links.

*/ - GetPaymentLinks: { + /** + *

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: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string + /** 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[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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: { + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34311,13 +39779,26 @@ export interface operations { } } } - /**

Creates a payment link.

*/ - PostPaymentLinks: { + /** + *

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_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34330,719 +39811,695 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: (number | '') & { [key: string]: unknown } /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } & { [key: string]: unknown } - /** after_completion_redirect_params */ - redirect?: { - url: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } & { [key: string]: unknown } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** - * @description Configuration for collecting the customer's billing address. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: ({ - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } & { [key: string]: unknown } - price: string - quantity: number - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: 'card'[] + capture_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. + * @description ID of the Customer this PaymentIntent belongs to, if one exists. * - * We recommend that you review your privacy policy and check with your legal contacts. + * 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. */ - phone_number_collection?: { - enabled: boolean - } & { [key: string]: unknown } + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - 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]: unknown } - /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - */ - subscription_data?: { - trial_period_days?: number - } & { [key: string]: unknown } - /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - */ - transfer_data?: { - amount?: number - destination: string - } & { [key: string]: unknown } - } - } - } - } - /**

Retrieve a payment link.

*/ - GetPaymentLinksPaymentLink: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a payment link.

*/ - PostPaymentLinksPaymentLink: { - parameters: { - path: { - payment_link: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string } & { [key: string]: unknown } - /** after_completion_redirect_params */ - redirect?: { - url: string + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' } & { [key: string]: unknown } /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } & { [key: string]: unknown } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** param */ + wechat_pay?: { [key: string]: unknown } } & { [key: string]: unknown } /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: ({ - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } & { [key: string]: unknown } - id: string - quantity?: number - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: ('card'[] | '') & { [key: string]: unknown } - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: ( - | ({ - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] + payment_method_options?: { + acss_debit?: ( + | ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + affirm?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + afterpay_clearpay?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + alipay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + au_becs_debit?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bacs_debit?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + blik?: ( + | ({ + code?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + boleto?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: ( + | ({ + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_suffix_kanji?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card_present?: ( + | ({ + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + eps?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + fpx?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + giropay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + grabpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + ideal?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + interac_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + klarna?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ( + | ({ + confirmation_number?: string + expires_after_days?: (number | '') & { [key: string]: unknown } + expires_at?: (number | '') & { [key: string]: unknown } + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + link?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + oxxo?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + p24?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + paynow?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + pix?: ( + | ({ + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + promptpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sepa_debit?: ( + | ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sofort?: ( + | ({ + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + wechat_pay?: ( + | ({ + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: (string | '') & { [key: string]: unknown } + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: ( + | ({ + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + carrier?: string + name: string + phone?: string + tracking_number?: string } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } & { [key: string]: unknown } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string } } } } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetPaymentLinksPaymentLinkLineItems: { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + PostPaymentIntentsIntentApplyCustomerBalance: { parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35054,429 +40511,43 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - GetPaymentMethods: { - parameters: { - query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

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

- * - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

- */ - PostPaymentMethods: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } & { [key: string]: unknown } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - */ - afterpay_clearpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - */ - alipay?: { [key: string]: unknown } - /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - */ - au_becs_debit?: { - account_number: string - bsb_number: string - } & { [key: string]: unknown } - /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - */ - bacs_debit?: { - account_number?: string - sort_code?: string - } & { [key: string]: unknown } - /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - */ - bancontact?: { [key: string]: unknown } - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: ( - | ({ - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - email?: (string | '') & { [key: string]: unknown } - name?: string - phone?: string - } & { [key: string]: unknown } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string - } & { [key: string]: unknown } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: ( - | ({ - cvc?: string - exp_month: number - exp_year: number - number: string - } & { [key: string]: unknown }) - | ({ - token: string - } & { [key: string]: unknown }) - ) & { [key: string]: unknown } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } & { [key: string]: unknown } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } & { [key: string]: unknown } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: { [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } & { [key: string]: unknown } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: { [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: { [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } & { [key: string]: unknown } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } & { [key: string]: unknown } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } & { [key: string]: unknown } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: { [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPaymentMethodsPaymentMethod: { + /** + *

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

+ * + *

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

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

+ */ + PostPaymentIntentsIntentCancel: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35490,65 +40561,34 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: ( - | ({ - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - email?: (string | '') & { [key: string]: unknown } - name?: string - phone?: string - } & { [key: string]: unknown } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * @enum {string} */ - card?: { - exp_month?: number - exp_year?: number - } & { [key: string]: unknown } + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } /** - *

Attaches a PaymentMethod object to a Customer.

+ *

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

* - *

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.

+ *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

* - *

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.

+ *

Learn more about separate authorization and capture.

*/ - PostPaymentMethodsPaymentMethodAttach: { + PostPaymentIntentsIntentCapture: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35561,26 +40601,66 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } & { [key: string]: unknown } } } } } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { + /** + *

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: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35593,945 +40673,743 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - } - } - } - } - /**

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

*/ - GetPayouts: { - parameters: { - query: { - arrival_date?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payout'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

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

- * - *

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

- * - *

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

- */ - PostPayouts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) - * @enum {string} - */ - method?: 'instant' | 'standard' - /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - } - /**

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

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - } - } - } - } - /**

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

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - PostPayoutsPayoutReverse: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - } - } - } - } - /**

Returns a list of your plans.

*/ - GetPlans: { - parameters: { - query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - PostPlans: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - active?: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number - /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - */ - amount_decimal?: string - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string - /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} - */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - product?: ( + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** @description This hash contains details about the Mandate to create */ + mandate_data?: ( | ({ - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'offline' | 'online' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | ({ + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'online' + } & { [key: string]: unknown } } & { [key: string]: unknown }) - | string ) & { [key: string]: unknown } - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: ({ - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: ('inf' | number) & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } & { [key: string]: unknown } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: (boolean | ('one_off' | 'recurring')) & { [key: string]: unknown } + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - usage_type?: 'licensed' | 'metered' - } - } - } - } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - } - /**

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

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['deleted_plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your prices.

*/ - GetPrices: { - parameters: { - query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return prices for the given currency. */ - currency?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return the price with these lookup_keys, if any exist. */ - lookup_keys?: string[] - /** Only return prices for the given product. */ - product?: string - /** Only return prices with these recurring fields. */ - recurring?: { - /** @enum {string} */ - interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } & { [key: string]: unknown } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - type?: 'one_time' | 'recurring' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['price'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - PostPrices: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** @description The ID of the product that this price will belong to. */ - product?: string - /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. - */ - product_data?: { - active?: boolean - id?: string + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } & { [key: string]: unknown } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } & { [key: string]: unknown } - /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. - */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } & { [key: string]: unknown } - /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: ({ - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: ('inf' | number) & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_quantity?: { - divide_by: number + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } & { [key: string]: unknown } /** @enum {string} */ - round: 'down' | 'up' + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** param */ + wechat_pay?: { [key: string]: unknown } } & { [key: string]: unknown } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - unit_amount?: number - /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. - */ - unit_amount_decimal?: string - } - } - } - } - /**

Retrieves the price with the given ID.

*/ - GetPricesPrice: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - price: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - PostPricesPrice: { - parameters: { - path: { - price: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean - } - } - } - } - /**

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

*/ - GetProducts: { - parameters: { - query: { - /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return products that were created during the given date interval. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return products with the given IDs. */ - ids?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Only return products with the given url. */ - url?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['product'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + payment_method_options?: { + acss_debit?: ( + | ({ + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + affirm?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + afterpay_clearpay?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + alipay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + au_becs_debit?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bacs_debit?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + blik?: ( + | ({ + code?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + boleto?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: ( + | ({ + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: (string | '') & { [key: string]: unknown } + statement_descriptor_suffix_kanji?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card_present?: ( + | ({ + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } & { [key: string]: unknown } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + eps?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + fpx?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + giropay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + grabpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + ideal?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + interac_present?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + klarna?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ( + | ({ + confirmation_number?: string + expires_after_days?: (number | '') & { [key: string]: unknown } + expires_at?: (number | '') & { [key: string]: unknown } + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + link?: ( + | ({ + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + oxxo?: ( + | ({ + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + p24?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + paynow?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + pix?: ( + | ({ + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + promptpay?: ( + | ({ + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sepa_debit?: ( + | ({ + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + sofort?: ( + | ({ + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + wechat_pay?: ( + | ({ + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new product object.

*/ - PostProducts: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ - package_dimensions?: { - height: number - length: number - weight: number - width: number + radar_options?: { + session?: string } & { [key: string]: unknown } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: (string | '') & { [key: string]: unknown } /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * - * 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. + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string - } - } - } - } - /**

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

*/ - GetProductsId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: ( + | ({ + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + carrier?: string + name: string + phone?: string + tracking_number?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } } - /**

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

*/ - PostProductsId: { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + PostPaymentIntentsIntentIncrementAuthorization: { parameters: { path: { - id: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -36544,59 +41422,42 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: (string[] | '') & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: ( - | ({ - height: number - length: number - weight: number - width: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean + metadata?: { [key: string]: string } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string /** - * @description 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`. + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: (string | '') & { [key: string]: unknown } - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string + transfer_data?: { + amount?: number + } & { [key: string]: unknown } } } } } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - DeleteProductsId: { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { parameters: { path: { - id: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_product'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -36608,32 +41469,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your promotion codes.

*/ - GetPromotionCodes: { + /**

Returns a list of your payment links.

*/ + GetPaymentLinks: { parameters: { query: { - /** Filter promotion codes by whether they are active. */ + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - code?: string - /** Only return promotion codes for this coupon. */ - coupon?: string - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return promotion codes that are restricted to this customer. */ - customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -36649,7 +41503,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['promotion_code'][] + data: components['schemas']['payment_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36675,13 +41529,13 @@ export interface operations { } } } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - PostPromotionCodes: { + /**

Creates a payment link.

*/ + PostPaymentLinks: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -36694,54 +41548,427 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ - active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string - /** @description The coupon for this promotion code. */ - coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + * after_completion_params + * @description Behavior after the purchase is complete. */ - expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } & { [key: string]: unknown } + /** after_completion_redirect_params */ + redirect?: { + url: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } & { [key: string]: unknown } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * @description Configuration for collecting the customer's billing address. + * @enum {string} + */ + billing_address_collection?: 'auto' | 'required' + /** + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' + } & { [key: string]: unknown } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: 'always' | 'if_required' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items: ({ + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } & { [key: string]: unknown } + price: string + quantity: number + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. */ - restrictions?: { - first_time_transaction?: boolean - minimum_amount?: number - minimum_amount_currency?: string + payment_intent_data?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + } & { [key: string]: unknown } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } & { [key: string]: unknown } + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: ({ + shipping_rate?: string + } & { [key: string]: unknown })[] + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + description?: string + trial_period_days?: number + } & { [key: string]: unknown } + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number + destination: string } & { [key: string]: unknown } } } } } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - GetPromotionCodesPromotionCode: { + /**

Retrieve a payment link.

*/ + GetPaymentLinksPaymentLink: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - promotion_code: string + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -36757,18 +41984,18 @@ export interface operations { } } } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - PostPromotionCodesPromotionCode: { + /**

Updates a payment link.

*/ + PostPaymentLinksPaymentLink: { parameters: { path: { - promotion_code: string + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -36781,180 +42008,340 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - } - } - } - } - /**

Returns a list of your quotes.

*/ - GetQuotes: { - parameters: { - query: { - /** The ID of the customer whose quotes will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the quote. */ - status?: 'accepted' | 'canceled' | 'draft' | 'open' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['quote'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + /** + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } & { [key: string]: unknown } + /** after_completion_redirect_params */ + redirect?: { + url: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' } & { [key: string]: unknown } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - PostQuotes: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: (number | '') & { [key: string]: unknown } - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: (number | '') & { [key: string]: unknown } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + * automatic_tax_params + * @description Configuration for automatic tax collection. */ automatic_tax?: { enabled: boolean } & { [key: string]: unknown } /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: ( - | ({ - coupon?: string - discount?: string - } & { [key: string]: unknown })[] - | '' - ) & { [key: string]: unknown } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string - /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - */ - from_quote?: { - is_revision?: boolean - quote: string - } & { [key: string]: unknown } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string + billing_address_collection?: 'auto' | 'required' /** - * quote_param - * @description All invoices will be billed using the specified settings. + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} */ - invoice_settings?: { - days_until_due?: number - } & { [key: string]: unknown } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + customer_creation?: 'always' | 'if_required' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ line_items?: ({ - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number } & { [key: string]: unknown } + id: string quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: (string | '') & { [key: string]: unknown } /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} */ - subscription_data?: { - effective_date?: ('current_period_end' | number | '') & { [key: string]: unknown } - trial_period_days?: (number | '') & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: ( + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: ( + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + ) & { [key: string]: unknown } + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: ( | ({ - amount?: number - amount_percent?: number - destination: string + 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]: unknown }) | '' ) & { [key: string]: unknown } @@ -36962,22 +42349,40 @@ export interface operations { } } } - /**

Retrieves the quote with the given ID.

*/ - GetQuotesQuote: { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

A quote models prices and services for a customer.

*/ - PostQuotesQuote: { + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + GetPaymentMethods: { parameters: { - path: { - quote: string + 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: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -37016,145 +42471,21 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: (number | '') & { [key: string]: unknown } - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: (number | '') & { [key: string]: unknown } - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - /** @description A description that will be displayed on the quote PDF. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: ( - | ({ - coupon?: string - discount?: string - } & { [key: string]: unknown })[] - | '' - ) & { [key: string]: unknown } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string - /** @description A header that will be displayed on the quote PDF. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } & { [key: string]: unknown } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: ({ - id?: string - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: (string | '') & { [key: string]: unknown } - /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - subscription_data?: { - effective_date?: ('current_period_end' | number | '') & { [key: string]: unknown } - trial_period_days?: (number | '') & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: ( - | ({ - amount?: number - amount_percent?: number - destination: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Accepts the specified quote.

*/ - PostQuotesQuoteAccept: { - parameters: { - path: { - quote: string - } - } + /** + *

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

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + PostPaymentMethods: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Cancels the quote.

*/ - PostQuotesQuoteCancel: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -37167,46 +42498,377 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } & { [key: string]: unknown } + /** + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + */ + affirm?: { [key: string]: unknown } + /** + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + afterpay_clearpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + alipay?: { [key: string]: unknown } + /** + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: { [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: { [key: string]: unknown } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: ( + | ({ + cvc?: string + exp_month: number + exp_year: number + number: string + } & { [key: string]: unknown }) + | ({ + token: string + } & { [key: string]: unknown }) + ) & { [key: string]: unknown } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: { [key: string]: unknown } + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: { [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: { [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: { [key: string]: unknown } + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: { [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: { [key: string]: unknown } + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: { [key: string]: unknown } + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: { [key: string]: unknown } + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } & { [key: string]: unknown } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: { [key: string]: unknown } } } } } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - GetQuotesQuoteComputedUpfrontLineItems: { + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

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

Finalizes the quote.

*/ - PostQuotesQuoteFinalize: { + /**

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

*/ + PostPaymentMethodsPaymentMethod: { parameters: { path: { - quote: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -37246,51 +42908,81 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. */ - expires_at?: number + link?: { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + } & { [key: string]: unknown } } } } } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetQuotesQuoteLineItems: { + /** + *

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 set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } path: { - quote: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -37302,26 +42994,27 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Download the PDF for a finalized quote

*/ - GetQuotesQuotePdf: { + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - quote: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/pdf': string + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -37333,26 +43026,47 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { + /**

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: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string + arrival_date?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** 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 - /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string } } responses: { @@ -37360,7 +43074,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.early_fraud_warning'][] + data: components['schemas']['payout'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37387,25 +43101,18 @@ export interface operations { } } /** - *

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

+ *

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.

* - *

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[] - } - } + *

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']['radar.early_fraud_warning'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37417,53 +43124,51 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} + */ + method?: 'instant' | 'standard' + /** + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ + statement_descriptor?: string + } } } } - /**

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

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: { - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields 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 + } + path: { + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['radar.value_list_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37479,13 +43184,18 @@ export interface operations { } } } - /**

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

*/ - PostRadarValueListItems: { + /**

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']['radar.value_list_item'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37500,30 +43210,24 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { + /**

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: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - item: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37535,22 +43239,29 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - DeleteRadarValueListItemsItem: { + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + PostPayoutsPayoutReverse: { parameters: { path: { - item: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list_item'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37562,18 +43273,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } } } } - /**

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

*/ - GetRadarValueLists: { + /**

Returns a list of your plans.

*/ + GetPlans: { 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 + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: ( | ({ gt?: number @@ -37589,6 +43304,8 @@ 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 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 } @@ -37598,7 +43315,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list'][] + /** @description Details about each object. */ + data: components['schemas']['plan'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37624,13 +43342,13 @@ export interface operations { } } } - /**

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

*/ - PostRadarValueLists: { + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + PostPlans: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -37643,39 +43361,105 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias: string + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + active?: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. * @enum {string} */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + product?: ( + | ({ + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } & { [key: string]: unknown }) + | string + ) & { [key: string]: unknown } + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: ({ + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: ('inf' | number) & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' + } & { [key: string]: unknown } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' } } } } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - value_list: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -37691,18 +43475,18 @@ export interface operations { } } } - /**

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

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: { - value_list: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -37715,30 +43499,34 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias?: string + /** @description Whether the plan is currently available for new subscriptions. */ + active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name?: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number } } } } - /**

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

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

*/ + DeletePlansPlan: { parameters: { path: { - value_list: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list'] + 'application/json': components['schemas']['deleted_plan'] } } /** Error response. */ @@ -37754,10 +43542,13 @@ export interface operations { } } } - /**

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

*/ - GetRecipients: { + /**

Returns a list of your prices.

*/ + GetPrices: { parameters: { query: { + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: ( | ({ gt?: number @@ -37767,17 +43558,29 @@ export interface operations { } & { [key: string]: unknown }) | number ) & { [key: string]: unknown } + /** Only return prices for the given currency. */ + currency?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** Only return the price with these lookup_keys, if any exist. */ + lookup_keys?: string[] + /** Only return prices for the given product. */ + product?: string + /** Only return prices with these recurring fields. */ + recurring?: { + /** @enum {string} */ + interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } & { [key: string]: unknown } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return prices of type `recurring` or `one_time`. */ + type?: 'one_time' | 'recurring' } } responses: { @@ -37785,7 +43588,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['recipient'][] + /** @description Details about each object. */ + data: components['schemas']['price'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37811,16 +43615,13 @@ export interface operations { } } } - /** - *

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

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + PostPrices: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37833,44 +43634,165 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: ({ + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: ('inf' | number) & { [key: string]: unknown } + } & { [key: string]: unknown })[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + } + /** + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string + metadata?: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** @description The ID of the product that this price will belong to. */ + product?: string + /** + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. + */ + product_data?: { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } & { [key: string]: unknown } + /** + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. + */ + recurring?: { + /** @enum {string} */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } & { [key: string]: unknown } + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: ({ + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: ('inf' | number) & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' + } & { [key: string]: unknown } + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string } } } } - /**

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

*/ - GetRecipientsId: { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPricesSearch: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - id: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': (components['schemas']['recipient'] | components['schemas']['deleted_recipient']) & { [key: string]: unknown } + 'application/json': { + data: components['schemas']['price'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -37886,24 +43808,22 @@ export interface operations { } } } - /** - *

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

Retrieves the price with the given ID.

*/ + GetPricesPrice: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37915,41 +43835,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + PostPricesPrice: { parameters: { path: { - id: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_recipient'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37961,16 +43862,64 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: ( + | { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: ({ + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: ('inf' | number) & { [key: string]: unknown } + } & { [key: string]: unknown })[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + } + | '' + ) & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + } } } } - /**

Returns a list of 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: { + /**

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 refunds for the charge specified by this charge ID. */ - charge?: string + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ created?: ( | ({ gt?: number @@ -37984,12 +43933,16 @@ export interface operations { ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + 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 refunds for the PaymentIntent specified by this ID. */ - payment_intent?: string + /** Only return products that can be shipped (i.e., physical, not digital products). */ + shippable?: boolean /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string + /** Only return products with the given url. */ + url?: string } } responses: { @@ -37997,7 +43950,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['refund'][] + /** @description Details about each object. */ + data: components['schemas']['product'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38023,13 +43977,13 @@ export interface operations { } } } - /**

Create a refund.

*/ - PostRefunds: { + /**

Creates a new product object.

*/ + PostProducts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -38042,37 +43996,159 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - amount?: number - charge?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean - } - } - } - } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: ({ + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: ('inf' | number) & { [key: string]: unknown } + } & { [key: string]: unknown })[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + } + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. */ + name: string + /** + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } & { [key: string]: unknown } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string + } + } + } + } + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetProductsSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['product'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an existing 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: { - refund: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -38088,22 +44164,18 @@ export interface operations { } } } - /** - *

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

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

*/ + PostProductsId: { parameters: { path: { - refund: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -38116,18 +44188,87 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: (string[] | '') & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description The product's name, meant to be displayable to the customer. */ + name?: string + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: ( + | ({ + height: number + length: number + weight: number + width: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: (string | '') & { [key: string]: unknown } + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: (string | '') & { [key: string]: unknown } } } } } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + DeleteProductsId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_product'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your promotion codes.

*/ + GetPromotionCodes: { parameters: { query: { + /** Filter promotion codes by whether they are active. */ + active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + code?: string + /** Only return promotion codes for this coupon. */ + coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: ( | ({ gt?: number @@ -38137,6 +44278,8 @@ export interface operations { } & { [key: string]: unknown }) | number ) & { [key: string]: unknown } + /** Only return promotion codes that are restricted to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -38152,7 +44295,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_run'][] + data: components['schemas']['promotion_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38178,13 +44321,13 @@ export interface operations { } } } - /**

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

*/ - PostReportingReportRuns: { + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + PostPromotionCodes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -38197,315 +44340,1675 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. */ + active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string + /** @description The coupon for this promotion code. */ + coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - /** Format: unix-time */ - interval_end?: number - /** Format: unix-time */ - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' - | 'Africa/Kampala' - | 'Africa/Khartoum' - | 'Africa/Kigali' - | 'Africa/Kinshasa' - | 'Africa/Lagos' - | 'Africa/Libreville' - | 'Africa/Lome' - | 'Africa/Luanda' - | 'Africa/Lubumbashi' - | 'Africa/Lusaka' - | 'Africa/Malabo' - | 'Africa/Maputo' - | 'Africa/Maseru' - | 'Africa/Mbabane' - | 'Africa/Mogadishu' - | 'Africa/Monrovia' - | 'Africa/Nairobi' - | 'Africa/Ndjamena' - | 'Africa/Niamey' - | 'Africa/Nouakchott' - | 'Africa/Ouagadougou' - | 'Africa/Porto-Novo' - | 'Africa/Sao_Tome' - | 'Africa/Timbuktu' - | 'Africa/Tripoli' - | 'Africa/Tunis' - | 'Africa/Windhoek' - | 'America/Adak' - | 'America/Anchorage' - | 'America/Anguilla' - | 'America/Antigua' - | 'America/Araguaina' - | 'America/Argentina/Buenos_Aires' - | 'America/Argentina/Catamarca' - | 'America/Argentina/ComodRivadavia' - | 'America/Argentina/Cordoba' - | 'America/Argentina/Jujuy' - | 'America/Argentina/La_Rioja' - | 'America/Argentina/Mendoza' - | 'America/Argentina/Rio_Gallegos' - | 'America/Argentina/Salta' - | 'America/Argentina/San_Juan' - | 'America/Argentina/San_Luis' - | 'America/Argentina/Tucuman' - | 'America/Argentina/Ushuaia' - | 'America/Aruba' - | 'America/Asuncion' - | 'America/Atikokan' - | 'America/Atka' - | 'America/Bahia' - | 'America/Bahia_Banderas' - | 'America/Barbados' - | 'America/Belem' - | 'America/Belize' - | 'America/Blanc-Sablon' - | 'America/Boa_Vista' - | 'America/Bogota' - | 'America/Boise' - | 'America/Buenos_Aires' - | 'America/Cambridge_Bay' - | 'America/Campo_Grande' - | 'America/Cancun' - | 'America/Caracas' - | 'America/Catamarca' - | 'America/Cayenne' - | 'America/Cayman' - | 'America/Chicago' - | 'America/Chihuahua' - | 'America/Coral_Harbour' - | 'America/Cordoba' - | 'America/Costa_Rica' - | 'America/Creston' - | 'America/Cuiaba' - | 'America/Curacao' - | 'America/Danmarkshavn' - | 'America/Dawson' - | 'America/Dawson_Creek' - | 'America/Denver' - | 'America/Detroit' - | 'America/Dominica' - | 'America/Edmonton' - | 'America/Eirunepe' - | 'America/El_Salvador' - | 'America/Ensenada' - | 'America/Fort_Nelson' - | 'America/Fort_Wayne' - | 'America/Fortaleza' - | 'America/Glace_Bay' - | 'America/Godthab' - | 'America/Goose_Bay' - | 'America/Grand_Turk' - | 'America/Grenada' - | 'America/Guadeloupe' - | 'America/Guatemala' - | 'America/Guayaquil' - | 'America/Guyana' - | 'America/Halifax' - | 'America/Havana' - | 'America/Hermosillo' - | 'America/Indiana/Indianapolis' - | 'America/Indiana/Knox' - | 'America/Indiana/Marengo' - | 'America/Indiana/Petersburg' - | 'America/Indiana/Tell_City' - | 'America/Indiana/Vevay' - | 'America/Indiana/Vincennes' - | 'America/Indiana/Winamac' - | 'America/Indianapolis' - | 'America/Inuvik' - | 'America/Iqaluit' - | 'America/Jamaica' - | 'America/Jujuy' - | 'America/Juneau' - | 'America/Kentucky/Louisville' - | 'America/Kentucky/Monticello' - | 'America/Knox_IN' - | 'America/Kralendijk' - | 'America/La_Paz' - | 'America/Lima' - | 'America/Los_Angeles' - | 'America/Louisville' - | 'America/Lower_Princes' - | 'America/Maceio' - | 'America/Managua' - | 'America/Manaus' - | 'America/Marigot' - | 'America/Martinique' - | 'America/Matamoros' - | 'America/Mazatlan' - | 'America/Mendoza' - | 'America/Menominee' - | 'America/Merida' - | 'America/Metlakatla' - | 'America/Mexico_City' - | 'America/Miquelon' - | 'America/Moncton' - | 'America/Monterrey' - | 'America/Montevideo' - | 'America/Montreal' - | 'America/Montserrat' - | 'America/Nassau' - | 'America/New_York' - | 'America/Nipigon' - | 'America/Nome' - | 'America/Noronha' - | 'America/North_Dakota/Beulah' - | 'America/North_Dakota/Center' - | 'America/North_Dakota/New_Salem' - | 'America/Ojinaga' - | 'America/Panama' - | 'America/Pangnirtung' - | 'America/Paramaribo' - | 'America/Phoenix' - | 'America/Port-au-Prince' - | 'America/Port_of_Spain' - | 'America/Porto_Acre' - | 'America/Porto_Velho' - | 'America/Puerto_Rico' - | 'America/Punta_Arenas' - | 'America/Rainy_River' - | 'America/Rankin_Inlet' - | 'America/Recife' - | 'America/Regina' - | 'America/Resolute' - | 'America/Rio_Branco' - | 'America/Rosario' - | 'America/Santa_Isabel' - | 'America/Santarem' - | 'America/Santiago' - | 'America/Santo_Domingo' - | 'America/Sao_Paulo' - | 'America/Scoresbysund' - | 'America/Shiprock' - | 'America/Sitka' - | 'America/St_Barthelemy' - | 'America/St_Johns' - | 'America/St_Kitts' - | 'America/St_Lucia' - | 'America/St_Thomas' - | 'America/St_Vincent' - | 'America/Swift_Current' - | 'America/Tegucigalpa' - | 'America/Thule' - | 'America/Thunder_Bay' - | 'America/Tijuana' - | 'America/Toronto' - | 'America/Tortola' - | 'America/Vancouver' - | 'America/Virgin' - | 'America/Whitehorse' - | 'America/Winnipeg' - | 'America/Yakutat' - | 'America/Yellowknife' - | 'Antarctica/Casey' - | 'Antarctica/Davis' - | 'Antarctica/DumontDUrville' - | 'Antarctica/Macquarie' - | 'Antarctica/Mawson' - | 'Antarctica/McMurdo' - | 'Antarctica/Palmer' - | 'Antarctica/Rothera' - | 'Antarctica/South_Pole' - | 'Antarctica/Syowa' - | 'Antarctica/Troll' - | 'Antarctica/Vostok' - | 'Arctic/Longyearbyen' - | 'Asia/Aden' - | 'Asia/Almaty' - | 'Asia/Amman' - | 'Asia/Anadyr' - | 'Asia/Aqtau' - | 'Asia/Aqtobe' - | 'Asia/Ashgabat' - | 'Asia/Ashkhabad' - | 'Asia/Atyrau' - | 'Asia/Baghdad' - | 'Asia/Bahrain' - | 'Asia/Baku' - | 'Asia/Bangkok' - | 'Asia/Barnaul' - | 'Asia/Beirut' - | 'Asia/Bishkek' - | 'Asia/Brunei' - | 'Asia/Calcutta' - | 'Asia/Chita' - | 'Asia/Choibalsan' - | 'Asia/Chongqing' - | 'Asia/Chungking' - | 'Asia/Colombo' + expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } & { [key: string]: unknown } + } + first_time_transaction?: boolean + minimum_amount?: number + minimum_amount_currency?: string + } & { [key: string]: unknown } + } + } + } + } + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + GetPromotionCodesPromotionCode: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + promotion_code: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['promotion_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + PostPromotionCodesPromotionCode: { + parameters: { + path: { + promotion_code: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['promotion_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } & { [key: string]: unknown } + } + } & { [key: string]: unknown } + } + } + } + } + /**

Returns a list of your quotes.

*/ + GetQuotes: { + parameters: { + query: { + /** The ID of the customer whose quotes will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the quote. */ + status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['quote'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + PostQuotes: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: (number | '') & { [key: string]: unknown } + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: (number | '') & { [key: string]: unknown } + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: ( + | ({ + coupon?: string + discount?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean + quote: string + } & { [key: string]: unknown } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: (string | '') & { [key: string]: unknown } + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: ('current_period_end' | number | '') & { [key: string]: unknown } + trial_period_days?: (number | '') & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: ( + | ({ + amount?: number + amount_percent?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + GetQuotesQuote: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A quote models prices and services for a customer.

*/ + PostQuotesQuote: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: (number | '') & { [key: string]: unknown } + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: (number | '') & { [key: string]: unknown } + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + /** @description A description that will be displayed on the quote PDF. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: ( + | ({ + coupon?: string + discount?: string + } & { [key: string]: unknown })[] + | '' + ) & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string + /** @description A header that will be displayed on the quote PDF. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: ({ + id?: string + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: (string | '') & { [key: string]: unknown } + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: ('current_period_end' | number | '') & { [key: string]: unknown } + trial_period_days?: (number | '') & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: ( + | ({ + amount?: number + amount_percent?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } + } + } + } + /**

Accepts the specified quote.

*/ + PostQuotesQuoteAccept: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Cancels the quote.

*/ + PostQuotesQuoteCancel: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

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

Finalizes the quote.

*/ + PostQuotesQuoteFinalize: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + } + } + } + } + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Download the PDF for a finalized quote

*/ + GetQuotesQuotePdf: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/pdf': string + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

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

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

+ * + *

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

+ */ + GetRadarEarlyFraudWarningsEarlyFraudWarning: { + parameters: { + path: { + early_fraud_warning: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.early_fraud_warning'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + GetRadarValueListItems: { + parameters: { + query: { + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ + value?: string + /** Identifier for the parent value list this item belongs to. */ + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostRadarValueListItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string + } + } + } + } + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + DeleteRadarValueListItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + GetRadarValueLists: { + parameters: { + query: { + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.value_list'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostRadarValueLists: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} + */ + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + } + /**

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

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

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

Create a refund.

*/ + PostRefunds: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ + amount?: number + charge?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + } + } + } + } + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + PostRefundsRefundCancel: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

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

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

*/ + PostReportingReportRuns: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + /** Format: unix-time */ + interval_end?: number + /** Format: unix-time */ + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Timbuktu' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/Buenos_Aires' + | 'America/Argentina/Catamarca' + | 'America/Argentina/ComodRivadavia' + | 'America/Argentina/Cordoba' + | 'America/Argentina/Jujuy' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Mendoza' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Atikokan' + | 'America/Atka' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Ensenada' + | 'America/Fort_Nelson' + | 'America/Fort_Wayne' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Indianapolis' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Louisville' + | 'America/Kentucky/Monticello' + | 'America/Knox_IN' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Acre' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Rosario' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Shiprock' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Virgin' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/South_Pole' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Ashkhabad' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Chongqing' + | 'Asia/Chungking' + | 'Asia/Colombo' | 'Asia/Dacca' | 'Asia/Damascus' | 'Asia/Dhaka' @@ -38845,49 +46348,3906 @@ export interface operations { | 'WET' | 'Zulu' } & { [key: string]: unknown } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string - } - } - } - } - /**

Retrieves the details of an existing Report Run.

*/ - GetReportingReportRunsReportRun: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - report_run: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['reporting.report_run'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

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

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + GetSetupAttempts: { + parameters: { + query: { + /** + * A filter on the list, based on the object `created` field. The value + * can be a string with an integer Unix timestamp, or it can be a + * dictionary with a number of different query options. + */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** + * Only return SetupAttempts created by the SetupIntent specified by + * this ID. + */ + setup_intent: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_attempt'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

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

+ */ + PostSetupIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'offline' | 'online' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } & { [key: string]: unknown } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } & { [key: string]: unknown } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** param */ + wechat_pay?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } & { [key: string]: unknown } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } & { [key: string]: unknown } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + } + /** + *

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

+ * + *

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

+ * + *

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

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } & { [key: string]: unknown } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } & { [key: string]: unknown } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** param */ + wechat_pay?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } & { [key: string]: unknown } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

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

+ * + *

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

+ * + *

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

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This hash contains details about the Mandate to create */ + mandate_data?: ( + | ({ + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'offline' | 'online' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | ({ + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } & { [key: string]: unknown } + /** @enum {string} */ + type: 'online' + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + ) & { [key: string]: unknown } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } & { [key: string]: unknown } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } & { [key: string]: unknown } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } & { [key: string]: unknown } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } & { [key: string]: unknown } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } & { [key: string]: unknown } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } & { [key: string]: unknown } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } & { [key: string]: unknown } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } & { [key: string]: unknown } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } & { [key: string]: unknown } + /** param */ + sepa_debit?: { + iban: string + } & { [key: string]: unknown } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } & { [key: string]: unknown } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + /** param */ + wechat_pay?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: (string | '') & { [key: string]: unknown } + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } & { [key: string]: unknown } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } & { [key: string]: unknown } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } & { [key: string]: unknown } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + PostSetupIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + GetShippingRates: { + parameters: { + query: { + /** Only return shipping rates that are active or inactive. */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return shipping rates for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + PostShippingRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } + } + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + GetShippingRatesShippingRateToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + PostShippingRatesShippingRateToken: { + parameters: { + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: { + amount?: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } & { [key: string]: unknown } + } + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + } + /**

Returns a list of scheduled query runs.

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

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + GetSkus: { + parameters: { + query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: { [key: string]: string } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return SKUs with the given IDs. */ + ids?: string[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } & { [key: string]: unknown } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + } + /**

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

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': (components['schemas']['sku'] | components['schemas']['deleted_sku']) & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: ( + | ({ + height: number + length: number + weight: number + width: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + } + /**

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

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } & { [key: string]: unknown } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } & { [key: string]: unknown } + amount?: (number | '') & { [key: string]: unknown } + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + email?: string + name?: string + phone?: string + } & { [key: string]: unknown } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } & { [key: string]: unknown } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } & { [key: string]: unknown } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: ({ + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + } & { [key: string]: unknown })[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** @enum {string} */ + usage?: 'reusable' | 'single_use' + } + } + } + } + /**

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

*/ + GetSourcesSource: { + parameters: { + query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } & { [key: string]: unknown } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } & { [key: string]: unknown } + amount?: (number | '') & { [key: string]: unknown } + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } & { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + email?: string + name?: string + phone?: string + } & { [key: string]: unknown } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: ({ + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + } & { [key: string]: unknown })[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

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

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

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + } + /**

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

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

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

*/ + PostSubscriptionItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: (string[] | '') & { [key: string]: unknown } + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: (string[] | '') & { [key: string]: unknown } + } + } + } + } + /**

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

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + } + } + } + } + /** + *

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

+ * + *

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

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

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

+ * + *

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

+ * + *

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

+ * + *

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

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: ('now' | number) & { [key: string]: unknown } + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return subscription schedules that were created during the given date interval. */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostSubscriptionSchedules: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + transfer_data?: ( + | ({ + amount_percent?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: ({ + add_invoice_items?: ({ + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + currency?: string + default_payment_method?: string + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + description?: string + /** Format: unix-time */ + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + items: ({ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } & { [key: string]: unknown } + trial?: boolean + /** Format: unix-time */ + trial_end?: number + } & { [key: string]: unknown })[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: (number | 'now') & { [key: string]: unknown } + } + } + } + } + /**

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

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + transfer_data?: ( + | ({ + amount_percent?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: ({ + add_invoice_items?: ({ + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + description?: string + end_date?: (number | 'now') & { [key: string]: unknown } + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } & { [key: string]: unknown } + items: ({ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: (number | 'now') & { [key: string]: unknown } + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } & { [key: string]: unknown } + trial?: boolean + trial_end?: (number | 'now') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + } + /**

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

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + } + /**

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

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + } + /**

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

*/ + GetSubscriptions: { + parameters: { + query: { + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + current_period_end?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + current_period_start?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter for subscriptions that contain this recurring price ID. */ + price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ + PostSubscriptions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: ({ + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: ({ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: ( + | ({ + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + payment_method_types?: ( + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } & { [key: string]: unknown } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: ( + | ({ + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } & { [key: string]: unknown } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: ('now' | number) & { [key: string]: unknown } + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } } - /**

Returns a full list of Report Types.

*/ - GetReportingReportTypes: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetSubscriptionsSearch: { parameters: { 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: string } } responses: { @@ -38895,15 +50255,16 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_type'][] - /** @description True if this list has another page of items after this one that can be fetched. */ + data: components['schemas']['subscription'][] has_more: boolean + next_page?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'list' - /** @description The URL where this list can be accessed. */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number url: string } & { [key: string]: unknown } } @@ -38921,22 +50282,22 @@ export interface operations { } } } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - GetReportingReportTypesReportType: { + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_type: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_type'] + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -38952,45 +50313,18 @@ export interface operations { } } } - /**

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

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: { - query: { - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields 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_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['review'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -39002,26 +50336,278 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: ({ + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } & { [key: string]: unknown } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: ( + | ({ + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: (number | '') & { [key: string]: unknown } + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: (string[] | '') & { [key: string]: unknown } + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: ({ + billing_thresholds?: ( + | ({ + usage_gte: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } & { [key: string]: unknown } + quantity?: number + tax_rates?: (string[] | '') & { [key: string]: unknown } + } & { [key: string]: unknown })[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: ( + | ({ + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: ( + | ({ + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + bancontact?: ( + | ({ + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + card?: ( + | ({ + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } & { [key: string]: unknown } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + customer_balance?: ( + | ({ + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } & { [key: string]: unknown } + type?: string + } & { [key: string]: unknown } + funding_type?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + konbini?: ({ [key: string]: unknown } | '') & { [key: string]: unknown } + us_bank_account?: ( + | ({ + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } & { [key: string]: unknown } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + payment_method_types?: ( + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + ) & { [key: string]: unknown } + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } & { [key: string]: unknown } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: ( + | ({ + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: ( + | ({ + amount_percent?: number + destination: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: ('now' | number) & { [key: string]: unknown } + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } } } } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { + /** + *

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: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - review: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -39033,22 +50619,29 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } } } } - /**

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

*/ - PostReviewsReviewApprove: { + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { parameters: { path: { - review: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['deleted_discount'] } } /** Error response. */ @@ -39060,42 +50653,20 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - GetSetupAttempts: { + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + GetTaxCodes: { parameters: { query: { - /** - * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a - * dictionary with a number of different query options. - */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** - * Only return SetupAttempts created by the SetupIntent specified by - * this ID. - */ - setup_intent: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -39105,7 +50676,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['setup_attempt'][] + data: components['schemas']['tax_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39131,11 +50702,44 @@ export interface operations { } } } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + GetTaxCodesId: { parameters: { query: { - /** 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. */ + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_code'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + GetTaxRates: { + parameters: { + query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active?: boolean + /** Optional range for filtering created date. */ created?: ( | ({ gt?: number @@ -39145,16 +50749,14 @@ export interface operations { } & { [key: string]: unknown }) | number ) & { [key: string]: unknown } - /** 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[] + /** 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 - /** 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 } @@ -39164,7 +50766,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['setup_intent'][] + data: components['schemas']['tax_rate'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39190,18 +50792,13 @@ export interface operations { } } } - /** - *

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

Creates a new tax rate.

*/ + PostTaxRates: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -39214,122 +50811,51 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'offline' | 'online' - } & { [key: string]: unknown } - } & { [key: string]: unknown } + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: (string | '') & { [key: string]: unknown } - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } & { [key: string]: unknown } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } & { [key: string]: unknown } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @description The high-level tax type, such as `vat` or `sales_tax`. * @enum {string} */ - usage?: 'off_session' | 'on_session' + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /** - *

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

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { 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 + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -39345,18 +50871,18 @@ export interface operations { } } } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { parameters: { path: { - intent: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -39369,75 +50895,85 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: (string | '') & { [key: string]: unknown } - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } & { [key: string]: unknown } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /** - *

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

- * - *

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

- */ - PostSetupIntentsIntentCancel: { + /**

Returns a list of Configuration objects.

*/ + GetTerminalConfigurations: { parameters: { - path: { - intent: 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[] + /** if present, only return the account default or non-default configurations. */ + is_account_default?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': { + data: components['schemas']['terminal.configuration'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new Configuration object.

*/ + PostTerminalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.configuration'] } } /** Error response. */ @@ -39451,42 +50987,162 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + bbpos_wisepos_e?: { + splashscreen?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: ( + | ({ + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown } } } } } - /** - *

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

Retrieves a Configuration object.

*/ + GetTerminalConfigurationsConfiguration: { parameters: { path: { - intent: string + configuration: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': (components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration']) & { + [key: string]: unknown + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a new Configuration object.

*/ + PostTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': (components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration']) & { + [key: string]: unknown + } } } /** Error response. */ @@ -39499,98 +51155,150 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - client_secret?: string + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: ( + | ({ + splashscreen?: (string | '') & { [key: string]: unknown } + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description This hash contains details about the Mandate to create */ - mandate_data?: ( + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: ( | ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'offline' | 'online' + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } & { [key: string]: unknown } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number } & { [key: string]: unknown } } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: ( | ({ - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } & { [key: string]: unknown } - /** @enum {string} */ - type: 'online' - } & { [key: string]: unknown } + splashscreen?: (string | '') & { [key: string]: unknown } } & { [key: string]: unknown }) + | '' ) & { [key: string]: unknown } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: (string | '') & { [key: string]: unknown } - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } & { [key: string]: unknown } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string } } } } - /**

Verifies microdeposits on a SetupIntent object.

*/ - PostSetupIntentsIntentVerifyMicrodeposits: { + /**

Deletes a Configuration object.

*/ + DeleteTerminalConfigurationsConfiguration: { parameters: { path: { - intent: string + configuration: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['deleted_terminal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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. */ @@ -39603,34 +51311,18 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the SetupIntent. */ - client_secret?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string } } } - } - /**

Returns a list of your shipping rates.

*/ - GetShippingRates: { + } + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { parameters: { query: { - /** Only return shipping rates that are active or inactive. */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return shipping rates for the given currency. */ - currency?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -39646,7 +51338,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['shipping_rate'][] + data: components['schemas']['terminal.location'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39672,13 +51364,16 @@ export interface operations { } } } - /**

Creates a new shipping rate object.

*/ - PostShippingRates: { + /** + *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

+ */ + PostTerminalLocations: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.location'] } } /** Error response. */ @@ -39692,69 +51387,47 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + * create_location_address_param + * @description The full address of the location. */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } & { [key: string]: unknown } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } & { [key: string]: unknown } + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string } & { [key: string]: unknown } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number - currency: string - } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: 'fixed_amount' + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } - /**

Returns the shipping rate object with the given ID.

*/ - GetShippingRatesShippingRateToken: { + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - shipping_rate_token: string + location: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': (components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location']) & { + [key: string]: unknown + } } } /** Error response. */ @@ -39770,18 +51443,20 @@ export interface operations { } } } - /**

Updates an existing shipping rate object.

*/ - PostShippingRatesShippingRateToken: { + /**

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

*/ + PostTerminalLocationsLocation: { parameters: { path: { - shipping_rate_token: string + location: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': (components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location']) & { + [key: string]: unknown + } } } /** Error response. */ @@ -39794,8 +51469,22 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -39804,18 +51493,51 @@ export interface operations { } } } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { parameters: { query: { + /** Filters readers by device type */ + device_type?: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | '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: { @@ -39823,7 +51545,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['scheduled_query_run'][] + /** @description A list of readers */ + data: components['schemas']['terminal.reader'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39849,22 +51572,13 @@ export interface operations { } } } - /**

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

Creates a new Reader object.

*/ + PostTerminalReaders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['scheduled_query_run'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39876,50 +51590,39 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. */ + location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string + } } } } - /**

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

*/ - GetSkus: { + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { 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 + } + path: { + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': (components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader']) & { + [key: string]: unknown + } } } /** Error response. */ @@ -39935,13 +51638,20 @@ export interface operations { } } } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { + /**

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']['sku'] + 'application/json': (components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader']) & { + [key: string]: unknown + } } } /** Error response. */ @@ -39954,65 +51664,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } & { [key: string]: unknown } + /** @description The new label of the reader. */ + label?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. - */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } & { [key: string]: unknown } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } - /**

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

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': (components['schemas']['sku'] | components['schemas']['deleted_sku']) & { [key: string]: unknown } + 'application/json': components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -40028,22 +51701,18 @@ export interface operations { } } } - /** - *

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

Cancels the current reader action.

*/ + PostTerminalReadersReaderCancelAction: { parameters: { path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40056,59 +51725,63 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string + } + } + } + } + /**

Initiates a payment flow on a Reader.

*/ + PostTerminalReadersReaderProcessPaymentIntent: { + 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': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description PaymentIntent ID */ + payment_intent: string /** - * inventory_update_specs - * @description Description of the SKU's inventory. + * process_config + * @description Configuration overrides */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + process_config?: { + skip_tipping?: boolean } & { [key: string]: unknown } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: ( - | ({ - height: number - length: number - weight: number - width: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string } } } } - /**

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

*/ - DeleteSkusId: { + /**

Initiates a setup intent flow on a Reader.

*/ + PostTerminalReadersReaderProcessSetupIntent: { parameters: { path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40120,17 +51793,29 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description SetupIntent ID */ + setup_intent: string + } } } } - /**

Creates a new source object.

*/ - PostSources: { + /**

Sets reader display to show cart details.

*/ + PostTerminalReadersReaderSetReaderDisplay: { + parameters: { + path: { + reader: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40143,150 +51828,79 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } & { [key: string]: unknown } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } & { [key: string]: unknown } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } & { [key: string]: unknown } - amount?: (number | '') & { [key: string]: unknown } - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } & { [key: string]: unknown } - metadata?: { [key: string]: string } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - email?: string - name?: string - phone?: string - } & { [key: string]: unknown } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } & { [key: string]: unknown } /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + * cart + * @description Cart */ - redirect?: { - return_url: string + cart?: { + currency: string + line_items: ({ + amount: number + description: string + quantity: number + } & { [key: string]: unknown })[] + tax?: number + total: number } & { [key: string]: unknown } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + * @description Type + * @enum {string} */ - source_order?: { - items?: ({ - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - } & { [key: string]: unknown })[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** @enum {string} */ - usage?: 'reusable' | 'single_use' + type: 'cart' + } + } + } + } + /**

Create an incoming testmode bank transfer

*/ + PostTestHelpersCustomersCustomerFundCashBalance: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['customer_cash_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + reference?: string } } } } - /**

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

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + PostTestHelpersIssuingCardsCardShippingDeliver: { 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 + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40298,26 +51912,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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

Updates the shipping status of the specified Issuing Card object to failure.

*/ + PostTestHelpersIssuingCardsCardShippingFail: { parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40330,116 +51943,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } & { [key: string]: unknown } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } & { [key: string]: unknown } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } & { [key: string]: unknown } - amount?: (number | '') & { [key: string]: unknown } - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } & { [key: string]: unknown } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - email?: string - name?: string - phone?: string - } & { [key: string]: unknown } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: ({ - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - } & { [key: string]: unknown })[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } & { [key: string]: unknown } - } & { [key: string]: unknown } } } } } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + PostTestHelpersIssuingCardsCardShippingReturn: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - mandate_notification: string - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_mandate_notification'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40451,43 +51972,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + PostTestHelpersIssuingCardsCardShippingShip: { 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 + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['source_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40499,27 +52002,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

Expire a refund with a status of requires_action.

*/ + PostTestHelpersRefundsRefundExpire: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - source: string - source_transaction: string + refund: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_transaction'] + 'application/json': components['schemas']['refund'] } } /** Error response. */ @@ -40531,22 +52032,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { parameters: { path: { - source: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40559,16 +52063,26 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] + /** + * @description Simulated payment type + * @enum {string} + */ + type?: 'card_present' } } } } - /**

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

*/ - GetSubscriptionItems: { + /**

Returns a list of your test clocks.

*/ + GetTestHelpersTestClocks: { 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. */ @@ -40579,8 +52093,6 @@ 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 ID of the subscription whose items will be retrieved. */ - subscription: string } } responses: { @@ -40588,7 +52100,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['subscription_item'][] + data: components['schemas']['test_helpers.test_clock'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -40614,13 +52126,13 @@ export interface operations { } } } - /**

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

*/ - PostSubscriptionItems: { + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + PostTestHelpersTestClocks: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40633,89 +52145,35 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + * @description The initial frozen time for this test clock. */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: (string[] | '') & { [key: string]: unknown } + frozen_time: number + /** @description The name for this test clock. */ + name?: string } } } } - /**

Retrieves the subscription item with the given ID.

*/ - GetSubscriptionItemsItem: { + /**

Retrieves a test clock.

*/ + GetTestHelpersTestClocksTestClock: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - item: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40731,18 +52189,45 @@ export interface operations { } } } - /**

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

*/ - PostSubscriptionItemsItem: { + /**

Deletes a test clock.

*/ + DeleteTestHelpersTestClocksTestClock: { parameters: { path: { - item: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['deleted_test_helpers.test_clock'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + PostTestHelpersTestClocksTestClockAdvance: { + parameters: { + path: { + test_clock: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40755,85 +52240,80 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string + frozen_time: number + } + } + } + } + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdFail: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + * failure_details_params + * @description Details about a failed InboundTransfer. */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } + failure_details?: { /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' } & { [key: string]: unknown } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: (string[] | '') & { [key: string]: unknown } } } } } - /**

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

*/ - DeleteSubscriptionItemsItem: { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + PostTestHelpersTreasuryInboundTransfersIdReturn: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40846,63 +52326,162 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] } } } } - /** - *

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

- * - *

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

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdSucceed: { 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': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdFail: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdPost: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * returned_details_params + * @description Optional hash to set the the return code. + */ + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } & { [key: string]: unknown } + } } + } + } + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { + parameters: { path: { - subscription_item: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40914,30 +52493,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { parameters: { path: { - subscription_item: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['usage_record'] + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40950,95 +52524,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: ('now' | number) & { [key: string]: unknown } } } } } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { parameters: { - query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return subscription schedules that were created during the given date interval. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** 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 + path: { + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } & { [key: string]: unknown } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -41050,17 +52553,38 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } & { [key: string]: unknown } + } } } } - /**

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

*/ - PostSubscriptionSchedules: { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedCredits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -41073,156 +52597,46 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * source_params + * @description Initiating payment method details for the object. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: ( - | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + initiating_payment_method_details?: { /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string } & { [key: string]: unknown } - transfer_data?: ( - | ({ - amount_percent?: number - destination: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } } & { [key: string]: unknown } /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @description The rails used for the object. * @enum {string} */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: ({ - add_invoice_items?: ({ - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: ( - | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - /** Format: unix-time */ - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } & { [key: string]: unknown } - items: ({ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } & { [key: string]: unknown } - trial?: boolean - /** Format: unix-time */ - trial_end?: number - } & { [key: string]: unknown })[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: (number | 'now') & { [key: string]: unknown } + network: 'ach' | 'us_domestic_wire' } } } } - /**

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

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedDebits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -41234,22 +52648,50 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * @description The rails used for the object. + * @enum {string} + */ + network: 'ach' + } } } } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - } + /** + *

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']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41263,183 +52705,351 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * connect_js_account_token_specs + * @description Information for the account this token will represent. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean + account?: { + /** @enum {string} */ + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } & { [key: string]: unknown } + ownership_declaration_shown_and_signed?: boolean + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + dob?: ( + | ({ + day: number + month: number + year: number + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: (string[] | '') & { [key: string]: unknown } + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } & { [key: string]: unknown } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } } & { [key: string]: unknown } + tos_shown_and_accepted?: boolean + } & { [key: string]: unknown } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: ( - | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + account_holder_type?: 'company' | 'individual' + account_number: string /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } & { [key: string]: unknown } - transfer_data?: ( - | ({ - amount_percent?: number - destination: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + routing_number?: string } & { [key: string]: unknown } + card?: ( + | ({ + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + currency?: string + cvc?: string + exp_month: string + exp_year: string + name?: string + number: string + } & { [key: string]: unknown }) + | string + ) & { [key: string]: unknown } + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} + * cvc_params + * @description The updated CVC value this token will represent. */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + cvc_update?: { + cvc: string + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: ({ - add_invoice_items?: ({ - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string } & { [key: string]: unknown } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: ( + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } & { [key: string]: unknown } + dob?: ( | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean + day: number + month: number + year: number } & { [key: string]: unknown }) | '' ) & { [key: string]: unknown } - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - end_date?: (number | 'now') & { [key: string]: unknown } - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } & { [key: string]: unknown } + /** documents_param */ + passport?: { + files?: string[] + } & { [key: string]: unknown } + /** documents_param */ + visa?: { + files?: string[] + } & { [key: string]: unknown } } & { [key: string]: unknown } - items: ({ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: (string[] | '') & { [key: string]: unknown } + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + nationality?: string + phone?: string + political_exposure?: string + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown } + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: (number | '') & { [key: string]: unknown } + representative?: boolean + title?: string + } & { [key: string]: unknown } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } & { [key: string]: unknown } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: (number | 'now') & { [key: string]: unknown } - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string } & { [key: string]: unknown } - trial?: boolean - trial_end?: (number | 'now') & { [key: string]: unknown } - } & { [key: string]: unknown })[] + } & { [key: string]: unknown } /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} + * pii_token_specs + * @description The PII this token will represent. */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + pii?: { + id_number?: string + } & { [key: string]: unknown } } } } } - /**

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

Retrieves the token with the given ID.

*/ + GetTokensToken: { parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } - } - } - /**

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 + token: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41451,31 +53061,16 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

*/ - GetSubscriptions: { + /**

Returns a list of top-ups.

*/ + GetTopups: { parameters: { query: { - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - current_period_end?: ( + /** A positive integer representing how much to transfer. */ + amount?: ( | ({ gt?: number gte?: number @@ -41484,7 +53079,8 @@ export interface operations { } & { [key: string]: unknown }) | number ) & { [key: string]: unknown } - current_period_start?: ( + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: ( | ({ gt?: number gte?: number @@ -41493,20 +53089,16 @@ export interface operations { } & { [key: string]: unknown }) | number ) & { [key: string]: unknown } - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** Filter for subscriptions that contain this recurring price ID. */ - price?: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + status?: 'canceled' | 'failed' | 'pending' | 'succeeded' } } responses: { @@ -41514,7 +53106,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['subscription'][] + data: components['schemas']['topup'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41534,258 +53126,19 @@ export interface operations { } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostSubscriptions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: ({ - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: ( - | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: ({ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: ( - | ({ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - bancontact?: ( - | ({ - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card?: ( - | ({ - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } & { [key: string]: unknown } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - payment_method_types?: ( - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: ( - | ({ - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } & { [key: string]: unknown } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: ('now' | number) & { [key: string]: unknown } - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - subscription_exposed_id: string + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } + } + /**

Top up the balance of an account

*/ + PostTopups: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41797,22 +53150,43 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string + } } } } - /**

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

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: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41824,244 +53198,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: ({ - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } & { [key: string]: unknown } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: ( - | ({ - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: (number | '') & { [key: string]: unknown } - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: (string[] | '') & { [key: string]: unknown } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: ({ - billing_thresholds?: ( - | ({ - usage_gte: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } & { [key: string]: unknown } - quantity?: number - tax_rates?: (string[] | '') & { [key: string]: unknown } - } & { [key: string]: unknown })[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: ( - | ({ - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: ( - | ({ - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } & { [key: string]: unknown } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - bancontact?: ( - | ({ - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - card?: ( - | ({ - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } & { [key: string]: unknown } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - payment_method_types?: ( - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - ) & { [key: string]: unknown } - } & { [key: string]: unknown } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: ( - | ({ - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: ( - | ({ - amount_percent?: number - destination: string - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: ('now' | number) & { [key: string]: unknown } - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /** - *

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

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

*/ + PostTopupsTopup: { parameters: { path: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -42074,28 +53226,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { + /**

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

*/ + PostTopupsTopupCancel: { parameters: { path: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -42107,14 +53259,28 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - GetTaxCodes: { + /**

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

*/ + GetTransfers: { parameters: { query: { + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** 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. */ @@ -42123,6 +53289,8 @@ 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 + /** Only return transfers with the specified transfer group. */ + transfer_group?: string } } responses: { @@ -42130,7 +53298,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['tax_code'][] + /** @description Details about each object. */ + data: components['schemas']['transfer'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42156,22 +53325,13 @@ export interface operations { } } } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

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

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']['tax_code'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42183,44 +53343,56 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } } } } - /**

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

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: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - active?: boolean - /** Optional range for filtering created date. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** 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 } + path: { + id: string + } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['tax_rate'][] + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42246,13 +53418,24 @@ export interface operations { } } } - /**

Creates a new tax rate.

*/ - PostTaxRates: { + /** + *

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']['tax_rate'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42265,51 +53448,36 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean } } } } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { + /**

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42325,18 +53493,22 @@ export interface operations { } } } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { + /** + *

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42349,38 +53521,65 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /**

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

*/ - PostTerminalConnectionTokens: { + /**

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']['terminal.connection_token'] + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42395,24 +53594,30 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } } } } } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { + /**

Returns a list of CreditReversals.

*/ + GetTreasuryCreditReversals: { 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** 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 CreditReversals for the ReceivedCredit ID. */ + received_credit?: 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 CreditReversals for a given status. */ + status?: 'canceled' | 'posted' | 'processing' } } responses: { @@ -42420,7 +53625,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['terminal.location'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.credit_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42446,16 +53652,13 @@ export interface operations { } } } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - PostTerminalLocations: { + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + PostTreasuryCreditReversals: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42468,44 +53671,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - /** @description A name for the location. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** @description The ReceivedCredit to reverse. */ + received_credit: string } } } } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + GetTreasuryCreditReversalsCreditReversal: { parameters: { + path: { + credit_reversal: string + } 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'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42521,18 +53712,67 @@ export interface operations { } } } - /**

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

*/ - PostTerminalLocationsLocation: { + /**

Returns a list of DebitReversals.

*/ + GetTreasuryDebitReversals: { parameters: { - path: { - location: 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 DebitReversals for the ReceivedDebit ID. */ + received_debit?: string + /** Only return DebitReversals for a given resolution. */ + resolution?: 'lost' | 'won' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 DebitReversals for a given status. */ + status?: 'canceled' | 'completed' | 'processing' } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.debit_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + PostTreasuryDebitReversals: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42545,40 +53785,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - /** @description A name for the location. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** @description The ReceivedDebit to reverse. */ + received_debit: string } } } } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { + /**

Retrieves a DebitReversal object.

*/ + GetTreasuryDebitReversalsDebitReversal: { parameters: { path: { - location: string + debit_reversal: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.location'] + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42594,24 +53826,27 @@ export interface operations { } } } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { + /**

Returns a list of FinancialAccounts.

*/ + GetTreasuryFinancialAccounts: { parameters: { query: { - /** Filters readers by device type */ - device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** An object ID cursor for use in pagination. */ ending_before?: string /** Specifies which fields 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. */ + /** A limit ranging from 1 to 100 (defaults to 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. */ + /** An object ID cursor for use in pagination. */ starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: 'offline' | 'online' } } responses: { @@ -42619,8 +53854,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description A list of readers */ - data: components['schemas']['terminal.reader'][] + data: components['schemas']['treasury.financial_account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42646,13 +53880,13 @@ export interface operations { } } } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + PostTreasuryFinancialAccounts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42667,36 +53901,94 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. */ - location?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + deposit_insurance?: { + requested: boolean + } & { [key: string]: unknown } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** access */ + intra_stripe_flows?: { + requested: boolean + } & { [key: string]: unknown } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } & { [key: string]: unknown } + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: string[] } } } } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { + /**

Retrieves the details of a FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccount: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': (components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader']) & { - [key: string]: unknown - } + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42712,20 +54004,18 @@ export interface operations { } } } - /**

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

*/ - PostTerminalReadersReader: { + /**

Updates the details of a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccount: { parameters: { path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': (components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader']) & { - [key: string]: unknown - } + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42740,26 +54030,92 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The new label of the reader. */ - label?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + deposit_insurance?: { + requested: boolean + } & { [key: string]: unknown } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** access */ + intra_stripe_flows?: { + requested: boolean + } & { [key: string]: unknown } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean + } & { [key: string]: unknown } + } & { [key: string]: unknown } + } & { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } & { [key: string]: unknown } } } } } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccountFeatures: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42775,16 +54131,18 @@ export interface operations { } } } - /** - *

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

Updates the Features associated with a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccountFeatures: { + parameters: { + path: { + financial_account: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42798,331 +54156,185 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } & { [key: string]: unknown } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } & { [key: string]: unknown } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } & { [key: string]: unknown } - ownership_declaration_shown_and_signed?: boolean - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } & { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } & { [key: string]: unknown } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } & { [key: string]: unknown } - dob?: ( - | ({ - day: number - month: number - year: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: (string[] | '') & { [key: string]: unknown } - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } & { [key: string]: unknown } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } & { [key: string]: unknown } - } & { [key: string]: unknown } - } & { [key: string]: unknown } - tos_shown_and_accepted?: boolean - } & { [key: string]: unknown } - /** - * token_create_bank_account - * @description The bank account this token will represent. + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - routing_number?: string + card_issuing?: { + requested: boolean } & { [key: string]: unknown } - card?: ( - | ({ - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - currency?: string - cvc?: string - exp_month: string - exp_year: string - name?: string - number: string - } & { [key: string]: unknown }) - | string - ) & { [key: string]: unknown } - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string /** - * cvc_params - * @description The updated CVC value this token will represent. + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. */ - cvc_update?: { - cvc: string + deposit_insurance?: { + requested: boolean } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * person_token_specs - * @description Information for the person this token will represent. + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } & { [key: string]: unknown } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } & { [key: string]: unknown } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string + financial_addresses?: { + /** access */ + aba?: { + requested: boolean } & { [key: string]: unknown } - dob?: ( - | ({ - day: number - month: number - year: number - } & { [key: string]: unknown }) - | '' - ) & { [key: string]: unknown } - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } & { [key: string]: unknown } - /** documents_param */ - passport?: { - files?: string[] - } & { [key: string]: unknown } - /** documents_param */ - visa?: { - files?: string[] - } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean } & { [key: string]: unknown } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: (string[] | '') & { [key: string]: unknown } - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - nationality?: string - phone?: string - political_exposure?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: (number | '') & { [key: string]: unknown } - representative?: boolean - title?: string + } & { [key: string]: unknown } + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + intra_stripe_flows?: { + requested: boolean + } & { [key: string]: unknown } + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean } & { [key: string]: unknown } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } & { [key: string]: unknown } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean } & { [key: string]: unknown } } & { [key: string]: unknown } /** - * pii_token_specs - * @description The PII this token will represent. + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. */ - pii?: { - id_number?: string + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } & { [key: string]: unknown } + /** access */ + us_domestic_wire?: { + requested: boolean + } & { [key: string]: unknown } } & { [key: string]: unknown } } } } } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryInboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status?: 'canceled' | 'failed' | 'processing' | 'succeeded' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.inbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an InboundTransfer.

*/ + PostTreasuryInboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing InboundTransfer.

*/ + GetTreasuryInboundTransfersId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - token: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -43138,40 +54350,54 @@ export interface operations { } } } - /**

Returns a list of top-ups.

*/ - GetTopups: { + /**

Cancels an InboundTransfer.

*/ + PostTreasuryInboundTransfersInboundTransferCancel: { + parameters: { + path: { + inbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundPayments: { parameters: { query: { - /** A positive integer representing how much to transfer. */ - amount?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } + /** Only return OutboundPayments sent to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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' + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' } } responses: { @@ -43179,7 +54405,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['topup'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_payment'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43205,13 +54432,13 @@ export interface operations { } } } - /**

Top up the balance of an account

*/ - PostTopups: { + /**

Creates an OutboundPayment.

*/ + PostTreasuryOutboundPayments: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -43224,42 +54451,102 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + destination_payment_method?: string + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + destination_payment_method_data?: { + /** billing_details_inner_params */ + billing_details?: { + address?: ( + | ({ + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + email?: (string | '') & { [key: string]: unknown } + name?: string + phone?: string + } & { [key: string]: unknown } + financial_account?: string + metadata?: { [key: string]: string } + /** @enum {string} */ + type: 'financial_account' | 'us_bank_account' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + destination_payment_method_options?: { + us_bank_account?: ( + | ({ + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } + /** + * end_user_details_params + * @description End user details. + */ + end_user_details?: { + ip_address?: string + present: boolean + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + metadata?: { [key: string]: string } + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string } } } } - /**

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

*/ - GetTopupsTopup: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + GetTreasuryOutboundPaymentsId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -43275,18 +54562,93 @@ export interface operations { } } } - /**

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

*/ - PostTopupsTopup: { + /**

Cancel an OutboundPayment.

*/ + PostTreasuryOutboundPaymentsIdCancel: { parameters: { path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an OutboundTransfer.

*/ + PostTreasuryOutboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43299,28 +54661,82 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: ( + | ({ + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } & { [key: string]: unknown }) + | '' + ) & { [key: string]: unknown } + } & { [key: string]: unknown } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } + metadata?: { [key: string]: string } + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: string } } } } - /**

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

*/ - PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + GetTreasuryOutboundTransfersOutboundTransfer: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - topup: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + PostTreasuryOutboundTransfersOutboundTransferCancel: { + parameters: { + path: { + outbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43339,31 +54755,27 @@ export interface operations { } } } - /**

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

Returns a list of ReceivedCredits.

*/ + GetTreasuryReceivedCredits: { parameters: { query: { - created?: ( - | ({ - gt?: number - gte?: number - lt?: number - lte?: number - } & { [key: string]: unknown }) - | number - ) & { [key: string]: unknown } - /** 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[] + /** The FinancialAccount that received the funds. */ + financial_account: string /** 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 ReceivedCredits described by the flow. */ + linked_flows?: { + /** @enum {string} */ + source_flow_type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } & { [key: string]: unknown } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43372,7 +54784,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer'][] + data: components['schemas']['treasury.received_credit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43398,13 +54810,22 @@ export interface operations { } } } - /**

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

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + GetTreasuryReceivedCreditsId: { + 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']['transfer'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -43416,47 +54837,26 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Returns a list of ReceivedDebits.

*/ + GetTreasuryReceivedDebits: { 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[] + /** The FinancialAccount that funds were pulled from. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43465,7 +54865,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] + data: components['schemas']['treasury.received_debit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43491,15 +54891,13 @@ export interface operations { } } } - /** - *

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

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + GetTreasuryReceivedDebitsId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { id: string } @@ -43508,7 +54906,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -43520,37 +54918,65 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Retrieves a list of TransactionEntry objects.

*/ + GetTreasuryTransactionEntries: { parameters: { query: { + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + effective_at?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by?: 'created' | 'effective_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 TransactionEntries associated with this Transaction. */ + transaction?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -43566,22 +54992,22 @@ export interface operations { } } } - /** - *

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

Retrieves a TransactionEntry object.

*/ + GetTreasuryTransactionEntriesId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - transfer: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': components['schemas']['treasury.transaction_entry'] } } /** Error response. */ @@ -43593,34 +55019,68 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Retrieves a list of Transaction objects.

*/ + GetTreasuryTransactions: { parameters: { query: { + created?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - id: string - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by?: 'created' | 'posted_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status?: 'open' | 'posted' | 'void' + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions?: { + posted_at?: ( + | ({ + gt?: number + gte?: number + lt?: number + lte?: number + } & { [key: string]: unknown }) + | number + ) & { [key: string]: unknown } + } & { [key: string]: unknown } } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } & { [key: string]: unknown } } } /** Error response. */ @@ -43636,23 +55096,22 @@ export interface operations { } } } - /** - *

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

Retrieves the details of an existing Transaction.

*/ + GetTreasuryTransactionsId: { 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'] + 'application/json': components['schemas']['treasury.transaction'] } } /** Error response. */ @@ -43664,12 +55123,7 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: ({ [key: string]: string } | '') & { [key: string]: unknown } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } @@ -43838,6 +55292,7 @@ export interface operations { | '2019-12-03' | '2020-03-02' | '2020-08-27' + | '2022-08-01' /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: boolean /** @description An optional description of what the webhook is used for. */ @@ -43857,7 +55312,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43900,7 +55357,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43939,13 +55402,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -44014,16 +55474,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -44109,7 +55602,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -44152,7 +55647,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -44191,13 +55692,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -44266,16 +55764,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] diff --git a/test/v3/expected/stripe.exported-type.ts b/test/v3/expected/stripe.exported-type.ts index 2695484cb..594c8ef93 100644 --- a/test/v3/expected/stripe.exported-type.ts +++ b/test/v3/expected/stripe.exported-type.ts @@ -4,14 +4,6 @@ */ export type 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'] @@ -278,6 +270,20 @@ export type paths = { */ post: operations['PostApplicationFeesIdRefunds'] } + '/v1/apps/secrets': { + /**

List all secrets stored on the given scope.

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

Create or replace a secret in the secret store.

*/ + post: operations['PostAppsSecrets'] + } + '/v1/apps/secrets/delete': { + /**

Deletes a secret from the secret store by name and scope.

*/ + post: operations['PostAppsSecretsDelete'] + } + '/v1/apps/secrets/find': { + /**

Finds a secret in the secret store by name and scope.

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

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export type paths = { /**

Creates a session of the customer portal.

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

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

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

Retrieves the Bitcoin receiver with the given ID.

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

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

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

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

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

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

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

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetChargesSearch'] + } '/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'] @@ -502,6 +501,15 @@ export type paths = { /**

Creates a new customer object.

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

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

Retrieves a Customer object.

*/ get: operations['GetCustomersCustomer'] @@ -574,15 +582,41 @@ export type paths = { /**

Delete a specified source for a given customer.

*/ delete: operations['DeleteCustomersCustomerCardsId'] } + '/v1/customers/{customer}/cash_balance': { + /**

Retrieves a customer’s cash balance.

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

Changes the settings on a customer’s cash balance.

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

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

*/ + get: operations['GetCustomersCustomerCashBalanceTransactions'] + } + '/v1/customers/{customer}/cash_balance_transactions/{transaction}': { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

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

Removes the currently applied discount on a customer.

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

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

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

Returns a list of PaymentMethods for a given Customer

*/ get: operations['GetCustomersCustomerPaymentMethods'] } + '/v1/customers/{customer}/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + get: operations['GetCustomersCustomerPaymentMethodsPaymentMethod'] + } '/v1/customers/{customer}/sources': { /**

List sources for a specified customer.

*/ get: operations['GetCustomersCustomerSources'] @@ -716,6 +750,34 @@ export type paths = { /**

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

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetFinancialConnectionsAccounts'] + } + '/v1/financial_connections/accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetFinancialConnectionsAccountsAccount'] + } + '/v1/financial_connections/accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostFinancialConnectionsAccountsAccountDisconnect'] + } + '/v1/financial_connections/accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetFinancialConnectionsAccountsAccountOwners'] + } + '/v1/financial_connections/accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostFinancialConnectionsAccountsAccountRefresh'] + } + '/v1/financial_connections/sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostFinancialConnectionsSessions'] + } + '/v1/financial_connections/sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetFinancialConnectionsSessionsSession'] + } '/v1/identity/verification_reports': { /**

List all verification reports.

*/ get: operations['GetIdentityVerificationReports'] @@ -803,9 +865,18 @@ export type paths = { '/v1/invoices': { /**

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

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

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

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

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

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

@@ -863,18 +934,6 @@ export type paths = { /**

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'] @@ -953,22 +1012,42 @@ export type paths = { /**

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostLinkAccountSessions'] + } + '/v1/link_account_sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetLinkAccountSessionsSession'] + } + '/v1/linked_accounts': { + /**

Returns a list of Financial Connections Account objects.

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

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetLinkedAccountsAccount'] + } + '/v1/linked_accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostLinkedAccountsAccountDisconnect'] + } + '/v1/linked_accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetLinkedAccountsAccountOwners'] + } + '/v1/linked_accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostLinkedAccountsAccountRefresh'] + } '/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.

*/ + /**

Creates a new open order object.

*/ post: operations['PostOrders'] } '/v1/orders/{id}': { @@ -977,13 +1056,21 @@ export type paths = { /**

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

Cancels the order as well as the payment intent if one is attached.

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

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetOrdersIdLineItems'] + } + '/v1/orders/{id}/reopen': { + /**

Reopens a submitted order.

*/ + post: operations['PostOrdersIdReopen'] } - '/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/orders/{id}/submit': { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

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

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export type paths = { */ post: operations['PostPaymentIntents'] } + '/v1/payment_intents/search': { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPaymentIntentsSearch'] + } '/v1/payment_intents/{intent}': { /** *

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

@@ -1022,11 +1118,17 @@ export type paths = { */ post: operations['PostPaymentIntentsIntent'] } + '/v1/payment_intents/{intent}/apply_customer_balance': { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

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

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

* - *

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

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ post: operations['PostPaymentIntentsIntentCancel'] } @@ -1070,6 +1172,35 @@ export type paths = { */ post: operations['PostPaymentIntentsIntentConfirm'] } + '/v1/payment_intents/{intent}/increment_authorization': { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

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

Verifies microdeposits on a PaymentIntent object.

*/ post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] @@ -1091,7 +1222,7 @@ export type paths = { get: operations['GetPaymentLinksPaymentLinkLineItems'] } '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

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

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

@@ -1101,7 +1232,7 @@ export type paths = { post: operations['PostPaymentMethods'] } '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

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

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

*/ post: operations['PostPaymentMethodsPaymentMethod'] @@ -1112,9 +1243,11 @@ export type paths = { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export type paths = { post: operations['PostPaymentMethodsPaymentMethodAttach'] } '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ post: operations['PostPaymentMethodsPaymentMethodDetach'] } '/v1/payouts': { @@ -1176,6 +1309,15 @@ export type paths = { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ post: operations['PostPrices'] } + '/v1/prices/search': { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPricesSearch'] + } '/v1/prices/{price}': { /**

Retrieves the price with the given ID.

*/ get: operations['GetPricesPrice'] @@ -1188,6 +1330,15 @@ export type paths = { /**

Creates a new product object.

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

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetProductsSearch'] + } '/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'] @@ -1282,29 +1433,6 @@ export type paths = { /**

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'] @@ -1321,6 +1449,14 @@ export type paths = { */ post: operations['PostRefundsRefund'] } + '/v1/refunds/{refund}/cancel': { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

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

Returns a list of Report Runs, with the most recent appearing first.

*/ get: operations['GetReportingReportRuns'] @@ -1533,9 +1669,26 @@ export type paths = { '/v1/subscriptions': { /**

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

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

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

*/ + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

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

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetSubscriptionsSearch'] + } '/v1/subscriptions/{subscription_exposed_id}': { /**

Retrieves the subscription with the given ID.

*/ get: operations['GetSubscriptionsSubscriptionExposedId'] @@ -1555,7 +1708,7 @@ export type paths = { delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] } '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ get: operations['GetTaxCodes'] } '/v1/tax_codes/{id}': { @@ -1574,6 +1727,20 @@ export type paths = { /**

Updates an existing tax rate.

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

Returns a list of Configuration objects.

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

Creates a new Configuration object.

*/ + post: operations['PostTerminalConfigurations'] + } + '/v1/terminal/configurations/{configuration}': { + /**

Retrieves a Configuration object.

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

Updates a new Configuration object.

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

Deletes a Configuration object.

*/ + delete: operations['DeleteTerminalConfigurationsConfiguration'] + } '/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'] @@ -1609,6 +1776,110 @@ export type paths = { /**

Deletes a Reader object.

*/ delete: operations['DeleteTerminalReadersReader'] } + '/v1/terminal/readers/{reader}/cancel_action': { + /**

Cancels the current reader action.

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

Initiates a payment flow on a Reader.

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

Initiates a setup intent flow on a Reader.

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

Sets reader display to show cart details.

*/ + post: operations['PostTerminalReadersReaderSetReaderDisplay'] + } + '/v1/test_helpers/customers/{customer}/fund_cash_balance': { + /**

Create an incoming testmode bank transfer

*/ + post: operations['PostTestHelpersCustomersCustomerFundCashBalance'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/deliver': { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingDeliver'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/fail': { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingFail'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/return': { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingReturn'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/ship': { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingShip'] + } + '/v1/test_helpers/refunds/{refund}/expire': { + /**

Expire a refund with a status of requires_action.

*/ + post: operations['PostTestHelpersRefundsRefundExpire'] + } + '/v1/test_helpers/terminal/readers/{reader}/present_payment_method': { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + post: operations['PostTestHelpersTerminalReadersReaderPresentPaymentMethod'] + } + '/v1/test_helpers/test_clocks': { + /**

Returns a list of your test clocks.

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

Creates a new test clock that can be attached to new customers and quotes.

*/ + post: operations['PostTestHelpersTestClocks'] + } + '/v1/test_helpers/test_clocks/{test_clock}': { + /**

Retrieves a test clock.

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

Deletes a test clock.

*/ + delete: operations['DeleteTestHelpersTestClocksTestClock'] + } + '/v1/test_helpers/test_clocks/{test_clock}/advance': { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + post: operations['PostTestHelpersTestClocksTestClockAdvance'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/fail': { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdFail'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/return': { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdReturn'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed': { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdSucceed'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/fail': { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdFail'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/post': { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdPost'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/return': { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdReturn'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail': { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post': { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return': { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn'] + } + '/v1/test_helpers/treasury/received_credits': { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedCredits'] + } + '/v1/test_helpers/treasury/received_debits': { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

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

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export type paths = { */ post: operations['PostTransfersTransferReversalsId'] } + '/v1/treasury/credit_reversals': { + /**

Returns a list of CreditReversals.

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

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + post: operations['PostTreasuryCreditReversals'] + } + '/v1/treasury/credit_reversals/{credit_reversal}': { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + get: operations['GetTreasuryCreditReversalsCreditReversal'] + } + '/v1/treasury/debit_reversals': { + /**

Returns a list of DebitReversals.

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

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + post: operations['PostTreasuryDebitReversals'] + } + '/v1/treasury/debit_reversals/{debit_reversal}': { + /**

Retrieves a DebitReversal object.

*/ + get: operations['GetTreasuryDebitReversalsDebitReversal'] + } + '/v1/treasury/financial_accounts': { + /**

Returns a list of FinancialAccounts.

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

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccounts'] + } + '/v1/treasury/financial_accounts/{financial_account}': { + /**

Retrieves the details of a FinancialAccount.

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

Updates the details of a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccount'] + } + '/v1/treasury/financial_accounts/{financial_account}/features': { + /**

Retrieves Features information associated with the FinancialAccount.

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

Updates the Features associated with a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccountFeatures'] + } + '/v1/treasury/inbound_transfers': { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

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

Creates an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfers'] + } + '/v1/treasury/inbound_transfers/{id}': { + /**

Retrieves the details of an existing InboundTransfer.

*/ + get: operations['GetTreasuryInboundTransfersId'] + } + '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel': { + /**

Cancels an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfersInboundTransferCancel'] + } + '/v1/treasury/outbound_payments': { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

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

Creates an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPayments'] + } + '/v1/treasury/outbound_payments/{id}': { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + get: operations['GetTreasuryOutboundPaymentsId'] + } + '/v1/treasury/outbound_payments/{id}/cancel': { + /**

Cancel an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPaymentsIdCancel'] + } + '/v1/treasury/outbound_transfers': { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

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

Creates an OutboundTransfer.

*/ + post: operations['PostTreasuryOutboundTransfers'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}': { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + get: operations['GetTreasuryOutboundTransfersOutboundTransfer'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel': { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + post: operations['PostTreasuryOutboundTransfersOutboundTransferCancel'] + } + '/v1/treasury/received_credits': { + /**

Returns a list of ReceivedCredits.

*/ + get: operations['GetTreasuryReceivedCredits'] + } + '/v1/treasury/received_credits/{id}': { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + get: operations['GetTreasuryReceivedCreditsId'] + } + '/v1/treasury/received_debits': { + /**

Returns a list of ReceivedDebits.

*/ + get: operations['GetTreasuryReceivedDebits'] + } + '/v1/treasury/received_debits/{id}': { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + get: operations['GetTreasuryReceivedDebitsId'] + } + '/v1/treasury/transaction_entries': { + /**

Retrieves a list of TransactionEntry objects.

*/ + get: operations['GetTreasuryTransactionEntries'] + } + '/v1/treasury/transaction_entries/{id}': { + /**

Retrieves a TransactionEntry object.

*/ + get: operations['GetTreasuryTransactionEntriesId'] + } + '/v1/treasury/transactions': { + /**

Retrieves a list of Transaction objects.

*/ + get: operations['GetTreasuryTransactions'] + } + '/v1/treasury/transactions/{id}': { + /**

Retrieves the details of an existing Transaction.

*/ + get: operations['GetTreasuryTransactionsId'] + } '/v1/webhook_endpoints': { /**

Returns a list of your webhook endpoints.

*/ get: operations['GetWebhookEndpoints'] @@ -1718,7 +2101,7 @@ export type components = { country?: string /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ created?: number /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1809,6 +2192,11 @@ export type components = { * @enum {string} */ acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + affirm_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1829,6 +2217,16 @@ export type components = { * @enum {string} */ bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + bank_transfer_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + blik_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1884,11 +2282,21 @@ export type components = { * @enum {string} */ klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + konbini_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the legacy payments capability of the account. * @enum {string} */ legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + link_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1899,6 +2307,16 @@ export type components = { * @enum {string} */ p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + paynow_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + promptpay_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1924,6 +2342,16 @@ export type components = { * @enum {string} */ transfers?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + treasury?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + us_bank_account_ach_payments?: 'active' | 'inactive' | 'pending' } /** AccountCapabilityFutureRequirements */ account_capability_future_requirements: { @@ -1986,6 +2414,10 @@ export type components = { decline_on?: components['schemas']['account_decline_charge_on'] /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ statement_descriptor_prefix?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountDashboardSettings */ account_dashboard_settings: { @@ -2057,6 +2489,10 @@ export type components = { statement_descriptor_kana?: string | null /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ statement_descriptor_kanji?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountPayoutSettings */ account_payout_settings: { @@ -2104,6 +2540,7 @@ export type components = { code: | 'invalid_address_city_state_postal_code' | 'invalid_street_address' + | 'invalid_tos_acceptance' | 'invalid_value_other' | 'verification_document_address_mismatch' | 'verification_document_address_missing' @@ -2167,6 +2604,16 @@ export type components = { payments: components['schemas']['account_payments_settings'] payouts?: components['schemas']['account_payout_settings'] sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + treasury?: components['schemas']['account_treasury_settings'] + } + /** AccountTermsOfService */ + account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string } /** AccountTOSAcceptance */ account_tos_acceptance: { @@ -2182,6 +2629,10 @@ export type components = { /** @description The user agent of the browser from which the account representative accepted their service agreement */ user_agent?: string | null } + /** AccountTreasurySettings */ + account_treasury_settings: { + tos_acceptance?: components['schemas']['account_terms_of_service'] + } /** AccountUnificationAccountController */ account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2207,39 +2658,6 @@ export type components = { /** @description State, county, province, or region. */ state?: string | null } - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } /** APIErrors */ api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2349,9 +2767,49 @@ export type components = { url: string } } + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + 'apps.secret': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description If true, indicates that this secret has been deleted */ + deleted?: boolean + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apps.secret' + /** @description The plaintext secret value to be stored. */ + payload?: string | null + scope: components['schemas']['secret_service_resource_scope'] + } /** AutomaticTax */ automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ enabled: boolean /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2569,6 +3027,94 @@ export type components = { */ status: string } + /** BankConnectionsResourceAccountholder */ + bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account?: string | components['schemas']['account'] + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer?: string | components['schemas']['customer'] + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + type: 'account' | 'customer' + } + /** BankConnectionsResourceBalance */ + bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + as_of: number + cash?: components['schemas']['bank_connections_resource_balance_api_resource_cash_balance'] + credit?: components['schemas']['bank_connections_resource_balance_api_resource_credit_balance'] + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + current: { [key: string]: number } + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + type: 'cash' | 'credit' + } + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + available?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + used?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceRefresh */ + bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } + /** BankConnectionsResourceLinkAccountSessionFilters */ + bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + countries?: string[] | null + } + /** BankConnectionsResourceOwnershipRefresh */ + bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } /** billing_details */ billing_details: { /** @description Billing address. */ @@ -2588,7 +3134,7 @@ export type components = { /** @description Whether the configuration is active and can be used to create portal sessions. */ active: boolean /** @description ID of the Connect Application that created the configuration. */ - application?: string | null + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null business_profile: components['schemas']['portal_business_profile'] /** * Format: unix-time @@ -2604,6 +3150,7 @@ export type components = { is_default: boolean /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + login_page: components['schemas']['portal_login_page'] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null /** @@ -2711,101 +3258,10 @@ export type components = { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ on_behalf_of?: string | null /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string + return_url?: string | null /** @description The short-lived URL of the session that gives customers access to the customer portal. */ url: string } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null - } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2905,8 +3361,8 @@ export type components = { * @enum {string} */ object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: (string | components['schemas']['recipient']) | null + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + status?: string | null /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ tokenization_method?: string | null } @@ -2927,6 +3383,24 @@ export type components = { } /** card_mandate_payment_method_details */ card_mandate_payment_method_details: { [key: string]: unknown } + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + available?: { [key: string]: number } | null + /** @description The ID of the customer whose cash balance this object represents. */ + customer: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'cash_balance' + settings: components['schemas']['customer_balance_customer_balance_settings'] + } /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2968,6 +3442,8 @@ export type components = { description?: string | null /** @description Whether the charge has been disputed. */ disputed: boolean + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ failure_code?: string | null /** @description Message to user further explaining reason for charge failure if available. */ @@ -2989,8 +3465,6 @@ export type components = { object: 'charge' /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the order this charge is for if one exists. */ - order?: (string | components['schemas']['order']) | null /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ outcome?: components['schemas']['charge_outcome'] | null /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ @@ -3001,6 +3475,7 @@ export type components = { payment_method?: string | null /** @description Details about the payment method at the time of the transaction. */ payment_method_details?: components['schemas']['payment_method_details'] | null + radar_options?: components['schemas']['radar_radar_options'] /** @description This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3013,7 +3488,7 @@ export type components = { * RefundList * @description A list of refunds that have been applied to the charge. */ - refunds: { + refunds?: { /** @description Details about each object. */ data: components['schemas']['refund'][] /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3094,7 +3569,7 @@ export type components = { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ 'checkout.session': { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ @@ -3123,6 +3598,11 @@ export type components = { consent?: components['schemas']['payment_pages_checkout_session_consent'] | null /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null /** @@ -3138,7 +3618,7 @@ export type components = { * @enum {string|null} */ customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null /** * @description If provided, this value will be used when the Customer object is created. @@ -3242,6 +3722,11 @@ export type components = { payment_intent?: (string | components['schemas']['payment_intent']) | null /** @description The ID of the Payment Link that created this Session. */ payment_link?: (string | components['schemas']['payment_link']) | null + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + payment_method_collection?: ('always' | 'if_required') | null /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null /** @@ -3260,14 +3745,14 @@ export type components = { recovered_from?: string | null /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description Shipping information for this Checkout Session. */ - shipping?: components['schemas']['shipping'] | null /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['payment_pages_checkout_session_shipping_cost'] | null + /** @description Shipping information for this Checkout Session. */ + shipping_details?: components['schemas']['shipping'] | null /** @description The shipping rate options applied to this Session. */ shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: (string | components['schemas']['shipping_rate']) | null /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3291,7 +3776,10 @@ export type components = { tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] /** @description Tax and discount details for the computed total amount. */ total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null - /** @description The URL to the Checkout Session. */ + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ url?: string | null } /** CheckoutAcssDebitMandateOptions */ @@ -3321,27 +3809,359 @@ export type components = { */ currency?: 'cad' | 'usd' mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** CheckoutAffirmPaymentMethodOptions */ + checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAlipayPaymentMethodOptions */ + checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAuBecsDebitPaymentMethodOptions */ + checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutBacsDebitPaymentMethodOptions */ + checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutBancontactPaymentMethodOptions */ + checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** CheckoutBoletoPaymentMethodOptions */ checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutCardInstallmentsOptions */ + checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + enabled?: boolean + } + /** CheckoutCardPaymentMethodOptions */ + checkout_card_payment_method_options: { + installments?: components['schemas']['checkout_card_installments_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string + } + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + checkout_customer_balance_bank_transfer_payment_method_options: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** CheckoutCustomerBalancePaymentMethodOptions */ + checkout_customer_balance_payment_method_options: { + bank_transfer?: components['schemas']['checkout_customer_balance_bank_transfer_payment_method_options'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutEpsPaymentMethodOptions */ + checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutFpxPaymentMethodOptions */ + checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGiropayPaymentMethodOptions */ + checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGrabPayPaymentMethodOptions */ + checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutIdealPaymentMethodOptions */ + checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutKlarnaPaymentMethodOptions */ + checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutKonbiniPaymentMethodOptions */ + checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** CheckoutOxxoPaymentMethodOptions */ checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutP24PaymentMethodOptions */ + checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPaynowPaymentMethodOptions */ + checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPixPaymentMethodOptions */ + checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + expires_after_seconds?: number | null + } + /** CheckoutSepaDebitPaymentMethodOptions */ + checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** CheckoutSessionPaymentMethodOptions */ checkout_session_payment_method_options: { acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + affirm?: components['schemas']['checkout_affirm_payment_method_options'] + afterpay_clearpay?: components['schemas']['checkout_afterpay_clearpay_payment_method_options'] + alipay?: components['schemas']['checkout_alipay_payment_method_options'] + au_becs_debit?: components['schemas']['checkout_au_becs_debit_payment_method_options'] + bacs_debit?: components['schemas']['checkout_bacs_debit_payment_method_options'] + bancontact?: components['schemas']['checkout_bancontact_payment_method_options'] boleto?: components['schemas']['checkout_boleto_payment_method_options'] + card?: components['schemas']['checkout_card_payment_method_options'] + customer_balance?: components['schemas']['checkout_customer_balance_payment_method_options'] + eps?: components['schemas']['checkout_eps_payment_method_options'] + fpx?: components['schemas']['checkout_fpx_payment_method_options'] + giropay?: components['schemas']['checkout_giropay_payment_method_options'] + grabpay?: components['schemas']['checkout_grab_pay_payment_method_options'] + ideal?: components['schemas']['checkout_ideal_payment_method_options'] + klarna?: components['schemas']['checkout_klarna_payment_method_options'] + konbini?: components['schemas']['checkout_konbini_payment_method_options'] oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + p24?: components['schemas']['checkout_p24_payment_method_options'] + paynow?: components['schemas']['checkout_paynow_payment_method_options'] + pix?: components['schemas']['checkout_pix_payment_method_options'] + sepa_debit?: components['schemas']['checkout_sepa_debit_payment_method_options'] + sofort?: components['schemas']['checkout_sofort_payment_method_options'] + us_bank_account?: components['schemas']['checkout_us_bank_account_payment_method_options'] + } + /** CheckoutSofortPaymentMethodOptions */ + checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutUsBankAccountPaymentMethodOptions */ + checkout_us_bank_account_payment_method_options: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' } /** ConnectCollectionTransfer */ connect_collection_transfer: { @@ -3405,8 +4225,8 @@ export type components = { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3419,6 +4239,8 @@ export type components = { created: number /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ currency?: string | null + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['coupon_currency_option'] } /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3458,6 +4280,11 @@ export type components = { /** @description A list of product IDs this coupon applies to */ products: string[] } + /** CouponCurrencyOption */ + coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: number + } /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3532,12 +4359,16 @@ export type components = { * @enum {string} */ status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ subtotal: number + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + subtotal_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ tax_amounts: components['schemas']['credit_note_tax_amount'][] /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ total: number + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax?: number | null /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3553,6 +4384,8 @@ export type components = { credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Description of the item being credited. */ description?: string | null /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3588,6 +4421,11 @@ export type components = { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** CreditNoteTaxAmount */ credit_note_tax_amount: { @@ -3598,6 +4436,34 @@ export type components = { /** @description The tax rate that was applied to get this tax amount. */ tax_rate: string | components['schemas']['tax_rate'] } + /** CurrencyOption */ + currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['price_tier'][] + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null + } + /** CustomUnitAmount */ + custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + maximum?: number | null + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum?: number | null + /** @description The starting unit amount which can be updated by the customer. */ + preset?: number | null + } /** * Customer * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -3609,6 +4475,8 @@ export type components = { address?: components['schemas']['address'] | null /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ balance?: number + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + cash_balance?: components['schemas']['cash_balance'] | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3621,16 +4489,7 @@ export type 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?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. * @@ -3645,6 +4504,8 @@ export type components = { email?: string | null /** @description Unique identifier for the object. */ id: string + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + invoice_credit_balance?: { [key: string]: number } /** @description The prefix for the customer used to generate unique invoice numbers. */ invoice_prefix?: string | null invoice_settings?: components['schemas']['invoice_setting_customer_setting'] @@ -3673,13 +4534,7 @@ export type components = { */ sources?: { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -3730,6 +4585,8 @@ export type components = { /** @description The URL where this list can be accessed. */ url: string } + /** @description ID of the test clock this customer belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** customer_acceptance */ customer_acceptance: { @@ -3746,6 +4603,53 @@ export type components = { */ type: 'offline' | 'online' } + /** CustomerBalanceCustomerBalanceSettings */ + customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + reconciliation_mode: 'automatic' | 'manual' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: string | components['schemas']['payment_intent'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + bank_transfer: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + eu_bank_transfer?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer'] + /** @description The user-supplied reference field on the bank transfer. */ + reference?: string | null + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + bic?: string | null + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4?: string | null + /** @description The full name of the sender, as supplied by the sending bank. */ + sender_name?: string | null + } + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: string | components['schemas']['refund'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: string | components['schemas']['payment_intent'] + } /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3801,6 +4705,46 @@ export type components = { | 'unapplied_from_invoice' | 'unspent_receiver_credit' } + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + customer_cash_balance_transaction: { + applied_to_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer whose available cash balance changed as a result of this transaction. */ + customer: string | components['schemas']['customer'] + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + ending_balance: number + funded?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + net_amount: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_cash_balance_transaction' + refunded_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction'] + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + type: 'applied_to_payment' | 'funded' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'unapplied_from_payment' + unapplied_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction'] + } /** CustomerTax */ customer_tax: { /** @@ -3840,8 +4784,8 @@ export type components = { */ object: 'account' } - /** AlipayDeletedAccount */ - deleted_alipay_account: { + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3853,10 +4797,10 @@ export type components = { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'alipay_account' + object: 'apple_pay_domain' } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { + /** DeletedApplication */ + deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3864,11 +4808,13 @@ export type components = { deleted: true /** @description Unique identifier for the object. */ id: string + /** @description The name of the application. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'apple_pay_domain' + object: 'application' } /** DeletedBankAccount */ deleted_bank_account: { @@ -3887,21 +4833,6 @@ export type components = { */ object: 'bank_account' } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } /** DeletedCard */ deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4015,11 +4946,7 @@ export type components = { object: 'invoiceitem' } /** Polymorphic */ - deleted_payment_source: - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] + deleted_payment_source: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] /** DeletedPerson */ deleted_person: { /** @@ -4110,8 +5037,8 @@ export type components = { */ object: 'radar.value_list_item' } - /** DeletedTransferRecipient */ - deleted_recipient: { + /** DeletedSku */ + deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4123,10 +5050,10 @@ export type components = { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'recipient' + object: 'sku' } - /** DeletedSku */ - deleted_sku: { + /** DeletedSubscriptionItem */ + deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4138,10 +5065,10 @@ export type components = { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'sku' + object: 'subscription_item' } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { + /** deleted_tax_id */ + deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4153,10 +5080,10 @@ export type components = { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'subscription_item' + object: 'tax_id' } - /** deleted_tax_id */ - deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + 'deleted_terminal.configuration': { /** * @description Always true for a deleted object * @enum {boolean} @@ -4168,7 +5095,7 @@ export type components = { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'tax_id' + object: 'terminal.configuration' } /** TerminalLocationDeletedLocation */ 'deleted_terminal.location': { @@ -4200,6 +5127,21 @@ export type components = { */ object: 'terminal.reader' } + /** DeletedTestClock */ + 'deleted_test_helpers.test_clock': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'test_helpers.test_clock' + } /** NotificationWebhookEndpointDeleted */ deleted_webhook_endpoint: { /** @@ -4215,22 +5157,10 @@ export type components = { */ object: 'webhook_endpoint' } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4401,6 +5331,16 @@ export type components = { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number } + /** EmailSent */ + email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + email_sent_at: number + /** @description The recipient's email address. */ + email_sent_to: string + } /** EphemeralKey */ ephemeral_key: { /** @@ -4626,6 +5566,7 @@ export type components = { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** @description The size in bytes of the file object. */ size: number /** @description A user friendly title for the document. */ @@ -4670,6 +5611,175 @@ export type components = { /** @description The publicly accessible URL to download the file. */ url?: string | null } + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + 'financial_connections.account': { + /** @description The account holder that this account belongs to. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** @description The most recent information about the account's balance. */ + balance?: components['schemas']['bank_connections_resource_balance'] | null + /** @description The state of the most recent attempt to refresh the account balance. */ + balance_refresh?: components['schemas']['bank_connections_resource_balance_refresh'] | null + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + category: 'cash' | 'credit' | 'investment' | 'other' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the institution that holds this account. */ + institution_name: string + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account' + /** @description The most recent information about the account's owners. */ + ownership?: (string | components['schemas']['financial_connections.account_ownership']) | null + /** @description The state of the most recent attempt to refresh the account owners. */ + ownership_refresh?: components['schemas']['bank_connections_resource_ownership_refresh'] | null + /** @description The list of permissions granted by this account. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] | null + /** + * @description The status of the link to the account. + * @enum {string} + */ + status: 'active' | 'disconnected' | 'inactive' + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + subcategory: 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings' + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + supported_payment_method_types: ('link' | 'us_bank_account')[] + } + /** BankConnectionsResourceOwner */ + 'financial_connections.account_owner': { + /** @description The email address of the owner. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The full name of the owner. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_owner' + /** @description The ownership object that this owner belongs to. */ + ownership: string + /** @description The raw phone number of the owner. */ + phone?: string | null + /** @description The raw physical address of the owner. */ + raw_address?: string | null + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + refreshed_at?: number | null + } + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + 'financial_connections.account_ownership': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_ownership' + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + owners: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + 'financial_connections.session': { + /** @description The account holder for whom accounts are collected in this session. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + accounts: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description A value that will be passed to the client to launch the authentication flow. */ + client_secret: string + filters?: components['schemas']['bank_connections_resource_link_account_session_filters'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.session' + /** @description Permissions requested for accounts collected during this session. */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** FinancialReportingFinanceReportRunRunParameters */ financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4695,6 +5805,118 @@ export type components = { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ timezone?: string } + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + funding_instructions: { + bank_transfer: components['schemas']['funding_instructions_bank_transfer'] + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + funding_type: 'bank_transfer' + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'funding_instructions' + } + /** FundingInstructionsBankTransfer */ + funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + country: string + /** @description A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** + * @description The bank_transfer type + * @enum {string} + */ + type: 'eu_bank_transfer' | 'jp_bank_transfer' + } + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + funding_instructions_bank_transfer_financial_address: { + iban?: components['schemas']['funding_instructions_bank_transfer_iban_record'] + sort_code?: components['schemas']['funding_instructions_bank_transfer_sort_code_record'] + spei?: components['schemas']['funding_instructions_bank_transfer_spei_record'] + /** @description The payment networks supported by this FinancialAddress */ + supported_networks?: ('bacs' | 'fps' | 'sepa' | 'spei' | 'zengin')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'iban' | 'sort_code' | 'spei' | 'zengin' + zengin?: components['schemas']['funding_instructions_bank_transfer_zengin_record'] + } + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The BIC/SWIFT code of the account. */ + bic: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** @description The IBAN of the account. */ + iban: string + } + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The account number */ + account_number: string + /** @description The six-digit sort code */ + sort_code: string + } + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + bank_code: string + /** @description The short banking institution name */ + bank_name: string + /** @description The CLABE number */ + clabe: string + } + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + account_holder_name?: string | null + /** @description The account number */ + account_number?: string | null + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null + /** @description The bank code of the account */ + bank_code?: string | null + /** @description The bank name of the account */ + bank_name?: string | null + /** @description The branch code of the account */ + branch_code?: string | null + /** @description The branch name of the account */ + branch_name?: string | null + } /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -4999,7 +6221,7 @@ export type components = { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5045,6 +6267,42 @@ export type components = { /** @description The user’s verified data. */ verified_outputs?: components['schemas']['gelato_verified_outputs'] | null } + /** InboundTransfers */ + inbound_transfers: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['inbound_transfers_payment_method_details_us_bank_account'] + } + /** inbound_transfers_payment_method_details_us_bank_account */ + inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + network: 'ach' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** * Invoice * @description Invoices are statements of amounts owed by a customer, and are either @@ -5091,8 +6349,10 @@ export type components = { amount_due: number /** @description The amount, in %s, that was paid. */ amount_paid: number - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ amount_remaining: number + /** @description ID of the Connect Application that created the invoice. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ application_fee_amount?: number | null /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5157,16 +6417,7 @@ export type components = { /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates applied to this invoice, if any. */ default_tax_rates: components['schemas']['tax_rate'][] /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ @@ -5184,6 +6435,8 @@ export type components = { ending_balance?: number | null /** @description Footer displayed on the invoice. */ footer?: string | null + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice?: components['schemas']['invoices_from_invoice'] | null /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ hosted_invoice_url?: string | null /** @description Unique identifier for the object. */ @@ -5192,6 +6445,8 @@ export type components = { invoice_pdf?: string | null /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ last_finalization_error?: components['schemas']['api_errors'] | null + /** @description The ID of the most recent non-draft revision of this invoice */ + latest_revision?: (string | components['schemas']['invoice']) | null /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5252,6 +6507,8 @@ export type components = { quote?: (string | components['schemas']['quote']) | null /** @description This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number?: string | null + /** @description Options for invoice PDF rendering. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ starting_balance: number /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5266,15 +6523,21 @@ export type components = { subscription?: (string | components['schemas']['subscription']) | null /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ subtotal: number + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal_excluding_tax?: number | null /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ tax?: number | null + /** @description ID of the test clock this invoice belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null threshold_reason?: components['schemas']['invoice_threshold_reason'] /** @description Total after discounts and taxes. */ total: number /** @description The aggregate amounts calculated per discount across all line items. */ total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + total_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ total_tax_amounts: components['schemas']['invoice_tax_amount'][] /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ @@ -5285,6 +6548,11 @@ export type components = { */ webhooks_delivered_at?: number | null } + /** invoice_installments_card */ + invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + enabled?: boolean | null + } /** InvoiceItemThresholdReason */ invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5296,12 +6564,12 @@ export type components = { invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ end: number /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ start: number } @@ -5344,12 +6612,52 @@ export type components = { } /** invoice_payment_method_options_card */ invoice_payment_method_options_card: { + installments?: components['schemas']['invoice_installments_card'] /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic') | null } + /** invoice_payment_method_options_customer_balance */ + invoice_payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer'] + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + type?: string | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } + /** invoice_payment_method_options_konbini */ + invoice_payment_method_options_konbini: { [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account */ + invoice_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['invoice_payment_method_options_us_bank_account_linked_account_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'payment_method' | 'transactions')[] + } /** InvoiceSettingCustomField */ invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5365,12 +6673,19 @@ export type components = { default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description Default footer to be displayed on invoices for this customer. */ footer?: string | null + /** @description Default options for invoice PDF rendering for this customer. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null } /** InvoiceSettingQuoteSetting */ invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number | null } + /** InvoiceSettingRenderingOptions */ + invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display?: string | null + } /** InvoiceSettingSubscriptionScheduleSetting */ invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5453,6 +6768,8 @@ export type components = { subscription_item?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: components['schemas']['tax_rate'][] | null + /** @description ID of the test clock this invoice item belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description Unit amount (in the `currency` specified) of the invoice item. */ unit_amount?: number | null /** @@ -5461,6 +6778,25 @@ export type components = { */ unit_amount_decimal?: string | null } + /** InvoicesFromInvoice */ + invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + action: string + /** @description The invoice that was cloned. */ + invoice: string | components['schemas']['invoice'] + } + /** InvoicesLineItemsCreditedItems */ + invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + invoice: string + /** @description Credited invoice line items */ + invoice_line_items: string[] + } + /** InvoicesLineItemsProrationDetails */ + invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items?: components['schemas']['invoices_line_items_credited_items'] | null + } /** InvoicesPaymentMethodOptions */ invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ @@ -5469,9 +6805,17 @@ export type components = { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ card?: components['schemas']['invoice_payment_method_options_card'] | null + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** InvoicesPaymentSettings */ invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + default_mandate?: string | null /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ payment_method_options?: components['schemas']['invoices_payment_method_options'] | null /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ @@ -5485,12 +6829,18 @@ export type components = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null @@ -5498,13 +6848,14 @@ export type components = { /** InvoicesResourceInvoiceTaxID */ invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -5516,10 +6867,12 @@ export type components = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -5539,6 +6892,7 @@ export type components = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -5571,38 +6925,6 @@ export type components = { */ voided_at?: number | null } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5662,6 +6984,8 @@ export type components = { status: 'closed' | 'pending' | 'reversed' /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ transactions: components['schemas']['issuing.transaction'][] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + treasury?: components['schemas']['issuing_authorization_treasury'] | null verification_data: components['schemas']['issuing_authorization_verification_data'] /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null @@ -5677,14 +7001,14 @@ export type components = { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: ('lost' | 'stolen') | null + cancellation_reason?: ('design_rejected' | 'lost' | 'stolen') | null cardholder: components['schemas']['issuing.cardholder'] /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ currency: string /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ cvc?: string @@ -5692,6 +7016,8 @@ export type components = { exp_month: number /** @description The expiration year of the card. */ exp_year: number + /** @description The financial account this card is attached to. */ + financial_account?: string | null /** @description Unique identifier for the object. */ id: string /** @description The last 4 digits of the card number. */ @@ -5787,7 +7113,7 @@ export type components = { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number /** @description List of balance transactions associated with the dispute. */ balance_transactions?: components['schemas']['balance_transaction'][] | null @@ -5817,6 +7143,8 @@ export type components = { status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' /** @description The transaction being disputed. */ transaction: string | components['schemas']['issuing.transaction'] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_dispute_treasury'] | null } /** * IssuingSettlement @@ -5913,6 +7241,8 @@ export type components = { object: 'issuing.transaction' /** @description Additional purchase information that is optionally provided by the merchant. */ purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_transaction_treasury'] | null /** * @description The nature of the transaction. * @enum {string} @@ -6001,6 +7331,15 @@ export type components = { | 'webhook_declined' | 'webhook_timeout' } + /** IssuingAuthorizationTreasury */ + issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: string[] + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: string[] + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction?: string | null + } /** IssuingAuthorizationVerificationData */ issuing_authorization_verification_data: { /** @@ -6645,6 +7984,8 @@ export type components = { * @enum {string|null} */ carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** @description Additional information that may be required for clearing customs. */ + customs?: components['schemas']['issuing_card_shipping_customs'] | null /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6652,6 +7993,10 @@ export type components = { eta?: number | null /** @description Recipient name. */ name: string + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + phone_number?: string | null + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + require_signature?: boolean | null /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -6672,9 +8017,14 @@ export type components = { */ type: 'bulk' | 'individual' } + /** IssuingCardShippingCustoms */ + issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + eori_number?: string | null + } /** IssuingCardSpendingLimit */ issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -7633,7 +8983,7 @@ export type components = { } /** IssuingCardholderSpendingLimit */ issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -8090,6 +9440,13 @@ export type components = { */ received_at?: number | null } + /** IssuingDisputeTreasury */ + issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: string + } /** IssuingTransactionAmountDetails */ issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8171,13 +9528,24 @@ export type components = { /** @description The unit cost of the item in cents. */ unit_cost?: number | null } + /** IssuingTransactionTreasury */ + issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + received_credit?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + received_debit?: string | null + } /** * LineItem * @description A line item. */ item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: number /** @description Total before any discounts or taxes are applied. */ amount_subtotal: number + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: number /** @description Total after discounts and taxes. */ amount_total: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8195,6 +9563,12 @@ export type components = { object: 'item' /** @description The price used to generate the line item. */ price?: components['schemas']['price'] | null + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + product?: string | components['schemas']['product'] | components['schemas']['deleted_product'] /** @description The quantity of products being purchased. */ quantity?: number | null /** @description The taxes applied to the line item. */ @@ -8337,6 +9711,8 @@ export type components = { line_item: { /** @description The amount, in %s. */ amount: number + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8365,6 +9741,8 @@ export type components = { price?: components['schemas']['price'] | null /** @description Whether this is a proration. */ proration: boolean + /** @description Additional details for proration line items */ + proration_details?: components['schemas']['invoices_line_items_proration_details'] | null /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ quantity?: number | null /** @description The subscription that the invoice item pertains to, if any. */ @@ -8380,6 +9758,11 @@ export type components = { * @enum {string} */ type: 'invoiceitem' | 'subscription' + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** LineItemsDiscountAmount */ line_items_discount_amount: { @@ -8393,6 +9776,13 @@ export type components = { amount: number rate: components['schemas']['tax_rate'] } + /** linked_account_options_us_bank_account */ + linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** LoginLink */ login_link: { /** @@ -8473,17 +9863,50 @@ export type components = { /** @description The URL that will contain the mandate that the customer has signed. */ url: string } + /** mandate_blik */ + mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } + /** mandate_link */ + mandate_link: { [key: string]: unknown } /** mandate_multi_use */ mandate_multi_use: { [key: string]: unknown } + /** mandate_options_off_session_details_blik */ + mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + amount?: number | null + /** @description Currency of each recurring payment. */ + currency?: string | null + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + interval?: ('day' | 'month' | 'week' | 'year') | null + /** @description Frequency indicator of each recurring payment. */ + interval_count?: number | null + } /** mandate_payment_method_details */ mandate_payment_method_details: { acss_debit?: components['schemas']['mandate_acss_debit'] au_becs_debit?: components['schemas']['mandate_au_becs_debit'] bacs_debit?: components['schemas']['mandate_bacs_debit'] + blik?: components['schemas']['mandate_blik'] card?: components['schemas']['card_mandate_payment_method_details'] + link?: components['schemas']['mandate_link'] sepa_debit?: components['schemas']['mandate_sepa_debit'] /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['mandate_us_bank_account'] } /** mandate_sepa_debit */ mandate_sepa_debit: { @@ -8499,6 +9922,8 @@ export type components = { /** @description On a single use mandate, the currency of the payment. */ currency: string } + /** mandate_us_bank_account */ + mandate_us_bank_account: { [key: string]: unknown } /** networks */ networks: { /** @description All available networks for the card. */ @@ -8530,24 +9955,33 @@ export type components = { user_agent?: string | null } /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: (string | components['schemas']['charge']) | null + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + amount_subtotal: number + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + amount_total: number + /** @description ID of the Connect application that created the Order, if any. */ + application?: (string | components['schemas']['application']) | null + automatic_tax?: components['schemas']['orders_v2_resource_automatic_tax'] + /** @description Customer billing details associated with the order. */ + billing_details?: components['schemas']['orders_v2_resource_billing_details'] | null + /** @description The fields on the Order that can be updated from the client */ + client_permissions?: components['schemas']['orders_v2_resource_client_permissions'] | null + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + client_secret?: string | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8555,32 +9989,23 @@ export type components = { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The email address of the customer placing the order. */ - email?: string | null - /** @description External coupon code to load for this order. */ - external_coupon_code?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'])[] | null /** @description Unique identifier for the object. */ id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order' + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + ip_address?: string | null /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. */ - returns?: { + line_items?: { /** @description Details about each object. */ - data: components['schemas']['order_return'][] + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -8590,83 +10015,391 @@ export type components = { object: 'list' /** @description The URL where this list can be accessed. */ url: string - } | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: components['schemas']['shipping'] | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - /** @description The timestamps at which the order status was updated. */ - status_transitions?: components['schemas']['status_transitions'] | null + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order' + payment: components['schemas']['orders_v2_resource_payment'] + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['orders_v2_resource_shipping_cost'] | null + /** @description Customer shipping information associated with the order. */ + shipping_details?: components['schemas']['orders_v2_resource_shipping_details'] | null + /** + * @description The overall status of the order. + * @enum {string} */ - updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string + status: 'canceled' | 'complete' | 'open' | 'processing' | 'submitted' + tax_details?: components['schemas']['orders_v2_resource_tax_details'] + total_details: components['schemas']['orders_v2_resource_total_details'] } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string + /** orders_payment_method_options_afterpay_clearpay */ + orders_payment_method_options_afterpay_clearpay: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: (string | components['schemas']['sku']) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string + capture_method?: 'automatic' | 'manual' + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + reference?: string | null + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number + /** OrdersV2ResourceAutomaticPaymentMethods */ + orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + enabled: boolean + } + /** OrdersV2ResourceAutomaticTax */ + orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + enabled: boolean /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** OrdersV2ResourceBillingDetails */ + orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + address?: components['schemas']['address'] | null + /** @description Email address for the order. */ + email?: string | null + /** @description Full name for the order. */ + name?: string | null + /** @description Billing phone number for the order (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceCardPaymentMethodOptions */ + orders_v2_resource_card_payment_method_options: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** OrdersV2ResourceClientPermissions */ + orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + billing_details?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + promotion_codes?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + shipping_details?: ('allow' | 'disallow') | null + } + /** OrdersV2ResourcePayment */ + orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description Settings describing how the order should configure generated PaymentIntents. */ + settings?: components['schemas']['orders_v2_resource_payment_settings'] | null + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + status?: + | ( + | 'canceled' + | 'complete' + | 'not_required' + | 'processing' + | 'requires_action' + | 'requires_capture' + | 'requires_confirmation' + | 'requires_payment_method' + ) + | null + } + /** OrdersV2ResourcePaymentMethodOptions */ + orders_v2_resource_payment_method_options: { + acss_debit?: components['schemas']['payment_intent_payment_method_options_acss_debit'] + afterpay_clearpay?: components['schemas']['orders_payment_method_options_afterpay_clearpay'] + alipay?: components['schemas']['payment_method_options_alipay'] + bancontact?: components['schemas']['payment_method_options_bancontact'] + card?: components['schemas']['orders_v2_resource_card_payment_method_options'] + customer_balance?: components['schemas']['payment_method_options_customer_balance'] + ideal?: components['schemas']['payment_method_options_ideal'] + klarna?: components['schemas']['payment_method_options_klarna'] + link?: components['schemas']['payment_intent_payment_method_options_link'] + oxxo?: components['schemas']['payment_method_options_oxxo'] + p24?: components['schemas']['payment_method_options_p24'] + paypal?: components['schemas']['payment_method_options_paypal'] + sepa_debit?: components['schemas']['payment_intent_payment_method_options_sepa_debit'] + sofort?: components['schemas']['payment_method_options_sofort'] + wechat_pay?: components['schemas']['payment_method_options_wechat_pay'] + } + /** OrdersV2ResourcePaymentSettings */ + orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + automatic_payment_methods?: components['schemas']['orders_v2_resource_automatic_payment_methods'] | null + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + payment_method_options?: components['schemas']['orders_v2_resource_payment_method_options'] | null + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + /** @description The URL to redirect the customer to after they authenticate their payment. */ + return_url?: string | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + transfer_data?: components['schemas']['orders_v2_resource_transfer_data'] | null + } + /** OrdersV2ResourceShippingCost */ + orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceShippingDetails */ + orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + address?: components['schemas']['address'] | null + /** @description Recipient name. */ + name?: string | null + /** @description Recipient phone (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceTaxDetails */ + orders_v2_resource_tax_details: { + /** + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt: 'exempt' | 'none' | 'reverse' + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + tax_ids: components['schemas']['orders_v2_resource_tax_details_resource_tax_id'][] + } + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + orders_v2_resource_tax_details_resource_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null + } + /** OrdersV2ResourceTotalDetails */ + orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + amount_discount: number + /** @description This is the sum of all the shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['orders_v2_resource_total_details_api_resource_breakdown'] + } + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceTransferData */ + orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + amount?: number | null + /** @description ID of the Connected account receiving the transfer. */ + destination: string | components['schemas']['account'] + } + /** OutboundPaymentsPaymentMethodDetails */ + outbound_payments_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['outbound_payments_payment_method_details_financial_account'] + /** + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} + */ + type: 'financial_account' | 'us_bank_account' + us_bank_account?: components['schemas']['outbound_payments_payment_method_details_us_bank_account'] + } + /** outbound_payments_payment_method_details_financial_account */ + outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ id: string - /** @description The items included in this order return. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails used to send funds. * @enum {string} */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: (string | components['schemas']['order']) | null - /** @description The ID of the refund issued for this return. */ - refund?: (string | components['schemas']['refund']) | null + network: 'stripe' + } + /** outbound_payments_payment_method_details_us_bank_account */ + outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } + /** OutboundTransfersPaymentMethodDetails */ + outbound_transfers_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['outbound_transfers_payment_method_details_us_bank_account'] + } + /** outbound_transfers_payment_method_details_us_bank_account */ + outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null } /** PackageDimensions */ package_dimensions: { @@ -8679,11 +10412,25 @@ export type components = { /** @description Width, in inches. */ width: number } + /** PaymentFlowsAmountDetails */ + payment_flows_amount_details: { + tip?: components['schemas']['payment_flows_amount_details_resource_tip'] + } + /** PaymentFlowsAmountDetailsResourceTip */ + payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + amount?: number + } /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ enabled: boolean } + /** PaymentFlowsInstallmentOptions */ + payment_flows_installment_options: { + enabled: boolean + plan?: components['schemas']['payment_method_details_card_installments_plan'] + } /** PaymentFlowsPrivatePaymentMethodsAlipay */ payment_flows_private_payment_methods_alipay: { [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -8723,6 +10470,7 @@ export type components = { amount: number /** @description Amount that can be captured from this PaymentIntent. */ amount_capturable?: number + amount_details?: components['schemas']['payment_flows_amount_details'] /** @description Amount that was collected by this PaymentIntent. */ amount_received?: number /** @description ID of the Connect application that created the PaymentIntent. */ @@ -8768,9 +10516,9 @@ export type components = { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ client_secret?: string | null /** @enum {string} */ @@ -8849,12 +10597,20 @@ export type components = { transfer_group?: string | null } /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown } + payment_intent_card_processing: { + customer_notification?: components['schemas']['payment_intent_processing_customer_notification'] + } /** PaymentIntentNextAction */ payment_intent_next_action: { alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + card_await_notification?: components['schemas']['payment_intent_next_action_card_await_notification'] + display_bank_transfer_instructions?: components['schemas']['payment_intent_next_action_display_bank_transfer_instructions'] + konbini_display_details?: components['schemas']['payment_intent_next_action_konbini'] oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + paynow_display_qr_code?: components['schemas']['payment_intent_next_action_paynow_display_qr_code'] + pix_display_qr_code?: components['schemas']['payment_intent_next_action_pix_display_qr_code'] + promptpay_display_qr_code?: components['schemas']['payment_intent_next_action_promptpay_display_qr_code'] redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ type: string @@ -8890,6 +10646,34 @@ export type components = { /** @description The URL to the downloadable boleto voucher PDF. */ pdf?: string | null } + /** PaymentIntentNextActionCardAwaitNotification */ + payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: number | null + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + customer_approval_required?: boolean | null + } + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining?: number | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** @description A list of financial addresses that can be used to fund the customer balance */ + financial_addresses?: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url?: string | null + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference?: string | null + /** + * @description Type of bank transfer + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } /** PaymentIntentNextActionDisplayOxxoDetails */ payment_intent_next_action_display_oxxo_details: { /** @@ -8902,6 +10686,89 @@ export type components = { /** @description OXXO reference number. */ number?: string | null } + /** payment_intent_next_action_konbini */ + payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + expires_at: number + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url?: string | null + stores: components['schemas']['payment_intent_next_action_konbini_stores'] + } + /** payment_intent_next_action_konbini_familymart */ + payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_lawson */ + payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_ministop */ + payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_seicomart */ + payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_stores */ + payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + familymart?: components['schemas']['payment_intent_next_action_konbini_familymart'] | null + /** @description Lawson instruction details. */ + lawson?: components['schemas']['payment_intent_next_action_konbini_lawson'] | null + /** @description Ministop instruction details. */ + ministop?: components['schemas']['payment_intent_next_action_konbini_ministop'] | null + /** @description Seicomart instruction details. */ + seicomart?: components['schemas']['payment_intent_next_action_konbini_seicomart'] | null + } + /** PaymentIntentNextActionPaynowDisplayQrCode */ + payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The image_url_png string used to render QR code */ + image_url_png: string + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string + } + /** PaymentIntentNextActionPixDisplayQrCode */ + payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data?: string + /** @description The date (unix timestamp) when the PIX expires. */ + expires_at?: number + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url?: string + /** @description The image_url_png string used to render png QR code */ + image_url_png?: string + /** @description The image_url_svg string used to render svg QR code */ + image_url_svg?: string + } + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: string + /** @description The image_url_png string used to render QR code, can be used as */ + image_url_png: string + /** @description The image_url_svg string used to render QR code, can be used as */ + image_url_svg: string + } /** PaymentIntentNextActionRedirectToUrl */ payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -8918,6 +10785,11 @@ export type components = { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8938,9 +10810,9 @@ export type components = { nonce_str: string /** @description package is static value */ package: string - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ prepay_id: string /** @description A signature */ sign: string @@ -8949,7 +10821,7 @@ export type components = { } /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ native_url: string } /** PaymentIntentPaymentMethodOptions */ @@ -8957,6 +10829,9 @@ export type components = { acss_debit?: | components['schemas']['payment_intent_payment_method_options_acss_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + affirm?: + | components['schemas']['payment_method_options_affirm'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] afterpay_clearpay?: | components['schemas']['payment_method_options_afterpay_clearpay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8972,6 +10847,9 @@ export type components = { bancontact?: | components['schemas']['payment_method_options_bancontact'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['payment_intent_payment_method_options_blik'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] boleto?: | components['schemas']['payment_method_options_boleto'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8981,6 +10859,9 @@ export type components = { card_present?: | components['schemas']['payment_method_options_card_present'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + customer_balance?: + | components['schemas']['payment_method_options_customer_balance'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] eps?: | components['schemas']['payment_intent_payment_method_options_eps'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9000,16 +10881,32 @@ export type components = { klarna?: | components['schemas']['payment_method_options_klarna'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + konbini?: + | components['schemas']['payment_method_options_konbini'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + link?: + | components['schemas']['payment_intent_payment_method_options_link'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] oxxo?: | components['schemas']['payment_method_options_oxxo'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] p24?: components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + paynow?: + | components['schemas']['payment_method_options_paynow'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + pix?: components['schemas']['payment_method_options_pix'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + promptpay?: + | components['schemas']['payment_method_options_promptpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sepa_debit?: | components['schemas']['payment_intent_payment_method_options_sepa_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sofort?: | components['schemas']['payment_method_options_sofort'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['payment_intent_payment_method_options_us_bank_account'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] wechat_pay?: | components['schemas']['payment_method_options_wechat_pay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9017,6 +10914,15 @@ export type components = { /** payment_intent_payment_method_options_acss_debit */ payment_intent_payment_method_options_acss_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} @@ -9024,15 +10930,34 @@ export type components = { verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_intent_payment_method_options_au_becs_debit */ - payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } + payment_intent_payment_method_options_au_becs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_blik */ + payment_intent_payment_method_options_blik: { [key: string]: unknown } /** payment_intent_payment_method_options_card */ payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** * @description Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ installments?: components['schemas']['payment_method_options_card_installments'] | null + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['payment_method_options_card_mandate_options'] | null /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9052,9 +10977,42 @@ export type components = { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string } /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown } + payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_intent_payment_method_options_link */ + payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_intent_payment_method_options_mandate_options_acss_debit */ payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9077,6 +11035,33 @@ export type components = { /** payment_intent_payment_method_options_sepa_debit */ payment_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_us_bank_account */ + payment_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** PaymentIntentProcessing */ payment_intent_processing: { @@ -9087,8 +11072,24 @@ export type components = { */ type: 'card' } + /** PaymentIntentProcessingCustomerNotification */ + payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + approval_requested?: boolean | null + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + completes_at?: number | null + } /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + installments?: components['schemas']['payment_flows_installment_options'] /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9098,6 +11099,11 @@ export type components = { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** * PaymentLink @@ -9123,6 +11129,15 @@ export type components = { * @enum {string} */ billing_address_collection: 'auto' | 'required' + /** @description When set, provides configuration to gather active consent from customers. */ + consent_collection?: components['schemas']['payment_links_resource_consent_collection'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + customer_creation: 'always' | 'if_required' /** @description Unique identifier for the object. */ id: string /** @@ -9153,13 +11168,56 @@ export type components = { object: 'payment_link' /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data?: components['schemas']['payment_links_resource_payment_intent_data'] | null + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + payment_method_collection: 'always' | 'if_required' /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | null + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | null phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] /** @description Configuration for collecting the customer's shipping address. */ shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null + /** @description The shipping rate options applied to the session. */ + shipping_options: components['schemas']['payment_links_resource_shipping_option'][] + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + submit_type: 'auto' | 'book' | 'donate' | 'pay' /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null + tax_id_collection: components['schemas']['payment_links_resource_tax_id_collection'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null /** @description The public URL that can be shared with customers. */ @@ -9190,6 +11248,32 @@ export type components = { /** @description The URL the customer will be redirected to after the purchase is complete. */ url: string } + /** PaymentLinksResourceConsentCollection */ + payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null + } + /** PaymentLinksResourcePaymentIntentData */ + payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + capture_method?: ('automatic' | 'manual') | null + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + setup_future_usage?: ('off_session' | 'on_session') | null + } /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9438,11 +11522,25 @@ export type components = { | 'ZZ' )[] } + /** PaymentLinksResourceShippingOption */ + payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number + /** @description The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: string | components['schemas']['shipping_rate'] + } /** PaymentLinksResourceSubscriptionData */ payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days?: number | null } + /** PaymentLinksResourceTaxIdCollection */ + payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + enabled: boolean + } /** PaymentLinksResourceTransferData */ payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ @@ -9453,19 +11551,21 @@ export type components = { /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to * Customer objects to store instrument details for future payments. * * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). */ payment_method: { acss_debit?: components['schemas']['payment_method_acss_debit'] + affirm?: components['schemas']['payment_method_affirm'] afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_bacs_debit'] bancontact?: components['schemas']['payment_method_bancontact'] billing_details: components['schemas']['billing_details'] + blik?: components['schemas']['payment_method_blik'] boleto?: components['schemas']['payment_method_boleto'] card?: components['schemas']['payment_method_card'] card_present?: components['schemas']['payment_method_card_present'] @@ -9476,6 +11576,7 @@ export type components = { created: number /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ customer?: (string | components['schemas']['customer']) | null + customer_balance?: components['schemas']['payment_method_customer_balance'] eps?: components['schemas']['payment_method_eps'] fpx?: components['schemas']['payment_method_fpx'] giropay?: components['schemas']['payment_method_giropay'] @@ -9485,6 +11586,8 @@ export type components = { ideal?: components['schemas']['payment_method_ideal'] interac_present?: components['schemas']['payment_method_interac_present'] klarna?: components['schemas']['payment_method_klarna'] + konbini?: components['schemas']['payment_method_konbini'] + link?: components['schemas']['payment_method_link'] /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -9496,6 +11599,10 @@ export type components = { object: 'payment_method' oxxo?: components['schemas']['payment_method_oxxo'] p24?: components['schemas']['payment_method_p24'] + paynow?: components['schemas']['payment_method_paynow'] + pix?: components['schemas']['payment_method_pix'] + promptpay?: components['schemas']['payment_method_promptpay'] + radar_options?: components['schemas']['radar_radar_options'] sepa_debit?: components['schemas']['payment_method_sepa_debit'] sofort?: components['schemas']['payment_method_sofort'] /** @@ -9504,14 +11611,17 @@ export type components = { */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -9519,11 +11629,18 @@ export type components = { | 'ideal' | 'interac_present' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + us_bank_account?: components['schemas']['payment_method_us_bank_account'] wechat_pay?: components['schemas']['payment_method_wechat_pay'] } /** payment_method_acss_debit */ @@ -9539,6 +11656,8 @@ export type components = { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_affirm */ + payment_method_affirm: { [key: string]: unknown } /** payment_method_afterpay_clearpay */ payment_method_afterpay_clearpay: { [key: string]: unknown } /** payment_method_au_becs_debit */ @@ -9561,6 +11680,8 @@ export type components = { } /** payment_method_bancontact */ payment_method_bancontact: { [key: string]: unknown } + /** payment_method_blik */ + payment_method_blik: { [key: string]: unknown } /** payment_method_boleto */ payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -9663,19 +11784,24 @@ export type components = { /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ shipping_address?: components['schemas']['address'] | null } + /** payment_method_customer_balance */ + payment_method_customer_balance: { [key: string]: unknown } /** payment_method_details */ payment_method_details: { ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] ach_debit?: components['schemas']['payment_method_details_ach_debit'] acss_debit?: components['schemas']['payment_method_details_acss_debit'] + affirm?: components['schemas']['payment_method_details_affirm'] afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] bancontact?: components['schemas']['payment_method_details_bancontact'] + blik?: components['schemas']['payment_method_details_blik'] boleto?: components['schemas']['payment_method_details_boleto'] card?: components['schemas']['payment_method_details_card'] card_present?: components['schemas']['payment_method_details_card_present'] + customer_balance?: components['schemas']['payment_method_details_customer_balance'] eps?: components['schemas']['payment_method_details_eps'] fpx?: components['schemas']['payment_method_details_fpx'] giropay?: components['schemas']['payment_method_details_giropay'] @@ -9683,9 +11809,14 @@ export type components = { ideal?: components['schemas']['payment_method_details_ideal'] interac_present?: components['schemas']['payment_method_details_interac_present'] klarna?: components['schemas']['payment_method_details_klarna'] + konbini?: components['schemas']['payment_method_details_konbini'] + link?: components['schemas']['payment_method_details_link'] multibanco?: components['schemas']['payment_method_details_multibanco'] oxxo?: components['schemas']['payment_method_details_oxxo'] p24?: components['schemas']['payment_method_details_p24'] + paynow?: components['schemas']['payment_method_details_paynow'] + pix?: components['schemas']['payment_method_details_pix'] + promptpay?: components['schemas']['payment_method_details_promptpay'] 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'] @@ -9695,6 +11826,7 @@ export type components = { * It contains information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['payment_method_details_us_bank_account'] wechat?: components['schemas']['payment_method_details_wechat'] wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] } @@ -9742,6 +11874,8 @@ export type components = { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_details_affirm */ + payment_method_details_affirm: { [key: string]: unknown } /** payment_method_details_afterpay_clearpay */ payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -9795,6 +11929,8 @@ export type components = { */ verified_name?: string | null } + /** payment_method_details_blik */ + payment_method_details_blik: { [key: string]: unknown } /** payment_method_details_boleto */ payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -9828,6 +11964,8 @@ export type components = { installments?: components['schemas']['payment_method_details_card_installments'] | null /** @description The last four digits of the card. */ last4?: string | null + /** @description ID of the mandate used to make this payment or created by it. */ + mandate?: string | null /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null /** @description Populated if this transaction used 3D Secure authentication. */ @@ -9871,265 +12009,275 @@ export type components = { amount_authorized?: number | null /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null - } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null - } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null - } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - verified_name?: string | null - } - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null + capture_before?: number + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + incremental_authorization_supported: boolean + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: boolean + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null + } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_customer_balance */ + payment_method_details_customer_balance: { [key: string]: unknown } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null + } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null + } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ cardholder_name?: string | null /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10197,10 +12345,25 @@ export type components = { payment_method_category?: string | null /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ preferred_locale?: string | null } + /** payment_method_details_konbini */ + payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store?: components['schemas']['payment_method_details_konbini_store'] | null + } + /** payment_method_details_konbini_store */ + payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + chain?: ('familymart' | 'lawson' | 'ministop' | 'seicomart') | null + } + /** payment_method_details_link */ + payment_method_details_link: { [key: string]: unknown } /** payment_method_details_multibanco */ payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10257,6 +12420,21 @@ export type components = { */ verified_name?: string | null } + /** payment_method_details_paynow */ + payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + reference?: string | null + } + /** payment_method_details_pix */ + payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + bank_transaction_id?: string | null + } + /** payment_method_details_promptpay */ + payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + reference?: string | null + } /** payment_method_details_sepa_debit */ payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10302,6 +12480,27 @@ export type components = { } /** payment_method_details_stripe_account */ payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_us_bank_account */ + payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_details_wechat */ payment_method_details_wechat: { [key: string]: unknown } /** payment_method_details_wechat_pay */ @@ -10314,7 +12513,7 @@ export type components = { /** payment_method_eps */ payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ bank?: @@ -10329,6 +12528,7 @@ export type components = { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -10434,18 +12634,78 @@ export type components = { /** @description The customer's date of birth, if provided. */ dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null } + /** payment_method_konbini */ + payment_method_konbini: { [key: string]: unknown } + /** payment_method_link */ + payment_method_link: { + /** @description Account owner's email address. */ + email?: string | null + /** @description Token used for persistent Link logins. */ + persistent_token?: string + } + /** payment_method_options_affirm */ + payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_afterpay_clearpay */ payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ reference?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown } + payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown } + payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } /** payment_method_options_bancontact */ payment_method_options_bancontact: { /** @@ -10453,11 +12713,29 @@ export type components = { * @enum {string} */ preferred_language: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_boleto */ payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** payment_method_options_card_installments */ payment_method_options_card_installments: { @@ -10468,30 +12746,255 @@ export type components = { /** @description Installment plan selected for this PaymentIntent. */ plan?: components['schemas']['payment_method_details_card_installments_plan'] | null } + /** payment_method_options_card_mandate_options */ + payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown } + payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + request_extended_authorization?: boolean | null + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + request_incremental_authorization_support?: boolean | null + } + /** payment_method_options_customer_balance */ + payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_customer_balance_bank_transfer */ + payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** payment_method_options_customer_balance_eu_bank_account */ + payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown } + payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown } + payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown } + payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown } + payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_interac_present */ payment_method_options_interac_present: { [key: string]: unknown } /** payment_method_options_klarna */ payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ preferred_locale?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_konbini */ + payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number?: string | null + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: number | null + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_oxxo */ payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown } + payment_method_options_p24: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paynow */ + payment_method_options_paynow: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paypal */ + payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale?: string | null + } + /** payment_method_options_pix */ + payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds?: number | null + /** @description The timestamp at which the Pix expires. */ + expires_at?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_promptpay */ + payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_sofort */ payment_method_options_sofort: { /** @@ -10499,6 +13002,15 @@ export type components = { * @enum {string|null} */ preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_wechat_pay */ payment_method_options_wechat_pay: { @@ -10509,8 +13021,17 @@ export type components = { * @enum {string|null} */ client?: ('android' | 'ios' | 'web') | null - } - /** payment_method_oxxo */ + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_oxxo */ payment_method_oxxo: { [key: string]: unknown } /** payment_method_p24 */ payment_method_p24: { @@ -10548,6 +13069,12 @@ export type components = { ) | null } + /** payment_method_paynow */ + payment_method_paynow: { [key: string]: unknown } + /** payment_method_pix */ + payment_method_pix: { [key: string]: unknown } + /** payment_method_promptpay */ + payment_method_promptpay: { [key: string]: unknown } /** payment_method_sepa_debit */ payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10568,6 +13095,31 @@ export type components = { /** @description Two-letter ISO code representing the country the bank account is located in. */ country?: string | null } + /** payment_method_us_bank_account */ + payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description The name of the bank. */ + bank_name?: string | null + /** @description The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Contains information about US bank account networks that can be used. */ + networks?: components['schemas']['us_bank_account_networks'] | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_wechat_pay */ payment_method_wechat_pay: { [key: string]: unknown } /** PaymentPagesCheckoutSessionAfterExpiration */ @@ -10611,6 +13163,11 @@ export type components = { * @enum {string|null} */ promotions?: ('opt_in' | 'opt_out') | null + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + terms_of_service?: 'accepted' | null } /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -10620,23 +13177,32 @@ export type components = { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: 'auto' | null + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null } /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address?: components['schemas']['address'] | null /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email?: string | null - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name?: string | null + /** @description The customer's phone number after a completed Checkout Session. */ phone?: string | null /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null } /** PaymentPagesCheckoutSessionPhoneNumberCollection */ @@ -10890,6 +13456,19 @@ export type components = { | 'ZZ' )[] } + /** PaymentPagesCheckoutSessionShippingCost */ + payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } /** PaymentPagesCheckoutSessionShippingOption */ payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ @@ -10900,13 +13479,14 @@ export type components = { /** PaymentPagesCheckoutSessionTaxID */ payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -10918,10 +13498,12 @@ export type components = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -10941,6 +13523,7 @@ export type components = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -10957,27 +13540,25 @@ export type components = { } /** PaymentPagesCheckoutSessionTotalDetails */ payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] } /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** Polymorphic */ payment_source: | components['schemas']['account'] - | components['schemas']['alipay_account'] | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] | components['schemas']['card'] | components['schemas']['source'] /** @@ -11108,6 +13689,8 @@ export type components = { id: string /** @description Whether the person's `id_number` was provided. */ id_number_provided?: boolean + /** @description Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided?: boolean /** @description The person's last name. */ last_name?: string | null /** @description The Kana variation of the person's last name (Japan only). */ @@ -11132,6 +13715,7 @@ export type components = { * @enum {string} */ political_exposure?: 'existing' | 'none' + registered_address?: components['schemas']['address'] relationship?: components['schemas']['person_relationship'] requirements?: components['schemas']['person_requirements'] | null /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ @@ -11300,9 +13884,9 @@ export type components = { /** @description The messaging shown to customers in the portal. */ headline?: string | null /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string + privacy_policy_url?: string | null /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string + terms_of_service_url?: string | null } /** PortalCustomerUpdate */ portal_customer_update: { @@ -11325,6 +13909,17 @@ export type components = { /** @description Whether the feature is enabled. */ enabled: boolean } + /** PortalLoginPage */ + portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + enabled: boolean + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + url?: string | null + } /** PortalPaymentMethodUpdate */ portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -11403,6 +13998,10 @@ export type components = { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['currency_option'] } + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -11487,6 +14086,8 @@ export type components = { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: (string | components['schemas']['price']) | null /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string | null /** @description Unique identifier for the object. */ @@ -11497,7 +14098,7 @@ export type components = { livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string /** * @description String representing the object's type. Objects of the same type share the same value. @@ -11510,7 +14111,7 @@ export type components = { shippable?: boolean | null /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: (string | components['schemas']['tax_code']) | null /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string | null @@ -11524,7 +14125,7 @@ export type components = { } /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ promotion_code: { @@ -11562,8 +14163,15 @@ export type components = { /** @description Number of times this promotion code has been used. */ times_redeemed: number } + /** PromotionCodeCurrencyOption */ + promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: number + } /** PromotionCodesResourceRestrictions */ promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['promotion_code_currency_option'] } /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ first_time_transaction: boolean /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -11581,6 +14189,8 @@ export type components = { amount_subtotal: number /** @description Total after discounts and taxes are applied. */ amount_total: number + /** @description ID of the Connect Application that created the quote. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ application_fee_amount?: number | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -11665,6 +14275,8 @@ export type components = { subscription_data: components['schemas']['quotes_resource_subscription_data'] /** @description The subscription schedule that was created or updated from this quote. */ subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null + /** @description ID of the test clock this quote belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null total_details: components['schemas']['quotes_resource_total_details'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null @@ -11727,6 +14339,8 @@ export type components = { } /** QuotesResourceSubscriptionData */ quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -11737,19 +14351,19 @@ export type components = { } /** QuotesResourceTotalDetails */ quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] } /** QuotesResourceTotalDetailsResourceBreakdown */ quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** QuotesResourceTransferData */ @@ -11897,6 +14511,14 @@ export type components = { /** @description The identifier of the value list this item belongs to. */ value_list: string } + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + session?: string + } /** RadarReviewResourceLocation */ radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -11921,63 +14543,15 @@ export type components = { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: components['schemas']['bank_account'] | null - /** CardList */ - cards?: { - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: (string | components['schemas']['card']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - email?: string | null - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: (string | components['schemas']['account']) | null - /** @description Full, legal name of the recipient. */ - name?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - object: 'recipient' - rolled_back_from?: string | components['schemas']['account'] - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string + network: 'stripe' } /** Recurring */ recurring: { @@ -12029,8 +14603,11 @@ export type components = { failure_reason?: string /** @description Unique identifier for the object. */ id: string + /** @description Email to which refund instructions, if required, are sent to. */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null + next_action?: components['schemas']['refund_next_action'] /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12047,11 +14624,27 @@ export type components = { receipt_number?: string | null /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ status?: string | null /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null } + /** RefundNextAction */ + refund_next_action: { + /** @description Contains the refund details. */ + display_details?: components['schemas']['refund_next_action_display_details'] | null + /** @description Type of the next action to perform. */ + type: string + } + /** RefundNextActionDisplayDetails */ + refund_next_action_display_details: { + email_sent: components['schemas']['email_sent'] + /** + * Format: unix-time + * @description The expiry timestamp. + */ + expires_at: number + } /** * reporting_report_run * @description The Report Run object represents an instance of a report type generated with @@ -12267,6 +14860,16 @@ export type components = { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean } + /** SecretServiceResourceScope */ + secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + type: 'account' | 'user' + /** @description The user ID, if type is set to "user" */ + user?: string + } /** sepa_debit_generated_from */ sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ @@ -12284,6 +14887,12 @@ export type components = { setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12291,6 +14900,12 @@ export type components = { created: number /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12320,14 +14935,17 @@ export type components = { au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + blik?: components['schemas']['setup_attempt_payment_method_details_blik'] boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] card?: components['schemas']['setup_attempt_payment_method_details_card'] card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + link?: components['schemas']['setup_attempt_payment_method_details_link'] sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ type: string + us_bank_account?: components['schemas']['setup_attempt_payment_method_details_us_bank_account'] } /** setup_attempt_payment_method_details_acss_debit */ setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } @@ -12361,6 +14979,8 @@ export type components = { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_blik */ + setup_attempt_payment_method_details_blik: { [key: string]: unknown } /** setup_attempt_payment_method_details_boleto */ setup_attempt_payment_method_details_boleto: { [key: string]: unknown } /** setup_attempt_payment_method_details_card */ @@ -12429,6 +15049,8 @@ export type components = { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_link */ + setup_attempt_payment_method_details_link: { [key: string]: unknown } /** setup_attempt_payment_method_details_sepa_debit */ setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } /** setup_attempt_payment_method_details_sofort */ @@ -12457,6 +15079,8 @@ export type components = { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_us_bank_account */ + setup_attempt_payment_method_details_us_bank_account: { [key: string]: unknown } /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -12485,6 +15109,12 @@ export type components = { setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -12493,7 +15123,7 @@ export type components = { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, 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 /** @@ -12509,6 +15139,12 @@ export type components = { customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description The error encountered in the previous SetupIntent confirmation. */ @@ -12575,12 +15211,30 @@ export type components = { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { - acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + acss_debit?: + | components['schemas']['setup_intent_payment_method_options_acss_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['setup_intent_payment_method_options_blik'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] card?: components['schemas']['setup_intent_payment_method_options_card'] - sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + link?: + | components['schemas']['setup_intent_payment_method_options_link'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + sepa_debit?: + | components['schemas']['setup_intent_payment_method_options_sepa_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['setup_intent_payment_method_options_us_bank_account'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] } /** setup_intent_payment_method_options_acss_debit */ setup_intent_payment_method_options_acss_debit: { @@ -12596,14 +15250,65 @@ export type components = { */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** setup_intent_payment_method_options_blik */ + setup_intent_payment_method_options_blik: { + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_blik'] + } /** setup_intent_payment_method_options_card */ setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['setup_intent_payment_method_options_card_mandate_options'] | null + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null } + /** setup_intent_payment_method_options_card_mandate_options */ + setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } + /** setup_intent_payment_method_options_link */ + setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + } /** setup_intent_payment_method_options_mandate_options_acss_debit */ setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -12623,41 +15328,60 @@ export type components = { */ transaction_type?: ('business' | 'personal') | null } + /** setup_intent_payment_method_options_mandate_options_blik */ + setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } /** setup_intent_payment_method_options_sepa_debit */ setup_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] } + /** setup_intent_payment_method_options_us_bank_account */ + setup_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } /** Shipping */ shipping: { address?: components['schemas']['address'] /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null /** @description Recipient name. */ - name?: string | null + name?: string /** @description Recipient phone (including extension). */ phone?: string | null /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ tracking_number?: string | null } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: components['schemas']['delivery_estimate'] | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -12688,7 +15412,7 @@ export type components = { * @enum {string|null} */ tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: (string | components['schemas']['tax_code']) | null /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -12696,6 +15420,16 @@ export type components = { */ type: 'fixed_amount' } + /** ShippingRateCurrencyOption */ + shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior: 'exclusive' | 'inclusive' | 'unspecified' + } /** ShippingRateDeliveryEstimate */ shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ @@ -12719,6 +15453,8 @@ export type components = { amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['shipping_rate_currency_option'] } } /** SigmaScheduledQueryRunError */ sigma_scheduled_query_run_error: { @@ -12733,8 +15469,6 @@ export type components = { * the `size: large`, `color: red` version of that shirt. * * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). */ sku: { /** @description Whether the SKU is available for purchase. */ @@ -13309,29 +16043,6 @@ export type components = { qr_code_url?: string | null statement_descriptor?: string } - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null - } /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -13339,12 +16050,14 @@ export type components = { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ subscription: { + /** @description ID of the Connect Application that created the subscription. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ application_fee_percent?: number | null automatic_tax: components['schemas']['subscription_automatic_tax'] /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ @@ -13371,6 +16084,8 @@ export type components = { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -13388,18 +16103,11 @@ export type components = { /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string | null /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ discount?: components['schemas']['discount'] | null /** @@ -13472,6 +16180,8 @@ export type components = { * @enum {string} */ status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description ID of the test clock this subscription belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ transfer_data?: components['schemas']['subscription_transfer_data'] | null /** @@ -13532,6 +16242,11 @@ export type components = { /** subscription_payment_method_options_card */ subscription_payment_method_options_card: { mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -13555,6 +16270,8 @@ export type components = { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -13607,6 +16324,8 @@ export type components = { status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' /** @description ID of the subscription managed by the subscription schedule. */ subscription?: (string | components['schemas']['subscription']) | null + /** @description ID of the test clock this subscription schedule belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** * SubscriptionScheduleAddInvoiceItem @@ -13652,7 +16371,7 @@ export type components = { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ application_fee_percent?: number | null @@ -13671,10 +16390,14 @@ export type components = { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description The end of this phase of the subscription schedule. @@ -13684,6 +16407,8 @@ export type components = { invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ items: components['schemas']['subscription_schedule_configuration_item'][] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + metadata?: { [key: string]: string } | null /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -13721,6 +16446,8 @@ export type components = { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description The subscription schedule's default invoice settings. */ invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -13763,6 +16490,12 @@ export type components = { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ card?: components['schemas']['subscription_payment_method_options_card'] | null + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** SubscriptionsResourcePaymentSettings */ subscriptions_resource_payment_settings: { @@ -13779,15 +16512,26 @@ export type components = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + save_default_payment_method?: ('off' | 'on_subscription') | null } /** * SubscriptionsResourcePendingUpdate @@ -13797,7 +16541,7 @@ export type components = { subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number | null /** @@ -13817,7 +16561,7 @@ export type components = { } /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -13881,13 +16625,14 @@ export type components = { */ object: 'tax_id' /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -13899,10 +16644,12 @@ export type components = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -13922,6 +16669,7 @@ export type components = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -13990,6 +16738,26 @@ export type components = { */ tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null } + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + 'terminal.configuration': { + bbpos_wisepos_e?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + /** @description Unique identifier for the object. */ + id: string + /** @description Whether this Configuration is the default for your account */ + is_account_default?: boolean | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.configuration' + tipping?: components['schemas']['terminal_configuration_configuration_resource_tipping'] + verifone_p400?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + } /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14015,6 +16783,8 @@ export type components = { */ 'terminal.location': { address: components['schemas']['address'] + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string /** @description The display name of the location. */ display_name: string /** @description Unique identifier for the object. */ @@ -14036,13 +16806,15 @@ export type components = { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ 'terminal.reader': { + /** @description The most recent action performed by the reader. */ + action?: components['schemas']['terminal_reader_reader_resource_reader_action'] | null /** @description The current software version of the reader. */ device_sw_version?: string | null /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + device_type: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | 'verifone_P400' /** @description Unique identifier for the object. */ id: string /** @description The local IP address of the reader. */ @@ -14065,38 +16837,164 @@ export type components = { /** @description The networking status of the reader. */ status?: string | null } + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + fixed_amounts?: number[] | null + /** @description Percentages displayed when collecting a tip */ + percentages?: number[] | null + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold?: number + } + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + splashscreen?: string | components['schemas']['file'] + } + /** TerminalConfigurationConfigurationResourceTipping */ + terminal_configuration_configuration_resource_tipping: { + aud?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + cad?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + chf?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + czk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + dkk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + eur?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + gbp?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + hkd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + myr?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nok?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nzd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sek?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sgd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + usd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + } + /** + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader + */ + terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description List of line items in the cart. */ + line_items: components['schemas']['terminal_reader_reader_resource_line_item'][] + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax?: number | null + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: number + } /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: components['schemas']['card'] + /** @description Description of the line item. */ + description: string + /** @description The quantity of the line item. */ + quantity: number + } + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + skip_tipping?: boolean + } + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + payment_intent: string | components['schemas']['payment_intent'] + process_config?: components['schemas']['terminal_reader_reader_resource_process_config'] + } + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string + /** @description Most recent SetupIntent processed by the reader. */ + setup_intent: string | components['schemas']['setup_intent'] + } + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + failure_code?: string | null + /** @description Detailed failure message, only set if status is `failed`. */ + failure_message?: string | null + process_payment_intent?: components['schemas']['terminal_reader_reader_resource_process_payment_intent_action'] + process_setup_intent?: components['schemas']['terminal_reader_reader_resource_process_setup_intent_action'] + set_reader_display?: components['schemas']['terminal_reader_reader_resource_set_reader_display_action'] + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + status: 'failed' | 'in_progress' | 'succeeded' + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + type: 'process_payment_intent' | 'process_setup_intent' | 'set_reader_display' + } + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + cart?: components['schemas']['terminal_reader_reader_resource_cart'] | null + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + type: 'cart' + } + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + 'test_helpers.test_clock': { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + deletes_after: number + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + /** @description The custom name supplied at creation. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string + object: 'test_helpers.test_clock' + /** + * @description The status of the Test Clock. + * @enum {string} + */ + status: 'advancing' | 'internal_failure' | 'ready' } /** three_d_secure_details */ three_d_secure_details: { @@ -14110,7 +17008,7 @@ export type components = { * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + result?: ('attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error') | null /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. @@ -14216,7 +17114,8 @@ export type components = { * @enum {string} */ object: 'topup' - source: components['schemas']['source'] + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + source?: components['schemas']['source'] | null /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ statement_descriptor?: string | null /** @@ -14293,7 +17192,7 @@ export type components = { /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ source_transaction?: (string | components['schemas']['charge']) | null /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null + source_type?: string /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null } @@ -14383,6 +17282,1068 @@ export type components = { */ round: 'down' | 'up' } + /** + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ + 'treasury.credit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.credit_reversal' + /** @description The ReceivedCredit being reversed. */ + received_credit: string + /** + * @description Status of the CreditReversal + * @enum {string} + */ + status: 'canceled' | 'posted' | 'processing' + status_transitions: components['schemas']['treasury_received_credits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + 'treasury.debit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Other flows linked to a DebitReversal. */ + linked_flows?: components['schemas']['treasury_received_debits_resource_debit_reversal_linked_flows'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'card' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.debit_reversal' + /** @description The ReceivedDebit being reversed. */ + received_debit: string + /** + * @description Status of the DebitReversal + * @enum {string} + */ + status: 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_received_debits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + 'treasury.financial_account': { + /** @description The array of paths to active Features in the Features hash. */ + active_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + balance: components['schemas']['treasury_financial_accounts_resource_balance'] + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + features?: components['schemas']['treasury.financial_account_features'] + /** @description The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: components['schemas']['treasury_financial_accounts_resource_financial_address'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account' + /** @description The array of paths to pending Features in the Features hash. */ + pending_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions?: components['schemas']['treasury_financial_accounts_resource_platform_restrictions'] | null + /** @description The array of paths to restricted Features in the Features hash. */ + restricted_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + status: 'closed' | 'open' + status_details: components['schemas']['treasury_financial_accounts_resource_status_details'] + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + supported_currencies: string[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + 'treasury.financial_account_features': { + card_issuing?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + deposit_insurance?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + financial_addresses?: components['schemas']['treasury_financial_accounts_resource_financial_addresses_features'] + inbound_transfers?: components['schemas']['treasury_financial_accounts_resource_inbound_transfers'] + intra_stripe_flows?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account_features' + outbound_payments?: components['schemas']['treasury_financial_accounts_resource_outbound_payments'] + outbound_transfers?: components['schemas']['treasury_financial_accounts_resource_outbound_transfers'] + } + /** + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + */ + 'treasury.inbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details?: components['schemas']['treasury_inbound_transfers_resource_failure_details'] | null + /** @description The FinancialAccount that received the funds. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + linked_flows: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.inbound_transfer' + /** @description The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: string + /** @description Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details?: components['schemas']['inbound_transfers'] | null + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned?: boolean | null + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: string + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_payment': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + destination_payment_method?: string | null + /** @description Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details?: components['schemas']['outbound_payments_payment_method_details'] | null + /** @description Details about the end user. */ + end_user_details?: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_end_user_details'] | null + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_payment' + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_payments_resource_returned_status'] | null + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: string + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method?: string | null + destination_payment_method_details: components['schemas']['outbound_transfers_payment_method_details'] + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_transfer' + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_transfers_resource_returned_details'] | null + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: string + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_transfers_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + 'treasury.received_credit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'other') | null + /** @description The FinancialAccount that received the funds. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_credits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The rails used to send the funds. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' | 'us_domestic_wire' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_credit' + /** @description Details describing when a ReceivedCredit may be reversed. */ + reversal_details?: components['schemas']['treasury_received_credits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + 'treasury.received_debit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'insufficient_funds' | 'other') | null + /** @description The FinancialAccount that funds were pulled from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_debits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_debit' + /** @description Details describing when a ReceivedDebit might be reversed. */ + reversal_details?: components['schemas']['treasury_received_debits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + 'treasury.transaction': { + /** @description Amount (in cents) transferred. */ + amount: number + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + entries?: { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description ID of the flow that created the Transaction. */ + flow?: string | null + /** @description Details of the flow that created the Transaction. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction' + /** + * @description Status of the Transaction. + * @enum {string} + */ + status: 'open' | 'posted' | 'void' + status_transitions: components['schemas']['treasury_transactions_resource_abstract_transaction_resource_status_transitions'] + } + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + 'treasury.transaction_entry': { + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + effective_at: number + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description Token of the flow associated with the TransactionEntry. */ + flow?: string | null + /** @description Details of the flow associated with the TransactionEntry. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction_entry' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'credit_reversal_posting' + | 'debit_reversal' + | 'inbound_transfer' + | 'inbound_transfer_return' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'other' + | 'outbound_payment' + | 'outbound_payment_cancellation' + | 'outbound_payment_failure' + | 'outbound_payment_posting' + | 'outbound_payment_return' + | 'outbound_transfer' + | 'outbound_transfer_cancellation' + | 'outbound_transfer_failure' + | 'outbound_transfer_posting' + | 'outbound_transfer_return' + | 'received_credit' + | 'received_debit' + } + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name: string + /** @description The account number. */ + account_number?: string | null + /** @description The last four characters of the account number. */ + account_number_last4: string + /** @description Name of the bank. */ + bank_name: string + /** @description Routing number for the account. */ + routing_number: string + } + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + cash: { [key: string]: number } + /** @description Funds not spendable yet, but will become available at a later time. */ + inbound_pending: { [key: string]: number } + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: { [key: string]: number } + } + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + reasons: ('account_rejected' | 'closed_by_platform' | 'other')[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + treasury_financial_accounts_resource_financial_address: { + aba?: components['schemas']['treasury_financial_accounts_resource_aba_record'] + /** @description The list of networks that the address supports */ + supported_networks?: ('ach' | 'us_domestic_wire')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'aba' + } + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + treasury_financial_accounts_resource_financial_addresses_features: { + aba?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_inbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + treasury_financial_accounts_resource_outbound_payments: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_outbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + inbound_flows?: ('restricted' | 'unrestricted') | null + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + outbound_flows?: ('restricted' | 'unrestricted') | null + } + /** TreasuryFinancialAccountsResourceStatusDetails */ + treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + closed?: components['schemas']['treasury_financial_accounts_resource_closed_status_details'] | null + } + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + requested: boolean + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + status: 'active' | 'pending' | 'restricted' + /** @description Additional details; includes at least one entry when the status is not `active`. */ + status_details: components['schemas']['treasury_financial_accounts_resource_toggles_setting_status_details'][] + } + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + code: + | 'activating' + | 'capability_not_requested' + | 'financial_account_closed' + | 'rejected_other' + | 'rejected_unsupported_business' + | 'requirements_past_due' + | 'requirements_pending_verification' + | 'restricted_by_platform' + | 'restricted_other' + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + resolution?: ('contact_stripe' | 'provide_information' | 'remove_restriction') | null + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + restriction?: 'inbound_flows' | 'outbound_flows' + } + /** TreasuryInboundTransfersResourceFailureDetails */ + treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + received_debit?: string | null + } + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + succeeded_at?: number | null + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + ip_address?: string | null + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: boolean + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + returned_at?: number | null + } + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceReturnedDetails */ + treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceStatusTransitions */ + treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + returned_at?: number | null + } + /** TreasuryReceivedCreditsResourceLinkedFlows */ + treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal?: string | null + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction?: string | null + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + source_flow?: string | null + /** @description The expandable object of the source flow. */ + source_flow_details?: components['schemas']['treasury_received_credits_resource_source_flows_details'] | null + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type?: string | null + } + /** TreasuryReceivedCreditsResourceReversalDetails */ + treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + treasury_received_credits_resource_source_flows_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + payout?: components['schemas']['payout'] + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } + /** TreasuryReceivedCreditsResourceStatusTransitions */ + treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + posted_at?: number | null + } + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute?: string | null + } + /** TreasuryReceivedDebitsResourceLinkedFlows */ + treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal?: string | null + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer?: string | null + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction?: string | null + } + /** TreasuryReceivedDebitsResourceReversalDetails */ + treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedDebitsResourceStatusTransitions */ + treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + completed_at?: number | null + } + /** TreasurySharedResourceBillingDetails */ + treasury_shared_resource_billing_details: { + address: components['schemas']['address'] + /** @description Email address. */ + email?: string | null + /** @description Full name. */ + name?: string | null + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + balance?: 'payments' + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['received_payment_method_details_financial_account'] + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card?: string + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + type: 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account' + us_bank_account?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_us_bank_account'] + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + bank_name?: string | null + /** @description The last four digits of the bank account number. */ + last4?: string | null + /** @description The routing number for the bank account. */ + routing_number?: string | null + } + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + void_at?: number | null + } + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + cash: number + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: number + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: number + } + /** TreasuryTransactionsResourceFlowDetails */ + treasury_transactions_resource_flow_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + debit_reversal?: components['schemas']['treasury.debit_reversal'] + inbound_transfer?: components['schemas']['treasury.inbound_transfer'] + issuing_authorization?: components['schemas']['issuing.authorization'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + outbound_transfer?: components['schemas']['treasury.outbound_transfer'] + received_credit?: components['schemas']['treasury.received_credit'] + received_debit?: components['schemas']['treasury.received_debit'] + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + } + /** us_bank_account_networks */ + us_bank_account_networks: { + /** @description The preferred network. */ + preferred?: string | null + /** @description All supported networks. */ + supported: ('ach' | 'us_domestic_wire')[] + } /** * UsageRecord * @description Usage records allow you to report customer usage and metrics to Stripe for @@ -14483,13 +18444,19 @@ export type components = { } export type operations = { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { + /**

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']['three_d_secure'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14501,93 +18468,21 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Retrieves a 3D Secure object.

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

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

+ * + *

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

+ */ + PostAccount: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

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

- * - *

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

- */ - PostAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14655,6 +18550,10 @@ export type operations = { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -14671,6 +18570,14 @@ export type operations = { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -14715,10 +18622,18 @@ export type operations = { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -14727,6 +18642,14 @@ export type operations = { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -14746,6 +18669,14 @@ export type operations = { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -14871,7 +18802,7 @@ export type operations = { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -14921,6 +18852,7 @@ export type operations = { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -14929,6 +18861,15 @@ export type operations = { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -14976,6 +18917,8 @@ export type operations = { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -14997,6 +18940,16 @@ export type operations = { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -15563,8 +19516,6 @@ export type operations = { account: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -15721,6 +19672,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15739,6 +19692,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -15909,6 +19874,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15927,6 +19894,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16140,6 +20119,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16158,6 +20139,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16328,6 +20321,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16346,6 +20341,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16578,6 +20585,10 @@ export type operations = { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -16594,6 +20605,14 @@ export type operations = { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -16638,10 +20657,18 @@ export type operations = { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -16650,6 +20677,14 @@ export type operations = { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -16669,6 +20704,14 @@ export type operations = { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -16754,7 +20797,7 @@ export type operations = { } } } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ country?: string /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ default_currency?: string @@ -16796,7 +20839,7 @@ export type operations = { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -16846,6 +20889,7 @@ export type operations = { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -16854,6 +20898,15 @@ export type operations = { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -16901,6 +20954,8 @@ export type operations = { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -16922,6 +20977,16 @@ export type operations = { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17057,6 +21122,10 @@ export type operations = { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -17073,6 +21142,14 @@ export type operations = { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -17117,10 +21194,18 @@ export type operations = { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -17129,6 +21214,14 @@ export type operations = { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -17148,6 +21241,14 @@ export type operations = { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -17273,7 +21374,7 @@ export type operations = { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -17323,6 +21424,7 @@ export type operations = { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -17331,6 +21433,15 @@ export type operations = { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -17378,6 +21489,8 @@ export type operations = { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -17399,6 +21512,16 @@ export type operations = { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17996,8 +22119,6 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -18161,6 +22282,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18179,6 +22302,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18350,6 +22485,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18368,6 +22505,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18589,6 +22738,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18607,6 +22758,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18778,6 +22941,8 @@ export type operations = { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18796,6 +22961,18 @@ export type operations = { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19293,7 +23470,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -19303,6 +23480,172 @@ export type operations = { } } } + /**

List all secrets stored on the given scope.

*/ + GetAppsSecrets: { + 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 + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: 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']['apps.secret'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create or replace a secret in the secret store.

*/ + PostAppsSecrets: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number + /** @description A name for the secret that's unique within the scope. */ + name: string + /** @description The plaintext secret value to be stored. */ + payload: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Deletes a secret from the secret store by name and scope.

*/ + PostAppsSecretsDelete: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Finds a secret in the secret store by name and scope.

*/ + GetAppsSecretsFind: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A name for the secret that's unique within the scope. */ + name: string + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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.

@@ -19608,8 +23951,8 @@ export type operations = { */ business_profile: { headline?: string - privacy_policy_url: string - terms_of_service_url: string + privacy_policy_url?: string + terms_of_service_url?: string } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19622,7 +23965,7 @@ export type operations = { features: { /** customer_update_creation_param */ customer_update?: { - allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + allowed_updates?: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' enabled: boolean } /** invoice_list_param */ @@ -19675,6 +24018,13 @@ export type operations = { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } } @@ -19744,8 +24094,8 @@ export type operations = { */ business_profile?: { headline?: string - privacy_policy_url?: string - terms_of_service_url?: string + privacy_policy_url?: string | '' + terms_of_service_url?: string | '' } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19811,6 +24161,13 @@ export type operations = { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } @@ -19902,188 +24259,6 @@ export type operations = { } } } - /**

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

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

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

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

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

*/ GetCharges: { parameters: { @@ -20165,7 +24340,7 @@ export type operations = { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ application_fee_amount?: number /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ capture?: boolean @@ -20206,6 +24381,13 @@ export type operations = { metadata?: { [key: string]: string } | '' /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ on_behalf_of?: string + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string /** @@ -20247,6 +24429,57 @@ export type operations = { } } } + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetChargesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['charge'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

Retrieves the details of a 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: { @@ -20565,6 +24798,7 @@ export type operations = { amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' payment_intent?: string @@ -20649,11 +24883,23 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' payment_intent?: string /** @enum {string} */ reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' @@ -20731,6 +24977,12 @@ export type operations = { GetCheckoutSessions: { parameters: { query: { + /** Only return the Checkout Sessions for the Customer specified. */ + customer?: string + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details?: { + 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. */ @@ -20834,8 +25086,12 @@ export type operations = { */ consent_collection?: { /** @enum {string} */ - promotions?: 'auto' + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -20856,7 +25112,8 @@ export type operations = { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -20891,7 +25148,7 @@ export type operations = { expand?: string[] /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ expires_at?: number /** @@ -20899,7 +25156,7 @@ export type operations = { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ line_items?: { /** adjustable_quantity_params */ @@ -20908,7 +25165,6 @@ export type operations = { maximum?: number minimum?: number } - description?: string dynamic_tax_rates?: string[] price?: string /** price_data_with_product_data */ @@ -21030,6 +25286,16 @@ export type operations = { } transfer_group?: string } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -21050,26 +25316,168 @@ export type operations = { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ boleto?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean + } + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string + statement_descriptor_suffix_kanji?: string + } + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } /** payment_method_options_param */ oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number + } + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' } /** payment_method_options_param */ wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } } /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -21079,23 +25487,31 @@ export type operations = { */ payment_method_types?: ( | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] /** @@ -21387,6 +25803,13 @@ export type operations = { fixed_amount?: { amount: number currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } metadata?: { [key: string]: string } /** @enum {string} */ @@ -21411,11 +25834,7 @@ export type operations = { subscription_data?: { application_fee_percent?: number default_tax_rates?: string[] - items?: { - plan: string - quantity?: number - tax_rates?: string[] - }[] + description?: string metadata?: { [key: string]: string } /** transfer_data_specs */ transfer_data?: { @@ -21722,6 +26141,12 @@ export type operations = { } /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ currency?: string + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -21805,6 +26230,12 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -21925,9 +26356,9 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ credit_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -21950,7 +26381,7 @@ export type operations = { memo?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ out_of_band_amount?: number /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -21959,7 +26390,7 @@ export type operations = { reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** @description ID of an existing refund to link this credit note to. */ refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -21969,9 +26400,9 @@ export type operations = { GetCreditNotesPreview: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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[] @@ -21994,13 +26425,13 @@ export type operations = { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -22028,9 +26459,9 @@ export type operations = { GetCreditNotesPreviewLines: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22057,13 +26488,13 @@ export type operations = { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22267,6 +26698,8 @@ export type 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 + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock?: string } } responses: { @@ -22330,8 +26763,19 @@ export type operations = { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ description?: string @@ -22354,6 +26798,12 @@ export type operations = { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22404,6 +26854,7 @@ export type operations = { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -22415,10 +26866,12 @@ export type operations = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -22438,6 +26891,7 @@ export type operations = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -22445,9 +26899,62 @@ export type operations = { | 'za_vat' value: string }[] + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string + } + } + } + } + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetCustomersSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['customer'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } /**

Retrieves a Customer object.

*/ GetCustomersCustomer: { @@ -22519,7 +27026,7 @@ export type operations = { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ balance?: number /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ bank_account?: @@ -22554,6 +27061,17 @@ export type operations = { object?: 'card' } | string + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string @@ -22590,6 +27108,12 @@ export type operations = { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22632,8 +27156,6 @@ export type operations = { * @enum {string} */ tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number } } } @@ -22738,7 +27260,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ currency: string @@ -23375,7 +27897,8 @@ export type operations = { } } } - GetCustomersCustomerDiscount: { + /**

Retrieves a customer’s cash balance.

*/ + GetCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23389,7 +27912,7 @@ export type operations = { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23405,8 +27928,8 @@ export type operations = { } } } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { + /**

Changes the settings on a customer’s cash balance.

*/ + PostCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23416,7 +27939,7 @@ export type operations = { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23428,81 +27951,23 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetCustomersCustomerPaymentMethods: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { + /**

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

*/ + GetCustomersCustomerCashBalanceTransactions: { parameters: { path: { customer: string @@ -23514,8 +27979,6 @@ export type 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 - /** 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 } @@ -23526,13 +27989,311 @@ export type operations = { content: { 'application/json': { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: components['schemas']['customer_cash_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactionsTransaction: { + 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_cash_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + PostCustomersCustomerFundingInstructions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['funding_instructions'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: 'bank_transfer' + } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetCustomersCustomerPaymentMethods: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + GetCustomersCustomerPaymentMethodsPaymentMethod: { + parameters: { + path: { + customer: string + payment_method: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -23875,7 +28636,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -23895,7 +28656,7 @@ export type operations = { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -23907,7 +28668,7 @@ export type operations = { backdate_start_date?: number /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ @@ -23931,6 +28692,8 @@ export type operations = { collection_method?: 'charge_automatically' | 'send_invoice' /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string + /** @description Three-letter [ISO currency 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 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24018,9 +28781,35 @@ export type operations = { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24032,15 +28821,23 @@ export type operations = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24053,9 +28850,7 @@ export type operations = { /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24134,7 +28929,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -24154,7 +28949,7 @@ export type operations = { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -24281,9 +29076,35 @@ export type operations = { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24295,15 +29116,23 @@ export type operations = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24316,11 +29145,7 @@ export type operations = { /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24520,13 +29345,14 @@ export type operations = { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -24538,10 +29364,12 @@ export type operations = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -24561,6 +29389,7 @@ export type operations = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -25081,6 +29910,7 @@ export type operations = { 200: { content: { 'application/json': { + /** @description Details about each object. */ data: components['schemas']['file_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean @@ -25133,7 +29963,7 @@ export type operations = { * @description A future timestamp after which the link will no longer be usable. */ expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ file: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -25240,6 +30070,7 @@ export type operations = { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -25326,6 +30157,7 @@ export type operations = { | 'identity_document' | 'pci_document' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' } } } @@ -25361,6 +30193,284 @@ export type operations = { } } } + /**

Returns a list of Financial Connections Account objects.

*/ + GetFinancialConnectionsAccounts: { + parameters: { + query: { + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an Financial Connections Account.

*/ + GetFinancialConnectionsAccountsAccount: { + 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']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostFinancialConnectionsAccountsAccountDisconnect: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Lists all owners for a given Account

*/ + GetFinancialConnectionsAccountsAccountOwners: { + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostFinancialConnectionsAccountsAccountRefresh: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] + } + } + } + } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostFinancialConnectionsSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } + } + } + } + /**

Retrieves the details of a Financial Connections Session

*/ + GetFinancialConnectionsSessionsSession: { + 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']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

List all verification reports.

*/ GetIdentityVerificationReports: { parameters: { @@ -25814,7 +30924,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ amount?: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string @@ -25839,7 +30949,7 @@ export type operations = { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25868,11 +30978,11 @@ export type operations = { subscription?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -25934,7 +31044,7 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ amount?: number /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ description?: string @@ -25953,7 +31063,7 @@ export type operations = { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25980,11 +31090,11 @@ export type operations = { quantity?: number /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ tax_rates?: string[] | '' - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -26087,7 +31197,7 @@ export type operations = { } } } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ PostInvoices: { responses: { /** Successful response. */ @@ -26108,7 +31218,7 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ auto_advance?: boolean @@ -26124,6 +31234,8 @@ export type operations = { * @enum {string} */ collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** @description A list of up to 4 custom fields to be displayed on the invoice. */ custom_fields?: | { @@ -26132,7 +31244,7 @@ export type operations = { }[] | '' /** @description The ID of the customer who will be billed. */ - customer: string + customer?: string /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -26159,6 +31271,15 @@ export type operations = { expand?: string[] /** @description Footer to be displayed on the invoice. */ footer?: string + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: { + /** @enum {string} */ + action: 'revision' + invoice: string + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ @@ -26168,6 +31289,7 @@ export type operations = { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26189,10 +31311,47 @@ export type operations = { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26204,19 +31363,37 @@ export type operations = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + pending_invoice_items_behavior?: 'exclude' | 'include' | 'include_and_require' + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ subscription?: string /** * transfer_data_specs @@ -26230,6 +31407,57 @@ export type operations = { } } } + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetInvoicesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoice'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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

* @@ -26246,6 +31474,8 @@ export type operations = { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26287,6 +31517,7 @@ export type operations = { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26298,10 +31529,12 @@ export type operations = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26321,6 +31554,7 @@ export type operations = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26421,13 +31655,7 @@ export type operations = { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26469,6 +31697,8 @@ export type operations = { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26510,6 +31740,7 @@ export type operations = { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26521,10 +31752,12 @@ export type operations = { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26544,6 +31777,7 @@ export type operations = { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26650,13 +31884,7 @@ export type operations = { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26764,7 +31992,7 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ auto_advance?: boolean @@ -26822,6 +32050,7 @@ export type operations = { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26843,10 +32072,47 @@ export type operations = { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26858,16 +32124,29 @@ export type operations = { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ @@ -27051,6 +32330,8 @@ export type operations = { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ forgive?: boolean + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ off_session?: boolean /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -27127,88 +32408,6 @@ export type operations = { } } } - /**

Returns a list of issuer fraud records.

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

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

- * - *

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

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

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

*/ GetIssuingAuthorizations: { parameters: { @@ -27529,7 +32728,7 @@ export type operations = { } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ name: string /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ phone_number?: string @@ -29518,6 +34717,7 @@ export type operations = { currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + financial_account?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } /** @description The card this is meant to be a replacement for (if any). */ @@ -29541,7 +34741,13 @@ export type operations = { postal_code: string state?: string } + /** customs_param */ + customs?: { + eori_number?: string + } name: string + phone_number?: string + require_signature?: boolean /** @enum {string} */ service?: 'express' | 'priority' | 'standard' /** @enum {string} */ @@ -31480,6 +36686,8 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31563,8 +36771,15 @@ export type operations = { expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string + } } } } @@ -31624,6 +36839,8 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31983,22 +37200,13 @@ export type operations = { } } } - /**

Retrieves a Mandate object.

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostLinkAccountSessions: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['mandate'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32010,82 +37218,54 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - GetOrderReturns: { - parameters: { - query: { - /** Date this return was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

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

*/ - GetOrderReturnsId: { + /**

Retrieves the details of a Financial Connections Session

*/ + GetLinkAccountSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - id: string + session: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32101,70 +37281,25 @@ export type operations = { } } } - /**

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

*/ - GetOrders: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetLinkedAccounts: { parameters: { query: { - /** Date this order was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return orders for the given customer. */ - customer?: string + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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 orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: { - canceled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - fulfilled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - paid?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - returned?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - } - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: string[] } } responses: { @@ -32172,7 +37307,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['order'][] + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32198,13 +37334,22 @@ export type operations = { } } } - /**

Creates a new order object.

*/ - PostOrders: { + /**

Retrieves the details of an Financial Connections Account.

*/ + GetLinkedAccountsAccount: { + 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']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32216,66 +37361,22 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostLinkedAccountsAccountDisconnect: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32287,22 +37388,49 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - PostOrdersId: { + /**

Lists all owners for a given Account

*/ + GetLinkedAccountsAccountOwners: { parameters: { path: { - id: string + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: 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': components['schemas']['order'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -32314,44 +37442,22 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

*/ - PostOrdersIdPay: { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostLinkedAccountsAccountRefresh: { parameters: { path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32364,34 +37470,30 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] } } } } - /**

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

Retrieves a Mandate object.

*/ + GetMandatesMandate: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + mandate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['mandate'] } } /** Error response. */ @@ -32403,38 +37505,15 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: - | { - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { + /**

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: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** 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 @@ -32451,7 +37530,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['payment_intent'][] + data: components['schemas']['order'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32477,24 +37556,13 @@ export type operations = { } } } - /** - *

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

Creates a new open order object.

*/ + PostOrders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -32507,288 +37575,117 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * automatic_tax + * @description Settings for automatic tax calculation for this order. */ - automatic_payment_methods?: { + automatic_tax?: { enabled: boolean } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: boolean | ('one_off' | 'recurring') - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** create_params */ + settings: { + application_fee_amount?: number + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { /** payment_intent_payment_method_options_mandate_options_param */ mandate_options?: { custom_mandate_url?: string | '' @@ -32799,68 +37696,74 @@ export type operations = { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } - | '' - afterpay_clearpay?: - | { + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + bancontact?: { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - boleto?: - | { - expires_after_days?: number + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' } /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + funding_type?: 'bank_transfer' /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -32871,130 +37774,243 @@ export type operations = { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - oxxo?: - | { + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - p24?: - | { + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' tos_shown_and_accepted?: boolean } - | '' - sepa_debit?: - | { + /** payment_intent_payment_method_options_param */ + sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } - | '' - sofort?: - | { + /** payment_method_options_param */ + sofort?: { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - wechat_pay?: - | { + /** payment_method_options_param */ + wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data */ + transfer_data?: { + amount?: number + destination: string + } } - carrier?: string - name: string - phone?: string - tracking_number?: string } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + metadata?: { [key: string]: string } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string + /** @enum {string} */ + type?: 'fixed_amount' + } + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: + | { + /** validated_optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number - destination: string + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean } } } } - /** - *

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

- * - *

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

- * - *

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

- */ - GetPaymentIntentsIntent: { + /**

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: { - /** 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 + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33010,26 +38026,18 @@ export type operations = { } } } - /** - *

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

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

*/ + PostOrdersId: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33042,386 +38050,367 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | '' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean + } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + id?: string + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** update_params */ + settings: { + application_fee_amount?: number | '' + /** update_params */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string | '' + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_data?: + | { + amount?: number + destination: string + } + | '' } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } + metadata?: { [key: string]: string } /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number + type?: 'fixed_amount' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: | { - /** optional_fields_address */ + /** validated_optional_fields_address */ address: { city?: string country?: string @@ -33430,45 +38419,85 @@ export type operations = { postal_code?: string state?: string } - carrier?: string name: string phone?: string - tracking_number?: string } | '' - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string } } } } - /** - *

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

- * - *

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

- */ - PostPaymentIntentsIntentCancel: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + PostOrdersIdCancel: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33481,35 +38510,73 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /** - *

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

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Reopens a submitted order.

*/ + PostOrdersIdReopen: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33522,61 +38589,113 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number + } + } + } + } + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + PostOrdersIdSubmit: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number + } + } + } + } + /**

Returns a list of PaymentIntents.

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

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).

+ *

Creates a PaymentIntent object.

* - *

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.

+ *

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.

* - *

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.

+ *

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.

*/ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostPaymentIntents: { responses: { /** Successful response. */ 200: { @@ -33594,47 +38713,75 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean + } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. */ + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ mandate?: string - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ off_session?: boolean | ('one_off' | 'recurring') - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ payment_method?: string /** * payment_method_data_params @@ -33650,6 +38797,8 @@ export type operations = { transit_number: string } /** param */ + affirm?: { [key: string]: unknown } + /** param */ afterpay_clearpay?: { [key: string]: unknown } /** param */ alipay?: { [key: string]: unknown } @@ -33682,10 +38831,14 @@ export type operations = { phone?: string } /** param */ + blik?: { [key: string]: unknown } + /** param */ boleto?: { tax_id: string } /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ eps?: { /** @enum {string} */ bank?: @@ -33699,6 +38852,7 @@ export type operations = { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -33776,6 +38930,10 @@ export type operations = { year: number } } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } metadata?: { [key: string]: string } /** param */ oxxo?: { [key: string]: unknown } @@ -33810,6 +38968,16 @@ export type operations = { | 'volkswagen_bank' } /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ sepa_debit?: { iban: string } @@ -33821,23 +38989,42 @@ export type operations = { /** @enum {string} */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } /** param */ wechat_pay?: { [key: string]: unknown } } @@ -33858,30 +39045,70 @@ export type operations = { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' afterpay_clearpay?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' bancontact?: | { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string } | '' boleto?: | { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' card?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' cvc_token?: string /** installments_param */ installments?: { @@ -33896,30 +39123,102 @@ export type operations = { } | '' } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } /** @enum {string} */ network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' /** @enum {string} */ setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' interac_present?: { [key: string]: unknown } | '' klarna?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -33930,41 +39229,116 @@ export type operations = { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - oxxo?: + konbini?: | { - expires_after_days?: number + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - p24?: + link?: | { - tos_shown_and_accepted?: boolean - } + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } | '' sepa_debit?: | { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' sofort?: | { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' wechat_pay?: @@ -33972,18 +39346,23 @@ export type operations = { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + radar_options?: { + session?: string + } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ return_url?: string /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -33991,47 +39370,85 @@ export type operations = { * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - | '' + setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean } } } } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPaymentIntentsSearch: { parameters: { - path: { - intent: 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + data: components['schemas']['payment_intent'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } } } /** Error response. */ @@ -34043,49 +39460,34 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your payment links.

*/ - GetPaymentLinks: { + /** + *

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: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string + /** 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[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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: { + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34101,13 +39503,26 @@ export type operations = { } } } - /**

Creates a payment link.

*/ - PostPaymentLinks: { + /** + *

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_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34120,348 +39535,663 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | '' /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - automatic_tax?: { - enabled: boolean - } + capture_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. */ - billing_address_collection?: 'auto' | 'required' + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - price: string - quantity: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: 'card'[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. - * - * We recommend that you review your privacy policy and check with your legal contacts. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - phone_number_collection?: { - enabled: boolean + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } } /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - 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' - )[] + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - subscription_data?: { - trial_period_days?: number - } + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + | '' + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: { amount?: number - destination: string } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string } } } } - /**

Retrieve a payment link.

*/ - GetPaymentLinksPaymentLink: { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + PostPaymentIntentsIntentApplyCustomerBalance: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34473,22 +40203,43 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates a payment link.

*/ - PostPaymentLinksPaymentLink: { - parameters: { - path: { - payment_link: string - } - } + /** + *

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

+ * + *

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

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

+ */ + PostPaymentIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34501,337 +40252,35 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } /** - * @description Configuration for collecting the customer's billing address. + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` * @enum {string} */ - billing_address_collection?: 'auto' | 'required' + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - id: string - quantity?: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | '' - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: - | { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - | '' } } } } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetPaymentLinksPaymentLinkLineItems: { + /** + *

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

+ * + *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

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

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - GetPaymentMethods: { - parameters: { - query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } /** - *

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

+ *

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

* - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ *

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.

*/ - PostPaymentMethods: { + PostPaymentIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34939,52 +40366,653 @@ export type operations = { content: { 'application/x-www-form-urlencoded': { /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - afterpay_clearpay?: { [key: string]: unknown } + capture_method?: 'automatic' | 'manual' + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: boolean | ('one_off' | 'recurring') + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - alipay?: { [key: string]: unknown } + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - au_becs_debit?: { - account_number: string - bsb_number: string + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ - bacs_debit?: { - account_number?: string - sort_code?: string + radar_options?: { + session?: string } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. */ - bancontact?: { [key: string]: unknown } + return_url?: string /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - billing_details?: { - address?: - | { + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { city?: string country?: string line1?: string @@ -34992,349 +41020,55 @@ export type operations = { postal_code?: string state?: string } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: - | { - cvc?: string - exp_month: number - exp_year: number - number: string + carrier?: string + name: string + phone?: string + tracking_number?: string } - | { - token: string - } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: { [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: { [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: { [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: { [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPaymentMethodsPaymentMethod: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number - exp_year?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + | '' + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean } } } } /** - *

Attaches a PaymentMethod object to a Customer.

+ *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

* - *

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.

+ *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

* - *

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.

+ *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

*/ - PostPaymentMethodsPaymentMethodAttach: { + PostPaymentIntentsIntentIncrementAuthorization: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35347,26 +41081,42 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description 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 + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } } } } } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35379,34 +41129,24 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /**

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

*/ - GetPayouts: { + /**

Returns a list of your payment links.

*/ + GetPaymentLinks: { parameters: { query: { - arrival_date?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ + active?: boolean /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -35415,8 +41155,6 @@ export type 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 - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string } } responses: { @@ -35424,7 +41162,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['payout'][] + data: components['schemas']['payment_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35450,19 +41188,13 @@ export type operations = { } } } - /** - *

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

Creates a payment link.

*/ + PostPaymentLinks: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payout'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35475,207 +41207,427 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - method?: 'instant' | 'standard' + billing_address_collection?: 'auto' | 'required' /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). * @enum {string} */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - } - /**

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

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

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

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - PostPayoutsPayoutReverse: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + price: string + quantity: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean + } + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: { + shipping_rate?: string + }[] + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + description?: string + trial_period_days?: number + } + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean + } + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number + destination: string + } } } } } - /**

Returns a list of your plans.

*/ - GetPlans: { + /**

Retrieve a payment link.

*/ + GetPaymentLinksPaymentLink: { parameters: { query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + } + path: { + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35691,13 +41643,18 @@ export type operations = { } } } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - PostPlans: { + /**

Updates a payment link.

*/ + PostPaymentLinksPaymentLink: { + parameters: { + path: { + payment_link: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['plan'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35710,171 +41667,379 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active?: boolean /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} + * after_completion_params + * @description Behavior after the purchase is complete. */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + * automatic_tax_params + * @description Configuration for automatic tax collection. */ - amount_decimal?: string + automatic_tax?: { + enabled: boolean + } /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + billing_address_collection?: 'auto' | 'required' + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + id: string + quantity?: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { [key: string]: string } /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). * @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - product?: + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: | { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } - | string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: 'licensed' | 'metered' + 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' + )[] + } + | '' } } } } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetPaymentLinksPaymentLinkLineItems: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - } - /**

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

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_plan'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -35890,44 +42055,50 @@ export type operations = { } } } - /**

Returns a list of your prices.

*/ - GetPrices: { + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + GetPaymentMethods: { parameters: { query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return prices for the given currency. */ - currency?: string + /** 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 - /** Only return the price with these lookup_keys, if any exist. */ - lookup_keys?: string[] - /** Only return prices for the given product. */ - product?: string - /** Only return prices with these recurring fields. */ - recurring?: { - /** @enum {string} */ - interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - type?: 'one_time' | 'recurring' + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' } } responses: { @@ -35935,8 +42106,7 @@ export type operations = { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['price'][] + data: components['schemas']['payment_method'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35962,13 +42132,17 @@ export type operations = { } } } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - PostPrices: { + /** + *

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

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + PostPaymentMethods: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -35981,109 +42155,375 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** @description The ID of the product that this price will belong to. */ - product?: string /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. */ - product_data?: { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string + acss_debit?: { + account_number: string + institution_number: string + transit_number: string } /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } + affirm?: { [key: string]: unknown } /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] + afterpay_clearpay?: { [key: string]: unknown } /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. */ - tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + alipay?: { [key: string]: unknown } /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. */ - transform_quantity?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' + au_becs_debit?: { + account_number: string + bsb_number: string } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - unit_amount?: number /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. */ - unit_amount_decimal?: string + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: { [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: { [key: string]: unknown } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: + | { + cvc?: string + exp_month: number + exp_year: number + number: string + } + | { + token: string + } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: { [key: string]: unknown } + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: { [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: { [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: { [key: string]: unknown } + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: { [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: { [key: string]: unknown } + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: { [key: string]: unknown } + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: { [key: string]: unknown } + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: { [key: string]: unknown } } } } } - /**

Retrieves the price with the given ID.

*/ - GetPricesPrice: { + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ + GetPaymentMethodsPaymentMethod: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36099,18 +42539,18 @@ export type operations = { } } } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - PostPricesPrice: { + /**

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

*/ + PostPaymentMethodsPaymentMethod: { parameters: { path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36123,34 +42563,142 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description A brief description of the price, hidden from customers. */ - nickname?: string /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + } } } } } - /**

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

*/ - GetProducts: { + /** + *

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 set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See Optimizing cards for future payments for more information about setting up + * future payments.

+ * + *

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

+ */ + PostPaymentMethodsPaymentMethodAttach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

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

*/ + GetPayouts: { parameters: { query: { - /** 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. */ + arrival_date?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number created?: | { gt?: number @@ -36159,20 +42707,18 @@ export type operations = { lte?: number } | number + /** The ID of an external account - only return payouts sent to this external account. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Only return products with the given IDs. */ - ids?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return products with the given url. */ - url?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string } } responses: { @@ -36180,8 +42726,7 @@ export type operations = { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['product'][] + data: components['schemas']['payout'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36207,13 +42752,19 @@ export type operations = { } } } - /**

Creates a new product object.

*/ - PostProducts: { + /** + *

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']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36226,65 +42777,50 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean + method?: 'instant' | 'standard' /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

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

*/ - GetProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36300,18 +42836,18 @@ export type operations = { } } } - /**

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

*/ - PostProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36324,58 +42860,26 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] | '' /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string | '' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - DeleteProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36387,20 +42891,55 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your promotion codes.

*/ - GetPromotionCodes: { + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + PostPayoutsPayoutReverse: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Returns a list of your plans.

*/ + GetPlans: { parameters: { query: { - /** Filter promotion codes by whether they are active. */ + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - code?: string - /** Only return promotion codes for this coupon. */ - coupon?: string /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { @@ -36410,14 +42949,14 @@ export type operations = { lte?: number } | number - /** Only return promotion codes that are restricted to this customer. */ - customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** 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 } @@ -36427,7 +42966,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['promotion_code'][] + /** @description Details about each object. */ + data: components['schemas']['plan'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36453,13 +42993,13 @@ export type operations = { } } } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - PostPromotionCodes: { + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + PostPlans: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36472,54 +43012,104 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string - /** @description The coupon for this promotion code. */ - coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} */ - expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + product?: + | { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } + | string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - restrictions?: { - first_time_transaction?: boolean - minimum_amount?: number - minimum_amount_currency?: string + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' } } } } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - GetPromotionCodesPromotionCode: { + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36535,18 +43125,18 @@ export type operations = { } } } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - PostPromotionCodesPromotionCode: { + /**

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: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36559,32 +43149,87 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + /** @description Whether the plan is currently available for new subscriptions. */ active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number } } } } - /**

Returns a list of your quotes.

*/ - GetQuotes: { + /**

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

*/ + DeletePlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your prices.

*/ + GetPrices: { parameters: { query: { - /** The ID of the customer whose quotes will be retrieved. */ - customer?: string + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return prices for the given currency. */ + currency?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** Only return the price with these lookup_keys, if any exist. */ + lookup_keys?: string[] + /** Only return prices for the given product. */ + product?: string + /** Only return prices with these recurring fields. */ + recurring?: { + /** @enum {string} */ + interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** The status of the quote. */ - status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Only return prices of type `recurring` or `one_time`. */ + type?: 'one_time' | 'recurring' } } responses: { @@ -36592,7 +43237,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['quote'][] + /** @description Details about each object. */ + data: components['schemas']['price'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36618,13 +43264,13 @@ export type operations = { } } } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - PostQuotes: { + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + PostPrices: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36637,123 +43283,196 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} */ - automatic_tax?: { - enabled: boolean + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } } /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** @description The ID of the product that this price will belong to. */ + product?: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string + product_data?: { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. */ - from_quote?: { - is_revision?: boolean - quote: string + recurring?: { + /** @enum {string} */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string /** - * quote_param - * @description All invoices will be billed using the specified settings. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' + tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string } } } } - /**

Retrieves the quote with the given ID.

*/ - GetQuotesQuote: { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPricesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['price'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the price with the given ID.

*/ + GetPricesPrice: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36769,18 +43488,18 @@ export type operations = { } } } - /**

A quote models prices and services for a customer.

*/ - PostQuotesQuote: { + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + PostPricesPrice: { parameters: { path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36793,175 +43512,84 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: | { - coupon?: string - discount?: string - }[] + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string - /** @description A header that will be displayed on the quote PDF. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - id?: string - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' + metadata?: { [key: string]: string } | '' + /** @description A brief description of the price, hidden from customers. */ + nickname?: string /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' - } - } - } - } - /**

Accepts the specified quote.

*/ - PostQuotesQuoteAccept: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Cancels the quote.

*/ - PostQuotesQuoteCancel: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean } } } } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - GetQuotesQuoteComputedUpfrontLineItems: { + /**

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

*/ + GetProducts: { parameters: { query: { + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + 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 - } - path: { - quote: string + /** Only return products with the given url. */ + url?: string } } responses: { @@ -36970,7 +43598,7 @@ export type operations = { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['item'][] + data: components['schemas']['product'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36996,18 +43624,13 @@ export type operations = { } } } - /**

Finalizes the quote.

*/ - PostQuotesQuoteFinalize: { - parameters: { - path: { - quote: string - } - } + /**

Creates a new product object.

*/ + PostProducts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37020,32 +43643,109 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. */ + name: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. */ - expires_at?: number + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string } } } } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetQuotesQuoteLineItems: { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetProductsSearch: { parameters: { query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - quote: string + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: string } } responses: { @@ -37053,16 +43753,16 @@ export type operations = { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ + data: components['schemas']['product'][] has_more: boolean + next_page?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'list' - /** @description The URL where this list can be accessed. */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number url: string } } @@ -37080,22 +43780,22 @@ export type operations = { } } } - /**

Download the PDF for a finalized quote

*/ - GetQuotesQuotePdf: { + /**

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: { - quote: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/pdf': string + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37111,40 +43811,18 @@ export type operations = { } } } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { + /**

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

*/ + PostProductsId: { parameters: { - query: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37156,30 +43834,61 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] | '' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The product's name, meant to be displayable to the customer. */ + name?: string + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | '' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string | '' + } } } } - /** - *

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

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + DeleteProductsId: { parameters: { path: { - early_fraud_warning: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.early_fraud_warning'] + 'application/json': components['schemas']['deleted_product'] } } /** Error response. */ @@ -37195,10 +43904,17 @@ export type operations = { } } } - /**

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

Returns a list of your promotion codes.

*/ + GetPromotionCodes: { parameters: { query: { + /** Filter promotion codes by whether they are active. */ + active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + code?: string + /** Only return promotion codes for this coupon. */ + coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { gt?: number @@ -37207,6 +43923,8 @@ export type operations = { lte?: number } | number + /** Only return promotion codes that are restricted to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37215,10 +43933,6 @@ export type 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 - /** 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: { @@ -37226,7 +43940,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list_item'][] + data: components['schemas']['promotion_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37252,13 +43966,13 @@ export type operations = { } } } - /**

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

*/ - PostRadarValueListItems: { + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + PostPromotionCodes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37271,32 +43985,59 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. */ + active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string + /** @description The coupon for this promotion code. */ + coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + first_time_transaction?: boolean + minimum_amount?: number + minimum_amount_currency?: string + } } } } } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + GetPromotionCodesPromotionCode: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37312,18 +44053,18 @@ export type operations = { } } } - /**

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

*/ - DeleteRadarValueListItemsItem: { + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + PostPromotionCodesPromotionCode: { parameters: { path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37335,26 +44076,34 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + } + } } } } - /**

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

Returns a list of your quotes.

*/ + GetQuotes: { parameters: { query: { - /** The alias used to reference the value list when writing rules. */ - alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - contains?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** The ID of the customer whose quotes will be retrieved. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37363,6 +44112,10 @@ export type 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 quote. */ + status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock?: string } } responses: { @@ -37370,7 +44123,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list'][] + data: components['schemas']['quote'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37396,13 +44149,13 @@ export type operations = { } } } - /**

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

*/ - PostRadarValueLists: { + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + PostQuotes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37415,39 +44168,126 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - * @enum {string} + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name: string - } - } - } - } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean + quote: string + } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + GetQuotesQuote: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37463,18 +44303,18 @@ export type operations = { } } } - /**

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

A quote models prices and services for a customer.

*/ + PostQuotesQuote: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37487,30 +44327,113 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias?: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string + /** @description A header that will be displayed on the quote PDF. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + id?: string + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name?: string + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' } } } } - /**

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

Accepts the specified quote.

*/ + PostQuotesQuoteAccept: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37522,22 +44445,47 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Cancels the quote.

*/ + PostQuotesQuoteCancel: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - GetRecipients: { + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ + GetQuotesQuoteComputedUpfrontLineItems: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37546,9 +44494,9 @@ export type 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 - type?: 'corporation' | 'individual' - /** Only return recipients that are verified or unverified. */ - verified?: boolean + } + path: { + quote: string } } responses: { @@ -37556,7 +44504,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['recipient'][] + /** @description Details about each object. */ + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37582,16 +44531,18 @@ export type operations = { } } } - /** - *

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

Finalizes the quote.

*/ + PostQuotesQuoteFinalize: { + parameters: { + path: { + quote: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37604,44 +44555,51 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number } } } } - /**

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

*/ - GetRecipientsId: { + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

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

Download the PDF for a finalized quote

*/ + GetQuotesQuotePdf: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/pdf': string } } /** Error response. */ @@ -37686,41 +44642,79 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

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

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { + /** + *

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: { - id: string + 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']['deleted_recipient'] + 'application/json': components['schemas']['radar.early_fraud_warning'] } } /** Error response. */ @@ -37736,12 +44730,10 @@ export type operations = { } } } - /**

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

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: { - /** Only return refunds for the charge specified by this charge ID. */ - charge?: string created?: | { gt?: number @@ -37756,10 +44748,12 @@ export type 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 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 + /** 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: { @@ -37767,7 +44761,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['refund'][] + data: components['schemas']['radar.value_list_item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37793,13 +44787,13 @@ export type operations = { } } } - /**

Create a refund.

*/ - PostRefunds: { + /**

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

*/ + PostRadarValueListItems: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37812,37 +44806,32 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - amount?: number - charge?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string } } } } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37858,22 +44847,18 @@ export type operations = { } } } - /** - *

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

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

*/ + DeleteRadarValueListItemsItem: { parameters: { path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['deleted_radar.value_list_item'] } } /** Error response. */ @@ -37885,19 +44870,18 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { + /**

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

*/ + GetRadarValueLists: { parameters: { query: { + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string created?: | { gt?: number @@ -37921,7 +44905,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_run'][] + data: components['schemas']['radar.value_list'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37947,13 +44931,13 @@ export type operations = { } } } - /**

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

*/ - PostReportingReportRuns: { + /**

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

*/ + PostRadarValueLists: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['radar.value_list'] } } /** Error response. */ @@ -37966,86 +44950,473 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - /** Format: unix-time */ - interval_end?: number - /** Format: unix-time */ - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + } + /**

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

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

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

Create a refund.

*/ + PostRefunds: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ + amount?: number + charge?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + PostRefundsRefundCancel: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

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

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

*/ + PostReportingReportRuns: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + /** Format: unix-time */ + interval_end?: number + /** Format: unix-time */ + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' @@ -38614,28 +45985,3921 @@ export type operations = { | 'WET' | 'Zulu' } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

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

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

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

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

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

+ */ + PostSetupIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + } + /** + *

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

+ * + *

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

+ * + *

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

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

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

+ * + *

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

+ * + *

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

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + PostSetupIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + GetShippingRates: { + parameters: { + query: { + /** Only return shipping rates that are active or inactive. */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return shipping rates for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + PostShippingRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + GetShippingRatesShippingRateToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + PostShippingRatesShippingRateToken: { + parameters: { + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: { + amount?: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + } + /**

Returns a list of scheduled query runs.

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

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + GetSkus: { + parameters: { + query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: { [key: string]: string } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return SKUs with the given IDs. */ + ids?: string[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + } + /**

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

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + } + /**

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

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + metadata?: { [key: string]: string } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** @enum {string} */ + usage?: 'reusable' | 'single_use' + } + } + } + } + /**

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

*/ + GetSourcesSource: { + parameters: { + query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

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

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

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + } + /**

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

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

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

*/ + PostSubscriptionItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

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

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + } + } + } + } + /** + *

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

+ * + *

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

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

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

+ * + *

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

+ * + *

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

+ * + *

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

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: 'now' | number + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostSubscriptionSchedules: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + currency?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + /** Format: unix-time */ + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + /** Format: unix-time */ + trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: number | 'now' + } + } + } + } + /**

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

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + end_date?: number | 'now' + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: number | 'now' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + trial_end?: number | 'now' + }[] + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + } + /**

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

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + } + /**

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

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + } + /**

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

*/ + GetSubscriptions: { + parameters: { + query: { + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_end?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_start?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter for subscriptions that contain this recurring price ID. */ + price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ + PostSubscriptions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number } } } } - /**

Retrieves the details of an existing Report Run.

*/ - GetReportingReportRunsReportRun: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetSubscriptionsSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_run: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -38651,12 +49915,351 @@ export type operations = { } } } - /**

Returns a full list of Report Types.

*/ - GetReportingReportTypes: { + /**

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

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } + } + } + } + /** + *

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

+ * + *

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

+ * + *

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

+ */ + DeleteSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + GetTaxCodes: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } } responses: { @@ -38664,7 +50267,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_type'][] + data: components['schemas']['tax_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38690,22 +50293,22 @@ export type operations = { } } } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - GetReportingReportTypesReportType: { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + GetTaxCodesId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_type: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_type'] + 'application/json': components['schemas']['tax_code'] } } /** Error response. */ @@ -38721,10 +50324,13 @@ export type operations = { } } } - /**

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

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

*/ + GetTaxRates: { parameters: { query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active?: boolean + /** Optional range for filtering created date. */ created?: | { gt?: number @@ -38737,6 +50343,8 @@ export type operations = { 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. */ @@ -38748,7 +50356,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['review'][] + data: components['schemas']['tax_rate'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38768,28 +50376,76 @@ export type operations = { } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new tax rate.

*/ + PostTaxRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { + /**

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38805,18 +50461,18 @@ export type operations = { } } } - /**

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

*/ - PostReviewsReviewApprove: { + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { parameters: { path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38829,40 +50485,43 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - GetSetupAttempts: { + /**

Returns a list of Configuration objects.

*/ + GetTerminalConfigurations: { parameters: { query: { - /** - * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a - * dictionary with a number of different query options. - */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** if present, only return the account default or non-default configurations. */ + is_account_default?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** - * Only return SetupAttempts created by the SetupIntent specified by - * this ID. - */ - setup_intent: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -38872,7 +50531,7 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['setup_attempt'][] + data: components['schemas']['terminal.configuration'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38898,49 +50557,150 @@ export type operations = { } } } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { + /**

Creates a new Configuration object.

*/ + PostTerminalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: { + splashscreen?: string | '' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + } + | '' + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: string | '' + } + } + } + } + } + /**

Retrieves a Configuration object.

*/ + GetTerminalConfigurationsConfiguration: { parameters: { + path: { + configuration: 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?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return SetupIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return SetupIntents associated with the specified payment method. */ - payment_method?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38956,18 +50716,18 @@ export type operations = { } } } - /** - *

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

Updates a new Configuration object.

*/ + PostTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38980,122 +50740,125 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: + | { + splashscreen?: string | '' + } + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + | '' + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: + | { + splashscreen?: string | '' } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: 'off_session' | 'on_session' + | '' } } } } - /** - *

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

- * - *

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

- * - *

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

- */ - GetSetupIntentsIntent: { + /**

Deletes a Configuration object.

*/ + DeleteTerminalConfigurationsConfiguration: { 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 + configuration: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39111,18 +50874,13 @@ export type operations = { } } } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { - parameters: { - path: { - intent: string - } - } + /**

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']['setup_intent'] + 'application/json': components['schemas']['terminal.connection_token'] } } /** Error response. */ @@ -39135,75 +50893,44 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string } } } } - /** - *

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

- * - *

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

- */ - PostSetupIntentsIntentCancel: { + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { parameters: { - path: { - intent: 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': components['schemas']['setup_intent'] + 'application/json': { + data: components['schemas']['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -39215,44 +50942,20 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } /** - *

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.

+ *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

*/ - PostSetupIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostTerminalLocations: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] } } /** Error response. */ @@ -39265,97 +50968,73 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. + * create_location_address_param + * @description The full address of the location. */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } - /**

Verifies microdeposits on a SetupIntent object.

*/ - PostSetupIntentsIntentVerifyMicrodeposits: { + /**

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

*/ + PostTerminalLocationsLocation: { parameters: { path: { - intent: string + location: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] } } /** Error response. */ @@ -39368,41 +51047,75 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the SetupIntent. */ - client_secret?: string + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of your shipping rates.

*/ - GetShippingRates: { + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { parameters: { query: { - /** Only return shipping rates that are active or inactive. */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return shipping rates for the given currency. */ - currency?: string + /** Filters readers by device type */ + device_type?: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | '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: { @@ -39410,7 +51123,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['shipping_rate'][] + /** @description A list of readers */ + data: components['schemas']['terminal.reader'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39436,13 +51150,13 @@ export type operations = { } } } - /**

Creates a new shipping rate object.

*/ - PostShippingRates: { + /**

Creates a new Reader object.

*/ + PostTerminalReaders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39455,70 +51169,36 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number - currency: string - } + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. */ + location?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: 'fixed_amount' + metadata?: { [key: string]: string } | '' + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string } } } } - /**

Returns the shipping rate object with the given ID.

*/ - GetShippingRatesShippingRateToken: { + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39534,18 +51214,18 @@ export type operations = { } } } - /**

Updates an existing shipping rate object.

*/ - PostShippingRatesShippingRateToken: { + /**

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

*/ + PostTerminalReadersReader: { parameters: { path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39558,46 +51238,28 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The new label of the reader. */ + label?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { + /**

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { 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: { + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39613,22 +51275,18 @@ export type operations = { } } } - /**

Retrieves the details of an scheduled query run.

*/ - GetSigmaScheduledQueryRunsScheduledQueryRun: { + /**

Cancels the current reader action.

*/ + PostTerminalReadersReaderCancelAction: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - scheduled_query_run: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['scheduled_query_run'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39640,72 +51298,25 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - GetSkus: { + /**

Initiates a payment flow on a Reader.

*/ + PostTerminalReadersReaderProcessPaymentIntent: { parameters: { - query: { - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ - attributes?: { [key: string]: string } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return SKUs with the given IDs. */ - ids?: string[] - /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ - in_stock?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + path: { + reader: string } } - } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39718,65 +51329,33 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + /** @description PaymentIntent ID */ + payment_intent: string /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. + * process_config + * @description Configuration overrides */ - package_dimensions?: { - height: number - length: number - weight: number - width: number + process_config?: { + skip_tipping?: boolean } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string } } } } - /**

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

*/ - GetSkusId: { + /**

Initiates a setup intent flow on a Reader.

*/ + PostTerminalReadersReaderProcessSetupIntent: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39788,26 +51367,29 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description SetupIntent ID */ + setup_intent: string + } } } } - /** - *

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

Sets reader display to show cart details.

*/ + PostTerminalReadersReaderSetReaderDisplay: { parameters: { path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39820,58 +51402,43 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string + /** + * cart + * @description Cart + */ + cart?: { + currency: string + line_items: { + amount: number + description: string + quantity: number + }[] + tax?: number + total: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string /** - * inventory_update_specs - * @description Description of the SKU's inventory. + * @description Type + * @enum {string} */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string + type: 'cart' } } } } - /**

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

*/ - DeleteSkusId: { + /**

Create an incoming testmode bank transfer

*/ + PostTestHelpersCustomersCustomerFundCashBalance: { parameters: { path: { - id: string + customer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_sku'] + 'application/json': components['schemas']['customer_cash_balance_transaction'] } } /** Error response. */ @@ -39883,17 +51450,31 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + reference?: string + } } } } - /**

Creates a new source object.

*/ - PostSources: { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + PostTestHelpersIssuingCardsCardShippingDeliver: { + parameters: { + path: { + card: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -39905,151 +51486,55 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - metadata?: { [key: string]: string } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** @enum {string} */ - usage?: 'reusable' | 'single_use' + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] } } } } - /**

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

Updates the shipping status of the specified Issuing Card object to failure.

*/ + PostTestHelpersIssuingCardsCardShippingFail: { 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: { + card: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + PostTestHelpersIssuingCardsCardShippingReturn: { + parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40061,26 +51546,25 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + PostTestHelpersIssuingCardsCardShippingShip: { parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40093,116 +51577,54 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } } } } } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { + /**

Expire a refund with a status of requires_action.

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

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { + parameters: { path: { - mandate_notification: string - source: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_mandate_notification'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40214,12 +51636,27 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Simulated payment type + * @enum {string} + */ + type?: 'card_present' + } } } } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { + /**

Returns a list of your test clocks.

*/ + GetTestHelpersTestClocks: { 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. */ @@ -40231,16 +51668,13 @@ export type 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 } - path: { - source: string - } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['source_transaction'][] + data: components['schemas']['test_helpers.test_clock'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -40266,23 +51700,54 @@ export type operations = { } } } - /**

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

Creates a new test clock that can be attached to new customers and quotes.

*/ + PostTestHelpersTestClocks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['test_helpers.test_clock'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + frozen_time: number + /** @description The name for this test clock. */ + name?: string + } + } + } + } + /**

Retrieves a test clock.

*/ + GetTestHelpersTestClocksTestClock: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - source: string - source_transaction: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_transaction'] + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40298,18 +51763,18 @@ export type operations = { } } } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { + /**

Deletes a test clock.

*/ + DeleteTestHelpersTestClocksTestClock: { parameters: { path: { - source: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['deleted_test_helpers.test_clock'] } } /** Error response. */ @@ -40321,47 +51786,22 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

*/ - GetSubscriptionItems: { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + PostTestHelpersTestClocksTestClockAdvance: { 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 + path: { + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40373,17 +51813,30 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + frozen_time: number + } } } } - /**

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

*/ - PostSubscriptionItems: { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdFail: { + parameters: { + path: { + id: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40396,88 +51849,75 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - price?: string /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + * failure_details_params + * @description Details about a failed InboundTransfer. */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } + failure_details?: { /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

Retrieves the subscription item with the given ID.

*/ - GetSubscriptionItemsItem: { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + PostTestHelpersTreasuryInboundTransfersIdReturn: { 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']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdSucceed: { + parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40489,22 +51929,25 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

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

*/ - PostSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdFail: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40517,84 +51960,24 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

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

*/ - DeleteSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdPost: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40607,63 +51990,72 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] /** - * Format: unix-time - * @description 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. + * returned_details_params + * @description Optional hash to set the the return code. */ - proration_date?: number + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } } } } } - /** - *

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

- * - *

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

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { 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 + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40675,30 +52067,25 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { parameters: { path: { - subscription_item: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['usage_record'] + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40711,91 +52098,24 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: 'now' | number } } } } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { parameters: { - query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that have not started yet. */ - scheduled?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40807,17 +52127,38 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + } } } } - /**

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

*/ - PostSubscriptionSchedules: { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedCredits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -40830,152 +52171,46 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * source_params + * @description Initiating payment method details for the object. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' + initiating_payment_method_details?: { /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string } - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' } /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @description The rails used for the object. * @enum {string} */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - /** Format: unix-time */ - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - trial?: boolean - /** Format: unix-time */ - trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: number | 'now' + network: 'ach' | 'us_domestic_wire' } } } } - /**

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

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedDebits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -40987,22 +52222,50 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string + } + } + /** + * @description The rails used for the object. + * @enum {string} + */ + network: 'ach' + } } } } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - } + /** + *

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']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41016,179 +52279,348 @@ export type operations = { content: { 'application/x-www-form-urlencoded': { /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * connect_js_account_token_specs + * @description Information for the account this token will represent. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } + account?: { /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + ownership_declaration_shown_and_signed?: boolean + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string } - | '' + } + } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + routing_number?: string + } + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + currency?: string + cvc?: string + exp_month: string + exp_year: string + name?: string + number: string + } + | string + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + cvc_update?: { + cvc: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string } - transfer_data?: + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: | { - amount_percent?: number - destination: string + day: number + month: number + year: number } | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - end_date?: number | 'now' - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + nationality?: string + phone?: string + political_exposure?: string + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: number | 'now' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string } - trial?: boolean - trial_end?: number | 'now' - }[] + } /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} + * pii_token_specs + * @description The PII this token will represent. */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + pii?: { + id_number?: string + } } } } } - /**

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

Retrieves the token with the given ID.

*/ + GetTokensToken: { parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } - } - } - /**

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 + token: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41200,30 +52632,16 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

*/ - GetSubscriptions: { + /**

Returns a list of top-ups.

*/ + GetTopups: { parameters: { query: { - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - current_period_end?: + /** A positive integer representing how much to transfer. */ + amount?: | { gt?: number gte?: number @@ -41231,300 +52649,43 @@ export type operations = { lte?: number } | number - current_period_start?: + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: | { gt?: number gte?: number lt?: number - lte?: number - } - | number - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter for subscriptions that contain this recurring price ID. */ - price?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

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

*/ - PostSubscriptions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - subscription_exposed_id: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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': components['schemas']['subscription'] + 'application/json': { + data: components['schemas']['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -41540,18 +52701,13 @@ export type operations = { } } } - /**

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

Top up the balance of an account

*/ + PostTopups: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41564,234 +52720,69 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | { - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string } } } } - /** - *

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

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: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

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

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41804,28 +52795,28 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { + /**

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

*/ + PostTopupsTopupCancel: { parameters: { path: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41837,14 +52828,27 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - GetTaxCodes: { + /**

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

*/ + GetTransfers: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transfers for the destination specified by this account ID. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -41853,6 +52857,8 @@ export type 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 + /** Only return transfers with the specified transfer group. */ + transfer_group?: string } } responses: { @@ -41860,7 +52866,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['tax_code'][] + /** @description Details about each object. */ + data: components['schemas']['transfer'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41886,22 +52893,13 @@ export type operations = { } } } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

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

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']['tax_code'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -41913,43 +52911,56 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } } } } - /**

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

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: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - active?: boolean - /** Optional range for filtering created date. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ - inclusive?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } + path: { + id: string + } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['tax_rate'][] + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41975,13 +52986,24 @@ export type operations = { } } } - /**

Creates a new tax rate.

*/ - PostTaxRates: { + /** + *

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']['tax_rate'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -41994,51 +53016,36 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + metadata?: { [key: string]: string } | '' + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean } } } } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { + /**

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42054,18 +53061,22 @@ export type operations = { } } } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { + /** + *

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42078,38 +53089,65 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } - } - /**

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

*/ - PostTerminalConnectionTokens: { + } + /**

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

*/ + GetTransfersTransferReversalsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.connection_token'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42124,24 +53162,30 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { + /**

Returns a list of CreditReversals.

*/ + GetTreasuryCreditReversals: { 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** 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 CreditReversals for the ReceivedCredit ID. */ + received_credit?: 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 CreditReversals for a given status. */ + status?: 'canceled' | 'posted' | 'processing' } } responses: { @@ -42149,7 +53193,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['terminal.location'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.credit_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42175,16 +53220,13 @@ export type operations = { } } } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - PostTerminalLocations: { + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + PostTreasuryCreditReversals: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42197,44 +53239,32 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedCredit to reverse. */ + received_credit: string } } } } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + GetTreasuryCreditReversalsCreditReversal: { parameters: { + path: { + credit_reversal: string + } 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'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42250,18 +53280,67 @@ export type operations = { } } } - /**

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

*/ - PostTerminalLocationsLocation: { + /**

Returns a list of DebitReversals.

*/ + GetTreasuryDebitReversals: { parameters: { - path: { - location: 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 DebitReversals for the ReceivedDebit ID. */ + received_debit?: string + /** Only return DebitReversals for a given resolution. */ + resolution?: 'lost' | 'won' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 DebitReversals for a given status. */ + status?: 'canceled' | 'completed' | 'processing' } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.debit_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + PostTreasuryDebitReversals: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42274,40 +53353,32 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedDebit to reverse. */ + received_debit: string } } } } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { + /**

Retrieves a DebitReversal object.

*/ + GetTreasuryDebitReversalsDebitReversal: { parameters: { path: { - location: string + debit_reversal: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.location'] + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42323,24 +53394,26 @@ export type operations = { } } } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { + /**

Returns a list of FinancialAccounts.

*/ + GetTreasuryFinancialAccounts: { parameters: { query: { - /** Filters readers by device type */ - device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** An object ID cursor for use in pagination. */ ending_before?: string /** Specifies which fields 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. */ + /** A limit ranging from 1 to 100 (defaults to 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. */ + /** An object ID cursor for use in pagination. */ starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: 'offline' | 'online' } } responses: { @@ -42348,8 +53421,7 @@ export type operations = { 200: { content: { 'application/json': { - /** @description A list of readers */ - data: components['schemas']['terminal.reader'][] + data: components['schemas']['treasury.financial_account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42375,13 +53447,13 @@ export type operations = { } } } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + PostTreasuryFinancialAccounts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42396,34 +53468,94 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. */ - location?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: string[] } } } } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { + /**

Retrieves the details of a FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccount: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42439,18 +53571,18 @@ export type operations = { } } } - /**

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

*/ - PostTerminalReadersReader: { + /**

Updates the details of a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccount: { parameters: { path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42465,26 +53597,92 @@ export type operations = { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The new label of the reader. */ - label?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } } } } } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccountFeatures: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42500,16 +53698,18 @@ export type operations = { } } } - /** - *

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

Updates the Features associated with a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccountFeatures: { + parameters: { + path: { + financial_account: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42523,328 +53723,185 @@ export type operations = { content: { 'application/x-www-form-urlencoded': { /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - ownership_declaration_shown_and_signed?: boolean - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - routing_number?: string + card_issuing?: { + requested: boolean } - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - currency?: string - cvc?: string - exp_month: string - exp_year: string - name?: string - number: string - } - | string - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string /** - * cvc_params - * @description The updated CVC value this token will represent. + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. */ - cvc_update?: { - cvc: string + deposit_insurance?: { + requested: boolean } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * person_token_specs - * @description Information for the person this token will represent. + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string + financial_addresses?: { + /** access */ + aba?: { + requested: boolean } - dob?: - | { - day: number - month: number - year: number - } - | '' - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - nationality?: string - phone?: string - political_exposure?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string + } + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } + } + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + intra_stripe_flows?: { + requested: boolean + } + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean } } /** - * pii_token_specs - * @description The PII this token will represent. + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. */ - pii?: { - id_number?: string + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } } } } } } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryInboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status?: 'canceled' | 'failed' | 'processing' | 'succeeded' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.inbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an InboundTransfer.

*/ + PostTreasuryInboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing InboundTransfer.

*/ + GetTreasuryInboundTransfersId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - token: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -42860,38 +53917,54 @@ export type operations = { } } } - /**

Returns a list of top-ups.

*/ - GetTopups: { + /**

Cancels an InboundTransfer.

*/ + PostTreasuryInboundTransfersInboundTransferCancel: { + parameters: { + path: { + inbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundPayments: { parameters: { query: { - /** A positive integer representing how much to transfer. */ - amount?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** Only return OutboundPayments sent to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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' + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' } } responses: { @@ -42899,7 +53972,8 @@ export type operations = { 200: { content: { 'application/json': { - data: components['schemas']['topup'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_payment'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42925,13 +53999,13 @@ export type operations = { } } } - /**

Top up the balance of an account

*/ - PostTopups: { + /**

Creates an OutboundPayment.

*/ + PostTreasuryOutboundPayments: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42944,42 +54018,100 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + destination_payment_method?: string + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + destination_payment_method_data?: { + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + financial_account?: string + metadata?: { [key: string]: string } + /** @enum {string} */ + type: 'financial_account' | 'us_bank_account' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + } + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } + /** + * end_user_details_params + * @description End user details. + */ + end_user_details?: { + ip_address?: string + present: boolean + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + metadata?: { [key: string]: string } + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string } } } } - /**

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

*/ - GetTopupsTopup: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + GetTreasuryOutboundPaymentsId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42995,18 +54127,93 @@ export type operations = { } } } - /**

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

*/ - PostTopupsTopup: { + /**

Cancel an OutboundPayment.

*/ + PostTreasuryOutboundPaymentsIdCancel: { parameters: { path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an OutboundTransfer.

*/ + PostTreasuryOutboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43019,28 +54226,81 @@ export type operations = { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: string } } } } - /**

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

*/ - PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + GetTreasuryOutboundTransfersOutboundTransfer: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - topup: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + PostTreasuryOutboundTransfersOutboundTransferCancel: { + parameters: { + path: { + outbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43059,30 +54319,27 @@ export type operations = { } } } - /**

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

Returns a list of ReceivedCredits.

*/ + GetTreasuryReceivedCredits: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transfers for the destination specified by this account ID. */ - destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** The FinancialAccount that received the funds. */ + financial_account: string /** 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 ReceivedCredits described by the flow. */ + linked_flows?: { + /** @enum {string} */ + source_flow_type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43091,7 +54348,7 @@ export type operations = { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer'][] + data: components['schemas']['treasury.received_credit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43117,13 +54374,22 @@ export type operations = { } } } - /**

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

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + GetTreasuryReceivedCreditsId: { + 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']['transfer'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -43135,47 +54401,26 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Returns a list of ReceivedDebits.

*/ + GetTreasuryReceivedDebits: { 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[] + /** The FinancialAccount that funds were pulled from. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43184,7 +54429,7 @@ export type operations = { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] + data: components['schemas']['treasury.received_debit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43210,15 +54455,13 @@ export type operations = { } } } - /** - *

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

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + GetTreasuryReceivedDebitsId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { id: string } @@ -43227,7 +54470,7 @@ export type operations = { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -43239,37 +54482,63 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Retrieves a list of TransactionEntry objects.

*/ + GetTreasuryTransactionEntries: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + effective_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by?: 'created' | 'effective_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 TransactionEntries associated with this Transaction. */ + transaction?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43285,22 +54554,22 @@ export type operations = { } } } - /** - *

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

Retrieves a TransactionEntry object.

*/ + GetTreasuryTransactionEntriesId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - transfer: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': components['schemas']['treasury.transaction_entry'] } } /** Error response. */ @@ -43312,34 +54581,66 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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

Retrieves a list of Transaction objects.

*/ + GetTreasuryTransactions: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - id: string - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by?: 'created' | 'posted_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status?: 'open' | 'posted' | 'void' + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions?: { + posted_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + } } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43355,23 +54656,22 @@ export type operations = { } } } - /** - *

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

Retrieves the details of an existing Transaction.

*/ + GetTreasuryTransactionsId: { 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'] + 'application/json': components['schemas']['treasury.transaction'] } } /** Error response. */ @@ -43383,12 +54683,7 @@ export type operations = { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } @@ -43557,6 +54852,7 @@ export type operations = { | '2019-12-03' | '2020-03-02' | '2020-08-27' + | '2022-08-01' /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: boolean /** @description An optional description of what the webhook is used for. */ @@ -43576,7 +54872,9 @@ export type operations = { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43619,7 +54917,13 @@ export type operations = { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43658,13 +54962,10 @@ export type operations = { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43733,16 +55034,49 @@ export type operations = { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -43828,7 +55162,9 @@ export type operations = { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43871,7 +55207,13 @@ export type operations = { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43910,13 +55252,10 @@ export type operations = { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43985,16 +55324,49 @@ export type operations = { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] diff --git a/test/v3/expected/stripe.immutable.ts b/test/v3/expected/stripe.immutable.ts index 029e20e81..122d06654 100644 --- a/test/v3/expected/stripe.immutable.ts +++ b/test/v3/expected/stripe.immutable.ts @@ -4,14 +4,6 @@ */ export interface paths { - readonly '/v1/3d_secure': { - /**

Initiate 3D Secure authentication.

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

Retrieves a 3D Secure object.

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

Retrieves the details of an account.

*/ readonly get: operations['GetAccount'] @@ -278,6 +270,20 @@ export interface paths { */ readonly post: operations['PostApplicationFeesIdRefunds'] } + readonly '/v1/apps/secrets': { + /**

List all secrets stored on the given scope.

*/ + readonly get: operations['GetAppsSecrets'] + /**

Create or replace a secret in the secret store.

*/ + readonly post: operations['PostAppsSecrets'] + } + readonly '/v1/apps/secrets/delete': { + /**

Deletes a secret from the secret store by name and scope.

*/ + readonly post: operations['PostAppsSecretsDelete'] + } + readonly '/v1/apps/secrets/find': { + /**

Finds a secret in the secret store by name and scope.

*/ + readonly get: operations['GetAppsSecretsFind'] + } readonly '/v1/balance': { /** *

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export interface paths { /**

Creates a session of the customer portal.

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

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

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

Retrieves the Bitcoin receiver with the given ID.

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

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

*/ - readonly get: operations['GetBitcoinTransactions'] - } readonly '/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.

*/ readonly 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).

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

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetChargesSearch'] + } readonly '/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.

*/ readonly get: operations['GetChargesCharge'] @@ -502,6 +501,15 @@ export interface paths { /**

Creates a new customer object.

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

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetCustomersSearch'] + } readonly '/v1/customers/{customer}': { /**

Retrieves a Customer object.

*/ readonly get: operations['GetCustomersCustomer'] @@ -574,15 +582,41 @@ export interface paths { /**

Delete a specified source for a given customer.

*/ readonly delete: operations['DeleteCustomersCustomerCardsId'] } + readonly '/v1/customers/{customer}/cash_balance': { + /**

Retrieves a customer’s cash balance.

*/ + readonly get: operations['GetCustomersCustomerCashBalance'] + /**

Changes the settings on a customer’s cash balance.

*/ + readonly post: operations['PostCustomersCustomerCashBalance'] + } + readonly '/v1/customers/{customer}/cash_balance_transactions': { + /**

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

*/ + readonly get: operations['GetCustomersCustomerCashBalanceTransactions'] + } + readonly '/v1/customers/{customer}/cash_balance_transactions/{transaction}': { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

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

Removes the currently applied discount on a customer.

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

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + readonly post: operations['PostCustomersCustomerFundingInstructions'] + } readonly '/v1/customers/{customer}/payment_methods': { /**

Returns a list of PaymentMethods for a given Customer

*/ readonly get: operations['GetCustomersCustomerPaymentMethods'] } + readonly '/v1/customers/{customer}/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + readonly get: operations['GetCustomersCustomerPaymentMethodsPaymentMethod'] + } readonly '/v1/customers/{customer}/sources': { /**

List sources for a specified customer.

*/ readonly get: operations['GetCustomersCustomerSources'] @@ -716,6 +750,34 @@ export interface paths { /**

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.

*/ readonly get: operations['GetFilesFile'] } + readonly '/v1/financial_connections/accounts': { + /**

Returns a list of Financial Connections Account objects.

*/ + readonly get: operations['GetFinancialConnectionsAccounts'] + } + readonly '/v1/financial_connections/accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + readonly get: operations['GetFinancialConnectionsAccountsAccount'] + } + readonly '/v1/financial_connections/accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + readonly post: operations['PostFinancialConnectionsAccountsAccountDisconnect'] + } + readonly '/v1/financial_connections/accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + readonly get: operations['GetFinancialConnectionsAccountsAccountOwners'] + } + readonly '/v1/financial_connections/accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + readonly post: operations['PostFinancialConnectionsAccountsAccountRefresh'] + } + readonly '/v1/financial_connections/sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + readonly post: operations['PostFinancialConnectionsSessions'] + } + readonly '/v1/financial_connections/sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + readonly get: operations['GetFinancialConnectionsSessionsSession'] + } readonly '/v1/identity/verification_reports': { /**

List all verification reports.

*/ readonly get: operations['GetIdentityVerificationReports'] @@ -803,9 +865,18 @@ export interface paths { readonly '/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.

*/ readonly get: operations['GetInvoices'] - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

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

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetInvoicesSearch'] + } readonly '/v1/invoices/upcoming': { /** *

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

@@ -863,18 +934,6 @@ export interface paths { /**

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.

*/ readonly post: operations['PostInvoicesInvoiceVoid'] } - readonly '/v1/issuer_fraud_records': { - /**

Returns a list of issuer fraud records.

*/ - readonly get: operations['GetIssuerFraudRecords'] - } - readonly '/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.

- */ - readonly get: operations['GetIssuerFraudRecordsIssuerFraudRecord'] - } readonly '/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.

*/ readonly get: operations['GetIssuingAuthorizations'] @@ -953,22 +1012,42 @@ export interface paths { /**

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

*/ readonly post: operations['PostIssuingTransactionsTransaction'] } + readonly '/v1/link_account_sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + readonly post: operations['PostLinkAccountSessions'] + } + readonly '/v1/link_account_sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + readonly get: operations['GetLinkAccountSessionsSession'] + } + readonly '/v1/linked_accounts': { + /**

Returns a list of Financial Connections Account objects.

*/ + readonly get: operations['GetLinkedAccounts'] + } + readonly '/v1/linked_accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + readonly get: operations['GetLinkedAccountsAccount'] + } + readonly '/v1/linked_accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + readonly post: operations['PostLinkedAccountsAccountDisconnect'] + } + readonly '/v1/linked_accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + readonly get: operations['GetLinkedAccountsAccountOwners'] + } + readonly '/v1/linked_accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

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

Retrieves a Mandate object.

*/ readonly get: operations['GetMandatesMandate'] } - readonly '/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.

*/ - readonly get: operations['GetOrderReturns'] - } - readonly '/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.

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

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

*/ readonly get: operations['GetOrders'] - /**

Creates a new order object.

*/ + /**

Creates a new open order object.

*/ readonly post: operations['PostOrders'] } readonly '/v1/orders/{id}': { @@ -977,13 +1056,21 @@ export interface paths { /**

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

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

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

*/ - readonly post: operations['PostOrdersIdPay'] + readonly '/v1/orders/{id}/cancel': { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + readonly post: operations['PostOrdersIdCancel'] + } + readonly '/v1/orders/{id}/line_items': { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + readonly get: operations['GetOrdersIdLineItems'] + } + readonly '/v1/orders/{id}/reopen': { + /**

Reopens a submitted order.

*/ + readonly post: operations['PostOrdersIdReopen'] } - readonly '/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.

*/ - readonly post: operations['PostOrdersIdReturns'] + readonly '/v1/orders/{id}/submit': { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

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

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export interface paths { */ readonly post: operations['PostPaymentIntents'] } + readonly '/v1/payment_intents/search': { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetPaymentIntentsSearch'] + } readonly '/v1/payment_intents/{intent}': { /** *

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

@@ -1022,11 +1118,17 @@ export interface paths { */ readonly post: operations['PostPaymentIntentsIntent'] } + readonly '/v1/payment_intents/{intent}/apply_customer_balance': { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

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

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

* - *

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

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ readonly post: operations['PostPaymentIntentsIntentCancel'] } @@ -1070,6 +1172,35 @@ export interface paths { */ readonly post: operations['PostPaymentIntentsIntentConfirm'] } + readonly '/v1/payment_intents/{intent}/increment_authorization': { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + readonly post: operations['PostPaymentIntentsIntentIncrementAuthorization'] + } readonly '/v1/payment_intents/{intent}/verify_microdeposits': { /**

Verifies microdeposits on a PaymentIntent object.

*/ readonly post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] @@ -1091,7 +1222,7 @@ export interface paths { readonly get: operations['GetPaymentLinksPaymentLinkLineItems'] } readonly '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

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

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

@@ -1101,7 +1232,7 @@ export interface paths { readonly post: operations['PostPaymentMethods'] } readonly '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

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

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

*/ readonly post: operations['PostPaymentMethodsPaymentMethod'] @@ -1112,9 +1243,11 @@ export interface paths { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export interface paths { readonly post: operations['PostPaymentMethodsPaymentMethodAttach'] } readonly '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ readonly post: operations['PostPaymentMethodsPaymentMethodDetach'] } readonly '/v1/payouts': { @@ -1176,6 +1309,15 @@ export interface paths { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ readonly post: operations['PostPrices'] } + readonly '/v1/prices/search': { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetPricesSearch'] + } readonly '/v1/prices/{price}': { /**

Retrieves the price with the given ID.

*/ readonly get: operations['GetPricesPrice'] @@ -1188,6 +1330,15 @@ export interface paths { /**

Creates a new product object.

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

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetProductsSearch'] + } readonly '/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.

*/ readonly get: operations['GetProductsId'] @@ -1282,29 +1433,6 @@ export interface paths { /**

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.

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

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

*/ - readonly 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.

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

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

*/ - readonly 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.

- */ - readonly post: operations['PostRecipientsId'] - /**

Permanently deletes a recipient. It cannot be undone.

*/ - readonly delete: operations['DeleteRecipientsId'] - } readonly '/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.

*/ readonly get: operations['GetRefunds'] @@ -1321,6 +1449,14 @@ export interface paths { */ readonly post: operations['PostRefundsRefund'] } + readonly '/v1/refunds/{refund}/cancel': { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

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

Returns a list of Report Runs, with the most recent appearing first.

*/ readonly get: operations['GetReportingReportRuns'] @@ -1533,9 +1669,26 @@ export interface paths { readonly '/v1/subscriptions': { /**

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

*/ readonly get: operations['GetSubscriptions'] - /**

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

*/ + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

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

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly get: operations['GetSubscriptionsSearch'] + } readonly '/v1/subscriptions/{subscription_exposed_id}': { /**

Retrieves the subscription with the given ID.

*/ readonly get: operations['GetSubscriptionsSubscriptionExposedId'] @@ -1555,7 +1708,7 @@ export interface paths { readonly delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] } readonly '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ readonly get: operations['GetTaxCodes'] } readonly '/v1/tax_codes/{id}': { @@ -1574,6 +1727,20 @@ export interface paths { /**

Updates an existing tax rate.

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

Returns a list of Configuration objects.

*/ + readonly get: operations['GetTerminalConfigurations'] + /**

Creates a new Configuration object.

*/ + readonly post: operations['PostTerminalConfigurations'] + } + readonly '/v1/terminal/configurations/{configuration}': { + /**

Retrieves a Configuration object.

*/ + readonly get: operations['GetTerminalConfigurationsConfiguration'] + /**

Updates a new Configuration object.

*/ + readonly post: operations['PostTerminalConfigurationsConfiguration'] + /**

Deletes a Configuration object.

*/ + readonly delete: operations['DeleteTerminalConfigurationsConfiguration'] + } readonly '/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.

*/ readonly post: operations['PostTerminalConnectionTokens'] @@ -1609,6 +1776,110 @@ export interface paths { /**

Deletes a Reader object.

*/ readonly delete: operations['DeleteTerminalReadersReader'] } + readonly '/v1/terminal/readers/{reader}/cancel_action': { + /**

Cancels the current reader action.

*/ + readonly post: operations['PostTerminalReadersReaderCancelAction'] + } + readonly '/v1/terminal/readers/{reader}/process_payment_intent': { + /**

Initiates a payment flow on a Reader.

*/ + readonly post: operations['PostTerminalReadersReaderProcessPaymentIntent'] + } + readonly '/v1/terminal/readers/{reader}/process_setup_intent': { + /**

Initiates a setup intent flow on a Reader.

*/ + readonly post: operations['PostTerminalReadersReaderProcessSetupIntent'] + } + readonly '/v1/terminal/readers/{reader}/set_reader_display': { + /**

Sets reader display to show cart details.

*/ + readonly post: operations['PostTerminalReadersReaderSetReaderDisplay'] + } + readonly '/v1/test_helpers/customers/{customer}/fund_cash_balance': { + /**

Create an incoming testmode bank transfer

*/ + readonly post: operations['PostTestHelpersCustomersCustomerFundCashBalance'] + } + readonly '/v1/test_helpers/issuing/cards/{card}/shipping/deliver': { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + readonly post: operations['PostTestHelpersIssuingCardsCardShippingDeliver'] + } + readonly '/v1/test_helpers/issuing/cards/{card}/shipping/fail': { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + readonly post: operations['PostTestHelpersIssuingCardsCardShippingFail'] + } + readonly '/v1/test_helpers/issuing/cards/{card}/shipping/return': { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + readonly post: operations['PostTestHelpersIssuingCardsCardShippingReturn'] + } + readonly '/v1/test_helpers/issuing/cards/{card}/shipping/ship': { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + readonly post: operations['PostTestHelpersIssuingCardsCardShippingShip'] + } + readonly '/v1/test_helpers/refunds/{refund}/expire': { + /**

Expire a refund with a status of requires_action.

*/ + readonly post: operations['PostTestHelpersRefundsRefundExpire'] + } + readonly '/v1/test_helpers/terminal/readers/{reader}/present_payment_method': { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + readonly post: operations['PostTestHelpersTerminalReadersReaderPresentPaymentMethod'] + } + readonly '/v1/test_helpers/test_clocks': { + /**

Returns a list of your test clocks.

*/ + readonly get: operations['GetTestHelpersTestClocks'] + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + readonly post: operations['PostTestHelpersTestClocks'] + } + readonly '/v1/test_helpers/test_clocks/{test_clock}': { + /**

Retrieves a test clock.

*/ + readonly get: operations['GetTestHelpersTestClocksTestClock'] + /**

Deletes a test clock.

*/ + readonly delete: operations['DeleteTestHelpersTestClocksTestClock'] + } + readonly '/v1/test_helpers/test_clocks/{test_clock}/advance': { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + readonly post: operations['PostTestHelpersTestClocksTestClockAdvance'] + } + readonly '/v1/test_helpers/treasury/inbound_transfers/{id}/fail': { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryInboundTransfersIdFail'] + } + readonly '/v1/test_helpers/treasury/inbound_transfers/{id}/return': { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + readonly post: operations['PostTestHelpersTreasuryInboundTransfersIdReturn'] + } + readonly '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed': { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryInboundTransfersIdSucceed'] + } + readonly '/v1/test_helpers/treasury/outbound_payments/{id}/fail': { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundPaymentsIdFail'] + } + readonly '/v1/test_helpers/treasury/outbound_payments/{id}/post': { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundPaymentsIdPost'] + } + readonly '/v1/test_helpers/treasury/outbound_payments/{id}/return': { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundPaymentsIdReturn'] + } + readonly '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail': { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail'] + } + readonly '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post': { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost'] + } + readonly '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return': { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + readonly post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn'] + } + readonly '/v1/test_helpers/treasury/received_credits': { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + readonly post: operations['PostTestHelpersTreasuryReceivedCredits'] + } + readonly '/v1/test_helpers/treasury/received_debits': { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + readonly post: operations['PostTestHelpersTreasuryReceivedDebits'] + } readonly '/v1/tokens': { /** *

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export interface paths { */ readonly post: operations['PostTransfersTransferReversalsId'] } + readonly '/v1/treasury/credit_reversals': { + /**

Returns a list of CreditReversals.

*/ + readonly get: operations['GetTreasuryCreditReversals'] + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + readonly post: operations['PostTreasuryCreditReversals'] + } + readonly '/v1/treasury/credit_reversals/{credit_reversal}': { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + readonly get: operations['GetTreasuryCreditReversalsCreditReversal'] + } + readonly '/v1/treasury/debit_reversals': { + /**

Returns a list of DebitReversals.

*/ + readonly get: operations['GetTreasuryDebitReversals'] + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + readonly post: operations['PostTreasuryDebitReversals'] + } + readonly '/v1/treasury/debit_reversals/{debit_reversal}': { + /**

Retrieves a DebitReversal object.

*/ + readonly get: operations['GetTreasuryDebitReversalsDebitReversal'] + } + readonly '/v1/treasury/financial_accounts': { + /**

Returns a list of FinancialAccounts.

*/ + readonly get: operations['GetTreasuryFinancialAccounts'] + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + readonly post: operations['PostTreasuryFinancialAccounts'] + } + readonly '/v1/treasury/financial_accounts/{financial_account}': { + /**

Retrieves the details of a FinancialAccount.

*/ + readonly get: operations['GetTreasuryFinancialAccountsFinancialAccount'] + /**

Updates the details of a FinancialAccount.

*/ + readonly post: operations['PostTreasuryFinancialAccountsFinancialAccount'] + } + readonly '/v1/treasury/financial_accounts/{financial_account}/features': { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + readonly get: operations['GetTreasuryFinancialAccountsFinancialAccountFeatures'] + /**

Updates the Features associated with a FinancialAccount.

*/ + readonly post: operations['PostTreasuryFinancialAccountsFinancialAccountFeatures'] + } + readonly '/v1/treasury/inbound_transfers': { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + readonly get: operations['GetTreasuryInboundTransfers'] + /**

Creates an InboundTransfer.

*/ + readonly post: operations['PostTreasuryInboundTransfers'] + } + readonly '/v1/treasury/inbound_transfers/{id}': { + /**

Retrieves the details of an existing InboundTransfer.

*/ + readonly get: operations['GetTreasuryInboundTransfersId'] + } + readonly '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel': { + /**

Cancels an InboundTransfer.

*/ + readonly post: operations['PostTreasuryInboundTransfersInboundTransferCancel'] + } + readonly '/v1/treasury/outbound_payments': { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + readonly get: operations['GetTreasuryOutboundPayments'] + /**

Creates an OutboundPayment.

*/ + readonly post: operations['PostTreasuryOutboundPayments'] + } + readonly '/v1/treasury/outbound_payments/{id}': { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + readonly get: operations['GetTreasuryOutboundPaymentsId'] + } + readonly '/v1/treasury/outbound_payments/{id}/cancel': { + /**

Cancel an OutboundPayment.

*/ + readonly post: operations['PostTreasuryOutboundPaymentsIdCancel'] + } + readonly '/v1/treasury/outbound_transfers': { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + readonly get: operations['GetTreasuryOutboundTransfers'] + /**

Creates an OutboundTransfer.

*/ + readonly post: operations['PostTreasuryOutboundTransfers'] + } + readonly '/v1/treasury/outbound_transfers/{outbound_transfer}': { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + readonly get: operations['GetTreasuryOutboundTransfersOutboundTransfer'] + } + readonly '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel': { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + readonly post: operations['PostTreasuryOutboundTransfersOutboundTransferCancel'] + } + readonly '/v1/treasury/received_credits': { + /**

Returns a list of ReceivedCredits.

*/ + readonly get: operations['GetTreasuryReceivedCredits'] + } + readonly '/v1/treasury/received_credits/{id}': { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + readonly get: operations['GetTreasuryReceivedCreditsId'] + } + readonly '/v1/treasury/received_debits': { + /**

Returns a list of ReceivedDebits.

*/ + readonly get: operations['GetTreasuryReceivedDebits'] + } + readonly '/v1/treasury/received_debits/{id}': { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + readonly get: operations['GetTreasuryReceivedDebitsId'] + } + readonly '/v1/treasury/transaction_entries': { + /**

Retrieves a list of TransactionEntry objects.

*/ + readonly get: operations['GetTreasuryTransactionEntries'] + } + readonly '/v1/treasury/transaction_entries/{id}': { + /**

Retrieves a TransactionEntry object.

*/ + readonly get: operations['GetTreasuryTransactionEntriesId'] + } + readonly '/v1/treasury/transactions': { + /**

Retrieves a list of Transaction objects.

*/ + readonly get: operations['GetTreasuryTransactions'] + } + readonly '/v1/treasury/transactions/{id}': { + /**

Retrieves the details of an existing Transaction.

*/ + readonly get: operations['GetTreasuryTransactionsId'] + } readonly '/v1/webhook_endpoints': { /**

Returns a list of your webhook endpoints.

*/ readonly get: operations['GetWebhookEndpoints'] @@ -1718,7 +2101,7 @@ export interface components { readonly country?: string /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ readonly created?: number /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1809,6 +2192,11 @@ export interface components { * @enum {string} */ readonly acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + readonly affirm_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1829,6 +2217,16 @@ export interface components { * @enum {string} */ readonly bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + readonly bank_transfer_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + readonly blik_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1884,11 +2282,21 @@ export interface components { * @enum {string} */ readonly klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + readonly konbini_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the legacy payments capability of the account. * @enum {string} */ readonly legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + readonly link_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1899,6 +2307,16 @@ export interface components { * @enum {string} */ readonly p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + readonly paynow_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + readonly promptpay_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1924,6 +2342,16 @@ export interface components { * @enum {string} */ readonly transfers?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + readonly treasury?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + readonly us_bank_account_ach_payments?: 'active' | 'inactive' | 'pending' } /** AccountCapabilityFutureRequirements */ readonly account_capability_future_requirements: { @@ -1986,6 +2414,10 @@ export interface components { readonly decline_on?: components['schemas']['account_decline_charge_on'] /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ readonly statement_descriptor_prefix?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + readonly statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + readonly statement_descriptor_prefix_kanji?: string | null } /** AccountDashboardSettings */ readonly account_dashboard_settings: { @@ -2057,6 +2489,10 @@ export interface components { readonly statement_descriptor_kana?: string | null /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ readonly statement_descriptor_kanji?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + readonly statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + readonly statement_descriptor_prefix_kanji?: string | null } /** AccountPayoutSettings */ readonly account_payout_settings: { @@ -2104,6 +2540,7 @@ export interface components { readonly code: | 'invalid_address_city_state_postal_code' | 'invalid_street_address' + | 'invalid_tos_acceptance' | 'invalid_value_other' | 'verification_document_address_mismatch' | 'verification_document_address_missing' @@ -2167,6 +2604,16 @@ export interface components { readonly payments: components['schemas']['account_payments_settings'] readonly payouts?: components['schemas']['account_payout_settings'] readonly sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + readonly treasury?: components['schemas']['account_treasury_settings'] + } + /** AccountTermsOfService */ + readonly account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + readonly date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + readonly ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + readonly user_agent?: string } /** AccountTOSAcceptance */ readonly account_tos_acceptance: { @@ -2182,6 +2629,10 @@ export interface components { /** @description The user agent of the browser from which the account representative accepted their service agreement */ readonly user_agent?: string | null } + /** AccountTreasurySettings */ + readonly account_treasury_settings: { + readonly tos_acceptance?: components['schemas']['account_terms_of_service'] + } /** AccountUnificationAccountController */ readonly account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2207,39 +2658,6 @@ export interface components { /** @description State, county, province, or region. */ readonly state?: string | null } - /** AlipayAccount */ - readonly alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - readonly created: number - /** @description The ID of the customer associated with this Alipay Account. */ - readonly customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - readonly fingerprint: string - /** @description Unique identifier for the object. */ - readonly id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - readonly metadata?: { readonly [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - readonly payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - readonly payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - readonly reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - readonly used: boolean - /** @description The username for the Alipay account. */ - readonly username: string - } /** APIErrors */ readonly api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2349,9 +2767,49 @@ export interface components { readonly url: string } } + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + readonly 'apps.secret': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description If true, indicates that this secret has been deleted */ + readonly deleted?: boolean + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + readonly expires_at?: number | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description A name for the secret that's unique within the scope. */ + readonly name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'apps.secret' + /** @description The plaintext secret value to be stored. */ + readonly payload?: string | null + readonly scope: components['schemas']['secret_service_resource_scope'] + } /** AutomaticTax */ readonly automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ readonly enabled: boolean /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2569,6 +3027,94 @@ export interface components { */ readonly status: string } + /** BankConnectionsResourceAccountholder */ + readonly bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + readonly account?: string | components['schemas']['account'] + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + readonly customer?: string | components['schemas']['customer'] + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + readonly type: 'account' | 'customer' + } + /** BankConnectionsResourceBalance */ + readonly bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + readonly as_of: number + readonly cash?: components['schemas']['bank_connections_resource_balance_api_resource_cash_balance'] + readonly credit?: components['schemas']['bank_connections_resource_balance_api_resource_credit_balance'] + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + readonly current: { readonly [key: string]: number } + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + readonly type: 'cash' | 'credit' + } + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + readonly bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + readonly available?: { readonly [key: string]: number } | null + } + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + readonly bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + readonly used?: { readonly [key: string]: number } | null + } + /** BankConnectionsResourceBalanceRefresh */ + readonly bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + readonly last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + readonly status: 'failed' | 'pending' | 'succeeded' + } + /** BankConnectionsResourceLinkAccountSessionFilters */ + readonly bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + readonly countries?: readonly string[] | null + } + /** BankConnectionsResourceOwnershipRefresh */ + readonly bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + readonly last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + readonly status: 'failed' | 'pending' | 'succeeded' + } /** billing_details */ readonly billing_details: { /** @description Billing address. */ @@ -2588,7 +3134,7 @@ export interface components { /** @description Whether the configuration is active and can be used to create portal sessions. */ readonly active: boolean /** @description ID of the Connect Application that created the configuration. */ - readonly application?: string | null + readonly application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null readonly business_profile: components['schemas']['portal_business_profile'] /** * Format: unix-time @@ -2604,6 +3150,7 @@ export interface components { readonly is_default: boolean /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean + readonly login_page: components['schemas']['portal_login_page'] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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 } | null /** @@ -2711,101 +3258,10 @@ export interface components { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ readonly on_behalf_of?: string | null /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - readonly return_url: string + readonly return_url?: string | null /** @description The short-lived URL of the session that gives customers access to the customer portal. */ readonly url: string } - /** BitcoinReceiver */ - readonly bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - readonly active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - readonly amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - readonly amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - readonly bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - readonly bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - readonly bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - readonly created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - readonly currency: string - /** @description The customer ID of the bitcoin receiver. */ - readonly customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - readonly email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - readonly filled: boolean - /** @description Unique identifier for the object. */ - readonly id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - readonly inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - readonly metadata?: { readonly [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - readonly payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - readonly refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - readonly transactions?: { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - readonly uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - readonly used_for_payment?: boolean | null - } - /** BitcoinTransaction */ - readonly bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - readonly amount: number - /** @description The amount of bitcoin contained in the transaction. */ - readonly bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - readonly created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - readonly currency: string - /** @description Unique identifier for the object. */ - readonly id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - readonly receiver: string - } /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2905,8 +3361,8 @@ export interface components { * @enum {string} */ readonly object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - readonly recipient?: (string | components['schemas']['recipient']) | null + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + readonly status?: string | null /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ readonly tokenization_method?: string | null } @@ -2927,6 +3383,24 @@ export interface components { } /** card_mandate_payment_method_details */ readonly card_mandate_payment_method_details: { readonly [key: string]: unknown } + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + readonly cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + readonly available?: { readonly [key: string]: number } | null + /** @description The ID of the customer whose cash balance this object represents. */ + readonly customer: string + /** @description 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 + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'cash_balance' + readonly settings: components['schemas']['customer_balance_customer_balance_settings'] + } /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2968,6 +3442,8 @@ export interface components { readonly description?: string | null /** @description Whether the charge has been disputed. */ readonly disputed: boolean + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + readonly failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ readonly failure_code?: string | null /** @description Message to user further explaining reason for charge failure if available. */ @@ -2989,8 +3465,6 @@ export interface components { readonly object: 'charge' /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ readonly on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the order this charge is for if one exists. */ - readonly order?: (string | components['schemas']['order']) | null /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ readonly outcome?: components['schemas']['charge_outcome'] | null /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ @@ -3001,6 +3475,7 @@ export interface components { readonly payment_method?: string | null /** @description Details about the payment method at the time of the transaction. */ readonly payment_method_details?: components['schemas']['payment_method_details'] | null + readonly radar_options?: components['schemas']['radar_radar_options'] /** @description This is the email address that the receipt for this charge was sent to. */ readonly receipt_email?: string | null /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3013,7 +3488,7 @@ export interface components { * RefundList * @description A list of refunds that have been applied to the charge. */ - readonly refunds: { + readonly refunds?: { /** @description Details about each object. */ readonly data: readonly components['schemas']['refund'][] /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3094,7 +3569,7 @@ export interface components { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ readonly 'checkout.session': { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ @@ -3123,6 +3598,11 @@ export interface components { readonly consent?: components['schemas']['payment_pages_checkout_session_consent'] | null /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ readonly consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency?: string | null /** @@ -3138,7 +3618,7 @@ export interface components { * @enum {string|null} */ readonly customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ readonly customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null /** * @description If provided, this value will be used when the Customer object is created. @@ -3242,6 +3722,11 @@ export interface components { readonly payment_intent?: (string | components['schemas']['payment_intent']) | null /** @description The ID of the Payment Link that created this Session. */ readonly payment_link?: (string | components['schemas']['payment_link']) | null + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + readonly payment_method_collection?: ('always' | 'if_required') | null /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ readonly payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null /** @@ -3260,14 +3745,14 @@ export interface components { readonly recovered_from?: string | null /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ readonly setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description Shipping information for this Checkout Session. */ - readonly shipping?: components['schemas']['shipping'] | null /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ readonly shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + readonly shipping_cost?: components['schemas']['payment_pages_checkout_session_shipping_cost'] | null + /** @description Shipping information for this Checkout Session. */ + readonly shipping_details?: components['schemas']['shipping'] | null /** @description The shipping rate options applied to this Session. */ readonly shipping_options: readonly components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - readonly shipping_rate?: (string | components['schemas']['shipping_rate']) | null /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3291,7 +3776,10 @@ export interface components { readonly tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] /** @description Tax and discount details for the computed total amount. */ readonly total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null - /** @description The URL to the Checkout Session. */ + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ readonly url?: string | null } /** CheckoutAcssDebitMandateOptions */ @@ -3321,27 +3809,359 @@ export interface components { */ readonly currency?: 'cad' | 'usd' readonly mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} */ readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** CheckoutAffirmPaymentMethodOptions */ + readonly checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + readonly checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutAlipayPaymentMethodOptions */ + readonly checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutAuBecsDebitPaymentMethodOptions */ + readonly checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutBacsDebitPaymentMethodOptions */ + readonly checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutBancontactPaymentMethodOptions */ + readonly checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** CheckoutBoletoPaymentMethodOptions */ readonly checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ readonly expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutCardInstallmentsOptions */ + readonly checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + readonly enabled?: boolean + } + /** CheckoutCardPaymentMethodOptions */ + readonly checkout_card_payment_method_options: { + readonly installments?: components['schemas']['checkout_card_installments_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + readonly statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + readonly statement_descriptor_suffix_kanji?: string + } + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + readonly checkout_customer_balance_bank_transfer_payment_method_options: { + readonly eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + readonly type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** CheckoutCustomerBalancePaymentMethodOptions */ + readonly checkout_customer_balance_payment_method_options: { + readonly bank_transfer?: components['schemas']['checkout_customer_balance_bank_transfer_payment_method_options'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + readonly funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutEpsPaymentMethodOptions */ + readonly checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutFpxPaymentMethodOptions */ + readonly checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutGiropayPaymentMethodOptions */ + readonly checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutGrabPayPaymentMethodOptions */ + readonly checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutIdealPaymentMethodOptions */ + readonly checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutKlarnaPaymentMethodOptions */ + readonly checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutKonbiniPaymentMethodOptions */ + readonly checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + readonly expires_after_days?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' } /** CheckoutOxxoPaymentMethodOptions */ readonly checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ readonly expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutP24PaymentMethodOptions */ + readonly checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutPaynowPaymentMethodOptions */ + readonly checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutPixPaymentMethodOptions */ + readonly checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + readonly expires_after_seconds?: number | null + } + /** CheckoutSepaDebitPaymentMethodOptions */ + readonly checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** CheckoutSessionPaymentMethodOptions */ readonly checkout_session_payment_method_options: { readonly acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + readonly affirm?: components['schemas']['checkout_affirm_payment_method_options'] + readonly afterpay_clearpay?: components['schemas']['checkout_afterpay_clearpay_payment_method_options'] + readonly alipay?: components['schemas']['checkout_alipay_payment_method_options'] + readonly au_becs_debit?: components['schemas']['checkout_au_becs_debit_payment_method_options'] + readonly bacs_debit?: components['schemas']['checkout_bacs_debit_payment_method_options'] + readonly bancontact?: components['schemas']['checkout_bancontact_payment_method_options'] readonly boleto?: components['schemas']['checkout_boleto_payment_method_options'] + readonly card?: components['schemas']['checkout_card_payment_method_options'] + readonly customer_balance?: components['schemas']['checkout_customer_balance_payment_method_options'] + readonly eps?: components['schemas']['checkout_eps_payment_method_options'] + readonly fpx?: components['schemas']['checkout_fpx_payment_method_options'] + readonly giropay?: components['schemas']['checkout_giropay_payment_method_options'] + readonly grabpay?: components['schemas']['checkout_grab_pay_payment_method_options'] + readonly ideal?: components['schemas']['checkout_ideal_payment_method_options'] + readonly klarna?: components['schemas']['checkout_klarna_payment_method_options'] + readonly konbini?: components['schemas']['checkout_konbini_payment_method_options'] readonly oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + readonly p24?: components['schemas']['checkout_p24_payment_method_options'] + readonly paynow?: components['schemas']['checkout_paynow_payment_method_options'] + readonly pix?: components['schemas']['checkout_pix_payment_method_options'] + readonly sepa_debit?: components['schemas']['checkout_sepa_debit_payment_method_options'] + readonly sofort?: components['schemas']['checkout_sofort_payment_method_options'] + readonly us_bank_account?: components['schemas']['checkout_us_bank_account_payment_method_options'] + } + /** CheckoutSofortPaymentMethodOptions */ + readonly checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** CheckoutUsBankAccountPaymentMethodOptions */ + readonly checkout_us_bank_account_payment_method_options: { + readonly financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' } /** ConnectCollectionTransfer */ readonly connect_collection_transfer: { @@ -3405,8 +4225,8 @@ export interface components { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ readonly coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3419,6 +4239,8 @@ export interface components { readonly created: number /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ readonly currency?: string | null + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { readonly [key: string]: components['schemas']['coupon_currency_option'] } /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3458,6 +4280,11 @@ export interface components { /** @description A list of product IDs this coupon applies to */ readonly products: readonly string[] } + /** CouponCurrencyOption */ + readonly coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + readonly amount_off: number + } /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3532,12 +4359,16 @@ export interface components { * @enum {string} */ readonly status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ readonly subtotal: number + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + readonly subtotal_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ readonly tax_amounts: readonly components['schemas']['credit_note_tax_amount'][] /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ readonly total: number + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + readonly total_excluding_tax?: number | null /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3553,6 +4384,8 @@ export interface components { readonly credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ readonly amount: number + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + readonly amount_excluding_tax?: number | null /** @description Description of the item being credited. */ readonly description?: string | null /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3588,6 +4421,11 @@ export interface components { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ readonly unit_amount_decimal?: string | null + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + readonly unit_amount_excluding_tax?: string | null } /** CreditNoteTaxAmount */ readonly credit_note_tax_amount: { @@ -3598,6 +4436,34 @@ export interface components { /** @description The tax rate that was applied to get this tax amount. */ readonly tax_rate: string | components['schemas']['tax_rate'] } + /** CurrencyOption */ + readonly currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + readonly custom_unit_amount?: components['schemas']['custom_unit_amount'] | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + readonly tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + readonly tiers?: readonly components['schemas']['price_tier'][] + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + readonly unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + readonly unit_amount_decimal?: string | null + } + /** CustomUnitAmount */ + readonly custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + readonly maximum?: number | null + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + readonly minimum?: number | null + /** @description The starting unit amount which can be updated by the customer. */ + readonly preset?: number | null + } /** * Customer * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -3609,6 +4475,8 @@ export interface components { readonly address?: components['schemas']['address'] | null /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ readonly balance?: number + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + readonly cash_balance?: components['schemas']['cash_balance'] | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3622,14 +4490,7 @@ 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?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) + | (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. @@ -3645,6 +4506,8 @@ export interface components { readonly email?: string | null /** @description Unique identifier for the object. */ readonly id: string + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + readonly invoice_credit_balance?: { readonly [key: string]: number } /** @description The prefix for the customer used to generate unique invoice numbers. */ readonly invoice_prefix?: string | null readonly invoice_settings?: components['schemas']['invoice_setting_customer_setting'] @@ -3673,13 +4536,7 @@ export interface components { */ readonly sources?: { /** @description Details about each object. */ - readonly data: readonly ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + readonly data: readonly (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -3730,6 +4587,8 @@ export interface components { /** @description The URL where this list can be accessed. */ readonly url: string } + /** @description ID of the test clock this customer belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** customer_acceptance */ readonly customer_acceptance: { @@ -3746,6 +4605,53 @@ export interface components { */ readonly type: 'offline' | 'online' } + /** CustomerBalanceCustomerBalanceSettings */ + readonly customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + readonly reconciliation_mode: 'automatic' | 'manual' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + readonly customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + readonly payment_intent: string | components['schemas']['payment_intent'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + readonly customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + readonly bank_transfer: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + readonly customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + readonly eu_bank_transfer?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer'] + /** @description The user-supplied reference field on the bank transfer. */ + readonly reference?: string | null + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + readonly customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + readonly bic?: string | null + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + readonly iban_last4?: string | null + /** @description The full name of the sender, as supplied by the sending bank. */ + readonly sender_name?: string | null + } + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + readonly customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + readonly refund: string | components['schemas']['refund'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + readonly customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + readonly payment_intent: string | components['schemas']['payment_intent'] + } /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3801,6 +4707,46 @@ export interface components { | 'unapplied_from_invoice' | 'unspent_receiver_credit' } + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + readonly customer_cash_balance_transaction: { + readonly applied_to_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description The customer whose available cash balance changed as a result of this transaction. */ + readonly customer: string | components['schemas']['customer'] + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + readonly ending_balance: number + readonly funded?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction'] + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + readonly net_amount: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'customer_cash_balance_transaction' + readonly refunded_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction'] + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + readonly type: 'applied_to_payment' | 'funded' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'unapplied_from_payment' + readonly unapplied_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction'] + } /** CustomerTax */ readonly customer_tax: { /** @@ -3840,8 +4786,8 @@ export interface components { */ readonly object: 'account' } - /** AlipayDeletedAccount */ - readonly deleted_alipay_account: { + /** DeletedApplePayDomain */ + readonly deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3853,10 +4799,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'alipay_account' + readonly object: 'apple_pay_domain' } - /** DeletedApplePayDomain */ - readonly deleted_apple_pay_domain: { + /** DeletedApplication */ + readonly deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3864,11 +4810,13 @@ export interface components { readonly deleted: true /** @description Unique identifier for the object. */ readonly id: string + /** @description The name of the application. */ + readonly name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'apple_pay_domain' + readonly object: 'application' } /** DeletedBankAccount */ readonly deleted_bank_account: { @@ -3887,21 +4835,6 @@ export interface components { */ readonly object: 'bank_account' } - /** BitcoinDeletedReceiver */ - readonly deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - readonly deleted: true - /** @description Unique identifier for the object. */ - readonly id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'bitcoin_receiver' - } /** DeletedCard */ readonly deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4015,11 +4948,7 @@ export interface components { readonly object: 'invoiceitem' } /** Polymorphic */ - readonly deleted_payment_source: - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] + readonly deleted_payment_source: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] /** DeletedPerson */ readonly deleted_person: { /** @@ -4110,8 +5039,8 @@ export interface components { */ readonly object: 'radar.value_list_item' } - /** DeletedTransferRecipient */ - readonly deleted_recipient: { + /** DeletedSku */ + readonly deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4123,10 +5052,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'recipient' + readonly object: 'sku' } - /** DeletedSku */ - readonly deleted_sku: { + /** DeletedSubscriptionItem */ + readonly deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4138,10 +5067,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'sku' + readonly object: 'subscription_item' } - /** DeletedSubscriptionItem */ - readonly deleted_subscription_item: { + /** deleted_tax_id */ + readonly deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4153,10 +5082,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'subscription_item' + readonly object: 'tax_id' } - /** deleted_tax_id */ - readonly deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + readonly 'deleted_terminal.configuration': { /** * @description Always true for a deleted object * @enum {boolean} @@ -4168,7 +5097,7 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'tax_id' + readonly object: 'terminal.configuration' } /** TerminalLocationDeletedLocation */ readonly 'deleted_terminal.location': { @@ -4200,6 +5129,21 @@ export interface components { */ readonly object: 'terminal.reader' } + /** DeletedTestClock */ + readonly 'deleted_test_helpers.test_clock': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + readonly deleted: true + /** @description Unique identifier for the object. */ + readonly id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'test_helpers.test_clock' + } /** NotificationWebhookEndpointDeleted */ readonly deleted_webhook_endpoint: { /** @@ -4215,22 +5159,10 @@ export interface components { */ readonly object: 'webhook_endpoint' } - /** DeliveryEstimate */ - readonly delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - readonly date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - readonly earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - readonly latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - readonly type: string - } /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4401,6 +5333,16 @@ export interface components { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ readonly submission_count: number } + /** EmailSent */ + readonly email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + readonly email_sent_at: number + /** @description The recipient's email address. */ + readonly email_sent_to: string + } /** EphemeralKey */ readonly ephemeral_key: { /** @@ -4626,6 +5568,7 @@ export interface components { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** @description The size in bytes of the file object. */ readonly size: number /** @description A user friendly title for the document. */ @@ -4670,6 +5613,175 @@ export interface components { /** @description The publicly accessible URL to download the file. */ readonly url?: string | null } + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + readonly 'financial_connections.account': { + /** @description The account holder that this account belongs to. */ + readonly account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** @description The most recent information about the account's balance. */ + readonly balance?: components['schemas']['bank_connections_resource_balance'] | null + /** @description The state of the most recent attempt to refresh the account balance. */ + readonly balance_refresh?: components['schemas']['bank_connections_resource_balance_refresh'] | null + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + readonly category: 'cash' | 'credit' | 'investment' | 'other' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + readonly display_name?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description The name of the institution that holds this account. */ + readonly institution_name: string + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + readonly last4?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'financial_connections.account' + /** @description The most recent information about the account's owners. */ + readonly ownership?: (string | components['schemas']['financial_connections.account_ownership']) | null + /** @description The state of the most recent attempt to refresh the account owners. */ + readonly ownership_refresh?: components['schemas']['bank_connections_resource_ownership_refresh'] | null + /** @description The list of permissions granted by this account. */ + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] | null + /** + * @description The status of the link to the account. + * @enum {string} + */ + readonly status: 'active' | 'disconnected' | 'inactive' + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + readonly subcategory: 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings' + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + readonly supported_payment_method_types: readonly ('link' | 'us_bank_account')[] + } + /** BankConnectionsResourceOwner */ + readonly 'financial_connections.account_owner': { + /** @description The email address of the owner. */ + readonly email?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description The full name of the owner. */ + readonly name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'financial_connections.account_owner' + /** @description The ownership object that this owner belongs to. */ + readonly ownership: string + /** @description The raw phone number of the owner. */ + readonly phone?: string | null + /** @description The raw physical address of the owner. */ + readonly raw_address?: string | null + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + readonly refreshed_at?: number | null + } + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + readonly 'financial_connections.account_ownership': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Unique identifier for the object. */ + readonly id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'financial_connections.account_ownership' + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + readonly owners: { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + readonly 'financial_connections.session': { + /** @description The account holder for whom accounts are collected in this session. */ + readonly account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + readonly accounts: { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + /** @description A value that will be passed to the client to launch the authentication flow. */ + readonly client_secret: string + readonly filters?: components['schemas']['bank_connections_resource_link_account_session_filters'] + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'financial_connections.session' + /** @description Permissions requested for accounts collected during this session. */ + readonly permissions: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + readonly return_url?: string + } /** FinancialReportingFinanceReportRunRunParameters */ readonly financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4695,6 +5807,118 @@ export interface components { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ readonly timezone?: string } + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + readonly funding_instructions: { + readonly bank_transfer: components['schemas']['funding_instructions_bank_transfer'] + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + readonly funding_type: 'bank_transfer' + /** @description 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 + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'funding_instructions' + } + /** FundingInstructionsBankTransfer */ + readonly funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + readonly country: string + /** @description A list of financial addresses that can be used to fund a particular balance */ + readonly financial_addresses: readonly components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** + * @description The bank_transfer type + * @enum {string} + */ + readonly type: 'eu_bank_transfer' | 'jp_bank_transfer' + } + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + readonly funding_instructions_bank_transfer_financial_address: { + readonly iban?: components['schemas']['funding_instructions_bank_transfer_iban_record'] + readonly sort_code?: components['schemas']['funding_instructions_bank_transfer_sort_code_record'] + readonly spei?: components['schemas']['funding_instructions_bank_transfer_spei_record'] + /** @description The payment networks supported by this FinancialAddress */ + readonly supported_networks?: readonly ('bacs' | 'fps' | 'sepa' | 'spei' | 'zengin')[] + /** + * @description The type of financial address + * @enum {string} + */ + readonly type: 'iban' | 'sort_code' | 'spei' | 'zengin' + readonly zengin?: components['schemas']['funding_instructions_bank_transfer_zengin_record'] + } + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + readonly funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + readonly account_holder_name: string + /** @description The BIC/SWIFT code of the account. */ + readonly bic: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + readonly country: string + /** @description The IBAN of the account. */ + readonly iban: string + } + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + readonly funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + readonly account_holder_name: string + /** @description The account number */ + readonly account_number: string + /** @description The six-digit sort code */ + readonly sort_code: string + } + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + readonly funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + readonly bank_code: string + /** @description The short banking institution name */ + readonly bank_name: string + /** @description The CLABE number */ + readonly clabe: string + } + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + readonly funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + readonly account_holder_name?: string | null + /** @description The account number */ + readonly account_number?: string | null + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + readonly account_type?: string | null + /** @description The bank code of the account */ + readonly bank_code?: string | null + /** @description The bank name of the account */ + readonly bank_name?: string | null + /** @description The branch code of the account */ + readonly branch_code?: string | null + /** @description The branch name of the account */ + readonly branch_name?: string | null + } /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -4999,7 +6223,7 @@ export interface components { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5045,6 +6269,42 @@ export interface components { /** @description The user’s verified data. */ readonly verified_outputs?: components['schemas']['gelato_verified_outputs'] | null } + /** InboundTransfers */ + readonly inbound_transfers: { + readonly billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + readonly type: 'us_bank_account' + readonly us_bank_account?: components['schemas']['inbound_transfers_payment_method_details_us_bank_account'] + } + /** inbound_transfers_payment_method_details_us_bank_account */ + readonly inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + readonly account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + readonly account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + readonly bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + readonly fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + readonly last4?: string | null + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + readonly network: 'ach' + /** @description Routing number of the bank account. */ + readonly routing_number?: string | null + } /** * Invoice * @description Invoices are statements of amounts owed by a customer, and are either @@ -5091,8 +6351,10 @@ export interface components { readonly amount_due: number /** @description The amount, in %s, that was paid. */ readonly amount_paid: number - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ readonly amount_remaining: number + /** @description ID of the Connect Application that created the invoice. */ + readonly application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ readonly application_fee_amount?: number | null /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5158,14 +6420,7 @@ export interface components { readonly default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ readonly default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) + | (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates applied to this invoice, if any. */ readonly default_tax_rates: readonly components['schemas']['tax_rate'][] @@ -5184,6 +6439,8 @@ export interface components { readonly ending_balance?: number | null /** @description Footer displayed on the invoice. */ readonly footer?: string | null + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + readonly from_invoice?: components['schemas']['invoices_from_invoice'] | null /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ readonly hosted_invoice_url?: string | null /** @description Unique identifier for the object. */ @@ -5192,6 +6449,8 @@ export interface components { readonly invoice_pdf?: string | null /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ readonly last_finalization_error?: components['schemas']['api_errors'] | null + /** @description The ID of the most recent non-draft revision of this invoice */ + readonly latest_revision?: (string | components['schemas']['invoice']) | null /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5252,6 +6511,8 @@ export interface components { readonly quote?: (string | components['schemas']['quote']) | null /** @description This is the transaction number that appears on email receipts sent for this invoice. */ readonly receipt_number?: string | null + /** @description Options for invoice PDF rendering. */ + readonly rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ readonly starting_balance: number /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5266,15 +6527,21 @@ export interface components { readonly subscription?: (string | components['schemas']['subscription']) | null /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ readonly subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ readonly subtotal: number + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + readonly subtotal_excluding_tax?: number | null /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ readonly tax?: number | null + /** @description ID of the test clock this invoice belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null readonly threshold_reason?: components['schemas']['invoice_threshold_reason'] /** @description Total after discounts and taxes. */ readonly total: number /** @description The aggregate amounts calculated per discount across all line items. */ readonly total_discount_amounts?: readonly components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + readonly total_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ readonly total_tax_amounts: readonly components['schemas']['invoice_tax_amount'][] /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ @@ -5285,6 +6552,11 @@ export interface components { */ readonly webhooks_delivered_at?: number | null } + /** invoice_installments_card */ + readonly invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + readonly enabled?: boolean | null + } /** InvoiceItemThresholdReason */ readonly invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5296,12 +6568,12 @@ export interface components { readonly invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ readonly end: number /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ readonly start: number } @@ -5344,12 +6616,52 @@ export interface components { } /** invoice_payment_method_options_card */ readonly invoice_payment_method_options_card: { + readonly installments?: components['schemas']['invoice_installments_card'] /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ readonly request_three_d_secure?: ('any' | 'automatic') | null } + /** invoice_payment_method_options_customer_balance */ + readonly invoice_payment_method_options_customer_balance: { + readonly bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + readonly funding_type?: 'bank_transfer' | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer */ + readonly invoice_payment_method_options_customer_balance_bank_transfer: { + readonly eu_bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer'] + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + readonly type?: string | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + readonly invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + readonly country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } + /** invoice_payment_method_options_konbini */ + readonly invoice_payment_method_options_konbini: { readonly [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account */ + readonly invoice_payment_method_options_us_bank_account: { + readonly financial_connections?: components['schemas']['invoice_payment_method_options_us_bank_account_linked_account_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + readonly invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + readonly permissions?: readonly ('balances' | 'payment_method' | 'transactions')[] + } /** InvoiceSettingCustomField */ readonly invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5365,12 +6677,19 @@ export interface components { readonly default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description Default footer to be displayed on invoices for this customer. */ readonly footer?: string | null + /** @description Default options for invoice PDF rendering for this customer. */ + readonly rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null } /** InvoiceSettingQuoteSetting */ readonly invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ readonly days_until_due?: number | null } + /** InvoiceSettingRenderingOptions */ + readonly invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + readonly amount_tax_display?: string | null + } /** InvoiceSettingSubscriptionScheduleSetting */ readonly invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5453,6 +6772,8 @@ export interface components { readonly subscription_item?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ readonly tax_rates?: readonly components['schemas']['tax_rate'][] | null + /** @description ID of the test clock this invoice item belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description Unit amount (in the `currency` specified) of the invoice item. */ readonly unit_amount?: number | null /** @@ -5461,6 +6782,25 @@ export interface components { */ readonly unit_amount_decimal?: string | null } + /** InvoicesFromInvoice */ + readonly invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + readonly action: string + /** @description The invoice that was cloned. */ + readonly invoice: string | components['schemas']['invoice'] + } + /** InvoicesLineItemsCreditedItems */ + readonly invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + readonly invoice: string + /** @description Credited invoice line items */ + readonly invoice_line_items: readonly string[] + } + /** InvoicesLineItemsProrationDetails */ + readonly invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + readonly credited_items?: components['schemas']['invoices_line_items_credited_items'] | null + } /** InvoicesPaymentMethodOptions */ readonly invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ @@ -5469,9 +6809,17 @@ export interface components { readonly bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ readonly card?: components['schemas']['invoice_payment_method_options_card'] | null + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + readonly customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + readonly konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + readonly us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** InvoicesPaymentSettings */ readonly invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + readonly default_mandate?: string | null /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ readonly payment_method_options?: components['schemas']['invoices_payment_method_options'] | null /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ @@ -5485,12 +6833,18 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null @@ -5498,13 +6852,14 @@ export interface components { /** InvoicesResourceInvoiceTaxID */ readonly invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ readonly type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -5516,10 +6871,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -5539,6 +6896,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -5571,38 +6929,6 @@ export interface components { */ readonly voided_at?: number | null } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - readonly issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - readonly actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - readonly charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - readonly created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - readonly fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - readonly has_liability_shift: boolean - /** @description Unique identifier for the object. */ - readonly id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - readonly post_date: number - } /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5662,6 +6988,8 @@ export interface components { readonly status: 'closed' | 'pending' | 'reversed' /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ readonly transactions: readonly components['schemas']['issuing.transaction'][] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + readonly treasury?: components['schemas']['issuing_authorization_treasury'] | null readonly verification_data: components['schemas']['issuing_authorization_verification_data'] /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ readonly wallet?: string | null @@ -5677,14 +7005,14 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - readonly cancellation_reason?: ('lost' | 'stolen') | null + readonly cancellation_reason?: ('design_rejected' | 'lost' | 'stolen') | null readonly cardholder: components['schemas']['issuing.cardholder'] /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ readonly currency: string /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ readonly cvc?: string @@ -5692,6 +7020,8 @@ export interface components { readonly exp_month: number /** @description The expiration year of the card. */ readonly exp_year: number + /** @description The financial account this card is attached to. */ + readonly financial_account?: string | null /** @description Unique identifier for the object. */ readonly id: string /** @description The last 4 digits of the card number. */ @@ -5787,7 +7117,7 @@ export interface components { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ readonly 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ readonly amount: number /** @description List of balance transactions associated with the dispute. */ readonly balance_transactions?: readonly components['schemas']['balance_transaction'][] | null @@ -5817,6 +7147,8 @@ export interface components { readonly status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' /** @description The transaction being disputed. */ readonly transaction: string | components['schemas']['issuing.transaction'] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + readonly treasury?: components['schemas']['issuing_dispute_treasury'] | null } /** * IssuingSettlement @@ -5913,6 +7245,8 @@ export interface components { readonly object: 'issuing.transaction' /** @description Additional purchase information that is optionally provided by the merchant. */ readonly purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + readonly treasury?: components['schemas']['issuing_transaction_treasury'] | null /** * @description The nature of the transaction. * @enum {string} @@ -6001,6 +7335,15 @@ export interface components { | 'webhook_declined' | 'webhook_timeout' } + /** IssuingAuthorizationTreasury */ + readonly issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + readonly received_credits: readonly string[] + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + readonly received_debits: readonly string[] + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + readonly transaction?: string | null + } /** IssuingAuthorizationVerificationData */ readonly issuing_authorization_verification_data: { /** @@ -6645,6 +7988,8 @@ export interface components { * @enum {string|null} */ readonly carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** @description Additional information that may be required for clearing customs. */ + readonly customs?: components['schemas']['issuing_card_shipping_customs'] | null /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6652,6 +7997,10 @@ export interface components { readonly eta?: number | null /** @description Recipient name. */ readonly name: string + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + readonly phone_number?: string | null + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + readonly require_signature?: boolean | null /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -6672,9 +8021,14 @@ export interface components { */ readonly type: 'bulk' | 'individual' } + /** IssuingCardShippingCustoms */ + readonly issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + readonly eori_number?: string | null + } /** IssuingCardSpendingLimit */ readonly issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ readonly amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ readonly categories?: @@ -7633,7 +8987,7 @@ export interface components { } /** IssuingCardholderSpendingLimit */ readonly issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ readonly amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ readonly categories?: @@ -8097,6 +9451,13 @@ export interface components { */ readonly received_at?: number | null } + /** IssuingDisputeTreasury */ + readonly issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + readonly debit_reversal?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + readonly received_debit: string + } /** IssuingTransactionAmountDetails */ readonly issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8178,13 +9539,24 @@ export interface components { /** @description The unit cost of the item in cents. */ readonly unit_cost?: number | null } + /** IssuingTransactionTreasury */ + readonly issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + readonly received_credit?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + readonly received_debit?: string | null + } /** * LineItem * @description A line item. */ readonly item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + readonly amount_discount: number /** @description Total before any discounts or taxes are applied. */ readonly amount_subtotal: number + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + readonly amount_tax: number /** @description Total after discounts and taxes. */ readonly amount_total: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8202,6 +9574,12 @@ export interface components { readonly object: 'item' /** @description The price used to generate the line item. */ readonly price?: components['schemas']['price'] | null + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + readonly product?: string | components['schemas']['product'] | components['schemas']['deleted_product'] /** @description The quantity of products being purchased. */ readonly quantity?: number | null /** @description The taxes applied to the line item. */ @@ -8344,6 +9722,8 @@ export interface components { readonly line_item: { /** @description The amount, in %s. */ readonly amount: number + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + readonly amount_excluding_tax?: number | null /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8372,6 +9752,8 @@ export interface components { readonly price?: components['schemas']['price'] | null /** @description Whether this is a proration. */ readonly proration: boolean + /** @description Additional details for proration line items */ + readonly proration_details?: components['schemas']['invoices_line_items_proration_details'] | null /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ readonly quantity?: number | null /** @description The subscription that the invoice item pertains to, if any. */ @@ -8387,6 +9769,11 @@ export interface components { * @enum {string} */ readonly type: 'invoiceitem' | 'subscription' + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + readonly unit_amount_excluding_tax?: string | null } /** LineItemsDiscountAmount */ readonly line_items_discount_amount: { @@ -8400,6 +9787,13 @@ export interface components { readonly amount: number readonly rate: components['schemas']['tax_rate'] } + /** linked_account_options_us_bank_account */ + readonly linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + readonly return_url?: string + } /** LoginLink */ readonly login_link: { /** @@ -8480,17 +9874,50 @@ export interface components { /** @description The URL that will contain the mandate that the customer has signed. */ readonly url: string } + /** mandate_blik */ + readonly mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + readonly expires_after?: number | null + readonly off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + readonly type?: ('off_session' | 'on_session') | null + } + /** mandate_link */ + readonly mandate_link: { readonly [key: string]: unknown } /** mandate_multi_use */ readonly mandate_multi_use: { readonly [key: string]: unknown } + /** mandate_options_off_session_details_blik */ + readonly mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + readonly amount?: number | null + /** @description Currency of each recurring payment. */ + readonly currency?: string | null + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + readonly interval?: ('day' | 'month' | 'week' | 'year') | null + /** @description Frequency indicator of each recurring payment. */ + readonly interval_count?: number | null + } /** mandate_payment_method_details */ readonly mandate_payment_method_details: { readonly acss_debit?: components['schemas']['mandate_acss_debit'] readonly au_becs_debit?: components['schemas']['mandate_au_becs_debit'] readonly bacs_debit?: components['schemas']['mandate_bacs_debit'] + readonly blik?: components['schemas']['mandate_blik'] readonly card?: components['schemas']['card_mandate_payment_method_details'] + readonly link?: components['schemas']['mandate_link'] readonly sepa_debit?: components['schemas']['mandate_sepa_debit'] /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ readonly type: string + readonly us_bank_account?: components['schemas']['mandate_us_bank_account'] } /** mandate_sepa_debit */ readonly mandate_sepa_debit: { @@ -8506,6 +9933,8 @@ export interface components { /** @description On a single use mandate, the currency of the payment. */ readonly currency: string } + /** mandate_us_bank_account */ + readonly mandate_us_bank_account: { readonly [key: string]: unknown } /** networks */ readonly networks: { /** @description All available networks for the card. */ @@ -8537,24 +9966,33 @@ export interface components { readonly user_agent?: string | null } /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ readonly order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - readonly amount: number - /** @description The total amount that was returned to the customer. */ - readonly amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - readonly application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - readonly application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - readonly charge?: (string | components['schemas']['charge']) | null + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + readonly amount_subtotal: number + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + readonly amount_total: number + /** @description ID of the Connect application that created the Order, if any. */ + readonly application?: (string | components['schemas']['application']) | null + readonly automatic_tax?: components['schemas']['orders_v2_resource_automatic_tax'] + /** @description Customer billing details associated with the order. */ + readonly billing_details?: components['schemas']['orders_v2_resource_billing_details'] | null + /** @description The fields on the Order that can be updated from the client */ + readonly client_permissions?: components['schemas']['orders_v2_resource_client_permissions'] | null + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + readonly client_secret?: string | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8562,32 +10000,23 @@ export interface components { readonly created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ readonly customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The email address of the customer placing the order. */ - readonly email?: string | null - /** @description External coupon code to load for this order. */ - readonly external_coupon_code?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string | null + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + readonly discounts?: readonly (string | components['schemas']['discount'])[] | null /** @description Unique identifier for the object. */ readonly id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - readonly items: readonly components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - readonly metadata?: { readonly [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - readonly object: 'order' + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + readonly ip_address?: string | null /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. */ - readonly returns?: { + readonly line_items?: { /** @description Details about each object. */ - readonly data: readonly components['schemas']['order_return'][] + readonly data: readonly components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -8597,83 +10026,391 @@ export interface components { readonly object: 'list' /** @description The URL where this list can be accessed. */ readonly url: string - } | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - readonly selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - readonly shipping?: components['schemas']['shipping'] | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - readonly shipping_methods?: readonly components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - readonly status: string - /** @description The timestamps at which the order status was updated. */ - readonly status_transitions?: components['schemas']['status_transitions'] | null + } + /** @description 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 + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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 } | null /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'order' + readonly payment: components['schemas']['orders_v2_resource_payment'] + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + readonly shipping_cost?: components['schemas']['orders_v2_resource_shipping_cost'] | null + /** @description Customer shipping information associated with the order. */ + readonly shipping_details?: components['schemas']['orders_v2_resource_shipping_details'] | null + /** + * @description The overall status of the order. + * @enum {string} */ - readonly updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - readonly upstream_id?: string + readonly status: 'canceled' | 'complete' | 'open' | 'processing' | 'submitted' + readonly tax_details?: components['schemas']['orders_v2_resource_tax_details'] + readonly total_details: components['schemas']['orders_v2_resource_total_details'] } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - readonly order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - readonly amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - readonly description: string + /** orders_payment_method_options_afterpay_clearpay */ + readonly orders_payment_method_options_afterpay_clearpay: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - readonly object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - readonly parent?: (string | components['schemas']['sku']) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - readonly quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - readonly type: string + readonly capture_method?: 'automatic' | 'manual' + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + readonly reference?: string | null + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + readonly setup_future_usage?: 'none' } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - readonly order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - readonly amount: number + /** OrdersV2ResourceAutomaticPaymentMethods */ + readonly orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + readonly enabled: boolean + } + /** OrdersV2ResourceAutomaticTax */ + readonly orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + readonly enabled: boolean /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} */ - readonly created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description Unique identifier for the object. */ + readonly status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** OrdersV2ResourceBillingDetails */ + readonly orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + readonly address?: components['schemas']['address'] | null + /** @description Email address for the order. */ + readonly email?: string | null + /** @description Full name for the order. */ + readonly name?: string | null + /** @description Billing phone number for the order (including extension). */ + readonly phone?: string | null + } + /** OrdersV2ResourceCardPaymentMethodOptions */ + readonly orders_v2_resource_card_payment_method_options: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method: 'automatic' | 'manual' + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** OrdersV2ResourceClientPermissions */ + readonly orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + readonly billing_details?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + readonly promotion_codes?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + readonly shipping_details?: ('allow' | 'disallow') | null + } + /** OrdersV2ResourcePayment */ + readonly orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + readonly payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description Settings describing how the order should configure generated PaymentIntents. */ + readonly settings?: components['schemas']['orders_v2_resource_payment_settings'] | null + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + readonly status?: + | ( + | 'canceled' + | 'complete' + | 'not_required' + | 'processing' + | 'requires_action' + | 'requires_capture' + | 'requires_confirmation' + | 'requires_payment_method' + ) + | null + } + /** OrdersV2ResourcePaymentMethodOptions */ + readonly orders_v2_resource_payment_method_options: { + readonly acss_debit?: components['schemas']['payment_intent_payment_method_options_acss_debit'] + readonly afterpay_clearpay?: components['schemas']['orders_payment_method_options_afterpay_clearpay'] + readonly alipay?: components['schemas']['payment_method_options_alipay'] + readonly bancontact?: components['schemas']['payment_method_options_bancontact'] + readonly card?: components['schemas']['orders_v2_resource_card_payment_method_options'] + readonly customer_balance?: components['schemas']['payment_method_options_customer_balance'] + readonly ideal?: components['schemas']['payment_method_options_ideal'] + readonly klarna?: components['schemas']['payment_method_options_klarna'] + readonly link?: components['schemas']['payment_intent_payment_method_options_link'] + readonly oxxo?: components['schemas']['payment_method_options_oxxo'] + readonly p24?: components['schemas']['payment_method_options_p24'] + readonly paypal?: components['schemas']['payment_method_options_paypal'] + readonly sepa_debit?: components['schemas']['payment_intent_payment_method_options_sepa_debit'] + readonly sofort?: components['schemas']['payment_method_options_sofort'] + readonly wechat_pay?: components['schemas']['payment_method_options_wechat_pay'] + } + /** OrdersV2ResourcePaymentSettings */ + readonly orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + readonly application_fee_amount?: number | null + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + readonly automatic_payment_methods?: components['schemas']['orders_v2_resource_automatic_payment_methods'] | null + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + readonly payment_method_options?: components['schemas']['orders_v2_resource_payment_method_options'] | null + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + readonly payment_method_types?: + | readonly ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + /** @description The URL to redirect the customer to after they authenticate their payment. */ + readonly return_url?: string | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + readonly statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + readonly statement_descriptor_suffix?: string | null + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + readonly transfer_data?: components['schemas']['orders_v2_resource_transfer_data'] | null + } + /** OrdersV2ResourceShippingCost */ + readonly orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + readonly amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + readonly amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + readonly amount_total: number + /** @description The ID of the ShippingRate for this order. */ + readonly shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + readonly taxes?: readonly components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceShippingDetails */ + readonly orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + readonly address?: components['schemas']['address'] | null + /** @description Recipient name. */ + readonly name?: string | null + /** @description Recipient phone (including extension). */ + readonly phone?: string | null + } + /** OrdersV2ResourceTaxDetails */ + readonly orders_v2_resource_tax_details: { + /** + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + readonly tax_exempt: 'exempt' | 'none' | 'reverse' + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + readonly tax_ids: readonly components['schemas']['orders_v2_resource_tax_details_resource_tax_id'][] + } + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + readonly orders_v2_resource_tax_details_resource_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` + * @enum {string} + */ + readonly type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + readonly value?: string | null + } + /** OrdersV2ResourceTotalDetails */ + readonly orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + readonly amount_discount: number + /** @description This is the sum of all the shipping amounts. */ + readonly amount_shipping?: number | null + /** @description This is the sum of all the tax amounts. */ + readonly amount_tax: number + readonly breakdown?: components['schemas']['orders_v2_resource_total_details_api_resource_breakdown'] + } + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + readonly orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + readonly discounts: readonly components['schemas']['line_items_discount_amount'][] + /** @description The aggregated tax amounts by rate. */ + readonly taxes: readonly components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceTransferData */ + readonly orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + readonly amount?: number | null + /** @description ID of the Connected account receiving the transfer. */ + readonly destination: string | components['schemas']['account'] + } + /** OutboundPaymentsPaymentMethodDetails */ + readonly outbound_payments_payment_method_details: { + readonly billing_details: components['schemas']['treasury_shared_resource_billing_details'] + readonly financial_account?: components['schemas']['outbound_payments_payment_method_details_financial_account'] + /** + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} + */ + readonly type: 'financial_account' | 'us_bank_account' + readonly us_bank_account?: components['schemas']['outbound_payments_payment_method_details_us_bank_account'] + } + /** outbound_payments_payment_method_details_financial_account */ + readonly outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ readonly id: string - /** @description The items included in this order return. */ - readonly items: readonly components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails used to send funds. * @enum {string} */ - readonly object: 'order_return' - /** @description The order that this return includes items from. */ - readonly order?: (string | components['schemas']['order']) | null - /** @description The ID of the refund issued for this return. */ - readonly refund?: (string | components['schemas']['refund']) | null + readonly network: 'stripe' + } + /** outbound_payments_payment_method_details_us_bank_account */ + readonly outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + readonly account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + readonly account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + readonly bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + readonly fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + readonly last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + readonly network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + readonly routing_number?: string | null + } + /** OutboundTransfersPaymentMethodDetails */ + readonly outbound_transfers_payment_method_details: { + readonly billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + readonly type: 'us_bank_account' + readonly us_bank_account?: components['schemas']['outbound_transfers_payment_method_details_us_bank_account'] + } + /** outbound_transfers_payment_method_details_us_bank_account */ + readonly outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + readonly account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + readonly account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + readonly bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + readonly fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + readonly last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + readonly network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + readonly routing_number?: string | null } /** PackageDimensions */ readonly package_dimensions: { @@ -8686,11 +10423,25 @@ export interface components { /** @description Width, in inches. */ readonly width: number } + /** PaymentFlowsAmountDetails */ + readonly payment_flows_amount_details: { + readonly tip?: components['schemas']['payment_flows_amount_details_resource_tip'] + } + /** PaymentFlowsAmountDetailsResourceTip */ + readonly payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + readonly amount?: number + } /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ readonly payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ readonly enabled: boolean } + /** PaymentFlowsInstallmentOptions */ + readonly payment_flows_installment_options: { + readonly enabled: boolean + readonly plan?: components['schemas']['payment_method_details_card_installments_plan'] + } /** PaymentFlowsPrivatePaymentMethodsAlipay */ readonly payment_flows_private_payment_methods_alipay: { readonly [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -8730,6 +10481,7 @@ export interface components { readonly amount: number /** @description Amount that can be captured from this PaymentIntent. */ readonly amount_capturable?: number + readonly amount_details?: components['schemas']['payment_flows_amount_details'] /** @description Amount that was collected by this PaymentIntent. */ readonly amount_received?: number /** @description ID of the Connect application that created the PaymentIntent. */ @@ -8775,9 +10527,9 @@ export interface components { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ readonly client_secret?: string | null /** @enum {string} */ @@ -8863,12 +10615,20 @@ export interface components { readonly transfer_group?: string | null } /** PaymentIntentCardProcessing */ - readonly payment_intent_card_processing: { readonly [key: string]: unknown } + readonly payment_intent_card_processing: { + readonly customer_notification?: components['schemas']['payment_intent_processing_customer_notification'] + } /** PaymentIntentNextAction */ readonly payment_intent_next_action: { readonly alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] readonly boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + readonly card_await_notification?: components['schemas']['payment_intent_next_action_card_await_notification'] + readonly display_bank_transfer_instructions?: components['schemas']['payment_intent_next_action_display_bank_transfer_instructions'] + readonly konbini_display_details?: components['schemas']['payment_intent_next_action_konbini'] readonly oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + readonly paynow_display_qr_code?: components['schemas']['payment_intent_next_action_paynow_display_qr_code'] + readonly pix_display_qr_code?: components['schemas']['payment_intent_next_action_pix_display_qr_code'] + readonly promptpay_display_qr_code?: components['schemas']['payment_intent_next_action_promptpay_display_qr_code'] readonly redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ readonly type: string @@ -8904,6 +10664,34 @@ export interface components { /** @description The URL to the downloadable boleto voucher PDF. */ readonly pdf?: string | null } + /** PaymentIntentNextActionCardAwaitNotification */ + readonly payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + readonly charge_attempt_at?: number | null + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + readonly customer_approval_required?: boolean | null + } + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + readonly payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + readonly amount_remaining?: number | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string | null + /** @description A list of financial addresses that can be used to fund the customer balance */ + readonly financial_addresses?: readonly components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + readonly hosted_instructions_url?: string | null + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + readonly reference?: string | null + /** + * @description Type of bank transfer + * @enum {string} + */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } /** PaymentIntentNextActionDisplayOxxoDetails */ readonly payment_intent_next_action_display_oxxo_details: { /** @@ -8916,6 +10704,89 @@ export interface components { /** @description OXXO reference number. */ readonly number?: string | null } + /** payment_intent_next_action_konbini */ + readonly payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + readonly expires_at: number + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + readonly hosted_voucher_url?: string | null + readonly stores: components['schemas']['payment_intent_next_action_konbini_stores'] + } + /** payment_intent_next_action_konbini_familymart */ + readonly payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + readonly confirmation_number?: string + /** @description The payment code. */ + readonly payment_code: string + } + /** payment_intent_next_action_konbini_lawson */ + readonly payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + readonly confirmation_number?: string + /** @description The payment code. */ + readonly payment_code: string + } + /** payment_intent_next_action_konbini_ministop */ + readonly payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + readonly confirmation_number?: string + /** @description The payment code. */ + readonly payment_code: string + } + /** payment_intent_next_action_konbini_seicomart */ + readonly payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + readonly confirmation_number?: string + /** @description The payment code. */ + readonly payment_code: string + } + /** payment_intent_next_action_konbini_stores */ + readonly payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + readonly familymart?: components['schemas']['payment_intent_next_action_konbini_familymart'] | null + /** @description Lawson instruction details. */ + readonly lawson?: components['schemas']['payment_intent_next_action_konbini_lawson'] | null + /** @description Ministop instruction details. */ + readonly ministop?: components['schemas']['payment_intent_next_action_konbini_ministop'] | null + /** @description Seicomart instruction details. */ + readonly seicomart?: components['schemas']['payment_intent_next_action_konbini_seicomart'] | null + } + /** PaymentIntentNextActionPaynowDisplayQrCode */ + readonly payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + readonly data: string + /** @description The image_url_png string used to render QR code */ + readonly image_url_png: string + /** @description The image_url_svg string used to render QR code */ + readonly image_url_svg: string + } + /** PaymentIntentNextActionPixDisplayQrCode */ + readonly payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + readonly data?: string + /** @description The date (unix timestamp) when the PIX expires. */ + readonly expires_at?: number + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + readonly hosted_instructions_url?: string + /** @description The image_url_png string used to render png QR code */ + readonly image_url_png?: string + /** @description The image_url_svg string used to render svg QR code */ + readonly image_url_svg?: string + } + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + readonly payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + readonly data: string + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + readonly hosted_instructions_url: string + /** @description The image_url_png string used to render QR code, can be used as */ + readonly image_url_png: string + /** @description The image_url_svg string used to render QR code, can be used as */ + readonly image_url_svg: string + } /** PaymentIntentNextActionRedirectToUrl */ readonly payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -8932,6 +10803,11 @@ export interface components { readonly arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ readonly hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + readonly microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** PaymentIntentNextActionWechatPayDisplayQrCode */ readonly payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8952,9 +10828,9 @@ export interface components { readonly nonce_str: string /** @description package is static value */ readonly package: string - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ readonly partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ readonly prepay_id: string /** @description A signature */ readonly sign: string @@ -8963,7 +10839,7 @@ export interface components { } /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ readonly payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ readonly native_url: string } /** PaymentIntentPaymentMethodOptions */ @@ -8971,6 +10847,9 @@ export interface components { readonly acss_debit?: | components['schemas']['payment_intent_payment_method_options_acss_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly affirm?: + | components['schemas']['payment_method_options_affirm'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly afterpay_clearpay?: | components['schemas']['payment_method_options_afterpay_clearpay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8986,6 +10865,9 @@ export interface components { readonly bancontact?: | components['schemas']['payment_method_options_bancontact'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly blik?: + | components['schemas']['payment_intent_payment_method_options_blik'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly boleto?: | components['schemas']['payment_method_options_boleto'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8995,6 +10877,9 @@ export interface components { readonly card_present?: | components['schemas']['payment_method_options_card_present'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly customer_balance?: + | components['schemas']['payment_method_options_customer_balance'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly eps?: | components['schemas']['payment_intent_payment_method_options_eps'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9016,18 +10901,36 @@ export interface components { readonly klarna?: | components['schemas']['payment_method_options_klarna'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly konbini?: + | components['schemas']['payment_method_options_konbini'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly link?: + | components['schemas']['payment_intent_payment_method_options_link'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly oxxo?: | components['schemas']['payment_method_options_oxxo'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly p24?: | components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly paynow?: + | components['schemas']['payment_method_options_paynow'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly pix?: + | components['schemas']['payment_method_options_pix'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly promptpay?: + | components['schemas']['payment_method_options_promptpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly sepa_debit?: | components['schemas']['payment_intent_payment_method_options_sepa_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly sofort?: | components['schemas']['payment_method_options_sofort'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + readonly us_bank_account?: + | components['schemas']['payment_intent_payment_method_options_us_bank_account'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] readonly wechat_pay?: | components['schemas']['payment_method_options_wechat_pay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9035,6 +10938,15 @@ export interface components { /** payment_intent_payment_method_options_acss_debit */ readonly payment_intent_payment_method_options_acss_debit: { readonly mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} @@ -9042,15 +10954,34 @@ export interface components { readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_intent_payment_method_options_au_becs_debit */ - readonly payment_intent_payment_method_options_au_becs_debit: { readonly [key: string]: unknown } + readonly payment_intent_payment_method_options_au_becs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_blik */ + readonly payment_intent_payment_method_options_blik: { readonly [key: string]: unknown } /** payment_intent_payment_method_options_card */ readonly payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' /** * @description Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ readonly installments?: components['schemas']['payment_method_options_card_installments'] | null + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + readonly mandate_options?: components['schemas']['payment_method_options_card_mandate_options'] | null /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9072,9 +11003,42 @@ export interface components { * @enum {string} */ readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + readonly statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + readonly statement_descriptor_suffix_kanji?: string } /** payment_intent_payment_method_options_eps */ - readonly payment_intent_payment_method_options_eps: { readonly [key: string]: unknown } + readonly payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_intent_payment_method_options_link */ + readonly payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' + /** @description Token used for persistent Link logins. */ + readonly persistent_token?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' + } /** payment_intent_payment_method_options_mandate_options_acss_debit */ readonly payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9097,6 +11061,33 @@ export interface components { /** payment_intent_payment_method_options_sepa_debit */ readonly payment_intent_payment_method_options_sepa_debit: { readonly mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_us_bank_account */ + readonly payment_intent_payment_method_options_us_bank_account: { + readonly financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** PaymentIntentProcessing */ readonly payment_intent_processing: { @@ -9107,8 +11098,24 @@ export interface components { */ readonly type: 'card' } + /** PaymentIntentProcessingCustomerNotification */ + readonly payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + readonly approval_requested?: boolean | null + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + readonly completes_at?: number | null + } /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ readonly payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' + readonly installments?: components['schemas']['payment_flows_installment_options'] /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9118,6 +11125,11 @@ export interface components { * @enum {string} */ readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** * PaymentLink @@ -9143,6 +11155,15 @@ export interface components { * @enum {string} */ readonly billing_address_collection: 'auto' | 'required' + /** @description When set, provides configuration to gather active consent from customers. */ + readonly consent_collection?: components['schemas']['payment_links_resource_consent_collection'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + readonly customer_creation: 'always' | 'if_required' /** @description Unique identifier for the object. */ readonly id: string /** @@ -9173,13 +11194,56 @@ export interface components { readonly object: 'payment_link' /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ readonly on_behalf_of?: (string | components['schemas']['account']) | null + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + readonly payment_intent_data?: components['schemas']['payment_links_resource_payment_intent_data'] | null + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + readonly payment_method_collection: 'always' | 'if_required' /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - readonly payment_method_types?: readonly 'card'[] | null + readonly payment_method_types?: + | readonly ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | null readonly phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] /** @description Configuration for collecting the customer's shipping address. */ readonly shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null + /** @description The shipping rate options applied to the session. */ + readonly shipping_options: readonly components['schemas']['payment_links_resource_shipping_option'][] + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + readonly submit_type: 'auto' | 'book' | 'donate' | 'pay' /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ readonly subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null + readonly tax_id_collection: components['schemas']['payment_links_resource_tax_id_collection'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ readonly transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null /** @description The public URL that can be shared with customers. */ @@ -9210,6 +11274,32 @@ export interface components { /** @description The URL the customer will be redirected to after the purchase is complete. */ readonly url: string } + /** PaymentLinksResourceConsentCollection */ + readonly payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + readonly promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + readonly terms_of_service?: ('none' | 'required') | null + } + /** PaymentLinksResourcePaymentIntentData */ + readonly payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + readonly capture_method?: ('automatic' | 'manual') | null + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + readonly setup_future_usage?: ('off_session' | 'on_session') | null + } /** PaymentLinksResourcePhoneNumberCollection */ readonly payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9458,11 +11548,25 @@ export interface components { | 'ZZ' )[] } + /** PaymentLinksResourceShippingOption */ + readonly payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + readonly shipping_amount: number + /** @description The ID of the Shipping Rate to use for this shipping option. */ + readonly shipping_rate: string | components['schemas']['shipping_rate'] + } /** PaymentLinksResourceSubscriptionData */ readonly payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + readonly description?: string | null /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ readonly trial_period_days?: number | null } + /** PaymentLinksResourceTaxIdCollection */ + readonly payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + readonly enabled: boolean + } /** PaymentLinksResourceTransferData */ readonly payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ @@ -9473,19 +11577,21 @@ export interface components { /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them 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). */ readonly payment_method: { readonly acss_debit?: components['schemas']['payment_method_acss_debit'] + readonly affirm?: components['schemas']['payment_method_affirm'] readonly afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] readonly alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] readonly au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] readonly bacs_debit?: components['schemas']['payment_method_bacs_debit'] readonly bancontact?: components['schemas']['payment_method_bancontact'] readonly billing_details: components['schemas']['billing_details'] + readonly blik?: components['schemas']['payment_method_blik'] readonly boleto?: components['schemas']['payment_method_boleto'] readonly card?: components['schemas']['payment_method_card'] readonly card_present?: components['schemas']['payment_method_card_present'] @@ -9496,6 +11602,7 @@ export interface components { readonly created: number /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ readonly customer?: (string | components['schemas']['customer']) | null + readonly customer_balance?: components['schemas']['payment_method_customer_balance'] readonly eps?: components['schemas']['payment_method_eps'] readonly fpx?: components['schemas']['payment_method_fpx'] readonly giropay?: components['schemas']['payment_method_giropay'] @@ -9505,6 +11612,8 @@ export interface components { readonly ideal?: components['schemas']['payment_method_ideal'] readonly interac_present?: components['schemas']['payment_method_interac_present'] readonly klarna?: components['schemas']['payment_method_klarna'] + readonly konbini?: components['schemas']['payment_method_konbini'] + readonly link?: components['schemas']['payment_method_link'] /** @description 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 /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -9516,6 +11625,10 @@ export interface components { readonly object: 'payment_method' readonly oxxo?: components['schemas']['payment_method_oxxo'] readonly p24?: components['schemas']['payment_method_p24'] + readonly paynow?: components['schemas']['payment_method_paynow'] + readonly pix?: components['schemas']['payment_method_pix'] + readonly promptpay?: components['schemas']['payment_method_promptpay'] + readonly radar_options?: components['schemas']['radar_radar_options'] readonly sepa_debit?: components['schemas']['payment_method_sepa_debit'] readonly sofort?: components['schemas']['payment_method_sofort'] /** @@ -9524,14 +11637,17 @@ export interface components { */ readonly type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -9539,11 +11655,18 @@ export interface components { | 'ideal' | 'interac_present' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + readonly us_bank_account?: components['schemas']['payment_method_us_bank_account'] readonly wechat_pay?: components['schemas']['payment_method_wechat_pay'] } /** payment_method_acss_debit */ @@ -9559,6 +11682,8 @@ export interface components { /** @description Transit number of the bank account. */ readonly transit_number?: string | null } + /** payment_method_affirm */ + readonly payment_method_affirm: { readonly [key: string]: unknown } /** payment_method_afterpay_clearpay */ readonly payment_method_afterpay_clearpay: { readonly [key: string]: unknown } /** payment_method_au_becs_debit */ @@ -9581,6 +11706,8 @@ export interface components { } /** payment_method_bancontact */ readonly payment_method_bancontact: { readonly [key: string]: unknown } + /** payment_method_blik */ + readonly payment_method_blik: { readonly [key: string]: unknown } /** payment_method_boleto */ readonly payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -9683,19 +11810,24 @@ export interface components { /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ readonly shipping_address?: components['schemas']['address'] | null } + /** payment_method_customer_balance */ + readonly payment_method_customer_balance: { readonly [key: string]: unknown } /** payment_method_details */ 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'] readonly acss_debit?: components['schemas']['payment_method_details_acss_debit'] + readonly affirm?: components['schemas']['payment_method_details_affirm'] readonly afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] readonly alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] readonly au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] readonly bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] readonly bancontact?: components['schemas']['payment_method_details_bancontact'] + readonly blik?: components['schemas']['payment_method_details_blik'] readonly boleto?: components['schemas']['payment_method_details_boleto'] readonly card?: components['schemas']['payment_method_details_card'] readonly card_present?: components['schemas']['payment_method_details_card_present'] + readonly customer_balance?: components['schemas']['payment_method_details_customer_balance'] readonly eps?: components['schemas']['payment_method_details_eps'] readonly fpx?: components['schemas']['payment_method_details_fpx'] readonly giropay?: components['schemas']['payment_method_details_giropay'] @@ -9703,9 +11835,14 @@ export interface components { readonly ideal?: components['schemas']['payment_method_details_ideal'] readonly interac_present?: components['schemas']['payment_method_details_interac_present'] readonly klarna?: components['schemas']['payment_method_details_klarna'] + readonly konbini?: components['schemas']['payment_method_details_konbini'] + readonly link?: components['schemas']['payment_method_details_link'] readonly multibanco?: components['schemas']['payment_method_details_multibanco'] readonly oxxo?: components['schemas']['payment_method_details_oxxo'] readonly p24?: components['schemas']['payment_method_details_p24'] + readonly paynow?: components['schemas']['payment_method_details_paynow'] + readonly pix?: components['schemas']['payment_method_details_pix'] + readonly promptpay?: components['schemas']['payment_method_details_promptpay'] readonly sepa_debit?: components['schemas']['payment_method_details_sepa_debit'] readonly sofort?: components['schemas']['payment_method_details_sofort'] readonly stripe_account?: components['schemas']['payment_method_details_stripe_account'] @@ -9715,6 +11852,7 @@ export interface components { * It contains information specific to the payment method. */ readonly type: string + readonly us_bank_account?: components['schemas']['payment_method_details_us_bank_account'] readonly wechat?: components['schemas']['payment_method_details_wechat'] readonly wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] } @@ -9762,6 +11900,8 @@ export interface components { /** @description Transit number of the bank account. */ readonly transit_number?: string | null } + /** payment_method_details_affirm */ + readonly payment_method_details_affirm: { readonly [key: string]: unknown } /** payment_method_details_afterpay_clearpay */ readonly payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -9815,6 +11955,8 @@ export interface components { */ readonly verified_name?: string | null } + /** payment_method_details_blik */ + readonly payment_method_details_blik: { readonly [key: string]: unknown } /** payment_method_details_boleto */ readonly payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -9848,6 +11990,8 @@ export interface components { readonly installments?: components['schemas']['payment_method_details_card_installments'] | null /** @description The last four digits of the card. */ readonly last4?: string | null + /** @description ID of the mandate used to make this payment or created by it. */ + readonly mandate?: string | null /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly network?: string | null /** @description Populated if this transaction used 3D Secure authentication. */ @@ -9891,267 +12035,277 @@ export interface components { readonly amount_authorized?: number | null /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ readonly brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - readonly cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - readonly country?: string | null - /** @description Authorization response cryptogram. */ - readonly emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - readonly exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - readonly exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - readonly fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - readonly funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - readonly generated_card?: string | null - /** @description The last four digits of the card. */ - readonly last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - readonly network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - readonly overcapture_supported?: boolean | null - /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - readonly read_method?: - | ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') - | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - readonly receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null - } - /** payment_method_details_card_present_receipt */ - readonly payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - readonly account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - readonly application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - readonly application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - readonly authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - readonly authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - readonly cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - readonly dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - readonly terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - readonly transaction_status_information?: string | null - } - /** payment_method_details_card_wallet */ - 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'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - readonly dynamic_last4?: string | null - readonly google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - readonly masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - readonly samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - readonly type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - readonly visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - readonly payment_method_details_card_wallet_amex_express_checkout: { readonly [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - readonly payment_method_details_card_wallet_apple_pay: { readonly [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - readonly payment_method_details_card_wallet_google_pay: { readonly [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - readonly payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_card_wallet_samsung_pay */ - readonly payment_method_details_card_wallet_samsung_pay: { readonly [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - readonly payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - readonly shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_eps */ - readonly payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - readonly bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - readonly verified_name?: string | null - } - /** payment_method_details_fpx */ - readonly payment_method_details_fpx: { /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - readonly bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - readonly transaction_id?: string | null - } - /** payment_method_details_giropay */ - readonly payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - readonly bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - readonly bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - readonly bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - readonly verified_name?: string | null - } - /** payment_method_details_grabpay */ - readonly payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - readonly transaction_id?: string | null - } - /** payment_method_details_ideal */ - readonly payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - readonly bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - readonly bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - readonly generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - readonly generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - readonly iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - readonly verified_name?: string | null - } - /** payment_method_details_interac_present */ - readonly payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - readonly brand?: string | null + readonly capture_before?: number + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + readonly cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + readonly country?: string | null + /** @description Authorization response cryptogram. */ + readonly emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + readonly exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + readonly exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + readonly fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + readonly funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + readonly generated_card?: string | null + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + readonly incremental_authorization_supported: boolean + /** @description The last four digits of the card. */ + readonly last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + readonly network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + readonly overcapture_supported: boolean + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + readonly read_method?: + | ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') + | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + readonly receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null + } + /** payment_method_details_card_present_receipt */ + readonly payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + readonly account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + readonly application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + readonly application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + readonly authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + readonly authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + readonly cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + readonly dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + readonly terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + readonly transaction_status_information?: string | null + } + /** payment_method_details_card_wallet */ + 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'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + readonly dynamic_last4?: string | null + readonly google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + readonly masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + readonly samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + readonly type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + readonly visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + readonly payment_method_details_card_wallet_amex_express_checkout: { readonly [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + readonly payment_method_details_card_wallet_apple_pay: { readonly [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + readonly payment_method_details_card_wallet_google_pay: { readonly [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + readonly payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_card_wallet_samsung_pay */ + readonly payment_method_details_card_wallet_samsung_pay: { readonly [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + readonly payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + readonly shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_customer_balance */ + readonly payment_method_details_customer_balance: { readonly [key: string]: unknown } + /** payment_method_details_eps */ + readonly payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + readonly bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + readonly verified_name?: string | null + } + /** payment_method_details_fpx */ + readonly payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + readonly transaction_id?: string | null + } + /** payment_method_details_giropay */ + readonly payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + readonly bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + readonly bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + readonly bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + readonly verified_name?: string | null + } + /** payment_method_details_grabpay */ + readonly payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + readonly transaction_id?: string | null + } + /** payment_method_details_ideal */ + readonly payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + readonly bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + readonly bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + readonly generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + readonly generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + readonly iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + readonly verified_name?: string | null + } + /** payment_method_details_interac_present */ + readonly payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + readonly brand?: string | null /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ readonly cardholder_name?: string | null /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10221,10 +12375,25 @@ export interface components { readonly payment_method_category?: string | null /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ readonly preferred_locale?: string | null } + /** payment_method_details_konbini */ + readonly payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + readonly store?: components['schemas']['payment_method_details_konbini_store'] | null + } + /** payment_method_details_konbini_store */ + readonly payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + readonly chain?: ('familymart' | 'lawson' | 'ministop' | 'seicomart') | null + } + /** payment_method_details_link */ + readonly payment_method_details_link: { readonly [key: string]: unknown } /** payment_method_details_multibanco */ readonly payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10281,6 +12450,21 @@ export interface components { */ readonly verified_name?: string | null } + /** payment_method_details_paynow */ + readonly payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + readonly reference?: string | null + } + /** payment_method_details_pix */ + readonly payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + readonly bank_transaction_id?: string | null + } + /** payment_method_details_promptpay */ + readonly payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + readonly reference?: string | null + } /** payment_method_details_sepa_debit */ readonly payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10326,6 +12510,27 @@ export interface components { } /** payment_method_details_stripe_account */ readonly payment_method_details_stripe_account: { readonly [key: string]: unknown } + /** payment_method_details_us_bank_account */ + readonly payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + readonly account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + readonly account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + readonly bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + readonly fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + readonly last4?: string | null + /** @description Routing number of the bank account. */ + readonly routing_number?: string | null + } /** payment_method_details_wechat */ readonly payment_method_details_wechat: { readonly [key: string]: unknown } /** payment_method_details_wechat_pay */ @@ -10338,7 +12543,7 @@ export interface components { /** payment_method_eps */ readonly payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ readonly bank?: @@ -10353,6 +12558,7 @@ export interface components { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -10458,18 +12664,78 @@ export interface components { /** @description The customer's date of birth, if provided. */ readonly dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null } + /** payment_method_konbini */ + readonly payment_method_konbini: { readonly [key: string]: unknown } + /** payment_method_link */ + readonly payment_method_link: { + /** @description Account owner's email address. */ + readonly email?: string | null + /** @description Token used for persistent Link logins. */ + readonly persistent_token?: string + } + /** payment_method_options_affirm */ + readonly payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** payment_method_options_afterpay_clearpay */ readonly payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ readonly reference?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' } /** payment_method_options_alipay */ - readonly payment_method_options_alipay: { readonly [key: string]: unknown } + readonly payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_bacs_debit */ - readonly payment_method_options_bacs_debit: { readonly [key: string]: unknown } + readonly payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } /** payment_method_options_bancontact */ readonly payment_method_options_bancontact: { /** @@ -10477,11 +12743,29 @@ export interface components { * @enum {string} */ readonly preferred_language: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_boleto */ readonly payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ readonly expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** payment_method_options_card_installments */ readonly payment_method_options_card_installments: { @@ -10492,30 +12776,255 @@ export interface components { /** @description Installment plan selected for this PaymentIntent. */ readonly plan?: components['schemas']['payment_method_details_card_installments_plan'] | null } + /** payment_method_options_card_mandate_options */ + readonly payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + readonly amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + readonly amount_type: 'fixed' | 'maximum' + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + readonly description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + readonly end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + readonly interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + readonly reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + readonly start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + readonly supported_types?: readonly 'india'[] | null + } /** payment_method_options_card_present */ - readonly payment_method_options_card_present: { readonly [key: string]: unknown } + readonly payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + readonly request_extended_authorization?: boolean | null + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + readonly request_incremental_authorization_support?: boolean | null + } + /** payment_method_options_customer_balance */ + readonly payment_method_options_customer_balance: { + readonly bank_transfer?: components['schemas']['payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + readonly funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_customer_balance_bank_transfer */ + readonly payment_method_options_customer_balance_bank_transfer: { + readonly eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + readonly type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** payment_method_options_customer_balance_eu_bank_account */ + readonly payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + readonly country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } /** payment_method_options_fpx */ - readonly payment_method_options_fpx: { readonly [key: string]: unknown } + readonly payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** payment_method_options_giropay */ - readonly payment_method_options_giropay: { readonly [key: string]: unknown } + readonly payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** payment_method_options_grabpay */ - readonly payment_method_options_grabpay: { readonly [key: string]: unknown } + readonly payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** payment_method_options_ideal */ - readonly payment_method_options_ideal: { readonly [key: string]: unknown } + readonly payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_interac_present */ readonly payment_method_options_interac_present: { readonly [key: string]: unknown } /** payment_method_options_klarna */ readonly payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ readonly preferred_locale?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_konbini */ + readonly payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + readonly confirmation_number?: string | null + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + readonly expires_after_days?: number | null + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + readonly expires_at?: number | null + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + readonly product_description?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' } /** payment_method_options_oxxo */ readonly payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ readonly expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' } /** payment_method_options_p24 */ - readonly payment_method_options_p24: { readonly [key: string]: unknown } + readonly payment_method_options_p24: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_paynow */ + readonly payment_method_options_paynow: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_paypal */ + readonly payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'manual' + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + readonly preferred_locale?: string | null + } + /** payment_method_options_pix */ + readonly payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + readonly expires_after_seconds?: number | null + /** @description The timestamp at which the Pix expires. */ + readonly expires_at?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_promptpay */ + readonly payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' + } /** payment_method_options_sofort */ readonly payment_method_options_sofort: { /** @@ -10523,6 +13032,15 @@ export interface components { * @enum {string|null} */ readonly preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_wechat_pay */ readonly payment_method_options_wechat_pay: { @@ -10533,6 +13051,15 @@ export interface components { * @enum {string|null} */ readonly client?: ('android' | 'ios' | 'web') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + readonly setup_future_usage?: 'none' } /** payment_method_oxxo */ readonly payment_method_oxxo: { readonly [key: string]: unknown } @@ -10572,6 +13099,12 @@ export interface components { ) | null } + /** payment_method_paynow */ + readonly payment_method_paynow: { readonly [key: string]: unknown } + /** payment_method_pix */ + readonly payment_method_pix: { readonly [key: string]: unknown } + /** payment_method_promptpay */ + readonly payment_method_promptpay: { readonly [key: string]: unknown } /** payment_method_sepa_debit */ readonly payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10592,6 +13125,31 @@ export interface components { /** @description Two-letter ISO code representing the country the bank account is located in. */ readonly country?: string | null } + /** payment_method_us_bank_account */ + readonly payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + readonly account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + readonly account_type?: ('checking' | 'savings') | null + /** @description The name of the bank. */ + readonly bank_name?: string | null + /** @description The ID of the Financial Connections Account used to create the payment method. */ + readonly financial_connections_account?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + readonly fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + readonly last4?: string | null + /** @description Contains information about US bank account networks that can be used. */ + readonly networks?: components['schemas']['us_bank_account_networks'] | null + /** @description Routing number of the bank account. */ + readonly routing_number?: string | null + } /** payment_method_wechat_pay */ readonly payment_method_wechat_pay: { readonly [key: string]: unknown } /** PaymentPagesCheckoutSessionAfterExpiration */ @@ -10635,6 +13193,11 @@ export interface components { * @enum {string|null} */ readonly promotions?: ('opt_in' | 'opt_out') | null + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + readonly terms_of_service?: 'accepted' | null } /** PaymentPagesCheckoutSessionConsentCollection */ readonly payment_pages_checkout_session_consent_collection: { @@ -10644,23 +13207,32 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - readonly promotions?: 'auto' | null + readonly promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + readonly terms_of_service?: ('none' | 'required') | null } /** PaymentPagesCheckoutSessionCustomerDetails */ readonly payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + readonly address?: components['schemas']['address'] | null /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ readonly email?: string | null - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + readonly name?: string | null + /** @description The customer's phone number after a completed Checkout Session. */ readonly phone?: string | null /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ readonly tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ readonly tax_ids?: readonly components['schemas']['payment_pages_checkout_session_tax_id'][] | null } /** PaymentPagesCheckoutSessionPhoneNumberCollection */ @@ -10914,6 +13486,19 @@ export interface components { | 'ZZ' )[] } + /** PaymentPagesCheckoutSessionShippingCost */ + readonly payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + readonly amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + readonly amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + readonly amount_total: number + /** @description The ID of the ShippingRate for this order. */ + readonly shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + readonly taxes?: readonly components['schemas']['line_items_tax_amount'][] + } /** PaymentPagesCheckoutSessionShippingOption */ readonly payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ @@ -10924,13 +13509,14 @@ export interface components { /** PaymentPagesCheckoutSessionTaxID */ readonly payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ readonly type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -10942,10 +13528,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -10965,6 +13553,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -10981,27 +13570,25 @@ export interface components { } /** PaymentPagesCheckoutSessionTotalDetails */ readonly payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ readonly amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ readonly amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ readonly amount_tax: number readonly breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] } /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ readonly payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ readonly discounts: readonly components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ readonly taxes: readonly components['schemas']['line_items_tax_amount'][] } /** Polymorphic */ readonly payment_source: | components['schemas']['account'] - | components['schemas']['alipay_account'] | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] | components['schemas']['card'] | components['schemas']['source'] /** @@ -11132,6 +13719,8 @@ export interface components { readonly id: string /** @description Whether the person's `id_number` was provided. */ readonly id_number_provided?: boolean + /** @description Whether the person's `id_number_secondary` was provided. */ + readonly id_number_secondary_provided?: boolean /** @description The person's last name. */ readonly last_name?: string | null /** @description The Kana variation of the person's last name (Japan only). */ @@ -11156,6 +13745,7 @@ export interface components { * @enum {string} */ readonly political_exposure?: 'existing' | 'none' + readonly registered_address?: components['schemas']['address'] readonly relationship?: components['schemas']['person_relationship'] readonly requirements?: components['schemas']['person_requirements'] | null /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ @@ -11324,9 +13914,9 @@ export interface components { /** @description The messaging shown to customers in the portal. */ readonly headline?: string | null /** @description A link to the business’s publicly available privacy policy. */ - readonly privacy_policy_url: string + readonly privacy_policy_url?: string | null /** @description A link to the business’s publicly available terms of service. */ - readonly terms_of_service_url: string + readonly terms_of_service_url?: string | null } /** PortalCustomerUpdate */ readonly portal_customer_update: { @@ -11349,6 +13939,17 @@ export interface components { /** @description Whether the feature is enabled. */ readonly enabled: boolean } + /** PortalLoginPage */ + readonly portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + readonly enabled: boolean + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + readonly url?: string | null + } /** PortalPaymentMethodUpdate */ readonly portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -11436,6 +14037,10 @@ export interface components { readonly created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { readonly [key: string]: components['schemas']['currency_option'] } + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + readonly custom_unit_amount?: components['schemas']['custom_unit_amount'] | null /** @description Unique identifier for the object. */ readonly id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -11520,6 +14125,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + readonly default_price?: (string | components['schemas']['price']) | null /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ readonly description?: string | null /** @description Unique identifier for the object. */ @@ -11530,7 +14137,7 @@ export interface components { readonly livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ readonly metadata: { readonly [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ readonly name: string /** * @description String representing the object's type. Objects of the same type share the same value. @@ -11543,7 +14150,7 @@ export interface components { readonly shippable?: boolean | null /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ readonly statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ readonly tax_code?: (string | components['schemas']['tax_code']) | null /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ readonly unit_label?: string | null @@ -11557,7 +14164,7 @@ export interface components { } /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ readonly promotion_code: { @@ -11595,8 +14202,15 @@ export interface components { /** @description Number of times this promotion code has been used. */ readonly times_redeemed: number } + /** PromotionCodeCurrencyOption */ + readonly promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + readonly minimum_amount: number + } /** PromotionCodesResourceRestrictions */ readonly promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { readonly [key: string]: components['schemas']['promotion_code_currency_option'] } /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ readonly first_time_transaction: boolean /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -11614,6 +14228,8 @@ export interface components { readonly amount_subtotal: number /** @description Total after discounts and taxes are applied. */ readonly amount_total: number + /** @description ID of the Connect Application that created the quote. */ + readonly application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ readonly application_fee_amount?: number | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -11698,6 +14314,8 @@ export interface components { readonly subscription_data: components['schemas']['quotes_resource_subscription_data'] /** @description The subscription schedule that was created or updated from this quote. */ readonly subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null + /** @description ID of the test clock this quote belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null readonly total_details: components['schemas']['quotes_resource_total_details'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ readonly transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null @@ -11760,6 +14378,8 @@ export interface components { } /** QuotesResourceSubscriptionData */ readonly quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + readonly description?: string | null /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -11770,19 +14390,19 @@ export interface components { } /** QuotesResourceTotalDetails */ readonly quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ readonly amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ readonly amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ readonly amount_tax: number readonly breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] } /** QuotesResourceTotalDetailsResourceBreakdown */ readonly quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ readonly discounts: readonly components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ readonly taxes: readonly components['schemas']['line_items_tax_amount'][] } /** QuotesResourceTransferData */ @@ -11930,6 +14550,14 @@ export interface components { /** @description The identifier of the value list this item belongs to. */ readonly value_list: string } + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + readonly radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + readonly session?: string + } /** RadarReviewResourceLocation */ readonly radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -11954,63 +14582,15 @@ export interface components { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ readonly version?: string | null } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - readonly recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - readonly active_account?: components['schemas']['bank_account'] | null - /** CardList */ - readonly cards?: { - readonly data: readonly components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - readonly created: number - /** @description The default card to use for creating transfers to this recipient. */ - readonly default_card?: (string | components['schemas']['card']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string | null - readonly email?: string | null - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + readonly received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ readonly id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - readonly livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - readonly metadata: { readonly [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - readonly migrated_to?: (string | components['schemas']['account']) | null - /** @description Full, legal name of the recipient. */ - readonly name?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - readonly object: 'recipient' - readonly rolled_back_from?: string | components['schemas']['account'] - /** @description Type of the recipient, one of `individual` or `corporation`. */ - readonly type: string + readonly network: 'stripe' } /** Recurring */ readonly recurring: { @@ -12062,8 +14642,11 @@ export interface components { readonly failure_reason?: string /** @description Unique identifier for the object. */ readonly id: string + /** @description Email to which refund instructions, if required, are sent to. */ + readonly instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ readonly metadata?: { readonly [key: string]: string } | null + readonly next_action?: components['schemas']['refund_next_action'] /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12080,11 +14663,27 @@ export interface components { readonly receipt_number?: string | null /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ readonly source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ readonly status?: string | null /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ readonly transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null } + /** RefundNextAction */ + readonly refund_next_action: { + /** @description Contains the refund details. */ + readonly display_details?: components['schemas']['refund_next_action_display_details'] | null + /** @description Type of the next action to perform. */ + readonly type: string + } + /** RefundNextActionDisplayDetails */ + readonly refund_next_action_display_details: { + readonly email_sent: components['schemas']['email_sent'] + /** + * Format: unix-time + * @description The expiry timestamp. + */ + readonly expires_at: number + } /** * reporting_report_run * @description The Report Run object represents an instance of a report type generated with @@ -12300,6 +14899,16 @@ export interface components { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ readonly enabled: boolean } + /** SecretServiceResourceScope */ + readonly secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + readonly type: 'account' | 'user' + /** @description The user ID, if type is set to "user" */ + readonly user?: string + } /** sepa_debit_generated_from */ readonly sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ @@ -12317,6 +14926,12 @@ export interface components { readonly setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ readonly application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + readonly attach_to_self?: boolean /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12324,6 +14939,12 @@ export interface components { readonly created: number /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ readonly customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + readonly flow_directions?: readonly ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ readonly id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12353,14 +14974,17 @@ export interface components { readonly au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] readonly bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] readonly bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + readonly blik?: components['schemas']['setup_attempt_payment_method_details_blik'] readonly boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] readonly card?: components['schemas']['setup_attempt_payment_method_details_card'] readonly card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] readonly ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + readonly link?: components['schemas']['setup_attempt_payment_method_details_link'] readonly sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] readonly sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ readonly type: string + readonly us_bank_account?: components['schemas']['setup_attempt_payment_method_details_us_bank_account'] } /** setup_attempt_payment_method_details_acss_debit */ readonly setup_attempt_payment_method_details_acss_debit: { readonly [key: string]: unknown } @@ -12394,6 +15018,8 @@ export interface components { */ readonly verified_name?: string | null } + /** setup_attempt_payment_method_details_blik */ + readonly setup_attempt_payment_method_details_blik: { readonly [key: string]: unknown } /** setup_attempt_payment_method_details_boleto */ readonly setup_attempt_payment_method_details_boleto: { readonly [key: string]: unknown } /** setup_attempt_payment_method_details_card */ @@ -12462,6 +15088,8 @@ export interface components { */ readonly verified_name?: string | null } + /** setup_attempt_payment_method_details_link */ + readonly setup_attempt_payment_method_details_link: { readonly [key: string]: unknown } /** setup_attempt_payment_method_details_sepa_debit */ readonly setup_attempt_payment_method_details_sepa_debit: { readonly [key: string]: unknown } /** setup_attempt_payment_method_details_sofort */ @@ -12490,6 +15118,8 @@ export interface components { */ readonly verified_name?: string | null } + /** setup_attempt_payment_method_details_us_bank_account */ + readonly setup_attempt_payment_method_details_us_bank_account: { readonly [key: string]: unknown } /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -12518,6 +15148,12 @@ export interface components { readonly setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ readonly application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + readonly attach_to_self?: boolean /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -12526,7 +15162,7 @@ export interface components { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. */ readonly client_secret?: string | null /** @@ -12542,6 +15178,12 @@ export interface components { readonly customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + readonly flow_directions?: readonly ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ readonly id: string /** @description The error encountered in the previous SetupIntent confirmation. */ @@ -12608,12 +15250,30 @@ export interface components { readonly arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ readonly hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + readonly microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** SetupIntentPaymentMethodOptions */ readonly setup_intent_payment_method_options: { - readonly acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + readonly acss_debit?: + | components['schemas']['setup_intent_payment_method_options_acss_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + readonly blik?: + | components['schemas']['setup_intent_payment_method_options_blik'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] readonly card?: components['schemas']['setup_intent_payment_method_options_card'] - readonly sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + readonly link?: + | components['schemas']['setup_intent_payment_method_options_link'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + readonly sepa_debit?: + | components['schemas']['setup_intent_payment_method_options_sepa_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + readonly us_bank_account?: + | components['schemas']['setup_intent_payment_method_options_us_bank_account'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] } /** setup_intent_payment_method_options_acss_debit */ readonly setup_intent_payment_method_options_acss_debit: { @@ -12629,14 +15289,67 @@ export interface components { */ readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** setup_intent_payment_method_options_blik */ + readonly setup_intent_payment_method_options_blik: { + readonly mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_blik'] + } /** setup_intent_payment_method_options_card */ readonly setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + readonly mandate_options?: components['schemas']['setup_intent_payment_method_options_card_mandate_options'] | null + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + readonly network?: + | ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') + | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ readonly request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null } + /** setup_intent_payment_method_options_card_mandate_options */ + readonly setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + readonly amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + readonly amount_type: 'fixed' | 'maximum' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + readonly description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + readonly end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + readonly interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + readonly reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + readonly start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + readonly supported_types?: readonly 'india'[] | null + } + /** setup_intent_payment_method_options_link */ + readonly setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + readonly persistent_token?: string | null + } /** setup_intent_payment_method_options_mandate_options_acss_debit */ readonly setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -12656,41 +15369,60 @@ export interface components { */ readonly transaction_type?: ('business' | 'personal') | null } + /** setup_intent_payment_method_options_mandate_options_blik */ + readonly setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + readonly expires_after?: number | null + readonly off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + readonly type?: ('off_session' | 'on_session') | null + } /** setup_intent_payment_method_options_mandate_options_sepa_debit */ readonly setup_intent_payment_method_options_mandate_options_sepa_debit: { readonly [key: string]: unknown } /** setup_intent_payment_method_options_sepa_debit */ readonly setup_intent_payment_method_options_sepa_debit: { readonly mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] } + /** setup_intent_payment_method_options_us_bank_account */ + readonly setup_intent_payment_method_options_us_bank_account: { + readonly financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + readonly setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } /** Shipping */ readonly shipping: { readonly address?: components['schemas']['address'] /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ readonly carrier?: string | null /** @description Recipient name. */ - readonly name?: string | null + readonly name?: string /** @description Recipient phone (including extension). */ readonly phone?: string | null /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ readonly tracking_number?: string | null } - /** ShippingMethod */ - readonly shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - readonly amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - readonly delivery_estimate?: components['schemas']['delivery_estimate'] | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description: string - /** @description Unique identifier for the object. */ - readonly id: string - } /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ readonly shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -12721,7 +15453,7 @@ export interface components { * @enum {string|null} */ readonly tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ readonly tax_code?: (string | components['schemas']['tax_code']) | null /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -12729,6 +15461,16 @@ export interface components { */ readonly type: 'fixed_amount' } + /** ShippingRateCurrencyOption */ + readonly shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + readonly amount: number + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + readonly tax_behavior: 'exclusive' | 'inclusive' | 'unspecified' + } /** ShippingRateDeliveryEstimate */ readonly shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ @@ -12752,6 +15494,8 @@ export interface components { readonly amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { readonly [key: string]: components['schemas']['shipping_rate_currency_option'] } } /** SigmaScheduledQueryRunError */ readonly sigma_scheduled_query_run_error: { @@ -12766,8 +15510,6 @@ export interface components { * 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). */ readonly sku: { /** @description Whether the SKU is available for purchase. */ @@ -13342,29 +16084,6 @@ export interface components { readonly qr_code_url?: string | null readonly statement_descriptor?: string } - /** StatusTransitions */ - readonly status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - readonly canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - readonly fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - readonly paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - readonly returned?: number | null - } /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -13372,12 +16091,14 @@ export interface components { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ readonly subscription: { + /** @description ID of the Connect Application that created the subscription. */ + readonly application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ readonly application_fee_percent?: number | null readonly automatic_tax: components['schemas']['subscription_automatic_tax'] /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ readonly billing_cycle_anchor: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ @@ -13404,6 +16125,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -13422,17 +16145,12 @@ export interface components { readonly default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ readonly default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) + | (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ readonly default_tax_rates?: readonly components['schemas']['tax_rate'][] | null + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + readonly description?: string | null /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ readonly discount?: components['schemas']['discount'] | null /** @@ -13505,6 +16223,8 @@ export interface components { * @enum {string} */ readonly status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description ID of the test clock this subscription belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ readonly transfer_data?: components['schemas']['subscription_transfer_data'] | null /** @@ -13565,6 +16285,13 @@ export interface components { /** subscription_payment_method_options_card */ readonly subscription_payment_method_options_card: { readonly mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + readonly network?: + | ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') + | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -13588,6 +16315,8 @@ export interface components { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ readonly subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + readonly application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -13640,6 +16369,8 @@ export interface components { readonly status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' /** @description ID of the subscription managed by the subscription schedule. */ readonly subscription?: (string | components['schemas']['subscription']) | null + /** @description ID of the test clock this subscription schedule belongs to. */ + readonly test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** * SubscriptionScheduleAddInvoiceItem @@ -13685,7 +16416,7 @@ export interface components { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ readonly subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ readonly add_invoice_items: readonly components['schemas']['subscription_schedule_add_invoice_item'][] /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ readonly application_fee_percent?: number | null @@ -13704,10 +16435,14 @@ export interface components { readonly collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the coupon to use during this phase of the subscription schedule. */ readonly coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ readonly default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ readonly default_tax_rates?: readonly components['schemas']['tax_rate'][] | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + readonly description?: string | null /** * Format: unix-time * @description The end of this phase of the subscription schedule. @@ -13717,6 +16452,8 @@ export interface components { readonly invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ readonly items: readonly components['schemas']['subscription_schedule_configuration_item'][] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | null /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -13754,6 +16491,8 @@ export interface components { readonly collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ readonly default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + readonly description?: string | null /** @description The subscription schedule's default invoice settings. */ readonly invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -13796,6 +16535,12 @@ export interface components { readonly bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ readonly card?: components['schemas']['subscription_payment_method_options_card'] | null + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + readonly customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + readonly konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + readonly us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** SubscriptionsResourcePaymentSettings */ readonly subscriptions_resource_payment_settings: { @@ -13812,15 +16557,26 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + readonly save_default_payment_method?: ('off' | 'on_subscription') | null } /** * SubscriptionsResourcePendingUpdate @@ -13830,7 +16586,7 @@ export interface components { readonly subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ readonly billing_cycle_anchor?: number | null /** @@ -13850,7 +16606,7 @@ export interface components { } /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ readonly tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -13914,13 +16670,14 @@ export interface components { */ readonly object: 'tax_id' /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ readonly type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -13932,10 +16689,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -13955,6 +16714,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -14023,6 +16783,26 @@ export interface components { */ readonly tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null } + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + readonly 'terminal.configuration': { + readonly bbpos_wisepos_e?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Whether this Configuration is the default for your account */ + readonly is_account_default?: boolean | null + /** @description 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 + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'terminal.configuration' + readonly tipping?: components['schemas']['terminal_configuration_configuration_resource_tipping'] + readonly verifone_p400?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + } /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14048,6 +16828,8 @@ export interface components { */ readonly 'terminal.location': { readonly address: components['schemas']['address'] + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + readonly configuration_overrides?: string /** @description The display name of the location. */ readonly display_name: string /** @description Unique identifier for the object. */ @@ -14069,13 +16851,15 @@ export interface components { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ readonly 'terminal.reader': { + /** @description The most recent action performed by the reader. */ + readonly action?: components['schemas']['terminal_reader_reader_resource_reader_action'] | null /** @description The current software version of the reader. */ readonly device_sw_version?: string | null /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - readonly device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + readonly device_type: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | 'verifone_P400' /** @description Unique identifier for the object. */ readonly id: string /** @description The local IP address of the reader. */ @@ -14098,38 +16882,164 @@ export interface components { /** @description The networking status of the reader. */ readonly status?: string | null } + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + readonly terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + readonly fixed_amounts?: readonly number[] | null + /** @description Percentages displayed when collecting a tip */ + readonly percentages?: readonly number[] | null + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + readonly smart_tip_threshold?: number + } + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + readonly terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + readonly splashscreen?: string | components['schemas']['file'] + } + /** TerminalConfigurationConfigurationResourceTipping */ + readonly terminal_configuration_configuration_resource_tipping: { + readonly aud?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly cad?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly chf?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly czk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly dkk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly eur?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly gbp?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly hkd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly myr?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly nok?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly nzd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly sek?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly sgd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + readonly usd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + } + /** + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader + */ + readonly terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description List of line items in the cart. */ + readonly line_items: readonly components['schemas']['terminal_reader_reader_resource_line_item'][] + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + readonly tax?: number | null + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + readonly total: number + } /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader */ - readonly three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + readonly terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ readonly amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - readonly authenticated: boolean - readonly card: components['schemas']['card'] + /** @description Description of the line item. */ + readonly description: string + /** @description The quantity of the line item. */ + readonly quantity: number + } + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + readonly terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + readonly skip_tipping?: boolean + } + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + readonly terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + readonly payment_intent: string | components['schemas']['payment_intent'] + readonly process_config?: components['schemas']['terminal_reader_reader_resource_process_config'] + } + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + readonly terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + readonly generated_card?: string + /** @description Most recent SetupIntent processed by the reader. */ + readonly setup_intent: string | components['schemas']['setup_intent'] + } + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + readonly terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + readonly failure_code?: string | null + /** @description Detailed failure message, only set if status is `failed`. */ + readonly failure_message?: string | null + readonly process_payment_intent?: components['schemas']['terminal_reader_reader_resource_process_payment_intent_action'] + readonly process_setup_intent?: components['schemas']['terminal_reader_reader_resource_process_setup_intent_action'] + readonly set_reader_display?: components['schemas']['terminal_reader_reader_resource_set_reader_display_action'] + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + readonly status: 'failed' | 'in_progress' | 'succeeded' + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + readonly type: 'process_payment_intent' | 'process_setup_intent' | 'set_reader_display' + } + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + readonly terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + readonly cart?: components['schemas']['terminal_reader_reader_resource_cart'] | null + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + readonly type: 'cart' + } + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + readonly 'test_helpers.test_clock': { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ readonly created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + readonly deletes_after: number + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + readonly frozen_time: number /** @description Unique identifier for the object. */ readonly id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ readonly livemode: boolean + /** @description The custom name supplied at creation. */ + readonly name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - readonly object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - readonly redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - readonly status: string + readonly object: 'test_helpers.test_clock' + /** + * @description The status of the Test Clock. + * @enum {string} + */ + readonly status: 'advancing' | 'internal_failure' | 'ready' } /** three_d_secure_details */ readonly three_d_secure_details: { @@ -14143,7 +17053,7 @@ export interface components { * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - readonly result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + readonly result?: ('attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error') | null /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. @@ -14251,7 +17161,8 @@ export interface components { * @enum {string} */ readonly object: 'topup' - readonly source: components['schemas']['source'] + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + readonly source?: components['schemas']['source'] | null /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ readonly statement_descriptor?: string | null /** @@ -14328,7 +17239,7 @@ export interface components { /** @description 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?: (string | components['schemas']['charge']) | null /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - readonly source_type?: string | null + readonly source_type?: string /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ readonly transfer_group?: string | null } @@ -14418,6 +17329,1068 @@ export interface components { */ readonly round: 'down' | 'up' } + /** + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ + readonly 'treasury.credit_reversal': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description The FinancialAccount to reverse funds from. */ + readonly financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + readonly metadata: { readonly [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + readonly network: 'ach' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.credit_reversal' + /** @description The ReceivedCredit being reversed. */ + readonly received_credit: string + /** + * @description Status of the CreditReversal + * @enum {string} + */ + readonly status: 'canceled' | 'posted' | 'processing' + readonly status_transitions: components['schemas']['treasury_received_credits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + readonly transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + readonly 'treasury.debit_reversal': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description The FinancialAccount to reverse funds from. */ + readonly financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Other flows linked to a DebitReversal. */ + readonly linked_flows?: components['schemas']['treasury_received_debits_resource_debit_reversal_linked_flows'] | null + /** @description 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 + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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 } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + readonly network: 'ach' | 'card' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.debit_reversal' + /** @description The ReceivedDebit being reversed. */ + readonly received_debit: string + /** + * @description Status of the DebitReversal + * @enum {string} + */ + readonly status: 'failed' | 'processing' | 'succeeded' + readonly status_transitions: components['schemas']['treasury_received_debits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + readonly transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + readonly 'treasury.financial_account': { + /** @description The array of paths to active Features in the Features hash. */ + readonly active_features?: readonly ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + readonly balance: components['schemas']['treasury_financial_accounts_resource_balance'] + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + readonly country: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + readonly features?: components['schemas']['treasury.financial_account_features'] + /** @description The set of credentials that resolve to a FinancialAccount. */ + readonly financial_addresses: readonly components['schemas']['treasury_financial_accounts_resource_financial_address'][] + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + readonly metadata?: { readonly [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.financial_account' + /** @description The array of paths to pending Features in the Features hash. */ + readonly pending_features?: readonly ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + readonly platform_restrictions?: components['schemas']['treasury_financial_accounts_resource_platform_restrictions'] | null + /** @description The array of paths to restricted Features in the Features hash. */ + readonly restricted_features?: readonly ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + readonly status: 'closed' | 'open' + readonly status_details: components['schemas']['treasury_financial_accounts_resource_status_details'] + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + readonly supported_currencies: readonly string[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + readonly 'treasury.financial_account_features': { + readonly card_issuing?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + readonly deposit_insurance?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + readonly financial_addresses?: components['schemas']['treasury_financial_accounts_resource_financial_addresses_features'] + readonly inbound_transfers?: components['schemas']['treasury_financial_accounts_resource_inbound_transfers'] + readonly intra_stripe_flows?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.financial_account_features' + readonly outbound_payments?: components['schemas']['treasury_financial_accounts_resource_outbound_payments'] + readonly outbound_transfers?: components['schemas']['treasury_financial_accounts_resource_outbound_transfers'] + } + /** + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + */ + readonly 'treasury.inbound_transfer': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + readonly cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string | null + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + readonly failure_details?: components['schemas']['treasury_inbound_transfers_resource_failure_details'] | null + /** @description The FinancialAccount that received the funds. */ + readonly financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + readonly linked_flows: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows'] + /** @description 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 + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) 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 } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.inbound_transfer' + /** @description The origin payment method to be debited for an InboundTransfer. */ + readonly origin_payment_method: string + /** @description Details about the PaymentMethod for an InboundTransfer. */ + readonly origin_payment_method_details?: components['schemas']['inbound_transfers'] | null + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + readonly returned?: boolean | null + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + readonly statement_descriptor: string + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + readonly status: 'canceled' | 'failed' | 'processing' | 'succeeded' + readonly status_transitions: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + readonly transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + readonly 'treasury.outbound_payment': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + readonly cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + readonly customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string | null + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + readonly destination_payment_method?: string | null + /** @description Details about the PaymentMethod for an OutboundPayment. */ + readonly destination_payment_method_details?: components['schemas']['outbound_payments_payment_method_details'] | null + /** @description Details about the end user. */ + readonly end_user_details?: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_end_user_details'] | null + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + readonly expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + readonly financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + readonly metadata: { readonly [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.outbound_payment' + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + readonly returned_details?: components['schemas']['treasury_outbound_payments_resource_returned_status'] | null + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + readonly statement_descriptor: string + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + readonly status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + readonly status_transitions: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + readonly transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + readonly 'treasury.outbound_transfer': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + readonly cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string | null + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + readonly destination_payment_method?: string | null + readonly destination_payment_method_details: components['schemas']['outbound_transfers_payment_method_details'] + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + readonly expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + readonly financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + readonly metadata: { readonly [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.outbound_transfer' + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + readonly returned_details?: components['schemas']['treasury_outbound_transfers_resource_returned_details'] | null + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + readonly statement_descriptor: string + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + readonly status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + readonly status_transitions: components['schemas']['treasury_outbound_transfers_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + readonly transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + readonly 'treasury.received_credit': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description: string + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + readonly failure_code?: ('account_closed' | 'account_frozen' | 'other') | null + /** @description The FinancialAccount that received the funds. */ + readonly financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + readonly initiating_payment_method_details: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + readonly linked_flows: components['schemas']['treasury_received_credits_resource_linked_flows'] + /** @description 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 + /** + * @description The rails used to send the funds. + * @enum {string} + */ + readonly network: 'ach' | 'card' | 'stripe' | 'us_domestic_wire' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.received_credit' + /** @description Details describing when a ReceivedCredit may be reversed. */ + readonly reversal_details?: components['schemas']['treasury_received_credits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + readonly status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + readonly transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + readonly 'treasury.received_debit': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description: string + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + readonly failure_code?: ('account_closed' | 'account_frozen' | 'insufficient_funds' | 'other') | null + /** @description The FinancialAccount that funds were pulled from. */ + readonly financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + readonly hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + readonly id: string + readonly initiating_payment_method_details?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + readonly linked_flows: components['schemas']['treasury_received_debits_resource_linked_flows'] + /** @description 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 + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + readonly network: 'ach' | 'card' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.received_debit' + /** @description Details describing when a ReceivedDebit might be reversed. */ + readonly reversal_details?: components['schemas']['treasury_received_debits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + readonly status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + readonly transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + readonly 'treasury.transaction': { + /** @description Amount (in cents) transferred. */ + readonly amount: number + readonly balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description: string + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + readonly entries?: { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } | null + /** @description The FinancialAccount associated with this object. */ + readonly financial_account: string + /** @description ID of the flow that created the Transaction. */ + readonly flow?: string | null + /** @description Details of the flow that created the Transaction. */ + readonly flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + readonly flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.transaction' + /** + * @description Status of the Transaction. + * @enum {string} + */ + readonly status: 'open' | 'posted' | 'void' + readonly status_transitions: components['schemas']['treasury_transactions_resource_abstract_transaction_resource_status_transitions'] + } + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + readonly 'treasury.transaction_entry': { + readonly balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + readonly created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + readonly effective_at: number + /** @description The FinancialAccount associated with this object. */ + readonly financial_account: string + /** @description Token of the flow associated with the TransactionEntry. */ + readonly flow?: string | null + /** @description Details of the flow associated with the TransactionEntry. */ + readonly flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + readonly flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + readonly id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + readonly livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'treasury.transaction_entry' + /** @description The Transaction associated with this object. */ + readonly transaction: string | components['schemas']['treasury.transaction'] + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + readonly type: + | 'credit_reversal' + | 'credit_reversal_posting' + | 'debit_reversal' + | 'inbound_transfer' + | 'inbound_transfer_return' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'other' + | 'outbound_payment' + | 'outbound_payment_cancellation' + | 'outbound_payment_failure' + | 'outbound_payment_posting' + | 'outbound_payment_return' + | 'outbound_transfer' + | 'outbound_transfer_cancellation' + | 'outbound_transfer_failure' + | 'outbound_transfer_posting' + | 'outbound_transfer_return' + | 'received_credit' + | 'received_debit' + } + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + readonly treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + readonly account_holder_name: string + /** @description The account number. */ + readonly account_number?: string | null + /** @description The last four characters of the account number. */ + readonly account_number_last4: string + /** @description Name of the bank. */ + readonly bank_name: string + /** @description Routing number for the account. */ + readonly routing_number: string + } + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + readonly treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + readonly cash: { readonly [key: string]: number } + /** @description Funds not spendable yet, but will become available at a later time. */ + readonly inbound_pending: { readonly [key: string]: number } + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + readonly outbound_pending: { readonly [key: string]: number } + } + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + readonly treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + readonly reasons: readonly ('account_rejected' | 'closed_by_platform' | 'other')[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + readonly treasury_financial_accounts_resource_financial_address: { + readonly aba?: components['schemas']['treasury_financial_accounts_resource_aba_record'] + /** @description The list of networks that the address supports */ + readonly supported_networks?: readonly ('ach' | 'us_domestic_wire')[] + /** + * @description The type of financial address + * @enum {string} + */ + readonly type: 'aba' + } + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + readonly treasury_financial_accounts_resource_financial_addresses_features: { + readonly aba?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + readonly treasury_financial_accounts_resource_inbound_transfers: { + readonly ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + readonly treasury_financial_accounts_resource_outbound_payments: { + readonly ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + readonly us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + readonly treasury_financial_accounts_resource_outbound_transfers: { + readonly ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + readonly us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + readonly treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + readonly inbound_flows?: ('restricted' | 'unrestricted') | null + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + readonly outbound_flows?: ('restricted' | 'unrestricted') | null + } + /** TreasuryFinancialAccountsResourceStatusDetails */ + readonly treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + readonly closed?: components['schemas']['treasury_financial_accounts_resource_closed_status_details'] | null + } + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + readonly treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + readonly requested: boolean + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + readonly status: 'active' | 'pending' | 'restricted' + /** @description Additional details; includes at least one entry when the status is not `active`. */ + readonly status_details: readonly components['schemas']['treasury_financial_accounts_resource_toggles_setting_status_details'][] + } + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + readonly treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + readonly code: + | 'activating' + | 'capability_not_requested' + | 'financial_account_closed' + | 'rejected_other' + | 'rejected_unsupported_business' + | 'requirements_past_due' + | 'requirements_pending_verification' + | 'restricted_by_platform' + | 'restricted_other' + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + readonly resolution?: ('contact_stripe' | 'provide_information' | 'remove_restriction') | null + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + readonly restriction?: 'inbound_flows' | 'outbound_flows' + } + /** TreasuryInboundTransfersResourceFailureDetails */ + readonly treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + readonly code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + readonly treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + readonly received_debit?: string | null + } + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + readonly treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + readonly canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + readonly failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + readonly succeeded_at?: number | null + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + readonly treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + readonly ip_address?: string | null + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + readonly present: boolean + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + readonly treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + readonly canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + readonly failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + readonly posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + readonly returned_at?: number | null + } + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + readonly treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + readonly code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + readonly transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceReturnedDetails */ + readonly treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + readonly code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + readonly transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceStatusTransitions */ + readonly treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + readonly canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + readonly failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + readonly posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + readonly returned_at?: number | null + } + /** TreasuryReceivedCreditsResourceLinkedFlows */ + readonly treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + readonly credit_reversal?: string | null + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + readonly issuing_authorization?: string | null + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + readonly issuing_transaction?: string | null + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + readonly source_flow?: string | null + /** @description The expandable object of the source flow. */ + readonly source_flow_details?: components['schemas']['treasury_received_credits_resource_source_flows_details'] | null + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + readonly source_flow_type?: string | null + } + /** TreasuryReceivedCreditsResourceReversalDetails */ + readonly treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + readonly deadline?: number | null + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + readonly restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + readonly treasury_received_credits_resource_source_flows_details: { + readonly credit_reversal?: components['schemas']['treasury.credit_reversal'] + readonly outbound_payment?: components['schemas']['treasury.outbound_payment'] + readonly payout?: components['schemas']['payout'] + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + readonly type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } + /** TreasuryReceivedCreditsResourceStatusTransitions */ + readonly treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + readonly posted_at?: number | null + } + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + readonly treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + readonly issuing_dispute?: string | null + } + /** TreasuryReceivedDebitsResourceLinkedFlows */ + readonly treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + readonly debit_reversal?: string | null + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + readonly inbound_transfer?: string | null + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + readonly issuing_authorization?: string | null + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + readonly issuing_transaction?: string | null + } + /** TreasuryReceivedDebitsResourceReversalDetails */ + readonly treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + readonly deadline?: number | null + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + readonly restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedDebitsResourceStatusTransitions */ + readonly treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + readonly completed_at?: number | null + } + /** TreasurySharedResourceBillingDetails */ + readonly treasury_shared_resource_billing_details: { + readonly address: components['schemas']['address'] + /** @description Email address. */ + readonly email?: string | null + /** @description Full name. */ + readonly name?: string | null + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + readonly treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + readonly balance?: 'payments' + readonly billing_details: components['schemas']['treasury_shared_resource_billing_details'] + readonly financial_account?: components['schemas']['received_payment_method_details_financial_account'] + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + readonly issuing_card?: string + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + readonly type: 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account' + readonly us_bank_account?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_us_bank_account'] + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + readonly treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + readonly bank_name?: string | null + /** @description The last four digits of the bank account number. */ + readonly last4?: string | null + /** @description The routing number for the bank account. */ + readonly routing_number?: string | null + } + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + readonly treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + readonly posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + readonly void_at?: number | null + } + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + readonly treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + readonly cash: number + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + readonly inbound_pending: number + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + readonly outbound_pending: number + } + /** TreasuryTransactionsResourceFlowDetails */ + readonly treasury_transactions_resource_flow_details: { + readonly credit_reversal?: components['schemas']['treasury.credit_reversal'] + readonly debit_reversal?: components['schemas']['treasury.debit_reversal'] + readonly inbound_transfer?: components['schemas']['treasury.inbound_transfer'] + readonly issuing_authorization?: components['schemas']['issuing.authorization'] + readonly outbound_payment?: components['schemas']['treasury.outbound_payment'] + readonly outbound_transfer?: components['schemas']['treasury.outbound_transfer'] + readonly received_credit?: components['schemas']['treasury.received_credit'] + readonly received_debit?: components['schemas']['treasury.received_debit'] + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + readonly type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + } + /** us_bank_account_networks */ + readonly us_bank_account_networks: { + /** @description The preferred network. */ + readonly preferred?: string | null + /** @description All supported networks. */ + readonly supported: readonly ('ach' | 'us_domestic_wire')[] + } /** * UsageRecord * @description Usage records allow you to report customer usage and metrics to Stripe for @@ -14518,13 +18491,19 @@ export interface components { } export interface operations { - /**

Initiate 3D Secure authentication.

*/ - readonly Post3dSecure: { + /**

Retrieves the details of an account.

*/ + readonly GetAccount: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['three_d_secure'] + readonly 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14536,79 +18515,7 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - readonly amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - readonly card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description The customer associated with this 3D secure authentication. */ - readonly customer?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - readonly return_url: string - } - } - } - } - /**

Retrieves a 3D Secure object.

*/ - readonly Get3dSecureThreeDSecure: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly three_d_secure: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - readonly GetAccount: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } @@ -14690,6 +18597,10 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly affirm_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly afterpay_clearpay_payments?: { readonly requested?: boolean } @@ -14706,6 +18617,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly bank_transfer_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly blik_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly boleto_payments?: { readonly requested?: boolean } @@ -14750,10 +18669,18 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly konbini_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly legacy_payments?: { readonly requested?: boolean } /** capability_param */ + readonly link_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly oxxo_payments?: { readonly requested?: boolean } @@ -14762,6 +18689,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly paynow_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly promptpay_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly sepa_debit_payments?: { readonly requested?: boolean } @@ -14781,6 +18716,14 @@ export interface operations { readonly transfers?: { readonly requested?: boolean } + /** capability_param */ + readonly treasury?: { + readonly requested?: boolean + } + /** capability_param */ + readonly us_bank_account_ach_payments?: { + readonly requested?: boolean + } } /** * company_specs @@ -14906,7 +18849,7 @@ export interface operations { readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ readonly external_account?: string /** * individual_specs @@ -14956,6 +18899,7 @@ export interface operations { readonly full_name_aliases?: readonly string[] | '' readonly gender?: string readonly id_number?: string + readonly id_number_secondary?: string readonly last_name?: string readonly last_name_kana?: string readonly last_name_kanji?: string @@ -14964,6 +18908,15 @@ export interface operations { readonly phone?: string /** @enum {string} */ readonly political_exposure?: 'existing' | 'none' + /** address_specs */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } readonly ssn_last_4?: string /** person_verification_specs */ readonly verification?: { @@ -15011,6 +18964,8 @@ export interface operations { readonly cvc_failure?: boolean } readonly statement_descriptor_prefix?: string + readonly statement_descriptor_prefix_kana?: string | '' + readonly statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ readonly payments?: { @@ -15032,6 +18987,16 @@ export interface operations { } readonly statement_descriptor?: string } + /** treasury_settings_specs */ + readonly treasury?: { + /** settings_terms_of_service_specs */ + readonly tos_acceptance?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + } } /** * tos_acceptance_specs @@ -15598,8 +19563,6 @@ export interface operations { readonly account: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - readonly redirect_url?: string } } } @@ -15756,6 +19719,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15774,6 +19739,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -15944,6 +19921,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15962,6 +19941,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16175,6 +20166,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16193,6 +20186,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16363,6 +20368,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16381,6 +20388,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16613,6 +20632,10 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly affirm_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly afterpay_clearpay_payments?: { readonly requested?: boolean } @@ -16629,6 +20652,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly bank_transfer_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly blik_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly boleto_payments?: { readonly requested?: boolean } @@ -16673,10 +20704,18 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly konbini_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly legacy_payments?: { readonly requested?: boolean } /** capability_param */ + readonly link_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly oxxo_payments?: { readonly requested?: boolean } @@ -16685,6 +20724,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly paynow_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly promptpay_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly sepa_debit_payments?: { readonly requested?: boolean } @@ -16704,6 +20751,14 @@ export interface operations { readonly transfers?: { readonly requested?: boolean } + /** capability_param */ + readonly treasury?: { + readonly requested?: boolean + } + /** capability_param */ + readonly us_bank_account_ach_payments?: { + readonly requested?: boolean + } } /** * company_specs @@ -16789,7 +20844,7 @@ export interface operations { } } } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ readonly country?: string /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ readonly default_currency?: string @@ -16831,7 +20886,7 @@ export interface operations { readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ readonly external_account?: string /** * individual_specs @@ -16881,6 +20936,7 @@ export interface operations { readonly full_name_aliases?: readonly string[] | '' readonly gender?: string readonly id_number?: string + readonly id_number_secondary?: string readonly last_name?: string readonly last_name_kana?: string readonly last_name_kanji?: string @@ -16889,6 +20945,15 @@ export interface operations { readonly phone?: string /** @enum {string} */ readonly political_exposure?: 'existing' | 'none' + /** address_specs */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } readonly ssn_last_4?: string /** person_verification_specs */ readonly verification?: { @@ -16936,6 +21001,8 @@ export interface operations { readonly cvc_failure?: boolean } readonly statement_descriptor_prefix?: string + readonly statement_descriptor_prefix_kana?: string | '' + readonly statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ readonly payments?: { @@ -16957,6 +21024,16 @@ export interface operations { } readonly statement_descriptor?: string } + /** treasury_settings_specs */ + readonly treasury?: { + /** settings_terms_of_service_specs */ + readonly tos_acceptance?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17092,6 +21169,10 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly affirm_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly afterpay_clearpay_payments?: { readonly requested?: boolean } @@ -17108,6 +21189,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly bank_transfer_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly blik_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly boleto_payments?: { readonly requested?: boolean } @@ -17152,10 +21241,18 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly konbini_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly legacy_payments?: { readonly requested?: boolean } /** capability_param */ + readonly link_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly oxxo_payments?: { readonly requested?: boolean } @@ -17164,6 +21261,14 @@ export interface operations { readonly requested?: boolean } /** capability_param */ + readonly paynow_payments?: { + readonly requested?: boolean + } + /** capability_param */ + readonly promptpay_payments?: { + readonly requested?: boolean + } + /** capability_param */ readonly sepa_debit_payments?: { readonly requested?: boolean } @@ -17183,6 +21288,14 @@ export interface operations { readonly transfers?: { readonly requested?: boolean } + /** capability_param */ + readonly treasury?: { + readonly requested?: boolean + } + /** capability_param */ + readonly us_bank_account_ach_payments?: { + readonly requested?: boolean + } } /** * company_specs @@ -17308,7 +21421,7 @@ export interface operations { readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ readonly external_account?: string /** * individual_specs @@ -17358,6 +21471,7 @@ export interface operations { readonly full_name_aliases?: readonly string[] | '' readonly gender?: string readonly id_number?: string + readonly id_number_secondary?: string readonly last_name?: string readonly last_name_kana?: string readonly last_name_kanji?: string @@ -17366,6 +21480,15 @@ export interface operations { readonly phone?: string /** @enum {string} */ readonly political_exposure?: 'existing' | 'none' + /** address_specs */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } readonly ssn_last_4?: string /** person_verification_specs */ readonly verification?: { @@ -17413,6 +21536,8 @@ export interface operations { readonly cvc_failure?: boolean } readonly statement_descriptor_prefix?: string + readonly statement_descriptor_prefix_kana?: string | '' + readonly statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ readonly payments?: { @@ -17434,6 +21559,16 @@ export interface operations { } readonly statement_descriptor?: string } + /** treasury_settings_specs */ + readonly treasury?: { + /** settings_terms_of_service_specs */ + readonly tos_acceptance?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + } } /** * tos_acceptance_specs @@ -18031,8 +22166,6 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - readonly redirect_url?: string } } } @@ -18196,6 +22329,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18214,6 +22349,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18385,6 +22532,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18403,6 +22552,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18624,6 +22785,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18642,6 +22805,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18813,6 +22988,8 @@ export interface operations { readonly gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ readonly id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + readonly id_number_secondary?: string /** @description The person's last name. */ readonly last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18831,6 +23008,18 @@ export interface operations { readonly phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ readonly political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19328,7 +23517,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ readonly amount?: number /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] @@ -19338,6 +23527,172 @@ export interface operations { } } } + /**

List all secrets stored on the given scope.

*/ + readonly GetAppsSecrets: { + readonly parameters: { + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + readonly scope: { + /** @enum {string} */ + readonly type: 'account' | 'user' + readonly user?: 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['apps.secret'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Create or replace a secret in the secret store.

*/ + readonly PostAppsSecrets: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + readonly expires_at?: number + /** @description A name for the secret that's unique within the scope. */ + readonly name: string + /** @description The plaintext secret value to be stored. */ + readonly payload: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + readonly scope: { + /** @enum {string} */ + readonly type: 'account' | 'user' + readonly user?: string + } + } + } + } + } + /**

Deletes a secret from the secret store by name and scope.

*/ + readonly PostAppsSecretsDelete: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A name for the secret that's unique within the scope. */ + readonly name: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + readonly scope: { + /** @enum {string} */ + readonly type: 'account' | 'user' + readonly user?: string + } + } + } + } + } + /**

Finds a secret in the secret store by name and scope.

*/ + readonly GetAppsSecretsFind: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** A name for the secret that's unique within the scope. */ + readonly name: string + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + readonly scope: { + /** @enum {string} */ + readonly type: 'account' | 'user' + readonly user?: string + } + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } /** *

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.

@@ -19643,8 +23998,8 @@ export interface operations { */ readonly business_profile: { readonly headline?: string - readonly privacy_policy_url: string - readonly terms_of_service_url: string + readonly privacy_policy_url?: string + readonly terms_of_service_url?: string } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ readonly default_return_url?: string | '' @@ -19657,7 +24012,7 @@ export interface operations { readonly features: { /** customer_update_creation_param */ readonly customer_update?: { - readonly allowed_updates: readonly ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + readonly allowed_updates?: readonly ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' readonly enabled: boolean } /** invoice_list_param */ @@ -19710,6 +24065,13 @@ export interface operations { readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + readonly login_page?: { + readonly enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 } } @@ -19779,8 +24141,8 @@ export interface operations { */ readonly business_profile?: { readonly headline?: string - readonly privacy_policy_url?: string - readonly terms_of_service_url?: string + readonly privacy_policy_url?: string | '' + readonly terms_of_service_url?: string | '' } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ readonly default_return_url?: string | '' @@ -19846,6 +24208,13 @@ export interface operations { readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + readonly login_page?: { + readonly enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 } | '' } @@ -19937,188 +24306,6 @@ export interface operations { } } } - /**

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

*/ - readonly GetBitcoinReceivers: { - readonly parameters: { - readonly query: { - /** Filter for active receivers. */ - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** Filter for filled receivers. */ - readonly filled?: boolean - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** Filter for receivers with uncaptured funds. */ - readonly uncaptured_funds?: boolean - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['bitcoin_receiver'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - readonly GetBitcoinReceiversId: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly id: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - readonly GetBitcoinReceiversReceiverTransactions: { - readonly parameters: { - readonly query: { - /** Only return transactions 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } - readonly path: { - readonly receiver: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - readonly GetBitcoinTransactions: { - readonly parameters: { - readonly query: { - /** Only return transactions 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - readonly 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. */ - readonly starting_after?: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } /**

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

*/ readonly GetCharges: { readonly parameters: { @@ -20200,7 +24387,7 @@ export interface operations { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ readonly amount?: number readonly application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) 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). */ readonly application_fee_amount?: number /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ readonly capture?: boolean @@ -20241,6 +24428,13 @@ export interface operations { readonly metadata?: { readonly [key: string]: string } | '' /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ readonly on_behalf_of?: string + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + readonly radar_options?: { + readonly session?: string + } /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ readonly receipt_email?: string /** @@ -20282,6 +24476,57 @@ export interface operations { } } } + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetChargesSearch: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + readonly query: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['charge'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } /**

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.

*/ readonly GetChargesCharge: { readonly parameters: { @@ -20600,6 +24845,7 @@ export interface operations { readonly amount?: number /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + readonly instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' readonly payment_intent?: string @@ -20684,11 +24930,23 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ readonly amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description Customer whose customer balance to refund from. */ + readonly customer?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description Address to send refund email, use customer email if not specified */ + readonly instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + readonly origin?: 'customer_balance' readonly payment_intent?: string /** @enum {string} */ readonly reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' @@ -20766,6 +25024,12 @@ export interface operations { readonly GetCheckoutSessions: { readonly parameters: { readonly query: { + /** Only return the Checkout Sessions for the Customer specified. */ + readonly customer?: string + /** Only return the Checkout Sessions for the Customer details specified. */ + readonly customer_details?: { + 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -20869,8 +25133,12 @@ export interface operations { */ readonly consent_collection?: { /** @enum {string} */ - readonly promotions?: 'auto' + readonly promotions?: 'auto' | 'none' + /** @enum {string} */ + readonly terms_of_service?: 'none' | 'required' } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -20891,7 +25159,8 @@ export interface operations { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -20926,7 +25195,7 @@ export interface operations { readonly expand?: readonly string[] /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ readonly expires_at?: number /** @@ -20934,7 +25203,7 @@ export interface operations { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ readonly line_items?: readonly { /** adjustable_quantity_params */ @@ -20943,7 +25212,6 @@ export interface operations { readonly maximum?: number readonly minimum?: number } - readonly description?: string readonly dynamic_tax_rates?: readonly string[] readonly price?: string /** price_data_with_product_data */ @@ -21065,6 +25333,16 @@ export interface operations { } readonly transfer_group?: string } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + readonly payment_method_collection?: 'always' | 'if_required' /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -21085,26 +25363,168 @@ export interface operations { readonly transaction_type?: 'business' | 'personal' } /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_method_options_param */ + readonly affirm?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly afterpay_clearpay?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly alipay?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly au_becs_debit?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly bacs_debit?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + readonly bancontact?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ readonly boleto?: { readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + readonly card?: { + /** installments_param */ + readonly installments?: { + readonly enabled?: boolean + } + /** @enum {string} */ + readonly setup_future_usage?: 'off_session' | 'on_session' + readonly statement_descriptor_suffix_kana?: string + readonly statement_descriptor_suffix_kanji?: string + } + /** payment_method_options_param */ + readonly customer_balance?: { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + readonly funding_type?: 'bank_transfer' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly eps?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly fpx?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly giropay?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly grabpay?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly ideal?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly klarna?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly konbini?: { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' } /** payment_method_options_param */ readonly oxxo?: { readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly p24?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + readonly tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + readonly paynow?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + readonly tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + readonly pix?: { + readonly expires_after_seconds?: number + } + /** payment_method_options_param */ + readonly sepa_debit?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + readonly sofort?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly us_bank_account?: { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' } /** payment_method_options_param */ readonly wechat_pay?: { readonly app_id?: string /** @enum {string} */ readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' } } /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -21114,23 +25534,31 @@ export interface operations { */ readonly payment_method_types?: readonly ( | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] /** @@ -21422,6 +25850,13 @@ export interface operations { readonly fixed_amount?: { readonly amount: number readonly currency: string + readonly currency_options?: { + readonly [key: string]: { + readonly amount: number + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } readonly metadata?: { readonly [key: string]: string } /** @enum {string} */ @@ -21446,11 +25881,7 @@ export interface operations { readonly subscription_data?: { readonly application_fee_percent?: number readonly default_tax_rates?: readonly string[] - readonly items?: readonly { - readonly plan: string - readonly quantity?: number - readonly tax_rates?: readonly string[] - }[] + readonly description?: string readonly metadata?: { readonly [key: string]: string } /** transfer_data_specs */ readonly transfer_data?: { @@ -21757,6 +26188,12 @@ export interface operations { } /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ readonly currency?: string + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { + readonly [key: string]: { + readonly amount_off: number + } + } /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -21840,6 +26277,12 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { + readonly [key: string]: { + readonly amount_off: number + } + } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -21960,9 +26403,9 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ readonly amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ readonly credit_amount?: number /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] @@ -21985,7 +26428,7 @@ export interface operations { readonly memo?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ readonly out_of_band_amount?: number /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -21994,7 +26437,7 @@ export interface operations { readonly reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** @description ID of an existing refund to link this credit note to. */ readonly refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ readonly refund_amount?: number } } @@ -22004,9 +26447,9 @@ export interface operations { readonly GetCreditNotesPreview: { readonly parameters: { readonly query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ readonly 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ readonly credit_amount?: number /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] @@ -22029,13 +26472,13 @@ export interface operations { readonly memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ readonly out_of_band_amount?: number /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ readonly reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** ID of an existing refund to link this credit note to. */ readonly 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ readonly refund_amount?: number } } @@ -22063,9 +26506,9 @@ export interface operations { readonly GetCreditNotesPreviewLines: { readonly parameters: { readonly query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ readonly 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ readonly 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. */ readonly ending_before?: string @@ -22092,13 +26535,13 @@ export interface operations { readonly memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ readonly out_of_band_amount?: number /** Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` */ readonly reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** ID of an existing refund to link this credit note to. */ readonly 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ readonly 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. */ readonly starting_after?: string @@ -22302,6 +26745,8 @@ export interface operations { readonly limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + readonly test_clock?: string } } readonly responses: { @@ -22365,8 +26810,19 @@ export interface operations { readonly state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + readonly cash_balance?: { + /** balance_settings_param */ + readonly settings?: { + /** @enum {string} */ + readonly reconciliation_mode?: 'automatic' | 'manual' + } + } readonly coupon?: string /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ readonly description?: string @@ -22389,6 +26845,12 @@ export interface operations { | '' readonly default_payment_method?: string readonly footer?: string + readonly rendering_options?: + | { + /** @enum {string} */ + readonly amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' @@ -22439,6 +26901,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -22450,10 +26913,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -22473,6 +26938,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -22480,9 +26946,62 @@ export interface operations { | 'za_vat' readonly value: string }[] + /** @description ID of the test clock to attach to the customer. */ + readonly test_clock?: string + } + } + } + } + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetCustomersSearch: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + readonly query: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['customer'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] } } } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } } /**

Retrieves a Customer object.

*/ readonly GetCustomersCustomer: { @@ -22554,7 +27073,7 @@ export interface operations { readonly state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ readonly bank_account?: @@ -22589,6 +27108,17 @@ export interface operations { readonly object?: 'card' } | string + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + readonly cash_balance?: { + /** balance_settings_param */ + readonly settings?: { + /** @enum {string} */ + readonly reconciliation_mode?: 'automatic' | 'manual' + } + } readonly coupon?: string /** @description ID of Alipay account to make the customer's new default for invoice payments. */ readonly default_alipay_account?: string @@ -22625,6 +27155,12 @@ export interface operations { | '' readonly default_payment_method?: string readonly footer?: string + readonly rendering_options?: + | { + /** @enum {string} */ + readonly amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' @@ -22667,8 +27203,6 @@ export interface operations { * @enum {string} */ readonly tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - readonly trial_end?: 'now' | number } } } @@ -22773,7 +27307,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ readonly amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ readonly currency: string @@ -23410,7 +27944,8 @@ export interface operations { } } } - readonly GetCustomersCustomerDiscount: { + /**

Retrieves a customer’s cash balance.

*/ + readonly GetCustomersCustomerCashBalance: { readonly parameters: { readonly path: { readonly customer: string @@ -23424,7 +27959,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['discount'] + readonly 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23440,8 +27975,8 @@ export interface operations { } } } - /**

Removes the currently applied discount on a customer.

*/ - readonly DeleteCustomersCustomerDiscount: { + /**

Changes the settings on a customer’s cash balance.

*/ + readonly PostCustomersCustomerCashBalance: { readonly parameters: { readonly path: { readonly customer: string @@ -23451,7 +27986,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_discount'] + readonly 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23463,81 +27998,23 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - readonly GetCustomersCustomerPaymentMethods: { - readonly parameters: { - readonly path: { - readonly customer: string - } - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** A required filter on the list, based on the object `type` field. */ - readonly type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + readonly settings?: { + /** @enum {string} */ + readonly reconciliation_mode?: 'automatic' | 'manual' } } } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } } } - /**

List sources for a specified customer.

*/ - readonly GetCustomersCustomerSources: { + /**

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

*/ + readonly GetCustomersCustomerCashBalanceTransactions: { readonly parameters: { readonly path: { readonly customer: string @@ -23549,8 +28026,6 @@ export interface operations { readonly expand?: readonly string[] /** 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 - /** Filter sources according to a particular object type. */ - readonly 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. */ readonly starting_after?: string } @@ -23561,13 +28036,311 @@ export interface operations { readonly content: { readonly 'application/json': { /** @description Details about each object. */ - readonly data: readonly ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + readonly data: readonly components['schemas']['customer_cash_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + readonly GetCustomersCustomerCashBalanceTransactionsTransaction: { + readonly parameters: { + readonly path: { + readonly customer: string + readonly transaction: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['customer_cash_balance_transaction'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + readonly GetCustomersCustomerDiscount: { + readonly parameters: { + readonly path: { + readonly customer: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + readonly DeleteCustomersCustomerDiscount: { + readonly parameters: { + readonly path: { + readonly customer: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + readonly PostCustomersCustomerFundingInstructions: { + readonly parameters: { + readonly path: { + readonly customer: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['funding_instructions'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + readonly bank_transfer: { + /** eu_bank_account_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + readonly funding_type: 'bank_transfer' + } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + readonly GetCustomersCustomerPaymentMethods: { + readonly parameters: { + readonly path: { + readonly customer: string + } + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** A required filter on the list, based on the object `type` field. */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + readonly GetCustomersCustomerPaymentMethodsPaymentMethod: { + readonly parameters: { + readonly path: { + readonly customer: string + readonly payment_method: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + readonly GetCustomersCustomerSources: { + readonly parameters: { + readonly path: { + readonly customer: string + } + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** Filter sources according to a particular object type. */ + readonly 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -23910,7 +28683,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ readonly add_invoice_items?: readonly { readonly price?: string /** one_time_price_data */ @@ -23930,7 +28703,7 @@ export interface operations { readonly application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ readonly automatic_tax?: { readonly enabled: boolean @@ -23942,7 +28715,7 @@ export interface operations { readonly backdate_start_date?: number /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ readonly billing_cycle_anchor?: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ @@ -23966,6 +28739,8 @@ export interface operations { readonly collection_method?: 'charge_automatically' | 'send_invoice' /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ readonly coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ readonly days_until_due?: number /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24053,9 +28828,45 @@ export interface operations { readonly description?: string } /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ readonly request_three_d_secure?: 'any' | 'automatic' } | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } readonly payment_method_types?: | readonly ( @@ -24067,15 +28878,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + readonly save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ readonly pending_invoice_item_interval?: @@ -24088,9 +28907,7 @@ export interface operations { /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ readonly promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24169,7 +28986,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ readonly add_invoice_items?: readonly { readonly price?: string /** one_time_price_data */ @@ -24189,7 +29006,7 @@ export interface operations { readonly application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ readonly automatic_tax?: { readonly enabled: boolean @@ -24316,9 +29133,45 @@ export interface operations { readonly description?: string } /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ readonly request_three_d_secure?: 'any' | 'automatic' } | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } readonly payment_method_types?: | readonly ( @@ -24330,15 +29183,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + readonly save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ readonly pending_invoice_item_interval?: @@ -24351,11 +29212,7 @@ export interface operations { /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ readonly promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24555,13 +29412,14 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ readonly type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -24573,10 +29431,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -24596,6 +29456,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -25116,6 +29977,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { + /** @description Details about each object. */ readonly data: readonly components['schemas']['file_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean @@ -25168,7 +30030,7 @@ export interface operations { * @description A future timestamp after which the link will no longer be usable. */ readonly expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ readonly file: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' @@ -25275,6 +30137,7 @@ export interface operations { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 } @@ -25361,6 +30224,7 @@ export interface operations { | 'identity_document' | 'pci_document' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' } } } @@ -25396,6 +30260,284 @@ export interface operations { } } } + /**

Returns a list of Financial Connections Account objects.

*/ + readonly GetFinancialConnectionsAccounts: { + readonly parameters: { + readonly query: { + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + readonly account_holder?: { + readonly account?: string + 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** If present, only return accounts that were collected as part of the given session. */ + readonly session?: 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves the details of an Financial Connections Account.

*/ + readonly GetFinancialConnectionsAccountsAccount: { + readonly parameters: { + readonly path: { + readonly account: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + readonly PostFinancialConnectionsAccountsAccountDisconnect: { + readonly parameters: { + readonly path: { + readonly account: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Lists all owners for a given Account

*/ + readonly GetFinancialConnectionsAccountsAccountOwners: { + readonly parameters: { + readonly path: { + readonly account: string + } + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 ID of the ownership object to fetch owners from. */ + readonly ownership: 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Refreshes the data associated with a Financial Connections Account.

*/ + readonly PostFinancialConnectionsAccountsAccountRefresh: { + readonly parameters: { + readonly path: { + readonly account: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The list of account features that you would like to refresh. */ + readonly features: readonly ('balance' | 'ownership')[] + } + } + } + } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + readonly PostFinancialConnectionsSessions: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + readonly account_holder: { + readonly account?: string + readonly customer?: string + /** @enum {string} */ + readonly type: 'account' | 'customer' + } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + readonly filters?: { + readonly countries: readonly string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + readonly permissions: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + readonly return_url?: string + } + } + } + } + /**

Retrieves the details of a Financial Connections Session

*/ + readonly GetFinancialConnectionsSessionsSession: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly session: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } /**

List all verification reports.

*/ readonly GetIdentityVerificationReports: { readonly parameters: { @@ -25849,7 +30991,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ readonly amount?: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency?: string @@ -25874,7 +31016,7 @@ export interface operations { readonly metadata?: { readonly [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ readonly period?: { /** Format: unix-time */ @@ -25903,11 +31045,11 @@ export interface operations { readonly subscription?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ readonly tax_rates?: readonly string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) 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. */ readonly unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ readonly unit_amount_decimal?: string } @@ -25969,7 +31111,7 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) 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. */ readonly amount?: number /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ readonly description?: string @@ -25988,7 +31130,7 @@ export interface operations { readonly metadata?: { readonly [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ readonly period?: { /** Format: unix-time */ @@ -26015,11 +31157,11 @@ export interface operations { readonly quantity?: number /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ readonly tax_rates?: readonly string[] | '' - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + /** @description The integer unit amount in cents (or local equivalent) 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 /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ readonly unit_amount_decimal?: string } @@ -26122,7 +31264,7 @@ export interface operations { } } } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ readonly PostInvoices: { readonly responses: { /** Successful response. */ @@ -26143,7 +31285,7 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ readonly account_tax_ids?: readonly string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ readonly application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ readonly auto_advance?: boolean @@ -26159,6 +31301,8 @@ export interface operations { * @enum {string} */ readonly collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + readonly currency?: string /** @description A list of up to 4 custom fields to be displayed on the invoice. */ readonly custom_fields?: | readonly { @@ -26167,7 +31311,7 @@ export interface operations { }[] | '' /** @description The ID of the customer who will be billed. */ - readonly customer: string + readonly customer?: string /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ readonly days_until_due?: number /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -26194,6 +31338,15 @@ export interface operations { readonly expand?: readonly string[] /** @description Footer to be displayed on the invoice. */ readonly footer?: string + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + readonly from_invoice?: { + /** @enum {string} */ + readonly action: 'revision' + readonly invoice: string + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ @@ -26203,6 +31356,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ readonly payment_settings?: { + readonly default_mandate?: string /** payment_method_options */ readonly payment_method_options?: { readonly acss_debit?: @@ -26224,10 +31378,47 @@ export interface operations { | '' readonly card?: | { + /** installments_param */ + readonly installments?: { + readonly enabled?: boolean + readonly plan?: + | { + readonly count: number + /** @enum {string} */ + readonly interval: 'month' + /** @enum {string} */ + readonly type: 'fixed_count' + } + | '' + } /** @enum {string} */ readonly request_three_d_secure?: 'any' | 'automatic' } | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } readonly payment_method_types?: | readonly ( @@ -26239,19 +31430,37 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + readonly pending_invoice_items_behavior?: 'exclude' | 'include' | 'include_and_require' + /** @description Options for invoice PDF rendering. */ + readonly rendering_options?: + | { + /** @enum {string} */ + readonly amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ readonly statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ readonly subscription?: string /** * transfer_data_specs @@ -26265,6 +31474,57 @@ export interface operations { } } } + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetInvoicesSearch: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + readonly query: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['invoice'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } /** *

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

* @@ -26281,6 +31541,8 @@ export interface operations { } /** 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. */ readonly coupon?: string + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + readonly currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ readonly customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26322,6 +31584,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26333,10 +31596,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26356,6 +31621,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26456,13 +31722,7 @@ export interface operations { readonly quantity?: number readonly tax_rates?: readonly string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ readonly subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ readonly subscription_proration_date?: number @@ -26504,6 +31764,8 @@ export interface operations { } /** 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. */ readonly coupon?: string + /** The currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + readonly currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ readonly customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26545,6 +31807,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26556,10 +31819,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26579,6 +31844,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26685,13 +31951,7 @@ export interface operations { readonly quantity?: number readonly tax_rates?: readonly string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ readonly subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ readonly subscription_proration_date?: number @@ -26799,7 +32059,7 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ readonly account_tax_ids?: readonly string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ readonly application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ readonly auto_advance?: boolean @@ -26857,6 +32117,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ readonly payment_settings?: { + readonly default_mandate?: string /** payment_method_options */ readonly payment_method_options?: { readonly acss_debit?: @@ -26878,10 +32139,47 @@ export interface operations { | '' readonly card?: | { + /** installments_param */ + readonly installments?: { + readonly enabled?: boolean + readonly plan?: + | { + readonly count: number + /** @enum {string} */ + readonly interval: 'month' + /** @enum {string} */ + readonly type: 'fixed_count' + } + | '' + } /** @enum {string} */ readonly request_three_d_secure?: 'any' | 'automatic' } | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } readonly payment_method_types?: | readonly ( @@ -26893,16 +32191,29 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** @description Options for invoice PDF rendering. */ + readonly rendering_options?: + | { + /** @enum {string} */ + readonly amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ readonly statement_descriptor?: string /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ @@ -27086,6 +32397,8 @@ export interface operations { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ readonly forgive?: boolean + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + readonly mandate?: string /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ readonly off_session?: boolean /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -27162,88 +32475,6 @@ export interface operations { } } } - /**

Returns a list of issuer fraud records.

*/ - readonly GetIssuerFraudRecords: { - readonly parameters: { - readonly query: { - /** Only return issuer fraud records for the charge specified by this charge ID. */ - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['issuer_fraud_record'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /** - *

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

- * - *

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

- */ - readonly GetIssuerFraudRecordsIssuerFraudRecord: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly issuer_fraud_record: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } /**

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

*/ readonly GetIssuingAuthorizations: { readonly parameters: { @@ -27564,7 +32795,7 @@ export interface operations { } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ readonly name: string /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ readonly phone_number?: string @@ -29553,6 +34784,7 @@ export interface operations { readonly currency: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + readonly financial_account?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } /** @description The card this is meant to be a replacement for (if any). */ @@ -29576,7 +34808,13 @@ export interface operations { readonly postal_code: string readonly state?: string } + /** customs_param */ + readonly customs?: { + readonly eori_number?: string + } readonly name: string + readonly phone_number?: string + readonly require_signature?: boolean /** @enum {string} */ readonly service?: 'express' | 'priority' | 'standard' /** @enum {string} */ @@ -31515,6 +36753,8 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + readonly amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31605,8 +36845,15 @@ export interface operations { readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - readonly transaction: string + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + readonly transaction?: string + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + readonly treasury?: { + readonly received_debit: string + } } } } @@ -31666,6 +36913,8 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + readonly amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -32032,22 +37281,13 @@ export interface operations { } } } - /**

Retrieves a Mandate object.

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

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + readonly PostLinkAccountSessions: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['mandate'] + readonly 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32059,82 +37299,54 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly GetOrderReturns: { - readonly parameters: { - readonly query: { - /** Date this return was created. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 order to retrieve returns for. */ - readonly 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. */ - readonly starting_after?: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string + readonly 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + readonly account_holder: { + readonly account?: string + readonly customer?: string + /** @enum {string} */ + readonly type: 'account' | 'customer' } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + readonly filters?: { + readonly countries: readonly string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + readonly permissions: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + readonly return_url?: string } } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } } } - /**

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

*/ - readonly GetOrderReturnsId: { + /**

Retrieves the details of a Financial Connections Session

*/ + readonly GetLinkAccountSessionsSession: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly id: string + readonly session: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order_return'] + readonly 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32150,70 +37362,25 @@ export interface operations { } } } - /**

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

*/ - readonly GetOrders: { + /**

Returns a list of Financial Connections Account objects.

*/ + readonly GetLinkedAccounts: { readonly parameters: { readonly query: { - /** Date this order was created. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return orders for the given customer. */ - readonly customer?: string + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + readonly account_holder?: { + readonly account?: string + 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** Only return orders with the given IDs. */ - readonly ids?: readonly string[] /** 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 + /** If present, only return accounts that were collected as part of the given session. */ + readonly session?: 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. */ readonly starting_after?: string - /** Only return orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - readonly status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - readonly status_transitions?: { - readonly canceled?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - readonly fulfilled?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - readonly paid?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - readonly returned?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - } - /** Only return orders with the given upstream order IDs. */ - readonly upstream_ids?: readonly string[] } } readonly responses: { @@ -32221,7 +37388,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['order'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -32247,13 +37415,22 @@ export interface operations { } } } - /**

Creates a new order object.

*/ - readonly PostOrders: { + /**

Retrieves the details of an Financial Connections Account.

*/ + readonly GetLinkedAccountsAccount: { + readonly parameters: { + readonly path: { + readonly account: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order'] + readonly 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32265,66 +37442,22 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - readonly coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - readonly customer?: string - /** @description The email address of the customer placing the order. */ - readonly email?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - readonly items?: readonly { - readonly amount?: number - readonly currency?: string - readonly description?: string - readonly parent?: string - readonly quantity?: number - /** @enum {string} */ - readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - readonly shipping?: { - /** optional_fields_address */ - 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 - } - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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.

*/ - readonly GetOrdersId: { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + readonly PostLinkedAccountsAccountDisconnect: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly id: string + readonly account: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order'] + readonly 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32336,22 +37469,49 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

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

*/ - readonly PostOrdersId: { + /**

Lists all owners for a given Account

*/ + readonly GetLinkedAccountsAccountOwners: { readonly parameters: { readonly path: { - readonly id: string + readonly account: string + } + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 ID of the ownership object to fetch owners from. */ + readonly ownership: 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. */ + readonly starting_after?: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order'] + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -32363,44 +37523,22 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - readonly coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - readonly selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - readonly shipping?: { - readonly carrier: string - readonly tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - readonly status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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

*/ - readonly PostOrdersIdPay: { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + readonly PostLinkedAccountsAccountRefresh: { readonly parameters: { readonly path: { - readonly id: string + readonly account: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order'] + readonly 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32413,34 +37551,30 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - readonly application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - readonly customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - readonly source?: string + /** @description The list of account features that you would like to refresh. */ + readonly features: readonly ('balance' | 'ownership')[] } } } } - /**

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.

*/ - readonly PostOrdersIdReturns: { + /**

Retrieves a Mandate object.

*/ + readonly GetMandatesMandate: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly id: string + readonly mandate: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['order_return'] + readonly 'application/json': components['schemas']['mandate'] } } /** Error response. */ @@ -32452,38 +37586,15 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description List of items to return. */ - readonly items?: - | readonly { - readonly amount?: number - readonly description?: string - readonly parent?: string - readonly quantity?: number - /** @enum {string} */ - readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - | '' - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

Returns a list of PaymentIntents.

*/ - readonly GetPaymentIntents: { + /**

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

*/ + readonly GetOrders: { 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** 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. */ readonly ending_before?: string @@ -32500,7 +37611,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['payment_intent'][] + readonly data: readonly components['schemas']['order'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -32526,24 +37637,13 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostPaymentIntents: { + /**

Creates a new open order object.

*/ + readonly PostOrders: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_intent'] + readonly 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -32556,288 +37656,117 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - readonly amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly application_fee_amount?: number /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * automatic_tax + * @description Settings for automatic tax calculation for this order. */ - readonly automatic_payment_methods?: { + readonly automatic_tax?: { readonly enabled: boolean } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + readonly billing_details?: + | { + /** validated_optional_fields_address */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + readonly email?: string + readonly name?: string + readonly phone?: string + } + | '' /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ - readonly capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - readonly confirm?: boolean - /** @enum {string} */ - readonly confirmation_method?: 'automatic' | 'manual' + readonly client_permissions?: { + /** @enum {string} */ + readonly billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + readonly promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + readonly shipping_details?: 'allow' | 'disallow' + } /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ + /** @description The customer associated with this order. */ readonly customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - readonly error_on_requires_action?: boolean + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + readonly promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - readonly mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - readonly mandate_data?: { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** Format: unix-time */ - readonly accepted_at?: number - /** offline_param */ - readonly offline?: { readonly [key: string]: unknown } - /** online_param */ - readonly online?: { - readonly ip_address: string - readonly user_agent: string - } + /** @description The IP address of the purchaser for this order. */ + readonly ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + readonly line_items: readonly { + readonly description?: string + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + }[] + | '' + readonly price?: string + /** price_data_with_optional_product */ + readonly price_data?: { + readonly currency?: string + readonly product?: string /** @enum {string} */ - readonly type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - readonly off_session?: boolean | ('one_off' | 'recurring') - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - readonly payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - readonly payment_method_data?: { - /** payment_method_param */ - readonly acss_debit?: { - readonly account_number: string - readonly institution_number: string - readonly transit_number: string - } - /** param */ - readonly afterpay_clearpay?: { readonly [key: string]: unknown } - /** param */ - readonly alipay?: { readonly [key: string]: unknown } - /** param */ - readonly au_becs_debit?: { - readonly account_number: string - readonly bsb_number: string - } - /** param */ - readonly bacs_debit?: { - readonly account_number?: string - readonly sort_code?: string + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string } - /** param */ - readonly bancontact?: { readonly [key: string]: unknown } - /** billing_details_inner_params */ - readonly billing_details?: { - readonly address?: + readonly product?: string + /** product_upsert_data */ + readonly product_data?: { + readonly description?: string + readonly id: string + readonly images?: readonly string[] | '' + readonly metadata?: { readonly [key: string]: string } | '' + readonly name: string + readonly package_dimensions?: | { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string + readonly height: number + readonly length: number + readonly weight: number + readonly width: number } | '' - readonly email?: string | '' - readonly name?: string - readonly phone?: string - } - /** param */ - readonly boleto?: { - readonly tax_id: string - } - /** param */ - readonly eps?: { - /** @enum {string} */ - readonly bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - readonly fpx?: { - /** @enum {string} */ - readonly bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - readonly giropay?: { readonly [key: string]: unknown } - /** param */ - readonly grabpay?: { readonly [key: string]: unknown } - /** param */ - readonly ideal?: { - /** @enum {string} */ - readonly bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - readonly interac_present?: { readonly [key: string]: unknown } - /** param */ - readonly klarna?: { - /** date_of_birth */ - readonly dob?: { - readonly day: number - readonly month: number - readonly year: number - } - } - readonly metadata?: { readonly [key: string]: string } - /** param */ - readonly oxxo?: { readonly [key: string]: unknown } - /** param */ - readonly p24?: { - /** @enum {string} */ - readonly bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - readonly sepa_debit?: { - readonly iban: string - } - /** param */ - readonly sofort?: { - /** @enum {string} */ - readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + readonly shippable?: boolean + readonly tax_code?: string + readonly url?: string | '' } - /** @enum {string} */ - readonly type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - readonly wechat_pay?: { readonly [key: string]: unknown } - } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - readonly payment_method_options?: { - readonly acss_debit?: - | { + * create_params + * @description Payment information associated with the order, including payment settings. + */ + readonly payment?: { + /** create_params */ + readonly settings: { + readonly application_fee_amount?: number + /** create_params */ + readonly payment_method_options?: { + /** payment_intent_payment_method_options_param */ + readonly acss_debit?: { /** payment_intent_payment_method_options_mandate_options_param */ readonly mandate_options?: { readonly custom_mandate_url?: string | '' @@ -32848,78 +37777,74 @@ export interface operations { readonly transaction_type?: 'business' | 'personal' } /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } - | '' - readonly afterpay_clearpay?: - | { + /** afterpay_clearpay_payment_method_options_param */ + readonly afterpay_clearpay?: { + /** @enum {string} */ + readonly capture_method?: 'automatic' | 'manual' readonly reference?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' } - | '' - readonly alipay?: { readonly [key: string]: unknown } | '' - readonly au_becs_debit?: { readonly [key: string]: unknown } | '' - readonly bacs_debit?: { readonly [key: string]: unknown } | '' - readonly bancontact?: - | { + /** payment_method_options_param */ + readonly alipay?: { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + readonly bancontact?: { /** @enum {string} */ readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' } - | '' - readonly boleto?: - | { - readonly expires_after_days?: number + /** card_payment_method_options */ + readonly card?: { + /** @enum {string} */ + readonly capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' } - | '' - readonly card?: - | { - readonly cvc_token?: string - /** installments_param */ - readonly installments?: { - readonly enabled?: boolean - readonly plan?: - | { - readonly count: number - /** @enum {string} */ - readonly interval: 'month' - /** @enum {string} */ - readonly type: 'fixed_count' - } - | '' + /** payment_intent_payment_method_options_param */ + readonly customer_balance?: { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' } /** @enum {string} */ - readonly network?: - | 'amex' - | 'cartes_bancaires' - | 'diners' - | 'discover' - | 'interac' - | 'jcb' - | 'mastercard' - | 'unionpay' - | 'unknown' - | 'visa' + readonly funding_type?: 'bank_transfer' /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' + readonly setup_future_usage?: 'none' + } + /** payment_method_options_param */ + readonly ideal?: { /** @enum {string} */ - readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + readonly setup_future_usage?: '' | 'none' | 'off_session' } - | '' - readonly card_present?: { readonly [key: string]: unknown } | '' - readonly eps?: { readonly [key: string]: unknown } | '' - readonly fpx?: { readonly [key: string]: unknown } | '' - readonly giropay?: { readonly [key: string]: unknown } | '' - readonly grabpay?: { readonly [key: string]: unknown } | '' - readonly ideal?: { readonly [key: string]: unknown } | '' - readonly interac_present?: { readonly [key: string]: unknown } | '' - readonly klarna?: - | { + /** payment_method_options_param */ + readonly klarna?: { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' /** @enum {string} */ readonly preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -32930,130 +37855,243 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + readonly setup_future_usage?: 'none' } - | '' - readonly oxxo?: - | { + /** payment_intent_payment_method_options_param */ + readonly link?: { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly persistent_token?: string + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + readonly oxxo?: { readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' } - | '' - readonly p24?: - | { + /** payment_method_options_param */ + readonly p24?: { + /** @enum {string} */ + readonly setup_future_usage?: 'none' readonly tos_shown_and_accepted?: boolean } - | '' - readonly sepa_debit?: - | { + /** payment_intent_payment_method_options_param */ + readonly sepa_debit?: { /** payment_method_options_mandate_options_param */ readonly mandate_options?: { readonly [key: string]: unknown } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } - | '' - readonly sofort?: - | { + /** payment_method_options_param */ + readonly sofort?: { /** @enum {string} */ readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' } - | '' - readonly wechat_pay?: - | { + /** payment_method_options_param */ + readonly wechat_pay?: { readonly app_id?: string /** @enum {string} */ readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - readonly payment_method_types?: readonly string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - readonly receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - readonly return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - readonly setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - readonly shipping?: { - /** optional_fields_address */ - readonly address: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string + } + readonly payment_method_types?: readonly ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + readonly return_url?: string + readonly statement_descriptor?: string + readonly statement_descriptor_suffix?: string + /** transfer_data */ + readonly transfer_data?: { + readonly amount?: number + readonly destination: string + } } - readonly carrier?: string - readonly name: string - readonly phone?: string - readonly tracking_number?: string } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - readonly statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - readonly statement_descriptor_suffix?: string + /** @description Settings for the customer cost of shipping for this order. */ + readonly shipping_cost?: + | { + readonly shipping_rate?: string + /** method_params */ + readonly shipping_rate_data?: { + /** delivery_estimate */ + readonly delivery_estimate?: { + /** delivery_estimate_bound */ + readonly maximum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } + /** delivery_estimate_bound */ + readonly minimum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } + } + readonly display_name: string + /** fixed_amount */ + readonly fixed_amount?: { + readonly amount: number + readonly currency: string + readonly currency_options?: { + readonly [key: string]: { + readonly amount: number + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + readonly metadata?: { readonly [key: string]: string } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly tax_code?: string + /** @enum {string} */ + readonly type?: 'fixed_amount' + } + } + | '' + /** @description Shipping details for the order. */ + readonly shipping_details?: + | { + /** validated_optional_fields_address */ + 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 + } + | '' /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - readonly transfer_data?: { - readonly amount?: number - readonly destination: string + readonly tax_details?: { + /** @enum {string} */ + readonly tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + readonly tax_ids?: readonly { + /** @enum {string} */ + readonly type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + readonly value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - readonly transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - readonly 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.

- */ - readonly GetPaymentIntentsIntent: { + /**

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.

*/ + readonly GetOrdersId: { readonly parameters: { readonly query: { - /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ - readonly client_secret?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly intent: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_intent'] + readonly 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33069,26 +38107,18 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostPaymentIntentsIntent: { + /**

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

*/ + readonly PostOrdersId: { readonly parameters: { readonly path: { - readonly intent: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_intent'] + readonly 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33101,396 +38131,367 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - readonly amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly application_fee_amount?: number | '' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency?: string /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + readonly billing_details?: + | { + /** validated_optional_fields_address */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + readonly email?: string + readonly name?: string + readonly phone?: string + } + | '' + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ + readonly client_permissions?: { + /** @enum {string} */ + readonly billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + readonly promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + readonly shipping_details?: 'allow' | 'disallow' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description The customer associated with this order. */ readonly customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + readonly promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - readonly payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - readonly payment_method_data?: { - /** payment_method_param */ - readonly acss_debit?: { - readonly account_number: string - readonly institution_number: string - readonly transit_number: string - } - /** param */ - readonly afterpay_clearpay?: { readonly [key: string]: unknown } - /** param */ - readonly alipay?: { readonly [key: string]: unknown } - /** param */ - readonly au_becs_debit?: { - readonly account_number: string - readonly bsb_number: string - } - /** param */ - readonly bacs_debit?: { - readonly account_number?: string - readonly sort_code?: string + /** @description The IP address of the purchaser for this order. */ + readonly ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + readonly line_items?: readonly { + readonly description?: string + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + }[] + | '' + readonly id?: string + readonly price?: string + /** price_data_with_optional_product */ + readonly price_data?: { + readonly currency?: string + readonly product?: string + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string } - /** param */ - readonly bancontact?: { readonly [key: string]: unknown } - /** billing_details_inner_params */ - readonly billing_details?: { - readonly address?: + readonly product?: string + /** product_upsert_data */ + readonly product_data?: { + readonly description?: string + readonly id: string + readonly images?: readonly string[] | '' + readonly metadata?: { readonly [key: string]: string } | '' + readonly name: string + readonly package_dimensions?: | { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string + readonly height: number + readonly length: number + readonly weight: number + readonly width: number } | '' - readonly email?: string | '' - readonly name?: string - readonly phone?: string - } - /** param */ - readonly boleto?: { - readonly tax_id: string - } - /** param */ - readonly eps?: { - /** @enum {string} */ - readonly bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - readonly fpx?: { - /** @enum {string} */ - readonly bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - readonly giropay?: { readonly [key: string]: unknown } - /** param */ - readonly grabpay?: { readonly [key: string]: unknown } - /** param */ - readonly ideal?: { - /** @enum {string} */ - readonly bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' + readonly shippable?: boolean + readonly tax_code?: string + readonly url?: string | '' } - /** param */ - readonly interac_present?: { readonly [key: string]: unknown } - /** param */ - readonly klarna?: { - /** date_of_birth */ - readonly dob?: { - readonly day: number - readonly month: number - readonly year: number + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + readonly payment?: { + /** update_params */ + readonly settings: { + readonly application_fee_amount?: number | '' + /** update_params */ + readonly payment_method_options?: { + readonly acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly afterpay_clearpay?: + | { + /** @enum {string} */ + readonly capture_method?: 'automatic' | 'manual' + readonly reference?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly alipay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly bancontact?: + | { + /** @enum {string} */ + readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly card?: + | { + /** @enum {string} */ + readonly capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + readonly funding_type?: 'bank_transfer' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly ideal?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly klarna?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly link?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly persistent_token?: string + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly oxxo?: + | { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly p24?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + readonly tos_shown_and_accepted?: boolean + } + | '' + readonly sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly sofort?: + | { + /** @enum {string} */ + readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly wechat_pay?: + | { + readonly app_id?: string + /** @enum {string} */ + readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' } + readonly payment_method_types?: readonly ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + readonly return_url?: string | '' + readonly statement_descriptor?: string + readonly statement_descriptor_suffix?: string + readonly transfer_data?: + | { + readonly amount?: number + readonly destination: string + } + | '' } - readonly metadata?: { readonly [key: string]: string } - /** param */ - readonly oxxo?: { readonly [key: string]: unknown } - /** param */ - readonly p24?: { - /** @enum {string} */ - readonly bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - readonly sepa_debit?: { - readonly iban: string - } - /** param */ - readonly sofort?: { - /** @enum {string} */ - readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - readonly type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - readonly wechat_pay?: { readonly [key: string]: unknown } } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - readonly payment_method_options?: { - readonly acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - readonly mandate_options?: { - readonly custom_mandate_url?: string | '' - readonly interval_description?: string - /** @enum {string} */ - readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' + /** @description Settings for the customer cost of shipping for this order. */ + readonly shipping_cost?: + | { + readonly shipping_rate?: string + /** method_params */ + readonly shipping_rate_data?: { + /** delivery_estimate */ + readonly delivery_estimate?: { + /** delivery_estimate_bound */ + readonly maximum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } + /** delivery_estimate_bound */ + readonly minimum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } } + readonly display_name: string + /** fixed_amount */ + readonly fixed_amount?: { + readonly amount: number + readonly currency: string + readonly currency_options?: { + readonly [key: string]: { + readonly amount: number + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + readonly metadata?: { readonly [key: string]: string } /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - readonly afterpay_clearpay?: - | { - readonly reference?: string - } - | '' - readonly alipay?: { readonly [key: string]: unknown } | '' - readonly au_becs_debit?: { readonly [key: string]: unknown } | '' - readonly bacs_debit?: { readonly [key: string]: unknown } | '' - readonly bancontact?: - | { + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly tax_code?: string /** @enum {string} */ - readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + readonly type?: 'fixed_amount' } - | '' - readonly boleto?: - | { - readonly expires_after_days?: number - } - | '' - readonly card?: - | { - readonly cvc_token?: string - /** installments_param */ - readonly installments?: { - readonly enabled?: boolean - readonly plan?: - | { - readonly count: number - /** @enum {string} */ - readonly interval: 'month' - /** @enum {string} */ - readonly type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - readonly network?: - | 'amex' - | 'cartes_bancaires' - | 'diners' - | 'discover' - | 'interac' - | 'jcb' - | 'mastercard' - | 'unionpay' - | 'unknown' - | 'visa' - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - readonly card_present?: { readonly [key: string]: unknown } | '' - readonly eps?: { readonly [key: string]: unknown } | '' - readonly fpx?: { readonly [key: string]: unknown } | '' - readonly giropay?: { readonly [key: string]: unknown } | '' - readonly grabpay?: { readonly [key: string]: unknown } | '' - readonly ideal?: { readonly [key: string]: unknown } | '' - readonly interac_present?: { readonly [key: string]: unknown } | '' - readonly klarna?: - | { - /** @enum {string} */ - readonly preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - readonly oxxo?: - | { - readonly expires_after_days?: number - } - | '' - readonly p24?: - | { - readonly tos_shown_and_accepted?: boolean - } - | '' - readonly sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - readonly mandate_options?: { readonly [key: string]: unknown } - } - | '' - readonly sofort?: - | { - /** @enum {string} */ - readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - readonly wechat_pay?: - | { - readonly app_id?: string - /** @enum {string} */ - readonly client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - readonly payment_method_types?: readonly string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - readonly receipt_email?: string | '' - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - readonly setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - readonly shipping?: + } + | '' + /** @description Shipping details for the order. */ + readonly shipping_details?: | { - /** optional_fields_address */ + /** validated_optional_fields_address */ readonly address: { readonly city?: string readonly country?: string @@ -33499,45 +38500,85 @@ export interface operations { readonly postal_code?: string readonly state?: string } - readonly carrier?: string readonly name: string readonly phone?: string - readonly tracking_number?: string } | '' - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - readonly statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - readonly statement_descriptor_suffix?: string /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - readonly transfer_data?: { - readonly amount?: number + readonly tax_details?: { + /** @enum {string} */ + readonly tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + readonly tax_ids?: readonly { + /** @enum {string} */ + readonly type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + readonly value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - readonly transfer_group?: string } } } } - /** - *

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

- * - *

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

- */ - readonly PostPaymentIntentsIntentCancel: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + readonly PostOrdersIdCancel: { readonly parameters: { readonly path: { - readonly intent: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_intent'] + readonly 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33550,35 +38591,73 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - readonly cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } } } } - /** - *

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

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - readonly PostPaymentIntentsIntentCapture: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Reopens a submitted order.

*/ + readonly PostOrdersIdReopen: { + readonly parameters: { + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33591,61 +38670,113 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - readonly amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - readonly statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - readonly statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - readonly transfer_data?: { - readonly amount?: number + } + } + } + } + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + readonly PostOrdersIdSubmit: { + readonly parameters: { + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + readonly expected_total: number + } + } + } + } + /**

Returns a list of PaymentIntents.

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

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).

+ *

Creates a PaymentIntent object.

* - *

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.

+ *

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.

* - *

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.

+ *

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.

*/ - readonly PostPaymentIntentsIntentConfirm: { - readonly parameters: { - readonly path: { - readonly intent: string - } - } + readonly PostPaymentIntents: { readonly responses: { /** Successful response. */ readonly 200: { @@ -33663,47 +38794,75 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - readonly client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + readonly amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + readonly application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + readonly automatic_payment_methods?: { + readonly enabled: boolean + } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + readonly confirm?: boolean + /** @enum {string} */ + readonly confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + readonly customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ readonly error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description ID of the mandate to be used for this payment. */ + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ readonly mandate?: string - /** @description This hash contains details about the Mandate to create */ - readonly mandate_data?: - | { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** Format: unix-time */ - readonly accepted_at?: number - /** offline_param */ - readonly offline?: { readonly [key: string]: unknown } - /** online_param */ - readonly online?: { - readonly ip_address: string - readonly user_agent: string - } - /** @enum {string} */ - readonly type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** online_param */ - readonly online: { - readonly ip_address?: string - readonly user_agent?: string - } - /** @enum {string} */ - readonly type: 'online' - } + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + readonly mandate_data?: { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** Format: unix-time */ + readonly accepted_at?: number + /** offline_param */ + readonly offline?: { readonly [key: string]: unknown } + /** online_param */ + readonly online?: { + readonly ip_address: string + readonly user_agent: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + /** @enum {string} */ + readonly type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ readonly off_session?: boolean | ('one_off' | 'recurring') - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + readonly on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ readonly payment_method?: string /** * payment_method_data_params @@ -33719,6 +38878,8 @@ export interface operations { readonly transit_number: string } /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ readonly afterpay_clearpay?: { readonly [key: string]: unknown } /** param */ readonly alipay?: { readonly [key: string]: unknown } @@ -33751,10 +38912,14 @@ export interface operations { readonly phone?: string } /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ readonly boleto?: { readonly tax_id: string } /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ readonly eps?: { /** @enum {string} */ readonly bank?: @@ -33768,6 +38933,7 @@ export interface operations { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -33845,6 +39011,10 @@ export interface operations { readonly year: number } } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } readonly metadata?: { readonly [key: string]: string } /** param */ readonly oxxo?: { readonly [key: string]: unknown } @@ -33879,6 +39049,16 @@ export interface operations { | 'volkswagen_bank' } /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ readonly sepa_debit?: { readonly iban: string } @@ -33890,23 +39070,42 @@ export interface operations { /** @enum {string} */ readonly type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } /** param */ readonly wechat_pay?: { readonly [key: string]: unknown } } @@ -33927,30 +39126,70 @@ export interface operations { readonly transaction_type?: 'business' | 'personal' } /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' + readonly affirm?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' readonly afterpay_clearpay?: | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' readonly reference?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly alipay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly au_becs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly bacs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' - readonly alipay?: { readonly [key: string]: unknown } | '' - readonly au_becs_debit?: { readonly [key: string]: unknown } | '' - readonly bacs_debit?: { readonly [key: string]: unknown } | '' readonly bancontact?: | { /** @enum {string} */ readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly blik?: + | { + readonly code?: string } | '' readonly boleto?: | { readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' readonly card?: | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' readonly cvc_token?: string /** installments_param */ readonly installments?: { @@ -33965,6 +39204,22 @@ export interface operations { } | '' } + /** mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } /** @enum {string} */ readonly network?: | 'amex' @@ -33981,69 +39236,200 @@ export interface operations { readonly request_three_d_secure?: 'any' | 'automatic' /** @enum {string} */ readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + readonly statement_descriptor_suffix_kana?: string | '' + readonly statement_descriptor_suffix_kanji?: string | '' } | '' - readonly card_present?: { readonly [key: string]: unknown } | '' - readonly eps?: { readonly [key: string]: unknown } | '' - readonly fpx?: { readonly [key: string]: unknown } | '' - readonly giropay?: { readonly [key: string]: unknown } | '' - readonly grabpay?: { readonly [key: string]: unknown } | '' - readonly ideal?: { readonly [key: string]: unknown } | '' - readonly interac_present?: { readonly [key: string]: unknown } | '' - readonly klarna?: + readonly card_present?: + | { + readonly request_extended_authorization?: boolean + readonly request_incremental_authorization_support?: boolean + } + | '' + readonly customer_balance?: | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } /** @enum {string} */ - readonly preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' + readonly funding_type?: 'bank_transfer' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly eps?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly fpx?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly giropay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly grabpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly ideal?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly interac_present?: { readonly [key: string]: unknown } | '' + readonly klarna?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' | 'en-IE' | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly konbini?: + | { + readonly confirmation_number?: string + readonly expires_after_days?: number | '' + readonly expires_at?: number | '' + readonly product_description?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly link?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly persistent_token?: string + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' } | '' readonly oxxo?: | { readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' } | '' readonly p24?: | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' readonly tos_shown_and_accepted?: boolean } | '' + readonly paynow?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly pix?: + | { + readonly expires_after_seconds?: number + /** Format: unix-time */ + readonly expires_at?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly promptpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' readonly sepa_debit?: | { /** payment_method_options_mandate_options_param */ readonly mandate_options?: { readonly [key: string]: unknown } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' readonly sofort?: | { /** @enum {string} */ readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly us_bank_account?: + | { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' readonly wechat_pay?: @@ -34051,18 +39437,23 @@ export interface operations { readonly app_id?: string /** @enum {string} */ readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' } | '' } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ readonly payment_method_types?: readonly string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - readonly receipt_email?: string | '' /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + readonly radar_options?: { + readonly session?: string + } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + readonly receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ readonly return_url?: string /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -34070,47 +39461,85 @@ export interface operations { * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - readonly setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - readonly shipping?: - | { - /** optional_fields_address */ - 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 - } - | '' + readonly setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + readonly shipping?: { + /** optional_fields_address */ + 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 + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + readonly statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + readonly statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + readonly transfer_data?: { + readonly amount?: number + readonly destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + readonly transfer_group?: string /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ readonly use_stripe_sdk?: boolean } } } } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - readonly PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetPaymentIntentsSearch: { readonly parameters: { - readonly path: { - readonly intent: string + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + readonly query: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_intent'] + readonly 'application/json': { + readonly data: readonly components['schemas']['payment_intent'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } } } /** Error response. */ @@ -34122,49 +39551,34 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - readonly amounts?: readonly number[] - /** @description The client secret of the PaymentIntent. */ - readonly client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

Returns a list of your payment links.

*/ - readonly GetPaymentLinks: { + /** + *

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.

+ */ + readonly GetPaymentIntentsIntent: { readonly parameters: { readonly query: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - readonly 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. */ - readonly ending_before?: string + /** The client secret of the PaymentIntent. Required if a publishable key is used to retrieve the source. */ + readonly client_secret?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } + readonly path: { + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34180,13 +39594,26 @@ export interface operations { } } } - /**

Creates a payment link.

*/ - readonly PostPaymentLinks: { + /** + *

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.

+ */ + readonly PostPaymentIntentsIntent: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_link'] + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34199,718 +39626,673 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + readonly amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + readonly application_fee_amount?: number | '' /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - readonly after_completion?: { - /** after_completion_confirmation_page_params */ - readonly hosted_confirmation?: { - readonly custom_message?: string - } - /** after_completion_redirect_params */ - readonly redirect?: { - readonly url: string - } - /** @enum {string} */ - readonly type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - readonly allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - readonly application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - readonly application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** - * @description Configuration for collecting the customer's billing address. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - readonly billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - readonly line_items?: readonly { - /** adjustable_quantity_params */ - readonly adjustable_quantity?: { - readonly enabled: boolean - readonly maximum?: number - readonly minimum?: number - } - readonly price: string - readonly quantity: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The account on behalf of which to charge. */ - readonly on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - readonly payment_method_types?: readonly 'card'[] + readonly capture_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. + * @description ID of the Customer this PaymentIntent belongs to, if one exists. * - * We recommend that you review your privacy policy and check with your legal contacts. + * 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. */ - readonly phone_number_collection?: { - readonly enabled: boolean - } + readonly customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + readonly payment_method?: string /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - readonly shipping_address_collection?: { - readonly allowed_countries: readonly ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. - */ - readonly subscription_data?: { - readonly trial_period_days?: number - } - /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. - */ - readonly transfer_data?: { - readonly amount?: number - readonly destination: string - } - } - } - } - } - /**

Retrieve a payment link.

*/ - readonly GetPaymentLinksPaymentLink: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly payment_link: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Updates a payment link.

*/ - readonly PostPaymentLinksPaymentLink: { - readonly parameters: { - readonly path: { - readonly payment_link: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payment_link'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - readonly active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - readonly after_completion?: { - /** after_completion_confirmation_page_params */ - readonly hosted_confirmation?: { - readonly custom_message?: string + readonly payment_method_data?: { + /** payment_method_param */ + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string } - /** after_completion_redirect_params */ - readonly redirect?: { - readonly url: string + /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** param */ + readonly alipay?: { readonly [key: string]: unknown } + /** param */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** param */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** param */ + readonly bancontact?: { readonly [key: string]: unknown } + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ + readonly boleto?: { + readonly tax_id: string + } + /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + readonly giropay?: { readonly [key: string]: unknown } + /** param */ + readonly grabpay?: { readonly [key: string]: unknown } + /** param */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + readonly interac_present?: { readonly [key: string]: unknown } + /** param */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } + readonly metadata?: { readonly [key: string]: string } + /** param */ + readonly oxxo?: { readonly [key: string]: unknown } + /** param */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ + readonly sepa_debit?: { + readonly iban: string + } + /** param */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' } /** @enum {string} */ - readonly type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - readonly allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - readonly automatic_tax?: { - readonly enabled: boolean + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** param */ + readonly wechat_pay?: { readonly [key: string]: unknown } } /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - readonly billing_address_collection?: 'auto' | 'required' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - readonly line_items?: readonly { - /** adjustable_quantity_params */ - readonly adjustable_quantity?: { - readonly enabled: boolean - readonly maximum?: number - readonly minimum?: number - } - readonly id: string - readonly quantity?: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - readonly payment_method_types?: readonly 'card'[] | '' - /** @description Configuration for collecting the customer's shipping address. */ - readonly shipping_address_collection?: - | { - readonly allowed_countries: readonly ( - | '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' - )[] + readonly payment_method_options?: { + readonly acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly affirm?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly afterpay_clearpay?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly reference?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly alipay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly au_becs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly bacs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly bancontact?: + | { + /** @enum {string} */ + readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly blik?: + | { + readonly code?: string + } + | '' + readonly boleto?: + | { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly card?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly cvc_token?: string + /** installments_param */ + readonly installments?: { + readonly enabled?: boolean + readonly plan?: + | { + readonly count: number + /** @enum {string} */ + readonly interval: 'month' + /** @enum {string} */ + readonly type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + readonly statement_descriptor_suffix_kana?: string | '' + readonly statement_descriptor_suffix_kanji?: string | '' + } + | '' + readonly card_present?: + | { + readonly request_extended_authorization?: boolean + readonly request_incremental_authorization_support?: boolean + } + | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + readonly funding_type?: 'bank_transfer' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly eps?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly fpx?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly giropay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly grabpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly ideal?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly interac_present?: { readonly [key: string]: unknown } | '' + readonly klarna?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly konbini?: + | { + readonly confirmation_number?: string + readonly expires_after_days?: number | '' + readonly expires_at?: number | '' + readonly product_description?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly link?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly persistent_token?: string + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly oxxo?: + | { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly p24?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + readonly tos_shown_and_accepted?: boolean + } + | '' + readonly paynow?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly pix?: + | { + readonly expires_after_seconds?: number + /** Format: unix-time */ + readonly expires_at?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly promptpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly sofort?: + | { + /** @enum {string} */ + readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly us_bank_account?: + | { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly wechat_pay?: + | { + readonly app_id?: string + /** @enum {string} */ + readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + readonly payment_method_types?: readonly string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + readonly receipt_email?: string | '' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + readonly setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + readonly shipping?: + | { + /** optional_fields_address */ + 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 } | '' + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + readonly statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + readonly statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + readonly transfer_data?: { + readonly amount?: number + } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + readonly transfer_group?: string } } } } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - readonly GetPaymentLinksPaymentLinkLineItems: { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + readonly PostPaymentIntentsIntentApplyCustomerBalance: { readonly parameters: { - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } readonly path: { - readonly payment_link: string + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34922,63 +40304,43 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + readonly amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - readonly GetPaymentMethods: { + /** + *

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

+ * + *

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

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

+ */ + readonly PostPaymentIntentsIntentCancel: { readonly parameters: { - readonly query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** A required filter on the list, based on the object `type` field. */ - readonly type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' + readonly path: { + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34990,21 +40352,36 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + * @enum {string} + */ + readonly cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } /** - *

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

+ *

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

* - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

*/ - readonly PostPaymentMethods: { + readonly PostPaymentIntentsIntentCapture: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_method'] + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35017,435 +40394,66 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + readonly amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + readonly application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + readonly statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + readonly statement_descriptor_suffix?: string /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly acss_debit?: { - readonly account_number: string - readonly institution_number: string - readonly transit_number: string - } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. - */ - readonly afterpay_clearpay?: { readonly [key: string]: unknown } - /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. - */ - readonly alipay?: { readonly [key: string]: unknown } - /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. - */ - readonly au_becs_debit?: { - readonly account_number: string - readonly bsb_number: string - } - /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. - */ - readonly bacs_debit?: { - readonly account_number?: string - readonly sort_code?: string - } - /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. - */ - readonly bancontact?: { readonly [key: string]: unknown } - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - readonly billing_details?: { - readonly address?: - | { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - | '' - readonly email?: string | '' - readonly name?: string - readonly phone?: string - } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - readonly boleto?: { - readonly tax_id: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - readonly card?: - | { - readonly cvc?: string - readonly exp_month: number - readonly exp_year: number - readonly number: string - } - | { - readonly token: string - } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - readonly customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - readonly eps?: { - /** @enum {string} */ - readonly bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - readonly fpx?: { - /** @enum {string} */ - readonly bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - readonly giropay?: { readonly [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - readonly grabpay?: { readonly [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - readonly ideal?: { - /** @enum {string} */ - readonly bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - readonly interac_present?: { readonly [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - readonly klarna?: { - /** date_of_birth */ - readonly dob?: { - readonly day: number - readonly month: number - readonly year: number - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - readonly oxxo?: { readonly [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - readonly p24?: { - /** @enum {string} */ - readonly bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** @description The PaymentMethod to share. */ - readonly payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - readonly sepa_debit?: { - readonly iban: string - } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - readonly sofort?: { - /** @enum {string} */ - readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - readonly type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - readonly wechat_pay?: { readonly [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - readonly GetPaymentMethodsPaymentMethod: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly payment_method: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly PostPaymentMethodsPaymentMethod: { - readonly parameters: { - readonly path: { - readonly payment_method: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - readonly billing_details?: { - readonly address?: - | { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - | '' - readonly email?: string | '' - readonly name?: string - readonly phone?: string - } - /** - * update_api_param - * @description 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 transfer_data?: { + readonly amount?: number } - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' } } } } /** - *

Attaches a PaymentMethod object to a Customer.

+ *

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

* - *

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.

+ *

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).

* - *

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.

+ *

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.

*/ - readonly PostPaymentMethodsPaymentMethodAttach: { - readonly parameters: { - readonly path: { - readonly payment_method: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - readonly customer: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - } - } - } - /**

Detaches a PaymentMethod object from a Customer.

*/ - readonly PostPaymentMethodsPaymentMethodDetach: { + readonly PostPaymentIntentsIntentConfirm: { readonly parameters: { readonly path: { - readonly payment_method: string + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payment_method'] + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35458,90 +40466,720 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + readonly capture_method?: 'automatic' | 'manual' + /** @description The client secret of the PaymentIntent. */ + readonly client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + readonly error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly 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.

*/ - readonly GetPayouts: { - readonly parameters: { - readonly query: { - readonly arrival_date?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number + /** @description ID of the mandate to be used for this payment. */ + readonly mandate?: string + /** @description This hash contains details about the Mandate to create */ + readonly mandate_data?: + | { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** Format: unix-time */ + readonly accepted_at?: number + /** offline_param */ + readonly offline?: { readonly [key: string]: unknown } + /** online_param */ + readonly online?: { + readonly ip_address: string + readonly user_agent: string + } + /** @enum {string} */ + readonly type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** online_param */ + readonly online: { + readonly ip_address?: string + readonly user_agent?: string + } + /** @enum {string} */ + readonly type: 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + readonly off_session?: boolean | ('one_off' | 'recurring') + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + readonly payment_method?: string + /** + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. + */ + readonly payment_method_data?: { + /** payment_method_param */ + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string } - | number - /** 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - readonly status?: string + /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** param */ + readonly alipay?: { readonly [key: string]: unknown } + /** param */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** param */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** param */ + readonly bancontact?: { readonly [key: string]: unknown } + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ + readonly boleto?: { + readonly tax_id: string + } + /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + readonly giropay?: { readonly [key: string]: unknown } + /** param */ + readonly grabpay?: { readonly [key: string]: unknown } + /** param */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + readonly interac_present?: { readonly [key: string]: unknown } + /** param */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } + readonly metadata?: { readonly [key: string]: string } + /** param */ + readonly oxxo?: { readonly [key: string]: unknown } + /** param */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ + readonly sepa_debit?: { + readonly iban: string + } + /** param */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** param */ + readonly wechat_pay?: { readonly [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. + */ + readonly payment_method_options?: { + readonly acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly affirm?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly afterpay_clearpay?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly reference?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly alipay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly au_becs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly bacs_debit?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly bancontact?: + | { + /** @enum {string} */ + readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly blik?: + | { + readonly code?: string + } + | '' + readonly boleto?: + | { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly card?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly cvc_token?: string + /** installments_param */ + readonly installments?: { + readonly enabled?: boolean + readonly plan?: + | { + readonly count: number + /** @enum {string} */ + readonly interval: 'month' + /** @enum {string} */ + readonly type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + readonly statement_descriptor_suffix_kana?: string | '' + readonly statement_descriptor_suffix_kanji?: string | '' + } + | '' + readonly card_present?: + | { + readonly request_extended_authorization?: boolean + readonly request_incremental_authorization_support?: boolean + } + | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_params */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly requested_address_types?: readonly ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + readonly type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + readonly funding_type?: 'bank_transfer' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly eps?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly fpx?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly giropay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly grabpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly ideal?: + | { + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly interac_present?: { readonly [key: string]: unknown } | '' + readonly klarna?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + /** @enum {string} */ + readonly preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly konbini?: + | { + readonly confirmation_number?: string + readonly expires_after_days?: number | '' + readonly expires_at?: number | '' + readonly product_description?: string + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly link?: + | { + /** @enum {string} */ + readonly capture_method?: '' | 'manual' + readonly persistent_token?: string + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly oxxo?: + | { + readonly expires_after_days?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly p24?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + readonly tos_shown_and_accepted?: boolean + } + | '' + readonly paynow?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly pix?: + | { + readonly expires_after_seconds?: number + /** Format: unix-time */ + readonly expires_at?: number + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly promptpay?: + | { + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + readonly sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + readonly sofort?: + | { + /** @enum {string} */ + readonly preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + readonly us_bank_account?: + | { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly wechat_pay?: + | { + readonly app_id?: string + /** @enum {string} */ + readonly client: 'android' | 'ios' | 'web' + /** @enum {string} */ + readonly setup_future_usage?: 'none' + } + | '' + } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + readonly payment_method_types?: readonly string[] + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + readonly radar_options?: { + readonly session?: string + } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + readonly receipt_email?: string | '' + /** + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + readonly return_url?: string + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + readonly setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + readonly shipping?: + | { + /** optional_fields_address */ + 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 + } + | '' + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + readonly use_stripe_sdk?: boolean + } + } + } + } + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + readonly PostPaymentIntentsIntentIncrementAuthorization: { + readonly parameters: { + readonly path: { + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['payout'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /** - *

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

- * - *

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

- * - *

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

- */ - readonly PostPayouts: { - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payout'] + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35554,143 +41192,42 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ readonly amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + readonly application_fee_amount?: number /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - readonly destination?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + readonly statement_descriptor?: string /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) - * @enum {string} - */ - readonly method?: 'instant' | 'standard' - /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. - * @enum {string} + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - readonly source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - readonly 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.

*/ - readonly GetPayoutsPayout: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly payout: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly PostPayoutsPayout: { - readonly parameters: { - readonly path: { - readonly payout: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - } - } - } - } - /**

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

*/ - readonly PostPayoutsPayoutCancel: { - readonly parameters: { - readonly path: { - readonly payout: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + readonly transfer_data?: { + readonly amount?: number + } } } } } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - readonly PostPayoutsPayoutReverse: { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + readonly PostPaymentIntentsIntentVerifyMicrodeposits: { readonly parameters: { readonly path: { - readonly payout: string + readonly intent: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['payout'] + readonly 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35703,37 +41240,30 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + readonly amounts?: readonly number[] + /** @description The client secret of the PaymentIntent. */ + readonly client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + readonly descriptor_code?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } } } } } - /**

Returns a list of your plans.

*/ - readonly GetPlans: { + /**

Returns a list of your payment links.

*/ + readonly GetPaymentLinks: { readonly parameters: { readonly query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** 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 plans for the given product. */ - readonly 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. */ readonly starting_after?: string } @@ -35743,8 +41273,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['plan'][] + readonly data: readonly components['schemas']['payment_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -35770,13 +41299,13 @@ export interface operations { } } } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - readonly PostPlans: { + /**

Creates a payment link.

*/ + readonly PostPaymentLinks: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['plan'] + readonly 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35789,380 +41318,427 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ - readonly active?: boolean - /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} - */ - readonly aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - readonly amount?: number /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. - */ - readonly amount_decimal?: string - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} + * after_completion_params + * @description Behavior after the purchase is complete. */ - readonly billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - readonly id?: string + readonly after_completion?: { + /** after_completion_confirmation_page_params */ + readonly hosted_confirmation?: { + readonly custom_message?: string + } + /** after_completion_redirect_params */ + readonly redirect?: { + readonly url: string + } + /** @enum {string} */ + readonly type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + readonly allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + readonly application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + readonly application_fee_percent?: number /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. - * @enum {string} + * automatic_tax_params + * @description Configuration for automatic tax collection. */ - readonly interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - readonly interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - readonly nickname?: string - readonly product?: - | { - readonly active?: boolean - readonly id?: string - readonly metadata?: { readonly [key: string]: string } - readonly name: string - readonly statement_descriptor?: string - readonly tax_code?: string - readonly unit_label?: string - } - | string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - readonly tiers?: readonly { - readonly flat_amount?: number - /** Format: decimal */ - readonly flat_amount_decimal?: string - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - readonly up_to: 'inf' | number - }[] + readonly automatic_tax?: { + readonly enabled: boolean + } /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - readonly tiers_mode?: 'graduated' | 'volume' + readonly billing_address_collection?: 'auto' | 'required' /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + * consent_collection_params + * @description Configure fields to gather active consent from customers. */ - readonly transform_usage?: { - readonly divide_by: number + readonly consent_collection?: { /** @enum {string} */ - readonly round: 'down' | 'up' + readonly promotions?: 'auto' | 'none' + /** @enum {string} */ + readonly terms_of_service?: 'none' | 'required' } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - readonly trial_period_days?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + readonly currency?: string /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). * @enum {string} */ - readonly usage_type?: 'licensed' | 'metered' - } - } - } - } - /**

Retrieves the plan with the given ID.

*/ - readonly GetPlansPlan: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly plan: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly PostPlansPlan: { - readonly parameters: { - readonly path: { - readonly plan: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - readonly active?: boolean + readonly customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - readonly nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - readonly product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - readonly trial_period_days?: number - } - } - } - } - /**

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

*/ - readonly DeletePlansPlan: { - readonly parameters: { - readonly path: { - readonly plan: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['deleted_plan'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Returns a list of your prices.

*/ - readonly GetPrices: { - readonly parameters: { - readonly query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + readonly line_items: readonly { + /** adjustable_quantity_params */ + readonly adjustable_quantity?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number } - | number - /** Only return prices for the given currency. */ - 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 the price with these lookup_keys, if any exist. */ - readonly lookup_keys?: readonly string[] - /** Only return prices for the given product. */ - readonly product?: string - /** Only return prices with these recurring fields. */ - readonly recurring?: { - /** @enum {string} */ - readonly interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - readonly usage_type?: 'licensed' | 'metered' - } - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - readonly starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - readonly type?: 'one_time' | 'recurring' - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['price'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string + readonly price: string + readonly quantity: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The account on behalf of which to charge. */ + readonly on_behalf_of?: string + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + readonly payment_intent_data?: { + /** @enum {string} */ + readonly capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + readonly setup_future_usage?: 'off_session' | 'on_session' } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - readonly PostPrices: { - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['price'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - readonly active?: boolean /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). * @enum {string} */ - readonly billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - readonly lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - readonly nickname?: string - /** @description The ID of the product that this price will belong to. */ - readonly product?: string + readonly payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + readonly payment_method_types?: readonly ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. */ - readonly product_data?: { - readonly active?: boolean - readonly id?: string - readonly metadata?: { readonly [key: string]: string } - readonly name: string - readonly statement_descriptor?: string - readonly tax_code?: string - readonly unit_label?: string + readonly phone_number_collection?: { + readonly enabled: boolean } /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. */ - readonly recurring?: { - /** @enum {string} */ - readonly aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - /** @enum {string} */ - readonly usage_type?: 'licensed' | 'metered' + readonly shipping_address_collection?: { + readonly allowed_countries: readonly ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] } + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + readonly shipping_options?: readonly { + readonly shipping_rate?: string + }[] /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). * @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - readonly tiers?: readonly { - readonly flat_amount?: number - /** Format: decimal */ - readonly flat_amount_decimal?: string - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - readonly up_to: 'inf' | number - }[] + readonly submit_type?: 'auto' | 'book' | 'donate' | 'pay' /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ - readonly tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - readonly transfer_lookup_key?: boolean + readonly subscription_data?: { + readonly description?: string + readonly trial_period_days?: number + } /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + * tax_id_collection_params + * @description Controls tax ID collection during checkout. */ - readonly transform_quantity?: { - readonly divide_by: number - /** @enum {string} */ - readonly round: 'down' | 'up' + readonly tax_id_collection?: { + readonly enabled: boolean } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - readonly unit_amount?: number /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ - readonly unit_amount_decimal?: string + readonly transfer_data?: { + readonly amount?: number + readonly destination: string + } } } } } - /**

Retrieves the price with the given ID.

*/ - readonly GetPricesPrice: { + /**

Retrieve a payment link.

*/ + readonly GetPaymentLinksPaymentLink: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly price: string + readonly payment_link: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['price'] + readonly 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -36178,18 +41754,18 @@ export interface operations { } } } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - readonly PostPricesPrice: { + /**

Updates a payment link.

*/ + readonly PostPaymentLinksPaymentLink: { readonly parameters: { readonly path: { - readonly price: string + readonly payment_link: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['price'] + readonly 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -36202,259 +41778,379 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ readonly active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - readonly lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description A brief description of the price, hidden from customers. */ - readonly nickname?: string /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * after_completion_params + * @description Behavior after the purchase is complete. */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - readonly transfer_lookup_key?: boolean - } - } - } - } - /**

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

*/ - readonly GetProducts: { - readonly parameters: { - readonly query: { - /** 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number + readonly after_completion?: { + /** after_completion_confirmation_page_params */ + readonly hosted_confirmation?: { + readonly custom_message?: string } - | 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** Only return products with the given IDs. */ - readonly ids?: readonly string[] - /** 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 products that can be shipped (i.e., physical, not digital products). */ - readonly 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. */ - readonly starting_after?: string - /** Only return products with the given url. */ - readonly url?: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['product'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string + /** after_completion_redirect_params */ + readonly redirect?: { + readonly url: string + } + /** @enum {string} */ + readonly type: 'hosted_confirmation' | 'redirect' } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Creates a new product object.

*/ - readonly PostProducts: { - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - readonly active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - readonly description?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - readonly id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - readonly images?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - readonly name: string + /** @description Enables user redeemable promotion codes. */ + readonly allow_promotion_codes?: boolean /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. + * automatic_tax_params + * @description Configuration for automatic tax collection. */ - readonly package_dimensions?: { - readonly height: number - readonly length: number - readonly weight: number - readonly width: number + readonly automatic_tax?: { + readonly enabled: boolean } - /** @description Whether this product is shipped (i.e., physical goods). */ - readonly shippable?: boolean /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. + * @description Configuration for collecting the customer's billing address. + * @enum {string} */ - readonly statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - readonly tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - readonly unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - readonly 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.

*/ - readonly GetProductsId: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly id: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly PostProductsId: { - readonly parameters: { - readonly path: { - readonly id: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['product'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - readonly active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - readonly description?: string + readonly billing_address_collection?: 'auto' | 'required' + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + readonly customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - readonly images?: readonly string[] | '' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - readonly name?: string - /** @description The dimensions of this product for shipping purposes. */ - readonly package_dimensions?: - | { - readonly height: number - readonly length: number - readonly weight: number - readonly width: number - } - | '' - /** @description Whether this product is shipped (i.e., physical goods). */ - readonly shippable?: boolean + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + readonly line_items?: readonly { + /** adjustable_quantity_params */ + readonly adjustable_quantity?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number + } + readonly id: string + readonly quantity?: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + readonly metadata?: { readonly [key: string]: string } /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. * - * 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`. + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} */ - readonly statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - readonly tax_code?: string | '' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - readonly unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - readonly url?: string + readonly payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + readonly payment_method_types?: + | readonly ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @description Configuration for collecting the customer's shipping address. */ + readonly shipping_address_collection?: + | { + readonly allowed_countries: readonly ( + | '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' + )[] + } + | '' } } } } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - readonly DeleteProductsId: { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + readonly GetPaymentLinksPaymentLinkLineItems: { readonly parameters: { + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } readonly path: { - readonly id: string + readonly payment_link: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_product'] + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -36470,26 +42166,11 @@ export interface operations { } } } - /**

Returns a list of your promotion codes.

*/ - readonly GetPromotionCodes: { + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + readonly GetPaymentMethods: { readonly parameters: { readonly query: { - /** Filter promotion codes by whether they are active. */ - readonly active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - readonly code?: string - /** Only return promotion codes for this coupon. */ - readonly coupon?: string - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return promotion codes that are restricted to this customer. */ + /** The ID of the customer whose PaymentMethods 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. */ readonly ending_before?: string @@ -36499,6 +42180,36 @@ export interface operations { readonly limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** A required filter on the list, based on the object `type` field. */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' } } readonly responses: { @@ -36506,7 +42217,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['promotion_code'][] + readonly data: readonly components['schemas']['payment_method'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -36532,13 +42243,17 @@ export interface operations { } } } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - readonly PostPromotionCodes: { + /** + *

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

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + readonly PostPaymentMethods: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['promotion_code'] + readonly 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36551,137 +42266,375 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ - readonly active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - readonly code?: string - /** @description The coupon for this promotion code. */ - readonly coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - readonly customer?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. */ - readonly expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - readonly max_redemptions?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string + } /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. */ - readonly restrictions?: { - readonly first_time_transaction?: boolean - readonly minimum_amount?: number - readonly minimum_amount_currency?: string + readonly affirm?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + */ + readonly alipay?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + readonly bancontact?: { readonly [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + readonly blik?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + readonly boleto?: { + readonly tax_id: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + readonly card?: + | { + readonly cvc?: string + readonly exp_month: number + readonly exp_year: number + readonly number: string + } + | { + readonly token: string + } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + readonly customer?: string + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' } - } - } - } - } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - readonly GetPromotionCodesPromotionCode: { - readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - readonly path: { - readonly promotion_code: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['promotion_code'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - readonly PostPromotionCodesPromotionCode: { - readonly parameters: { - readonly path: { - readonly promotion_code: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['promotion_code'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ - readonly active?: boolean /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + readonly giropay?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + readonly grabpay?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + readonly interac_present?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + readonly konbini?: { readonly [key: string]: unknown } + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + readonly link?: { readonly [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' + readonly metadata?: { readonly [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + readonly oxxo?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** @description The PaymentMethod to share. */ + readonly payment_method?: string + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + readonly paynow?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + readonly pix?: { readonly [key: string]: unknown } + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + readonly promptpay?: { readonly [key: string]: unknown } + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + readonly radar_options?: { + readonly session?: string + } + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + readonly sepa_debit?: { + readonly iban: string + } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + readonly type?: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + readonly wechat_pay?: { readonly [key: string]: unknown } } } } } - /**

Returns a list of your quotes.

*/ - readonly GetQuotes: { + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ + readonly GetPaymentMethodsPaymentMethod: { readonly parameters: { readonly query: { - /** The ID of the customer whose quotes 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. */ - readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** The status of the quote. */ - readonly status?: 'accepted' | 'canceled' | 'draft' | 'open' + } + readonly path: { + readonly payment_method: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['quote'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36697,13 +42650,18 @@ export interface operations { } } } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - readonly PostQuotes: { + /**

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

*/ + readonly PostPaymentMethodsPaymentMethod: { + readonly parameters: { + readonly path: { + readonly payment_method: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['quote'] + readonly 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36716,123 +42674,80 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - readonly application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - readonly application_fee_percent?: number | '' /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. */ - readonly automatic_tax?: { - readonly enabled: boolean + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string } /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - readonly customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - readonly default_tax_rates?: readonly string[] | '' - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - readonly description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - readonly discounts?: - | readonly { - readonly coupon?: string - readonly discount?: string - }[] - | '' + readonly card?: { + readonly exp_month?: number + readonly exp_year?: number + } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. - */ - readonly expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - readonly footer?: string - /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. - */ - readonly from_quote?: { - readonly is_revision?: boolean - readonly quote: string - } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - readonly header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. */ - readonly invoice_settings?: { - readonly days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - readonly line_items?: readonly { - readonly price?: string - /** price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring?: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] + readonly link?: { readonly [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The account on behalf of which to charge. */ - readonly on_behalf_of?: string | '' + readonly metadata?: { readonly [key: string]: string } | '' /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. */ - readonly subscription_data?: { - readonly effective_date?: 'current_period_end' | number | '' - readonly trial_period_days?: number | '' + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - readonly transfer_data?: - | { - readonly amount?: number - readonly amount_percent?: number - readonly destination: string - } - | '' } } } } - /**

Retrieves the quote with the given ID.

*/ - readonly GetQuotesQuote: { + /** + *

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 set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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.

+ */ + readonly PostPaymentMethodsPaymentMethodAttach: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly quote: string + readonly payment_method: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['quote'] + readonly 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36844,170 +42759,27 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + readonly customer: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

A quote models prices and services for a customer.

*/ - readonly PostQuotesQuote: { + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ + readonly PostPaymentMethodsPaymentMethodDetach: { readonly parameters: { readonly path: { - readonly quote: string + readonly payment_method: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - readonly application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - readonly application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - readonly customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - readonly default_tax_rates?: readonly string[] | '' - /** @description A description that will be displayed on the quote PDF. */ - readonly description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - readonly discounts?: - | readonly { - readonly coupon?: string - readonly discount?: string - }[] - | '' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - readonly expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - readonly footer?: string - /** @description A header that will be displayed on the quote PDF. */ - readonly header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - readonly invoice_settings?: { - readonly days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - readonly line_items?: readonly { - readonly id?: string - readonly price?: string - /** price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring?: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The account on behalf of which to charge. */ - readonly on_behalf_of?: string | '' - /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. - */ - readonly subscription_data?: { - readonly effective_date?: 'current_period_end' | number | '' - readonly trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - readonly transfer_data?: - | { - readonly amount?: number - readonly amount_percent?: number - readonly destination: string - } - | '' - } - } - } - } - /**

Accepts the specified quote.

*/ - readonly PostQuotesQuoteAccept: { - readonly parameters: { - readonly path: { - readonly quote: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } - } - } - } - /**

Cancels the quote.

*/ - readonly PostQuotesQuoteCancel: { - readonly parameters: { - readonly path: { - readonly quote: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['quote'] + readonly 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -37026,10 +42798,28 @@ export interface operations { } } } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - readonly GetQuotesQuoteComputedUpfrontLineItems: { + /**

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.

*/ + readonly GetPayouts: { readonly parameters: { readonly query: { + readonly arrival_date?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37038,9 +42828,8 @@ export interface operations { readonly limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } - readonly path: { - readonly quote: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + readonly status?: string } } readonly responses: { @@ -37048,8 +42837,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['item'][] + readonly data: readonly components['schemas']['payout'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -37075,18 +42863,19 @@ export interface operations { } } } - /**

Finalizes the quote.

*/ - readonly PostQuotesQuoteFinalize: { - readonly parameters: { - readonly path: { - readonly quote: string - } - } + /** + *

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.

+ */ + readonly PostPayouts: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['quote'] + readonly 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37099,51 +42888,50 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents representing how much to payout. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + readonly destination?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} */ - readonly expires_at?: number + readonly method?: 'instant' | 'standard' + /** + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} + */ + readonly source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ + readonly statement_descriptor?: string } } } } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - readonly GetQuotesQuoteLineItems: { + /**

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.

*/ + readonly GetPayoutsPayout: { readonly parameters: { readonly 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. */ - readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 } readonly path: { - readonly quote: string + readonly payout: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - /** @description Details about each object. */ - readonly data: readonly components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37159,22 +42947,18 @@ export interface operations { } } } - /**

Download the PDF for a finalized quote

*/ - readonly GetQuotesQuotePdf: { + /**

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.

*/ + readonly PostPayoutsPayout: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly quote: string + readonly payout: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/pdf': string + readonly 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37186,44 +42970,27 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + } } } } - /**

Returns a list of early fraud warnings.

*/ - readonly GetRadarEarlyFraudWarnings: { + /**

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.

*/ + readonly PostPayoutsPayoutCancel: { readonly parameters: { - readonly query: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - readonly 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. */ - readonly starting_after?: string + readonly path: { + readonly payout: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37235,30 +43002,29 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } /** - *

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

+ *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

* - *

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

+ *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

*/ - readonly GetRadarEarlyFraudWarningsEarlyFraudWarning: { + readonly PostPayoutsPayoutReverse: { readonly parameters: { readonly path: { - readonly early_fraud_warning: string - } - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + readonly payout: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.early_fraud_warning'] + readonly 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -37270,14 +43036,22 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + } } } } - /**

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

*/ - readonly GetRadarValueListItems: { + /**

Returns a list of your plans.

*/ + readonly GetPlans: { readonly parameters: { readonly query: { + /** 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?: | { readonly gt?: number @@ -37292,12 +43066,10 @@ export interface operations { readonly expand?: readonly string[] /** 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 plans for the given product. */ + readonly 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. */ readonly starting_after?: string - /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ - readonly value?: string - /** Identifier for the parent value list this item belongs to. */ - readonly value_list: string } } readonly responses: { @@ -37305,7 +43077,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['radar.value_list_item'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['plan'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -37331,13 +43104,13 @@ export interface operations { } } } - /**

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

*/ - readonly PostRadarValueListItems: { + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + readonly PostPlans: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.value_list_item'] + readonly 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -37350,32 +43123,104 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + readonly active?: boolean + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + readonly aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + readonly amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + readonly amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + readonly billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - readonly value: string - /** @description The identifier of the value list which the created item will be added to. */ - readonly value_list: string + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + readonly id?: string + /** + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} + */ + readonly interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + readonly interval_count?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + readonly nickname?: string + readonly product?: + | { + readonly active?: boolean + readonly id?: string + readonly metadata?: { readonly [key: string]: string } + readonly name: string + readonly statement_descriptor?: string + readonly tax_code?: string + readonly unit_label?: string + } + | string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + readonly tiers?: readonly { + readonly flat_amount?: number + /** Format: decimal */ + readonly flat_amount_decimal?: string + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + readonly up_to: 'inf' | number + }[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + readonly tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + readonly transform_usage?: { + readonly divide_by: number + /** @enum {string} */ + readonly round: 'down' | 'up' + } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + readonly trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + readonly usage_type?: 'licensed' | 'metered' } } } } - /**

Retrieves a ValueListItem object.

*/ - readonly GetRadarValueListItemsItem: { + /**

Retrieves the plan with the given ID.

*/ + readonly GetPlansPlan: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly item: string + readonly plan: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.value_list_item'] + readonly 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -37391,18 +43236,58 @@ export interface operations { } } } - /**

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

*/ - readonly DeleteRadarValueListItemsItem: { + /**

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.

*/ + readonly PostPlansPlan: { readonly parameters: { readonly path: { - readonly item: string + readonly plan: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_radar.value_list_item'] + readonly 'application/json': components['schemas']['plan'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Whether the plan is currently available for new subscriptions. */ + readonly active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + readonly nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + readonly product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + readonly trial_period_days?: number + } + } + } + } + /**

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

*/ + readonly DeletePlansPlan: { + readonly parameters: { + readonly path: { + readonly plan: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_plan'] } } /** Error response. */ @@ -37418,14 +43303,13 @@ export interface operations { } } } - /**

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

*/ - readonly GetRadarValueLists: { + /**

Returns a list of your prices.

*/ + readonly GetPrices: { readonly parameters: { readonly query: { - /** The alias used to reference the value list when writing rules. */ - readonly alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - readonly contains?: string + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + 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?: | { readonly gt?: number @@ -37434,14 +43318,29 @@ export interface operations { readonly lte?: number } | number + /** Only return prices for the given currency. */ + 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** 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 the price with these lookup_keys, if any exist. */ + readonly lookup_keys?: readonly string[] + /** Only return prices for the given product. */ + readonly product?: string + /** Only return prices with these recurring fields. */ + readonly recurring?: { + /** @enum {string} */ + readonly interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + readonly usage_type?: 'licensed' | 'metered' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string + /** Only return prices of type `recurring` or `one_time`. */ + readonly type?: 'one_time' | 'recurring' } } readonly responses: { @@ -37449,7 +43348,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['radar.value_list'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['price'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -37475,13 +43375,13 @@ export interface operations { } } } - /**

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

*/ - readonly PostRadarValueLists: { + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + readonly PostPrices: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.value_list'] + readonly 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37494,47 +43394,165 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - readonly alias: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + readonly active?: boolean /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. * @enum {string} */ - readonly item_type?: - | 'card_bin' - | 'card_fingerprint' - | 'case_sensitive_string' - | 'country' - | 'customer_id' - | 'email' - | 'ip_address' - | 'string' + readonly billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: { + readonly [key: string]: { + /** custom_unit_amount */ + readonly custom_unit_amount?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number + readonly preset?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly tiers?: readonly { + readonly flat_amount?: number + /** Format: decimal */ + readonly flat_amount_decimal?: string + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + readonly up_to: 'inf' | number + }[] + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + } + /** + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + */ + readonly custom_unit_amount?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number + readonly preset?: number + } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + readonly lookup_key?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } - /** @description The human-readable name of the value list. */ - readonly name: string + /** @description A brief description of the price, hidden from customers. */ + readonly nickname?: string + /** @description The ID of the product that this price will belong to. */ + readonly product?: string + /** + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. + */ + readonly product_data?: { + readonly active?: boolean + readonly id?: string + readonly metadata?: { readonly [key: string]: string } + readonly name: string + readonly statement_descriptor?: string + readonly tax_code?: string + readonly unit_label?: string + } + /** + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. + */ + readonly recurring?: { + /** @enum {string} */ + readonly aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + /** @enum {string} */ + readonly usage_type?: 'licensed' | 'metered' + } + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + readonly tiers?: readonly { + readonly flat_amount?: number + /** Format: decimal */ + readonly flat_amount_decimal?: string + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + readonly up_to: 'inf' | number + }[] + /** + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} + */ + readonly tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + readonly transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + readonly transform_quantity?: { + readonly divide_by: number + /** @enum {string} */ + readonly round: 'down' | 'up' + } + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + readonly unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + readonly unit_amount_decimal?: string } } } } - /**

Retrieves a ValueList object.

*/ - readonly GetRadarValueListsValueList: { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetPricesSearch: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - } - readonly path: { - readonly value_list: string + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + readonly query: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.value_list'] + readonly 'application/json': { + readonly data: readonly components['schemas']['price'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } } } /** Error response. */ @@ -37550,18 +43568,22 @@ export interface operations { } } } - /**

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.

*/ - readonly PostRadarValueListsValueList: { + /**

Retrieves the price with the given ID.

*/ + readonly GetPricesPrice: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly value_list: string + readonly price: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['radar.value_list'] + readonly 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37573,31 +43595,22 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - readonly alias?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The human-readable name of the value list. */ - readonly name?: string - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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.

*/ - readonly DeleteRadarValueListsValueList: { + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + readonly PostPricesPrice: { readonly parameters: { readonly path: { - readonly value_list: string + readonly price: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_radar.value_list'] + readonly 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -37609,14 +43622,63 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + readonly active?: boolean + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency_options?: + | { + readonly [key: string]: { + /** custom_unit_amount */ + readonly custom_unit_amount?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number + readonly preset?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly tiers?: readonly { + readonly flat_amount?: number + /** Format: decimal */ + readonly flat_amount_decimal?: string + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + readonly up_to: 'inf' | number + }[] + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + readonly lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description A brief description of the price, hidden from customers. */ + readonly nickname?: string + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} + */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + readonly transfer_lookup_key?: boolean + } } } } - /**

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

*/ - readonly GetRecipients: { + /**

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

*/ + readonly GetProducts: { readonly parameters: { readonly query: { + /** 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?: | { readonly gt?: number @@ -37629,13 +43691,16 @@ export interface operations { readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + readonly ids?: readonly string[] /** 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 products that can be shipped (i.e., physical, not digital products). */ + readonly 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. */ readonly starting_after?: string - readonly type?: 'corporation' | 'individual' - /** Only return recipients that are verified or unverified. */ - readonly verified?: boolean + /** Only return products with the given url. */ + readonly url?: string } } readonly responses: { @@ -37643,7 +43708,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['recipient'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['product'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -37669,16 +43735,13 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostRecipients: { + /**

Creates a new product object.

*/ + readonly PostProducts: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['recipient'] + readonly 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37691,30 +43754,145 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - readonly bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - readonly card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + readonly active?: boolean + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + readonly default_price_data?: { + readonly currency: string + readonly currency_options?: { + readonly [key: string]: { + /** custom_unit_amount */ + readonly custom_unit_amount?: { + readonly enabled: boolean + readonly maximum?: number + readonly minimum?: number + readonly preset?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly tiers?: readonly { + readonly flat_amount?: number + /** Format: decimal */ + readonly flat_amount_decimal?: string + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + readonly up_to: 'inf' | number + }[] + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + } + /** recurring_adhoc */ + readonly recurring?: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ readonly description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + readonly id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + readonly images?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. */ readonly name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - readonly tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - readonly type: string + /** + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. + */ + readonly package_dimensions?: { + readonly height: number + readonly length: number + readonly weight: number + readonly width: number + } + /** @description Whether this product is shipped (i.e., physical goods). */ + readonly shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + readonly statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + readonly tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + readonly unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + readonly url?: string + } + } + } + } + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetProductsSearch: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + readonly query: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['product'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] } } } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } } - /**

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

*/ - readonly GetRecipientsId: { + /**

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.

*/ + readonly GetProductsId: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ @@ -37728,7 +43906,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['recipient'] | components['schemas']['deleted_recipient'] + readonly 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37744,14 +43922,8 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostRecipientsId: { + /**

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

*/ + readonly PostProductsId: { readonly parameters: { readonly path: { readonly id: string @@ -37761,7 +43933,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['recipient'] + readonly 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37774,30 +43946,50 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - readonly bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - readonly card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - readonly default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ + /** @description Whether the product is available for purchase. */ + readonly active?: boolean + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + readonly default_price?: string + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ readonly description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - readonly email?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + readonly images?: readonly string[] | '' /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ + /** @description The product's name, meant to be displayable to the customer. */ readonly name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - readonly tax_id?: string + /** @description The dimensions of this product for shipping purposes. */ + readonly package_dimensions?: + | { + readonly height: number + readonly length: number + readonly weight: number + readonly width: number + } + | '' + /** @description Whether this product is shipped (i.e., physical goods). */ + readonly shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + readonly statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + readonly tax_code?: string | '' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + readonly unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + readonly url?: string | '' } } } } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - readonly DeleteRecipientsId: { + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + readonly DeleteProductsId: { readonly parameters: { readonly path: { readonly id: string @@ -37807,7 +43999,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_recipient'] + readonly 'application/json': components['schemas']['deleted_product'] } } /** Error response. */ @@ -37823,12 +44015,17 @@ export interface operations { } } } - /**

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.

*/ - readonly GetRefunds: { + /**

Returns a list of your promotion codes.

*/ + readonly GetPromotionCodes: { readonly parameters: { readonly query: { - /** Only return refunds for the charge specified by this charge ID. */ - readonly charge?: string + /** Filter promotion codes by whether they are active. */ + readonly active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + readonly code?: string + /** Only return promotion codes for this coupon. */ + readonly coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ readonly created?: | { readonly gt?: number @@ -37837,14 +44034,14 @@ export interface operations { readonly lte?: number } | number + /** Only return promotion codes that are restricted to this 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** 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 refunds for the PaymentIntent specified by this ID. */ - readonly 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. */ readonly starting_after?: string } @@ -37854,7 +44051,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['refund'][] + readonly data: readonly components['schemas']['promotion_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -37880,13 +44077,13 @@ export interface operations { } } } - /**

Create a refund.

*/ - readonly PostRefunds: { + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + readonly PostPromotionCodes: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['refund'] + readonly 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37899,37 +44096,59 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - readonly amount?: number - readonly charge?: string + /** @description Whether the promotion code is currently active. */ + readonly active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + readonly code?: string + /** @description The coupon for this promotion code. */ + readonly coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + readonly customer?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + readonly expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + readonly max_redemptions?: number /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - readonly payment_intent?: string - /** @enum {string} */ - readonly reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - readonly refund_application_fee?: boolean - readonly reverse_transfer?: boolean + readonly metadata?: { readonly [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + readonly restrictions?: { + readonly currency_options?: { + readonly [key: string]: { + readonly minimum_amount?: number + } + } + readonly first_time_transaction?: boolean + readonly minimum_amount?: number + readonly minimum_amount_currency?: string + } } } } } - /**

Retrieves the details of an existing refund.

*/ - readonly GetRefundsRefund: { + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + readonly GetPromotionCodesPromotionCode: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly refund: string + readonly promotion_code: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['refund'] + readonly 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37945,22 +44164,18 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostRefundsRefund: { + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + readonly PostPromotionCodesPromotionCode: { readonly parameters: { readonly path: { - readonly refund: string + readonly promotion_code: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['refund'] + readonly 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37973,26 +44188,33 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + readonly active?: boolean /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + readonly restrictions?: { + readonly currency_options?: { + readonly [key: string]: { + readonly minimum_amount?: number + } + } + } } } } } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - readonly GetReportingReportRuns: { + /**

Returns a list of your quotes.

*/ + readonly GetQuotes: { readonly parameters: { readonly query: { - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number + /** The ID of the customer whose quotes 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -38001,6 +44223,10 @@ export interface operations { readonly limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** The status of the quote. */ + readonly status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + readonly test_clock?: string } } readonly responses: { @@ -38008,7 +44234,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['reporting.report_run'][] + readonly data: readonly components['schemas']['quote'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -38034,13 +44260,13 @@ export interface operations { } } } - /**

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

*/ - readonly PostReportingReportRuns: { + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + readonly PostQuotes: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reporting.report_run'] + readonly 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -38053,47 +44279,1224 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + readonly application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + readonly application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + readonly customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + readonly default_tax_rates?: readonly string[] | '' + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + readonly description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - readonly parameters?: { - readonly columns?: readonly string[] - readonly connected_account?: string - readonly currency?: string - /** Format: unix-time */ - readonly interval_end?: number - /** Format: unix-time */ - readonly interval_start?: number - readonly payout?: string - /** @enum {string} */ - readonly reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' + readonly expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + readonly footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + readonly from_quote?: { + readonly is_revision?: boolean + readonly quote: string + } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + readonly header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + readonly line_items?: readonly { + readonly price?: string + /** price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring?: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The account on behalf of which to charge. */ + readonly on_behalf_of?: string | '' + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + readonly subscription_data?: { + readonly description?: string + readonly effective_date?: 'current_period_end' | number | '' + readonly trial_period_days?: number | '' + } + /** @description ID of the test clock to attach to the quote. */ + readonly test_clock?: string + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + readonly transfer_data?: + | { + readonly amount?: number + readonly amount_percent?: number + readonly destination: string + } + | '' + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + readonly GetQuotesQuote: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

A quote models prices and services for a customer.

*/ + readonly PostQuotesQuote: { + readonly parameters: { + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + readonly application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + readonly application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + readonly customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + readonly default_tax_rates?: readonly string[] | '' + /** @description A description that will be displayed on the quote PDF. */ + readonly description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + readonly discounts?: + | readonly { + readonly coupon?: string + readonly discount?: string + }[] + | '' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + readonly expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + readonly footer?: string + /** @description A header that will be displayed on the quote PDF. */ + readonly header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + readonly line_items?: readonly { + readonly id?: string + readonly price?: string + /** price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring?: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The account on behalf of which to charge. */ + readonly on_behalf_of?: string | '' + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + readonly subscription_data?: { + readonly description?: string + readonly effective_date?: 'current_period_end' | number | '' + readonly trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + readonly transfer_data?: + | { + readonly amount?: number + readonly amount_percent?: number + readonly destination: string + } + | '' + } + } + } + } + /**

Accepts the specified quote.

*/ + readonly PostQuotesQuoteAccept: { + readonly parameters: { + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Cancels the quote.

*/ + readonly PostQuotesQuoteCancel: { + readonly parameters: { + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

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

Finalizes the quote.

*/ + readonly PostQuotesQuoteFinalize: { + readonly parameters: { + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + readonly expires_at?: number + } + } + } + } + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

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

Download the PDF for a finalized quote

*/ + readonly GetQuotesQuotePdf: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly quote: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/pdf': string + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

*/ + readonly GetRadarEarlyFraudWarnings: { + readonly parameters: { + readonly query: { + /** Only return early fraud warnings for the charge specified by this charge ID. */ + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + readonly 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['radar.early_fraud_warning'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + readonly GetRadarEarlyFraudWarningsEarlyFraudWarning: { + readonly parameters: { + readonly path: { + readonly early_fraud_warning: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.early_fraud_warning'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly GetRadarValueListItems: { + readonly parameters: { + readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Return items belonging to the parent list whose value matches the specified value (using an "is like" match). */ + readonly value?: string + /** Identifier for the parent value list this item belongs to. */ + readonly value_list: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['radar.value_list_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostRadarValueListItems: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The value of the item (whose type must match the type of the parent value list). */ + readonly value: string + /** @description The identifier of the value list which the created item will be added to. */ + readonly value_list: string + } + } + } + } + /**

Retrieves a ValueListItem object.

*/ + readonly GetRadarValueListItemsItem: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.value_list_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly DeleteRadarValueListItemsItem: { + readonly parameters: { + readonly path: { + readonly item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_radar.value_list_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly GetRadarValueLists: { + readonly parameters: { + readonly query: { + /** The alias used to reference the value list when writing rules. */ + readonly alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + readonly contains?: string + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['radar.value_list'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostRadarValueLists: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + readonly alias: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} + */ + readonly item_type?: + | 'card_bin' + | 'card_fingerprint' + | 'case_sensitive_string' + | 'country' + | 'customer_id' + | 'email' + | 'ip_address' + | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The human-readable name of the value list. */ + readonly name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + readonly GetRadarValueListsValueList: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly value_list: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostRadarValueListsValueList: { + readonly parameters: { + readonly path: { + readonly value_list: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + readonly alias?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The human-readable name of the value list. */ + readonly 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.

*/ + readonly DeleteRadarValueListsValueList: { + readonly parameters: { + readonly path: { + readonly value_list: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly GetRefunds: { + readonly parameters: { + readonly query: { + /** Only return refunds for the charge specified by this charge ID. */ + readonly charge?: string + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 refunds for the PaymentIntent specified by this ID. */ + readonly 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Create a refund.

*/ + readonly PostRefunds: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ + readonly amount?: number + readonly charge?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description Customer whose customer balance to refund from. */ + readonly customer?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Address to send refund email, use customer email if not specified */ + readonly instructions_email?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + readonly origin?: 'customer_balance' + readonly payment_intent?: string + /** @enum {string} */ + readonly reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + readonly refund_application_fee?: boolean + readonly reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + readonly GetRefundsRefund: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly refund: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata as an argument.

+ */ + readonly PostRefundsRefund: { + readonly parameters: { + readonly path: { + readonly refund: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + } + } + } + } + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + readonly PostRefundsRefundCancel: { + readonly parameters: { + readonly path: { + readonly refund: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

*/ + readonly GetReportingReportRuns: { + readonly parameters: { + readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['reporting.report_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostReportingReportRuns: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + readonly parameters?: { + readonly columns?: readonly string[] + readonly connected_account?: string + readonly currency?: string + /** Format: unix-time */ + readonly interval_end?: number + /** Format: unix-time */ + readonly interval_start?: number + readonly payout?: string + /** @enum {string} */ + readonly reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' | 'platform_earning' | 'platform_earning_refund' | 'refund' @@ -38701,28 +46104,3961 @@ export interface operations { | 'WET' | 'Zulu' } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - readonly report_type: string + /** @description 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 + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + readonly GetReportingReportRunsReportRun: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly report_run: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + readonly GetReportingReportTypes: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + readonly GetReportingReportTypesReportType: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly report_type: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly GetReviews: { + readonly parameters: { + readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['review'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves a Review object.

*/ + readonly GetReviewsReview: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly review: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostReviewsReviewApprove: { + readonly parameters: { + readonly path: { + readonly review: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + readonly GetSetupAttempts: { + 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?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 SetupAttempts created by the SetupIntent specified by + * this ID. + */ + readonly setup_intent: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['setup_attempt'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Returns a list of SetupIntents.

*/ + readonly GetSetupIntents: { + readonly parameters: { + readonly query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + readonly attach_to_self?: 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?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 SetupIntents associated with the specified payment method. */ + readonly 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

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

+ */ + readonly PostSetupIntents: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + readonly attach_to_self?: boolean + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + readonly confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + readonly customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + readonly flow_directions?: readonly ('inbound' | 'outbound')[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + readonly mandate_data?: { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** Format: unix-time */ + readonly accepted_at?: number + /** offline_param */ + readonly offline?: { readonly [key: string]: unknown } + /** online_param */ + readonly online?: { + readonly ip_address: string + readonly user_agent: string + } + /** @enum {string} */ + readonly type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + readonly on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + readonly payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + readonly payment_method_data?: { + /** payment_method_param */ + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string + } + /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** param */ + readonly alipay?: { readonly [key: string]: unknown } + /** param */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** param */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** param */ + readonly bancontact?: { readonly [key: string]: unknown } + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ + readonly boleto?: { + readonly tax_id: string + } + /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + readonly giropay?: { readonly [key: string]: unknown } + /** param */ + readonly grabpay?: { readonly [key: string]: unknown } + /** param */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + readonly interac_present?: { readonly [key: string]: unknown } + /** param */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } + readonly metadata?: { readonly [key: string]: string } + /** param */ + readonly oxxo?: { readonly [key: string]: unknown } + /** param */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ + readonly sepa_debit?: { + readonly iban: string + } + /** param */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** param */ + readonly wechat_pay?: { readonly [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + readonly payment_method_options?: { + /** setup_intent_payment_method_options_param */ + readonly acss_debit?: { + /** @enum {string} */ + readonly currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly default_for?: readonly ('invoice' | 'subscription')[] + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + readonly blik?: { + readonly code?: string + } + /** setup_intent_param */ + readonly card?: { + /** setup_intent_mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly currency: string + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + readonly link?: { + readonly persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + readonly sepa_debit?: { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + readonly us_bank_account?: { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + readonly payment_method_types?: readonly string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + readonly return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + readonly single_use?: { + readonly amount: number + readonly currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + readonly 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.

+ */ + readonly GetSetupIntentsIntent: { + readonly parameters: { + readonly query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + readonly client_secret?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly intent: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + readonly PostSetupIntentsIntent: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + readonly attach_to_self?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + readonly customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + readonly flow_directions?: readonly ('inbound' | 'outbound')[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + readonly payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + readonly payment_method_data?: { + /** payment_method_param */ + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string + } + /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** param */ + readonly alipay?: { readonly [key: string]: unknown } + /** param */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** param */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** param */ + readonly bancontact?: { readonly [key: string]: unknown } + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ + readonly boleto?: { + readonly tax_id: string + } + /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + readonly giropay?: { readonly [key: string]: unknown } + /** param */ + readonly grabpay?: { readonly [key: string]: unknown } + /** param */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + readonly interac_present?: { readonly [key: string]: unknown } + /** param */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } + readonly metadata?: { readonly [key: string]: string } + /** param */ + readonly oxxo?: { readonly [key: string]: unknown } + /** param */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ + readonly sepa_debit?: { + readonly iban: string + } + /** param */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** param */ + readonly wechat_pay?: { readonly [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + readonly payment_method_options?: { + /** setup_intent_payment_method_options_param */ + readonly acss_debit?: { + /** @enum {string} */ + readonly currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly default_for?: readonly ('invoice' | 'subscription')[] + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + readonly blik?: { + readonly code?: string + } + /** setup_intent_param */ + readonly card?: { + /** setup_intent_mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly currency: string + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + readonly link?: { + readonly persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + readonly sepa_debit?: { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + readonly us_bank_account?: { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + readonly payment_method_types?: readonly string[] + } + } + } + } + /** + *

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

+ * + *

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

+ */ + readonly PostSetupIntentsIntentCancel: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + readonly cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly 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.

+ */ + readonly PostSetupIntentsIntentConfirm: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + readonly client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description This hash contains details about the Mandate to create */ + readonly mandate_data?: + | { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** Format: unix-time */ + readonly accepted_at?: number + /** offline_param */ + readonly offline?: { readonly [key: string]: unknown } + /** online_param */ + readonly online?: { + readonly ip_address: string + readonly user_agent: string + } + /** @enum {string} */ + readonly type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + readonly customer_acceptance: { + /** online_param */ + readonly online: { + readonly ip_address?: string + readonly user_agent?: string + } + /** @enum {string} */ + readonly type: 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + readonly payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + readonly payment_method_data?: { + /** payment_method_param */ + readonly acss_debit?: { + readonly account_number: string + readonly institution_number: string + readonly transit_number: string + } + /** param */ + readonly affirm?: { readonly [key: string]: unknown } + /** param */ + readonly afterpay_clearpay?: { readonly [key: string]: unknown } + /** param */ + readonly alipay?: { readonly [key: string]: unknown } + /** param */ + readonly au_becs_debit?: { + readonly account_number: string + readonly bsb_number: string + } + /** param */ + readonly bacs_debit?: { + readonly account_number?: string + readonly sort_code?: string + } + /** param */ + readonly bancontact?: { readonly [key: string]: unknown } + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + /** param */ + readonly blik?: { readonly [key: string]: unknown } + /** param */ + readonly boleto?: { + readonly tax_id: string + } + /** param */ + readonly customer_balance?: { readonly [key: string]: unknown } + /** param */ + readonly eps?: { + /** @enum {string} */ + readonly bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + readonly fpx?: { + /** @enum {string} */ + readonly bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + readonly giropay?: { readonly [key: string]: unknown } + /** param */ + readonly grabpay?: { readonly [key: string]: unknown } + /** param */ + readonly ideal?: { + /** @enum {string} */ + readonly bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + readonly interac_present?: { readonly [key: string]: unknown } + /** param */ + readonly klarna?: { + /** date_of_birth */ + readonly dob?: { + readonly day: number + readonly month: number + readonly year: number + } + } + /** param */ + readonly konbini?: { readonly [key: string]: unknown } + /** param */ + readonly link?: { readonly [key: string]: unknown } + readonly metadata?: { readonly [key: string]: string } + /** param */ + readonly oxxo?: { readonly [key: string]: unknown } + /** param */ + readonly p24?: { + /** @enum {string} */ + readonly bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + readonly paynow?: { readonly [key: string]: unknown } + /** param */ + readonly pix?: { readonly [key: string]: unknown } + /** param */ + readonly promptpay?: { readonly [key: string]: unknown } + /** radar_options */ + readonly radar_options?: { + readonly session?: string + } + /** param */ + readonly sepa_debit?: { + readonly iban: string + } + /** param */ + readonly sofort?: { + /** @enum {string} */ + readonly country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + readonly type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + /** param */ + readonly wechat_pay?: { readonly [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + readonly payment_method_options?: { + /** setup_intent_payment_method_options_param */ + readonly acss_debit?: { + /** @enum {string} */ + readonly currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + readonly mandate_options?: { + readonly custom_mandate_url?: string | '' + readonly default_for?: readonly ('invoice' | 'subscription')[] + readonly interval_description?: string + /** @enum {string} */ + readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + readonly blik?: { + readonly code?: string + } + /** setup_intent_param */ + readonly card?: { + /** setup_intent_mandate_options_param */ + readonly mandate_options?: { + readonly amount: number + /** @enum {string} */ + readonly amount_type: 'fixed' | 'maximum' + readonly currency: string + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + readonly interval_count?: number + readonly reference: string + /** Format: unix-time */ + readonly start_date: number + readonly supported_types?: readonly 'india'[] + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + readonly link?: { + readonly persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + readonly sepa_debit?: { + /** payment_method_options_mandate_options_param */ + readonly mandate_options?: { readonly [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + readonly us_bank_account?: { + /** linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + readonly return_url?: string + } + /** networks_options_param */ + readonly networks?: { + readonly requested?: readonly ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + readonly return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + readonly PostSetupIntentsIntentVerifyMicrodeposits: { + readonly parameters: { + readonly path: { + readonly intent: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + readonly amounts?: readonly number[] + /** @description The client secret of the SetupIntent. */ + readonly client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + readonly descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + readonly GetShippingRates: { + readonly parameters: { + readonly query: { + /** Only return shipping rates that are active or inactive. */ + 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?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** Only return shipping rates for the given currency. */ + 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + readonly PostShippingRates: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + readonly delivery_estimate?: { + /** delivery_estimate_bound */ + readonly maximum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } + /** delivery_estimate_bound */ + readonly minimum?: { + /** @enum {string} */ + readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + readonly value: number + } + } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + readonly display_name: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + readonly fixed_amount?: { + readonly amount: number + readonly currency: string + readonly currency_options?: { + readonly [key: string]: { + readonly amount: number + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + readonly tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + readonly type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + readonly GetShippingRatesShippingRateToken: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly shipping_rate_token: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + readonly PostShippingRatesShippingRateToken: { + readonly parameters: { + readonly path: { + readonly shipping_rate_token: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + readonly active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + readonly fixed_amount?: { + readonly currency_options?: { + readonly [key: string]: { + readonly amount?: number + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + } + /**

Returns a list of scheduled query runs.

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

Retrieves the details of an scheduled query run.

*/ + readonly GetSigmaScheduledQueryRunsScheduledQueryRun: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly scheduled_query_run: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly GetSkus: { + readonly parameters: { + readonly query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + readonly 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`. */ + readonly attributes?: { readonly [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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** Only return SKUs with the given IDs. */ + readonly ids?: readonly 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. */ + readonly 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. */ + readonly limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + readonly 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + readonly PostSkus: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + readonly active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + readonly attributes?: { readonly [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + readonly id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + readonly image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + readonly inventory: { + readonly quantity?: number + /** @enum {string} */ + readonly type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + readonly value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + readonly package_dimensions?: { + readonly height: number + readonly length: number + readonly weight: number + readonly width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + readonly price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + readonly 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.

*/ + readonly GetSkusId: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + readonly PostSkusId: { + readonly parameters: { + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + readonly active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + readonly attributes?: { readonly [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + readonly image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + readonly inventory?: { + readonly quantity?: number + /** @enum {string} */ + readonly type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + readonly value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description The dimensions of this SKU for shipping purposes. */ + readonly package_dimensions?: + | { + readonly height: number + readonly length: number + readonly weight: number + readonly width: number + } + | '' + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + readonly price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + readonly product?: string + } + } + } + } + /**

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

*/ + readonly DeleteSkusId: { + readonly parameters: { + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + readonly PostSources: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + readonly amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + readonly currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + readonly customer?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + readonly flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + readonly mandate?: { + /** mandate_acceptance_params */ + readonly acceptance?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + /** mandate_offline_acceptance_params */ + readonly offline?: { + readonly contact_email: string + } + /** mandate_online_acceptance_params */ + readonly online?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + /** @enum {string} */ + readonly status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + readonly type?: 'offline' | 'online' + readonly user_agent?: string + } + readonly amount?: number | '' + readonly currency?: string + /** @enum {string} */ + readonly interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + readonly notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + readonly metadata?: { readonly [key: string]: string } + /** @description The source to share. */ + readonly original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + readonly owner?: { + /** source_address */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + readonly email?: string + readonly name?: string + readonly phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + readonly receiver?: { + /** @enum {string} */ + readonly refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + readonly redirect?: { + readonly return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + readonly source_order?: { + readonly items?: readonly { + readonly amount?: number + readonly currency?: string + readonly description?: string + readonly parent?: string + readonly quantity?: number + /** @enum {string} */ + readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + readonly shipping?: { + /** address */ + 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 + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + readonly statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + readonly token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + readonly type?: string + /** @enum {string} */ + readonly 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.

*/ + readonly GetSourcesSource: { + readonly parameters: { + readonly query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + readonly client_secret?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly source: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

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

+ */ + readonly PostSourcesSource: { + readonly parameters: { + readonly path: { + readonly source: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + readonly amount?: number + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + readonly mandate?: { + /** mandate_acceptance_params */ + readonly acceptance?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + /** mandate_offline_acceptance_params */ + readonly offline?: { + readonly contact_email: string + } + /** mandate_online_acceptance_params */ + readonly online?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + /** @enum {string} */ + readonly status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + readonly type?: 'offline' | 'online' + readonly user_agent?: string + } + readonly amount?: number | '' + readonly currency?: string + /** @enum {string} */ + readonly interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + readonly notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + readonly owner?: { + /** source_address */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + readonly email?: string + readonly name?: string + readonly phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + readonly source_order?: { + readonly items?: readonly { + readonly amount?: number + readonly currency?: string + readonly description?: string + readonly parent?: string + readonly quantity?: number + /** @enum {string} */ + readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + readonly shipping?: { + /** address */ + 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 + } + } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + readonly GetSourcesSourceMandateNotificationsMandateNotification: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly mandate_notification: string + readonly source: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

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

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

*/ + readonly GetSourcesSourceSourceTransactionsSourceTransaction: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly source: string + readonly source_transaction: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + readonly PostSourcesSourceVerify: { + readonly parameters: { + readonly path: { + readonly source: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The values needed to verify the source. */ + readonly values: readonly string[] + } + } + } + } + /**

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

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

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

*/ + readonly PostSubscriptionItems: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + readonly price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + readonly proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + readonly quantity?: number + /** @description The identifier of the subscription to modify. */ + readonly subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + readonly tax_rates?: readonly string[] | '' + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + readonly GetSubscriptionItemsItem: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostSubscriptionItemsItem: { + readonly parameters: { + readonly path: { + readonly item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + readonly off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + readonly price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + readonly proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + readonly quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + readonly tax_rates?: readonly string[] | '' + } + } + } + } + /**

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

*/ + readonly DeleteSubscriptionItemsItem: { + readonly parameters: { + readonly path: { + readonly item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + readonly clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + readonly proration_date?: number + } + } + } + } + /** + *

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

+ * + *

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

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

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

+ * + *

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

+ * + *

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

+ * + *

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

+ */ + readonly PostSubscriptionItemsSubscriptionItemUsageRecords: { + readonly parameters: { + readonly path: { + readonly subscription_item: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + readonly action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The usage quantity for the specified timestamp. */ + readonly quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + readonly timestamp?: 'now' | number + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + readonly GetSubscriptionSchedules: { + readonly parameters: { + readonly query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + readonly canceled_at?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** Only return subscription schedules that completed during the given date interval. */ + readonly completed_at?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** Only return subscription schedules that were created during the given date interval. */ + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ + readonly starting_after?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostSubscriptionSchedules: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + readonly customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + readonly default_settings?: { + readonly application_fee_percent?: number + /** automatic_tax_config */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** @enum {string} */ + readonly billing_cycle_anchor?: 'automatic' | 'phase_start' + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + readonly default_payment_method?: string + readonly description?: string + /** subscription_schedules_param */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + readonly transfer_data?: + | { + readonly amount_percent?: number + readonly destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + readonly end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + readonly from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + readonly phases?: readonly { + readonly add_invoice_items?: readonly { + readonly price?: string + /** one_time_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + readonly application_fee_percent?: number + /** automatic_tax_config */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** @enum {string} */ + readonly billing_cycle_anchor?: 'automatic' | 'phase_start' + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + readonly coupon?: string + readonly currency?: string + readonly default_payment_method?: string + readonly default_tax_rates?: readonly string[] | '' + readonly description?: string + /** Format: unix-time */ + readonly end_date?: number + /** subscription_schedules_param */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + readonly items: readonly { + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + readonly price?: string + /** recurring_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + readonly iterations?: number + readonly metadata?: { readonly [key: string]: string } + /** @enum {string} */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + readonly transfer_data?: { + readonly amount_percent?: number + readonly destination: string + } + readonly trial?: boolean + /** Format: unix-time */ + readonly trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + readonly start_date?: number | 'now' + } + } + } + } + /**

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

*/ + readonly GetSubscriptionSchedulesSchedule: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly schedule: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + readonly PostSubscriptionSchedulesSchedule: { + readonly parameters: { + readonly path: { + readonly schedule: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + readonly default_settings?: { + readonly application_fee_percent?: number + /** automatic_tax_config */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** @enum {string} */ + readonly billing_cycle_anchor?: 'automatic' | 'phase_start' + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + readonly default_payment_method?: string + readonly description?: string + /** subscription_schedules_param */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + readonly transfer_data?: + | { + readonly amount_percent?: number + readonly destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + readonly end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + readonly phases?: readonly { + readonly add_invoice_items?: readonly { + readonly price?: string + /** one_time_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + readonly application_fee_percent?: number + /** automatic_tax_config */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** @enum {string} */ + readonly billing_cycle_anchor?: 'automatic' | 'phase_start' + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + readonly coupon?: string + readonly default_payment_method?: string + readonly default_tax_rates?: readonly string[] | '' + readonly description?: string + readonly end_date?: number | 'now' + /** subscription_schedules_param */ + readonly invoice_settings?: { + readonly days_until_due?: number + } + readonly items: readonly { + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + readonly price?: string + /** recurring_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + readonly iterations?: number + readonly metadata?: { readonly [key: string]: string } + /** @enum {string} */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + readonly start_date?: number | 'now' + /** transfer_data_specs */ + readonly transfer_data?: { + readonly amount_percent?: number + readonly destination: string + } + readonly trial?: boolean + readonly trial_end?: number | 'now' + }[] + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + readonly 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.

*/ + readonly PostSubscriptionSchedulesScheduleCancel: { + readonly parameters: { + readonly path: { + readonly schedule: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + readonly invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + readonly 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.

*/ + readonly PostSubscriptionSchedulesScheduleRelease: { + readonly parameters: { + readonly path: { + readonly schedule: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + readonly 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.

*/ + readonly GetSubscriptions: { + readonly parameters: { + 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?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + readonly current_period_end?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + readonly current_period_start?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** Filter for subscriptions that contain this recurring price ID. */ + readonly price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + readonly starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + readonly status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + readonly test_clock?: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ + readonly PostSubscriptions: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + readonly add_invoice_items?: readonly { + readonly price?: string + /** one_time_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + readonly application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + readonly backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + readonly billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + readonly cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + readonly cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + readonly coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency?: string + /** @description The identifier of the customer to subscribe. */ + readonly customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + readonly days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + readonly default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + readonly default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + readonly default_tax_rates?: readonly string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + readonly items?: readonly { + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + readonly metadata?: { readonly [key: string]: string } + readonly price?: string + /** recurring_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + readonly off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + readonly payment_settings?: { + /** payment_method_options */ + readonly payment_method_options?: { + readonly acss_debit?: + | { + /** mandate_options_param */ + readonly mandate_options?: { + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly bancontact?: + | { + /** @enum {string} */ + readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + readonly card?: + | { + /** mandate_options_param */ + readonly mandate_options?: { + readonly amount?: number + /** @enum {string} */ + readonly amount_type?: 'fixed' | 'maximum' + readonly description?: string + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + } + | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + readonly payment_method_types?: + | readonly ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + readonly save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + readonly pending_invoice_item_interval?: + | { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + readonly promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + readonly transfer_data?: { + readonly amount_percent?: number + readonly destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + readonly trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + readonly trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + readonly trial_period_days?: number } } } } - /**

Retrieves the details of an existing Report Run.

*/ - readonly GetReportingReportRunsReportRun: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + readonly GetSubscriptionsSearch: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + readonly page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + readonly query: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + readonly data: readonly components['schemas']['subscription'][] + readonly has_more: boolean + readonly next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + readonly object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + readonly total_count?: number + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + readonly GetSubscriptionsSubscriptionExposedId: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly report_run: string + readonly subscription_exposed_id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reporting.report_run'] + readonly 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -38738,12 +50074,361 @@ export interface operations { } } } - /**

Returns a full list of Report Types.

*/ - readonly GetReportingReportTypes: { + /**

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.

*/ + readonly PostSubscriptionsSubscriptionExposedId: { + readonly parameters: { + readonly path: { + readonly subscription_exposed_id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + readonly add_invoice_items?: readonly { + readonly price?: string + /** one_time_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + readonly application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + readonly automatic_tax?: { + readonly enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + readonly billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + readonly billing_thresholds?: + | { + readonly amount_gte?: number + readonly reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + readonly cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + readonly cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + readonly collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + readonly coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + readonly days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + readonly default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + readonly default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + readonly default_tax_rates?: readonly string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + readonly items?: readonly { + readonly billing_thresholds?: + | { + readonly usage_gte: number + } + | '' + readonly clear_usage?: boolean + readonly deleted?: boolean + readonly id?: string + readonly metadata?: { readonly [key: string]: string } | '' + readonly price?: string + /** recurring_price_data */ + readonly price_data?: { + readonly currency: string + readonly product: string + /** recurring_adhoc */ + readonly recurring: { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + /** @enum {string} */ + readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + readonly unit_amount?: number + /** Format: decimal */ + readonly unit_amount_decimal?: string + } + readonly quantity?: number + readonly tax_rates?: readonly string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + readonly off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + readonly pause_collection?: + | { + /** @enum {string} */ + readonly behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + readonly resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + readonly payment_settings?: { + /** payment_method_options */ + readonly payment_method_options?: { + readonly acss_debit?: + | { + /** mandate_options_param */ + readonly mandate_options?: { + /** @enum {string} */ + readonly transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + readonly bancontact?: + | { + /** @enum {string} */ + readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + readonly card?: + | { + /** mandate_options_param */ + readonly mandate_options?: { + readonly amount?: number + /** @enum {string} */ + readonly amount_type?: 'fixed' | 'maximum' + readonly description?: string + } + /** @enum {string} */ + readonly network?: + | 'amex' + | 'cartes_bancaires' + | 'diners' + | 'discover' + | 'interac' + | 'jcb' + | 'mastercard' + | 'unionpay' + | 'unknown' + | 'visa' + /** @enum {string} */ + readonly request_three_d_secure?: 'any' | 'automatic' + } + | '' + readonly customer_balance?: + | { + /** bank_transfer_param */ + readonly bank_transfer?: { + /** eu_bank_transfer_param */ + readonly eu_bank_transfer?: { + readonly country: string + } + readonly type?: string + } + readonly funding_type?: string + } + | '' + readonly konbini?: { readonly [key: string]: unknown } | '' + readonly us_bank_account?: + | { + /** invoice_linked_account_options_param */ + readonly financial_connections?: { + readonly permissions?: readonly ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + readonly payment_method_types?: + | readonly ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + readonly save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + readonly pending_invoice_item_interval?: + | { + /** @enum {string} */ + readonly interval: 'day' | 'month' | 'week' | 'year' + readonly interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + readonly promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + readonly proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + readonly transfer_data?: + | { + readonly amount_percent?: number + readonly destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + readonly trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + readonly 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.

+ */ + readonly DeleteSubscriptionsSubscriptionExposedId: { + readonly parameters: { + readonly path: { + readonly subscription_exposed_id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + readonly invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + readonly prorate?: boolean + } + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + readonly DeleteSubscriptionsSubscriptionExposedIdDiscount: { + readonly parameters: { + readonly path: { + readonly subscription_exposed_id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + readonly GetTaxCodes: { readonly parameters: { readonly 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. */ + readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 } } readonly responses: { @@ -38751,7 +50436,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['reporting.report_type'][] + readonly data: readonly components['schemas']['tax_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -38777,22 +50462,22 @@ export interface operations { } } } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - readonly GetReportingReportTypesReportType: { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + readonly GetTaxCodesId: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly report_type: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['reporting.report_type'] + readonly 'application/json': components['schemas']['tax_code'] } } /** Error response. */ @@ -38808,10 +50493,13 @@ export interface operations { } } } - /**

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.

*/ - readonly GetReviews: { + /**

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

*/ + readonly GetTaxRates: { readonly parameters: { readonly query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + readonly active?: boolean + /** Optional range for filtering created date. */ readonly created?: | { readonly gt?: number @@ -38824,6 +50512,8 @@ export interface operations { readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ + readonly inclusive?: boolean /** 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 /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ @@ -38835,7 +50525,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['review'][] + readonly data: readonly components['schemas']['tax_rate'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -38855,28 +50545,76 @@ export interface operations { } } } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates a new tax rate.

*/ + readonly PostTaxRates: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + readonly active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + readonly country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + readonly description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + readonly display_name: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + readonly inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + readonly jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description This represents the tax rate percent out of 100. */ + readonly percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + readonly state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + readonly tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } } - /**

Retrieves a Review object.

*/ - readonly GetReviewsReview: { + /**

Retrieves a tax rate with the given ID

*/ + readonly GetTaxRatesTaxRate: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly review: string + readonly tax_rate: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['review'] + readonly 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38892,18 +50630,18 @@ export interface operations { } } } - /**

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

*/ - readonly PostReviewsReviewApprove: { + /**

Updates an existing tax rate.

*/ + readonly PostTaxRatesTaxRate: { readonly parameters: { readonly path: { - readonly review: string + readonly tax_rate: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['review'] + readonly 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38916,40 +50654,43 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + readonly active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + readonly country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + readonly description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + readonly display_name?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + readonly jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + readonly state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + readonly tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - readonly GetSetupAttempts: { + /**

Returns a list of Configuration objects.

*/ + readonly GetTerminalConfigurations: { 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** if present, only return the account default or non-default configurations. */ + readonly is_account_default?: boolean /** 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 SetupAttempts created by the SetupIntent specified by - * this ID. - */ - readonly setup_intent: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ readonly starting_after?: string } @@ -38959,7 +50700,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['setup_attempt'][] + readonly data: readonly components['schemas']['terminal.configuration'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -38985,49 +50726,150 @@ export interface operations { } } } - /**

Returns a list of SetupIntents.

*/ - readonly GetSetupIntents: { + /**

Creates a new Configuration object.

*/ + readonly PostTerminalConfigurations: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['terminal.configuration'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + readonly bbpos_wisepos_e?: { + readonly splashscreen?: string | '' + } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Tipping configurations for readers supporting on-reader tips */ + readonly tipping?: + | { + /** currency_specific_config */ + readonly aud?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly cad?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly chf?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly czk?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly dkk?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly eur?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly gbp?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly hkd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly myr?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly nok?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly nzd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly sek?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly sgd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly usd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + } + | '' + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + readonly verifone_p400?: { + readonly splashscreen?: string | '' + } + } + } + } + } + /**

Retrieves a Configuration object.

*/ + readonly GetTerminalConfigurationsConfiguration: { readonly parameters: { + readonly path: { + readonly configuration: string + } 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** 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. */ - readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** 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 SetupIntents associated with the specified payment method. */ - readonly 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. */ - readonly starting_after?: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39043,18 +50885,18 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostSetupIntents: { + /**

Updates a new Configuration object.

*/ + readonly PostTerminalConfigurationsConfiguration: { + readonly parameters: { + readonly path: { + readonly configuration: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39067,122 +50909,125 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - readonly confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - readonly customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + readonly bbpos_wisepos_e?: + | { + readonly splashscreen?: string | '' + } + | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - readonly mandate_data?: { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** Format: unix-time */ - readonly accepted_at?: number - /** offline_param */ - readonly offline?: { readonly [key: string]: unknown } - /** online_param */ - readonly online?: { - readonly ip_address: string - readonly user_agent: string + /** @description Tipping configurations for readers supporting on-reader tips */ + readonly tipping?: + | { + /** currency_specific_config */ + readonly aud?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly cad?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly chf?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly czk?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly dkk?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly eur?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly gbp?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly hkd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly myr?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly nok?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly nzd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly sek?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly sgd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } + /** currency_specific_config */ + readonly usd?: { + readonly fixed_amounts?: readonly number[] + readonly percentages?: readonly number[] + readonly smart_tip_threshold?: number + } } - /** @enum {string} */ - readonly type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - readonly on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - readonly payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - readonly payment_method_options?: { - /** setup_intent_payment_method_options_param */ - readonly acss_debit?: { - /** @enum {string} */ - readonly currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - readonly mandate_options?: { - readonly custom_mandate_url?: string | '' - readonly default_for?: readonly ('invoice' | 'subscription')[] - readonly interval_description?: string - /** @enum {string} */ - readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' + | '' + /** @description An object containing device type specific settings for Verifone P400 readers */ + readonly verifone_p400?: + | { + readonly splashscreen?: string | '' } - /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - readonly card?: { - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - readonly sepa_debit?: { - /** payment_method_options_mandate_options_param */ - readonly mandate_options?: { readonly [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - readonly payment_method_types?: readonly string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - readonly return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - readonly single_use?: { - readonly amount: number - readonly currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - readonly 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.

- */ - readonly GetSetupIntentsIntent: { + /**

Deletes a Configuration object.

*/ + readonly DeleteTerminalConfigurationsConfiguration: { readonly parameters: { - readonly query: { - /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ - readonly client_secret?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly intent: string + readonly configuration: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39198,18 +51043,13 @@ export interface operations { } } } - /**

Updates a SetupIntent object.

*/ - readonly PostSetupIntentsIntent: { - readonly parameters: { - readonly path: { - readonly intent: string - } - } + /**

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.

*/ + readonly PostTerminalConnectionTokens: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': components['schemas']['terminal.connection_token'] } } /** Error response. */ @@ -39222,75 +51062,44 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - readonly customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - readonly payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - readonly payment_method_options?: { - /** setup_intent_payment_method_options_param */ - readonly acss_debit?: { - /** @enum {string} */ - readonly currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - readonly mandate_options?: { - readonly custom_mandate_url?: string | '' - readonly default_for?: readonly ('invoice' | 'subscription')[] - readonly interval_description?: string - /** @enum {string} */ - readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - readonly card?: { - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - readonly sepa_debit?: { - /** payment_method_options_mandate_options_param */ - readonly mandate_options?: { readonly [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - readonly payment_method_types?: readonly string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + readonly location?: string } } } } - /** - *

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

- * - *

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

- */ - readonly PostSetupIntentsIntentCancel: { + /**

Returns a list of Location objects.

*/ + readonly GetTerminalLocations: { readonly parameters: { - readonly path: { - readonly intent: string + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': { + readonly data: readonly components['schemas']['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -39302,44 +51111,20 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - readonly cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } /** - *

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.

+ *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

*/ - readonly PostSetupIntentsIntentConfirm: { - readonly parameters: { - readonly path: { - readonly intent: string - } - } + readonly PostTerminalLocations: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': components['schemas']['terminal.location'] } } /** Error response. */ @@ -39352,97 +51137,73 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - readonly client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description This hash contains details about the Mandate to create */ - readonly mandate_data?: - | { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** Format: unix-time */ - readonly accepted_at?: number - /** offline_param */ - readonly offline?: { readonly [key: string]: unknown } - /** online_param */ - readonly online?: { - readonly ip_address: string - readonly user_agent: string - } - /** @enum {string} */ - readonly type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - readonly customer_acceptance: { - /** online_param */ - readonly online: { - readonly ip_address?: string - readonly user_agent?: string - } - /** @enum {string} */ - readonly type: 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - readonly payment_method?: string /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. + * create_location_address_param + * @description The full address of the location. */ - readonly payment_method_options?: { - /** setup_intent_payment_method_options_param */ - readonly acss_debit?: { - /** @enum {string} */ - readonly currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - readonly mandate_options?: { - readonly custom_mandate_url?: string | '' - readonly default_for?: readonly ('invoice' | 'subscription')[] - readonly interval_description?: string - /** @enum {string} */ - readonly payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - readonly card?: { - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - readonly sepa_debit?: { - /** payment_method_options_mandate_options_param */ - readonly mandate_options?: { readonly [key: string]: unknown } - } + readonly address: { + readonly city?: string + readonly country: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - readonly return_url?: string + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + readonly configuration_overrides?: string + /** @description A name for the location. */ + readonly display_name: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Location object.

*/ + readonly GetTerminalLocationsLocation: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly location: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] } } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } } } - /**

Verifies microdeposits on a SetupIntent object.

*/ - readonly PostSetupIntentsIntentVerifyMicrodeposits: { + /**

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

*/ + readonly PostTerminalLocationsLocation: { readonly parameters: { readonly path: { - readonly intent: string + readonly location: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['setup_intent'] + readonly 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] } } /** Error response. */ @@ -39455,41 +51216,75 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - readonly amounts?: readonly number[] - /** @description The client secret of the SetupIntent. */ - readonly client_secret?: string + /** + * optional_fields_address + * @description The full address of the location. + */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + readonly configuration_overrides?: string + /** @description A name for the location. */ + readonly display_name?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' } } } } - /**

Returns a list of your shipping rates.

*/ - readonly GetShippingRates: { + /**

Deletes a Location object.

*/ + readonly DeleteTerminalLocationsLocation: { + readonly parameters: { + readonly path: { + readonly location: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + readonly GetTerminalReaders: { readonly parameters: { readonly query: { - /** Only return shipping rates that are active or inactive. */ - 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return shipping rates for the given currency. */ - readonly currency?: string + /** Filters readers by device type */ + readonly device_type?: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | '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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** 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 + /** A location ID to filter the response list to only readers at the specific location */ + readonly 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. */ readonly starting_after?: string + /** A status filter to filter readers to only offline or online readers */ + readonly status?: 'offline' | 'online' } } readonly responses: { @@ -39497,7 +51292,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['shipping_rate'][] + /** @description A list of readers */ + readonly data: readonly components['schemas']['terminal.reader'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -39523,13 +51319,13 @@ export interface operations { } } } - /**

Creates a new shipping rate object.

*/ - readonly PostShippingRates: { + /**

Creates a new Reader object.

*/ + readonly PostTerminalReaders: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['shipping_rate'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39542,70 +51338,36 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - readonly delivery_estimate?: { - /** delivery_estimate_bound */ - readonly maximum?: { - /** @enum {string} */ - readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - readonly value: number - } - /** delivery_estimate_bound */ - readonly minimum?: { - /** @enum {string} */ - readonly unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - readonly value: number - } - } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - readonly display_name: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - readonly fixed_amount?: { - readonly amount: number - readonly currency: string - } + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + readonly label?: string + /** @description The location to assign the reader to. */ + readonly location?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - readonly tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - readonly type?: 'fixed_amount' + readonly metadata?: { readonly [key: string]: string } | '' + /** @description A code generated by the reader used for registering to an account. */ + readonly registration_code: string } } } } - /**

Returns the shipping rate object with the given ID.

*/ - readonly GetShippingRatesShippingRateToken: { + /**

Retrieves a Reader object.

*/ + readonly GetTerminalReadersReader: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly shipping_rate_token: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['shipping_rate'] + readonly 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39621,18 +51383,18 @@ export interface operations { } } } - /**

Updates an existing shipping rate object.

*/ - readonly PostShippingRatesShippingRateToken: { + /**

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

*/ + readonly PostTerminalReadersReader: { readonly parameters: { readonly path: { - readonly shipping_rate_token: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['shipping_rate'] + readonly 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39645,46 +51407,28 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - readonly active?: boolean /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description The new label of the reader. */ + readonly label?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' } } } } - /**

Returns a list of scheduled query runs.

*/ - readonly GetSigmaScheduledQueryRuns: { + /**

Deletes a Reader object.

*/ + readonly DeleteTerminalReadersReader: { readonly parameters: { - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + readonly path: { + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39700,22 +51444,18 @@ export interface operations { } } } - /**

Retrieves the details of an scheduled query run.

*/ - readonly GetSigmaScheduledQueryRunsScheduledQueryRun: { + /**

Cancels the current reader action.

*/ + readonly PostTerminalReadersReaderCancelAction: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly scheduled_query_run: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['scheduled_query_run'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39727,72 +51467,25 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

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

*/ - readonly GetSkus: { + /**

Initiates a payment flow on a Reader.

*/ + readonly PostTerminalReadersReaderProcessPaymentIntent: { readonly parameters: { - readonly query: { - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - readonly 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`. */ - readonly attributes?: { readonly [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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** Only return SKUs with the given IDs. */ - readonly ids?: readonly 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. */ - readonly 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. */ - readonly limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - readonly 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. */ - readonly starting_after?: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly path: { + readonly reader: string } } - } - /**

Creates a new SKU associated with a product.

*/ - readonly PostSkus: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['sku'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39805,65 +51498,33 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - readonly active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - readonly attributes?: { readonly [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - readonly id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - readonly image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - readonly inventory: { - readonly quantity?: number - /** @enum {string} */ - readonly type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - readonly value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } + /** @description PaymentIntent ID */ + readonly payment_intent: string /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. + * process_config + * @description Configuration overrides */ - readonly package_dimensions?: { - readonly height: number - readonly length: number - readonly weight: number - readonly width: number + readonly process_config?: { + readonly skip_tipping?: boolean } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - readonly price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - readonly 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.

*/ - readonly GetSkusId: { + /**

Initiates a setup intent flow on a Reader.

*/ + readonly PostTerminalReadersReaderProcessSetupIntent: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - } readonly path: { - readonly id: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39875,26 +51536,29 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Customer Consent Collected */ + readonly customer_consent_collected: boolean + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description SetupIntent ID */ + readonly setup_intent: string + } } } } - /** - *

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.

- */ - readonly PostSkusId: { + /**

Sets reader display to show cart details.

*/ + readonly PostTerminalReadersReaderSetReaderDisplay: { readonly parameters: { readonly path: { - readonly id: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['sku'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39907,58 +51571,43 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - readonly active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - readonly attributes?: { readonly [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - readonly currency?: string + /** + * cart + * @description Cart + */ + readonly cart?: { + readonly currency: string + readonly line_items: readonly { + readonly amount: number + readonly description: string + readonly quantity: number + }[] + readonly tax?: number + readonly total: number + } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - readonly image?: string /** - * inventory_update_specs - * @description Description of the SKU's inventory. + * @description Type + * @enum {string} */ - readonly inventory?: { - readonly quantity?: number - /** @enum {string} */ - readonly type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - readonly value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description The dimensions of this SKU for shipping purposes. */ - readonly package_dimensions?: - | { - readonly height: number - readonly length: number - readonly weight: number - readonly width: number - } - | '' - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - readonly price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - readonly product?: string + readonly type: 'cart' } } } } - /**

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

*/ - readonly DeleteSkusId: { + /**

Create an incoming testmode bank transfer

*/ + readonly PostTestHelpersCustomersCustomerFundCashBalance: { readonly parameters: { readonly path: { - readonly id: string + readonly customer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_sku'] + readonly 'application/json': components['schemas']['customer_cash_balance_transaction'] } } /** Error response. */ @@ -39970,17 +51619,31 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + readonly reference?: string + } } } } - /**

Creates a new source object.

*/ - readonly PostSources: { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + readonly PostTestHelpersIssuingCardsCardShippingDeliver: { + readonly parameters: { + readonly path: { + readonly card: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source'] + readonly 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -39993,150 +51656,54 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - readonly amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - readonly currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - readonly customer?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - readonly flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - readonly mandate?: { - /** mandate_acceptance_params */ - readonly acceptance?: { - /** Format: unix-time */ - readonly date?: number - readonly ip?: string - /** mandate_offline_acceptance_params */ - readonly offline?: { - readonly contact_email: string - } - /** mandate_online_acceptance_params */ - readonly online?: { - /** Format: unix-time */ - readonly date?: number - readonly ip?: string - readonly user_agent?: string - } - /** @enum {string} */ - readonly status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - readonly type?: 'offline' | 'online' - readonly user_agent?: string - } - readonly amount?: number | '' - readonly currency?: string - /** @enum {string} */ - readonly interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - readonly notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - readonly metadata?: { readonly [key: string]: string } - /** @description The source to share. */ - readonly original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - readonly owner?: { - /** source_address */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - readonly email?: string - readonly name?: string - readonly phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - readonly receiver?: { - /** @enum {string} */ - readonly refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - readonly redirect?: { - readonly return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - readonly source_order?: { - readonly items?: readonly { - readonly amount?: number - readonly currency?: string - readonly description?: string - readonly parent?: string - readonly quantity?: number - /** @enum {string} */ - readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - readonly shipping?: { - /** address */ - 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 - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - readonly statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - readonly token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - readonly type?: string - /** @enum {string} */ - readonly 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.

*/ - readonly GetSourcesSource: { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + readonly PostTestHelpersIssuingCardsCardShippingFail: { readonly parameters: { - readonly query: { - /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ - readonly client_secret?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + readonly path: { + readonly card: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } + } + } + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + readonly PostTestHelpersIssuingCardsCardShippingReturn: { + readonly parameters: { readonly path: { - readonly source: string + readonly card: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source'] + readonly 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40148,26 +51715,25 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /** - *

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.

- */ - readonly PostSourcesSource: { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + readonly PostTestHelpersIssuingCardsCardShippingShip: { readonly parameters: { readonly path: { - readonly source: string + readonly card: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source'] + readonly 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40180,116 +51746,54 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - readonly amount?: number /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - readonly mandate?: { - /** mandate_acceptance_params */ - readonly acceptance?: { - /** Format: unix-time */ - readonly date?: number - readonly ip?: string - /** mandate_offline_acceptance_params */ - readonly offline?: { - readonly contact_email: string - } - /** mandate_online_acceptance_params */ - readonly online?: { - /** Format: unix-time */ - readonly date?: number - readonly ip?: string - readonly user_agent?: string - } - /** @enum {string} */ - readonly status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - readonly type?: 'offline' | 'online' - readonly user_agent?: string - } - readonly amount?: number | '' - readonly currency?: string - /** @enum {string} */ - readonly interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - readonly notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - readonly owner?: { - /** source_address */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - readonly email?: string - readonly name?: string - readonly phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - readonly source_order?: { - readonly items?: readonly { - readonly amount?: number - readonly currency?: string - readonly description?: string - readonly parent?: string - readonly quantity?: number - /** @enum {string} */ - readonly type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - readonly shipping?: { - /** address */ - 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 - } - } } } } } - /**

Retrieves a new Source MandateNotification.

*/ - readonly GetSourcesSourceMandateNotificationsMandateNotification: { + /**

Expire a refund with a status of requires_action.

*/ + readonly PostTestHelpersRefundsRefundExpire: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + readonly path: { + readonly refund: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } + } + } + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + readonly PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { + readonly parameters: { readonly path: { - readonly mandate_notification: string - readonly source: string + readonly reader: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source_mandate_notification'] + readonly 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40301,12 +51805,27 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + readonly card_present?: { + readonly number?: string + } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * @description Simulated payment type + * @enum {string} + */ + readonly type?: 'card_present' + } } } } - /**

List source transactions for a given source.

*/ - readonly GetSourcesSourceSourceTransactions: { + /**

Returns a list of your test clocks.

*/ + readonly GetTestHelpersTestClocks: { readonly parameters: { readonly 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. */ @@ -40318,16 +51837,13 @@ 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. */ readonly starting_after?: string } - readonly path: { - readonly source: string - } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['source_transaction'][] + readonly data: readonly components['schemas']['test_helpers.test_clock'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -40353,23 +51869,54 @@ export interface operations { } } } - /**

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.

*/ - readonly GetSourcesSourceSourceTransactionsSourceTransaction: { + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + readonly PostTestHelpersTestClocks: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['test_helpers.test_clock'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + readonly frozen_time: number + /** @description The name for this test clock. */ + readonly name?: string + } + } + } + } + /**

Retrieves a test clock.

*/ + readonly GetTestHelpersTestClocksTestClock: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly source: string - readonly source_transaction: string + readonly test_clock: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source_transaction'] + readonly 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40385,18 +51932,18 @@ export interface operations { } } } - /**

Verify a given source.

*/ - readonly PostSourcesSourceVerify: { + /**

Deletes a test clock.

*/ + readonly DeleteTestHelpersTestClocksTestClock: { readonly parameters: { readonly path: { - readonly source: string + readonly test_clock: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['source'] + readonly 'application/json': components['schemas']['deleted_test_helpers.test_clock'] } } /** Error response. */ @@ -40408,47 +51955,22 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description The values needed to verify the source. */ - readonly values: readonly string[] - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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

*/ - readonly GetSubscriptionItems: { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + readonly PostTestHelpersTestClocksTestClockAdvance: { readonly parameters: { - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** The ID of the subscription whose items will be retrieved. */ - readonly subscription: string + readonly path: { + readonly test_clock: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40460,17 +51982,30 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + readonly frozen_time: number + } } } } - /**

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

*/ - readonly PostSubscriptionItems: { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryInboundTransfersIdFail: { + readonly parameters: { + readonly path: { + readonly id: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_item'] + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40483,88 +52018,75 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - readonly price?: string /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + * failure_details_params + * @description Details about a failed InboundTransfer. */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } + readonly failure_details?: { /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string + readonly code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - readonly proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - readonly quantity?: number - /** @description The identifier of the subscription to modify. */ - readonly subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - readonly tax_rates?: readonly string[] | '' } } } } - /**

Retrieves the subscription item with the given ID.

*/ - readonly GetSubscriptionItemsItem: { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + readonly PostTestHelpersTreasuryInboundTransfersIdReturn: { readonly parameters: { - readonly query: { - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryInboundTransfersIdSucceed: { + readonly parameters: { readonly path: { - readonly item: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_item'] + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40576,22 +52098,25 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

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

*/ - readonly PostSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundPaymentsIdFail: { readonly parameters: { readonly path: { - readonly item: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_item'] + readonly 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40604,84 +52129,24 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - readonly off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - readonly price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - readonly proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - readonly quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - readonly tax_rates?: readonly string[] | '' } } } } - /**

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

*/ - readonly DeleteSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundPaymentsIdPost: { readonly parameters: { readonly path: { - readonly item: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_subscription_item'] + readonly 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40694,63 +52159,72 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - readonly clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + readonly parameters: { + readonly path: { + readonly id: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + * returned_details_params + * @description Optional hash to set the the return code. */ - readonly proration_date?: number + readonly returned_details?: { + /** @enum {string} */ + readonly code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } } } } } - /** - *

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

- * - *

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

- */ - readonly GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { readonly parameters: { - readonly 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } readonly path: { - readonly subscription_item: string + readonly outbound_transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40762,30 +52236,25 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /** - *

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.

- */ - readonly PostSubscriptionItemsSubscriptionItemUsageRecords: { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { readonly parameters: { readonly path: { - readonly subscription_item: string + readonly outbound_transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['usage_record'] + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40798,91 +52267,24 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - readonly action?: 'increment' | 'set' /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The usage quantity for the specified timestamp. */ - readonly quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - readonly timestamp?: 'now' | number } } } } - /**

Retrieves the list of your subscription schedules.

*/ - readonly GetSubscriptionSchedules: { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + readonly PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { readonly parameters: { - readonly query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - readonly canceled_at?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return subscription schedules that completed during the given date interval. */ - readonly completed_at?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** Only return subscription schedules that were created during the given date interval. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** 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. */ - readonly starting_after?: string + readonly path: { + readonly outbound_transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40894,17 +52296,38 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + readonly returned_details?: { + /** @enum {string} */ + readonly code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + } } } } - /**

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

*/ - readonly PostSubscriptionSchedules: { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + readonly PostTestHelpersTreasuryReceivedCredits: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_schedule'] + readonly 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -40917,152 +52340,46 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - readonly customer?: string + /** @description Amount (in cents) to be transferred. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The FinancialAccount to send funds to. */ + readonly financial_account: string /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * source_params + * @description Initiating payment method details for the object. */ - readonly default_settings?: { - readonly application_fee_percent?: number - /** automatic_tax_config */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** @enum {string} */ - readonly billing_cycle_anchor?: 'automatic' | 'phase_start' - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean - } - | '' + readonly initiating_payment_method_details?: { /** @enum {string} */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - readonly default_payment_method?: string - /** subscription_schedules_param */ - readonly invoice_settings?: { - readonly days_until_due?: number + readonly type: 'us_bank_account' + /** us_bank_account_source_params */ + readonly us_bank_account?: { + readonly account_holder_name?: string + readonly account_number?: string + readonly routing_number?: string } - readonly transfer_data?: - | { - readonly amount_percent?: number - readonly destination: string - } - | '' } /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @description The rails used for the object. * @enum {string} */ - readonly end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - readonly from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - readonly phases?: readonly { - readonly add_invoice_items?: readonly { - readonly price?: string - /** one_time_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - readonly application_fee_percent?: number - /** automatic_tax_config */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** @enum {string} */ - readonly billing_cycle_anchor?: 'automatic' | 'phase_start' - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - readonly coupon?: string - readonly default_payment_method?: string - readonly default_tax_rates?: readonly string[] | '' - /** Format: unix-time */ - readonly end_date?: number - /** subscription_schedules_param */ - readonly invoice_settings?: { - readonly days_until_due?: number - } - readonly items: readonly { - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' - readonly price?: string - /** recurring_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - readonly iterations?: number - /** @enum {string} */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - readonly transfer_data?: { - readonly amount_percent?: number - readonly destination: string - } - readonly trial?: boolean - /** Format: unix-time */ - readonly trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - readonly start_date?: number | 'now' + readonly network: 'ach' | 'us_domestic_wire' } } } } - /**

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.

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

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + readonly PostTestHelpersTreasuryReceivedDebits: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_schedule'] + readonly 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -41074,22 +52391,50 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The FinancialAccount to pull funds from. */ + readonly financial_account: string + /** + * source_params + * @description Initiating payment method details for the object. + */ + readonly initiating_payment_method_details?: { + /** @enum {string} */ + readonly type: 'us_bank_account' + /** us_bank_account_source_params */ + readonly us_bank_account?: { + readonly account_holder_name?: string + readonly account_number?: string + readonly routing_number?: string + } + } + /** + * @description The rails used for the object. + * @enum {string} + */ + readonly network: 'ach' + } } } } - /**

Updates an existing subscription schedule.

*/ - readonly PostSubscriptionSchedulesSchedule: { - readonly parameters: { - readonly path: { - readonly schedule: string - } - } + /** + *

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.

+ */ + readonly PostTokens: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_schedule'] + readonly 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41103,179 +52448,348 @@ export interface operations { readonly content: { readonly 'application/x-www-form-urlencoded': { /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * connect_js_account_token_specs + * @description Information for the account this token will represent. */ - readonly default_settings?: { - readonly application_fee_percent?: number - /** automatic_tax_config */ - readonly automatic_tax?: { - readonly enabled: boolean - } + readonly account?: { /** @enum {string} */ - readonly billing_cycle_anchor?: 'automatic' | 'phase_start' - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean + readonly business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + readonly company?: { + /** address_specs */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + /** japan_address_kana_specs */ + readonly address_kana?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string + } + /** japan_address_kanji_specs */ + readonly address_kanji?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string + } + readonly directors_provided?: boolean + readonly executives_provided?: boolean + readonly name?: string + readonly name_kana?: string + readonly name_kanji?: string + readonly owners_provided?: boolean + /** company_ownership_declaration */ + readonly ownership_declaration?: { + /** Format: unix-time */ + readonly date?: number + readonly ip?: string + readonly user_agent?: string + } + readonly ownership_declaration_shown_and_signed?: boolean + readonly phone?: string + readonly registration_number?: string + /** @enum {string} */ + readonly structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + readonly tax_id?: string + readonly tax_id_registrar?: string + readonly vat_id?: string + /** verification_specs */ + readonly verification?: { + /** verification_document_specs */ + readonly document?: { + readonly back?: string + readonly front?: string } - | '' + } + } + /** individual_specs */ + readonly individual?: { + /** address_specs */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + /** japan_address_kana_specs */ + readonly address_kana?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string + } + /** japan_address_kanji_specs */ + readonly address_kanji?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string + } + readonly dob?: + | { + readonly day: number + readonly month: number + readonly year: number + } + | '' + readonly email?: string + readonly first_name?: string + readonly first_name_kana?: string + readonly first_name_kanji?: string + readonly full_name_aliases?: readonly string[] | '' + readonly gender?: string + readonly id_number?: string + readonly id_number_secondary?: string + readonly last_name?: string + readonly last_name_kana?: string + readonly last_name_kanji?: string + readonly maiden_name?: string + readonly metadata?: { readonly [key: string]: string } | '' + readonly phone?: string + /** @enum {string} */ + readonly political_exposure?: 'existing' | 'none' + /** address_specs */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + readonly ssn_last_4?: string + /** person_verification_specs */ + readonly verification?: { + /** person_verification_document_specs */ + readonly additional_document?: { + readonly back?: string + readonly front?: string + } + /** person_verification_document_specs */ + readonly document?: { + readonly back?: string + readonly front?: string + } + } + } + readonly tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + readonly bank_account?: { + readonly account_holder_name?: string /** @enum {string} */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - readonly default_payment_method?: string - /** subscription_schedules_param */ - readonly invoice_settings?: { - readonly days_until_due?: number + readonly account_holder_type?: 'company' | 'individual' + readonly account_number: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + readonly country: string + readonly currency?: string + readonly routing_number?: string + } + readonly card?: + | { + 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 + } + | string + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + readonly customer?: string + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + readonly cvc_update?: { + readonly cvc: string + } + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + readonly person?: { + /** address_specs */ + readonly address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + /** japan_address_kana_specs */ + readonly address_kana?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string } - readonly transfer_data?: + /** japan_address_kanji_specs */ + readonly address_kanji?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + readonly town?: string + } + readonly dob?: | { - readonly amount_percent?: number - readonly destination: string + readonly day: number + readonly month: number + readonly year: number } | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - readonly end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - readonly phases?: readonly { - readonly add_invoice_items?: readonly { - readonly price?: string - /** one_time_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string + /** person_documents_specs */ + readonly documents?: { + /** documents_param */ + readonly company_authorization?: { + readonly files?: readonly string[] + } + /** documents_param */ + readonly passport?: { + readonly files?: readonly string[] + } + /** documents_param */ + readonly visa?: { + readonly files?: readonly string[] } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - readonly application_fee_percent?: number - /** automatic_tax_config */ - readonly automatic_tax?: { - readonly enabled: boolean } - /** @enum {string} */ - readonly billing_cycle_anchor?: 'automatic' | 'phase_start' - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - readonly coupon?: string - readonly default_payment_method?: string - readonly default_tax_rates?: readonly string[] | '' - readonly end_date?: number | 'now' - /** subscription_schedules_param */ - readonly invoice_settings?: { - readonly days_until_due?: number + readonly email?: string + readonly first_name?: string + readonly first_name_kana?: string + readonly first_name_kanji?: string + readonly full_name_aliases?: readonly string[] | '' + readonly gender?: string + readonly id_number?: string + readonly id_number_secondary?: string + readonly last_name?: string + readonly last_name_kana?: string + readonly last_name_kanji?: string + readonly maiden_name?: string + readonly metadata?: { readonly [key: string]: string } | '' + readonly nationality?: string + readonly phone?: string + readonly political_exposure?: string + /** address_specs */ + readonly registered_address?: { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string } - readonly items: readonly { - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' - readonly price?: string - /** recurring_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string + /** relationship_specs */ + readonly relationship?: { + readonly director?: boolean + readonly executive?: boolean + readonly owner?: boolean + readonly percent_ownership?: number | '' + readonly representative?: boolean + readonly title?: string + } + readonly ssn_last_4?: string + /** person_verification_specs */ + readonly verification?: { + /** person_verification_document_specs */ + readonly additional_document?: { + readonly back?: string + readonly front?: string + } + /** person_verification_document_specs */ + readonly document?: { + readonly back?: string + readonly front?: string } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - readonly iterations?: number - /** @enum {string} */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - readonly start_date?: number | 'now' - /** transfer_data_specs */ - readonly transfer_data?: { - readonly amount_percent?: number - readonly destination: string } - readonly trial?: boolean - readonly trial_end?: number | 'now' - }[] + } /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} + * pii_token_specs + * @description The PII this token will represent. */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + readonly pii?: { + readonly id_number?: string + } } } } } - /**

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.

*/ - readonly PostSubscriptionSchedulesScheduleCancel: { + /**

Retrieves the token with the given ID.

*/ + readonly GetTokensToken: { readonly parameters: { - readonly path: { - readonly schedule: string - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - readonly invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - readonly prorate?: boolean - } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] } - } - } - /**

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.

*/ - readonly PostSubscriptionSchedulesScheduleRelease: { - readonly parameters: { readonly path: { - readonly schedule: string + readonly token: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription_schedule'] + readonly 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41287,30 +52801,16 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - readonly preserve_cancel_date?: boolean - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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

*/ - readonly GetSubscriptions: { + /**

Returns a list of top-ups.

*/ + readonly GetTopups: { readonly parameters: { 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?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - readonly current_period_end?: + /** A positive integer representing how much to transfer. */ + readonly amount?: | { readonly gt?: number readonly gte?: number @@ -41318,300 +52818,43 @@ export interface operations { readonly lte?: number } | number - readonly current_period_start?: + /** 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?: | { readonly gt?: number readonly gte?: number readonly lt?: number - readonly lte?: number - } - | number - /** 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. */ - readonly ending_before?: string - /** Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** 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 - /** Filter for subscriptions that contain this recurring price ID. */ - readonly price?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - readonly starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - readonly status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - } - } - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': { - readonly data: readonly components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - readonly has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - readonly object: 'list' - /** @description The URL where this list can be accessed. */ - readonly url: string - } - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } - } - } - } - /**

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

*/ - readonly PostSubscriptions: { - readonly responses: { - /** Successful response. */ - readonly 200: { - readonly content: { - readonly 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - readonly default: { - readonly content: { - readonly 'application/json': components['schemas']['error'] - } - } - } - readonly requestBody: { - readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - readonly add_invoice_items?: readonly { - readonly price?: string - /** one_time_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - readonly application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - readonly backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - readonly billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - readonly cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - readonly cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - readonly coupon?: string - /** @description The identifier of the customer to subscribe. */ - readonly customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - readonly days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - readonly default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - readonly default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - readonly default_tax_rates?: readonly string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - readonly items?: readonly { - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' - readonly metadata?: { readonly [key: string]: string } - readonly price?: string - /** recurring_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - readonly off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - readonly payment_settings?: { - /** payment_method_options */ - readonly payment_method_options?: { - readonly acss_debit?: - | { - /** mandate_options_param */ - readonly mandate_options?: { - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - readonly bancontact?: - | { - /** @enum {string} */ - readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - readonly card?: - | { - /** mandate_options_param */ - readonly mandate_options?: { - readonly amount?: number - /** @enum {string} */ - readonly amount_type?: 'fixed' | 'maximum' - readonly description?: string - } - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - readonly payment_method_types?: - | readonly ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - readonly pending_invoice_item_interval?: - | { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - readonly promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - readonly transfer_data?: { - readonly amount_percent?: number - readonly destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - readonly trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - readonly trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - readonly trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - readonly GetSubscriptionsSubscriptionExposedId: { - readonly parameters: { - readonly query: { + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - } - readonly path: { - readonly subscription_exposed_id: string + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ + readonly status?: 'canceled' | 'failed' | 'pending' | 'succeeded' } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription'] + readonly 'application/json': { + readonly data: readonly components['schemas']['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -41627,18 +52870,13 @@ export interface operations { } } } - /**

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.

*/ - readonly PostSubscriptionsSubscriptionExposedId: { - readonly parameters: { - readonly path: { - readonly subscription_exposed_id: string - } - } + /**

Top up the balance of an account

*/ + readonly PostTopups: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription'] + readonly 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41651,234 +52889,69 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - readonly add_invoice_items?: readonly { - readonly price?: string - /** one_time_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - readonly application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - readonly automatic_tax?: { - readonly enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - readonly billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - readonly billing_thresholds?: - | { - readonly amount_gte?: number - readonly reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - readonly cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - readonly cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - readonly collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - readonly coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - readonly days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - readonly default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - readonly default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - readonly default_tax_rates?: readonly string[] | '' + /** @description A positive integer representing how much to transfer. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - readonly items?: readonly { - readonly billing_thresholds?: - | { - readonly usage_gte: number - } - | '' - readonly clear_usage?: boolean - readonly deleted?: boolean - readonly id?: string - readonly metadata?: { readonly [key: string]: string } | '' - readonly price?: string - /** recurring_price_data */ - readonly price_data?: { - readonly currency: string - readonly product: string - /** recurring_adhoc */ - readonly recurring: { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - /** @enum {string} */ - readonly tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - readonly unit_amount?: number - /** Format: decimal */ - readonly unit_amount_decimal?: string - } - readonly quantity?: number - readonly tax_rates?: readonly string[] | '' - }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - readonly off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - readonly pause_collection?: - | { - /** @enum {string} */ - readonly behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - readonly resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - readonly payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - readonly payment_settings?: { - /** payment_method_options */ - readonly payment_method_options?: { - readonly acss_debit?: - | { - /** mandate_options_param */ - readonly mandate_options?: { - /** @enum {string} */ - readonly transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - readonly verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - readonly bancontact?: - | { - /** @enum {string} */ - readonly preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - readonly card?: - | { - /** mandate_options_param */ - readonly mandate_options?: { - readonly amount?: number - /** @enum {string} */ - readonly amount_type?: 'fixed' | 'maximum' - readonly description?: string - } - /** @enum {string} */ - readonly request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - readonly payment_method_types?: - | readonly ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - readonly pending_invoice_item_interval?: - | { - /** @enum {string} */ - readonly interval: 'day' | 'month' | 'week' | 'year' - readonly interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - readonly promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - readonly proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - readonly proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - readonly transfer_data?: - | { - readonly amount_percent?: number - readonly destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - readonly trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - readonly trial_from_plan?: boolean + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + readonly source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + readonly statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + readonly transfer_group?: string } } } } - /** - *

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.

- */ - readonly DeleteSubscriptionsSubscriptionExposedId: { + /**

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.

*/ + readonly GetTopupsTopup: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly subscription_exposed_id: string + readonly topup: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['subscription'] + readonly 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

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

*/ + readonly PostTopupsTopup: { + readonly parameters: { + readonly path: { + readonly topup: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41891,28 +52964,28 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - readonly invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - readonly prorate?: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 } | '' } } } } - /**

Removes the currently applied discount on a subscription.

*/ - readonly DeleteSubscriptionsSubscriptionExposedIdDiscount: { + /**

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

*/ + readonly PostTopupsTopupCancel: { readonly parameters: { readonly path: { - readonly subscription_exposed_id: string + readonly topup: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_discount'] + readonly 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41924,14 +52997,27 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } } } } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - readonly GetTaxCodes: { + /**

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.

*/ + readonly GetTransfers: { readonly parameters: { readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -41940,6 +53026,8 @@ export interface operations { readonly limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return transfers with the specified transfer group. */ + readonly transfer_group?: string } } readonly responses: { @@ -41947,7 +53035,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['tax_code'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['transfer'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -41973,22 +53062,13 @@ export interface operations { } } } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

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

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.

*/ + readonly PostTransfers: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['tax_code'] + readonly 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42000,43 +53080,56 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + readonly 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + readonly amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + readonly destination: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + readonly source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + readonly source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + readonly transfer_group?: string + } } } } - /**

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

*/ - readonly GetTaxRates: { + /**

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.

*/ + readonly GetTransfersIdReversals: { readonly parameters: { readonly query: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - readonly active?: boolean - /** Optional range for filtering created date. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ - readonly inclusive?: boolean /** 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 /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 } + readonly path: { + readonly id: string + } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['tax_rate'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['transfer_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -42062,13 +53155,24 @@ export interface operations { } } } - /**

Creates a new tax rate.

*/ - readonly PostTaxRates: { + /** + *

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.

+ */ + readonly PostTransfersIdReversals: { + readonly parameters: { + readonly path: { + readonly id: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['tax_rate'] + readonly 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42081,51 +53185,36 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - readonly active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - readonly country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description A positive integer in cents (or local equivalent) 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. */ + readonly amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ readonly description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - readonly display_name: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - readonly inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - readonly jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - readonly percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - readonly state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - readonly tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + readonly metadata?: { readonly [key: string]: string } | '' + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + readonly refund_application_fee?: boolean } } } } - /**

Retrieves a tax rate with the given ID

*/ - readonly GetTaxRatesTaxRate: { + /**

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.

*/ + readonly GetTransfersTransfer: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly tax_rate: string + readonly transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['tax_rate'] + readonly 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42141,18 +53230,22 @@ export interface operations { } } } - /**

Updates an existing tax rate.

*/ - readonly PostTaxRatesTaxRate: { + /** + *

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.

+ */ + readonly PostTransfersTransfer: { readonly parameters: { readonly path: { - readonly tax_rate: string + readonly transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['tax_rate'] + readonly 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42165,38 +53258,65 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - readonly active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - readonly country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - readonly display_name?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - readonly jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ readonly metadata?: { readonly [key: string]: string } | '' - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - readonly state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - readonly tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } - } - /**

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

*/ - readonly PostTerminalConnectionTokens: { + } + /**

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.

*/ + readonly GetTransfersTransferReversalsId: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly id: string + readonly transfer: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /** + *

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

+ * + *

This request only accepts metadata and description as arguments.

+ */ + readonly PostTransfersTransferReversalsId: { + readonly parameters: { + readonly path: { + readonly id: string + readonly transfer: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.connection_token'] + readonly 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42211,24 +53331,30 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - readonly location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } | '' } } } } - /**

Returns a list of Location objects.

*/ - readonly GetTerminalLocations: { + /**

Returns a list of CreditReversals.

*/ + readonly GetTreasuryCreditReversals: { readonly parameters: { readonly 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string /** 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 CreditReversals for the ReceivedCredit ID. */ + readonly received_credit?: 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. */ readonly starting_after?: string + /** Only return CreditReversals for a given status. */ + readonly status?: 'canceled' | 'posted' | 'processing' } } readonly responses: { @@ -42236,7 +53362,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['terminal.location'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.credit_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -42262,16 +53389,13 @@ export interface operations { } } } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - readonly PostTerminalLocations: { + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + readonly PostTreasuryCreditReversals: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.location'] + readonly 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42284,44 +53408,32 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - readonly address: { - readonly city?: string - readonly country: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - /** @description A name for the location. */ - readonly display_name: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' + readonly metadata?: { readonly [key: string]: string } + /** @description The ReceivedCredit to reverse. */ + readonly received_credit: string } } } } - /**

Retrieves a Location object.

*/ - readonly GetTerminalLocationsLocation: { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + readonly GetTreasuryCreditReversalsCreditReversal: { readonly parameters: { + readonly path: { + readonly credit_reversal: string + } readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } - readonly path: { - readonly location: string - } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.location'] + readonly 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42337,18 +53449,67 @@ export interface operations { } } } - /**

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

*/ - readonly PostTerminalLocationsLocation: { + /**

Returns a list of DebitReversals.

*/ + readonly GetTreasuryDebitReversals: { readonly parameters: { - readonly path: { - readonly location: string + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string + /** 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 DebitReversals for the ReceivedDebit ID. */ + readonly received_debit?: string + /** Only return DebitReversals for a given resolution. */ + readonly resolution?: 'lost' | 'won' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return DebitReversals for a given status. */ + readonly status?: 'canceled' | 'completed' | 'processing' } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.location'] + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.debit_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + readonly PostTreasuryDebitReversals: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42361,40 +53522,32 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - /** @description A name for the location. */ - readonly display_name?: string /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' + readonly metadata?: { readonly [key: string]: string } + /** @description The ReceivedDebit to reverse. */ + readonly received_debit: string } } } } - /**

Deletes a Location object.

*/ - readonly DeleteTerminalLocationsLocation: { + /**

Retrieves a DebitReversal object.

*/ + readonly GetTreasuryDebitReversalsDebitReversal: { readonly parameters: { readonly path: { - readonly location: string + readonly debit_reversal: string + } + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_terminal.location'] + readonly 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42410,24 +53563,26 @@ export interface operations { } } } - /**

Returns a list of Reader objects.

*/ - readonly GetTerminalReaders: { + /**

Returns a list of FinancialAccounts.

*/ + readonly GetTreasuryFinancialAccounts: { readonly parameters: { readonly query: { - /** Filters readers by device type */ - readonly device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** An object ID cursor for use in pagination. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + /** A limit ranging from 1 to 100 (defaults to 10). */ readonly limit?: number - /** A location ID to filter the response list to only readers at the specific location */ - readonly 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. */ + /** An object ID cursor for use in pagination. */ readonly starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - readonly status?: 'offline' | 'online' } } readonly responses: { @@ -42435,8 +53590,7 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - /** @description A list of readers */ - readonly data: readonly components['schemas']['terminal.reader'][] + readonly data: readonly components['schemas']['treasury.financial_account'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -42462,13 +53616,13 @@ export interface operations { } } } - /**

Creates a new Reader object.

*/ - readonly PostTerminalReaders: { + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + readonly PostTreasuryFinancialAccounts: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.reader'] + readonly 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42483,34 +53637,94 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - readonly label?: string - /** @description The location to assign the reader to. */ - readonly location?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + readonly features?: { + /** access */ + readonly card_issuing?: { + readonly requested: boolean + } + /** access */ + readonly deposit_insurance?: { + readonly requested: boolean + } + /** financial_addresses */ + readonly financial_addresses?: { + /** access */ + readonly aba?: { + readonly requested: boolean + } + } + /** inbound_transfers */ + readonly inbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + } + /** access */ + readonly intra_stripe_flows?: { + readonly requested: boolean + } + /** outbound_payments */ + readonly outbound_payments?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean + } + } + /** outbound_transfers */ + readonly outbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 } | '' - /** @description A code generated by the reader used for registering to an account. */ - readonly registration_code: string + readonly metadata?: { readonly [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + readonly platform_restrictions?: { + /** @enum {string} */ + readonly inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + readonly outbound_flows?: 'restricted' | 'unrestricted' + } + /** @description The currencies the FinancialAccount can hold a balance in. */ + readonly supported_currencies: readonly string[] } } } } - /**

Retrieves a Reader object.

*/ - readonly GetTerminalReadersReader: { + /**

Retrieves the details of a FinancialAccount.

*/ + readonly GetTreasuryFinancialAccountsFinancialAccount: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly reader: string + readonly financial_account: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + readonly 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42526,18 +53740,18 @@ export interface operations { } } } - /**

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

*/ - readonly PostTerminalReadersReader: { + /**

Updates the details of a FinancialAccount.

*/ + readonly PostTreasuryFinancialAccountsFinancialAccount: { readonly parameters: { readonly path: { - readonly reader: string + readonly financial_account: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + readonly 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42552,26 +53766,92 @@ export interface operations { readonly 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - /** @description The new label of the reader. */ - readonly label?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + readonly features?: { + /** access */ + readonly card_issuing?: { + readonly requested: boolean + } + /** access */ + readonly deposit_insurance?: { + readonly requested: boolean + } + /** financial_addresses */ + readonly financial_addresses?: { + /** access */ + readonly aba?: { + readonly requested: boolean + } + } + /** inbound_transfers */ + readonly inbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + } + /** access */ + readonly intra_stripe_flows?: { + readonly requested: boolean + } + /** outbound_payments */ + readonly outbound_payments?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean + } + } + /** outbound_transfers */ + readonly outbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. 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 } | '' + readonly metadata?: { readonly [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + readonly platform_restrictions?: { + /** @enum {string} */ + readonly inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + readonly outbound_flows?: 'restricted' | 'unrestricted' + } } } } } - /**

Deletes a Reader object.

*/ - readonly DeleteTerminalReadersReader: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + readonly GetTreasuryFinancialAccountsFinancialAccountFeatures: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly reader: string + readonly financial_account: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['deleted_terminal.reader'] + readonly 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42587,16 +53867,18 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostTokens: { + /**

Updates the Features associated with a FinancialAccount.

*/ + readonly PostTreasuryFinancialAccountsFinancialAccountFeatures: { + readonly parameters: { + readonly path: { + readonly financial_account: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['token'] + readonly 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42610,328 +53892,185 @@ export interface operations { readonly content: { readonly 'application/x-www-form-urlencoded': { /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - readonly account?: { - /** @enum {string} */ - readonly business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - readonly company?: { - /** address_specs */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - /** japan_address_kana_specs */ - readonly address_kana?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string - } - /** japan_address_kanji_specs */ - readonly address_kanji?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string - } - readonly directors_provided?: boolean - readonly executives_provided?: boolean - readonly name?: string - readonly name_kana?: string - readonly name_kanji?: string - readonly owners_provided?: boolean - /** company_ownership_declaration */ - readonly ownership_declaration?: { - /** Format: unix-time */ - readonly date?: number - readonly ip?: string - readonly user_agent?: string - } - readonly ownership_declaration_shown_and_signed?: boolean - readonly phone?: string - readonly registration_number?: string - /** @enum {string} */ - readonly structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - readonly tax_id?: string - readonly tax_id_registrar?: string - readonly vat_id?: string - /** verification_specs */ - readonly verification?: { - /** verification_document_specs */ - readonly document?: { - readonly back?: string - readonly front?: string - } - } - } - /** individual_specs */ - readonly individual?: { - /** address_specs */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - /** japan_address_kana_specs */ - readonly address_kana?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string - } - /** japan_address_kanji_specs */ - readonly address_kanji?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string - } - readonly dob?: - | { - readonly day: number - readonly month: number - readonly year: number - } - | '' - readonly email?: string - readonly first_name?: string - readonly first_name_kana?: string - readonly first_name_kanji?: string - readonly full_name_aliases?: readonly string[] | '' - readonly gender?: string - readonly id_number?: string - readonly last_name?: string - readonly last_name_kana?: string - readonly last_name_kanji?: string - readonly maiden_name?: string - readonly metadata?: { readonly [key: string]: string } | '' - readonly phone?: string - /** @enum {string} */ - readonly political_exposure?: 'existing' | 'none' - readonly ssn_last_4?: string - /** person_verification_specs */ - readonly verification?: { - /** person_verification_document_specs */ - readonly additional_document?: { - readonly back?: string - readonly front?: string - } - /** person_verification_document_specs */ - readonly document?: { - readonly back?: string - readonly front?: string - } - } - } - readonly tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. */ - readonly bank_account?: { - readonly account_holder_name?: string - /** @enum {string} */ - readonly account_holder_type?: 'company' | 'individual' - readonly account_number: string - /** @enum {string} */ - readonly account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - readonly country: string - readonly currency?: string - readonly routing_number?: string + readonly card_issuing?: { + readonly requested: boolean } - readonly card?: - | { - 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 - } - | string - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - readonly customer?: string /** - * cvc_params - * @description The updated CVC value this token will represent. + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. */ - readonly cvc_update?: { - readonly cvc: string + readonly deposit_insurance?: { + readonly requested: boolean } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] /** - * person_token_specs - * @description Information for the person this token will represent. + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. */ - readonly person?: { - /** address_specs */ - readonly address?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - } - /** japan_address_kana_specs */ - readonly address_kana?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string - } - /** japan_address_kanji_specs */ - readonly address_kanji?: { - readonly city?: string - readonly country?: string - readonly line1?: string - readonly line2?: string - readonly postal_code?: string - readonly state?: string - readonly town?: string + readonly financial_addresses?: { + /** access */ + readonly aba?: { + readonly requested: boolean } - readonly dob?: - | { - readonly day: number - readonly month: number - readonly year: number - } - | '' - /** person_documents_specs */ - readonly documents?: { - /** documents_param */ - readonly company_authorization?: { - readonly files?: readonly string[] - } - /** documents_param */ - readonly passport?: { - readonly files?: readonly string[] - } - /** documents_param */ - readonly visa?: { - readonly files?: readonly string[] - } - } - readonly email?: string - readonly first_name?: string - readonly first_name_kana?: string - readonly first_name_kanji?: string - readonly full_name_aliases?: readonly string[] | '' - readonly gender?: string - readonly id_number?: string - readonly last_name?: string - readonly last_name_kana?: string - readonly last_name_kanji?: string - readonly maiden_name?: string - readonly metadata?: { readonly [key: string]: string } | '' - readonly nationality?: string - readonly phone?: string - readonly political_exposure?: string - /** relationship_specs */ - readonly relationship?: { - readonly director?: boolean - readonly executive?: boolean - readonly owner?: boolean - readonly percent_ownership?: number | '' - readonly representative?: boolean - readonly title?: string + } + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + readonly inbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean } - readonly ssn_last_4?: string - /** person_verification_specs */ - readonly verification?: { - /** person_verification_document_specs */ - readonly additional_document?: { - readonly back?: string - readonly front?: string - } - /** person_verification_document_specs */ - readonly document?: { - readonly back?: string - readonly front?: string - } + } + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + readonly intra_stripe_flows?: { + readonly requested: boolean + } + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + readonly outbound_payments?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean } } /** - * pii_token_specs - * @description The PII this token will represent. + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. */ - readonly pii?: { - readonly id_number?: string + readonly outbound_transfers?: { + /** access */ + readonly ach?: { + readonly requested: boolean + } + /** access */ + readonly us_domestic_wire?: { + readonly requested: boolean + } } } } } } - /**

Retrieves the token with the given ID.

*/ - readonly GetTokensToken: { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + readonly GetTreasuryInboundTransfers: { + readonly parameters: { + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + readonly status?: 'canceled' | 'failed' | 'processing' | 'succeeded' + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.inbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates an InboundTransfer.

*/ + readonly PostTreasuryInboundTransfers: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + readonly description?: string + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** @description The FinancialAccount to send funds to. */ + readonly financial_account: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The origin payment method to be debited for the InboundTransfer. */ + readonly origin_payment_method: string + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + readonly statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing InboundTransfer.

*/ + readonly GetTreasuryInboundTransfersId: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly token: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['token'] + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -42947,38 +54086,54 @@ export interface operations { } } } - /**

Returns a list of top-ups.

*/ - readonly GetTopups: { + /**

Cancels an InboundTransfer.

*/ + readonly PostTreasuryInboundTransfersInboundTransferCancel: { + readonly parameters: { + readonly path: { + readonly inbound_transfer: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + readonly GetTreasuryOutboundPayments: { readonly parameters: { readonly query: { - /** A positive integer representing how much to transfer. */ - readonly amount?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number + /** Only return OutboundPayments sent to this 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string /** 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 /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. */ - readonly status?: 'canceled' | 'failed' | 'pending' | 'succeeded' + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + readonly status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' } } readonly responses: { @@ -42986,7 +54141,8 @@ export interface operations { readonly 200: { readonly content: { readonly 'application/json': { - readonly data: readonly components['schemas']['topup'][] + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.outbound_payment'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -43012,13 +54168,13 @@ export interface operations { } } } - /**

Top up the balance of an account

*/ - readonly PostTopups: { + /**

Creates an OutboundPayment.

*/ + readonly PostTreasuryOutboundPayments: { readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topup'] + readonly 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -43031,42 +54187,100 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ readonly amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ readonly currency: string + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + readonly customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + readonly destination_payment_method?: string + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + readonly destination_payment_method_data?: { + /** billing_details_inner_params */ + readonly billing_details?: { + readonly address?: + | { + readonly city?: string + readonly country?: string + readonly line1?: string + readonly line2?: string + readonly postal_code?: string + readonly state?: string + } + | '' + readonly email?: string | '' + readonly name?: string + readonly phone?: string + } + readonly financial_account?: string + readonly metadata?: { readonly [key: string]: string } + /** @enum {string} */ + readonly type: 'financial_account' | 'us_bank_account' + /** payment_method_param */ + readonly us_bank_account?: { + /** @enum {string} */ + readonly account_holder_type?: 'company' | 'individual' + readonly account_number?: string + /** @enum {string} */ + readonly account_type?: 'checking' | 'savings' + readonly financial_connections_account?: string + readonly routing_number?: string + } + } + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + readonly destination_payment_method_options?: { + readonly us_bank_account?: + | { + /** @enum {string} */ + readonly network?: 'ach' | 'us_domestic_wire' + } + | '' + } + /** + * end_user_details_params + * @description End user details. + */ + readonly end_user_details?: { + readonly ip_address?: string + readonly present: boolean + } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description The FinancialAccount to pull funds from. */ + readonly financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - readonly source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + readonly metadata?: { readonly [key: string]: string } + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ readonly statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - readonly 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.

*/ - readonly GetTopupsTopup: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + readonly GetTreasuryOutboundPaymentsId: { readonly parameters: { readonly query: { /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] } readonly path: { - readonly topup: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topup'] + readonly 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -43082,18 +54296,93 @@ export interface operations { } } } - /**

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

*/ - readonly PostTopupsTopup: { + /**

Cancel an OutboundPayment.

*/ + readonly PostTreasuryOutboundPaymentsIdCancel: { readonly parameters: { readonly path: { - readonly topup: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topup'] + readonly 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + } + } + } + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + readonly GetTreasuryOutboundTransfers: { + readonly parameters: { + readonly 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. */ + readonly ending_before?: string + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string + /** 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 + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + readonly status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.outbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

Creates an OutboundTransfer.

*/ + readonly PostTreasuryOutboundTransfers: { + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43106,28 +54395,81 @@ export interface operations { readonly requestBody: { readonly content: { readonly 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + readonly amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + readonly currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ readonly description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + readonly destination_payment_method?: string + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + readonly destination_payment_method_options?: { + readonly us_bank_account?: + | { + /** @enum {string} */ + readonly network?: 'ach' | 'us_domestic_wire' + } + | '' + } /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** @description The FinancialAccount to pull funds from. */ + readonly financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' + readonly metadata?: { readonly [key: string]: string } + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + readonly statement_descriptor?: string } } } } - /**

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

*/ - readonly PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + readonly GetTreasuryOutboundTransfersOutboundTransfer: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly topup: string + readonly outbound_transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['topup'] + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] + } + } + /** Error response. */ + readonly default: { + readonly content: { + readonly 'application/json': components['schemas']['error'] + } + } + } + readonly requestBody: { + readonly content: { + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } + } + } + } + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + readonly PostTreasuryOutboundTransfersOutboundTransferCancel: { + readonly parameters: { + readonly path: { + readonly outbound_transfer: string + } + } + readonly responses: { + /** Successful response. */ + readonly 200: { + readonly content: { + readonly 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43146,30 +54488,27 @@ export interface operations { } } } - /**

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.

*/ - readonly GetTransfers: { + /**

Returns a list of ReceivedCredits.

*/ + readonly GetTreasuryReceivedCredits: { readonly parameters: { readonly query: { - readonly created?: - | { - readonly gt?: number - readonly gte?: number - readonly lt?: number - readonly lte?: number - } - | number - /** 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** The FinancialAccount that received the funds. */ + readonly financial_account: string /** 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 ReceivedCredits described by the flow. */ + readonly linked_flows?: { + /** @enum {string} */ + readonly source_flow_type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - /** Only return transfers with the specified transfer group. */ - readonly transfer_group?: string + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + readonly status?: 'failed' | 'succeeded' } } readonly responses: { @@ -43178,7 +54517,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** @description Details about each object. */ - readonly data: readonly components['schemas']['transfer'][] + readonly data: readonly components['schemas']['treasury.received_credit'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -43204,13 +54543,22 @@ export interface operations { } } } - /**

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.

*/ - readonly PostTransfers: { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + readonly GetTreasuryReceivedCreditsId: { + readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } + readonly path: { + readonly id: string + } + } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer'] + readonly 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -43222,47 +54570,26 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - readonly amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - readonly currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - readonly destination: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - readonly source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - readonly source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - readonly transfer_group?: string - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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.

*/ - readonly GetTransfersIdReversals: { + /**

Returns a list of ReceivedDebits.

*/ + readonly GetTreasuryReceivedDebits: { readonly parameters: { readonly 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. */ readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] + /** The FinancialAccount that funds were pulled from. */ + readonly financial_account: string /** 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 /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 - } - readonly path: { - readonly id: string + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + readonly status?: 'failed' | 'succeeded' } } readonly responses: { @@ -43271,7 +54598,7 @@ export interface operations { readonly content: { readonly 'application/json': { /** @description Details about each object. */ - readonly data: readonly components['schemas']['transfer_reversal'][] + readonly data: readonly components['schemas']['treasury.received_debit'][] /** @description True if this list has another page of items after this one that can be fetched. */ readonly has_more: boolean /** @@ -43297,15 +54624,13 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostTransfersIdReversals: { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + readonly GetTreasuryReceivedDebitsId: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { readonly id: string } @@ -43314,7 +54639,7 @@ export interface operations { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer_reversal'] + readonly 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -43326,37 +54651,63 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - readonly amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - readonly description?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - readonly refund_application_fee?: boolean - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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.

*/ - readonly GetTransfersTransfer: { + /**

Retrieves a list of TransactionEntry objects.

*/ + readonly GetTreasuryTransactionEntries: { readonly parameters: { readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + readonly effective_at?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - } - readonly path: { - readonly transfer: string + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + readonly order_by?: 'created' | 'effective_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return TransactionEntries associated with this Transaction. */ + readonly transaction?: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer'] + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -43372,22 +54723,22 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostTransfersTransfer: { + /**

Retrieves a TransactionEntry object.

*/ + readonly GetTreasuryTransactionEntriesId: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { - readonly transfer: string + readonly id: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer'] + readonly 'application/json': components['schemas']['treasury.transaction_entry'] } } /** Error response. */ @@ -43399,34 +54750,66 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - readonly description?: string - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } - /**

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.

*/ - readonly GetTransfersTransferReversalsId: { + /**

Retrieves a list of Transaction objects.

*/ + readonly GetTreasuryTransactions: { readonly parameters: { readonly query: { + readonly created?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + readonly ending_before?: string /** Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] - } - readonly path: { - readonly id: string - readonly transfer: string + /** Returns objects associated with this FinancialAccount. */ + readonly financial_account: string + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + readonly order_by?: 'created' | 'posted_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 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 + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + readonly status?: 'open' | 'posted' | 'void' + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + readonly status_transitions?: { + readonly posted_at?: + | { + readonly gt?: number + readonly gte?: number + readonly lt?: number + readonly lte?: number + } + | number + } } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer_reversal'] + readonly 'application/json': { + /** @description Details about each object. */ + readonly data: readonly components['schemas']['treasury.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + readonly has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + readonly object: 'list' + /** @description The URL where this list can be accessed. */ + readonly url: string + } } } /** Error response. */ @@ -43442,23 +54825,22 @@ export interface operations { } } } - /** - *

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.

- */ - readonly PostTransfersTransferReversalsId: { + /**

Retrieves the details of an existing Transaction.

*/ + readonly GetTreasuryTransactionsId: { readonly parameters: { + readonly query: { + /** Specifies which fields in the response should be expanded. */ + readonly expand?: readonly string[] + } readonly path: { readonly id: string - readonly transfer: string } } readonly responses: { /** Successful response. */ readonly 200: { readonly content: { - readonly 'application/json': components['schemas']['transfer_reversal'] + readonly 'application/json': components['schemas']['treasury.transaction'] } } /** Error response. */ @@ -43470,12 +54852,7 @@ export interface operations { } readonly requestBody: { readonly content: { - readonly 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - readonly expand?: readonly string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - readonly metadata?: { readonly [key: string]: string } | '' - } + readonly 'application/x-www-form-urlencoded': { readonly [key: string]: unknown } } } } @@ -43644,6 +55021,7 @@ export interface operations { | '2019-12-03' | '2020-03-02' | '2020-08-27' + | '2022-08-01' /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ readonly connect?: boolean /** @description An optional description of what the webhook is used for. */ @@ -43663,7 +55041,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43706,7 +55086,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43745,13 +55131,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43820,16 +55203,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] @@ -43915,7 +55331,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43958,7 +55376,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43997,13 +55421,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -44072,16 +55493,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ readonly expand?: readonly string[] diff --git a/test/v3/expected/stripe.support-array-length.ts b/test/v3/expected/stripe.support-array-length.ts index ce6f74abf..2a8bd2b95 100644 --- a/test/v3/expected/stripe.support-array-length.ts +++ b/test/v3/expected/stripe.support-array-length.ts @@ -4,14 +4,6 @@ */ 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'] @@ -278,6 +270,20 @@ export interface paths { */ post: operations['PostApplicationFeesIdRefunds'] } + '/v1/apps/secrets': { + /**

List all secrets stored on the given scope.

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

Create or replace a secret in the secret store.

*/ + post: operations['PostAppsSecrets'] + } + '/v1/apps/secrets/delete': { + /**

Deletes a secret from the secret store by name and scope.

*/ + post: operations['PostAppsSecretsDelete'] + } + '/v1/apps/secrets/find': { + /**

Finds a secret in the secret store by name and scope.

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

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export interface paths { /**

Creates a session of the customer portal.

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

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

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

Retrieves the Bitcoin receiver with the given ID.

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

List bitcoin transacitons for a given receiver.

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

List bitcoin transacitons for a given receiver.

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

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

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

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

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

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetChargesSearch'] + } '/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'] @@ -502,6 +501,15 @@ export interface paths { /**

Creates a new customer object.

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

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

Retrieves a Customer object.

*/ get: operations['GetCustomersCustomer'] @@ -574,15 +582,41 @@ export interface paths { /**

Delete a specified source for a given customer.

*/ delete: operations['DeleteCustomersCustomerCardsId'] } + '/v1/customers/{customer}/cash_balance': { + /**

Retrieves a customer’s cash balance.

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

Changes the settings on a customer’s cash balance.

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

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

*/ + get: operations['GetCustomersCustomerCashBalanceTransactions'] + } + '/v1/customers/{customer}/cash_balance_transactions/{transaction}': { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

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

Removes the currently applied discount on a customer.

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

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

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

Returns a list of PaymentMethods for a given Customer

*/ get: operations['GetCustomersCustomerPaymentMethods'] } + '/v1/customers/{customer}/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + get: operations['GetCustomersCustomerPaymentMethodsPaymentMethod'] + } '/v1/customers/{customer}/sources': { /**

List sources for a specified customer.

*/ get: operations['GetCustomersCustomerSources'] @@ -716,6 +750,34 @@ export interface paths { /**

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

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetFinancialConnectionsAccounts'] + } + '/v1/financial_connections/accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetFinancialConnectionsAccountsAccount'] + } + '/v1/financial_connections/accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostFinancialConnectionsAccountsAccountDisconnect'] + } + '/v1/financial_connections/accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetFinancialConnectionsAccountsAccountOwners'] + } + '/v1/financial_connections/accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostFinancialConnectionsAccountsAccountRefresh'] + } + '/v1/financial_connections/sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostFinancialConnectionsSessions'] + } + '/v1/financial_connections/sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetFinancialConnectionsSessionsSession'] + } '/v1/identity/verification_reports': { /**

List all verification reports.

*/ get: operations['GetIdentityVerificationReports'] @@ -803,9 +865,18 @@ export interface paths { '/v1/invoices': { /**

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

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

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

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

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

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

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

@@ -863,18 +934,6 @@ export interface paths { /**

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'] @@ -953,22 +1012,42 @@ export interface paths { /**

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/link_account_sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostLinkAccountSessions'] + } + '/v1/link_account_sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetLinkAccountSessionsSession'] + } + '/v1/linked_accounts': { + /**

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetLinkedAccounts'] + } + '/v1/linked_accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetLinkedAccountsAccount'] + } + '/v1/linked_accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostLinkedAccountsAccountDisconnect'] + } + '/v1/linked_accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetLinkedAccountsAccountOwners'] + } + '/v1/linked_accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostLinkedAccountsAccountRefresh'] + } '/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.

*/ + /**

Creates a new open order object.

*/ post: operations['PostOrders'] } '/v1/orders/{id}': { @@ -977,13 +1056,21 @@ export interface paths { /**

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}/cancel': { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + post: operations['PostOrdersIdCancel'] + } + '/v1/orders/{id}/line_items': { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetOrdersIdLineItems'] + } + '/v1/orders/{id}/reopen': { + /**

Reopens a submitted order.

*/ + post: operations['PostOrdersIdReopen'] } - '/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/orders/{id}/submit': { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + post: operations['PostOrdersIdSubmit'] } '/v1/payment_intents': { /**

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export interface paths { */ post: operations['PostPaymentIntents'] } + '/v1/payment_intents/search': { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPaymentIntentsSearch'] + } '/v1/payment_intents/{intent}': { /** *

Retrieves the details of a PaymentIntent that has previously been created.

@@ -1022,11 +1118,17 @@ export interface paths { */ post: operations['PostPaymentIntentsIntent'] } + '/v1/payment_intents/{intent}/apply_customer_balance': { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + post: operations['PostPaymentIntentsIntentApplyCustomerBalance'] + } '/v1/payment_intents/{intent}/cancel': { /** *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

* - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ post: operations['PostPaymentIntentsIntentCancel'] } @@ -1070,6 +1172,35 @@ export interface paths { */ post: operations['PostPaymentIntentsIntentConfirm'] } + '/v1/payment_intents/{intent}/increment_authorization': { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + post: operations['PostPaymentIntentsIntentIncrementAuthorization'] + } '/v1/payment_intents/{intent}/verify_microdeposits': { /**

Verifies microdeposits on a PaymentIntent object.

*/ post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] @@ -1091,7 +1222,7 @@ export interface paths { get: operations['GetPaymentLinksPaymentLinkLineItems'] } '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ get: operations['GetPaymentMethods'] /** *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

@@ -1101,7 +1232,7 @@ export interface paths { post: operations['PostPaymentMethods'] } '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ get: operations['GetPaymentMethodsPaymentMethod'] /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ post: operations['PostPaymentMethodsPaymentMethod'] @@ -1112,9 +1243,11 @@ export interface paths { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export interface paths { post: operations['PostPaymentMethodsPaymentMethodAttach'] } '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ post: operations['PostPaymentMethodsPaymentMethodDetach'] } '/v1/payouts': { @@ -1176,6 +1309,15 @@ export interface paths { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ post: operations['PostPrices'] } + '/v1/prices/search': { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPricesSearch'] + } '/v1/prices/{price}': { /**

Retrieves the price with the given ID.

*/ get: operations['GetPricesPrice'] @@ -1188,6 +1330,15 @@ export interface paths { /**

Creates a new product object.

*/ post: operations['PostProducts'] } + '/v1/products/search': { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetProductsSearch'] + } '/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'] @@ -1282,29 +1433,6 @@ export interface paths { /**

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'] @@ -1321,6 +1449,14 @@ export interface paths { */ post: operations['PostRefundsRefund'] } + '/v1/refunds/{refund}/cancel': { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + post: operations['PostRefundsRefundCancel'] + } '/v1/reporting/report_runs': { /**

Returns a list of Report Runs, with the most recent appearing first.

*/ get: operations['GetReportingReportRuns'] @@ -1533,9 +1669,26 @@ export interface paths { '/v1/subscriptions': { /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ get: operations['GetSubscriptions'] - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ + /** + *

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ post: operations['PostSubscriptions'] } + '/v1/subscriptions/search': { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetSubscriptionsSearch'] + } '/v1/subscriptions/{subscription_exposed_id}': { /**

Retrieves the subscription with the given ID.

*/ get: operations['GetSubscriptionsSubscriptionExposedId'] @@ -1555,7 +1708,7 @@ export interface paths { delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] } '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ get: operations['GetTaxCodes'] } '/v1/tax_codes/{id}': { @@ -1574,6 +1727,20 @@ export interface paths { /**

Updates an existing tax rate.

*/ post: operations['PostTaxRatesTaxRate'] } + '/v1/terminal/configurations': { + /**

Returns a list of Configuration objects.

*/ + get: operations['GetTerminalConfigurations'] + /**

Creates a new Configuration object.

*/ + post: operations['PostTerminalConfigurations'] + } + '/v1/terminal/configurations/{configuration}': { + /**

Retrieves a Configuration object.

*/ + get: operations['GetTerminalConfigurationsConfiguration'] + /**

Updates a new Configuration object.

*/ + post: operations['PostTerminalConfigurationsConfiguration'] + /**

Deletes a Configuration object.

*/ + delete: operations['DeleteTerminalConfigurationsConfiguration'] + } '/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'] @@ -1609,6 +1776,110 @@ export interface paths { /**

Deletes a Reader object.

*/ delete: operations['DeleteTerminalReadersReader'] } + '/v1/terminal/readers/{reader}/cancel_action': { + /**

Cancels the current reader action.

*/ + post: operations['PostTerminalReadersReaderCancelAction'] + } + '/v1/terminal/readers/{reader}/process_payment_intent': { + /**

Initiates a payment flow on a Reader.

*/ + post: operations['PostTerminalReadersReaderProcessPaymentIntent'] + } + '/v1/terminal/readers/{reader}/process_setup_intent': { + /**

Initiates a setup intent flow on a Reader.

*/ + post: operations['PostTerminalReadersReaderProcessSetupIntent'] + } + '/v1/terminal/readers/{reader}/set_reader_display': { + /**

Sets reader display to show cart details.

*/ + post: operations['PostTerminalReadersReaderSetReaderDisplay'] + } + '/v1/test_helpers/customers/{customer}/fund_cash_balance': { + /**

Create an incoming testmode bank transfer

*/ + post: operations['PostTestHelpersCustomersCustomerFundCashBalance'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/deliver': { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingDeliver'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/fail': { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingFail'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/return': { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingReturn'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/ship': { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingShip'] + } + '/v1/test_helpers/refunds/{refund}/expire': { + /**

Expire a refund with a status of requires_action.

*/ + post: operations['PostTestHelpersRefundsRefundExpire'] + } + '/v1/test_helpers/terminal/readers/{reader}/present_payment_method': { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + post: operations['PostTestHelpersTerminalReadersReaderPresentPaymentMethod'] + } + '/v1/test_helpers/test_clocks': { + /**

Returns a list of your test clocks.

*/ + get: operations['GetTestHelpersTestClocks'] + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + post: operations['PostTestHelpersTestClocks'] + } + '/v1/test_helpers/test_clocks/{test_clock}': { + /**

Retrieves a test clock.

*/ + get: operations['GetTestHelpersTestClocksTestClock'] + /**

Deletes a test clock.

*/ + delete: operations['DeleteTestHelpersTestClocksTestClock'] + } + '/v1/test_helpers/test_clocks/{test_clock}/advance': { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + post: operations['PostTestHelpersTestClocksTestClockAdvance'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/fail': { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdFail'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/return': { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdReturn'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed': { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdSucceed'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/fail': { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdFail'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/post': { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdPost'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/return': { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdReturn'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail': { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post': { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return': { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn'] + } + '/v1/test_helpers/treasury/received_credits': { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedCredits'] + } + '/v1/test_helpers/treasury/received_debits': { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedDebits'] + } '/v1/tokens': { /** *

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export interface paths { */ post: operations['PostTransfersTransferReversalsId'] } + '/v1/treasury/credit_reversals': { + /**

Returns a list of CreditReversals.

*/ + get: operations['GetTreasuryCreditReversals'] + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + post: operations['PostTreasuryCreditReversals'] + } + '/v1/treasury/credit_reversals/{credit_reversal}': { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + get: operations['GetTreasuryCreditReversalsCreditReversal'] + } + '/v1/treasury/debit_reversals': { + /**

Returns a list of DebitReversals.

*/ + get: operations['GetTreasuryDebitReversals'] + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + post: operations['PostTreasuryDebitReversals'] + } + '/v1/treasury/debit_reversals/{debit_reversal}': { + /**

Retrieves a DebitReversal object.

*/ + get: operations['GetTreasuryDebitReversalsDebitReversal'] + } + '/v1/treasury/financial_accounts': { + /**

Returns a list of FinancialAccounts.

*/ + get: operations['GetTreasuryFinancialAccounts'] + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccounts'] + } + '/v1/treasury/financial_accounts/{financial_account}': { + /**

Retrieves the details of a FinancialAccount.

*/ + get: operations['GetTreasuryFinancialAccountsFinancialAccount'] + /**

Updates the details of a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccount'] + } + '/v1/treasury/financial_accounts/{financial_account}/features': { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + get: operations['GetTreasuryFinancialAccountsFinancialAccountFeatures'] + /**

Updates the Features associated with a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccountFeatures'] + } + '/v1/treasury/inbound_transfers': { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryInboundTransfers'] + /**

Creates an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfers'] + } + '/v1/treasury/inbound_transfers/{id}': { + /**

Retrieves the details of an existing InboundTransfer.

*/ + get: operations['GetTreasuryInboundTransfersId'] + } + '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel': { + /**

Cancels an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfersInboundTransferCancel'] + } + '/v1/treasury/outbound_payments': { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryOutboundPayments'] + /**

Creates an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPayments'] + } + '/v1/treasury/outbound_payments/{id}': { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + get: operations['GetTreasuryOutboundPaymentsId'] + } + '/v1/treasury/outbound_payments/{id}/cancel': { + /**

Cancel an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPaymentsIdCancel'] + } + '/v1/treasury/outbound_transfers': { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryOutboundTransfers'] + /**

Creates an OutboundTransfer.

*/ + post: operations['PostTreasuryOutboundTransfers'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}': { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + get: operations['GetTreasuryOutboundTransfersOutboundTransfer'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel': { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + post: operations['PostTreasuryOutboundTransfersOutboundTransferCancel'] + } + '/v1/treasury/received_credits': { + /**

Returns a list of ReceivedCredits.

*/ + get: operations['GetTreasuryReceivedCredits'] + } + '/v1/treasury/received_credits/{id}': { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + get: operations['GetTreasuryReceivedCreditsId'] + } + '/v1/treasury/received_debits': { + /**

Returns a list of ReceivedDebits.

*/ + get: operations['GetTreasuryReceivedDebits'] + } + '/v1/treasury/received_debits/{id}': { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + get: operations['GetTreasuryReceivedDebitsId'] + } + '/v1/treasury/transaction_entries': { + /**

Retrieves a list of TransactionEntry objects.

*/ + get: operations['GetTreasuryTransactionEntries'] + } + '/v1/treasury/transaction_entries/{id}': { + /**

Retrieves a TransactionEntry object.

*/ + get: operations['GetTreasuryTransactionEntriesId'] + } + '/v1/treasury/transactions': { + /**

Retrieves a list of Transaction objects.

*/ + get: operations['GetTreasuryTransactions'] + } + '/v1/treasury/transactions/{id}': { + /**

Retrieves the details of an existing Transaction.

*/ + get: operations['GetTreasuryTransactionsId'] + } '/v1/webhook_endpoints': { /**

Returns a list of your webhook endpoints.

*/ get: operations['GetWebhookEndpoints'] @@ -1718,7 +2101,7 @@ export interface components { country?: string /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ created?: number /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1809,6 +2192,11 @@ export interface components { * @enum {string} */ acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + affirm_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1829,6 +2217,16 @@ export interface components { * @enum {string} */ bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + bank_transfer_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + blik_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1884,11 +2282,21 @@ export interface components { * @enum {string} */ klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + konbini_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the legacy payments capability of the account. * @enum {string} */ legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + link_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1899,6 +2307,16 @@ export interface components { * @enum {string} */ p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + paynow_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + promptpay_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1924,6 +2342,16 @@ export interface components { * @enum {string} */ transfers?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + treasury?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + us_bank_account_ach_payments?: 'active' | 'inactive' | 'pending' } /** AccountCapabilityFutureRequirements */ account_capability_future_requirements: { @@ -1986,6 +2414,10 @@ export interface components { decline_on?: components['schemas']['account_decline_charge_on'] /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ statement_descriptor_prefix?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountDashboardSettings */ account_dashboard_settings: { @@ -2057,6 +2489,10 @@ export interface components { statement_descriptor_kana?: string | null /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ statement_descriptor_kanji?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountPayoutSettings */ account_payout_settings: { @@ -2104,6 +2540,7 @@ export interface components { code: | 'invalid_address_city_state_postal_code' | 'invalid_street_address' + | 'invalid_tos_acceptance' | 'invalid_value_other' | 'verification_document_address_mismatch' | 'verification_document_address_missing' @@ -2167,6 +2604,16 @@ export interface components { payments: components['schemas']['account_payments_settings'] payouts?: components['schemas']['account_payout_settings'] sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + treasury?: components['schemas']['account_treasury_settings'] + } + /** AccountTermsOfService */ + account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string } /** AccountTOSAcceptance */ account_tos_acceptance: { @@ -2182,6 +2629,10 @@ export interface components { /** @description The user agent of the browser from which the account representative accepted their service agreement */ user_agent?: string | null } + /** AccountTreasurySettings */ + account_treasury_settings: { + tos_acceptance?: components['schemas']['account_terms_of_service'] + } /** AccountUnificationAccountController */ account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2207,39 +2658,6 @@ export interface components { /** @description State, county, province, or region. */ state?: string | null } - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } /** APIErrors */ api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2349,9 +2767,49 @@ export interface components { url: string } } + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + 'apps.secret': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description If true, indicates that this secret has been deleted */ + deleted?: boolean + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apps.secret' + /** @description The plaintext secret value to be stored. */ + payload?: string | null + scope: components['schemas']['secret_service_resource_scope'] + } /** AutomaticTax */ automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ enabled: boolean /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2569,6 +3027,94 @@ export interface components { */ status: string } + /** BankConnectionsResourceAccountholder */ + bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account?: string | components['schemas']['account'] + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer?: string | components['schemas']['customer'] + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + type: 'account' | 'customer' + } + /** BankConnectionsResourceBalance */ + bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + as_of: number + cash?: components['schemas']['bank_connections_resource_balance_api_resource_cash_balance'] + credit?: components['schemas']['bank_connections_resource_balance_api_resource_credit_balance'] + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + current: { [key: string]: number } + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + type: 'cash' | 'credit' + } + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + available?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + used?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceRefresh */ + bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } + /** BankConnectionsResourceLinkAccountSessionFilters */ + bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + countries?: string[] | null + } + /** BankConnectionsResourceOwnershipRefresh */ + bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } /** billing_details */ billing_details: { /** @description Billing address. */ @@ -2588,7 +3134,7 @@ export interface components { /** @description Whether the configuration is active and can be used to create portal sessions. */ active: boolean /** @description ID of the Connect Application that created the configuration. */ - application?: string | null + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null business_profile: components['schemas']['portal_business_profile'] /** * Format: unix-time @@ -2604,6 +3150,7 @@ export interface components { is_default: boolean /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + login_page: components['schemas']['portal_login_page'] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null /** @@ -2711,101 +3258,10 @@ export interface components { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ on_behalf_of?: string | null /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string + return_url?: string | null /** @description The short-lived URL of the session that gives customers access to the customer portal. */ url: string } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null - } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2905,8 +3361,8 @@ export interface components { * @enum {string} */ object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: (string | components['schemas']['recipient']) | null + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + status?: string | null /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ tokenization_method?: string | null } @@ -2927,6 +3383,24 @@ export interface components { } /** card_mandate_payment_method_details */ card_mandate_payment_method_details: { [key: string]: unknown } + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + available?: { [key: string]: number } | null + /** @description The ID of the customer whose cash balance this object represents. */ + customer: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'cash_balance' + settings: components['schemas']['customer_balance_customer_balance_settings'] + } /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2968,6 +3442,8 @@ export interface components { description?: string | null /** @description Whether the charge has been disputed. */ disputed: boolean + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ failure_code?: string | null /** @description Message to user further explaining reason for charge failure if available. */ @@ -2989,8 +3465,6 @@ export interface components { object: 'charge' /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the order this charge is for if one exists. */ - order?: (string | components['schemas']['order']) | null /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ outcome?: components['schemas']['charge_outcome'] | null /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ @@ -3001,6 +3475,7 @@ export interface components { payment_method?: string | null /** @description Details about the payment method at the time of the transaction. */ payment_method_details?: components['schemas']['payment_method_details'] | null + radar_options?: components['schemas']['radar_radar_options'] /** @description This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3013,7 +3488,7 @@ export interface components { * RefundList * @description A list of refunds that have been applied to the charge. */ - refunds: { + refunds?: { /** @description Details about each object. */ data: components['schemas']['refund'][] /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3094,7 +3569,7 @@ export interface components { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ 'checkout.session': { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ @@ -3123,6 +3598,11 @@ export interface components { consent?: components['schemas']['payment_pages_checkout_session_consent'] | null /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null /** @@ -3138,7 +3618,7 @@ export interface components { * @enum {string|null} */ customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null /** * @description If provided, this value will be used when the Customer object is created. @@ -3242,6 +3722,11 @@ export interface components { payment_intent?: (string | components['schemas']['payment_intent']) | null /** @description The ID of the Payment Link that created this Session. */ payment_link?: (string | components['schemas']['payment_link']) | null + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + payment_method_collection?: ('always' | 'if_required') | null /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null /** @@ -3260,14 +3745,14 @@ export interface components { recovered_from?: string | null /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description Shipping information for this Checkout Session. */ - shipping?: components['schemas']['shipping'] | null /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['payment_pages_checkout_session_shipping_cost'] | null + /** @description Shipping information for this Checkout Session. */ + shipping_details?: components['schemas']['shipping'] | null /** @description The shipping rate options applied to this Session. */ shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: (string | components['schemas']['shipping_rate']) | null /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3291,7 +3776,10 @@ export interface components { tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] /** @description Tax and discount details for the computed total amount. */ total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null - /** @description The URL to the Checkout Session. */ + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ url?: string | null } /** CheckoutAcssDebitMandateOptions */ @@ -3321,27 +3809,359 @@ export interface components { */ currency?: 'cad' | 'usd' mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** CheckoutAffirmPaymentMethodOptions */ + checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAlipayPaymentMethodOptions */ + checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAuBecsDebitPaymentMethodOptions */ + checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutBacsDebitPaymentMethodOptions */ + checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutBancontactPaymentMethodOptions */ + checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** CheckoutBoletoPaymentMethodOptions */ checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutCardInstallmentsOptions */ + checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + enabled?: boolean + } + /** CheckoutCardPaymentMethodOptions */ + checkout_card_payment_method_options: { + installments?: components['schemas']['checkout_card_installments_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string + } + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + checkout_customer_balance_bank_transfer_payment_method_options: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** CheckoutCustomerBalancePaymentMethodOptions */ + checkout_customer_balance_payment_method_options: { + bank_transfer?: components['schemas']['checkout_customer_balance_bank_transfer_payment_method_options'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutEpsPaymentMethodOptions */ + checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutFpxPaymentMethodOptions */ + checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGiropayPaymentMethodOptions */ + checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGrabPayPaymentMethodOptions */ + checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutIdealPaymentMethodOptions */ + checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutKlarnaPaymentMethodOptions */ + checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutKonbiniPaymentMethodOptions */ + checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** CheckoutOxxoPaymentMethodOptions */ checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutP24PaymentMethodOptions */ + checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPaynowPaymentMethodOptions */ + checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPixPaymentMethodOptions */ + checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + expires_after_seconds?: number | null + } + /** CheckoutSepaDebitPaymentMethodOptions */ + checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** CheckoutSessionPaymentMethodOptions */ checkout_session_payment_method_options: { acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + affirm?: components['schemas']['checkout_affirm_payment_method_options'] + afterpay_clearpay?: components['schemas']['checkout_afterpay_clearpay_payment_method_options'] + alipay?: components['schemas']['checkout_alipay_payment_method_options'] + au_becs_debit?: components['schemas']['checkout_au_becs_debit_payment_method_options'] + bacs_debit?: components['schemas']['checkout_bacs_debit_payment_method_options'] + bancontact?: components['schemas']['checkout_bancontact_payment_method_options'] boleto?: components['schemas']['checkout_boleto_payment_method_options'] + card?: components['schemas']['checkout_card_payment_method_options'] + customer_balance?: components['schemas']['checkout_customer_balance_payment_method_options'] + eps?: components['schemas']['checkout_eps_payment_method_options'] + fpx?: components['schemas']['checkout_fpx_payment_method_options'] + giropay?: components['schemas']['checkout_giropay_payment_method_options'] + grabpay?: components['schemas']['checkout_grab_pay_payment_method_options'] + ideal?: components['schemas']['checkout_ideal_payment_method_options'] + klarna?: components['schemas']['checkout_klarna_payment_method_options'] + konbini?: components['schemas']['checkout_konbini_payment_method_options'] oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + p24?: components['schemas']['checkout_p24_payment_method_options'] + paynow?: components['schemas']['checkout_paynow_payment_method_options'] + pix?: components['schemas']['checkout_pix_payment_method_options'] + sepa_debit?: components['schemas']['checkout_sepa_debit_payment_method_options'] + sofort?: components['schemas']['checkout_sofort_payment_method_options'] + us_bank_account?: components['schemas']['checkout_us_bank_account_payment_method_options'] + } + /** CheckoutSofortPaymentMethodOptions */ + checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutUsBankAccountPaymentMethodOptions */ + checkout_us_bank_account_payment_method_options: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' } /** ConnectCollectionTransfer */ connect_collection_transfer: { @@ -3405,8 +4225,8 @@ export interface components { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3419,6 +4239,8 @@ export interface components { created: number /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ currency?: string | null + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['coupon_currency_option'] } /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3458,6 +4280,11 @@ export interface components { /** @description A list of product IDs this coupon applies to */ products: string[] } + /** CouponCurrencyOption */ + coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: number + } /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3532,12 +4359,16 @@ export interface components { * @enum {string} */ status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ subtotal: number + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + subtotal_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ tax_amounts: components['schemas']['credit_note_tax_amount'][] /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ total: number + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax?: number | null /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3553,6 +4384,8 @@ export interface components { credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Description of the item being credited. */ description?: string | null /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3588,6 +4421,11 @@ export interface components { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** CreditNoteTaxAmount */ credit_note_tax_amount: { @@ -3598,6 +4436,34 @@ export interface components { /** @description The tax rate that was applied to get this tax amount. */ tax_rate: string | components['schemas']['tax_rate'] } + /** CurrencyOption */ + currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['price_tier'][] + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null + } + /** CustomUnitAmount */ + custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + maximum?: number | null + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum?: number | null + /** @description The starting unit amount which can be updated by the customer. */ + preset?: number | null + } /** * Customer * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -3609,6 +4475,8 @@ export interface components { address?: components['schemas']['address'] | null /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ balance?: number + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + cash_balance?: components['schemas']['cash_balance'] | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3621,16 +4489,7 @@ 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?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. * @@ -3645,6 +4504,8 @@ export interface components { email?: string | null /** @description Unique identifier for the object. */ id: string + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + invoice_credit_balance?: { [key: string]: number } /** @description The prefix for the customer used to generate unique invoice numbers. */ invoice_prefix?: string | null invoice_settings?: components['schemas']['invoice_setting_customer_setting'] @@ -3673,13 +4534,7 @@ export interface components { */ sources?: { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -3730,6 +4585,8 @@ export interface components { /** @description The URL where this list can be accessed. */ url: string } + /** @description ID of the test clock this customer belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** customer_acceptance */ customer_acceptance: { @@ -3746,6 +4603,53 @@ export interface components { */ type: 'offline' | 'online' } + /** CustomerBalanceCustomerBalanceSettings */ + customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + reconciliation_mode: 'automatic' | 'manual' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: string | components['schemas']['payment_intent'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + bank_transfer: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + eu_bank_transfer?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer'] + /** @description The user-supplied reference field on the bank transfer. */ + reference?: string | null + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + bic?: string | null + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4?: string | null + /** @description The full name of the sender, as supplied by the sending bank. */ + sender_name?: string | null + } + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: string | components['schemas']['refund'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: string | components['schemas']['payment_intent'] + } /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3801,6 +4705,46 @@ export interface components { | 'unapplied_from_invoice' | 'unspent_receiver_credit' } + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + customer_cash_balance_transaction: { + applied_to_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer whose available cash balance changed as a result of this transaction. */ + customer: string | components['schemas']['customer'] + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + ending_balance: number + funded?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + net_amount: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_cash_balance_transaction' + refunded_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction'] + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + type: 'applied_to_payment' | 'funded' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'unapplied_from_payment' + unapplied_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction'] + } /** CustomerTax */ customer_tax: { /** @@ -3840,8 +4784,8 @@ export interface components { */ object: 'account' } - /** AlipayDeletedAccount */ - deleted_alipay_account: { + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3853,10 +4797,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'alipay_account' + object: 'apple_pay_domain' } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { + /** DeletedApplication */ + deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3864,11 +4808,13 @@ export interface components { deleted: true /** @description Unique identifier for the object. */ id: string + /** @description The name of the application. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'apple_pay_domain' + object: 'application' } /** DeletedBankAccount */ deleted_bank_account: { @@ -3887,21 +4833,6 @@ export interface components { */ object: 'bank_account' } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } /** DeletedCard */ deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4015,11 +4946,7 @@ export interface components { object: 'invoiceitem' } /** Polymorphic */ - deleted_payment_source: - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] + deleted_payment_source: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] /** DeletedPerson */ deleted_person: { /** @@ -4110,8 +5037,8 @@ export interface components { */ object: 'radar.value_list_item' } - /** DeletedTransferRecipient */ - deleted_recipient: { + /** DeletedSku */ + deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4123,10 +5050,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'recipient' + object: 'sku' } - /** DeletedSku */ - deleted_sku: { + /** DeletedSubscriptionItem */ + deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4138,10 +5065,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'sku' + object: 'subscription_item' } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { + /** deleted_tax_id */ + deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4153,10 +5080,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'subscription_item' + object: 'tax_id' } - /** deleted_tax_id */ - deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + 'deleted_terminal.configuration': { /** * @description Always true for a deleted object * @enum {boolean} @@ -4168,7 +5095,7 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'tax_id' + object: 'terminal.configuration' } /** TerminalLocationDeletedLocation */ 'deleted_terminal.location': { @@ -4200,6 +5127,21 @@ export interface components { */ object: 'terminal.reader' } + /** DeletedTestClock */ + 'deleted_test_helpers.test_clock': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'test_helpers.test_clock' + } /** NotificationWebhookEndpointDeleted */ deleted_webhook_endpoint: { /** @@ -4215,22 +5157,10 @@ export interface components { */ object: 'webhook_endpoint' } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4401,6 +5331,16 @@ export interface components { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number } + /** EmailSent */ + email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + email_sent_at: number + /** @description The recipient's email address. */ + email_sent_to: string + } /** EphemeralKey */ ephemeral_key: { /** @@ -4626,6 +5566,7 @@ export interface components { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** @description The size in bytes of the file object. */ size: number /** @description A user friendly title for the document. */ @@ -4670,6 +5611,175 @@ export interface components { /** @description The publicly accessible URL to download the file. */ url?: string | null } + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + 'financial_connections.account': { + /** @description The account holder that this account belongs to. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** @description The most recent information about the account's balance. */ + balance?: components['schemas']['bank_connections_resource_balance'] | null + /** @description The state of the most recent attempt to refresh the account balance. */ + balance_refresh?: components['schemas']['bank_connections_resource_balance_refresh'] | null + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + category: 'cash' | 'credit' | 'investment' | 'other' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the institution that holds this account. */ + institution_name: string + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account' + /** @description The most recent information about the account's owners. */ + ownership?: (string | components['schemas']['financial_connections.account_ownership']) | null + /** @description The state of the most recent attempt to refresh the account owners. */ + ownership_refresh?: components['schemas']['bank_connections_resource_ownership_refresh'] | null + /** @description The list of permissions granted by this account. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] | null + /** + * @description The status of the link to the account. + * @enum {string} + */ + status: 'active' | 'disconnected' | 'inactive' + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + subcategory: 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings' + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + supported_payment_method_types: ('link' | 'us_bank_account')[] + } + /** BankConnectionsResourceOwner */ + 'financial_connections.account_owner': { + /** @description The email address of the owner. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The full name of the owner. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_owner' + /** @description The ownership object that this owner belongs to. */ + ownership: string + /** @description The raw phone number of the owner. */ + phone?: string | null + /** @description The raw physical address of the owner. */ + raw_address?: string | null + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + refreshed_at?: number | null + } + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + 'financial_connections.account_ownership': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_ownership' + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + owners: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + 'financial_connections.session': { + /** @description The account holder for whom accounts are collected in this session. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + accounts: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description A value that will be passed to the client to launch the authentication flow. */ + client_secret: string + filters?: components['schemas']['bank_connections_resource_link_account_session_filters'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.session' + /** @description Permissions requested for accounts collected during this session. */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** FinancialReportingFinanceReportRunRunParameters */ financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4695,6 +5805,118 @@ export interface components { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ timezone?: string } + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + funding_instructions: { + bank_transfer: components['schemas']['funding_instructions_bank_transfer'] + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + funding_type: 'bank_transfer' + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'funding_instructions' + } + /** FundingInstructionsBankTransfer */ + funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + country: string + /** @description A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** + * @description The bank_transfer type + * @enum {string} + */ + type: 'eu_bank_transfer' | 'jp_bank_transfer' + } + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + funding_instructions_bank_transfer_financial_address: { + iban?: components['schemas']['funding_instructions_bank_transfer_iban_record'] + sort_code?: components['schemas']['funding_instructions_bank_transfer_sort_code_record'] + spei?: components['schemas']['funding_instructions_bank_transfer_spei_record'] + /** @description The payment networks supported by this FinancialAddress */ + supported_networks?: ('bacs' | 'fps' | 'sepa' | 'spei' | 'zengin')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'iban' | 'sort_code' | 'spei' | 'zengin' + zengin?: components['schemas']['funding_instructions_bank_transfer_zengin_record'] + } + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The BIC/SWIFT code of the account. */ + bic: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** @description The IBAN of the account. */ + iban: string + } + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The account number */ + account_number: string + /** @description The six-digit sort code */ + sort_code: string + } + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + bank_code: string + /** @description The short banking institution name */ + bank_name: string + /** @description The CLABE number */ + clabe: string + } + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + account_holder_name?: string | null + /** @description The account number */ + account_number?: string | null + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null + /** @description The bank code of the account */ + bank_code?: string | null + /** @description The bank name of the account */ + bank_name?: string | null + /** @description The branch code of the account */ + branch_code?: string | null + /** @description The branch name of the account */ + branch_name?: string | null + } /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -4999,7 +6221,7 @@ export interface components { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5045,6 +6267,42 @@ export interface components { /** @description The user’s verified data. */ verified_outputs?: components['schemas']['gelato_verified_outputs'] | null } + /** InboundTransfers */ + inbound_transfers: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['inbound_transfers_payment_method_details_us_bank_account'] + } + /** inbound_transfers_payment_method_details_us_bank_account */ + inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + network: 'ach' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** * Invoice * @description Invoices are statements of amounts owed by a customer, and are either @@ -5091,8 +6349,10 @@ export interface components { amount_due: number /** @description The amount, in %s, that was paid. */ amount_paid: number - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ amount_remaining: number + /** @description ID of the Connect Application that created the invoice. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ application_fee_amount?: number | null /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5157,16 +6417,7 @@ export interface components { /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates applied to this invoice, if any. */ default_tax_rates: components['schemas']['tax_rate'][] /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ @@ -5184,6 +6435,8 @@ export interface components { ending_balance?: number | null /** @description Footer displayed on the invoice. */ footer?: string | null + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice?: components['schemas']['invoices_from_invoice'] | null /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ hosted_invoice_url?: string | null /** @description Unique identifier for the object. */ @@ -5192,6 +6445,8 @@ export interface components { invoice_pdf?: string | null /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ last_finalization_error?: components['schemas']['api_errors'] | null + /** @description The ID of the most recent non-draft revision of this invoice */ + latest_revision?: (string | components['schemas']['invoice']) | null /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5252,6 +6507,8 @@ export interface components { quote?: (string | components['schemas']['quote']) | null /** @description This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number?: string | null + /** @description Options for invoice PDF rendering. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ starting_balance: number /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5266,15 +6523,21 @@ export interface components { subscription?: (string | components['schemas']['subscription']) | null /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ subtotal: number + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal_excluding_tax?: number | null /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ tax?: number | null + /** @description ID of the test clock this invoice belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null threshold_reason?: components['schemas']['invoice_threshold_reason'] /** @description Total after discounts and taxes. */ total: number /** @description The aggregate amounts calculated per discount across all line items. */ total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + total_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ total_tax_amounts: components['schemas']['invoice_tax_amount'][] /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ @@ -5285,6 +6548,11 @@ export interface components { */ webhooks_delivered_at?: number | null } + /** invoice_installments_card */ + invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + enabled?: boolean | null + } /** InvoiceItemThresholdReason */ invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5296,12 +6564,12 @@ export interface components { invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ end: number /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ start: number } @@ -5344,12 +6612,52 @@ export interface components { } /** invoice_payment_method_options_card */ invoice_payment_method_options_card: { + installments?: components['schemas']['invoice_installments_card'] /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic') | null } + /** invoice_payment_method_options_customer_balance */ + invoice_payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer'] + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + type?: string | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } + /** invoice_payment_method_options_konbini */ + invoice_payment_method_options_konbini: { [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account */ + invoice_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['invoice_payment_method_options_us_bank_account_linked_account_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'payment_method' | 'transactions')[] + } /** InvoiceSettingCustomField */ invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5365,12 +6673,19 @@ export interface components { default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description Default footer to be displayed on invoices for this customer. */ footer?: string | null + /** @description Default options for invoice PDF rendering for this customer. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null } /** InvoiceSettingQuoteSetting */ invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number | null } + /** InvoiceSettingRenderingOptions */ + invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display?: string | null + } /** InvoiceSettingSubscriptionScheduleSetting */ invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5453,6 +6768,8 @@ export interface components { subscription_item?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: components['schemas']['tax_rate'][] | null + /** @description ID of the test clock this invoice item belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description Unit amount (in the `currency` specified) of the invoice item. */ unit_amount?: number | null /** @@ -5461,6 +6778,25 @@ export interface components { */ unit_amount_decimal?: string | null } + /** InvoicesFromInvoice */ + invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + action: string + /** @description The invoice that was cloned. */ + invoice: string | components['schemas']['invoice'] + } + /** InvoicesLineItemsCreditedItems */ + invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + invoice: string + /** @description Credited invoice line items */ + invoice_line_items: string[] + } + /** InvoicesLineItemsProrationDetails */ + invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items?: components['schemas']['invoices_line_items_credited_items'] | null + } /** InvoicesPaymentMethodOptions */ invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ @@ -5469,9 +6805,17 @@ export interface components { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ card?: components['schemas']['invoice_payment_method_options_card'] | null + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** InvoicesPaymentSettings */ invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + default_mandate?: string | null /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ payment_method_options?: components['schemas']['invoices_payment_method_options'] | null /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ @@ -5485,12 +6829,18 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null @@ -5498,13 +6848,14 @@ export interface components { /** InvoicesResourceInvoiceTaxID */ invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -5516,10 +6867,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -5539,6 +6892,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -5571,38 +6925,6 @@ export interface components { */ voided_at?: number | null } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5662,6 +6984,8 @@ export interface components { status: 'closed' | 'pending' | 'reversed' /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ transactions: components['schemas']['issuing.transaction'][] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + treasury?: components['schemas']['issuing_authorization_treasury'] | null verification_data: components['schemas']['issuing_authorization_verification_data'] /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null @@ -5677,14 +7001,14 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: ('lost' | 'stolen') | null + cancellation_reason?: ('design_rejected' | 'lost' | 'stolen') | null cardholder: components['schemas']['issuing.cardholder'] /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ currency: string /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ cvc?: string @@ -5692,6 +7016,8 @@ export interface components { exp_month: number /** @description The expiration year of the card. */ exp_year: number + /** @description The financial account this card is attached to. */ + financial_account?: string | null /** @description Unique identifier for the object. */ id: string /** @description The last 4 digits of the card number. */ @@ -5787,7 +7113,7 @@ export interface components { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number /** @description List of balance transactions associated with the dispute. */ balance_transactions?: components['schemas']['balance_transaction'][] | null @@ -5817,6 +7143,8 @@ export interface components { status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' /** @description The transaction being disputed. */ transaction: string | components['schemas']['issuing.transaction'] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_dispute_treasury'] | null } /** * IssuingSettlement @@ -5913,6 +7241,8 @@ export interface components { object: 'issuing.transaction' /** @description Additional purchase information that is optionally provided by the merchant. */ purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_transaction_treasury'] | null /** * @description The nature of the transaction. * @enum {string} @@ -6001,6 +7331,15 @@ export interface components { | 'webhook_declined' | 'webhook_timeout' } + /** IssuingAuthorizationTreasury */ + issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: string[] + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: string[] + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction?: string | null + } /** IssuingAuthorizationVerificationData */ issuing_authorization_verification_data: { /** @@ -6645,6 +7984,8 @@ export interface components { * @enum {string|null} */ carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** @description Additional information that may be required for clearing customs. */ + customs?: components['schemas']['issuing_card_shipping_customs'] | null /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6652,6 +7993,10 @@ export interface components { eta?: number | null /** @description Recipient name. */ name: string + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + phone_number?: string | null + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + require_signature?: boolean | null /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -6672,9 +8017,14 @@ export interface components { */ type: 'bulk' | 'individual' } + /** IssuingCardShippingCustoms */ + issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + eori_number?: string | null + } /** IssuingCardSpendingLimit */ issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -7633,7 +8983,7 @@ export interface components { } /** IssuingCardholderSpendingLimit */ issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -8090,6 +9440,13 @@ export interface components { */ received_at?: number | null } + /** IssuingDisputeTreasury */ + issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: string + } /** IssuingTransactionAmountDetails */ issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8171,13 +9528,24 @@ export interface components { /** @description The unit cost of the item in cents. */ unit_cost?: number | null } + /** IssuingTransactionTreasury */ + issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + received_credit?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + received_debit?: string | null + } /** * LineItem * @description A line item. */ item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: number /** @description Total before any discounts or taxes are applied. */ amount_subtotal: number + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: number /** @description Total after discounts and taxes. */ amount_total: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8195,6 +9563,12 @@ export interface components { object: 'item' /** @description The price used to generate the line item. */ price?: components['schemas']['price'] | null + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + product?: string | components['schemas']['product'] | components['schemas']['deleted_product'] /** @description The quantity of products being purchased. */ quantity?: number | null /** @description The taxes applied to the line item. */ @@ -8337,6 +9711,8 @@ export interface components { line_item: { /** @description The amount, in %s. */ amount: number + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8365,6 +9741,8 @@ export interface components { price?: components['schemas']['price'] | null /** @description Whether this is a proration. */ proration: boolean + /** @description Additional details for proration line items */ + proration_details?: components['schemas']['invoices_line_items_proration_details'] | null /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ quantity?: number | null /** @description The subscription that the invoice item pertains to, if any. */ @@ -8380,6 +9758,11 @@ export interface components { * @enum {string} */ type: 'invoiceitem' | 'subscription' + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** LineItemsDiscountAmount */ line_items_discount_amount: { @@ -8393,6 +9776,13 @@ export interface components { amount: number rate: components['schemas']['tax_rate'] } + /** linked_account_options_us_bank_account */ + linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** LoginLink */ login_link: { /** @@ -8473,17 +9863,50 @@ export interface components { /** @description The URL that will contain the mandate that the customer has signed. */ url: string } + /** mandate_blik */ + mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } + /** mandate_link */ + mandate_link: { [key: string]: unknown } /** mandate_multi_use */ mandate_multi_use: { [key: string]: unknown } + /** mandate_options_off_session_details_blik */ + mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + amount?: number | null + /** @description Currency of each recurring payment. */ + currency?: string | null + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + interval?: ('day' | 'month' | 'week' | 'year') | null + /** @description Frequency indicator of each recurring payment. */ + interval_count?: number | null + } /** mandate_payment_method_details */ mandate_payment_method_details: { acss_debit?: components['schemas']['mandate_acss_debit'] au_becs_debit?: components['schemas']['mandate_au_becs_debit'] bacs_debit?: components['schemas']['mandate_bacs_debit'] + blik?: components['schemas']['mandate_blik'] card?: components['schemas']['card_mandate_payment_method_details'] + link?: components['schemas']['mandate_link'] sepa_debit?: components['schemas']['mandate_sepa_debit'] /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['mandate_us_bank_account'] } /** mandate_sepa_debit */ mandate_sepa_debit: { @@ -8499,6 +9922,8 @@ export interface components { /** @description On a single use mandate, the currency of the payment. */ currency: string } + /** mandate_us_bank_account */ + mandate_us_bank_account: { [key: string]: unknown } /** networks */ networks: { /** @description All available networks for the card. */ @@ -8530,24 +9955,33 @@ export interface components { user_agent?: string | null } /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: (string | components['schemas']['charge']) | null + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + amount_subtotal: number + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + amount_total: number + /** @description ID of the Connect application that created the Order, if any. */ + application?: (string | components['schemas']['application']) | null + automatic_tax?: components['schemas']['orders_v2_resource_automatic_tax'] + /** @description Customer billing details associated with the order. */ + billing_details?: components['schemas']['orders_v2_resource_billing_details'] | null + /** @description The fields on the Order that can be updated from the client */ + client_permissions?: components['schemas']['orders_v2_resource_client_permissions'] | null + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + client_secret?: string | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8555,32 +9989,23 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The email address of the customer placing the order. */ - email?: string | null - /** @description External coupon code to load for this order. */ - external_coupon_code?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'])[] | null /** @description Unique identifier for the object. */ id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order' + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + ip_address?: string | null /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. */ - returns?: { + line_items?: { /** @description Details about each object. */ - data: components['schemas']['order_return'][] + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -8590,83 +10015,391 @@ export interface components { object: 'list' /** @description The URL where this list can be accessed. */ url: string - } | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: components['schemas']['shipping'] | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - /** @description The timestamps at which the order status was updated. */ - status_transitions?: components['schemas']['status_transitions'] | null + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order' + payment: components['schemas']['orders_v2_resource_payment'] + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['orders_v2_resource_shipping_cost'] | null + /** @description Customer shipping information associated with the order. */ + shipping_details?: components['schemas']['orders_v2_resource_shipping_details'] | null + /** + * @description The overall status of the order. + * @enum {string} */ - updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string + status: 'canceled' | 'complete' | 'open' | 'processing' | 'submitted' + tax_details?: components['schemas']['orders_v2_resource_tax_details'] + total_details: components['schemas']['orders_v2_resource_total_details'] } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string + /** orders_payment_method_options_afterpay_clearpay */ + orders_payment_method_options_afterpay_clearpay: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: (string | components['schemas']['sku']) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string + capture_method?: 'automatic' | 'manual' + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + reference?: string | null + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number + /** OrdersV2ResourceAutomaticPaymentMethods */ + orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + enabled: boolean + } + /** OrdersV2ResourceAutomaticTax */ + orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + enabled: boolean /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** OrdersV2ResourceBillingDetails */ + orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + address?: components['schemas']['address'] | null + /** @description Email address for the order. */ + email?: string | null + /** @description Full name for the order. */ + name?: string | null + /** @description Billing phone number for the order (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceCardPaymentMethodOptions */ + orders_v2_resource_card_payment_method_options: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** OrdersV2ResourceClientPermissions */ + orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + billing_details?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + promotion_codes?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + shipping_details?: ('allow' | 'disallow') | null + } + /** OrdersV2ResourcePayment */ + orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description Settings describing how the order should configure generated PaymentIntents. */ + settings?: components['schemas']['orders_v2_resource_payment_settings'] | null + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + status?: + | ( + | 'canceled' + | 'complete' + | 'not_required' + | 'processing' + | 'requires_action' + | 'requires_capture' + | 'requires_confirmation' + | 'requires_payment_method' + ) + | null + } + /** OrdersV2ResourcePaymentMethodOptions */ + orders_v2_resource_payment_method_options: { + acss_debit?: components['schemas']['payment_intent_payment_method_options_acss_debit'] + afterpay_clearpay?: components['schemas']['orders_payment_method_options_afterpay_clearpay'] + alipay?: components['schemas']['payment_method_options_alipay'] + bancontact?: components['schemas']['payment_method_options_bancontact'] + card?: components['schemas']['orders_v2_resource_card_payment_method_options'] + customer_balance?: components['schemas']['payment_method_options_customer_balance'] + ideal?: components['schemas']['payment_method_options_ideal'] + klarna?: components['schemas']['payment_method_options_klarna'] + link?: components['schemas']['payment_intent_payment_method_options_link'] + oxxo?: components['schemas']['payment_method_options_oxxo'] + p24?: components['schemas']['payment_method_options_p24'] + paypal?: components['schemas']['payment_method_options_paypal'] + sepa_debit?: components['schemas']['payment_intent_payment_method_options_sepa_debit'] + sofort?: components['schemas']['payment_method_options_sofort'] + wechat_pay?: components['schemas']['payment_method_options_wechat_pay'] + } + /** OrdersV2ResourcePaymentSettings */ + orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + automatic_payment_methods?: components['schemas']['orders_v2_resource_automatic_payment_methods'] | null + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + payment_method_options?: components['schemas']['orders_v2_resource_payment_method_options'] | null + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + /** @description The URL to redirect the customer to after they authenticate their payment. */ + return_url?: string | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + transfer_data?: components['schemas']['orders_v2_resource_transfer_data'] | null + } + /** OrdersV2ResourceShippingCost */ + orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceShippingDetails */ + orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + address?: components['schemas']['address'] | null + /** @description Recipient name. */ + name?: string | null + /** @description Recipient phone (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceTaxDetails */ + orders_v2_resource_tax_details: { + /** + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt: 'exempt' | 'none' | 'reverse' + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + tax_ids: components['schemas']['orders_v2_resource_tax_details_resource_tax_id'][] + } + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + orders_v2_resource_tax_details_resource_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null + } + /** OrdersV2ResourceTotalDetails */ + orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + amount_discount: number + /** @description This is the sum of all the shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['orders_v2_resource_total_details_api_resource_breakdown'] + } + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceTransferData */ + orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + amount?: number | null + /** @description ID of the Connected account receiving the transfer. */ + destination: string | components['schemas']['account'] + } + /** OutboundPaymentsPaymentMethodDetails */ + outbound_payments_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['outbound_payments_payment_method_details_financial_account'] + /** + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} + */ + type: 'financial_account' | 'us_bank_account' + us_bank_account?: components['schemas']['outbound_payments_payment_method_details_us_bank_account'] + } + /** outbound_payments_payment_method_details_financial_account */ + outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ id: string - /** @description The items included in this order return. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails used to send funds. * @enum {string} */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: (string | components['schemas']['order']) | null - /** @description The ID of the refund issued for this return. */ - refund?: (string | components['schemas']['refund']) | null + network: 'stripe' + } + /** outbound_payments_payment_method_details_us_bank_account */ + outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } + /** OutboundTransfersPaymentMethodDetails */ + outbound_transfers_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['outbound_transfers_payment_method_details_us_bank_account'] + } + /** outbound_transfers_payment_method_details_us_bank_account */ + outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null } /** PackageDimensions */ package_dimensions: { @@ -8679,11 +10412,25 @@ export interface components { /** @description Width, in inches. */ width: number } + /** PaymentFlowsAmountDetails */ + payment_flows_amount_details: { + tip?: components['schemas']['payment_flows_amount_details_resource_tip'] + } + /** PaymentFlowsAmountDetailsResourceTip */ + payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + amount?: number + } /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ enabled: boolean } + /** PaymentFlowsInstallmentOptions */ + payment_flows_installment_options: { + enabled: boolean + plan?: components['schemas']['payment_method_details_card_installments_plan'] + } /** PaymentFlowsPrivatePaymentMethodsAlipay */ payment_flows_private_payment_methods_alipay: { [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -8723,6 +10470,7 @@ export interface components { amount: number /** @description Amount that can be captured from this PaymentIntent. */ amount_capturable?: number + amount_details?: components['schemas']['payment_flows_amount_details'] /** @description Amount that was collected by this PaymentIntent. */ amount_received?: number /** @description ID of the Connect application that created the PaymentIntent. */ @@ -8768,9 +10516,9 @@ export interface components { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ client_secret?: string | null /** @enum {string} */ @@ -8849,12 +10597,20 @@ export interface components { transfer_group?: string | null } /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown } + payment_intent_card_processing: { + customer_notification?: components['schemas']['payment_intent_processing_customer_notification'] + } /** PaymentIntentNextAction */ payment_intent_next_action: { alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + card_await_notification?: components['schemas']['payment_intent_next_action_card_await_notification'] + display_bank_transfer_instructions?: components['schemas']['payment_intent_next_action_display_bank_transfer_instructions'] + konbini_display_details?: components['schemas']['payment_intent_next_action_konbini'] oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + paynow_display_qr_code?: components['schemas']['payment_intent_next_action_paynow_display_qr_code'] + pix_display_qr_code?: components['schemas']['payment_intent_next_action_pix_display_qr_code'] + promptpay_display_qr_code?: components['schemas']['payment_intent_next_action_promptpay_display_qr_code'] redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ type: string @@ -8890,6 +10646,34 @@ export interface components { /** @description The URL to the downloadable boleto voucher PDF. */ pdf?: string | null } + /** PaymentIntentNextActionCardAwaitNotification */ + payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: number | null + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + customer_approval_required?: boolean | null + } + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining?: number | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** @description A list of financial addresses that can be used to fund the customer balance */ + financial_addresses?: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url?: string | null + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference?: string | null + /** + * @description Type of bank transfer + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } /** PaymentIntentNextActionDisplayOxxoDetails */ payment_intent_next_action_display_oxxo_details: { /** @@ -8902,6 +10686,89 @@ export interface components { /** @description OXXO reference number. */ number?: string | null } + /** payment_intent_next_action_konbini */ + payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + expires_at: number + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url?: string | null + stores: components['schemas']['payment_intent_next_action_konbini_stores'] + } + /** payment_intent_next_action_konbini_familymart */ + payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_lawson */ + payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_ministop */ + payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_seicomart */ + payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_stores */ + payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + familymart?: components['schemas']['payment_intent_next_action_konbini_familymart'] | null + /** @description Lawson instruction details. */ + lawson?: components['schemas']['payment_intent_next_action_konbini_lawson'] | null + /** @description Ministop instruction details. */ + ministop?: components['schemas']['payment_intent_next_action_konbini_ministop'] | null + /** @description Seicomart instruction details. */ + seicomart?: components['schemas']['payment_intent_next_action_konbini_seicomart'] | null + } + /** PaymentIntentNextActionPaynowDisplayQrCode */ + payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The image_url_png string used to render QR code */ + image_url_png: string + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string + } + /** PaymentIntentNextActionPixDisplayQrCode */ + payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data?: string + /** @description The date (unix timestamp) when the PIX expires. */ + expires_at?: number + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url?: string + /** @description The image_url_png string used to render png QR code */ + image_url_png?: string + /** @description The image_url_svg string used to render svg QR code */ + image_url_svg?: string + } + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: string + /** @description The image_url_png string used to render QR code, can be used as */ + image_url_png: string + /** @description The image_url_svg string used to render QR code, can be used as */ + image_url_svg: string + } /** PaymentIntentNextActionRedirectToUrl */ payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -8918,6 +10785,11 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8938,9 +10810,9 @@ export interface components { nonce_str: string /** @description package is static value */ package: string - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ prepay_id: string /** @description A signature */ sign: string @@ -8949,7 +10821,7 @@ export interface components { } /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ native_url: string } /** PaymentIntentPaymentMethodOptions */ @@ -8957,6 +10829,9 @@ export interface components { acss_debit?: | components['schemas']['payment_intent_payment_method_options_acss_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + affirm?: + | components['schemas']['payment_method_options_affirm'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] afterpay_clearpay?: | components['schemas']['payment_method_options_afterpay_clearpay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8972,6 +10847,9 @@ export interface components { bancontact?: | components['schemas']['payment_method_options_bancontact'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['payment_intent_payment_method_options_blik'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] boleto?: | components['schemas']['payment_method_options_boleto'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8981,6 +10859,9 @@ export interface components { card_present?: | components['schemas']['payment_method_options_card_present'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + customer_balance?: + | components['schemas']['payment_method_options_customer_balance'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] eps?: | components['schemas']['payment_intent_payment_method_options_eps'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9000,16 +10881,32 @@ export interface components { klarna?: | components['schemas']['payment_method_options_klarna'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + konbini?: + | components['schemas']['payment_method_options_konbini'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + link?: + | components['schemas']['payment_intent_payment_method_options_link'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] oxxo?: | components['schemas']['payment_method_options_oxxo'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] p24?: components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + paynow?: + | components['schemas']['payment_method_options_paynow'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + pix?: components['schemas']['payment_method_options_pix'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + promptpay?: + | components['schemas']['payment_method_options_promptpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sepa_debit?: | components['schemas']['payment_intent_payment_method_options_sepa_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sofort?: | components['schemas']['payment_method_options_sofort'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['payment_intent_payment_method_options_us_bank_account'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] wechat_pay?: | components['schemas']['payment_method_options_wechat_pay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9017,6 +10914,15 @@ export interface components { /** payment_intent_payment_method_options_acss_debit */ payment_intent_payment_method_options_acss_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} @@ -9024,15 +10930,34 @@ export interface components { verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_intent_payment_method_options_au_becs_debit */ - payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } + payment_intent_payment_method_options_au_becs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_blik */ + payment_intent_payment_method_options_blik: { [key: string]: unknown } /** payment_intent_payment_method_options_card */ payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** * @description Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ installments?: components['schemas']['payment_method_options_card_installments'] | null + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['payment_method_options_card_mandate_options'] | null /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9052,9 +10977,42 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string } /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown } + payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_intent_payment_method_options_link */ + payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_intent_payment_method_options_mandate_options_acss_debit */ payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9077,6 +11035,33 @@ export interface components { /** payment_intent_payment_method_options_sepa_debit */ payment_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_us_bank_account */ + payment_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** PaymentIntentProcessing */ payment_intent_processing: { @@ -9087,8 +11072,24 @@ export interface components { */ type: 'card' } + /** PaymentIntentProcessingCustomerNotification */ + payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + approval_requested?: boolean | null + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + completes_at?: number | null + } /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + installments?: components['schemas']['payment_flows_installment_options'] /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9098,6 +11099,11 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** * PaymentLink @@ -9123,6 +11129,15 @@ export interface components { * @enum {string} */ billing_address_collection: 'auto' | 'required' + /** @description When set, provides configuration to gather active consent from customers. */ + consent_collection?: components['schemas']['payment_links_resource_consent_collection'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + customer_creation: 'always' | 'if_required' /** @description Unique identifier for the object. */ id: string /** @@ -9153,13 +11168,56 @@ export interface components { object: 'payment_link' /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data?: components['schemas']['payment_links_resource_payment_intent_data'] | null + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + payment_method_collection: 'always' | 'if_required' /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | null + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | null phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] /** @description Configuration for collecting the customer's shipping address. */ shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null + /** @description The shipping rate options applied to the session. */ + shipping_options: components['schemas']['payment_links_resource_shipping_option'][] + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + submit_type: 'auto' | 'book' | 'donate' | 'pay' /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null + tax_id_collection: components['schemas']['payment_links_resource_tax_id_collection'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null /** @description The public URL that can be shared with customers. */ @@ -9190,6 +11248,32 @@ export interface components { /** @description The URL the customer will be redirected to after the purchase is complete. */ url: string } + /** PaymentLinksResourceConsentCollection */ + payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null + } + /** PaymentLinksResourcePaymentIntentData */ + payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + capture_method?: ('automatic' | 'manual') | null + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + setup_future_usage?: ('off_session' | 'on_session') | null + } /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9438,11 +11522,25 @@ export interface components { | 'ZZ' )[] } + /** PaymentLinksResourceShippingOption */ + payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number + /** @description The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: string | components['schemas']['shipping_rate'] + } /** PaymentLinksResourceSubscriptionData */ payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days?: number | null } + /** PaymentLinksResourceTaxIdCollection */ + payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + enabled: boolean + } /** PaymentLinksResourceTransferData */ payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ @@ -9453,19 +11551,21 @@ export interface components { /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to * Customer objects to store instrument details for future payments. * * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). */ payment_method: { acss_debit?: components['schemas']['payment_method_acss_debit'] + affirm?: components['schemas']['payment_method_affirm'] afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_bacs_debit'] bancontact?: components['schemas']['payment_method_bancontact'] billing_details: components['schemas']['billing_details'] + blik?: components['schemas']['payment_method_blik'] boleto?: components['schemas']['payment_method_boleto'] card?: components['schemas']['payment_method_card'] card_present?: components['schemas']['payment_method_card_present'] @@ -9476,6 +11576,7 @@ export interface components { created: number /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ customer?: (string | components['schemas']['customer']) | null + customer_balance?: components['schemas']['payment_method_customer_balance'] eps?: components['schemas']['payment_method_eps'] fpx?: components['schemas']['payment_method_fpx'] giropay?: components['schemas']['payment_method_giropay'] @@ -9485,6 +11586,8 @@ export interface components { ideal?: components['schemas']['payment_method_ideal'] interac_present?: components['schemas']['payment_method_interac_present'] klarna?: components['schemas']['payment_method_klarna'] + konbini?: components['schemas']['payment_method_konbini'] + link?: components['schemas']['payment_method_link'] /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -9496,6 +11599,10 @@ export interface components { object: 'payment_method' oxxo?: components['schemas']['payment_method_oxxo'] p24?: components['schemas']['payment_method_p24'] + paynow?: components['schemas']['payment_method_paynow'] + pix?: components['schemas']['payment_method_pix'] + promptpay?: components['schemas']['payment_method_promptpay'] + radar_options?: components['schemas']['radar_radar_options'] sepa_debit?: components['schemas']['payment_method_sepa_debit'] sofort?: components['schemas']['payment_method_sofort'] /** @@ -9504,14 +11611,17 @@ export interface components { */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -9519,11 +11629,18 @@ export interface components { | 'ideal' | 'interac_present' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + us_bank_account?: components['schemas']['payment_method_us_bank_account'] wechat_pay?: components['schemas']['payment_method_wechat_pay'] } /** payment_method_acss_debit */ @@ -9539,6 +11656,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_affirm */ + payment_method_affirm: { [key: string]: unknown } /** payment_method_afterpay_clearpay */ payment_method_afterpay_clearpay: { [key: string]: unknown } /** payment_method_au_becs_debit */ @@ -9561,6 +11680,8 @@ export interface components { } /** payment_method_bancontact */ payment_method_bancontact: { [key: string]: unknown } + /** payment_method_blik */ + payment_method_blik: { [key: string]: unknown } /** payment_method_boleto */ payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -9663,19 +11784,24 @@ export interface components { /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ shipping_address?: components['schemas']['address'] | null } + /** payment_method_customer_balance */ + payment_method_customer_balance: { [key: string]: unknown } /** payment_method_details */ payment_method_details: { ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] ach_debit?: components['schemas']['payment_method_details_ach_debit'] acss_debit?: components['schemas']['payment_method_details_acss_debit'] + affirm?: components['schemas']['payment_method_details_affirm'] afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] bancontact?: components['schemas']['payment_method_details_bancontact'] + blik?: components['schemas']['payment_method_details_blik'] boleto?: components['schemas']['payment_method_details_boleto'] card?: components['schemas']['payment_method_details_card'] card_present?: components['schemas']['payment_method_details_card_present'] + customer_balance?: components['schemas']['payment_method_details_customer_balance'] eps?: components['schemas']['payment_method_details_eps'] fpx?: components['schemas']['payment_method_details_fpx'] giropay?: components['schemas']['payment_method_details_giropay'] @@ -9683,9 +11809,14 @@ export interface components { ideal?: components['schemas']['payment_method_details_ideal'] interac_present?: components['schemas']['payment_method_details_interac_present'] klarna?: components['schemas']['payment_method_details_klarna'] + konbini?: components['schemas']['payment_method_details_konbini'] + link?: components['schemas']['payment_method_details_link'] multibanco?: components['schemas']['payment_method_details_multibanco'] oxxo?: components['schemas']['payment_method_details_oxxo'] p24?: components['schemas']['payment_method_details_p24'] + paynow?: components['schemas']['payment_method_details_paynow'] + pix?: components['schemas']['payment_method_details_pix'] + promptpay?: components['schemas']['payment_method_details_promptpay'] 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'] @@ -9695,6 +11826,7 @@ export interface components { * It contains information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['payment_method_details_us_bank_account'] wechat?: components['schemas']['payment_method_details_wechat'] wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] } @@ -9742,6 +11874,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_details_affirm */ + payment_method_details_affirm: { [key: string]: unknown } /** payment_method_details_afterpay_clearpay */ payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -9795,6 +11929,8 @@ export interface components { */ verified_name?: string | null } + /** payment_method_details_blik */ + payment_method_details_blik: { [key: string]: unknown } /** payment_method_details_boleto */ payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -9828,6 +11964,8 @@ export interface components { installments?: components['schemas']['payment_method_details_card_installments'] | null /** @description The last four digits of the card. */ last4?: string | null + /** @description ID of the mandate used to make this payment or created by it. */ + mandate?: string | null /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null /** @description Populated if this transaction used 3D Secure authentication. */ @@ -9871,265 +12009,275 @@ export interface components { amount_authorized?: number | null /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null - } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null - } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null - } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - verified_name?: string | null - } - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null + capture_before?: number + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + incremental_authorization_supported: boolean + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: boolean + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null + } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_customer_balance */ + payment_method_details_customer_balance: { [key: string]: unknown } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null + } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null + } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ cardholder_name?: string | null /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10197,10 +12345,25 @@ export interface components { payment_method_category?: string | null /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ preferred_locale?: string | null } + /** payment_method_details_konbini */ + payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store?: components['schemas']['payment_method_details_konbini_store'] | null + } + /** payment_method_details_konbini_store */ + payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + chain?: ('familymart' | 'lawson' | 'ministop' | 'seicomart') | null + } + /** payment_method_details_link */ + payment_method_details_link: { [key: string]: unknown } /** payment_method_details_multibanco */ payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10257,6 +12420,21 @@ export interface components { */ verified_name?: string | null } + /** payment_method_details_paynow */ + payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + reference?: string | null + } + /** payment_method_details_pix */ + payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + bank_transaction_id?: string | null + } + /** payment_method_details_promptpay */ + payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + reference?: string | null + } /** payment_method_details_sepa_debit */ payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10302,6 +12480,27 @@ export interface components { } /** payment_method_details_stripe_account */ payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_us_bank_account */ + payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_details_wechat */ payment_method_details_wechat: { [key: string]: unknown } /** payment_method_details_wechat_pay */ @@ -10314,7 +12513,7 @@ export interface components { /** payment_method_eps */ payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ bank?: @@ -10329,6 +12528,7 @@ export interface components { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -10434,18 +12634,78 @@ export interface components { /** @description The customer's date of birth, if provided. */ dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null } + /** payment_method_konbini */ + payment_method_konbini: { [key: string]: unknown } + /** payment_method_link */ + payment_method_link: { + /** @description Account owner's email address. */ + email?: string | null + /** @description Token used for persistent Link logins. */ + persistent_token?: string + } + /** payment_method_options_affirm */ + payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_afterpay_clearpay */ payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ reference?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown } + payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown } + payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } /** payment_method_options_bancontact */ payment_method_options_bancontact: { /** @@ -10453,11 +12713,29 @@ export interface components { * @enum {string} */ preferred_language: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_boleto */ payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** payment_method_options_card_installments */ payment_method_options_card_installments: { @@ -10468,30 +12746,255 @@ export interface components { /** @description Installment plan selected for this PaymentIntent. */ plan?: components['schemas']['payment_method_details_card_installments_plan'] | null } + /** payment_method_options_card_mandate_options */ + payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown } + payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + request_extended_authorization?: boolean | null + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + request_incremental_authorization_support?: boolean | null + } + /** payment_method_options_customer_balance */ + payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_customer_balance_bank_transfer */ + payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** payment_method_options_customer_balance_eu_bank_account */ + payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown } + payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown } + payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown } + payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown } + payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_interac_present */ payment_method_options_interac_present: { [key: string]: unknown } /** payment_method_options_klarna */ payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ preferred_locale?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_konbini */ + payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number?: string | null + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: number | null + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_oxxo */ payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown } + payment_method_options_p24: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paynow */ + payment_method_options_paynow: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paypal */ + payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale?: string | null + } + /** payment_method_options_pix */ + payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds?: number | null + /** @description The timestamp at which the Pix expires. */ + expires_at?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_promptpay */ + payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_sofort */ payment_method_options_sofort: { /** @@ -10499,6 +13002,15 @@ export interface components { * @enum {string|null} */ preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_wechat_pay */ payment_method_options_wechat_pay: { @@ -10509,8 +13021,17 @@ export interface components { * @enum {string|null} */ client?: ('android' | 'ios' | 'web') | null - } - /** payment_method_oxxo */ + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_oxxo */ payment_method_oxxo: { [key: string]: unknown } /** payment_method_p24 */ payment_method_p24: { @@ -10548,6 +13069,12 @@ export interface components { ) | null } + /** payment_method_paynow */ + payment_method_paynow: { [key: string]: unknown } + /** payment_method_pix */ + payment_method_pix: { [key: string]: unknown } + /** payment_method_promptpay */ + payment_method_promptpay: { [key: string]: unknown } /** payment_method_sepa_debit */ payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10568,6 +13095,31 @@ export interface components { /** @description Two-letter ISO code representing the country the bank account is located in. */ country?: string | null } + /** payment_method_us_bank_account */ + payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description The name of the bank. */ + bank_name?: string | null + /** @description The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Contains information about US bank account networks that can be used. */ + networks?: components['schemas']['us_bank_account_networks'] | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_wechat_pay */ payment_method_wechat_pay: { [key: string]: unknown } /** PaymentPagesCheckoutSessionAfterExpiration */ @@ -10611,6 +13163,11 @@ export interface components { * @enum {string|null} */ promotions?: ('opt_in' | 'opt_out') | null + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + terms_of_service?: 'accepted' | null } /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -10620,23 +13177,32 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: 'auto' | null + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null } /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address?: components['schemas']['address'] | null /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email?: string | null - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name?: string | null + /** @description The customer's phone number after a completed Checkout Session. */ phone?: string | null /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null } /** PaymentPagesCheckoutSessionPhoneNumberCollection */ @@ -10890,6 +13456,19 @@ export interface components { | 'ZZ' )[] } + /** PaymentPagesCheckoutSessionShippingCost */ + payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } /** PaymentPagesCheckoutSessionShippingOption */ payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ @@ -10900,13 +13479,14 @@ export interface components { /** PaymentPagesCheckoutSessionTaxID */ payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -10918,10 +13498,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -10941,6 +13523,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -10957,27 +13540,25 @@ export interface components { } /** PaymentPagesCheckoutSessionTotalDetails */ payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] } /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** Polymorphic */ payment_source: | components['schemas']['account'] - | components['schemas']['alipay_account'] | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] | components['schemas']['card'] | components['schemas']['source'] /** @@ -11108,6 +13689,8 @@ export interface components { id: string /** @description Whether the person's `id_number` was provided. */ id_number_provided?: boolean + /** @description Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided?: boolean /** @description The person's last name. */ last_name?: string | null /** @description The Kana variation of the person's last name (Japan only). */ @@ -11132,6 +13715,7 @@ export interface components { * @enum {string} */ political_exposure?: 'existing' | 'none' + registered_address?: components['schemas']['address'] relationship?: components['schemas']['person_relationship'] requirements?: components['schemas']['person_requirements'] | null /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ @@ -11300,9 +13884,9 @@ export interface components { /** @description The messaging shown to customers in the portal. */ headline?: string | null /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string + privacy_policy_url?: string | null /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string + terms_of_service_url?: string | null } /** PortalCustomerUpdate */ portal_customer_update: { @@ -11325,6 +13909,17 @@ export interface components { /** @description Whether the feature is enabled. */ enabled: boolean } + /** PortalLoginPage */ + portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + enabled: boolean + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + url?: string | null + } /** PortalPaymentMethodUpdate */ portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -11403,6 +13998,10 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['currency_option'] } + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -11487,6 +14086,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: (string | components['schemas']['price']) | null /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string | null /** @description Unique identifier for the object. */ @@ -11497,7 +14098,7 @@ export interface components { livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string /** * @description String representing the object's type. Objects of the same type share the same value. @@ -11510,7 +14111,7 @@ export interface components { shippable?: boolean | null /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: (string | components['schemas']['tax_code']) | null /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string | null @@ -11524,7 +14125,7 @@ export interface components { } /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ promotion_code: { @@ -11562,8 +14163,15 @@ export interface components { /** @description Number of times this promotion code has been used. */ times_redeemed: number } + /** PromotionCodeCurrencyOption */ + promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: number + } /** PromotionCodesResourceRestrictions */ promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['promotion_code_currency_option'] } /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ first_time_transaction: boolean /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -11581,6 +14189,8 @@ export interface components { amount_subtotal: number /** @description Total after discounts and taxes are applied. */ amount_total: number + /** @description ID of the Connect Application that created the quote. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ application_fee_amount?: number | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -11665,6 +14275,8 @@ export interface components { subscription_data: components['schemas']['quotes_resource_subscription_data'] /** @description The subscription schedule that was created or updated from this quote. */ subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null + /** @description ID of the test clock this quote belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null total_details: components['schemas']['quotes_resource_total_details'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null @@ -11727,6 +14339,8 @@ export interface components { } /** QuotesResourceSubscriptionData */ quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -11737,19 +14351,19 @@ export interface components { } /** QuotesResourceTotalDetails */ quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] } /** QuotesResourceTotalDetailsResourceBreakdown */ quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** QuotesResourceTransferData */ @@ -11897,6 +14511,14 @@ export interface components { /** @description The identifier of the value list this item belongs to. */ value_list: string } + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + session?: string + } /** RadarReviewResourceLocation */ radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -11921,63 +14543,15 @@ export interface components { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: components['schemas']['bank_account'] | null - /** CardList */ - cards?: { - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: (string | components['schemas']['card']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - email?: string | null - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: (string | components['schemas']['account']) | null - /** @description Full, legal name of the recipient. */ - name?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - object: 'recipient' - rolled_back_from?: string | components['schemas']['account'] - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string + network: 'stripe' } /** Recurring */ recurring: { @@ -12029,8 +14603,11 @@ export interface components { failure_reason?: string /** @description Unique identifier for the object. */ id: string + /** @description Email to which refund instructions, if required, are sent to. */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null + next_action?: components['schemas']['refund_next_action'] /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12047,11 +14624,27 @@ export interface components { receipt_number?: string | null /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ status?: string | null /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null } + /** RefundNextAction */ + refund_next_action: { + /** @description Contains the refund details. */ + display_details?: components['schemas']['refund_next_action_display_details'] | null + /** @description Type of the next action to perform. */ + type: string + } + /** RefundNextActionDisplayDetails */ + refund_next_action_display_details: { + email_sent: components['schemas']['email_sent'] + /** + * Format: unix-time + * @description The expiry timestamp. + */ + expires_at: number + } /** * reporting_report_run * @description The Report Run object represents an instance of a report type generated with @@ -12267,6 +14860,16 @@ export interface components { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean } + /** SecretServiceResourceScope */ + secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + type: 'account' | 'user' + /** @description The user ID, if type is set to "user" */ + user?: string + } /** sepa_debit_generated_from */ sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ @@ -12284,6 +14887,12 @@ export interface components { setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12291,6 +14900,12 @@ export interface components { created: number /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12320,14 +14935,17 @@ export interface components { au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + blik?: components['schemas']['setup_attempt_payment_method_details_blik'] boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] card?: components['schemas']['setup_attempt_payment_method_details_card'] card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + link?: components['schemas']['setup_attempt_payment_method_details_link'] sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ type: string + us_bank_account?: components['schemas']['setup_attempt_payment_method_details_us_bank_account'] } /** setup_attempt_payment_method_details_acss_debit */ setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } @@ -12361,6 +14979,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_blik */ + setup_attempt_payment_method_details_blik: { [key: string]: unknown } /** setup_attempt_payment_method_details_boleto */ setup_attempt_payment_method_details_boleto: { [key: string]: unknown } /** setup_attempt_payment_method_details_card */ @@ -12429,6 +15049,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_link */ + setup_attempt_payment_method_details_link: { [key: string]: unknown } /** setup_attempt_payment_method_details_sepa_debit */ setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } /** setup_attempt_payment_method_details_sofort */ @@ -12457,6 +15079,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_us_bank_account */ + setup_attempt_payment_method_details_us_bank_account: { [key: string]: unknown } /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -12485,6 +15109,12 @@ export interface components { setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -12493,7 +15123,7 @@ export interface components { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, 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 /** @@ -12509,6 +15139,12 @@ export interface components { customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description The error encountered in the previous SetupIntent confirmation. */ @@ -12575,12 +15211,30 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { - acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + acss_debit?: + | components['schemas']['setup_intent_payment_method_options_acss_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['setup_intent_payment_method_options_blik'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] card?: components['schemas']['setup_intent_payment_method_options_card'] - sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + link?: + | components['schemas']['setup_intent_payment_method_options_link'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + sepa_debit?: + | components['schemas']['setup_intent_payment_method_options_sepa_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['setup_intent_payment_method_options_us_bank_account'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] } /** setup_intent_payment_method_options_acss_debit */ setup_intent_payment_method_options_acss_debit: { @@ -12596,14 +15250,65 @@ export interface components { */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** setup_intent_payment_method_options_blik */ + setup_intent_payment_method_options_blik: { + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_blik'] + } /** setup_intent_payment_method_options_card */ setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['setup_intent_payment_method_options_card_mandate_options'] | null + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null } + /** setup_intent_payment_method_options_card_mandate_options */ + setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } + /** setup_intent_payment_method_options_link */ + setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + } /** setup_intent_payment_method_options_mandate_options_acss_debit */ setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -12623,41 +15328,60 @@ export interface components { */ transaction_type?: ('business' | 'personal') | null } + /** setup_intent_payment_method_options_mandate_options_blik */ + setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } /** setup_intent_payment_method_options_sepa_debit */ setup_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] } + /** setup_intent_payment_method_options_us_bank_account */ + setup_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } /** Shipping */ shipping: { address?: components['schemas']['address'] /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null /** @description Recipient name. */ - name?: string | null + name?: string /** @description Recipient phone (including extension). */ phone?: string | null /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ tracking_number?: string | null } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: components['schemas']['delivery_estimate'] | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -12688,7 +15412,7 @@ export interface components { * @enum {string|null} */ tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: (string | components['schemas']['tax_code']) | null /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -12696,6 +15420,16 @@ export interface components { */ type: 'fixed_amount' } + /** ShippingRateCurrencyOption */ + shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior: 'exclusive' | 'inclusive' | 'unspecified' + } /** ShippingRateDeliveryEstimate */ shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ @@ -12719,6 +15453,8 @@ export interface components { amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['shipping_rate_currency_option'] } } /** SigmaScheduledQueryRunError */ sigma_scheduled_query_run_error: { @@ -12733,8 +15469,6 @@ export interface components { * the `size: large`, `color: red` version of that shirt. * * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). */ sku: { /** @description Whether the SKU is available for purchase. */ @@ -13309,29 +16043,6 @@ export interface components { qr_code_url?: string | null statement_descriptor?: string } - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null - } /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -13339,12 +16050,14 @@ export interface components { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ subscription: { + /** @description ID of the Connect Application that created the subscription. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ application_fee_percent?: number | null automatic_tax: components['schemas']['subscription_automatic_tax'] /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ @@ -13371,6 +16084,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -13388,18 +16103,11 @@ export interface components { /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string | null /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ discount?: components['schemas']['discount'] | null /** @@ -13472,6 +16180,8 @@ export interface components { * @enum {string} */ status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description ID of the test clock this subscription belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ transfer_data?: components['schemas']['subscription_transfer_data'] | null /** @@ -13532,6 +16242,11 @@ export interface components { /** subscription_payment_method_options_card */ subscription_payment_method_options_card: { mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -13555,6 +16270,8 @@ export interface components { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -13607,6 +16324,8 @@ export interface components { status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' /** @description ID of the subscription managed by the subscription schedule. */ subscription?: (string | components['schemas']['subscription']) | null + /** @description ID of the test clock this subscription schedule belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** * SubscriptionScheduleAddInvoiceItem @@ -13652,7 +16371,7 @@ export interface components { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ application_fee_percent?: number | null @@ -13671,10 +16390,14 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description The end of this phase of the subscription schedule. @@ -13684,6 +16407,8 @@ export interface components { invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ items: components['schemas']['subscription_schedule_configuration_item'][] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + metadata?: { [key: string]: string } | null /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -13721,6 +16446,8 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description The subscription schedule's default invoice settings. */ invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -13763,6 +16490,12 @@ export interface components { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ card?: components['schemas']['subscription_payment_method_options_card'] | null + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** SubscriptionsResourcePaymentSettings */ subscriptions_resource_payment_settings: { @@ -13779,15 +16512,26 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + save_default_payment_method?: ('off' | 'on_subscription') | null } /** * SubscriptionsResourcePendingUpdate @@ -13797,7 +16541,7 @@ export interface components { subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number | null /** @@ -13817,7 +16561,7 @@ export interface components { } /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -13881,13 +16625,14 @@ export interface components { */ object: 'tax_id' /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -13899,10 +16644,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -13922,6 +16669,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -13990,6 +16738,26 @@ export interface components { */ tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null } + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + 'terminal.configuration': { + bbpos_wisepos_e?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + /** @description Unique identifier for the object. */ + id: string + /** @description Whether this Configuration is the default for your account */ + is_account_default?: boolean | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.configuration' + tipping?: components['schemas']['terminal_configuration_configuration_resource_tipping'] + verifone_p400?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + } /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14015,6 +16783,8 @@ export interface components { */ 'terminal.location': { address: components['schemas']['address'] + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string /** @description The display name of the location. */ display_name: string /** @description Unique identifier for the object. */ @@ -14036,13 +16806,15 @@ export interface components { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ 'terminal.reader': { + /** @description The most recent action performed by the reader. */ + action?: components['schemas']['terminal_reader_reader_resource_reader_action'] | null /** @description The current software version of the reader. */ device_sw_version?: string | null /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + device_type: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | 'verifone_P400' /** @description Unique identifier for the object. */ id: string /** @description The local IP address of the reader. */ @@ -14065,38 +16837,164 @@ export interface components { /** @description The networking status of the reader. */ status?: string | null } + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + fixed_amounts?: number[] | null + /** @description Percentages displayed when collecting a tip */ + percentages?: number[] | null + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold?: number + } + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + splashscreen?: string | components['schemas']['file'] + } + /** TerminalConfigurationConfigurationResourceTipping */ + terminal_configuration_configuration_resource_tipping: { + aud?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + cad?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + chf?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + czk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + dkk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + eur?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + gbp?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + hkd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + myr?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nok?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nzd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sek?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sgd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + usd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + } + /** + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader + */ + terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description List of line items in the cart. */ + line_items: components['schemas']['terminal_reader_reader_resource_line_item'][] + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax?: number | null + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: number + } /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: components['schemas']['card'] + /** @description Description of the line item. */ + description: string + /** @description The quantity of the line item. */ + quantity: number + } + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + skip_tipping?: boolean + } + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + payment_intent: string | components['schemas']['payment_intent'] + process_config?: components['schemas']['terminal_reader_reader_resource_process_config'] + } + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string + /** @description Most recent SetupIntent processed by the reader. */ + setup_intent: string | components['schemas']['setup_intent'] + } + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + failure_code?: string | null + /** @description Detailed failure message, only set if status is `failed`. */ + failure_message?: string | null + process_payment_intent?: components['schemas']['terminal_reader_reader_resource_process_payment_intent_action'] + process_setup_intent?: components['schemas']['terminal_reader_reader_resource_process_setup_intent_action'] + set_reader_display?: components['schemas']['terminal_reader_reader_resource_set_reader_display_action'] + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + status: 'failed' | 'in_progress' | 'succeeded' + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + type: 'process_payment_intent' | 'process_setup_intent' | 'set_reader_display' + } + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + cart?: components['schemas']['terminal_reader_reader_resource_cart'] | null + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + type: 'cart' + } + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + 'test_helpers.test_clock': { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + deletes_after: number + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + /** @description The custom name supplied at creation. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string + object: 'test_helpers.test_clock' + /** + * @description The status of the Test Clock. + * @enum {string} + */ + status: 'advancing' | 'internal_failure' | 'ready' } /** three_d_secure_details */ three_d_secure_details: { @@ -14110,7 +17008,7 @@ export interface components { * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + result?: ('attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error') | null /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. @@ -14216,7 +17114,8 @@ export interface components { * @enum {string} */ object: 'topup' - source: components['schemas']['source'] + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + source?: components['schemas']['source'] | null /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ statement_descriptor?: string | null /** @@ -14293,7 +17192,7 @@ export interface components { /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ source_transaction?: (string | components['schemas']['charge']) | null /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null + source_type?: string /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null } @@ -14383,6 +17282,1068 @@ export interface components { */ round: 'down' | 'up' } + /** + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ + 'treasury.credit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.credit_reversal' + /** @description The ReceivedCredit being reversed. */ + received_credit: string + /** + * @description Status of the CreditReversal + * @enum {string} + */ + status: 'canceled' | 'posted' | 'processing' + status_transitions: components['schemas']['treasury_received_credits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + 'treasury.debit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Other flows linked to a DebitReversal. */ + linked_flows?: components['schemas']['treasury_received_debits_resource_debit_reversal_linked_flows'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'card' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.debit_reversal' + /** @description The ReceivedDebit being reversed. */ + received_debit: string + /** + * @description Status of the DebitReversal + * @enum {string} + */ + status: 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_received_debits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + 'treasury.financial_account': { + /** @description The array of paths to active Features in the Features hash. */ + active_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + balance: components['schemas']['treasury_financial_accounts_resource_balance'] + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + features?: components['schemas']['treasury.financial_account_features'] + /** @description The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: components['schemas']['treasury_financial_accounts_resource_financial_address'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account' + /** @description The array of paths to pending Features in the Features hash. */ + pending_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions?: components['schemas']['treasury_financial_accounts_resource_platform_restrictions'] | null + /** @description The array of paths to restricted Features in the Features hash. */ + restricted_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + status: 'closed' | 'open' + status_details: components['schemas']['treasury_financial_accounts_resource_status_details'] + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + supported_currencies: string[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + 'treasury.financial_account_features': { + card_issuing?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + deposit_insurance?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + financial_addresses?: components['schemas']['treasury_financial_accounts_resource_financial_addresses_features'] + inbound_transfers?: components['schemas']['treasury_financial_accounts_resource_inbound_transfers'] + intra_stripe_flows?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account_features' + outbound_payments?: components['schemas']['treasury_financial_accounts_resource_outbound_payments'] + outbound_transfers?: components['schemas']['treasury_financial_accounts_resource_outbound_transfers'] + } + /** + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + */ + 'treasury.inbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details?: components['schemas']['treasury_inbound_transfers_resource_failure_details'] | null + /** @description The FinancialAccount that received the funds. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + linked_flows: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.inbound_transfer' + /** @description The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: string + /** @description Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details?: components['schemas']['inbound_transfers'] | null + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned?: boolean | null + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: string + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_payment': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + destination_payment_method?: string | null + /** @description Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details?: components['schemas']['outbound_payments_payment_method_details'] | null + /** @description Details about the end user. */ + end_user_details?: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_end_user_details'] | null + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_payment' + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_payments_resource_returned_status'] | null + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: string + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method?: string | null + destination_payment_method_details: components['schemas']['outbound_transfers_payment_method_details'] + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_transfer' + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_transfers_resource_returned_details'] | null + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: string + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_transfers_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + 'treasury.received_credit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'other') | null + /** @description The FinancialAccount that received the funds. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_credits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The rails used to send the funds. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' | 'us_domestic_wire' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_credit' + /** @description Details describing when a ReceivedCredit may be reversed. */ + reversal_details?: components['schemas']['treasury_received_credits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + 'treasury.received_debit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'insufficient_funds' | 'other') | null + /** @description The FinancialAccount that funds were pulled from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_debits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_debit' + /** @description Details describing when a ReceivedDebit might be reversed. */ + reversal_details?: components['schemas']['treasury_received_debits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + 'treasury.transaction': { + /** @description Amount (in cents) transferred. */ + amount: number + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + entries?: { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description ID of the flow that created the Transaction. */ + flow?: string | null + /** @description Details of the flow that created the Transaction. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction' + /** + * @description Status of the Transaction. + * @enum {string} + */ + status: 'open' | 'posted' | 'void' + status_transitions: components['schemas']['treasury_transactions_resource_abstract_transaction_resource_status_transitions'] + } + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + 'treasury.transaction_entry': { + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + effective_at: number + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description Token of the flow associated with the TransactionEntry. */ + flow?: string | null + /** @description Details of the flow associated with the TransactionEntry. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction_entry' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'credit_reversal_posting' + | 'debit_reversal' + | 'inbound_transfer' + | 'inbound_transfer_return' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'other' + | 'outbound_payment' + | 'outbound_payment_cancellation' + | 'outbound_payment_failure' + | 'outbound_payment_posting' + | 'outbound_payment_return' + | 'outbound_transfer' + | 'outbound_transfer_cancellation' + | 'outbound_transfer_failure' + | 'outbound_transfer_posting' + | 'outbound_transfer_return' + | 'received_credit' + | 'received_debit' + } + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name: string + /** @description The account number. */ + account_number?: string | null + /** @description The last four characters of the account number. */ + account_number_last4: string + /** @description Name of the bank. */ + bank_name: string + /** @description Routing number for the account. */ + routing_number: string + } + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + cash: { [key: string]: number } + /** @description Funds not spendable yet, but will become available at a later time. */ + inbound_pending: { [key: string]: number } + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: { [key: string]: number } + } + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + reasons: ('account_rejected' | 'closed_by_platform' | 'other')[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + treasury_financial_accounts_resource_financial_address: { + aba?: components['schemas']['treasury_financial_accounts_resource_aba_record'] + /** @description The list of networks that the address supports */ + supported_networks?: ('ach' | 'us_domestic_wire')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'aba' + } + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + treasury_financial_accounts_resource_financial_addresses_features: { + aba?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_inbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + treasury_financial_accounts_resource_outbound_payments: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_outbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + inbound_flows?: ('restricted' | 'unrestricted') | null + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + outbound_flows?: ('restricted' | 'unrestricted') | null + } + /** TreasuryFinancialAccountsResourceStatusDetails */ + treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + closed?: components['schemas']['treasury_financial_accounts_resource_closed_status_details'] | null + } + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + requested: boolean + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + status: 'active' | 'pending' | 'restricted' + /** @description Additional details; includes at least one entry when the status is not `active`. */ + status_details: components['schemas']['treasury_financial_accounts_resource_toggles_setting_status_details'][] + } + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + code: + | 'activating' + | 'capability_not_requested' + | 'financial_account_closed' + | 'rejected_other' + | 'rejected_unsupported_business' + | 'requirements_past_due' + | 'requirements_pending_verification' + | 'restricted_by_platform' + | 'restricted_other' + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + resolution?: ('contact_stripe' | 'provide_information' | 'remove_restriction') | null + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + restriction?: 'inbound_flows' | 'outbound_flows' + } + /** TreasuryInboundTransfersResourceFailureDetails */ + treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + received_debit?: string | null + } + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + succeeded_at?: number | null + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + ip_address?: string | null + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: boolean + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + returned_at?: number | null + } + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceReturnedDetails */ + treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceStatusTransitions */ + treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + returned_at?: number | null + } + /** TreasuryReceivedCreditsResourceLinkedFlows */ + treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal?: string | null + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction?: string | null + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + source_flow?: string | null + /** @description The expandable object of the source flow. */ + source_flow_details?: components['schemas']['treasury_received_credits_resource_source_flows_details'] | null + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type?: string | null + } + /** TreasuryReceivedCreditsResourceReversalDetails */ + treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + treasury_received_credits_resource_source_flows_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + payout?: components['schemas']['payout'] + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } + /** TreasuryReceivedCreditsResourceStatusTransitions */ + treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + posted_at?: number | null + } + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute?: string | null + } + /** TreasuryReceivedDebitsResourceLinkedFlows */ + treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal?: string | null + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer?: string | null + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction?: string | null + } + /** TreasuryReceivedDebitsResourceReversalDetails */ + treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedDebitsResourceStatusTransitions */ + treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + completed_at?: number | null + } + /** TreasurySharedResourceBillingDetails */ + treasury_shared_resource_billing_details: { + address: components['schemas']['address'] + /** @description Email address. */ + email?: string | null + /** @description Full name. */ + name?: string | null + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + balance?: 'payments' + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['received_payment_method_details_financial_account'] + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card?: string + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + type: 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account' + us_bank_account?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_us_bank_account'] + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + bank_name?: string | null + /** @description The last four digits of the bank account number. */ + last4?: string | null + /** @description The routing number for the bank account. */ + routing_number?: string | null + } + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + void_at?: number | null + } + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + cash: number + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: number + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: number + } + /** TreasuryTransactionsResourceFlowDetails */ + treasury_transactions_resource_flow_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + debit_reversal?: components['schemas']['treasury.debit_reversal'] + inbound_transfer?: components['schemas']['treasury.inbound_transfer'] + issuing_authorization?: components['schemas']['issuing.authorization'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + outbound_transfer?: components['schemas']['treasury.outbound_transfer'] + received_credit?: components['schemas']['treasury.received_credit'] + received_debit?: components['schemas']['treasury.received_debit'] + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + } + /** us_bank_account_networks */ + us_bank_account_networks: { + /** @description The preferred network. */ + preferred?: string | null + /** @description All supported networks. */ + supported: ('ach' | 'us_domestic_wire')[] + } /** * UsageRecord * @description Usage records allow you to report customer usage and metrics to Stripe for @@ -14483,13 +18444,19 @@ export interface components { } export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { + /**

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']['three_d_secure'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14501,93 +18468,21 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Retrieves a 3D Secure object.

*/ - Get3dSecureThreeDSecure: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - three_d_secure: string - } - } + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccount: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14655,6 +18550,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -14671,6 +18570,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -14715,10 +18622,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -14727,6 +18642,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -14746,6 +18669,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -14871,7 +18802,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -14921,6 +18852,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -14929,6 +18861,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -14976,6 +18917,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -14997,6 +18940,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -15563,8 +19516,6 @@ export interface operations { account: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -15721,6 +19672,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15739,6 +19692,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -15909,6 +19874,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15927,6 +19894,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16140,6 +20119,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16158,6 +20139,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16328,6 +20321,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16346,6 +20341,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16578,6 +20585,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -16594,6 +20605,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -16638,10 +20657,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -16650,6 +20677,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -16669,6 +20704,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -16754,7 +20797,7 @@ export interface operations { } } } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ country?: string /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ default_currency?: string @@ -16796,7 +20839,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -16846,6 +20889,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -16854,6 +20898,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -16901,6 +20954,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -16922,6 +20977,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17057,6 +21122,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -17073,6 +21142,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -17117,10 +21194,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -17129,6 +21214,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -17148,6 +21241,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -17273,7 +21374,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -17323,6 +21424,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -17331,6 +21433,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -17378,6 +21489,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -17399,6 +21512,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17996,8 +22119,6 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -18161,6 +22282,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18179,6 +22302,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18350,6 +22485,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18368,6 +22505,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18589,6 +22738,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18607,6 +22758,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18778,6 +22941,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18796,6 +22961,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19293,7 +23470,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -19303,6 +23480,172 @@ export interface operations { } } } + /**

List all secrets stored on the given scope.

*/ + GetAppsSecrets: { + 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 + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: 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']['apps.secret'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create or replace a secret in the secret store.

*/ + PostAppsSecrets: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number + /** @description A name for the secret that's unique within the scope. */ + name: string + /** @description The plaintext secret value to be stored. */ + payload: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Deletes a secret from the secret store by name and scope.

*/ + PostAppsSecretsDelete: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Finds a secret in the secret store by name and scope.

*/ + GetAppsSecretsFind: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A name for the secret that's unique within the scope. */ + name: string + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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.

@@ -19608,8 +23951,8 @@ export interface operations { */ business_profile: { headline?: string - privacy_policy_url: string - terms_of_service_url: string + privacy_policy_url?: string + terms_of_service_url?: string } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19622,7 +23965,7 @@ export interface operations { features: { /** customer_update_creation_param */ customer_update?: { - allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + allowed_updates?: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' enabled: boolean } /** invoice_list_param */ @@ -19675,6 +24018,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } } @@ -19744,8 +24094,8 @@ export interface operations { */ business_profile?: { headline?: string - privacy_policy_url?: string - terms_of_service_url?: string + privacy_policy_url?: string | '' + terms_of_service_url?: string | '' } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19811,6 +24161,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } @@ -19902,188 +24259,6 @@ export interface operations { } } } - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - GetBitcoinReceivers: { - parameters: { - query: { - /** Filter for active receivers. */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Filter for filled receivers. */ - filled?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Filter for receivers with uncaptured funds. */ - uncaptured_funds?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['bitcoin_receiver'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - receiver: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - receiver?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ GetCharges: { parameters: { @@ -20165,7 +24340,7 @@ export interface operations { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ application_fee_amount?: number /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ capture?: boolean @@ -20206,6 +24381,13 @@ export interface operations { metadata?: { [key: string]: string } | '' /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ on_behalf_of?: string + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string /** @@ -20247,6 +24429,57 @@ export interface operations { } } } + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetChargesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['charge'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

Retrieves the details of a 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: { @@ -20565,6 +24798,7 @@ export interface operations { amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' payment_intent?: string @@ -20649,11 +24883,23 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' payment_intent?: string /** @enum {string} */ reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' @@ -20731,6 +24977,12 @@ export interface operations { GetCheckoutSessions: { parameters: { query: { + /** Only return the Checkout Sessions for the Customer specified. */ + customer?: string + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details?: { + 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. */ @@ -20834,8 +25086,12 @@ export interface operations { */ consent_collection?: { /** @enum {string} */ - promotions?: 'auto' + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -20856,7 +25112,8 @@ export interface operations { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -20891,7 +25148,7 @@ export interface operations { expand?: string[] /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ expires_at?: number /** @@ -20899,7 +25156,7 @@ export interface operations { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ line_items?: { /** adjustable_quantity_params */ @@ -20908,7 +25165,6 @@ export interface operations { maximum?: number minimum?: number } - description?: string dynamic_tax_rates?: string[] price?: string /** price_data_with_product_data */ @@ -21030,6 +25286,16 @@ export interface operations { } transfer_group?: string } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -21050,26 +25316,168 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ boleto?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean + } + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string + statement_descriptor_suffix_kanji?: string + } + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } /** payment_method_options_param */ oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number + } + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' } /** payment_method_options_param */ wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } } /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -21079,23 +25487,31 @@ export interface operations { */ payment_method_types?: ( | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] /** @@ -21387,6 +25803,13 @@ export interface operations { fixed_amount?: { amount: number currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } metadata?: { [key: string]: string } /** @enum {string} */ @@ -21411,11 +25834,7 @@ export interface operations { subscription_data?: { application_fee_percent?: number default_tax_rates?: string[] - items?: { - plan: string - quantity?: number - tax_rates?: string[] - }[] + description?: string metadata?: { [key: string]: string } /** transfer_data_specs */ transfer_data?: { @@ -21722,6 +26141,12 @@ export interface operations { } /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ currency?: string + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -21805,6 +26230,12 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -21925,9 +26356,9 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ credit_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -21950,7 +26381,7 @@ export interface operations { memo?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ out_of_band_amount?: number /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -21959,7 +26390,7 @@ export interface operations { reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** @description ID of an existing refund to link this credit note to. */ refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -21969,9 +26400,9 @@ export interface operations { GetCreditNotesPreview: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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[] @@ -21994,13 +26425,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -22028,9 +26459,9 @@ export interface operations { GetCreditNotesPreviewLines: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22057,13 +26488,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22267,6 +26698,8 @@ 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 + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock?: string } } responses: { @@ -22330,8 +26763,19 @@ export interface operations { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ description?: string @@ -22354,6 +26798,12 @@ export interface operations { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22404,6 +26854,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -22415,10 +26866,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -22438,6 +26891,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -22445,9 +26899,62 @@ export interface operations { | 'za_vat' value: string }[] + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string + } + } + } + } + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetCustomersSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['customer'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } /**

Retrieves a Customer object.

*/ GetCustomersCustomer: { @@ -22519,7 +27026,7 @@ export interface operations { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ balance?: number /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ bank_account?: @@ -22554,6 +27061,17 @@ export interface operations { object?: 'card' } | string + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string @@ -22590,6 +27108,12 @@ export interface operations { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22632,8 +27156,6 @@ export interface operations { * @enum {string} */ tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number } } } @@ -22738,7 +27260,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ currency: string @@ -23375,7 +27897,8 @@ export interface operations { } } } - GetCustomersCustomerDiscount: { + /**

Retrieves a customer’s cash balance.

*/ + GetCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23389,7 +27912,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23405,8 +27928,8 @@ export interface operations { } } } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { + /**

Changes the settings on a customer’s cash balance.

*/ + PostCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23416,7 +27939,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23428,81 +27951,23 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetCustomersCustomerPaymentMethods: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { + /**

Returns a list of transactions that modified the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactions: { parameters: { path: { customer: string @@ -23514,8 +27979,6 @@ 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 - /** 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 } @@ -23526,13 +27989,311 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: components['schemas']['customer_cash_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactionsTransaction: { + 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_cash_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + PostCustomersCustomerFundingInstructions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['funding_instructions'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: 'bank_transfer' + } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetCustomersCustomerPaymentMethods: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + GetCustomersCustomerPaymentMethodsPaymentMethod: { + parameters: { + path: { + customer: string + payment_method: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -23875,7 +28636,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -23895,7 +28656,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -23907,7 +28668,7 @@ export interface operations { backdate_start_date?: number /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ @@ -23931,6 +28692,8 @@ export interface operations { collection_method?: 'charge_automatically' | 'send_invoice' /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string + /** @description Three-letter [ISO currency 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 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24018,9 +28781,35 @@ export interface operations { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24032,15 +28821,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24053,9 +28850,7 @@ export interface operations { /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24134,7 +28929,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -24154,7 +28949,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -24281,9 +29076,35 @@ export interface operations { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24295,15 +29116,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24316,11 +29145,7 @@ export interface operations { /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24520,13 +29345,14 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -24538,10 +29364,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -24561,6 +29389,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -25081,6 +29910,7 @@ export interface operations { 200: { content: { 'application/json': { + /** @description Details about each object. */ data: components['schemas']['file_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean @@ -25133,7 +29963,7 @@ export interface operations { * @description A future timestamp after which the link will no longer be usable. */ expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ file: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -25240,6 +30070,7 @@ export interface operations { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -25326,6 +30157,7 @@ export interface operations { | 'identity_document' | 'pci_document' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' } } } @@ -25361,6 +30193,284 @@ export interface operations { } } } + /**

Returns a list of Financial Connections Account objects.

*/ + GetFinancialConnectionsAccounts: { + parameters: { + query: { + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an Financial Connections Account.

*/ + GetFinancialConnectionsAccountsAccount: { + 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']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostFinancialConnectionsAccountsAccountDisconnect: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Lists all owners for a given Account

*/ + GetFinancialConnectionsAccountsAccountOwners: { + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostFinancialConnectionsAccountsAccountRefresh: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] + } + } + } + } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostFinancialConnectionsSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } + } + } + } + /**

Retrieves the details of a Financial Connections Session

*/ + GetFinancialConnectionsSessionsSession: { + 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']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

List all verification reports.

*/ GetIdentityVerificationReports: { parameters: { @@ -25814,7 +30924,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ amount?: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string @@ -25839,7 +30949,7 @@ export interface operations { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25868,11 +30978,11 @@ export interface operations { subscription?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -25934,7 +31044,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ amount?: number /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ description?: string @@ -25953,7 +31063,7 @@ export interface operations { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25980,11 +31090,11 @@ export interface operations { quantity?: number /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ tax_rates?: string[] | '' - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -26087,7 +31197,7 @@ export interface operations { } } } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ PostInvoices: { responses: { /** Successful response. */ @@ -26108,7 +31218,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ auto_advance?: boolean @@ -26124,6 +31234,8 @@ export interface operations { * @enum {string} */ collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** @description A list of up to 4 custom fields to be displayed on the invoice. */ custom_fields?: | { @@ -26132,7 +31244,7 @@ export interface operations { }[] | '' /** @description The ID of the customer who will be billed. */ - customer: string + customer?: string /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -26159,6 +31271,15 @@ export interface operations { expand?: string[] /** @description Footer to be displayed on the invoice. */ footer?: string + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: { + /** @enum {string} */ + action: 'revision' + invoice: string + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ @@ -26168,6 +31289,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26189,10 +31311,47 @@ export interface operations { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26204,19 +31363,37 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + pending_invoice_items_behavior?: 'exclude' | 'include' | 'include_and_require' + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ subscription?: string /** * transfer_data_specs @@ -26230,6 +31407,57 @@ export interface operations { } } } + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetInvoicesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoice'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

* @@ -26246,6 +31474,8 @@ export interface operations { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26287,6 +31517,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26298,10 +31529,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26321,6 +31554,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26421,13 +31655,7 @@ export interface operations { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26469,6 +31697,8 @@ export interface operations { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26510,6 +31740,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26521,10 +31752,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26544,6 +31777,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26650,13 +31884,7 @@ export interface operations { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26764,7 +31992,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ auto_advance?: boolean @@ -26822,6 +32050,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26843,10 +32072,47 @@ export interface operations { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26858,16 +32124,29 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ @@ -27051,6 +32330,8 @@ export interface operations { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ forgive?: boolean + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ off_session?: boolean /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -27127,88 +32408,6 @@ export interface operations { } } } - /**

Returns a list of issuer fraud records.

*/ - GetIssuerFraudRecords: { - parameters: { - query: { - /** Only return issuer fraud records for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuer_fraud_record'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ GetIssuingAuthorizations: { parameters: { @@ -27529,7 +32728,7 @@ export interface operations { } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ name: string /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ phone_number?: string @@ -29518,6 +34717,7 @@ export interface operations { currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + financial_account?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } /** @description The card this is meant to be a replacement for (if any). */ @@ -29541,7 +34741,13 @@ export interface operations { postal_code: string state?: string } + /** customs_param */ + customs?: { + eori_number?: string + } name: string + phone_number?: string + require_signature?: boolean /** @enum {string} */ service?: 'express' | 'priority' | 'standard' /** @enum {string} */ @@ -31480,6 +36686,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31563,8 +36771,15 @@ export interface operations { expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string + } } } } @@ -31624,6 +36839,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31983,22 +37200,13 @@ export interface operations { } } } - /**

Retrieves a Mandate object.

*/ - GetMandatesMandate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - mandate: string - } - } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostLinkAccountSessions: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['mandate'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32010,82 +37218,54 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - GetOrderReturns: { - parameters: { - query: { - /** Date this return was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - GetOrderReturnsId: { + /**

Retrieves the details of a Financial Connections Session

*/ + GetLinkAccountSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - id: string + session: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32101,70 +37281,25 @@ export interface operations { } } } - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - GetOrders: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetLinkedAccounts: { parameters: { query: { - /** Date this order was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return orders for the given customer. */ - customer?: string + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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 orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: { - canceled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - fulfilled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - paid?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - returned?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - } - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: string[] } } responses: { @@ -32172,7 +37307,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['order'][] + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32198,13 +37334,22 @@ export interface operations { } } } - /**

Creates a new order object.

*/ - PostOrders: { + /**

Retrieves the details of an Financial Connections Account.

*/ + GetLinkedAccountsAccount: { + 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']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32216,66 +37361,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostLinkedAccountsAccountDisconnect: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32287,22 +37388,49 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostOrdersId: { + /**

Lists all owners for a given Account

*/ + GetLinkedAccountsAccountOwners: { parameters: { path: { - id: string + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: 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': components['schemas']['order'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -32314,44 +37442,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Pay an order by providing a source to create a payment.

*/ - PostOrdersIdPay: { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostLinkedAccountsAccountRefresh: { parameters: { path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32364,34 +37470,30 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] } } } } - /**

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: { + /**

Retrieves a Mandate object.

*/ + GetMandatesMandate: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + mandate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['mandate'] } } /** Error response. */ @@ -32403,38 +37505,15 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: - | { - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { + /**

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: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** 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 @@ -32451,7 +37530,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['payment_intent'][] + data: components['schemas']['order'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32477,24 +37556,13 @@ export interface operations { } } } - /** - *

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: { + /**

Creates a new open order object.

*/ + PostOrders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -32507,288 +37575,117 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * automatic_tax + * @description Settings for automatic tax calculation for this order. */ - automatic_payment_methods?: { + automatic_tax?: { enabled: boolean } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: boolean | ('one_off' | 'recurring') - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** create_params */ + settings: { + application_fee_amount?: number + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { /** payment_intent_payment_method_options_mandate_options_param */ mandate_options?: { custom_mandate_url?: string | '' @@ -32799,68 +37696,74 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } - | '' - afterpay_clearpay?: - | { + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + bancontact?: { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - boleto?: - | { - expires_after_days?: number + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' } /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + funding_type?: 'bank_transfer' /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -32871,130 +37774,243 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - oxxo?: - | { + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - p24?: - | { + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' tos_shown_and_accepted?: boolean } - | '' - sepa_debit?: - | { + /** payment_intent_payment_method_options_param */ + sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } - | '' - sofort?: - | { + /** payment_method_options_param */ + sofort?: { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - wechat_pay?: - | { + /** payment_method_options_param */ + wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data */ + transfer_data?: { + amount?: number + destination: string + } } - carrier?: string - name: string - phone?: string - tracking_number?: string } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + metadata?: { [key: string]: string } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string + /** @enum {string} */ + type?: 'fixed_amount' + } + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: + | { + /** validated_optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number - destination: string + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean } } } } - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - GetPaymentIntentsIntent: { + /**

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: { - /** 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 + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33010,26 +38026,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostOrdersId: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33042,386 +38050,367 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | '' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean + } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + id?: string + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** update_params */ + settings: { + application_fee_amount?: number | '' + /** update_params */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string | '' + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_data?: + | { + amount?: number + destination: string + } + | '' } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } + metadata?: { [key: string]: string } /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number + type?: 'fixed_amount' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: | { - /** optional_fields_address */ + /** validated_optional_fields_address */ address: { city?: string country?: string @@ -33430,45 +38419,85 @@ export interface operations { postal_code?: string state?: string } - carrier?: string name: string phone?: string - tracking_number?: string } | '' - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string } } } } - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

- */ - PostPaymentIntentsIntentCancel: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + PostOrdersIdCancel: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33481,35 +38510,73 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetOrdersIdLineItems: { 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: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reopens a submitted order.

*/ + PostOrdersIdReopen: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33522,61 +38589,113 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number + } + } + } + } + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + PostOrdersIdSubmit: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number + } + } + } + } + /**

Returns a list of PaymentIntents.

*/ + GetPaymentIntents: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return PaymentIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string } } } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } } } /** - *

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).

+ *

Creates a PaymentIntent object.

* - *

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.

+ *

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.

* - *

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.

+ *

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.

*/ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostPaymentIntents: { responses: { /** Successful response. */ 200: { @@ -33594,47 +38713,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean + } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. */ + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ mandate?: string - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ off_session?: boolean | ('one_off' | 'recurring') - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ payment_method?: string /** * payment_method_data_params @@ -33650,6 +38797,8 @@ export interface operations { transit_number: string } /** param */ + affirm?: { [key: string]: unknown } + /** param */ afterpay_clearpay?: { [key: string]: unknown } /** param */ alipay?: { [key: string]: unknown } @@ -33682,10 +38831,14 @@ export interface operations { phone?: string } /** param */ + blik?: { [key: string]: unknown } + /** param */ boleto?: { tax_id: string } /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ eps?: { /** @enum {string} */ bank?: @@ -33699,6 +38852,7 @@ export interface operations { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -33776,6 +38930,10 @@ export interface operations { year: number } } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } metadata?: { [key: string]: string } /** param */ oxxo?: { [key: string]: unknown } @@ -33810,6 +38968,16 @@ export interface operations { | 'volkswagen_bank' } /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ sepa_debit?: { iban: string } @@ -33821,23 +38989,42 @@ export interface operations { /** @enum {string} */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } /** param */ wechat_pay?: { [key: string]: unknown } } @@ -33858,30 +39045,70 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' afterpay_clearpay?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' bancontact?: | { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string } | '' boleto?: | { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' card?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' cvc_token?: string /** installments_param */ installments?: { @@ -33896,30 +39123,102 @@ export interface operations { } | '' } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } /** @enum {string} */ network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' /** @enum {string} */ setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' interac_present?: { [key: string]: unknown } | '' klarna?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -33930,41 +39229,116 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - oxxo?: + konbini?: | { - expires_after_days?: number + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - p24?: + link?: | { - tos_shown_and_accepted?: boolean - } + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } | '' sepa_debit?: | { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' sofort?: | { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' wechat_pay?: @@ -33972,18 +39346,23 @@ export interface operations { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + radar_options?: { + session?: string + } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ return_url?: string /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -33991,47 +39370,85 @@ export interface operations { * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - | '' + setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean } } } } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPaymentIntentsSearch: { parameters: { - path: { - intent: 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + data: components['schemas']['payment_intent'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } } } /** Error response. */ @@ -34043,49 +39460,34 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your payment links.

*/ - GetPaymentLinks: { + /** + *

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: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string + /** 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[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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: { + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34101,13 +39503,26 @@ export interface operations { } } } - /**

Creates a payment link.

*/ - PostPaymentLinks: { + /** + *

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_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34120,348 +39535,663 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | '' /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - automatic_tax?: { - enabled: boolean - } + capture_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. */ - billing_address_collection?: 'auto' | 'required' + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - price: string - quantity: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: 'card'[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. - * - * We recommend that you review your privacy policy and check with your legal contacts. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - phone_number_collection?: { - enabled: boolean + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } } /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - 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' - )[] + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - subscription_data?: { - trial_period_days?: number - } + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + | '' + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: { amount?: number - destination: string } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string } } } } - /**

Retrieve a payment link.

*/ - GetPaymentLinksPaymentLink: { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + PostPaymentIntentsIntentApplyCustomerBalance: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34473,22 +40203,43 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates a payment link.

*/ - PostPaymentLinksPaymentLink: { - parameters: { - path: { - payment_link: string - } - } + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

+ */ + PostPaymentIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34501,337 +40252,35 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } /** - * @description Configuration for collecting the customer's billing address. + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` * @enum {string} */ - billing_address_collection?: 'auto' | 'required' + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - id: string - quantity?: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | '' - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: - | { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - | '' } } } } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetPaymentLinksPaymentLinkLineItems: { + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

+ */ + PostPaymentIntentsIntentCapture: { parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34843,89 +40292,67 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - GetPaymentMethods: { - parameters: { - query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } /** - *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

* - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ *

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.

*/ - PostPaymentMethods: { + PostPaymentIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34939,52 +40366,653 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - afterpay_clearpay?: { [key: string]: unknown } + capture_method?: 'automatic' | 'manual' + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: boolean | ('one_off' | 'recurring') + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - alipay?: { [key: string]: unknown } + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - au_becs_debit?: { - account_number: string - bsb_number: string + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ - bacs_debit?: { - account_number?: string - sort_code?: string + radar_options?: { + session?: string } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. */ - bancontact?: { [key: string]: unknown } + return_url?: string /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - billing_details?: { - address?: - | { + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { city?: string country?: string line1?: string @@ -34992,349 +41020,55 @@ export interface operations { postal_code?: string state?: string } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: - | { - cvc?: string - exp_month: number - exp_year: number - number: string + carrier?: string + name: string + phone?: string + tracking_number?: string } - | { - token: string - } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: { [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: { [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: { [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: { [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - PostPaymentMethodsPaymentMethod: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number - exp_year?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + | '' + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean } } } } /** - *

Attaches a PaymentMethod object to a Customer.

+ *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

* - *

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.

+ *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

* - *

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.

+ *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

*/ - PostPaymentMethodsPaymentMethodAttach: { + PostPaymentIntentsIntentIncrementAuthorization: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35347,26 +41081,42 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description 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 + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } } } } } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35379,34 +41129,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - GetPayouts: { + /**

Returns a list of your payment links.

*/ + GetPaymentLinks: { parameters: { query: { - arrival_date?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ + active?: boolean /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -35415,8 +41155,6 @@ 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 - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string } } responses: { @@ -35424,7 +41162,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['payout'][] + data: components['schemas']['payment_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35450,19 +41188,13 @@ export interface operations { } } } - /** - *

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: { + /**

Creates a payment link.

*/ + PostPaymentLinks: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payout'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35475,207 +41207,427 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - method?: 'instant' | 'standard' + billing_address_collection?: 'auto' | 'required' /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). * @enum {string} */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - } - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - PostPayoutsPayoutReverse: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + price: string + quantity: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean + } + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: { + shipping_rate?: string + }[] + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + description?: string + trial_period_days?: number + } + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean + } + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number + destination: string + } } } } } - /**

Returns a list of your plans.

*/ - GetPlans: { + /**

Retrieve a payment link.

*/ + GetPaymentLinksPaymentLink: { parameters: { query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + } + path: { + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35691,13 +41643,18 @@ export interface operations { } } } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - PostPlans: { + /**

Updates a payment link.

*/ + PostPaymentLinksPaymentLink: { + parameters: { + path: { + payment_link: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['plan'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35710,171 +41667,379 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active?: boolean /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} + * after_completion_params + * @description Behavior after the purchase is complete. */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + * automatic_tax_params + * @description Configuration for automatic tax collection. */ - amount_decimal?: string + automatic_tax?: { + enabled: boolean + } /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + billing_address_collection?: 'auto' | 'required' + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + id: string + quantity?: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { [key: string]: string } /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). * @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - product?: + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: | { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } - | string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: 'licensed' | 'metered' + 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' + )[] + } + | '' } } } } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetPaymentLinksPaymentLinkLineItems: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - } - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_plan'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -35890,44 +42055,50 @@ export interface operations { } } } - /**

Returns a list of your prices.

*/ - GetPrices: { + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + GetPaymentMethods: { parameters: { query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return prices for the given currency. */ - currency?: string + /** 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 - /** Only return the price with these lookup_keys, if any exist. */ - lookup_keys?: string[] - /** Only return prices for the given product. */ - product?: string - /** Only return prices with these recurring fields. */ - recurring?: { - /** @enum {string} */ - interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - type?: 'one_time' | 'recurring' + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' } } responses: { @@ -35935,8 +42106,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['price'][] + data: components['schemas']['payment_method'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35962,13 +42132,17 @@ export interface operations { } } } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - PostPrices: { + /** + *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + PostPaymentMethods: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -35981,109 +42155,375 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** @description The ID of the product that this price will belong to. */ - product?: string /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. */ - product_data?: { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string + acss_debit?: { + account_number: string + institution_number: string + transit_number: string } /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } + affirm?: { [key: string]: unknown } /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] + afterpay_clearpay?: { [key: string]: unknown } /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. */ - tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + alipay?: { [key: string]: unknown } /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. */ - transform_quantity?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' + au_becs_debit?: { + account_number: string + bsb_number: string } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - unit_amount?: number /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. */ - unit_amount_decimal?: string + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: { [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: { [key: string]: unknown } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: + | { + cvc?: string + exp_month: number + exp_year: number + number: string + } + | { + token: string + } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: { [key: string]: unknown } + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: { [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: { [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: { [key: string]: unknown } + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: { [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: { [key: string]: unknown } + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: { [key: string]: unknown } + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: { [key: string]: unknown } + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: { [key: string]: unknown } } } } } - /**

Retrieves the price with the given ID.

*/ - GetPricesPrice: { + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ + GetPaymentMethodsPaymentMethod: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36099,18 +42539,18 @@ export interface operations { } } } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - PostPricesPrice: { + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + PostPaymentMethodsPaymentMethod: { parameters: { path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36123,34 +42563,142 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description A brief description of the price, hidden from customers. */ - nickname?: string /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + } } } } } - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - GetProducts: { + /** + *

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 set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See Optimizing cards for future payments for more information about setting up + * future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + PostPaymentMethodsPaymentMethodAttach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + GetPayouts: { parameters: { query: { - /** 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. */ + arrival_date?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number created?: | { gt?: number @@ -36159,20 +42707,18 @@ export interface operations { lte?: number } | number + /** The ID of an external account - only return payouts sent to this external account. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Only return products with the given IDs. */ - ids?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return products with the given url. */ - url?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string } } responses: { @@ -36180,8 +42726,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['product'][] + data: components['schemas']['payout'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36207,13 +42752,19 @@ export interface operations { } } } - /**

Creates a new product object.

*/ - PostProducts: { + /** + *

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']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36226,65 +42777,50 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean + method?: 'instant' | 'standard' /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - GetProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36300,18 +42836,18 @@ export interface operations { } } } - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36324,58 +42860,26 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] | '' /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string | '' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - DeleteProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36387,20 +42891,55 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your promotion codes.

*/ - GetPromotionCodes: { + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + PostPayoutsPayoutReverse: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Returns a list of your plans.

*/ + GetPlans: { parameters: { query: { - /** Filter promotion codes by whether they are active. */ + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - code?: string - /** Only return promotion codes for this coupon. */ - coupon?: string /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { @@ -36410,14 +42949,14 @@ export interface operations { lte?: number } | number - /** Only return promotion codes that are restricted to this customer. */ - customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** 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 } @@ -36427,7 +42966,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['promotion_code'][] + /** @description Details about each object. */ + data: components['schemas']['plan'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36453,13 +42993,13 @@ export interface operations { } } } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - PostPromotionCodes: { + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + PostPlans: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36472,54 +43012,104 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string - /** @description The coupon for this promotion code. */ - coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} */ - expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + product?: + | { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } + | string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - restrictions?: { - first_time_transaction?: boolean - minimum_amount?: number - minimum_amount_currency?: string + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' } } } } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - GetPromotionCodesPromotionCode: { + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36535,18 +43125,18 @@ export interface operations { } } } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - PostPromotionCodesPromotionCode: { + /**

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: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36559,32 +43149,87 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + /** @description Whether the plan is currently available for new subscriptions. */ active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number } } } } - /**

Returns a list of your quotes.

*/ - GetQuotes: { + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + DeletePlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your prices.

*/ + GetPrices: { parameters: { query: { - /** The ID of the customer whose quotes will be retrieved. */ - customer?: string + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return prices for the given currency. */ + currency?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** Only return the price with these lookup_keys, if any exist. */ + lookup_keys?: string[] + /** Only return prices for the given product. */ + product?: string + /** Only return prices with these recurring fields. */ + recurring?: { + /** @enum {string} */ + interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** The status of the quote. */ - status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Only return prices of type `recurring` or `one_time`. */ + type?: 'one_time' | 'recurring' } } responses: { @@ -36592,7 +43237,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['quote'][] + /** @description Details about each object. */ + data: components['schemas']['price'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36618,13 +43264,13 @@ export interface operations { } } } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - PostQuotes: { + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + PostPrices: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36637,123 +43283,196 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} */ - automatic_tax?: { - enabled: boolean + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } } /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** @description The ID of the product that this price will belong to. */ + product?: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string + product_data?: { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. */ - from_quote?: { - is_revision?: boolean - quote: string + recurring?: { + /** @enum {string} */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string /** - * quote_param - * @description All invoices will be billed using the specified settings. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' + tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string } } } } - /**

Retrieves the quote with the given ID.

*/ - GetQuotesQuote: { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPricesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['price'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the price with the given ID.

*/ + GetPricesPrice: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36769,18 +43488,18 @@ export interface operations { } } } - /**

A quote models prices and services for a customer.

*/ - PostQuotesQuote: { + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + PostPricesPrice: { parameters: { path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36793,175 +43512,84 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: | { - coupon?: string - discount?: string - }[] + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string - /** @description A header that will be displayed on the quote PDF. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - id?: string - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' + metadata?: { [key: string]: string } | '' + /** @description A brief description of the price, hidden from customers. */ + nickname?: string /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' - } - } - } - } - /**

Accepts the specified quote.

*/ - PostQuotesQuoteAccept: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Cancels the quote.

*/ - PostQuotesQuoteCancel: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean } } } } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - GetQuotesQuoteComputedUpfrontLineItems: { + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + GetProducts: { parameters: { query: { + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + 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 - } - path: { - quote: string + /** Only return products with the given url. */ + url?: string } } responses: { @@ -36970,7 +43598,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['item'][] + data: components['schemas']['product'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36996,18 +43624,13 @@ export interface operations { } } } - /**

Finalizes the quote.

*/ - PostQuotesQuoteFinalize: { - parameters: { - path: { - quote: string - } - } + /**

Creates a new product object.

*/ + PostProducts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37020,32 +43643,109 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. */ + name: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. */ - expires_at?: number + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string } } } } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetQuotesQuoteLineItems: { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetProductsSearch: { parameters: { query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - quote: string + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: string } } responses: { @@ -37053,16 +43753,16 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ + data: components['schemas']['product'][] has_more: boolean + next_page?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'list' - /** @description The URL where this list can be accessed. */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number url: string } } @@ -37080,22 +43780,22 @@ export interface operations { } } } - /**

Download the PDF for a finalized quote

*/ - GetQuotesQuotePdf: { + /**

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: { - quote: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/pdf': string + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37111,40 +43811,18 @@ export interface operations { } } } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostProductsId: { parameters: { - query: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37156,30 +43834,61 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] | '' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The product's name, meant to be displayable to the customer. */ + name?: string + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | '' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string | '' + } } } } - /** - *

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: { + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + DeleteProductsId: { parameters: { path: { - early_fraud_warning: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.early_fraud_warning'] + 'application/json': components['schemas']['deleted_product'] } } /** Error response. */ @@ -37195,10 +43904,17 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of your promotion codes.

*/ + GetPromotionCodes: { parameters: { query: { + /** Filter promotion codes by whether they are active. */ + active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + code?: string + /** Only return promotion codes for this coupon. */ + coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { gt?: number @@ -37207,6 +43923,8 @@ export interface operations { lte?: number } | number + /** Only return promotion codes that are restricted to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37215,10 +43933,6 @@ 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 - /** 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: { @@ -37226,7 +43940,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list_item'][] + data: components['schemas']['promotion_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37252,13 +43966,13 @@ export interface operations { } } } - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - PostRadarValueListItems: { + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + PostPromotionCodes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37271,32 +43985,59 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. */ + active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string + /** @description The coupon for this promotion code. */ + coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + first_time_transaction?: boolean + minimum_amount?: number + minimum_amount_currency?: string + } } } } } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + GetPromotionCodesPromotionCode: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37312,18 +44053,18 @@ export interface operations { } } } - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - DeleteRadarValueListItemsItem: { + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + PostPromotionCodesPromotionCode: { parameters: { path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37335,26 +44076,34 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + } + } } } } - /**

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: { + /**

Returns a list of your quotes.

*/ + GetQuotes: { parameters: { query: { - /** The alias used to reference the value list when writing rules. */ - alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - contains?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** The ID of the customer whose quotes will be retrieved. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37363,6 +44112,10 @@ 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 quote. */ + status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock?: string } } responses: { @@ -37370,7 +44123,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list'][] + data: components['schemas']['quote'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37396,13 +44149,13 @@ export interface operations { } } } - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - PostRadarValueLists: { + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + PostQuotes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37415,39 +44168,126 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - * @enum {string} + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name: string - } - } - } - } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean + quote: string + } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + GetQuotesQuote: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37463,18 +44303,18 @@ export interface operations { } } } - /**

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: { + /**

A quote models prices and services for a customer.

*/ + PostQuotesQuote: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37487,30 +44327,113 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias?: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string + /** @description A header that will be displayed on the quote PDF. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + id?: string + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name?: string + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' } } } } - /**

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: { + /**

Accepts the specified quote.

*/ + PostQuotesQuoteAccept: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37522,22 +44445,47 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Cancels the quote.

*/ + PostQuotesQuoteCancel: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - GetRecipients: { + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ + GetQuotesQuoteComputedUpfrontLineItems: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37546,9 +44494,9 @@ 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 - type?: 'corporation' | 'individual' - /** Only return recipients that are verified or unverified. */ - verified?: boolean + } + path: { + quote: string } } responses: { @@ -37556,7 +44504,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['recipient'][] + /** @description Details about each object. */ + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37582,16 +44531,18 @@ export interface operations { } } } - /** - *

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: { + /**

Finalizes the quote.

*/ + PostQuotesQuoteFinalize: { + parameters: { + path: { + quote: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37604,44 +44555,51 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number } } } } - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - GetRecipientsId: { + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetQuotesQuoteLineItems: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } path: { - id: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] | components['schemas']['deleted_recipient'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -37657,24 +44615,22 @@ export interface operations { } } } - /** - *

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: { + /**

Download the PDF for a finalized quote

*/ + GetQuotesQuotePdf: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/pdf': string } } /** Error response. */ @@ -37686,41 +44642,79 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

*/ + GetRadarEarlyFraudWarnings: { + parameters: { + query: { + /** Only return early fraud warnings for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.early_fraud_warning'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { + /** + *

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: { - id: string + 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']['deleted_recipient'] + 'application/json': components['schemas']['radar.early_fraud_warning'] } } /** Error response. */ @@ -37736,12 +44730,10 @@ export interface operations { } } } - /**

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: { + /**

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: { - /** Only return refunds for the charge specified by this charge ID. */ - charge?: string created?: | { gt?: number @@ -37756,10 +44748,12 @@ 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 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 + /** 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: { @@ -37767,7 +44761,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['refund'][] + data: components['schemas']['radar.value_list_item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37793,13 +44787,13 @@ export interface operations { } } } - /**

Create a refund.

*/ - PostRefunds: { + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + PostRadarValueListItems: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37812,37 +44806,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - amount?: number - charge?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string } } } } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37858,22 +44847,18 @@ export interface operations { } } } - /** - *

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: { + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + DeleteRadarValueListItemsItem: { parameters: { path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['deleted_radar.value_list_item'] } } /** Error response. */ @@ -37885,19 +44870,18 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueLists: { parameters: { query: { + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string created?: | { gt?: number @@ -37921,7 +44905,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_run'][] + data: components['schemas']['radar.value_list'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37947,13 +44931,13 @@ export interface operations { } } } - /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ - PostReportingReportRuns: { + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + PostRadarValueLists: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['radar.value_list'] } } /** Error response. */ @@ -37966,86 +44950,473 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - /** Format: unix-time */ - interval_end?: number - /** Format: unix-time */ - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + } + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + GetRefunds: { + parameters: { + query: { + /** Only return refunds for the charge specified by this charge ID. */ + charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create a refund.

*/ + PostRefunds: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ + amount?: number + charge?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + PostRefundsRefundCancel: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

*/ + GetReportingReportRuns: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ + PostReportingReportRuns: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + /** Format: unix-time */ + interval_end?: number + /** Format: unix-time */ + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' @@ -38614,28 +45985,3921 @@ export interface operations { | 'WET' | 'Zulu' } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetReviews: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['review'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + GetSetupAttempts: { + parameters: { + query: { + /** + * A filter on the list, based on the object `created` field. The value + * can be a string with an integer Unix timestamp, or it can be a + * dictionary with a number of different query options. + */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** + * Only return SetupAttempts created by the SetupIntent specified by + * this ID. + */ + setup_intent: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_attempt'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + PostSetupIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + } + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + } + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + PostSetupIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + GetShippingRates: { + parameters: { + query: { + /** Only return shipping rates that are active or inactive. */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return shipping rates for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + PostShippingRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + GetShippingRatesShippingRateToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + PostShippingRatesShippingRateToken: { + parameters: { + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: { + amount?: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + } + /**

Returns a list of scheduled query runs.

*/ + GetSigmaScheduledQueryRuns: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['scheduled_query_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + GetSkus: { + parameters: { + query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: { [key: string]: string } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return SKUs with the given IDs. */ + ids?: string[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + } + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + } + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + metadata?: { [key: string]: string } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** @enum {string} */ + usage?: 'reusable' | 'single_use' + } + } + } + } + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSource: { + parameters: { + query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

*/ + GetSourcesSourceSourceTransactions: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['source_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + } + /**

Returns a list of your subscription items for a given subscription.

*/ + GetSubscriptionItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The ID of the subscription whose items will be retrieved. */ + subscription: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + PostSubscriptionItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the plan or quantity of an item on a current subscription.

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + } + } + } + } + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['usage_record_summary'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: 'now' | number + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ + PostSubscriptionSchedules: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + currency?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + /** Format: unix-time */ + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + /** Format: unix-time */ + trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: number | 'now' + } + } + } + } + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + end_date?: number | 'now' + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: number | 'now' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + trial_end?: number | 'now' + }[] + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + } + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + } + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + } + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + GetSubscriptions: { + parameters: { + query: { + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_end?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_start?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter for subscriptions that contain this recurring price ID. */ + price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ + PostSubscriptions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number } } } } - /**

Retrieves the details of an existing Report Run.

*/ - GetReportingReportRunsReportRun: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetSubscriptionsSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_run: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -38651,12 +49915,351 @@ export interface operations { } } } - /**

Returns a full list of Report Types.

*/ - GetReportingReportTypes: { + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } + } + } + } + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + GetTaxCodes: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } } responses: { @@ -38664,7 +50267,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_type'][] + data: components['schemas']['tax_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38690,22 +50293,22 @@ export interface operations { } } } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - GetReportingReportTypesReportType: { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + GetTaxCodesId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_type: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_type'] + 'application/json': components['schemas']['tax_code'] } } /** Error response. */ @@ -38721,10 +50324,13 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + GetTaxRates: { parameters: { query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active?: boolean + /** Optional range for filtering created date. */ created?: | { gt?: number @@ -38737,6 +50343,8 @@ export interface operations { 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. */ @@ -38748,7 +50356,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['review'][] + data: components['schemas']['tax_rate'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38768,28 +50376,76 @@ export interface operations { } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new tax rate.

*/ + PostTaxRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { + /**

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38805,18 +50461,18 @@ export interface operations { } } } - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - PostReviewsReviewApprove: { + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { parameters: { path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38829,40 +50485,43 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - GetSetupAttempts: { + /**

Returns a list of Configuration objects.

*/ + GetTerminalConfigurations: { parameters: { query: { - /** - * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a - * dictionary with a number of different query options. - */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** if present, only return the account default or non-default configurations. */ + is_account_default?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** - * Only return SetupAttempts created by the SetupIntent specified by - * this ID. - */ - setup_intent: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -38872,7 +50531,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['setup_attempt'][] + data: components['schemas']['terminal.configuration'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38898,49 +50557,150 @@ export interface operations { } } } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { + /**

Creates a new Configuration object.

*/ + PostTerminalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: { + splashscreen?: string | '' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + } + | '' + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: string | '' + } + } + } + } + } + /**

Retrieves a Configuration object.

*/ + GetTerminalConfigurationsConfiguration: { parameters: { + path: { + configuration: 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?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return SetupIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return SetupIntents associated with the specified payment method. */ - payment_method?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38956,18 +50716,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates a new Configuration object.

*/ + PostTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38980,122 +50740,125 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: + | { + splashscreen?: string | '' + } + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + | '' + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: + | { + splashscreen?: string | '' } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: 'off_session' | 'on_session' + | '' } } } } - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - GetSetupIntentsIntent: { + /**

Deletes a Configuration object.

*/ + DeleteTerminalConfigurationsConfiguration: { 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 + configuration: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39111,18 +50874,13 @@ export interface operations { } } } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { - parameters: { - path: { - intent: string - } - } + /**

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']['setup_intent'] + 'application/json': components['schemas']['terminal.connection_token'] } } /** Error response. */ @@ -39135,75 +50893,44 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string } } } } - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - PostSetupIntentsIntentCancel: { + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { parameters: { - path: { - intent: 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': components['schemas']['setup_intent'] + 'application/json': { + data: components['schemas']['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -39215,44 +50942,20 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } /** - *

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.

+ *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

*/ - PostSetupIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostTerminalLocations: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] } } /** Error response. */ @@ -39265,97 +50968,73 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. + * create_location_address_param + * @description The full address of the location. */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } - /**

Verifies microdeposits on a SetupIntent object.

*/ - PostSetupIntentsIntentVerifyMicrodeposits: { + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalLocationsLocation: { parameters: { path: { - intent: string + location: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] } } /** Error response. */ @@ -39368,41 +51047,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the SetupIntent. */ - client_secret?: string + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of your shipping rates.

*/ - GetShippingRates: { + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { parameters: { query: { - /** Only return shipping rates that are active or inactive. */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return shipping rates for the given currency. */ - currency?: string + /** Filters readers by device type */ + device_type?: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | '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: { @@ -39410,7 +51123,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['shipping_rate'][] + /** @description A list of readers */ + data: components['schemas']['terminal.reader'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39436,13 +51150,13 @@ export interface operations { } } } - /**

Creates a new shipping rate object.

*/ - PostShippingRates: { + /**

Creates a new Reader object.

*/ + PostTerminalReaders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39455,70 +51169,36 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number - currency: string - } + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. */ + location?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: 'fixed_amount' + metadata?: { [key: string]: string } | '' + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string } } } } - /**

Returns the shipping rate object with the given ID.

*/ - GetShippingRatesShippingRateToken: { + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39534,18 +51214,18 @@ export interface operations { } } } - /**

Updates an existing shipping rate object.

*/ - PostShippingRatesShippingRateToken: { + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalReadersReader: { parameters: { path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39558,46 +51238,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The new label of the reader. */ + label?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { + /**

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { 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: { + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39613,22 +51275,18 @@ export interface operations { } } } - /**

Retrieves the details of an scheduled query run.

*/ - GetSigmaScheduledQueryRunsScheduledQueryRun: { + /**

Cancels the current reader action.

*/ + PostTerminalReadersReaderCancelAction: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - scheduled_query_run: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['scheduled_query_run'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39640,72 +51298,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - GetSkus: { + /**

Initiates a payment flow on a Reader.

*/ + PostTerminalReadersReaderProcessPaymentIntent: { parameters: { - query: { - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ - attributes?: { [key: string]: string } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return SKUs with the given IDs. */ - ids?: string[] - /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ - in_stock?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + path: { + reader: string } } - } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39718,65 +51329,33 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + /** @description PaymentIntent ID */ + payment_intent: string /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. + * process_config + * @description Configuration overrides */ - package_dimensions?: { - height: number - length: number - weight: number - width: number + process_config?: { + skip_tipping?: boolean } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string } } } } - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - GetSkusId: { + /**

Initiates a setup intent flow on a Reader.

*/ + PostTerminalReadersReaderProcessSetupIntent: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39788,26 +51367,29 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description SetupIntent ID */ + setup_intent: string + } } } } - /** - *

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: { + /**

Sets reader display to show cart details.

*/ + PostTerminalReadersReaderSetReaderDisplay: { parameters: { path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39820,58 +51402,43 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string + /** + * cart + * @description Cart + */ + cart?: { + currency: string + line_items: { + amount: number + description: string + quantity: number + }[] + tax?: number + total: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string /** - * inventory_update_specs - * @description Description of the SKU's inventory. + * @description Type + * @enum {string} */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string + type: 'cart' } } } } - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - DeleteSkusId: { + /**

Create an incoming testmode bank transfer

*/ + PostTestHelpersCustomersCustomerFundCashBalance: { parameters: { path: { - id: string + customer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_sku'] + 'application/json': components['schemas']['customer_cash_balance_transaction'] } } /** Error response. */ @@ -39883,17 +51450,31 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + reference?: string + } } } } - /**

Creates a new source object.

*/ - PostSources: { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + PostTestHelpersIssuingCardsCardShippingDeliver: { + parameters: { + path: { + card: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -39905,151 +51486,55 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - metadata?: { [key: string]: string } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** @enum {string} */ - usage?: 'reusable' | 'single_use' + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] } } } } - /**

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: { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + PostTestHelpersIssuingCardsCardShippingFail: { 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: { + card: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + PostTestHelpersIssuingCardsCardShippingReturn: { + parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40061,26 +51546,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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: { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + PostTestHelpersIssuingCardsCardShippingShip: { parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40093,116 +51577,54 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } } } } } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { + /**

Expire a refund with a status of requires_action.

*/ + PostTestHelpersRefundsRefundExpire: { 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': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { + parameters: { path: { - mandate_notification: string - source: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_mandate_notification'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40214,12 +51636,27 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Simulated payment type + * @enum {string} + */ + type?: 'card_present' + } } } } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { + /**

Returns a list of your test clocks.

*/ + GetTestHelpersTestClocks: { 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. */ @@ -40231,16 +51668,13 @@ 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 } - path: { - source: string - } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['source_transaction'][] + data: components['schemas']['test_helpers.test_clock'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -40266,23 +51700,54 @@ export interface operations { } } } - /**

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: { + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + PostTestHelpersTestClocks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['test_helpers.test_clock'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + frozen_time: number + /** @description The name for this test clock. */ + name?: string + } + } + } + } + /**

Retrieves a test clock.

*/ + GetTestHelpersTestClocksTestClock: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - source: string - source_transaction: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_transaction'] + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40298,18 +51763,18 @@ export interface operations { } } } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { + /**

Deletes a test clock.

*/ + DeleteTestHelpersTestClocksTestClock: { parameters: { path: { - source: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['deleted_test_helpers.test_clock'] } } /** Error response. */ @@ -40321,47 +51786,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your subscription items for a given subscription.

*/ - GetSubscriptionItems: { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + PostTestHelpersTestClocksTestClockAdvance: { 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 + path: { + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40373,17 +51813,30 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + frozen_time: number + } } } } - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - PostSubscriptionItems: { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdFail: { + parameters: { + path: { + id: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40396,88 +51849,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - price?: string /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + * failure_details_params + * @description Details about a failed InboundTransfer. */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } + failure_details?: { /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

Retrieves the subscription item with the given ID.

*/ - GetSubscriptionItemsItem: { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + PostTestHelpersTreasuryInboundTransfersIdReturn: { 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']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdSucceed: { + parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40489,22 +51929,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates the plan or quantity of an item on a current subscription.

*/ - PostSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdFail: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40517,84 +51960,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - DeleteSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdPost: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40607,63 +51990,72 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] /** - * Format: unix-time - * @description 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. + * returned_details_params + * @description Optional hash to set the the return code. */ - proration_date?: number + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } } } } } - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { 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 + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40675,30 +52067,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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: { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { parameters: { path: { - subscription_item: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['usage_record'] + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40711,91 +52098,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: 'now' | number } } } } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { parameters: { - query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that have not started yet. */ - scheduled?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40807,17 +52127,38 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + } } } } - /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptionSchedules: { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedCredits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -40830,152 +52171,46 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * source_params + * @description Initiating payment method details for the object. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' + initiating_payment_method_details?: { /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string } - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' } /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @description The rails used for the object. * @enum {string} */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - /** Format: unix-time */ - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - trial?: boolean - /** Format: unix-time */ - trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: number | 'now' + network: 'ach' | 'us_domestic_wire' } } } } - /**

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 - } - } + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedDebits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -40987,22 +52222,50 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string + } + } + /** + * @description The rails used for the object. + * @enum {string} + */ + network: 'ach' + } } } } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - } + /** + *

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']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41016,179 +52279,348 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * connect_js_account_token_specs + * @description Information for the account this token will represent. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } + account?: { /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + ownership_declaration_shown_and_signed?: boolean + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string } - | '' + } + } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + routing_number?: string + } + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + currency?: string + cvc?: string + exp_month: string + exp_year: string + name?: string + number: string + } + | string + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + cvc_update?: { + cvc: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string } - transfer_data?: + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: | { - amount_percent?: number - destination: string + day: number + month: number + year: number } | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - end_date?: number | 'now' - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + nationality?: string + phone?: string + political_exposure?: string + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: number | 'now' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string } - trial?: boolean - trial_end?: number | 'now' - }[] + } /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} + * pii_token_specs + * @description The PII this token will represent. */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + pii?: { + id_number?: string + } } } } } - /**

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: { + /**

Retrieves the token with the given ID.

*/ + GetTokensToken: { parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } - } - } - /**

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 + token: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41200,30 +52632,16 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - GetSubscriptions: { + /**

Returns a list of top-ups.

*/ + GetTopups: { parameters: { query: { - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - current_period_end?: + /** A positive integer representing how much to transfer. */ + amount?: | { gt?: number gte?: number @@ -41231,300 +52649,43 @@ export interface operations { lte?: number } | number - current_period_start?: + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: | { gt?: number gte?: number lt?: number - lte?: number - } - | number - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter for subscriptions that contain this recurring price ID. */ - price?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - subscription_exposed_id: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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': components['schemas']['subscription'] + 'application/json': { + data: components['schemas']['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -41540,18 +52701,13 @@ export interface operations { } } } - /**

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 - } - } + /**

Top up the balance of an account

*/ + PostTopups: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41564,234 +52720,69 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | { - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string } } } } - /** - *

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: { + /**

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: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41804,28 +52795,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + PostTopupsTopupCancel: { parameters: { path: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41837,14 +52828,27 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - GetTaxCodes: { + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + GetTransfers: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transfers for the destination specified by this account ID. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -41853,6 +52857,8 @@ 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 + /** Only return transfers with the specified transfer group. */ + transfer_group?: string } } responses: { @@ -41860,7 +52866,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['tax_code'][] + /** @description Details about each object. */ + data: components['schemas']['transfer'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41886,22 +52893,13 @@ export interface operations { } } } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ - GetTaxCodesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } + /**

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']['tax_code'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -41913,43 +52911,56 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } } } } - /**

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: { + /**

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: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - active?: boolean - /** Optional range for filtering created date. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ - inclusive?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } + path: { + id: string + } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['tax_rate'][] + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41975,13 +52986,24 @@ export interface operations { } } } - /**

Creates a new tax rate.

*/ - PostTaxRates: { + /** + *

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']['tax_rate'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -41994,51 +53016,36 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + metadata?: { [key: string]: string } | '' + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean } } } } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { + /**

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42054,18 +53061,22 @@ export interface operations { } } } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { + /** + *

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42078,38 +53089,65 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } - } - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - PostTerminalConnectionTokens: { + } + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + GetTransfersTransferReversalsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.connection_token'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42124,24 +53162,30 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { + /**

Returns a list of CreditReversals.

*/ + GetTreasuryCreditReversals: { 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** 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 CreditReversals for the ReceivedCredit ID. */ + received_credit?: 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 CreditReversals for a given status. */ + status?: 'canceled' | 'posted' | 'processing' } } responses: { @@ -42149,7 +53193,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['terminal.location'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.credit_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42175,16 +53220,13 @@ export interface operations { } } } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - PostTerminalLocations: { + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + PostTreasuryCreditReversals: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42197,44 +53239,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedCredit to reverse. */ + received_credit: string } } } } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + GetTreasuryCreditReversalsCreditReversal: { parameters: { + path: { + credit_reversal: string + } 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'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42250,18 +53280,67 @@ export interface operations { } } } - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalLocationsLocation: { + /**

Returns a list of DebitReversals.

*/ + GetTreasuryDebitReversals: { parameters: { - path: { - location: 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 DebitReversals for the ReceivedDebit ID. */ + received_debit?: string + /** Only return DebitReversals for a given resolution. */ + resolution?: 'lost' | 'won' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 DebitReversals for a given status. */ + status?: 'canceled' | 'completed' | 'processing' } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.debit_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + PostTreasuryDebitReversals: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42274,40 +53353,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedDebit to reverse. */ + received_debit: string } } } } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { + /**

Retrieves a DebitReversal object.

*/ + GetTreasuryDebitReversalsDebitReversal: { parameters: { path: { - location: string + debit_reversal: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.location'] + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42323,24 +53394,26 @@ export interface operations { } } } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { + /**

Returns a list of FinancialAccounts.

*/ + GetTreasuryFinancialAccounts: { parameters: { query: { - /** Filters readers by device type */ - device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** An object ID cursor for use in pagination. */ ending_before?: string /** Specifies which fields 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. */ + /** A limit ranging from 1 to 100 (defaults to 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. */ + /** An object ID cursor for use in pagination. */ starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: 'offline' | 'online' } } responses: { @@ -42348,8 +53421,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description A list of readers */ - data: components['schemas']['terminal.reader'][] + data: components['schemas']['treasury.financial_account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42375,13 +53447,13 @@ export interface operations { } } } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + PostTreasuryFinancialAccounts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42396,34 +53468,94 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. */ - location?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: string[] } } } } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { + /**

Retrieves the details of a FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccount: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42439,18 +53571,18 @@ export interface operations { } } } - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalReadersReader: { + /**

Updates the details of a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccount: { parameters: { path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42465,26 +53597,92 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The new label of the reader. */ - label?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } } } } } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccountFeatures: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42500,16 +53698,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates the Features associated with a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccountFeatures: { + parameters: { + path: { + financial_account: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42523,328 +53723,185 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - ownership_declaration_shown_and_signed?: boolean - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - routing_number?: string + card_issuing?: { + requested: boolean } - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - currency?: string - cvc?: string - exp_month: string - exp_year: string - name?: string - number: string - } - | string - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string /** - * cvc_params - * @description The updated CVC value this token will represent. + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. */ - cvc_update?: { - cvc: string + deposit_insurance?: { + requested: boolean } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * person_token_specs - * @description Information for the person this token will represent. + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string + financial_addresses?: { + /** access */ + aba?: { + requested: boolean } - dob?: - | { - day: number - month: number - year: number - } - | '' - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - nationality?: string - phone?: string - political_exposure?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string + } + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } + } + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + intra_stripe_flows?: { + requested: boolean + } + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean } } /** - * pii_token_specs - * @description The PII this token will represent. + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. */ - pii?: { - id_number?: string + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } } } } } } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryInboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status?: 'canceled' | 'failed' | 'processing' | 'succeeded' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.inbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an InboundTransfer.

*/ + PostTreasuryInboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing InboundTransfer.

*/ + GetTreasuryInboundTransfersId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - token: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -42860,38 +53917,54 @@ export interface operations { } } } - /**

Returns a list of top-ups.

*/ - GetTopups: { + /**

Cancels an InboundTransfer.

*/ + PostTreasuryInboundTransfersInboundTransferCancel: { + parameters: { + path: { + inbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundPayments: { parameters: { query: { - /** A positive integer representing how much to transfer. */ - amount?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** Only return OutboundPayments sent to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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' + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' } } responses: { @@ -42899,7 +53972,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['topup'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_payment'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42925,13 +53999,13 @@ export interface operations { } } } - /**

Top up the balance of an account

*/ - PostTopups: { + /**

Creates an OutboundPayment.

*/ + PostTreasuryOutboundPayments: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42944,42 +54018,100 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + destination_payment_method?: string + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + destination_payment_method_data?: { + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + financial_account?: string + metadata?: { [key: string]: string } + /** @enum {string} */ + type: 'financial_account' | 'us_bank_account' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + } + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } + /** + * end_user_details_params + * @description End user details. + */ + end_user_details?: { + ip_address?: string + present: boolean + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + metadata?: { [key: string]: string } + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string } } } } - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - GetTopupsTopup: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + GetTreasuryOutboundPaymentsId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42995,18 +54127,93 @@ export interface operations { } } } - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - PostTopupsTopup: { + /**

Cancel an OutboundPayment.

*/ + PostTreasuryOutboundPaymentsIdCancel: { parameters: { path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an OutboundTransfer.

*/ + PostTreasuryOutboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43019,28 +54226,81 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: string } } } } - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + GetTreasuryOutboundTransfersOutboundTransfer: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - topup: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + PostTreasuryOutboundTransfersOutboundTransferCancel: { + parameters: { + path: { + outbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43059,30 +54319,27 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of ReceivedCredits.

*/ + GetTreasuryReceivedCredits: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transfers for the destination specified by this account ID. */ - destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** The FinancialAccount that received the funds. */ + financial_account: string /** 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 ReceivedCredits described by the flow. */ + linked_flows?: { + /** @enum {string} */ + source_flow_type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43091,7 +54348,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer'][] + data: components['schemas']['treasury.received_credit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43117,13 +54374,22 @@ export interface operations { } } } - /**

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: { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + GetTreasuryReceivedCreditsId: { + 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']['transfer'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -43135,47 +54401,26 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Returns a list of ReceivedDebits.

*/ + GetTreasuryReceivedDebits: { 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[] + /** The FinancialAccount that funds were pulled from. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43184,7 +54429,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] + data: components['schemas']['treasury.received_debit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43210,15 +54455,13 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + GetTreasuryReceivedDebitsId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { id: string } @@ -43227,7 +54470,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -43239,37 +54482,63 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Retrieves a list of TransactionEntry objects.

*/ + GetTreasuryTransactionEntries: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + effective_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by?: 'created' | 'effective_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 TransactionEntries associated with this Transaction. */ + transaction?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43285,22 +54554,22 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves a TransactionEntry object.

*/ + GetTreasuryTransactionEntriesId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - transfer: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': components['schemas']['treasury.transaction_entry'] } } /** Error response. */ @@ -43312,34 +54581,66 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Retrieves a list of Transaction objects.

*/ + GetTreasuryTransactions: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - id: string - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by?: 'created' | 'posted_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status?: 'open' | 'posted' | 'void' + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions?: { + posted_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + } } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43355,23 +54656,22 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves the details of an existing Transaction.

*/ + GetTreasuryTransactionsId: { 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'] + 'application/json': components['schemas']['treasury.transaction'] } } /** Error response. */ @@ -43383,12 +54683,7 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } @@ -43557,6 +54852,7 @@ export interface operations { | '2019-12-03' | '2020-03-02' | '2020-08-27' + | '2022-08-01' /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: boolean /** @description An optional description of what the webhook is used for. */ @@ -43576,7 +54872,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43619,7 +54917,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43658,13 +54962,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43733,16 +55034,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -43828,7 +55162,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43871,7 +55207,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43910,13 +55252,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43985,16 +55324,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] diff --git a/test/v3/expected/stripe.ts b/test/v3/expected/stripe.ts index ce6f74abf..2a8bd2b95 100644 --- a/test/v3/expected/stripe.ts +++ b/test/v3/expected/stripe.ts @@ -4,14 +4,6 @@ */ 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'] @@ -278,6 +270,20 @@ export interface paths { */ post: operations['PostApplicationFeesIdRefunds'] } + '/v1/apps/secrets': { + /**

List all secrets stored on the given scope.

*/ + get: operations['GetAppsSecrets'] + /**

Create or replace a secret in the secret store.

*/ + post: operations['PostAppsSecrets'] + } + '/v1/apps/secrets/delete': { + /**

Deletes a secret from the secret store by name and scope.

*/ + post: operations['PostAppsSecretsDelete'] + } + '/v1/apps/secrets/find': { + /**

Finds a secret in the secret store by name and scope.

*/ + get: operations['GetAppsSecretsFind'] + } '/v1/balance': { /** *

Retrieves the current account balance, based on the authentication that was used to make the request. @@ -333,28 +339,21 @@ export interface paths { /**

Creates a session of the customer portal.

*/ post: operations['PostBillingPortalSessions'] } - '/v1/bitcoin/receivers': { - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - get: operations['GetBitcoinReceivers'] - } - '/v1/bitcoin/receivers/{id}': { - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - get: operations['GetBitcoinReceiversId'] - } - '/v1/bitcoin/receivers/{receiver}/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinReceiversReceiverTransactions'] - } - '/v1/bitcoin/transactions': { - /**

List bitcoin transacitons for a given receiver.

*/ - get: operations['GetBitcoinTransactions'] - } '/v1/charges': { /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ get: operations['GetCharges'] /**

To charge a credit card or other payment source, you create a Charge object. If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged, although everything else will occur as if in live mode. (Stripe assumes that the charge would have completed successfully).

*/ post: operations['PostCharges'] } + '/v1/charges/search': { + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetChargesSearch'] + } '/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'] @@ -502,6 +501,15 @@ export interface paths { /**

Creates a new customer object.

*/ post: operations['PostCustomers'] } + '/v1/customers/search': { + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetCustomersSearch'] + } '/v1/customers/{customer}': { /**

Retrieves a Customer object.

*/ get: operations['GetCustomersCustomer'] @@ -574,15 +582,41 @@ export interface paths { /**

Delete a specified source for a given customer.

*/ delete: operations['DeleteCustomersCustomerCardsId'] } + '/v1/customers/{customer}/cash_balance': { + /**

Retrieves a customer’s cash balance.

*/ + get: operations['GetCustomersCustomerCashBalance'] + /**

Changes the settings on a customer’s cash balance.

*/ + post: operations['PostCustomersCustomerCashBalance'] + } + '/v1/customers/{customer}/cash_balance_transactions': { + /**

Returns a list of transactions that modified the customer’s cash balance.

*/ + get: operations['GetCustomersCustomerCashBalanceTransactions'] + } + '/v1/customers/{customer}/cash_balance_transactions/{transaction}': { + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + get: operations['GetCustomersCustomerCashBalanceTransactionsTransaction'] + } '/v1/customers/{customer}/discount': { get: operations['GetCustomersCustomerDiscount'] /**

Removes the currently applied discount on a customer.

*/ delete: operations['DeleteCustomersCustomerDiscount'] } + '/v1/customers/{customer}/funding_instructions': { + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + post: operations['PostCustomersCustomerFundingInstructions'] + } '/v1/customers/{customer}/payment_methods': { /**

Returns a list of PaymentMethods for a given Customer

*/ get: operations['GetCustomersCustomerPaymentMethods'] } + '/v1/customers/{customer}/payment_methods/{payment_method}': { + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + get: operations['GetCustomersCustomerPaymentMethodsPaymentMethod'] + } '/v1/customers/{customer}/sources': { /**

List sources for a specified customer.

*/ get: operations['GetCustomersCustomerSources'] @@ -716,6 +750,34 @@ export interface paths { /**

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/financial_connections/accounts': { + /**

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetFinancialConnectionsAccounts'] + } + '/v1/financial_connections/accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetFinancialConnectionsAccountsAccount'] + } + '/v1/financial_connections/accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostFinancialConnectionsAccountsAccountDisconnect'] + } + '/v1/financial_connections/accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetFinancialConnectionsAccountsAccountOwners'] + } + '/v1/financial_connections/accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostFinancialConnectionsAccountsAccountRefresh'] + } + '/v1/financial_connections/sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostFinancialConnectionsSessions'] + } + '/v1/financial_connections/sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetFinancialConnectionsSessionsSession'] + } '/v1/identity/verification_reports': { /**

List all verification reports.

*/ get: operations['GetIdentityVerificationReports'] @@ -803,9 +865,18 @@ export interface paths { '/v1/invoices': { /**

You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first.

*/ get: operations['GetInvoices'] - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ post: operations['PostInvoices'] } + '/v1/invoices/search': { + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetInvoicesSearch'] + } '/v1/invoices/upcoming': { /** *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

@@ -863,18 +934,6 @@ export interface paths { /**

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'] @@ -953,22 +1012,42 @@ export interface paths { /**

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/link_account_sessions': { + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + post: operations['PostLinkAccountSessions'] + } + '/v1/link_account_sessions/{session}': { + /**

Retrieves the details of a Financial Connections Session

*/ + get: operations['GetLinkAccountSessionsSession'] + } + '/v1/linked_accounts': { + /**

Returns a list of Financial Connections Account objects.

*/ + get: operations['GetLinkedAccounts'] + } + '/v1/linked_accounts/{account}': { + /**

Retrieves the details of an Financial Connections Account.

*/ + get: operations['GetLinkedAccountsAccount'] + } + '/v1/linked_accounts/{account}/disconnect': { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + post: operations['PostLinkedAccountsAccountDisconnect'] + } + '/v1/linked_accounts/{account}/owners': { + /**

Lists all owners for a given Account

*/ + get: operations['GetLinkedAccountsAccountOwners'] + } + '/v1/linked_accounts/{account}/refresh': { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + post: operations['PostLinkedAccountsAccountRefresh'] + } '/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.

*/ + /**

Creates a new open order object.

*/ post: operations['PostOrders'] } '/v1/orders/{id}': { @@ -977,13 +1056,21 @@ export interface paths { /**

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}/cancel': { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + post: operations['PostOrdersIdCancel'] + } + '/v1/orders/{id}/line_items': { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + get: operations['GetOrdersIdLineItems'] + } + '/v1/orders/{id}/reopen': { + /**

Reopens a submitted order.

*/ + post: operations['PostOrdersIdReopen'] } - '/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/orders/{id}/submit': { + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + post: operations['PostOrdersIdSubmit'] } '/v1/payment_intents': { /**

Returns a list of PaymentIntents.

*/ @@ -1002,6 +1089,15 @@ export interface paths { */ post: operations['PostPaymentIntents'] } + '/v1/payment_intents/search': { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPaymentIntentsSearch'] + } '/v1/payment_intents/{intent}': { /** *

Retrieves the details of a PaymentIntent that has previously been created.

@@ -1022,11 +1118,17 @@ export interface paths { */ post: operations['PostPaymentIntentsIntent'] } + '/v1/payment_intents/{intent}/apply_customer_balance': { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + post: operations['PostPaymentIntentsIntentApplyCustomerBalance'] + } '/v1/payment_intents/{intent}/cancel': { /** *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

* - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ *

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.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

*/ post: operations['PostPaymentIntentsIntentCancel'] } @@ -1070,6 +1172,35 @@ export interface paths { */ post: operations['PostPaymentIntentsIntentConfirm'] } + '/v1/payment_intents/{intent}/increment_authorization': { + /** + *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

+ * + *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

+ * + *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

+ */ + post: operations['PostPaymentIntentsIntentIncrementAuthorization'] + } '/v1/payment_intents/{intent}/verify_microdeposits': { /**

Verifies microdeposits on a PaymentIntent object.

*/ post: operations['PostPaymentIntentsIntentVerifyMicrodeposits'] @@ -1091,7 +1222,7 @@ export interface paths { get: operations['GetPaymentLinksPaymentLinkLineItems'] } '/v1/payment_methods': { - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ get: operations['GetPaymentMethods'] /** *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

@@ -1101,7 +1232,7 @@ export interface paths { post: operations['PostPaymentMethods'] } '/v1/payment_methods/{payment_method}': { - /**

Retrieves a PaymentMethod object.

*/ + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ get: operations['GetPaymentMethodsPaymentMethod'] /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ post: operations['PostPaymentMethodsPaymentMethod'] @@ -1112,9 +1243,11 @@ export interface paths { * *

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.

+ * These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * 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, @@ -1123,7 +1256,7 @@ export interface paths { post: operations['PostPaymentMethodsPaymentMethodAttach'] } '/v1/payment_methods/{payment_method}/detach': { - /**

Detaches a PaymentMethod object from a Customer.

*/ + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ post: operations['PostPaymentMethodsPaymentMethodDetach'] } '/v1/payouts': { @@ -1176,6 +1309,15 @@ export interface paths { /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ post: operations['PostPrices'] } + '/v1/prices/search': { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetPricesSearch'] + } '/v1/prices/{price}': { /**

Retrieves the price with the given ID.

*/ get: operations['GetPricesPrice'] @@ -1188,6 +1330,15 @@ export interface paths { /**

Creates a new product object.

*/ post: operations['PostProducts'] } + '/v1/products/search': { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetProductsSearch'] + } '/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'] @@ -1282,29 +1433,6 @@ export interface paths { /**

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'] @@ -1321,6 +1449,14 @@ export interface paths { */ post: operations['PostRefundsRefund'] } + '/v1/refunds/{refund}/cancel': { + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + post: operations['PostRefundsRefundCancel'] + } '/v1/reporting/report_runs': { /**

Returns a list of Report Runs, with the most recent appearing first.

*/ get: operations['GetReportingReportRuns'] @@ -1533,9 +1669,26 @@ export interface paths { '/v1/subscriptions': { /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ get: operations['GetSubscriptions'] - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ + /** + *

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ post: operations['PostSubscriptions'] } + '/v1/subscriptions/search': { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + get: operations['GetSubscriptionsSearch'] + } '/v1/subscriptions/{subscription_exposed_id}': { /**

Retrieves the subscription with the given ID.

*/ get: operations['GetSubscriptionsSubscriptionExposedId'] @@ -1555,7 +1708,7 @@ export interface paths { delete: operations['DeleteSubscriptionsSubscriptionExposedIdDiscount'] } '/v1/tax_codes': { - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ get: operations['GetTaxCodes'] } '/v1/tax_codes/{id}': { @@ -1574,6 +1727,20 @@ export interface paths { /**

Updates an existing tax rate.

*/ post: operations['PostTaxRatesTaxRate'] } + '/v1/terminal/configurations': { + /**

Returns a list of Configuration objects.

*/ + get: operations['GetTerminalConfigurations'] + /**

Creates a new Configuration object.

*/ + post: operations['PostTerminalConfigurations'] + } + '/v1/terminal/configurations/{configuration}': { + /**

Retrieves a Configuration object.

*/ + get: operations['GetTerminalConfigurationsConfiguration'] + /**

Updates a new Configuration object.

*/ + post: operations['PostTerminalConfigurationsConfiguration'] + /**

Deletes a Configuration object.

*/ + delete: operations['DeleteTerminalConfigurationsConfiguration'] + } '/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'] @@ -1609,6 +1776,110 @@ export interface paths { /**

Deletes a Reader object.

*/ delete: operations['DeleteTerminalReadersReader'] } + '/v1/terminal/readers/{reader}/cancel_action': { + /**

Cancels the current reader action.

*/ + post: operations['PostTerminalReadersReaderCancelAction'] + } + '/v1/terminal/readers/{reader}/process_payment_intent': { + /**

Initiates a payment flow on a Reader.

*/ + post: operations['PostTerminalReadersReaderProcessPaymentIntent'] + } + '/v1/terminal/readers/{reader}/process_setup_intent': { + /**

Initiates a setup intent flow on a Reader.

*/ + post: operations['PostTerminalReadersReaderProcessSetupIntent'] + } + '/v1/terminal/readers/{reader}/set_reader_display': { + /**

Sets reader display to show cart details.

*/ + post: operations['PostTerminalReadersReaderSetReaderDisplay'] + } + '/v1/test_helpers/customers/{customer}/fund_cash_balance': { + /**

Create an incoming testmode bank transfer

*/ + post: operations['PostTestHelpersCustomersCustomerFundCashBalance'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/deliver': { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingDeliver'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/fail': { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingFail'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/return': { + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingReturn'] + } + '/v1/test_helpers/issuing/cards/{card}/shipping/ship': { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + post: operations['PostTestHelpersIssuingCardsCardShippingShip'] + } + '/v1/test_helpers/refunds/{refund}/expire': { + /**

Expire a refund with a status of requires_action.

*/ + post: operations['PostTestHelpersRefundsRefundExpire'] + } + '/v1/test_helpers/terminal/readers/{reader}/present_payment_method': { + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + post: operations['PostTestHelpersTerminalReadersReaderPresentPaymentMethod'] + } + '/v1/test_helpers/test_clocks': { + /**

Returns a list of your test clocks.

*/ + get: operations['GetTestHelpersTestClocks'] + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + post: operations['PostTestHelpersTestClocks'] + } + '/v1/test_helpers/test_clocks/{test_clock}': { + /**

Retrieves a test clock.

*/ + get: operations['GetTestHelpersTestClocksTestClock'] + /**

Deletes a test clock.

*/ + delete: operations['DeleteTestHelpersTestClocksTestClock'] + } + '/v1/test_helpers/test_clocks/{test_clock}/advance': { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + post: operations['PostTestHelpersTestClocksTestClockAdvance'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/fail': { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdFail'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/return': { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdReturn'] + } + '/v1/test_helpers/treasury/inbound_transfers/{id}/succeed': { + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryInboundTransfersIdSucceed'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/fail': { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdFail'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/post': { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdPost'] + } + '/v1/test_helpers/treasury/outbound_payments/{id}/return': { + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundPaymentsIdReturn'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail': { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post': { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost'] + } + '/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return': { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + post: operations['PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn'] + } + '/v1/test_helpers/treasury/received_credits': { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedCredits'] + } + '/v1/test_helpers/treasury/received_debits': { + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + post: operations['PostTestHelpersTreasuryReceivedDebits'] + } '/v1/tokens': { /** *

Creates a single-use token that represents a bank account’s details. @@ -1674,6 +1945,118 @@ export interface paths { */ post: operations['PostTransfersTransferReversalsId'] } + '/v1/treasury/credit_reversals': { + /**

Returns a list of CreditReversals.

*/ + get: operations['GetTreasuryCreditReversals'] + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + post: operations['PostTreasuryCreditReversals'] + } + '/v1/treasury/credit_reversals/{credit_reversal}': { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + get: operations['GetTreasuryCreditReversalsCreditReversal'] + } + '/v1/treasury/debit_reversals': { + /**

Returns a list of DebitReversals.

*/ + get: operations['GetTreasuryDebitReversals'] + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + post: operations['PostTreasuryDebitReversals'] + } + '/v1/treasury/debit_reversals/{debit_reversal}': { + /**

Retrieves a DebitReversal object.

*/ + get: operations['GetTreasuryDebitReversalsDebitReversal'] + } + '/v1/treasury/financial_accounts': { + /**

Returns a list of FinancialAccounts.

*/ + get: operations['GetTreasuryFinancialAccounts'] + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccounts'] + } + '/v1/treasury/financial_accounts/{financial_account}': { + /**

Retrieves the details of a FinancialAccount.

*/ + get: operations['GetTreasuryFinancialAccountsFinancialAccount'] + /**

Updates the details of a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccount'] + } + '/v1/treasury/financial_accounts/{financial_account}/features': { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + get: operations['GetTreasuryFinancialAccountsFinancialAccountFeatures'] + /**

Updates the Features associated with a FinancialAccount.

*/ + post: operations['PostTreasuryFinancialAccountsFinancialAccountFeatures'] + } + '/v1/treasury/inbound_transfers': { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryInboundTransfers'] + /**

Creates an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfers'] + } + '/v1/treasury/inbound_transfers/{id}': { + /**

Retrieves the details of an existing InboundTransfer.

*/ + get: operations['GetTreasuryInboundTransfersId'] + } + '/v1/treasury/inbound_transfers/{inbound_transfer}/cancel': { + /**

Cancels an InboundTransfer.

*/ + post: operations['PostTreasuryInboundTransfersInboundTransferCancel'] + } + '/v1/treasury/outbound_payments': { + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryOutboundPayments'] + /**

Creates an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPayments'] + } + '/v1/treasury/outbound_payments/{id}': { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + get: operations['GetTreasuryOutboundPaymentsId'] + } + '/v1/treasury/outbound_payments/{id}/cancel': { + /**

Cancel an OutboundPayment.

*/ + post: operations['PostTreasuryOutboundPaymentsIdCancel'] + } + '/v1/treasury/outbound_transfers': { + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + get: operations['GetTreasuryOutboundTransfers'] + /**

Creates an OutboundTransfer.

*/ + post: operations['PostTreasuryOutboundTransfers'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}': { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + get: operations['GetTreasuryOutboundTransfersOutboundTransfer'] + } + '/v1/treasury/outbound_transfers/{outbound_transfer}/cancel': { + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + post: operations['PostTreasuryOutboundTransfersOutboundTransferCancel'] + } + '/v1/treasury/received_credits': { + /**

Returns a list of ReceivedCredits.

*/ + get: operations['GetTreasuryReceivedCredits'] + } + '/v1/treasury/received_credits/{id}': { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + get: operations['GetTreasuryReceivedCreditsId'] + } + '/v1/treasury/received_debits': { + /**

Returns a list of ReceivedDebits.

*/ + get: operations['GetTreasuryReceivedDebits'] + } + '/v1/treasury/received_debits/{id}': { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + get: operations['GetTreasuryReceivedDebitsId'] + } + '/v1/treasury/transaction_entries': { + /**

Retrieves a list of TransactionEntry objects.

*/ + get: operations['GetTreasuryTransactionEntries'] + } + '/v1/treasury/transaction_entries/{id}': { + /**

Retrieves a TransactionEntry object.

*/ + get: operations['GetTreasuryTransactionEntriesId'] + } + '/v1/treasury/transactions': { + /**

Retrieves a list of Transaction objects.

*/ + get: operations['GetTreasuryTransactions'] + } + '/v1/treasury/transactions/{id}': { + /**

Retrieves the details of an existing Transaction.

*/ + get: operations['GetTreasuryTransactionsId'] + } '/v1/webhook_endpoints': { /**

Returns a list of your webhook endpoints.

*/ get: operations['GetWebhookEndpoints'] @@ -1718,7 +2101,7 @@ export interface components { country?: string /** * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description Time at which the account was connected. Measured in seconds since the Unix epoch. */ created?: number /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ @@ -1809,6 +2192,11 @@ export interface components { * @enum {string} */ acss_debit_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + * @enum {string} + */ + affirm_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. * @enum {string} @@ -1829,6 +2217,16 @@ export interface components { * @enum {string} */ bancontact_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + * @enum {string} + */ + bank_transfer_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the blik payments capability of the account, or whether the account can directly process blik charges. + * @enum {string} + */ + blik_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. * @enum {string} @@ -1884,11 +2282,21 @@ export interface components { * @enum {string} */ klarna_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + * @enum {string} + */ + konbini_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the legacy payments capability of the account. * @enum {string} */ legacy_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the link_payments capability of the account, or whether the account can directly process Link charges. + * @enum {string} + */ + link_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. * @enum {string} @@ -1899,6 +2307,16 @@ export interface components { * @enum {string} */ p24_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + * @enum {string} + */ + paynow_payments?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + * @enum {string} + */ + promptpay_payments?: 'active' | 'inactive' | 'pending' /** * @description The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. * @enum {string} @@ -1924,6 +2342,16 @@ export interface components { * @enum {string} */ transfers?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the banking capability, or whether the account can have bank accounts. + * @enum {string} + */ + treasury?: 'active' | 'inactive' | 'pending' + /** + * @description The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + * @enum {string} + */ + us_bank_account_ach_payments?: 'active' | 'inactive' | 'pending' } /** AccountCapabilityFutureRequirements */ account_capability_future_requirements: { @@ -1986,6 +2414,10 @@ export interface components { decline_on?: components['schemas']['account_decline_charge_on'] /** @description The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. */ statement_descriptor_prefix?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountDashboardSettings */ account_dashboard_settings: { @@ -2057,6 +2489,10 @@ export interface components { statement_descriptor_kana?: string | null /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only) */ statement_descriptor_kanji?: string | null + /** @description The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kana?: string | null + /** @description The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. */ + statement_descriptor_prefix_kanji?: string | null } /** AccountPayoutSettings */ account_payout_settings: { @@ -2104,6 +2540,7 @@ export interface components { code: | 'invalid_address_city_state_postal_code' | 'invalid_street_address' + | 'invalid_tos_acceptance' | 'invalid_value_other' | 'verification_document_address_mismatch' | 'verification_document_address_missing' @@ -2167,6 +2604,16 @@ export interface components { payments: components['schemas']['account_payments_settings'] payouts?: components['schemas']['account_payout_settings'] sepa_debit_payments?: components['schemas']['account_sepa_debit_payments_settings'] + treasury?: components['schemas']['account_treasury_settings'] + } + /** AccountTermsOfService */ + account_terms_of_service: { + /** @description The Unix timestamp marking when the account representative accepted the service agreement. */ + date?: number | null + /** @description The IP address from which the account representative accepted the service agreement. */ + ip?: string | null + /** @description The user agent of the browser from which the account representative accepted the service agreement. */ + user_agent?: string } /** AccountTOSAcceptance */ account_tos_acceptance: { @@ -2182,6 +2629,10 @@ export interface components { /** @description The user agent of the browser from which the account representative accepted their service agreement */ user_agent?: string | null } + /** AccountTreasurySettings */ + account_treasury_settings: { + tos_acceptance?: components['schemas']['account_terms_of_service'] + } /** AccountUnificationAccountController */ account_unification_account_controller: { /** @description `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. */ @@ -2207,39 +2658,6 @@ export interface components { /** @description State, county, province, or region. */ state?: string | null } - /** AlipayAccount */ - alipay_account: { - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The ID of the customer associated with this Alipay Account. */ - customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description Uniquely identifies the account and will be the same across all Alipay account objects that are linked to the same Alipay account. */ - fingerprint: string - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'alipay_account' - /** @description If the Alipay account object is not reusable, the exact amount that you can create a charge for. */ - payment_amount?: number | null - /** @description If the Alipay account object is not reusable, the exact currency that you can create a charge for. */ - payment_currency?: string | null - /** @description True if you can create multiple payments using this account. If the account is reusable, then you can freely choose the amount of each payment. */ - reusable: boolean - /** @description Whether this Alipay account object has ever been used for a payment. */ - used: boolean - /** @description The username for the Alipay account. */ - username: string - } /** APIErrors */ api_errors: { /** @description For card errors, the ID of the failed charge. */ @@ -2349,9 +2767,49 @@ export interface components { url: string } } + /** + * SecretServiceResourceSecret + * @description Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + * + * The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + * + * All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + * + * A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + * + * Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + */ + 'apps.secret': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description If true, indicates that this secret has been deleted */ + deleted?: boolean + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'apps.secret' + /** @description The plaintext secret value to be stored. */ + payload?: string | null + scope: components['schemas']['secret_service_resource_scope'] + } /** AutomaticTax */ automatic_tax: { - /** @description Whether Stripe automatically computes tax on this invoice. */ + /** @description Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. */ enabled: boolean /** * @description The status of the most recent automated tax calculation for this invoice. @@ -2569,6 +3027,94 @@ export interface components { */ status: string } + /** BankConnectionsResourceAccountholder */ + bank_connections_resource_accountholder: { + /** @description The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. */ + account?: string | components['schemas']['account'] + /** @description ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. */ + customer?: string | components['schemas']['customer'] + /** + * @description Type of account holder that this account belongs to. + * @enum {string} + */ + type: 'account' | 'customer' + } + /** BankConnectionsResourceBalance */ + bank_connections_resource_balance: { + /** + * Format: unix-time + * @description The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + */ + as_of: number + cash?: components['schemas']['bank_connections_resource_balance_api_resource_cash_balance'] + credit?: components['schemas']['bank_connections_resource_balance_api_resource_credit_balance'] + /** + * @description The balances owed to (or by) the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + current: { [key: string]: number } + /** + * @description The `type` of the balance. An additional hash is included on the balance with a name matching this value. + * @enum {string} + */ + type: 'cash' | 'credit' + } + /** BankConnectionsResourceBalanceAPIResourceCashBalance */ + bank_connections_resource_balance_api_resource_cash_balance: { + /** + * @description The funds available to the account holder. Typically this is the current balance less any holds. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + available?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceAPIResourceCreditBalance */ + bank_connections_resource_balance_api_resource_credit_balance: { + /** + * @description The credit that has been used by the account holder. + * + * Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + * + * Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + */ + used?: { [key: string]: number } | null + } + /** BankConnectionsResourceBalanceRefresh */ + bank_connections_resource_balance_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } + /** BankConnectionsResourceLinkAccountSessionFilters */ + bank_connections_resource_link_account_session_filters: { + /** @description List of countries from which to filter accounts. */ + countries?: string[] | null + } + /** BankConnectionsResourceOwnershipRefresh */ + bank_connections_resource_ownership_refresh: { + /** + * Format: unix-time + * @description The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + */ + last_attempted_at: number + /** + * @description The status of the last refresh attempt. + * @enum {string} + */ + status: 'failed' | 'pending' | 'succeeded' + } /** billing_details */ billing_details: { /** @description Billing address. */ @@ -2588,7 +3134,7 @@ export interface components { /** @description Whether the configuration is active and can be used to create portal sessions. */ active: boolean /** @description ID of the Connect Application that created the configuration. */ - application?: string | null + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null business_profile: components['schemas']['portal_business_profile'] /** * Format: unix-time @@ -2604,6 +3150,7 @@ export interface components { is_default: boolean /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + login_page: components['schemas']['portal_login_page'] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null /** @@ -2711,101 +3258,10 @@ export interface components { /** @description The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. */ on_behalf_of?: string | null /** @description The URL to redirect customers to when they click on the portal's link to return to your website. */ - return_url: string + return_url?: string | null /** @description The short-lived URL of the session that gives customers access to the customer portal. */ url: string } - /** BitcoinReceiver */ - bitcoin_receiver: { - /** @description True when this bitcoin receiver has received a non-zero amount of bitcoin. */ - active: boolean - /** @description The amount of `currency` that you are collecting as payment. */ - amount: number - /** @description The amount of `currency` to which `bitcoin_amount_received` has been converted. */ - amount_received: number - /** @description The amount of bitcoin that the customer should send to fill the receiver. The `bitcoin_amount` is denominated in Satoshi: there are 10^8 Satoshi in one bitcoin. */ - bitcoin_amount: number - /** @description The amount of bitcoin that has been sent by the customer to this receiver. */ - bitcoin_amount_received: number - /** @description This URI can be displayed to the customer as a clickable link (to activate their bitcoin client) or as a QR code (for mobile wallets). */ - bitcoin_uri: string - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which the bitcoin will be converted. */ - currency: string - /** @description The customer ID of the bitcoin receiver. */ - customer?: string | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - /** @description The customer's email address, set by the API call that creates the receiver. */ - email?: string | null - /** @description This flag is initially false and updates to true when the customer sends the `bitcoin_amount` to this receiver. */ - filled: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description A bitcoin address that is specific to this receiver. The customer can send bitcoin to this address to fill the receiver. */ - inbound_address: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - /** @description The ID of the payment created from the receiver, if any. Hidden when viewing the receiver with a publishable key. */ - payment?: string | null - /** @description The refund address of this bitcoin receiver. */ - refund_address?: string | null - /** - * BitcoinTransactionList - * @description A list with one entry for each time that the customer sent bitcoin to the receiver. Hidden when viewing the receiver with a publishable key. - */ - transactions?: { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - /** @description This receiver contains uncaptured funds that can be used for a payment or refunded. */ - uncaptured_funds: boolean - /** @description Indicate if this source is used for payment. */ - used_for_payment?: boolean | null - } - /** BitcoinTransaction */ - bitcoin_transaction: { - /** @description The amount of `currency` that the transaction was converted to in real-time. */ - amount: number - /** @description The amount of bitcoin contained in the transaction. */ - bitcoin_amount: number - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) to which this transaction was converted. */ - currency: string - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_transaction' - /** @description The receiver to which this transaction was sent. */ - receiver: string - } /** * AccountCapability * @description This is an object representing a capability for a Stripe account. @@ -2905,8 +3361,8 @@ export interface components { * @enum {string} */ object: 'card' - /** @description The recipient that this card belongs to. This attribute will not be in the card object if the card belongs to a customer or account instead. */ - recipient?: (string | components['schemas']['recipient']) | null + /** @description For external accounts, possible values are `new` and `errored`. If a transfer fails, the status is set to `errored` and transfers are stopped until account details are updated. */ + status?: string | null /** @description If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. */ tokenization_method?: string | null } @@ -2927,6 +3383,24 @@ export interface components { } /** card_mandate_payment_method_details */ card_mandate_payment_method_details: { [key: string]: unknown } + /** + * cash_balance + * @description A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. + */ + cash_balance: { + /** @description A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + available?: { [key: string]: number } | null + /** @description The ID of the customer whose cash balance this object represents. */ + customer: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'cash_balance' + settings: components['schemas']['customer_balance_customer_balance_settings'] + } /** * Charge * @description To charge a credit or a debit card, you create a `Charge` object. You can @@ -2968,6 +3442,8 @@ export interface components { description?: string | null /** @description Whether the charge has been disputed. */ disputed: boolean + /** @description ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. */ + failure_balance_transaction?: (string | components['schemas']['balance_transaction']) | null /** @description Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). */ failure_code?: string | null /** @description Message to user further explaining reason for charge failure if available. */ @@ -2989,8 +3465,6 @@ export interface components { object: 'charge' /** @description The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null - /** @description ID of the order this charge is for if one exists. */ - order?: (string | components['schemas']['order']) | null /** @description Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. */ outcome?: components['schemas']['charge_outcome'] | null /** @description `true` if the charge succeeded, or was successfully authorized for later capture. */ @@ -3001,6 +3475,7 @@ export interface components { payment_method?: string | null /** @description Details about the payment method at the time of the transaction. */ payment_method_details?: components['schemas']['payment_method_details'] | null + radar_options?: components['schemas']['radar_radar_options'] /** @description This is the email address that the receipt for this charge was sent to. */ receipt_email?: string | null /** @description This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. */ @@ -3013,7 +3488,7 @@ export interface components { * RefundList * @description A list of refunds that have been applied to the charge. */ - refunds: { + refunds?: { /** @description Details about each object. */ data: components['schemas']['refund'][] /** @description True if this list has another page of items after this one that can be fetched. */ @@ -3094,7 +3569,7 @@ export interface components { * 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). + * Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). */ 'checkout.session': { /** @description When set, provides configuration for actions to take if this Checkout Session expires. */ @@ -3123,6 +3598,11 @@ export interface components { consent?: components['schemas']['payment_pages_checkout_session_consent'] | null /** @description When set, provides configuration for the Checkout Session to gather active consent from customers. */ consent_collection?: components['schemas']['payment_pages_checkout_session_consent_collection'] | null + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string | null /** @@ -3138,7 +3618,7 @@ export interface components { * @enum {string|null} */ customer_creation?: ('always' | 'if_required') | null - /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode. */ + /** @description The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode. */ customer_details?: components['schemas']['payment_pages_checkout_session_customer_details'] | null /** * @description If provided, this value will be used when the Customer object is created. @@ -3242,6 +3722,11 @@ export interface components { payment_intent?: (string | components['schemas']['payment_intent']) | null /** @description The ID of the Payment Link that created this Session. */ payment_link?: (string | components['schemas']['payment_link']) | null + /** + * @description Configure whether a Checkout Session should collect a payment method. + * @enum {string|null} + */ + payment_method_collection?: ('always' | 'if_required') | null /** @description Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. */ payment_method_options?: components['schemas']['checkout_session_payment_method_options'] | null /** @@ -3260,14 +3745,14 @@ export interface components { recovered_from?: string | null /** @description The ID of the SetupIntent for Checkout Sessions in `setup` mode. */ setup_intent?: (string | components['schemas']['setup_intent']) | null - /** @description Shipping information for this Checkout Session. */ - shipping?: components['schemas']['shipping'] | null /** @description When set, provides configuration for Checkout to collect a shipping address from a customer. */ shipping_address_collection?: components['schemas']['payment_pages_checkout_session_shipping_address_collection'] | null + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['payment_pages_checkout_session_shipping_cost'] | null + /** @description Shipping information for this Checkout Session. */ + shipping_details?: components['schemas']['shipping'] | null /** @description The shipping rate options applied to this Session. */ shipping_options: components['schemas']['payment_pages_checkout_session_shipping_option'][] - /** @description The ID of the ShippingRate for Checkout Sessions in `payment` mode. */ - shipping_rate?: (string | components['schemas']['shipping_rate']) | null /** * @description The status of the Checkout Session, one of `open`, `complete`, or `expired`. * @enum {string|null} @@ -3291,7 +3776,10 @@ export interface components { tax_id_collection?: components['schemas']['payment_pages_checkout_session_tax_id_collection'] /** @description Tax and discount details for the computed total amount. */ total_details?: components['schemas']['payment_pages_checkout_session_total_details'] | null - /** @description The URL to the Checkout Session. */ + /** + * @description The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + * This value is only present when the session is active. + */ url?: string | null } /** CheckoutAcssDebitMandateOptions */ @@ -3321,27 +3809,359 @@ export interface components { */ currency?: 'cad' | 'usd' mandate_options?: components['schemas']['checkout_acss_debit_mandate_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** CheckoutAffirmPaymentMethodOptions */ + checkout_affirm_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAfterpayClearpayPaymentMethodOptions */ + checkout_afterpay_clearpay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAlipayPaymentMethodOptions */ + checkout_alipay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutAuBecsDebitPaymentMethodOptions */ + checkout_au_becs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutBacsDebitPaymentMethodOptions */ + checkout_bacs_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutBancontactPaymentMethodOptions */ + checkout_bancontact_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** CheckoutBoletoPaymentMethodOptions */ checkout_boleto_payment_method_options: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutCardInstallmentsOptions */ + checkout_card_installments_options: { + /** @description Indicates if installments are enabled */ + enabled?: boolean + } + /** CheckoutCardPaymentMethodOptions */ + checkout_card_payment_method_options: { + installments?: components['schemas']['checkout_card_installments_options'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string + } + /** CheckoutCustomerBalanceBankTransferPaymentMethodOptions */ + checkout_customer_balance_bank_transfer_payment_method_options: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** CheckoutCustomerBalancePaymentMethodOptions */ + checkout_customer_balance_payment_method_options: { + bank_transfer?: components['schemas']['checkout_customer_balance_bank_transfer_payment_method_options'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutEpsPaymentMethodOptions */ + checkout_eps_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutFpxPaymentMethodOptions */ + checkout_fpx_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGiropayPaymentMethodOptions */ + checkout_giropay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutGrabPayPaymentMethodOptions */ + checkout_grab_pay_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutIdealPaymentMethodOptions */ + checkout_ideal_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutKlarnaPaymentMethodOptions */ + checkout_klarna_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** CheckoutKonbiniPaymentMethodOptions */ + checkout_konbini_payment_method_options: { + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** CheckoutOxxoPaymentMethodOptions */ checkout_oxxo_payment_method_options: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutP24PaymentMethodOptions */ + checkout_p24_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPaynowPaymentMethodOptions */ + checkout_paynow_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutPixPaymentMethodOptions */ + checkout_pix_payment_method_options: { + /** @description The number of seconds after which Pix payment will expire. */ + expires_after_seconds?: number | null + } + /** CheckoutSepaDebitPaymentMethodOptions */ + checkout_sepa_debit_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** CheckoutSessionPaymentMethodOptions */ checkout_session_payment_method_options: { acss_debit?: components['schemas']['checkout_acss_debit_payment_method_options'] + affirm?: components['schemas']['checkout_affirm_payment_method_options'] + afterpay_clearpay?: components['schemas']['checkout_afterpay_clearpay_payment_method_options'] + alipay?: components['schemas']['checkout_alipay_payment_method_options'] + au_becs_debit?: components['schemas']['checkout_au_becs_debit_payment_method_options'] + bacs_debit?: components['schemas']['checkout_bacs_debit_payment_method_options'] + bancontact?: components['schemas']['checkout_bancontact_payment_method_options'] boleto?: components['schemas']['checkout_boleto_payment_method_options'] + card?: components['schemas']['checkout_card_payment_method_options'] + customer_balance?: components['schemas']['checkout_customer_balance_payment_method_options'] + eps?: components['schemas']['checkout_eps_payment_method_options'] + fpx?: components['schemas']['checkout_fpx_payment_method_options'] + giropay?: components['schemas']['checkout_giropay_payment_method_options'] + grabpay?: components['schemas']['checkout_grab_pay_payment_method_options'] + ideal?: components['schemas']['checkout_ideal_payment_method_options'] + klarna?: components['schemas']['checkout_klarna_payment_method_options'] + konbini?: components['schemas']['checkout_konbini_payment_method_options'] oxxo?: components['schemas']['checkout_oxxo_payment_method_options'] + p24?: components['schemas']['checkout_p24_payment_method_options'] + paynow?: components['schemas']['checkout_paynow_payment_method_options'] + pix?: components['schemas']['checkout_pix_payment_method_options'] + sepa_debit?: components['schemas']['checkout_sepa_debit_payment_method_options'] + sofort?: components['schemas']['checkout_sofort_payment_method_options'] + us_bank_account?: components['schemas']['checkout_us_bank_account_payment_method_options'] + } + /** CheckoutSofortPaymentMethodOptions */ + checkout_sofort_payment_method_options: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** CheckoutUsBankAccountPaymentMethodOptions */ + checkout_us_bank_account_payment_method_options: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' } /** ConnectCollectionTransfer */ connect_collection_transfer: { @@ -3405,8 +4225,8 @@ export interface components { /** * Coupon * @description A coupon contains information about a percent-off or amount-off discount you - * might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - * [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + * might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + * [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). */ coupon: { /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ @@ -3419,6 +4239,8 @@ export interface components { created: number /** @description If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. */ currency?: string | null + /** @description Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['coupon_currency_option'] } /** * @description One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. * @enum {string} @@ -3458,6 +4280,11 @@ export interface components { /** @description A list of product IDs this coupon applies to */ products: string[] } + /** CouponCurrencyOption */ + coupon_currency_option: { + /** @description Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. */ + amount_off: number + } /** * CreditNote * @description Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -3532,12 +4359,16 @@ export interface components { * @enum {string} */ status: 'issued' | 'void' - /** @description The integer amount in %s representing the amount of the credit note, excluding tax and invoice level discounts. */ + /** @description The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts. */ subtotal: number + /** @description The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts. */ + subtotal_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ tax_amounts: components['schemas']['credit_note_tax_amount'][] /** @description The integer amount in %s representing the total amount of the credit note, including tax and all discount. */ total: number + /** @description The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts. */ + total_excluding_tax?: number | null /** * @description Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. * @enum {string} @@ -3553,6 +4384,8 @@ export interface components { credit_note_line_item: { /** @description The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. */ amount: number + /** @description The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Description of the item being credited. */ description?: string | null /** @description The integer amount in %s representing the discount being credited for this line item. */ @@ -3588,6 +4421,11 @@ export interface components { * @description Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. */ unit_amount_decimal?: string | null + /** + * Format: decimal + * @description The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** CreditNoteTaxAmount */ credit_note_tax_amount: { @@ -3598,6 +4436,34 @@ export interface components { /** @description The tax rate that was applied to get this tax amount. */ tax_rate: string | components['schemas']['tax_rate'] } + /** CurrencyOption */ + currency_option: { + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null + /** + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string|null} + */ + tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: components['schemas']['price_tier'][] + /** @description The unit amount in %s to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. */ + unit_amount?: number | null + /** + * Format: decimal + * @description The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + */ + unit_amount_decimal?: string | null + } + /** CustomUnitAmount */ + custom_unit_amount: { + /** @description The maximum unit amount the customer can specify for this item. */ + maximum?: number | null + /** @description The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. */ + minimum?: number | null + /** @description The starting unit amount which can be updated by the customer. */ + preset?: number | null + } /** * Customer * @description This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -3609,6 +4475,8 @@ export interface components { address?: components['schemas']['address'] | null /** @description Current balance, if any, being stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that will be added to their next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. */ balance?: number + /** @description The current funds being held by Stripe on behalf of the customer. These funds can be applied towards payment intents with source "cash_balance".The settings[reconciliation_mode] field describes whether these funds are applied to such payment intents manually or automatically. */ + cash_balance?: components['schemas']['cash_balance'] | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -3621,16 +4489,7 @@ 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?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** * @description When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. * @@ -3645,6 +4504,8 @@ export interface components { email?: string | null /** @description Unique identifier for the object. */ id: string + /** @description The current multi-currency balances, if any, being stored on the customer.If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency.If negative, the customer has an amount owed that will be added to their next invoice denominated in that currency. These balances do not refer to any unpaid invoices.They solely track amounts that have yet to be successfully applied to any invoice. A balance in a particular currency is only applied to any invoice as an invoice in that currency is finalized. */ + invoice_credit_balance?: { [key: string]: number } /** @description The prefix for the customer used to generate unique invoice numbers. */ invoice_prefix?: string | null invoice_settings?: components['schemas']['invoice_setting_customer_setting'] @@ -3673,13 +4534,7 @@ export interface components { */ sources?: { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -3730,6 +4585,8 @@ export interface components { /** @description The URL where this list can be accessed. */ url: string } + /** @description ID of the test clock this customer belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** customer_acceptance */ customer_acceptance: { @@ -3746,6 +4603,53 @@ export interface components { */ type: 'offline' | 'online' } + /** CustomerBalanceCustomerBalanceSettings */ + customer_balance_customer_balance_settings: { + /** + * @description The configuration for how funds that land in the customer cash balance are reconciled. + * @enum {string} + */ + reconciliation_mode: 'automatic' | 'manual' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. */ + payment_intent: string | components['schemas']['payment_intent'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: { + bank_transfer: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: { + eu_bank_transfer?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer'] + /** @description The user-supplied reference field on the bank transfer. */ + reference?: string | null + /** + * @description The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer */ + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: { + /** @description The BIC of the bank of the sender of the funding. */ + bic?: string | null + /** @description The last 4 digits of the IBAN of the sender of the funding. */ + iban_last4?: string | null + /** @description The full name of the sender, as supplied by the sending bank. */ + sender_name?: string | null + } + /** CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: { + /** @description The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. */ + refund: string | components['schemas']['refund'] + } + /** CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction */ + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: { + /** @description The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. */ + payment_intent: string | components['schemas']['payment_intent'] + } /** * CustomerBalanceTransaction * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, @@ -3801,6 +4705,46 @@ export interface components { | 'unapplied_from_invoice' | 'unspent_receiver_credit' } + /** + * CustomerCashBalanceTransaction + * @description Customers with certain payments enabled have a cash balance, representing funds that were paid + * by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + * represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + * to payments, and refunds to the customer. + */ + customer_cash_balance_transaction: { + applied_to_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The customer whose available cash balance changed as a result of this transaction. */ + customer: string | components['schemas']['customer'] + /** @description The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + ending_balance: number + funded?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_funded_transaction'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. */ + net_amount: number + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'customer_cash_balance_transaction' + refunded_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction'] + /** + * @description The type of the cash balance transaction. One of `applied_to_payment`, `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, or `return_canceled`. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + * @enum {string} + */ + type: 'applied_to_payment' | 'funded' | 'refunded_from_payment' | 'return_canceled' | 'return_initiated' | 'unapplied_from_payment' + unapplied_from_payment?: components['schemas']['customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction'] + } /** CustomerTax */ customer_tax: { /** @@ -3840,8 +4784,8 @@ export interface components { */ object: 'account' } - /** AlipayDeletedAccount */ - deleted_alipay_account: { + /** DeletedApplePayDomain */ + deleted_apple_pay_domain: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3853,10 +4797,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'alipay_account' + object: 'apple_pay_domain' } - /** DeletedApplePayDomain */ - deleted_apple_pay_domain: { + /** DeletedApplication */ + deleted_application: { /** * @description Always true for a deleted object * @enum {boolean} @@ -3864,11 +4808,13 @@ export interface components { deleted: true /** @description Unique identifier for the object. */ id: string + /** @description The name of the application. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'apple_pay_domain' + object: 'application' } /** DeletedBankAccount */ deleted_bank_account: { @@ -3887,21 +4833,6 @@ export interface components { */ object: 'bank_account' } - /** BitcoinDeletedReceiver */ - deleted_bitcoin_receiver: { - /** - * @description Always true for a deleted object - * @enum {boolean} - */ - deleted: true - /** @description Unique identifier for the object. */ - id: string - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'bitcoin_receiver' - } /** DeletedCard */ deleted_card: { /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. */ @@ -4015,11 +4946,7 @@ export interface components { object: 'invoiceitem' } /** Polymorphic */ - deleted_payment_source: - | components['schemas']['deleted_alipay_account'] - | components['schemas']['deleted_bank_account'] - | components['schemas']['deleted_bitcoin_receiver'] - | components['schemas']['deleted_card'] + deleted_payment_source: components['schemas']['deleted_bank_account'] | components['schemas']['deleted_card'] /** DeletedPerson */ deleted_person: { /** @@ -4110,8 +5037,8 @@ export interface components { */ object: 'radar.value_list_item' } - /** DeletedTransferRecipient */ - deleted_recipient: { + /** DeletedSku */ + deleted_sku: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4123,10 +5050,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'recipient' + object: 'sku' } - /** DeletedSku */ - deleted_sku: { + /** DeletedSubscriptionItem */ + deleted_subscription_item: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4138,10 +5065,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'sku' + object: 'subscription_item' } - /** DeletedSubscriptionItem */ - deleted_subscription_item: { + /** deleted_tax_id */ + deleted_tax_id: { /** * @description Always true for a deleted object * @enum {boolean} @@ -4153,10 +5080,10 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'subscription_item' + object: 'tax_id' } - /** deleted_tax_id */ - deleted_tax_id: { + /** TerminalConfigurationDeletedConfiguration */ + 'deleted_terminal.configuration': { /** * @description Always true for a deleted object * @enum {boolean} @@ -4168,7 +5095,7 @@ export interface components { * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'tax_id' + object: 'terminal.configuration' } /** TerminalLocationDeletedLocation */ 'deleted_terminal.location': { @@ -4200,6 +5127,21 @@ export interface components { */ object: 'terminal.reader' } + /** DeletedTestClock */ + 'deleted_test_helpers.test_clock': { + /** + * @description Always true for a deleted object + * @enum {boolean} + */ + deleted: true + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'test_helpers.test_clock' + } /** NotificationWebhookEndpointDeleted */ deleted_webhook_endpoint: { /** @@ -4215,22 +5157,10 @@ export interface components { */ object: 'webhook_endpoint' } - /** DeliveryEstimate */ - delivery_estimate: { - /** @description If `type` is `"exact"`, `date` will be the expected delivery date in the format YYYY-MM-DD. */ - date?: string - /** @description If `type` is `"range"`, `earliest` will be be the earliest delivery date in the format YYYY-MM-DD. */ - earliest?: string - /** @description If `type` is `"range"`, `latest` will be the latest delivery date in the format YYYY-MM-DD. */ - latest?: string - /** @description The type of estimate. Must be either `"range"` or `"exact"`. */ - type: string - } /** * Discount - * @description A discount represents the actual application of a coupon to a particular - * customer. It contains information about when the discount began and when it - * will end. + * @description A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + * It contains information about when the discount began, when it will end, and what it is applied to. * * Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). */ @@ -4401,6 +5331,16 @@ export interface components { /** @description The number of times evidence has been submitted. Typically, you may only submit evidence once. */ submission_count: number } + /** EmailSent */ + email_sent: { + /** + * Format: unix-time + * @description The timestamp when the email was sent. + */ + email_sent_at: number + /** @description The recipient's email address. */ + email_sent_to: string + } /** EphemeralKey */ ephemeral_key: { /** @@ -4626,6 +5566,7 @@ export interface components { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** @description The size in bytes of the file object. */ size: number /** @description A user friendly title for the document. */ @@ -4670,6 +5611,175 @@ export interface components { /** @description The publicly accessible URL to download the file. */ url?: string | null } + /** + * BankConnectionsResourceLinkedAccount + * @description A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. + */ + 'financial_connections.account': { + /** @description The account holder that this account belongs to. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** @description The most recent information about the account's balance. */ + balance?: components['schemas']['bank_connections_resource_balance'] | null + /** @description The state of the most recent attempt to refresh the account balance. */ + balance_refresh?: components['schemas']['bank_connections_resource_balance_refresh'] | null + /** + * @description The type of the account. Account category is further divided in `subcategory`. + * @enum {string} + */ + category: 'cash' | 'credit' | 'investment' | 'other' + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description A human-readable name that has been assigned to this account, either by the account holder or by the institution. */ + display_name?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The name of the institution that holds this account. */ + institution_name: string + /** @description The last 4 digits of the account number. If present, this will be 4 numeric characters. */ + last4?: string | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account' + /** @description The most recent information about the account's owners. */ + ownership?: (string | components['schemas']['financial_connections.account_ownership']) | null + /** @description The state of the most recent attempt to refresh the account owners. */ + ownership_refresh?: components['schemas']['bank_connections_resource_ownership_refresh'] | null + /** @description The list of permissions granted by this account. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] | null + /** + * @description The status of the link to the account. + * @enum {string} + */ + status: 'active' | 'disconnected' | 'inactive' + /** + * @description If `category` is `cash`, one of: + * + * - `checking` + * - `savings` + * - `other` + * + * If `category` is `credit`, one of: + * + * - `mortgage` + * - `line_of_credit` + * - `credit_card` + * - `other` + * + * If `category` is `investment` or `other`, this will be `other`. + * @enum {string} + */ + subcategory: 'checking' | 'credit_card' | 'line_of_credit' | 'mortgage' | 'other' | 'savings' + /** @description The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. */ + supported_payment_method_types: ('link' | 'us_bank_account')[] + } + /** BankConnectionsResourceOwner */ + 'financial_connections.account_owner': { + /** @description The email address of the owner. */ + email?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description The full name of the owner. */ + name: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_owner' + /** @description The ownership object that this owner belongs to. */ + ownership: string + /** @description The raw phone number of the owner. */ + phone?: string | null + /** @description The raw physical address of the owner. */ + raw_address?: string | null + /** + * Format: unix-time + * @description The timestamp of the refresh that updated this owner. + */ + refreshed_at?: number | null + } + /** + * BankConnectionsResourceOwnership + * @description Describes a snapshot of the owners of an account at a particular point in time. + */ + 'financial_connections.account_ownership': { + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Unique identifier for the object. */ + id: string + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.account_ownership' + /** + * BankConnectionsResourceOwnerList + * @description A paginated list of owners for this account. + */ + owners: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + /** + * BankConnectionsResourceLinkAccountSession + * @description A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. + */ + 'financial_connections.session': { + /** @description The account holder for whom accounts are collected in this session. */ + account_holder?: components['schemas']['bank_connections_resource_accountholder'] | null + /** + * BankConnectionsResourceLinkedAccountList + * @description The accounts that were collected as part of this Session. + */ + accounts: { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + /** @description A value that will be passed to the client to launch the authentication flow. */ + client_secret: string + filters?: components['schemas']['bank_connections_resource_link_account_session_filters'] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'financial_connections.session' + /** @description Permissions requested for accounts collected during this session. */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** FinancialReportingFinanceReportRunRunParameters */ financial_reporting_finance_report_run_run_parameters: { /** @description The set of output columns requested for inclusion in the report run. */ @@ -4695,6 +5805,118 @@ export interface components { /** @description Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. */ timezone?: string } + /** + * CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + * @description Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + * automatically applied to future invoices and payments using the `customer_balance` payment method. + * Customers can fund this balance by initiating a bank transfer to any account in the + * `financial_addresses` field. + * Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + */ + funding_instructions: { + bank_transfer: components['schemas']['funding_instructions_bank_transfer'] + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description The `funding_type` of the returned instructions + * @enum {string} + */ + funding_type: 'bank_transfer' + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'funding_instructions' + } + /** FundingInstructionsBankTransfer */ + funding_instructions_bank_transfer: { + /** @description The country of the bank account to fund */ + country: string + /** @description A list of financial addresses that can be used to fund a particular balance */ + financial_addresses: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** + * @description The bank_transfer type + * @enum {string} + */ + type: 'eu_bank_transfer' | 'jp_bank_transfer' + } + /** + * FundingInstructionsBankTransferFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + funding_instructions_bank_transfer_financial_address: { + iban?: components['schemas']['funding_instructions_bank_transfer_iban_record'] + sort_code?: components['schemas']['funding_instructions_bank_transfer_sort_code_record'] + spei?: components['schemas']['funding_instructions_bank_transfer_spei_record'] + /** @description The payment networks supported by this FinancialAddress */ + supported_networks?: ('bacs' | 'fps' | 'sepa' | 'spei' | 'zengin')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'iban' | 'sort_code' | 'spei' | 'zengin' + zengin?: components['schemas']['funding_instructions_bank_transfer_zengin_record'] + } + /** + * FundingInstructionsBankTransferIbanRecord + * @description Iban Records contain E.U. bank account details per the SEPA format. + */ + funding_instructions_bank_transfer_iban_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The BIC/SWIFT code of the account. */ + bic: string + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** @description The IBAN of the account. */ + iban: string + } + /** + * FundingInstructionsBankTransferSortCodeRecord + * @description Sort Code Records contain U.K. bank account details per the sort code format. + */ + funding_instructions_bank_transfer_sort_code_record: { + /** @description The name of the person or business that owns the bank account */ + account_holder_name: string + /** @description The account number */ + account_number: string + /** @description The six-digit sort code */ + sort_code: string + } + /** + * FundingInstructionsBankTransferSpeiRecord + * @description SPEI Records contain Mexico bank account details per the SPEI format. + */ + funding_instructions_bank_transfer_spei_record: { + /** @description The three-digit bank code */ + bank_code: string + /** @description The short banking institution name */ + bank_name: string + /** @description The CLABE number */ + clabe: string + } + /** + * FundingInstructionsBankTransferZenginRecord + * @description Zengin Records contain Japan bank account details per the Zengin format. + */ + funding_instructions_bank_transfer_zengin_record: { + /** @description The account holder name */ + account_holder_name?: string | null + /** @description The account number */ + account_number?: string | null + /** @description The bank account type. In Japan, this can only be `futsu` or `toza`. */ + account_type?: string | null + /** @description The bank code of the account */ + bank_code?: string | null + /** @description The bank name of the account */ + bank_name?: string | null + /** @description The branch code of the account */ + branch_code?: string | null + /** @description The branch name of the account */ + branch_name?: string | null + } /** * GelatoDataDocumentReportDateOfBirth * @description Point in Time @@ -4999,7 +6221,7 @@ export interface components { * * A VerificationSession transitions through [multiple * statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - * the verification flow. The VerificationSession contains the user’s verified data after + * the verification flow. The VerificationSession contains the user's verified data after * verification checks are complete. * * Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -5045,6 +6267,42 @@ export interface components { /** @description The user’s verified data. */ verified_outputs?: components['schemas']['gelato_verified_outputs'] | null } + /** InboundTransfers */ + inbound_transfers: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the InboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['inbound_transfers_payment_method_details_us_bank_account'] + } + /** inbound_transfers_payment_method_details_us_bank_account */ + inbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to debit funds. + * @enum {string} + */ + network: 'ach' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** * Invoice * @description Invoices are statements of amounts owed by a customer, and are either @@ -5091,8 +6349,10 @@ export interface components { amount_due: number /** @description The amount, in %s, that was paid. */ amount_paid: number - /** @description The amount remaining, in %s, that is due. */ + /** @description The difference between amount_due and amount_paid, in %s. */ amount_remaining: number + /** @description ID of the Connect Application that created the invoice. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. */ application_fee_amount?: number | null /** @description Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. */ @@ -5157,16 +6417,7 @@ export interface components { /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates applied to this invoice, if any. */ default_tax_rates: components['schemas']['tax_rate'][] /** @description An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. */ @@ -5184,6 +6435,8 @@ export interface components { ending_balance?: number | null /** @description Footer displayed on the invoice. */ footer?: string | null + /** @description Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. */ + from_invoice?: components['schemas']['invoices_from_invoice'] | null /** @description The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. */ hosted_invoice_url?: string | null /** @description Unique identifier for the object. */ @@ -5192,6 +6445,8 @@ export interface components { invoice_pdf?: string | null /** @description The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. */ last_finalization_error?: components['schemas']['api_errors'] | null + /** @description The ID of the most recent non-draft revision of this invoice */ + latest_revision?: (string | components['schemas']['invoice']) | null /** * InvoiceLinesList * @description The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed by the subscription, if any. @@ -5252,6 +6507,8 @@ export interface components { quote?: (string | components['schemas']['quote']) | null /** @description This is the transaction number that appears on email receipts sent for this invoice. */ receipt_number?: string | null + /** @description Options for invoice PDF rendering. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null /** @description Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. */ starting_balance: number /** @description Extra information about an invoice for the customer's credit card statement. */ @@ -5266,15 +6523,21 @@ export interface components { subscription?: (string | components['schemas']['subscription']) | null /** @description Only set for upcoming invoices that preview prorations. The time used to calculate prorations. */ subscription_proration_date?: number - /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + /** @description Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated */ subtotal: number + /** @description The integer amount in %s representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated */ + subtotal_excluding_tax?: number | null /** @description The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. */ tax?: number | null + /** @description ID of the test clock this invoice belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null threshold_reason?: components['schemas']['invoice_threshold_reason'] /** @description Total after discounts and taxes. */ total: number /** @description The aggregate amounts calculated per discount across all line items. */ total_discount_amounts?: components['schemas']['discounts_resource_discount_amount'][] | null + /** @description The integer amount in %s representing the total amount of the invoice including all discounts but excluding all tax. */ + total_excluding_tax?: number | null /** @description The aggregate amounts calculated per tax rate for all line items. */ total_tax_amounts: components['schemas']['invoice_tax_amount'][] /** @description The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. */ @@ -5285,6 +6548,11 @@ export interface components { */ webhooks_delivered_at?: number | null } + /** invoice_installments_card */ + invoice_installments_card: { + /** @description Whether Installments are enabled for this Invoice. */ + enabled?: boolean | null + } /** InvoiceItemThresholdReason */ invoice_item_threshold_reason: { /** @description The IDs of the line items that triggered the threshold invoice. */ @@ -5296,12 +6564,12 @@ export interface components { invoice_line_item_period: { /** * Format: unix-time - * @description End of the line item's billing period + * @description The end of the period, which must be greater than or equal to the start. */ end: number /** * Format: unix-time - * @description Start of the line item's billing period + * @description The start of the period. */ start: number } @@ -5344,12 +6612,52 @@ export interface components { } /** invoice_payment_method_options_card */ invoice_payment_method_options_card: { + installments?: components['schemas']['invoice_installments_card'] /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic') | null } + /** invoice_payment_method_options_customer_balance */ + invoice_payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer'] + /** @description The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. */ + type?: string | null + } + /** invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer */ + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } + /** invoice_payment_method_options_konbini */ + invoice_payment_method_options_konbini: { [key: string]: unknown } + /** invoice_payment_method_options_us_bank_account */ + invoice_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['invoice_payment_method_options_us_bank_account_linked_account_options'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** invoice_payment_method_options_us_bank_account_linked_account_options */ + invoice_payment_method_options_us_bank_account_linked_account_options: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'payment_method' | 'transactions')[] + } /** InvoiceSettingCustomField */ invoice_setting_custom_field: { /** @description The name of the custom field. */ @@ -5365,12 +6673,19 @@ export interface components { default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description Default footer to be displayed on invoices for this customer. */ footer?: string | null + /** @description Default options for invoice PDF rendering for this customer. */ + rendering_options?: components['schemas']['invoice_setting_rendering_options'] | null } /** InvoiceSettingQuoteSetting */ invoice_setting_quote_setting: { /** @description Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. */ days_until_due?: number | null } + /** InvoiceSettingRenderingOptions */ + invoice_setting_rendering_options: { + /** @description How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. */ + amount_tax_display?: string | null + } /** InvoiceSettingSubscriptionScheduleSetting */ invoice_setting_subscription_schedule_setting: { /** @description Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. */ @@ -5453,6 +6768,8 @@ export interface components { subscription_item?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: components['schemas']['tax_rate'][] | null + /** @description ID of the test clock this invoice item belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description Unit amount (in the `currency` specified) of the invoice item. */ unit_amount?: number | null /** @@ -5461,6 +6778,25 @@ export interface components { */ unit_amount_decimal?: string | null } + /** InvoicesFromInvoice */ + invoices_from_invoice: { + /** @description The relation between this invoice and the cloned invoice */ + action: string + /** @description The invoice that was cloned. */ + invoice: string | components['schemas']['invoice'] + } + /** InvoicesLineItemsCreditedItems */ + invoices_line_items_credited_items: { + /** @description Invoice containing the credited invoice line items */ + invoice: string + /** @description Credited invoice line items */ + invoice_line_items: string[] + } + /** InvoicesLineItemsProrationDetails */ + invoices_line_items_proration_details: { + /** @description For a credit proration `line_item`, the original debit line_items to which the credit proration applies. */ + credited_items?: components['schemas']['invoices_line_items_credited_items'] | null + } /** InvoicesPaymentMethodOptions */ invoices_payment_method_options: { /** @description If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. */ @@ -5469,9 +6805,17 @@ export interface components { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. */ card?: components['schemas']['invoice_payment_method_options_card'] | null + /** @description If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** InvoicesPaymentSettings */ invoices_payment_settings: { + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. */ + default_mandate?: string | null /** @description Payment-method-specific configuration to provide to the invoice’s PaymentIntent. */ payment_method_options?: components['schemas']['invoices_payment_method_options'] | null /** @description The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). */ @@ -5485,12 +6829,18 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null @@ -5498,13 +6848,14 @@ export interface components { /** InvoicesResourceInvoiceTaxID */ invoices_resource_invoice_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -5516,10 +6867,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -5539,6 +6892,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -5571,38 +6925,6 @@ export interface components { */ voided_at?: number | null } - /** - * IssuerFraudRecord - * @description This resource has been renamed to [Early Fraud - * Warning](#early_fraud_warning_object) and will be removed in a future API - * version. - */ - issuer_fraud_record: { - /** @description An IFR is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an IFR, in order to avoid receiving a dispute later. */ - actionable: boolean - /** @description ID of the charge this issuer fraud record is for, optionally expanded. */ - charge: string | components['schemas']['charge'] - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. */ - fraud_type: string - /** @description If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). */ - has_liability_shift: boolean - /** @description Unique identifier for the object. */ - id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'issuer_fraud_record' - /** @description The timestamp at which the card issuer posted the issuer fraud record. */ - post_date: number - } /** * IssuingAuthorization * @description When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -5662,6 +6984,8 @@ export interface components { status: 'closed' | 'pending' | 'reversed' /** @description List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. */ transactions: components['schemas']['issuing.transaction'][] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). */ + treasury?: components['schemas']['issuing_authorization_treasury'] | null verification_data: components['schemas']['issuing_authorization_verification_data'] /** @description The digital wallet used for this authorization. One of `apple_pay`, `google_pay`, or `samsung_pay`. */ wallet?: string | null @@ -5677,14 +7001,14 @@ export interface components { * @description The reason why the card was canceled. * @enum {string|null} */ - cancellation_reason?: ('lost' | 'stolen') | null + cancellation_reason?: ('design_rejected' | 'lost' | 'stolen') | null cardholder: components['schemas']['issuing.cardholder'] /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. */ currency: string /** @description The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. */ cvc?: string @@ -5692,6 +7016,8 @@ export interface components { exp_month: number /** @description The expiration year of the card. */ exp_year: number + /** @description The financial account this card is attached to. */ + financial_account?: string | null /** @description Unique identifier for the object. */ id: string /** @description The last 4 digits of the card number. */ @@ -5787,7 +7113,7 @@ export interface components { * Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) */ 'issuing.dispute': { - /** @description Disputed amount. Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ + /** @description Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). */ amount: number /** @description List of balance transactions associated with the dispute. */ balance_transactions?: components['schemas']['balance_transaction'][] | null @@ -5817,6 +7143,8 @@ export interface components { status: 'expired' | 'lost' | 'submitted' | 'unsubmitted' | 'won' /** @description The transaction being disputed. */ transaction: string | components['schemas']['issuing.transaction'] + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_dispute_treasury'] | null } /** * IssuingSettlement @@ -5913,6 +7241,8 @@ export interface components { object: 'issuing.transaction' /** @description Additional purchase information that is optionally provided by the merchant. */ purchase_details?: components['schemas']['issuing_transaction_purchase_details'] | null + /** @description [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts */ + treasury?: components['schemas']['issuing_transaction_treasury'] | null /** * @description The nature of the transaction. * @enum {string} @@ -6001,6 +7331,15 @@ export interface components { | 'webhook_declined' | 'webhook_timeout' } + /** IssuingAuthorizationTreasury */ + issuing_authorization_treasury: { + /** @description The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization */ + received_credits: string[] + /** @description The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization */ + received_debits: string[] + /** @description The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization */ + transaction?: string | null + } /** IssuingAuthorizationVerificationData */ issuing_authorization_verification_data: { /** @@ -6645,6 +7984,8 @@ export interface components { * @enum {string|null} */ carrier?: ('dhl' | 'fedex' | 'royal_mail' | 'usps') | null + /** @description Additional information that may be required for clearing customs. */ + customs?: components['schemas']['issuing_card_shipping_customs'] | null /** * Format: unix-time * @description A unix timestamp representing a best estimate of when the card will be delivered. @@ -6652,6 +7993,10 @@ export interface components { eta?: number | null /** @description Recipient name. */ name: string + /** @description The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues. */ + phone_number?: string | null + /** @description Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. */ + require_signature?: boolean | null /** * @description Shipment service, such as `standard` or `express`. * @enum {string} @@ -6672,9 +8017,14 @@ export interface components { */ type: 'bulk' | 'individual' } + /** IssuingCardShippingCustoms */ + issuing_card_shipping_customs: { + /** @description A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. */ + eori_number?: string | null + } /** IssuingCardSpendingLimit */ issuing_card_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -7633,7 +8983,7 @@ export interface components { } /** IssuingCardholderSpendingLimit */ issuing_cardholder_spending_limit: { - /** @description Maximum amount allowed to spend per interval. */ + /** @description Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number /** @description Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. */ categories?: @@ -8090,6 +9440,13 @@ export interface components { */ received_at?: number | null } + /** IssuingDisputeTreasury */ + issuing_dispute_treasury: { + /** @description The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute */ + debit_reversal?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. */ + received_debit: string + } /** IssuingTransactionAmountDetails */ issuing_transaction_amount_details: { /** @description The fee charged by the ATM for the cash withdrawal. */ @@ -8171,13 +9528,24 @@ export interface components { /** @description The unit cost of the item in cents. */ unit_cost?: number | null } + /** IssuingTransactionTreasury */ + issuing_transaction_treasury: { + /** @description The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a refund */ + received_credit?: string | null + /** @description The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a capture */ + received_debit?: string | null + } /** * LineItem * @description A line item. */ item: { + /** @description Total discount amount applied. If no discounts were applied, defaults to 0. */ + amount_discount: number /** @description Total before any discounts or taxes are applied. */ amount_subtotal: number + /** @description Total tax amount applied. If no tax was applied, defaults to 0. */ + amount_tax: number /** @description Total after discounts and taxes. */ amount_total: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ @@ -8195,6 +9563,12 @@ export interface components { object: 'item' /** @description The price used to generate the line item. */ price?: components['schemas']['price'] | null + /** + * @description The ID of the product for this line item. + * + * This will always be the same as `price.product`. + */ + product?: string | components['schemas']['product'] | components['schemas']['deleted_product'] /** @description The quantity of products being purchased. */ quantity?: number | null /** @description The taxes applied to the line item. */ @@ -8337,6 +9711,8 @@ export interface components { line_item: { /** @description The amount, in %s. */ amount: number + /** @description The integer amount in %s representing the amount for this line item, excluding all tax and discounts. */ + amount_excluding_tax?: number | null /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ @@ -8365,6 +9741,8 @@ export interface components { price?: components['schemas']['price'] | null /** @description Whether this is a proration. */ proration: boolean + /** @description Additional details for proration line items */ + proration_details?: components['schemas']['invoices_line_items_proration_details'] | null /** @description The quantity of the subscription, if the line item is a subscription or a proration. */ quantity?: number | null /** @description The subscription that the invoice item pertains to, if any. */ @@ -8380,6 +9758,11 @@ export interface components { * @enum {string} */ type: 'invoiceitem' | 'subscription' + /** + * Format: decimal + * @description The amount in %s representing the unit amount for this line item, excluding all tax and discounts. + */ + unit_amount_excluding_tax?: string | null } /** LineItemsDiscountAmount */ line_items_discount_amount: { @@ -8393,6 +9776,13 @@ export interface components { amount: number rate: components['schemas']['tax_rate'] } + /** linked_account_options_us_bank_account */ + linked_account_options_us_bank_account: { + /** @description The list of permissions to request. The `payment_method` permission must be included. */ + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } /** LoginLink */ login_link: { /** @@ -8473,17 +9863,50 @@ export interface components { /** @description The URL that will contain the mandate that the customer has signed. */ url: string } + /** mandate_blik */ + mandate_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } + /** mandate_link */ + mandate_link: { [key: string]: unknown } /** mandate_multi_use */ mandate_multi_use: { [key: string]: unknown } + /** mandate_options_off_session_details_blik */ + mandate_options_off_session_details_blik: { + /** @description Amount of each recurring payment. */ + amount?: number | null + /** @description Currency of each recurring payment. */ + currency?: string | null + /** + * @description Frequency interval of each recurring payment. + * @enum {string|null} + */ + interval?: ('day' | 'month' | 'week' | 'year') | null + /** @description Frequency indicator of each recurring payment. */ + interval_count?: number | null + } /** mandate_payment_method_details */ mandate_payment_method_details: { acss_debit?: components['schemas']['mandate_acss_debit'] au_becs_debit?: components['schemas']['mandate_au_becs_debit'] bacs_debit?: components['schemas']['mandate_bacs_debit'] + blik?: components['schemas']['mandate_blik'] card?: components['schemas']['card_mandate_payment_method_details'] + link?: components['schemas']['mandate_link'] sepa_debit?: components['schemas']['mandate_sepa_debit'] /** @description The type of the payment method associated with this mandate. An additional hash is included on `payment_method_details` with a name matching this value. It contains mandate information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['mandate_us_bank_account'] } /** mandate_sepa_debit */ mandate_sepa_debit: { @@ -8499,6 +9922,8 @@ export interface components { /** @description On a single use mandate, the currency of the payment. */ currency: string } + /** mandate_us_bank_account */ + mandate_us_bank_account: { [key: string]: unknown } /** networks */ networks: { /** @description All available networks for the card. */ @@ -8530,24 +9955,33 @@ export interface components { user_agent?: string | null } /** - * Order - * @description Order objects are created to handle end customers' purchases of previously - * defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - * as list all orders. Orders are identified by a unique, random ID. + * OrdersV2ResourceOrder + * @description An Order describes a purchase being made by a customer, including the + * products & quantities being purchased, the order status, the payment information, + * and the billing/shipping details. * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + * Related guide: [Orders overview](https://stripe.com/docs/orders) */ order: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. */ - amount: number - /** @description The total amount that was returned to the customer. */ - amount_returned?: number | null - /** @description ID of the Connect Application that created the order. */ - application?: string | null - /** @description A fee in cents that will be applied to the order and transferred to the application owner’s Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees documentation. */ - application_fee?: number | null - /** @description The ID of the payment used to pay for the order. Present if the order status is `paid`, `fulfilled`, or `refunded`. */ - charge?: (string | components['schemas']['charge']) | null + /** @description Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order 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). */ + amount_subtotal: number + /** @description Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). */ + amount_total: number + /** @description ID of the Connect application that created the Order, if any. */ + application?: (string | components['schemas']['application']) | null + automatic_tax?: components['schemas']['orders_v2_resource_automatic_tax'] + /** @description Customer billing details associated with the order. */ + billing_details?: components['schemas']['orders_v2_resource_billing_details'] | null + /** @description The fields on the Order that can be updated from the client */ + client_permissions?: components['schemas']['orders_v2_resource_client_permissions'] | null + /** + * @description The client secret of this Order. Used for client-side retrieval using a publishable key. + * + * The client secret can be used to complete a payment for an Order 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 for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + */ + client_secret?: string | null /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -8555,32 +9989,23 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** @description The customer used for the order. */ + /** @description The customer which this orders belongs to. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null - /** @description The email address of the customer placing the order. */ - email?: string | null - /** @description External coupon code to load for this order. */ - external_coupon_code?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The discounts applied to the order. Use `expand[]=discounts` to expand each discount. */ + discounts?: (string | components['schemas']['discount'])[] | null /** @description Unique identifier for the object. */ id: string - /** @description List of items constituting the order. An order can have up to 25 items. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata?: { [key: string]: string } | null - /** - * @description String representing the object's type. Objects of the same type share the same value. - * @enum {string} - */ - object: 'order' + /** @description A recent IP address of the purchaser used for tax reporting and tax location inference. */ + ip_address?: string | null /** - * OrdersResourceOrderReturnList - * @description A list of returns that have taken place for this order. + * OrdersV2ResourceLineItemList + * @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. */ - returns?: { + line_items?: { /** @description Details about each object. */ - data: components['schemas']['order_return'][] + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -8590,83 +10015,391 @@ export interface components { object: 'list' /** @description The URL where this list can be accessed. */ url: string - } | null - /** @description The shipping method that is currently selected for this order, if any. If present, it is equal to one of the `id`s of shipping methods in the `shipping_methods` array. At order creation time, if there are multiple shipping methods, Stripe will automatically selected the first method. */ - selected_shipping_method?: string | null - /** @description The shipping address for the order. Present if the order is for goods to be shipped. */ - shipping?: components['schemas']['shipping'] | null - /** @description A list of supported shipping methods for this order. The desired shipping method can be specified either by updating the order, or when paying it. */ - shipping_methods?: components['schemas']['shipping_method'][] | null - /** @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). */ - status: string - /** @description The timestamps at which the order status was updated. */ - status_transitions?: components['schemas']['status_transitions'] | null + } + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null /** - * Format: unix-time - * @description Time at which the object was last updated. Measured in seconds since the Unix epoch. + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'order' + payment: components['schemas']['orders_v2_resource_payment'] + /** @description The details of the customer cost of shipping, including the customer chosen ShippingRate. */ + shipping_cost?: components['schemas']['orders_v2_resource_shipping_cost'] | null + /** @description Customer shipping information associated with the order. */ + shipping_details?: components['schemas']['orders_v2_resource_shipping_details'] | null + /** + * @description The overall status of the order. + * @enum {string} */ - updated?: number | null - /** @description The user's order ID if it is different from the Stripe order ID. */ - upstream_id?: string + status: 'canceled' | 'complete' | 'open' | 'processing' | 'submitted' + tax_details?: components['schemas']['orders_v2_resource_tax_details'] + total_details: components['schemas']['orders_v2_resource_total_details'] } - /** - * OrderItem - * @description A representation of the constituent items of any given order. Can be used to - * represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - * - * Related guide: [Orders](https://stripe.com/docs/orders/guide). - */ - order_item: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Description of the line item, meant to be displayable to the user (e.g., `"Express shipping"`). */ - description: string + /** orders_payment_method_options_afterpay_clearpay */ + orders_payment_method_options_afterpay_clearpay: { /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description Controls when the funds will be captured from the customer's account. * @enum {string} */ - object: 'order_item' - /** @description The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). */ - parent?: (string | components['schemas']['sku']) | null - /** @description A positive integer representing the number of instances of `parent` that are included in this order item. Applicable/present only if `type` is `sku`. */ - quantity?: number | null - /** @description The type of line item. One of `sku`, `tax`, `shipping`, or `discount`. */ - type: string + capture_method?: 'automatic' | 'manual' + /** @description Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ + reference?: string | null + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' } - /** - * OrderReturn - * @description A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - * Returns always belong to an order, and may optionally contain a refund. - * - * Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - */ - order_return: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the returned line item. */ - amount: number + /** OrdersV2ResourceAutomaticPaymentMethods */ + orders_v2_resource_automatic_payment_methods: { + /** @description Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + enabled: boolean + } + /** OrdersV2ResourceAutomaticTax */ + orders_v2_resource_automatic_tax: { + /** @description Whether Stripe automatically computes tax on this Order. */ + enabled: boolean /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. + * @description The status of the most recent automated tax calculation for this Order. + * @enum {string|null} */ - created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Unique identifier for the object. */ + status?: ('complete' | 'failed' | 'requires_location_inputs') | null + } + /** OrdersV2ResourceBillingDetails */ + orders_v2_resource_billing_details: { + /** @description Billing address for the order. */ + address?: components['schemas']['address'] | null + /** @description Email address for the order. */ + email?: string | null + /** @description Full name for the order. */ + name?: string | null + /** @description Billing phone number for the order (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceCardPaymentMethodOptions */ + orders_v2_resource_card_payment_method_options: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method: 'automatic' | 'manual' + /** + * @description Indicates that you intend to make future payments with the payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** OrdersV2ResourceClientPermissions */ + orders_v2_resource_client_permissions: { + /** + * @description Allows or disallows billing details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + billing_details?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows promotion codes to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + promotion_codes?: ('allow' | 'disallow') | null + /** + * @description Allows or disallows shipping details to be set on an Order with a publishable key and Order client_secret + * @enum {string|null} + */ + shipping_details?: ('allow' | 'disallow') | null + } + /** OrdersV2ResourcePayment */ + orders_v2_resource_payment: { + /** @description ID of the payment intent associated with this order. Null when the order is `open`. */ + payment_intent?: (string | components['schemas']['payment_intent']) | null + /** @description Settings describing how the order should configure generated PaymentIntents. */ + settings?: components['schemas']['orders_v2_resource_payment_settings'] | null + /** + * @description The status of the underlying payment associated with this order, if any. Null when the order is `open`. + * @enum {string|null} + */ + status?: + | ( + | 'canceled' + | 'complete' + | 'not_required' + | 'processing' + | 'requires_action' + | 'requires_capture' + | 'requires_confirmation' + | 'requires_payment_method' + ) + | null + } + /** OrdersV2ResourcePaymentMethodOptions */ + orders_v2_resource_payment_method_options: { + acss_debit?: components['schemas']['payment_intent_payment_method_options_acss_debit'] + afterpay_clearpay?: components['schemas']['orders_payment_method_options_afterpay_clearpay'] + alipay?: components['schemas']['payment_method_options_alipay'] + bancontact?: components['schemas']['payment_method_options_bancontact'] + card?: components['schemas']['orders_v2_resource_card_payment_method_options'] + customer_balance?: components['schemas']['payment_method_options_customer_balance'] + ideal?: components['schemas']['payment_method_options_ideal'] + klarna?: components['schemas']['payment_method_options_klarna'] + link?: components['schemas']['payment_intent_payment_method_options_link'] + oxxo?: components['schemas']['payment_method_options_oxxo'] + p24?: components['schemas']['payment_method_options_p24'] + paypal?: components['schemas']['payment_method_options_paypal'] + sepa_debit?: components['schemas']['payment_intent_payment_method_options_sepa_debit'] + sofort?: components['schemas']['payment_method_options_sofort'] + wechat_pay?: components['schemas']['payment_method_options_wechat_pay'] + } + /** OrdersV2ResourcePaymentSettings */ + orders_v2_resource_payment_settings: { + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. */ + application_fee_amount?: number | null + /** @description Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. */ + automatic_payment_methods?: components['schemas']['orders_v2_resource_automatic_payment_methods'] | null + /** @description PaymentMethod-specific configuration to provide to the order's PaymentIntent. */ + payment_method_options?: components['schemas']['orders_v2_resource_payment_method_options'] | null + /** @description The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + | null + /** @description The URL to redirect the customer to after they authenticate their payment. */ + return_url?: string | null + /** @description For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string | null + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string | null + /** @description Provides configuration for completing a transfer for the order after it is paid. */ + transfer_data?: components['schemas']['orders_v2_resource_transfer_data'] | null + } + /** OrdersV2ResourceShippingCost */ + orders_v2_resource_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceShippingDetails */ + orders_v2_resource_shipping_details: { + /** @description Recipient shipping address. Required if the order includes products that are shippable. */ + address?: components['schemas']['address'] | null + /** @description Recipient name. */ + name?: string | null + /** @description Recipient phone (including extension). */ + phone?: string | null + } + /** OrdersV2ResourceTaxDetails */ + orders_v2_resource_tax_details: { + /** + * @description Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + * @enum {string} + */ + tax_exempt: 'exempt' | 'none' | 'reverse' + /** @description The purchaser's tax IDs to be used in calculation of tax for this Order. */ + tax_ids: components['schemas']['orders_v2_resource_tax_details_resource_tax_id'][] + } + /** OrdersV2ResourceTaxDetailsResourceTaxID */ + orders_v2_resource_tax_details_resource_tax_id: { + /** + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` + * @enum {string} + */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'unknown' + | 'us_ein' + | 'za_vat' + /** @description The value of the tax ID. */ + value?: string | null + } + /** OrdersV2ResourceTotalDetails */ + orders_v2_resource_total_details: { + /** @description This is the sum of all the discounts. */ + amount_discount: number + /** @description This is the sum of all the shipping amounts. */ + amount_shipping?: number | null + /** @description This is the sum of all the tax amounts. */ + amount_tax: number + breakdown?: components['schemas']['orders_v2_resource_total_details_api_resource_breakdown'] + } + /** OrdersV2ResourceTotalDetailsAPIResourceBreakdown */ + orders_v2_resource_total_details_api_resource_breakdown: { + /** @description The aggregated discounts. */ + discounts: components['schemas']['line_items_discount_amount'][] + /** @description The aggregated tax amounts by rate. */ + taxes: components['schemas']['line_items_tax_amount'][] + } + /** OrdersV2ResourceTransferData */ + orders_v2_resource_transfer_data: { + /** @description The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. */ + amount?: number | null + /** @description ID of the Connected account receiving the transfer. */ + destination: string | components['schemas']['account'] + } + /** OutboundPaymentsPaymentMethodDetails */ + outbound_payments_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['outbound_payments_payment_method_details_financial_account'] + /** + * @description The type of the payment method used in the OutboundPayment. + * @enum {string} + */ + type: 'financial_account' | 'us_bank_account' + us_bank_account?: components['schemas']['outbound_payments_payment_method_details_us_bank_account'] + } + /** outbound_payments_payment_method_details_financial_account */ + outbound_payments_payment_method_details_financial_account: { + /** @description Token of the FinancialAccount. */ id: string - /** @description The items included in this order return. */ - items: components['schemas']['order_item'][] - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails used to send funds. * @enum {string} */ - object: 'order_return' - /** @description The order that this return includes items from. */ - order?: (string | components['schemas']['order']) | null - /** @description The ID of the refund issued for this return. */ - refund?: (string | components['schemas']['refund']) | null + network: 'stripe' + } + /** outbound_payments_payment_method_details_us_bank_account */ + outbound_payments_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null + } + /** OutboundTransfersPaymentMethodDetails */ + outbound_transfers_payment_method_details: { + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + /** + * @description The type of the payment method used in the OutboundTransfer. + * @enum {string} + */ + type: 'us_bank_account' + us_bank_account?: components['schemas']['outbound_transfers_payment_method_details_us_bank_account'] + } + /** outbound_transfers_payment_method_details_us_bank_account */ + outbound_transfers_payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** + * @description The US bank account network used to send funds. + * @enum {string} + */ + network: 'ach' | 'us_domestic_wire' + /** @description Routing number of the bank account. */ + routing_number?: string | null } /** PackageDimensions */ package_dimensions: { @@ -8679,11 +10412,25 @@ export interface components { /** @description Width, in inches. */ width: number } + /** PaymentFlowsAmountDetails */ + payment_flows_amount_details: { + tip?: components['schemas']['payment_flows_amount_details_resource_tip'] + } + /** PaymentFlowsAmountDetailsResourceTip */ + payment_flows_amount_details_resource_tip: { + /** @description Portion of the amount that corresponds to a tip. */ + amount?: number + } /** PaymentFlowsAutomaticPaymentMethodsPaymentIntent */ payment_flows_automatic_payment_methods_payment_intent: { /** @description Automatically calculates compatible payment methods */ enabled: boolean } + /** PaymentFlowsInstallmentOptions */ + payment_flows_installment_options: { + enabled: boolean + plan?: components['schemas']['payment_method_details_card_installments_plan'] + } /** PaymentFlowsPrivatePaymentMethodsAlipay */ payment_flows_private_payment_methods_alipay: { [key: string]: unknown } /** PaymentFlowsPrivatePaymentMethodsAlipayDetails */ @@ -8723,6 +10470,7 @@ export interface components { amount: number /** @description Amount that can be captured from this PaymentIntent. */ amount_capturable?: number + amount_details?: components['schemas']['payment_flows_amount_details'] /** @description Amount that was collected by this PaymentIntent. */ amount_received?: number /** @description ID of the Connect application that created the PaymentIntent. */ @@ -8768,9 +10516,9 @@ export interface components { /** * @description The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. * - * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) and learn about how `client_secret` should be handled. + * Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. */ client_secret?: string | null /** @enum {string} */ @@ -8849,12 +10597,20 @@ export interface components { transfer_group?: string | null } /** PaymentIntentCardProcessing */ - payment_intent_card_processing: { [key: string]: unknown } + payment_intent_card_processing: { + customer_notification?: components['schemas']['payment_intent_processing_customer_notification'] + } /** PaymentIntentNextAction */ payment_intent_next_action: { alipay_handle_redirect?: components['schemas']['payment_intent_next_action_alipay_handle_redirect'] boleto_display_details?: components['schemas']['payment_intent_next_action_boleto'] + card_await_notification?: components['schemas']['payment_intent_next_action_card_await_notification'] + display_bank_transfer_instructions?: components['schemas']['payment_intent_next_action_display_bank_transfer_instructions'] + konbini_display_details?: components['schemas']['payment_intent_next_action_konbini'] oxxo_display_details?: components['schemas']['payment_intent_next_action_display_oxxo_details'] + paynow_display_qr_code?: components['schemas']['payment_intent_next_action_paynow_display_qr_code'] + pix_display_qr_code?: components['schemas']['payment_intent_next_action_pix_display_qr_code'] + promptpay_display_qr_code?: components['schemas']['payment_intent_next_action_promptpay_display_qr_code'] redirect_to_url?: components['schemas']['payment_intent_next_action_redirect_to_url'] /** @description Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. */ type: string @@ -8890,6 +10646,34 @@ export interface components { /** @description The URL to the downloadable boleto voucher PDF. */ pdf?: string | null } + /** PaymentIntentNextActionCardAwaitNotification */ + payment_intent_next_action_card_await_notification: { + /** + * Format: unix-time + * @description The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + */ + charge_attempt_at?: number | null + /** @description For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. */ + customer_approval_required?: boolean | null + } + /** PaymentIntentNextActionDisplayBankTransferInstructions */ + payment_intent_next_action_display_bank_transfer_instructions: { + /** @description The remaining amount that needs to be transferred to complete the payment. */ + amount_remaining?: number | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string | null + /** @description A list of financial addresses that can be used to fund the customer balance */ + financial_addresses?: components['schemas']['funding_instructions_bank_transfer_financial_address'][] + /** @description A link to a hosted page that guides your customer through completing the transfer. */ + hosted_instructions_url?: string | null + /** @description A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. */ + reference?: string | null + /** + * @description Type of bank transfer + * @enum {string} + */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } /** PaymentIntentNextActionDisplayOxxoDetails */ payment_intent_next_action_display_oxxo_details: { /** @@ -8902,6 +10686,89 @@ export interface components { /** @description OXXO reference number. */ number?: string | null } + /** payment_intent_next_action_konbini */ + payment_intent_next_action_konbini: { + /** + * Format: unix-time + * @description The timestamp at which the pending Konbini payment expires. + */ + expires_at: number + /** @description The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. */ + hosted_voucher_url?: string | null + stores: components['schemas']['payment_intent_next_action_konbini_stores'] + } + /** payment_intent_next_action_konbini_familymart */ + payment_intent_next_action_konbini_familymart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_lawson */ + payment_intent_next_action_konbini_lawson: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_ministop */ + payment_intent_next_action_konbini_ministop: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_seicomart */ + payment_intent_next_action_konbini_seicomart: { + /** @description The confirmation number. */ + confirmation_number?: string + /** @description The payment code. */ + payment_code: string + } + /** payment_intent_next_action_konbini_stores */ + payment_intent_next_action_konbini_stores: { + /** @description FamilyMart instruction details. */ + familymart?: components['schemas']['payment_intent_next_action_konbini_familymart'] | null + /** @description Lawson instruction details. */ + lawson?: components['schemas']['payment_intent_next_action_konbini_lawson'] | null + /** @description Ministop instruction details. */ + ministop?: components['schemas']['payment_intent_next_action_konbini_ministop'] | null + /** @description Seicomart instruction details. */ + seicomart?: components['schemas']['payment_intent_next_action_konbini_seicomart'] | null + } + /** PaymentIntentNextActionPaynowDisplayQrCode */ + payment_intent_next_action_paynow_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The image_url_png string used to render QR code */ + image_url_png: string + /** @description The image_url_svg string used to render QR code */ + image_url_svg: string + } + /** PaymentIntentNextActionPixDisplayQrCode */ + payment_intent_next_action_pix_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data?: string + /** @description The date (unix timestamp) when the PIX expires. */ + expires_at?: number + /** @description The URL to the hosted pix instructions page, which allows customers to view the pix QR code. */ + hosted_instructions_url?: string + /** @description The image_url_png string used to render png QR code */ + image_url_png?: string + /** @description The image_url_svg string used to render svg QR code */ + image_url_svg?: string + } + /** PaymentIntentNextActionPromptpayDisplayQrCode */ + payment_intent_next_action_promptpay_display_qr_code: { + /** @description The raw data string used to generate QR code, it should be used together with QR code library. */ + data: string + /** @description The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. */ + hosted_instructions_url: string + /** @description The image_url_png string used to render QR code, can be used as */ + image_url_png: string + /** @description The image_url_svg string used to render QR code, can be used as */ + image_url_svg: string + } /** PaymentIntentNextActionRedirectToUrl */ payment_intent_next_action_redirect_to_url: { /** @description If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. */ @@ -8918,6 +10785,11 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** PaymentIntentNextActionWechatPayDisplayQrCode */ payment_intent_next_action_wechat_pay_display_qr_code: { @@ -8938,9 +10810,9 @@ export interface components { nonce_str: string /** @description package is static value */ package: string - /** @description an unique merchant ID assigned by Wechat Pay */ + /** @description an unique merchant ID assigned by WeChat Pay */ partner_id: string - /** @description an unique trading ID assigned by Wechat Pay */ + /** @description an unique trading ID assigned by WeChat Pay */ prepay_id: string /** @description A signature */ sign: string @@ -8949,7 +10821,7 @@ export interface components { } /** PaymentIntentNextActionWechatPayRedirectToIOSApp */ payment_intent_next_action_wechat_pay_redirect_to_ios_app: { - /** @description An universal link that redirect to Wechat Pay APP */ + /** @description An universal link that redirect to WeChat Pay app */ native_url: string } /** PaymentIntentPaymentMethodOptions */ @@ -8957,6 +10829,9 @@ export interface components { acss_debit?: | components['schemas']['payment_intent_payment_method_options_acss_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + affirm?: + | components['schemas']['payment_method_options_affirm'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] afterpay_clearpay?: | components['schemas']['payment_method_options_afterpay_clearpay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8972,6 +10847,9 @@ export interface components { bancontact?: | components['schemas']['payment_method_options_bancontact'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['payment_intent_payment_method_options_blik'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] boleto?: | components['schemas']['payment_method_options_boleto'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -8981,6 +10859,9 @@ export interface components { card_present?: | components['schemas']['payment_method_options_card_present'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + customer_balance?: + | components['schemas']['payment_method_options_customer_balance'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] eps?: | components['schemas']['payment_intent_payment_method_options_eps'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9000,16 +10881,32 @@ export interface components { klarna?: | components['schemas']['payment_method_options_klarna'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + konbini?: + | components['schemas']['payment_method_options_konbini'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + link?: + | components['schemas']['payment_intent_payment_method_options_link'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] oxxo?: | components['schemas']['payment_method_options_oxxo'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] p24?: components['schemas']['payment_method_options_p24'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + paynow?: + | components['schemas']['payment_method_options_paynow'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + pix?: components['schemas']['payment_method_options_pix'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + promptpay?: + | components['schemas']['payment_method_options_promptpay'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sepa_debit?: | components['schemas']['payment_intent_payment_method_options_sepa_debit'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] sofort?: | components['schemas']['payment_method_options_sofort'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['payment_intent_payment_method_options_us_bank_account'] + | components['schemas']['payment_intent_type_specific_payment_method_options_client'] wechat_pay?: | components['schemas']['payment_method_options_wechat_pay'] | components['schemas']['payment_intent_type_specific_payment_method_options_client'] @@ -9017,6 +10914,15 @@ export interface components { /** payment_intent_payment_method_options_acss_debit */ payment_intent_payment_method_options_acss_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_acss_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' /** * @description Bank account verification method. * @enum {string} @@ -9024,15 +10930,34 @@ export interface components { verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_intent_payment_method_options_au_becs_debit */ - payment_intent_payment_method_options_au_becs_debit: { [key: string]: unknown } + payment_intent_payment_method_options_au_becs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_blik */ + payment_intent_payment_method_options_blik: { [key: string]: unknown } /** payment_intent_payment_method_options_card */ payment_intent_payment_method_options_card: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** * @description Installment details for this payment (Mexico only). * * For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). */ installments?: components['schemas']['payment_method_options_card_installments'] | null + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['payment_method_options_card_mandate_options'] | null /** * @description Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. * @enum {string|null} @@ -9052,9 +10977,42 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. */ + statement_descriptor_suffix_kana?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. */ + statement_descriptor_suffix_kanji?: string } /** payment_intent_payment_method_options_eps */ - payment_intent_payment_method_options_eps: { [key: string]: unknown } + payment_intent_payment_method_options_eps: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_intent_payment_method_options_link */ + payment_intent_payment_method_options_link: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_intent_payment_method_options_mandate_options_acss_debit */ payment_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -9077,6 +11035,33 @@ export interface components { /** payment_intent_payment_method_options_sepa_debit */ payment_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['payment_intent_payment_method_options_mandate_options_sepa_debit'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_intent_payment_method_options_us_bank_account */ + payment_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** PaymentIntentProcessing */ payment_intent_processing: { @@ -9087,8 +11072,24 @@ export interface components { */ type: 'card' } + /** PaymentIntentProcessingCustomerNotification */ + payment_intent_processing_customer_notification: { + /** @description Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. */ + approval_requested?: boolean | null + /** + * Format: unix-time + * @description If customer approval is required, they need to provide approval before this time. + */ + completes_at?: number | null + } /** PaymentIntentTypeSpecificPaymentMethodOptionsClient */ payment_intent_type_specific_payment_method_options_client: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + installments?: components['schemas']['payment_flows_installment_options'] /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. * @@ -9098,6 +11099,11 @@ export interface components { * @enum {string} */ setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** * PaymentLink @@ -9123,6 +11129,15 @@ export interface components { * @enum {string} */ billing_address_collection: 'auto' | 'required' + /** @description When set, provides configuration to gather active consent from customers. */ + consent_collection?: components['schemas']['payment_links_resource_consent_collection'] | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description Configuration for Customer creation during checkout. + * @enum {string} + */ + customer_creation: 'always' | 'if_required' /** @description Unique identifier for the object. */ id: string /** @@ -9153,13 +11168,56 @@ export interface components { object: 'payment_link' /** @description The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. */ on_behalf_of?: (string | components['schemas']['account']) | null + /** @description Indicates the parameters to be passed to PaymentIntent creation during checkout. */ + payment_intent_data?: components['schemas']['payment_links_resource_payment_intent_data'] | null + /** + * @description Configuration for collecting a payment method during checkout. + * @enum {string} + */ + payment_method_collection: 'always' | 'if_required' /** @description The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | null + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | null phone_number_collection: components['schemas']['payment_links_resource_phone_number_collection'] /** @description Configuration for collecting the customer's shipping address. */ shipping_address_collection?: components['schemas']['payment_links_resource_shipping_address_collection'] | null + /** @description The shipping rate options applied to the session. */ + shipping_options: components['schemas']['payment_links_resource_shipping_option'][] + /** + * @description Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + * @enum {string} + */ + submit_type: 'auto' | 'book' | 'donate' | 'pay' /** @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. */ subscription_data?: components['schemas']['payment_links_resource_subscription_data'] | null + tax_id_collection: components['schemas']['payment_links_resource_tax_id_collection'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. */ transfer_data?: components['schemas']['payment_links_resource_transfer_data'] | null /** @description The public URL that can be shared with customers. */ @@ -9190,6 +11248,32 @@ export interface components { /** @description The URL the customer will be redirected to after the purchase is complete. */ url: string } + /** PaymentLinksResourceConsentCollection */ + payment_links_resource_consent_collection: { + /** + * @description If set to `auto`, enables the collection of customer consent for promotional communications. + * @enum {string|null} + */ + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null + } + /** PaymentLinksResourcePaymentIntentData */ + payment_links_resource_payment_intent_data: { + /** + * @description Indicates when the funds will be captured from the customer's account. + * @enum {string|null} + */ + capture_method?: ('automatic' | 'manual') | null + /** + * @description Indicates that you intend to make future payments with the payment method collected during checkout. + * @enum {string|null} + */ + setup_future_usage?: ('off_session' | 'on_session') | null + } /** PaymentLinksResourcePhoneNumberCollection */ payment_links_resource_phone_number_collection: { /** @description If `true`, a phone number will be collected during checkout. */ @@ -9438,11 +11522,25 @@ export interface components { | 'ZZ' )[] } + /** PaymentLinksResourceShippingOption */ + payment_links_resource_shipping_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + shipping_amount: number + /** @description The ID of the Shipping Rate to use for this shipping option. */ + shipping_rate: string | components['schemas']['shipping_rate'] + } /** PaymentLinksResourceSubscriptionData */ payment_links_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description Integer representing the number of trial period days before the customer is charged for the first time. */ trial_period_days?: number | null } + /** PaymentLinksResourceTaxIdCollection */ + payment_links_resource_tax_id_collection: { + /** @description Indicates whether tax ID collection is enabled for the session. */ + enabled: boolean + } /** PaymentLinksResourceTransferData */ payment_links_resource_transfer_data: { /** @description The amount in %s that will be transferred to the destination account. By default, the entire amount is transferred to the destination. */ @@ -9453,19 +11551,21 @@ export interface components { /** * PaymentMethod * @description PaymentMethod objects represent your customer's payment instruments. - * They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to + * You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to * Customer objects to store instrument details for future payments. * * Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). */ payment_method: { acss_debit?: components['schemas']['payment_method_acss_debit'] + affirm?: components['schemas']['payment_method_affirm'] afterpay_clearpay?: components['schemas']['payment_method_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay'] au_becs_debit?: components['schemas']['payment_method_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_bacs_debit'] bancontact?: components['schemas']['payment_method_bancontact'] billing_details: components['schemas']['billing_details'] + blik?: components['schemas']['payment_method_blik'] boleto?: components['schemas']['payment_method_boleto'] card?: components['schemas']['payment_method_card'] card_present?: components['schemas']['payment_method_card_present'] @@ -9476,6 +11576,7 @@ export interface components { created: number /** @description The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. */ customer?: (string | components['schemas']['customer']) | null + customer_balance?: components['schemas']['payment_method_customer_balance'] eps?: components['schemas']['payment_method_eps'] fpx?: components['schemas']['payment_method_fpx'] giropay?: components['schemas']['payment_method_giropay'] @@ -9485,6 +11586,8 @@ export interface components { ideal?: components['schemas']['payment_method_ideal'] interac_present?: components['schemas']['payment_method_interac_present'] klarna?: components['schemas']['payment_method_klarna'] + konbini?: components['schemas']['payment_method_konbini'] + link?: components['schemas']['payment_method_link'] /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ @@ -9496,6 +11599,10 @@ export interface components { object: 'payment_method' oxxo?: components['schemas']['payment_method_oxxo'] p24?: components['schemas']['payment_method_p24'] + paynow?: components['schemas']['payment_method_paynow'] + pix?: components['schemas']['payment_method_pix'] + promptpay?: components['schemas']['payment_method_promptpay'] + radar_options?: components['schemas']['radar_radar_options'] sepa_debit?: components['schemas']['payment_method_sepa_debit'] sofort?: components['schemas']['payment_method_sofort'] /** @@ -9504,14 +11611,17 @@ export interface components { */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' | 'card_present' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' @@ -9519,11 +11629,18 @@ export interface components { | 'ideal' | 'interac_present' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + us_bank_account?: components['schemas']['payment_method_us_bank_account'] wechat_pay?: components['schemas']['payment_method_wechat_pay'] } /** payment_method_acss_debit */ @@ -9539,6 +11656,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_affirm */ + payment_method_affirm: { [key: string]: unknown } /** payment_method_afterpay_clearpay */ payment_method_afterpay_clearpay: { [key: string]: unknown } /** payment_method_au_becs_debit */ @@ -9561,6 +11680,8 @@ export interface components { } /** payment_method_bancontact */ payment_method_bancontact: { [key: string]: unknown } + /** payment_method_blik */ + payment_method_blik: { [key: string]: unknown } /** payment_method_boleto */ payment_method_boleto: { /** @description Uniquely identifies the customer tax id (CNPJ or CPF) */ @@ -9663,19 +11784,24 @@ export interface components { /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ shipping_address?: components['schemas']['address'] | null } + /** payment_method_customer_balance */ + payment_method_customer_balance: { [key: string]: unknown } /** payment_method_details */ payment_method_details: { ach_credit_transfer?: components['schemas']['payment_method_details_ach_credit_transfer'] ach_debit?: components['schemas']['payment_method_details_ach_debit'] acss_debit?: components['schemas']['payment_method_details_acss_debit'] + affirm?: components['schemas']['payment_method_details_affirm'] afterpay_clearpay?: components['schemas']['payment_method_details_afterpay_clearpay'] alipay?: components['schemas']['payment_flows_private_payment_methods_alipay_details'] au_becs_debit?: components['schemas']['payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['payment_method_details_bacs_debit'] bancontact?: components['schemas']['payment_method_details_bancontact'] + blik?: components['schemas']['payment_method_details_blik'] boleto?: components['schemas']['payment_method_details_boleto'] card?: components['schemas']['payment_method_details_card'] card_present?: components['schemas']['payment_method_details_card_present'] + customer_balance?: components['schemas']['payment_method_details_customer_balance'] eps?: components['schemas']['payment_method_details_eps'] fpx?: components['schemas']['payment_method_details_fpx'] giropay?: components['schemas']['payment_method_details_giropay'] @@ -9683,9 +11809,14 @@ export interface components { ideal?: components['schemas']['payment_method_details_ideal'] interac_present?: components['schemas']['payment_method_details_interac_present'] klarna?: components['schemas']['payment_method_details_klarna'] + konbini?: components['schemas']['payment_method_details_konbini'] + link?: components['schemas']['payment_method_details_link'] multibanco?: components['schemas']['payment_method_details_multibanco'] oxxo?: components['schemas']['payment_method_details_oxxo'] p24?: components['schemas']['payment_method_details_p24'] + paynow?: components['schemas']['payment_method_details_paynow'] + pix?: components['schemas']['payment_method_details_pix'] + promptpay?: components['schemas']['payment_method_details_promptpay'] 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'] @@ -9695,6 +11826,7 @@ export interface components { * It contains information specific to the payment method. */ type: string + us_bank_account?: components['schemas']['payment_method_details_us_bank_account'] wechat?: components['schemas']['payment_method_details_wechat'] wechat_pay?: components['schemas']['payment_method_details_wechat_pay'] } @@ -9742,6 +11874,8 @@ export interface components { /** @description Transit number of the bank account. */ transit_number?: string | null } + /** payment_method_details_affirm */ + payment_method_details_affirm: { [key: string]: unknown } /** payment_method_details_afterpay_clearpay */ payment_method_details_afterpay_clearpay: { /** @description Order identifier shown to the merchant in Afterpay’s online portal. */ @@ -9795,6 +11929,8 @@ export interface components { */ verified_name?: string | null } + /** payment_method_details_blik */ + payment_method_details_blik: { [key: string]: unknown } /** payment_method_details_boleto */ payment_method_details_boleto: { /** @description The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) */ @@ -9828,6 +11964,8 @@ export interface components { installments?: components['schemas']['payment_method_details_card_installments'] | null /** @description The last four digits of the card. */ last4?: string | null + /** @description ID of the mandate used to make this payment or created by it. */ + mandate?: string | null /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ network?: string | null /** @description Populated if this transaction used 3D Secure authentication. */ @@ -9871,265 +12009,275 @@ export interface components { amount_authorized?: number | null /** @description Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ brand?: string | null - /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ - cardholder_name?: string | null - /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ - country?: string | null - /** @description Authorization response cryptogram. */ - emv_auth_data?: string | null - /** @description Two-digit number representing the card's expiration month. */ - exp_month: number - /** @description Four-digit number representing the card's expiration year. */ - exp_year: number - /** - * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - * - * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - */ - fingerprint?: string | null - /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ - funding?: string | null - /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ - generated_card?: string | null - /** @description The last four digits of the card. */ - last4?: string | null - /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ - network?: string | null - /** @description Defines whether the authorized amount can be over-captured or not */ - overcapture_supported?: boolean | null /** - * @description How card details were read in this transaction. - * @enum {string|null} - */ - read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null - /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ - receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null - } - /** payment_method_details_card_present_receipt */ - payment_method_details_card_present_receipt: { - /** - * @description The type of account being debited or credited - * @enum {string} - */ - account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' - /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ - application_cryptogram?: string | null - /** @description Mnenomic of the Application Identifier. */ - application_preferred_name?: string | null - /** @description Identifier for this transaction. */ - authorization_code?: string | null - /** @description EMV tag 8A. A code returned by the card issuer. */ - authorization_response_code?: string | null - /** @description How the cardholder verified ownership of the card. */ - cardholder_verification_method?: string | null - /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ - dedicated_file_name?: string | null - /** @description The outcome of a series of EMV functions performed by the card reader. */ - terminal_verification_results?: string | null - /** @description An indication of various EMV functions performed during the transaction. */ - transaction_status_information?: string | null - } - /** payment_method_details_card_wallet */ - payment_method_details_card_wallet: { - amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] - apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] - /** @description (For tokenized numbers only.) The last four digits of the device account number. */ - dynamic_last4?: string | null - google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] - masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] - samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] - /** - * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. - * @enum {string} - */ - type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' - visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] - } - /** payment_method_details_card_wallet_amex_express_checkout */ - payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } - /** payment_method_details_card_wallet_apple_pay */ - payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_google_pay */ - payment_method_details_card_wallet_google_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_masterpass */ - payment_method_details_card_wallet_masterpass: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_card_wallet_samsung_pay */ - payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } - /** payment_method_details_card_wallet_visa_checkout */ - payment_method_details_card_wallet_visa_checkout: { - /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - billing_address?: components['schemas']['address'] | null - /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - email?: string | null - /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - name?: string | null - /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ - shipping_address?: components['schemas']['address'] | null - } - /** payment_method_details_eps */ - payment_method_details_eps: { - /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - * @enum {string|null} - */ - bank?: - | ( - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - ) - | null - /** - * @description Owner's verified full name. Values are verified or provided by EPS directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * EPS rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_fpx */ - payment_method_details_fpx: { - /** - * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. - * @enum {string} - */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - /** @description Unique transaction id generated by FPX for every request from the merchant */ - transaction_id?: string | null - } - /** payment_method_details_giropay */ - payment_method_details_giropay: { - /** @description Bank code of bank associated with the bank account. */ - bank_code?: string | null - /** @description Name of the bank associated with the bank account. */ - bank_name?: string | null - /** @description Bank Identifier Code of the bank associated with the bank account. */ - bic?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by Giropay directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. - * Giropay rarely provides this information so the attribute is usually empty. - */ - verified_name?: string | null - } - /** payment_method_details_grabpay */ - payment_method_details_grabpay: { - /** @description Unique transaction id generated by GrabPay */ - transaction_id?: string | null - } - /** payment_method_details_ideal */ - payment_method_details_ideal: { - /** - * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - * @enum {string|null} - */ - bank?: - | ( - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - ) - | null - /** - * @description The Bank Identifier Code of the customer's bank. - * @enum {string|null} - */ - bic?: - | ( - | 'ABNANL2A' - | 'ASNBNL21' - | 'BUNQNL2A' - | 'FVLBNL22' - | 'HANDNL2A' - | 'INGBNL2A' - | 'KNABNL2H' - | 'MOYONL21' - | 'RABONL2U' - | 'RBRBNL21' - | 'REVOLT21' - | 'SNSBNL2A' - | 'TRIONL2U' - ) - | null - /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit?: (string | components['schemas']['payment_method']) | null - /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ - generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null - /** @description Last four characters of the IBAN. */ - iban_last4?: string | null - /** - * @description Owner's verified full name. Values are verified or provided by iDEAL directly - * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Format: unix-time + * @description When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. */ - verified_name?: string | null - } - /** payment_method_details_interac_present */ - payment_method_details_interac_present: { - /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ - brand?: string | null + capture_before?: number + /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ + cardholder_name?: string | null + /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ + country?: string | null + /** @description Authorization response cryptogram. */ + emv_auth_data?: string | null + /** @description Two-digit number representing the card's expiration month. */ + exp_month: number + /** @description Four-digit number representing the card's expiration year. */ + exp_year: number + /** + * @description Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + * + * *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + */ + fingerprint?: string | null + /** @description Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. */ + funding?: string | null + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string | null + /** @description Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). */ + incremental_authorization_supported: boolean + /** @description The last four digits of the card. */ + last4?: string | null + /** @description Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, `mastercard`, `unionpay`, `visa`, or `unknown`. */ + network?: string | null + /** @description Defines whether the authorized amount can be over-captured or not */ + overcapture_supported: boolean + /** + * @description How card details were read in this transaction. + * @enum {string|null} + */ + read_method?: ('contact_emv' | 'contactless_emv' | 'contactless_magstripe_mode' | 'magnetic_stripe_fallback' | 'magnetic_stripe_track2') | null + /** @description A collection of fields required to be displayed on receipts. Only required for EMV transactions. */ + receipt?: components['schemas']['payment_method_details_card_present_receipt'] | null + } + /** payment_method_details_card_present_receipt */ + payment_method_details_card_present_receipt: { + /** + * @description The type of account being debited or credited + * @enum {string} + */ + account_type?: 'checking' | 'credit' | 'prepaid' | 'unknown' + /** @description EMV tag 9F26, cryptogram generated by the integrated circuit chip. */ + application_cryptogram?: string | null + /** @description Mnenomic of the Application Identifier. */ + application_preferred_name?: string | null + /** @description Identifier for this transaction. */ + authorization_code?: string | null + /** @description EMV tag 8A. A code returned by the card issuer. */ + authorization_response_code?: string | null + /** @description How the cardholder verified ownership of the card. */ + cardholder_verification_method?: string | null + /** @description EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. */ + dedicated_file_name?: string | null + /** @description The outcome of a series of EMV functions performed by the card reader. */ + terminal_verification_results?: string | null + /** @description An indication of various EMV functions performed during the transaction. */ + transaction_status_information?: string | null + } + /** payment_method_details_card_wallet */ + payment_method_details_card_wallet: { + amex_express_checkout?: components['schemas']['payment_method_details_card_wallet_amex_express_checkout'] + apple_pay?: components['schemas']['payment_method_details_card_wallet_apple_pay'] + /** @description (For tokenized numbers only.) The last four digits of the device account number. */ + dynamic_last4?: string | null + google_pay?: components['schemas']['payment_method_details_card_wallet_google_pay'] + masterpass?: components['schemas']['payment_method_details_card_wallet_masterpass'] + samsung_pay?: components['schemas']['payment_method_details_card_wallet_samsung_pay'] + /** + * @description The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + * @enum {string} + */ + type: 'amex_express_checkout' | 'apple_pay' | 'google_pay' | 'masterpass' | 'samsung_pay' | 'visa_checkout' + visa_checkout?: components['schemas']['payment_method_details_card_wallet_visa_checkout'] + } + /** payment_method_details_card_wallet_amex_express_checkout */ + payment_method_details_card_wallet_amex_express_checkout: { [key: string]: unknown } + /** payment_method_details_card_wallet_apple_pay */ + payment_method_details_card_wallet_apple_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_google_pay */ + payment_method_details_card_wallet_google_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_masterpass */ + payment_method_details_card_wallet_masterpass: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_card_wallet_samsung_pay */ + payment_method_details_card_wallet_samsung_pay: { [key: string]: unknown } + /** payment_method_details_card_wallet_visa_checkout */ + payment_method_details_card_wallet_visa_checkout: { + /** @description Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + billing_address?: components['schemas']['address'] | null + /** @description Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + email?: string | null + /** @description Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + name?: string | null + /** @description Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. */ + shipping_address?: components['schemas']['address'] | null + } + /** payment_method_details_customer_balance */ + payment_method_details_customer_balance: { [key: string]: unknown } + /** payment_method_details_eps */ + payment_method_details_eps: { + /** + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @enum {string|null} + */ + bank?: + | ( + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + ) + | null + /** + * @description Owner's verified full name. Values are verified or provided by EPS directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * EPS rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_fpx */ + payment_method_details_fpx: { + /** + * @description The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, or `pb_enterprise`. + * @enum {string} + */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + /** @description Unique transaction id generated by FPX for every request from the merchant */ + transaction_id?: string | null + } + /** payment_method_details_giropay */ + payment_method_details_giropay: { + /** @description Bank code of bank associated with the bank account. */ + bank_code?: string | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Bank Identifier Code of the bank associated with the bank account. */ + bic?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by Giropay directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + * Giropay rarely provides this information so the attribute is usually empty. + */ + verified_name?: string | null + } + /** payment_method_details_grabpay */ + payment_method_details_grabpay: { + /** @description Unique transaction id generated by GrabPay */ + transaction_id?: string | null + } + /** payment_method_details_ideal */ + payment_method_details_ideal: { + /** + * @description The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + * @enum {string|null} + */ + bank?: + | ( + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + ) + | null + /** + * @description The Bank Identifier Code of the customer's bank. + * @enum {string|null} + */ + bic?: + | ( + | 'ABNANL2A' + | 'ASNBNL21' + | 'BUNQNL2A' + | 'FVLBNL22' + | 'HANDNL2A' + | 'INGBNL2A' + | 'KNABNL2H' + | 'MOYONL21' + | 'RABONL2U' + | 'RBRBNL21' + | 'REVOLT21' + | 'SNSBNL2A' + | 'TRIONL2U' + ) + | null + /** @description The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit?: (string | components['schemas']['payment_method']) | null + /** @description The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. */ + generated_sepa_debit_mandate?: (string | components['schemas']['mandate']) | null + /** @description Last four characters of the IBAN. */ + iban_last4?: string | null + /** + * @description Owner's verified full name. Values are verified or provided by iDEAL directly + * (if supported) at the time of authorization or settlement. They cannot be set or mutated. + */ + verified_name?: string | null + } + /** payment_method_details_interac_present */ + payment_method_details_interac_present: { + /** @description Card brand. Can be `interac`, `mastercard` or `visa`. */ + brand?: string | null /** @description The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. */ cardholder_name?: string | null /** @description Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. */ @@ -10197,10 +12345,25 @@ export interface components { payment_method_category?: string | null /** * @description Preferred language of the Klarna authorization page that the customer is redirected to. - * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + * Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` */ preferred_locale?: string | null } + /** payment_method_details_konbini */ + payment_method_details_konbini: { + /** @description If the payment succeeded, this contains the details of the convenience store where the payment was completed. */ + store?: components['schemas']['payment_method_details_konbini_store'] | null + } + /** payment_method_details_konbini_store */ + payment_method_details_konbini_store: { + /** + * @description The name of the convenience store chain where the payment was completed. + * @enum {string|null} + */ + chain?: ('familymart' | 'lawson' | 'ministop' | 'seicomart') | null + } + /** payment_method_details_link */ + payment_method_details_link: { [key: string]: unknown } /** payment_method_details_multibanco */ payment_method_details_multibanco: { /** @description Entity number associated with this Multibanco payment. */ @@ -10257,6 +12420,21 @@ export interface components { */ verified_name?: string | null } + /** payment_method_details_paynow */ + payment_method_details_paynow: { + /** @description Reference number associated with this PayNow payment */ + reference?: string | null + } + /** payment_method_details_pix */ + payment_method_details_pix: { + /** @description Unique transaction id generated by BCB */ + bank_transaction_id?: string | null + } + /** payment_method_details_promptpay */ + payment_method_details_promptpay: { + /** @description Bill reference generated by PromptPay */ + reference?: string | null + } /** payment_method_details_sepa_debit */ payment_method_details_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10302,6 +12480,27 @@ export interface components { } /** payment_method_details_stripe_account */ payment_method_details_stripe_account: { [key: string]: unknown } + /** payment_method_details_us_bank_account */ + payment_method_details_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description Name of the bank associated with the bank account. */ + bank_name?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_details_wechat */ payment_method_details_wechat: { [key: string]: unknown } /** payment_method_details_wechat_pay */ @@ -10314,7 +12513,7 @@ export interface components { /** payment_method_eps */ payment_method_eps: { /** - * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + * @description The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. * @enum {string|null} */ bank?: @@ -10329,6 +12528,7 @@ export interface components { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -10434,18 +12634,78 @@ export interface components { /** @description The customer's date of birth, if provided. */ dob?: components['schemas']['payment_flows_private_payment_methods_klarna_dob'] | null } + /** payment_method_konbini */ + payment_method_konbini: { [key: string]: unknown } + /** payment_method_link */ + payment_method_link: { + /** @description Account owner's email address. */ + email?: string | null + /** @description Token used for persistent Link logins. */ + persistent_token?: string + } + /** payment_method_options_affirm */ + payment_method_options_affirm: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_afterpay_clearpay */ payment_method_options_afterpay_clearpay: { /** - * @description Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** + * @description Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about * the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. */ reference?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_alipay */ - payment_method_options_alipay: { [key: string]: unknown } + payment_method_options_alipay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_bacs_debit */ - payment_method_options_bacs_debit: { [key: string]: unknown } + payment_method_options_bacs_debit: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } /** payment_method_options_bancontact */ payment_method_options_bancontact: { /** @@ -10453,11 +12713,29 @@ export interface components { * @enum {string} */ preferred_language: 'de' | 'en' | 'fr' | 'nl' + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_boleto */ payment_method_options_boleto: { /** @description The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } /** payment_method_options_card_installments */ payment_method_options_card_installments: { @@ -10468,30 +12746,255 @@ export interface components { /** @description Installment plan selected for this PaymentIntent. */ plan?: components['schemas']['payment_method_details_card_installments_plan'] | null } + /** payment_method_options_card_mandate_options */ + payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } /** payment_method_options_card_present */ - payment_method_options_card_present: { [key: string]: unknown } + payment_method_options_card_present: { + /** @description Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) */ + request_extended_authorization?: boolean | null + /** @description Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. */ + request_incremental_authorization_support?: boolean | null + } + /** payment_method_options_customer_balance */ + payment_method_options_customer_balance: { + bank_transfer?: components['schemas']['payment_method_options_customer_balance_bank_transfer'] + /** + * @description The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + * @enum {string|null} + */ + funding_type?: 'bank_transfer' | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_customer_balance_bank_transfer */ + payment_method_options_customer_balance_bank_transfer: { + eu_bank_transfer?: components['schemas']['payment_method_options_customer_balance_eu_bank_account'] + /** + * @description List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + * + * Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + */ + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** + * @description The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, or `mx_bank_transfer`. + * @enum {string|null} + */ + type?: ('eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer') | null + } + /** payment_method_options_customer_balance_eu_bank_account */ + payment_method_options_customer_balance_eu_bank_account: { + /** + * @description The desired country code of the bank account information. Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`. + * @enum {string} + */ + country: 'DE' | 'ES' | 'FR' | 'IE' | 'NL' + } /** payment_method_options_fpx */ - payment_method_options_fpx: { [key: string]: unknown } + payment_method_options_fpx: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_giropay */ - payment_method_options_giropay: { [key: string]: unknown } + payment_method_options_giropay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_grabpay */ - payment_method_options_grabpay: { [key: string]: unknown } + payment_method_options_grabpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_ideal */ - payment_method_options_ideal: { [key: string]: unknown } + payment_method_options_ideal: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' + } /** payment_method_options_interac_present */ payment_method_options_interac_present: { [key: string]: unknown } /** payment_method_options_klarna */ payment_method_options_klarna: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' /** @description Preferred locale of the Klarna checkout page that the customer is redirected to. */ preferred_locale?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_konbini */ + payment_method_options_konbini: { + /** @description An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. */ + confirmation_number?: string | null + /** @description The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. */ + expires_after_days?: number | null + /** + * Format: unix-time + * @description The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + */ + expires_at?: number | null + /** @description A product descriptor of up to 22 characters, which will appear to customers at the convenience store. */ + product_description?: string | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_oxxo */ payment_method_options_oxxo: { /** @description The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. */ expires_after_days: number + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' } /** payment_method_options_p24 */ - payment_method_options_p24: { [key: string]: unknown } + payment_method_options_p24: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paynow */ + payment_method_options_paynow: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_paypal */ + payment_method_options_paypal: { + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'manual' + /** @description Preferred locale of the PayPal checkout page that the customer is redirected to. */ + preferred_locale?: string | null + } + /** payment_method_options_pix */ + payment_method_options_pix: { + /** @description The number of seconds (between 10 and 1209600) after which Pix payment will expire. */ + expires_after_seconds?: number | null + /** @description The timestamp at which the Pix expires. */ + expires_at?: number | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_options_promptpay */ + payment_method_options_promptpay: { + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } /** payment_method_options_sofort */ payment_method_options_sofort: { /** @@ -10499,6 +13002,15 @@ export interface components { * @enum {string|null} */ preferred_language?: ('de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl') | null + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' | 'off_session' } /** payment_method_options_wechat_pay */ payment_method_options_wechat_pay: { @@ -10509,8 +13021,17 @@ export interface components { * @enum {string|null} */ client?: ('android' | 'ios' | 'web') | null - } - /** payment_method_oxxo */ + /** + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * @enum {string} + */ + setup_future_usage?: 'none' + } + /** payment_method_oxxo */ payment_method_oxxo: { [key: string]: unknown } /** payment_method_p24 */ payment_method_p24: { @@ -10548,6 +13069,12 @@ export interface components { ) | null } + /** payment_method_paynow */ + payment_method_paynow: { [key: string]: unknown } + /** payment_method_pix */ + payment_method_pix: { [key: string]: unknown } + /** payment_method_promptpay */ + payment_method_promptpay: { [key: string]: unknown } /** payment_method_sepa_debit */ payment_method_sepa_debit: { /** @description Bank code of bank associated with the bank account. */ @@ -10568,6 +13095,31 @@ export interface components { /** @description Two-letter ISO code representing the country the bank account is located in. */ country?: string | null } + /** payment_method_us_bank_account */ + payment_method_us_bank_account: { + /** + * @description Account holder type: individual or company. + * @enum {string|null} + */ + account_holder_type?: ('company' | 'individual') | null + /** + * @description Account type: checkings or savings. Defaults to checking if omitted. + * @enum {string|null} + */ + account_type?: ('checking' | 'savings') | null + /** @description The name of the bank. */ + bank_name?: string | null + /** @description The ID of the Financial Connections Account used to create the payment method. */ + financial_connections_account?: string | null + /** @description Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. */ + fingerprint?: string | null + /** @description Last four digits of the bank account number. */ + last4?: string | null + /** @description Contains information about US bank account networks that can be used. */ + networks?: components['schemas']['us_bank_account_networks'] | null + /** @description Routing number of the bank account. */ + routing_number?: string | null + } /** payment_method_wechat_pay */ payment_method_wechat_pay: { [key: string]: unknown } /** PaymentPagesCheckoutSessionAfterExpiration */ @@ -10611,6 +13163,11 @@ export interface components { * @enum {string|null} */ promotions?: ('opt_in' | 'opt_out') | null + /** + * @description If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + * @enum {string|null} + */ + terms_of_service?: 'accepted' | null } /** PaymentPagesCheckoutSessionConsentCollection */ payment_pages_checkout_session_consent_collection: { @@ -10620,23 +13177,32 @@ export interface components { * from the merchant depending on the customer's locale. Only available to US merchants. * @enum {string|null} */ - promotions?: 'auto' | null + promotions?: ('auto' | 'none') | null + /** + * @description If set to `required`, it requires customers to accept the terms of service before being able to pay. + * @enum {string|null} + */ + terms_of_service?: ('none' | 'required') | null } /** PaymentPagesCheckoutSessionCustomerDetails */ payment_pages_checkout_session_customer_details: { + /** @description The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + address?: components['schemas']['address'] | null /** - * @description The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. + * @description The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. * Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. */ email?: string | null - /** @description The customer's phone number at the time of checkout */ + /** @description The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. */ + name?: string | null + /** @description The customer's phone number after a completed Checkout Session. */ phone?: string | null /** - * @description The customer’s tax exempt status at time of checkout. + * @description The customer’s tax exempt status after a completed Checkout Session. * @enum {string|null} */ tax_exempt?: ('exempt' | 'none' | 'reverse') | null - /** @description The customer’s tax IDs at time of checkout. */ + /** @description The customer’s tax IDs after a completed Checkout Session. */ tax_ids?: components['schemas']['payment_pages_checkout_session_tax_id'][] | null } /** PaymentPagesCheckoutSessionPhoneNumberCollection */ @@ -10890,6 +13456,19 @@ export interface components { | 'ZZ' )[] } + /** PaymentPagesCheckoutSessionShippingCost */ + payment_pages_checkout_session_shipping_cost: { + /** @description Total shipping cost before any discounts or taxes are applied. */ + amount_subtotal: number + /** @description Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. */ + amount_tax: number + /** @description Total shipping cost after discounts and taxes are applied. */ + amount_total: number + /** @description The ID of the ShippingRate for this order. */ + shipping_rate?: (string | components['schemas']['shipping_rate']) | null + /** @description The taxes applied to the shipping rate. */ + taxes?: components['schemas']['line_items_tax_amount'][] + } /** PaymentPagesCheckoutSessionShippingOption */ payment_pages_checkout_session_shipping_option: { /** @description A non-negative integer in cents representing how much to charge. */ @@ -10900,13 +13479,14 @@ export interface components { /** PaymentPagesCheckoutSessionTaxID */ payment_pages_checkout_session_tax_id: { /** - * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + * @description The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, or `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -10918,10 +13498,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -10941,6 +13523,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -10957,27 +13540,25 @@ export interface components { } /** PaymentPagesCheckoutSessionTotalDetails */ payment_pages_checkout_session_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['payment_pages_checkout_session_total_details_resource_breakdown'] } /** PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown */ payment_pages_checkout_session_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** Polymorphic */ payment_source: | components['schemas']['account'] - | components['schemas']['alipay_account'] | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] | components['schemas']['card'] | components['schemas']['source'] /** @@ -11108,6 +13689,8 @@ export interface components { id: string /** @description Whether the person's `id_number` was provided. */ id_number_provided?: boolean + /** @description Whether the person's `id_number_secondary` was provided. */ + id_number_secondary_provided?: boolean /** @description The person's last name. */ last_name?: string | null /** @description The Kana variation of the person's last name (Japan only). */ @@ -11132,6 +13715,7 @@ export interface components { * @enum {string} */ political_exposure?: 'existing' | 'none' + registered_address?: components['schemas']['address'] relationship?: components['schemas']['person_relationship'] requirements?: components['schemas']['person_requirements'] | null /** @description Whether the last four digits of the person's Social Security number have been provided (U.S. only). */ @@ -11300,9 +13884,9 @@ export interface components { /** @description The messaging shown to customers in the portal. */ headline?: string | null /** @description A link to the business’s publicly available privacy policy. */ - privacy_policy_url: string + privacy_policy_url?: string | null /** @description A link to the business’s publicly available terms of service. */ - terms_of_service_url: string + terms_of_service_url?: string | null } /** PortalCustomerUpdate */ portal_customer_update: { @@ -11325,6 +13909,17 @@ export interface components { /** @description Whether the feature is enabled. */ enabled: boolean } + /** PortalLoginPage */ + portal_login_page: { + /** + * @description If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + * + * If `false`, the previously generated `url`, if any, will be deactivated. + */ + enabled: boolean + /** @description A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. */ + url?: string | null + } /** PortalPaymentMethodUpdate */ portal_payment_method_update: { /** @description Whether the feature is enabled. */ @@ -11403,6 +13998,10 @@ export interface components { created: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['currency_option'] } + /** @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ + custom_unit_amount?: components['schemas']['custom_unit_amount'] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -11487,6 +14086,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: (string | components['schemas']['price']) | null /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ description?: string | null /** @description Unique identifier for the object. */ @@ -11497,7 +14098,7 @@ export interface components { livemode: boolean /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ + /** @description The product's name, meant to be displayable to the customer. */ name: string /** * @description String representing the object's type. Objects of the same type share the same value. @@ -11510,7 +14111,7 @@ export interface components { shippable?: boolean | null /** @description Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. */ statement_descriptor?: string | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ tax_code?: (string | components['schemas']['tax_code']) | null /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ unit_label?: string | null @@ -11524,7 +14125,7 @@ export interface components { } /** * PromotionCode - * @description A Promotion Code represents a customer-redeemable code for a coupon. It can be used to + * @description A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to * create multiple codes for a single coupon. */ promotion_code: { @@ -11562,8 +14163,15 @@ export interface components { /** @description Number of times this promotion code has been used. */ times_redeemed: number } + /** PromotionCodeCurrencyOption */ + promotion_code_currency_option: { + /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ + minimum_amount: number + } /** PromotionCodesResourceRestrictions */ promotion_codes_resource_restrictions: { + /** @description Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['promotion_code_currency_option'] } /** @description A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices */ first_time_transaction: boolean /** @description Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). */ @@ -11581,6 +14189,8 @@ export interface components { amount_subtotal: number /** @description Total after discounts and taxes are applied. */ amount_total: number + /** @description ID of the Connect Application that created the quote. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. */ application_fee_amount?: number | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. */ @@ -11665,6 +14275,8 @@ export interface components { subscription_data: components['schemas']['quotes_resource_subscription_data'] /** @description The subscription schedule that was created or updated from this quote. */ subscription_schedule?: (string | components['schemas']['subscription_schedule']) | null + /** @description ID of the test clock this quote belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null total_details: components['schemas']['quotes_resource_total_details'] /** @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. */ transfer_data?: components['schemas']['quotes_resource_transfer_data'] | null @@ -11727,6 +14339,8 @@ export interface components { } /** QuotesResourceSubscriptionData */ quotes_resource_subscription_data: { + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. @@ -11737,19 +14351,19 @@ export interface components { } /** QuotesResourceTotalDetails */ quotes_resource_total_details: { - /** @description This is the sum of all the line item discounts. */ + /** @description This is the sum of all the discounts. */ amount_discount: number - /** @description This is the sum of all the line item shipping amounts. */ + /** @description This is the sum of all the shipping amounts. */ amount_shipping?: number | null - /** @description This is the sum of all the line item tax amounts. */ + /** @description This is the sum of all the tax amounts. */ amount_tax: number breakdown?: components['schemas']['quotes_resource_total_details_resource_breakdown'] } /** QuotesResourceTotalDetailsResourceBreakdown */ quotes_resource_total_details_resource_breakdown: { - /** @description The aggregated line item discounts. */ + /** @description The aggregated discounts. */ discounts: components['schemas']['line_items_discount_amount'][] - /** @description The aggregated line item tax amounts by rate. */ + /** @description The aggregated tax amounts by rate. */ taxes: components['schemas']['line_items_tax_amount'][] } /** QuotesResourceTransferData */ @@ -11897,6 +14511,14 @@ export interface components { /** @description The identifier of the value list this item belongs to. */ value_list: string } + /** + * RadarRadarOptions + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_radar_options: { + /** @description A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. */ + session?: string + } /** RadarReviewResourceLocation */ radar_review_resource_location: { /** @description The city where the payment originated. */ @@ -11921,63 +14543,15 @@ export interface components { /** @description The version for the browser session (e.g., `61.0.3163.100`). */ version?: string | null } - /** - * TransferRecipient - * @description With `Recipient` objects, you can transfer money from your Stripe account to a - * third-party bank account or debit card. The API allows you to create, delete, - * and update your recipients. You can retrieve individual recipients as well as - * a list of all your recipients. - * - * **`Recipient` objects have been deprecated in favor of - * [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - * [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - * recipients can no longer begin doing so. Please use `Account` objects - * instead.** - */ - recipient: { - /** @description Hash describing the current account on the recipient, if there is one. */ - active_account?: components['schemas']['bank_account'] | null - /** CardList */ - cards?: { - data: components['schemas']['card'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } | null - /** - * Format: unix-time - * @description Time at which the object was created. Measured in seconds since the Unix epoch. - */ - created: number - /** @description The default card to use for creating transfers to this recipient. */ - default_card?: (string | components['schemas']['card']) | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string | null - email?: string | null - /** @description Unique identifier for the object. */ + /** received_payment_method_details_financial_account */ + received_payment_method_details_financial_account: { + /** @description The FinancialAccount ID. */ id: string - /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ - livemode: boolean - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ - metadata: { [key: string]: string } - /** @description The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) this recipient was migrated to. If set, the recipient can no longer be updated, nor can transfers be made to it: use the Custom account instead. */ - migrated_to?: (string | components['schemas']['account']) | null - /** @description Full, legal name of the recipient. */ - name?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. + * @description The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. * @enum {string} */ - object: 'recipient' - rolled_back_from?: string | components['schemas']['account'] - /** @description Type of the recipient, one of `individual` or `corporation`. */ - type: string + network: 'stripe' } /** Recurring */ recurring: { @@ -12029,8 +14603,11 @@ export interface components { failure_reason?: string /** @description Unique identifier for the object. */ id: string + /** @description Email to which refund instructions, if required, are sent to. */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ metadata?: { [key: string]: string } | null + next_action?: components['schemas']['refund_next_action'] /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} @@ -12047,11 +14624,27 @@ export interface components { receipt_number?: string | null /** @description The transfer reversal that is associated with the refund. Only present if the charge came from another Stripe account. See the Connect documentation for details. */ source_transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null - /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ + /** @description Status of the refund. For credit card refunds, this can be `pending`, `succeeded`, or `failed`. For other types of refunds, it can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) documentation for more details. */ status?: string | null /** @description If the accompanying transfer was reversed, the transfer reversal object. Only applicable if the charge was created using the destination parameter. */ transfer_reversal?: (string | components['schemas']['transfer_reversal']) | null } + /** RefundNextAction */ + refund_next_action: { + /** @description Contains the refund details. */ + display_details?: components['schemas']['refund_next_action_display_details'] | null + /** @description Type of the next action to perform. */ + type: string + } + /** RefundNextActionDisplayDetails */ + refund_next_action_display_details: { + email_sent: components['schemas']['email_sent'] + /** + * Format: unix-time + * @description The expiry timestamp. + */ + expires_at: number + } /** * reporting_report_run * @description The Report Run object represents an instance of a report type generated with @@ -12267,6 +14860,16 @@ export interface components { /** @description Whether Stripe automatically computes tax on invoices created during this phase. */ enabled: boolean } + /** SecretServiceResourceScope */ + secret_service_resource_scope: { + /** + * @description The secret scope type. + * @enum {string} + */ + type: 'account' | 'user' + /** @description The user ID, if type is set to "user" */ + user?: string + } /** sepa_debit_generated_from */ sepa_debit_generated_from: { /** @description The ID of the Charge that generated this PaymentMethod, if any. */ @@ -12284,6 +14887,12 @@ export interface components { setup_attempt: { /** @description The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. @@ -12291,6 +14900,12 @@ export interface components { created: number /** @description The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. */ customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ @@ -12320,14 +14935,17 @@ export interface components { au_becs_debit?: components['schemas']['setup_attempt_payment_method_details_au_becs_debit'] bacs_debit?: components['schemas']['setup_attempt_payment_method_details_bacs_debit'] bancontact?: components['schemas']['setup_attempt_payment_method_details_bancontact'] + blik?: components['schemas']['setup_attempt_payment_method_details_blik'] boleto?: components['schemas']['setup_attempt_payment_method_details_boleto'] card?: components['schemas']['setup_attempt_payment_method_details_card'] card_present?: components['schemas']['setup_attempt_payment_method_details_card_present'] ideal?: components['schemas']['setup_attempt_payment_method_details_ideal'] + link?: components['schemas']['setup_attempt_payment_method_details_link'] sepa_debit?: components['schemas']['setup_attempt_payment_method_details_sepa_debit'] sofort?: components['schemas']['setup_attempt_payment_method_details_sofort'] /** @description The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. */ type: string + us_bank_account?: components['schemas']['setup_attempt_payment_method_details_us_bank_account'] } /** setup_attempt_payment_method_details_acss_debit */ setup_attempt_payment_method_details_acss_debit: { [key: string]: unknown } @@ -12361,6 +14979,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_blik */ + setup_attempt_payment_method_details_blik: { [key: string]: unknown } /** setup_attempt_payment_method_details_boleto */ setup_attempt_payment_method_details_boleto: { [key: string]: unknown } /** setup_attempt_payment_method_details_card */ @@ -12429,6 +15049,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_link */ + setup_attempt_payment_method_details_link: { [key: string]: unknown } /** setup_attempt_payment_method_details_sepa_debit */ setup_attempt_payment_method_details_sepa_debit: { [key: string]: unknown } /** setup_attempt_payment_method_details_sofort */ @@ -12457,6 +15079,8 @@ export interface components { */ verified_name?: string | null } + /** setup_attempt_payment_method_details_us_bank_account */ + setup_attempt_payment_method_details_us_bank_account: { [key: string]: unknown } /** * SetupIntent * @description A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. @@ -12485,6 +15109,12 @@ export interface components { setup_intent: { /** @description ID of the Connect application that created the SetupIntent. */ application?: (string | components['schemas']['application']) | null + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean /** * @description Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. * @enum {string|null} @@ -12493,7 +15123,7 @@ export interface components { /** * @description The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. * - * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + * The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, 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 /** @@ -12509,6 +15139,12 @@ export interface components { customer?: (string | components['schemas']['customer'] | components['schemas']['deleted_customer']) | null /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string | null + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] | null /** @description Unique identifier for the object. */ id: string /** @description The error encountered in the previous SetupIntent confirmation. */ @@ -12575,12 +15211,30 @@ export interface components { arrival_date: number /** @description The URL for the hosted verification page, which allows customers to verify their bank account. */ hosted_verification_url: string + /** + * @description The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + * @enum {string|null} + */ + microdeposit_type?: ('amounts' | 'descriptor_code') | null } /** SetupIntentPaymentMethodOptions */ setup_intent_payment_method_options: { - acss_debit?: components['schemas']['setup_intent_payment_method_options_acss_debit'] + acss_debit?: + | components['schemas']['setup_intent_payment_method_options_acss_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + blik?: + | components['schemas']['setup_intent_payment_method_options_blik'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] card?: components['schemas']['setup_intent_payment_method_options_card'] - sepa_debit?: components['schemas']['setup_intent_payment_method_options_sepa_debit'] + link?: + | components['schemas']['setup_intent_payment_method_options_link'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + sepa_debit?: + | components['schemas']['setup_intent_payment_method_options_sepa_debit'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] + us_bank_account?: + | components['schemas']['setup_intent_payment_method_options_us_bank_account'] + | components['schemas']['setup_intent_type_specific_payment_method_options_client'] } /** setup_intent_payment_method_options_acss_debit */ setup_intent_payment_method_options_acss_debit: { @@ -12596,14 +15250,65 @@ export interface components { */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } + /** setup_intent_payment_method_options_blik */ + setup_intent_payment_method_options_blik: { + mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_blik'] + } /** setup_intent_payment_method_options_card */ setup_intent_payment_method_options_card: { + /** @description Configuration options for setting up an eMandate for cards issued in India. */ + mandate_options?: components['schemas']['setup_intent_payment_method_options_card_mandate_options'] | null + /** + * @description Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Permitted values include: `automatic` or `any`. If not provided, defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} */ request_three_d_secure?: ('any' | 'automatic' | 'challenge_only') | null } + /** setup_intent_payment_method_options_card_mandate_options */ + setup_intent_payment_method_options_card_mandate_options: { + /** @description Amount to be charged for future payments. */ + amount: number + /** + * @description One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + * @enum {string} + */ + amount_type: 'fixed' | 'maximum' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description A description of the mandate or subscription that is meant to be displayed to the customer. */ + description?: string | null + /** + * Format: unix-time + * @description End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + */ + end_date?: number | null + /** + * @description Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + * @enum {string} + */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + /** @description The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. */ + interval_count?: number | null + /** @description Unique identifier for the mandate or subscription. */ + reference: string + /** + * Format: unix-time + * @description Start date of the mandate or subscription. Start date should not be lesser than yesterday. + */ + start_date: number + /** @description Specifies the type of mandates supported. Possible values are `india`. */ + supported_types?: 'india'[] | null + } + /** setup_intent_payment_method_options_link */ + setup_intent_payment_method_options_link: { + /** @description Token used for persistent Link logins. */ + persistent_token?: string | null + } /** setup_intent_payment_method_options_mandate_options_acss_debit */ setup_intent_payment_method_options_mandate_options_acss_debit: { /** @description A URL for custom mandate text */ @@ -12623,41 +15328,60 @@ export interface components { */ transaction_type?: ('business' | 'personal') | null } + /** setup_intent_payment_method_options_mandate_options_blik */ + setup_intent_payment_method_options_mandate_options_blik: { + /** + * Format: unix-time + * @description Date at which the mandate expires. + */ + expires_after?: number | null + off_session?: components['schemas']['mandate_options_off_session_details_blik'] + /** + * @description Type of the mandate. + * @enum {string|null} + */ + type?: ('off_session' | 'on_session') | null + } /** setup_intent_payment_method_options_mandate_options_sepa_debit */ setup_intent_payment_method_options_mandate_options_sepa_debit: { [key: string]: unknown } /** setup_intent_payment_method_options_sepa_debit */ setup_intent_payment_method_options_sepa_debit: { mandate_options?: components['schemas']['setup_intent_payment_method_options_mandate_options_sepa_debit'] } + /** setup_intent_payment_method_options_us_bank_account */ + setup_intent_payment_method_options_us_bank_account: { + financial_connections?: components['schemas']['linked_account_options_us_bank_account'] + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** SetupIntentTypeSpecificPaymentMethodOptionsClient */ + setup_intent_type_specific_payment_method_options_client: { + /** + * @description Bank account verification method. + * @enum {string} + */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } /** Shipping */ shipping: { address?: components['schemas']['address'] /** @description The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. */ carrier?: string | null /** @description Recipient name. */ - name?: string | null + name?: string /** @description Recipient phone (including extension). */ phone?: string | null /** @description The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. */ tracking_number?: string | null } - /** ShippingMethod */ - shipping_method: { - /** @description A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the line item. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The estimated delivery date for the given shipping method. Can be either a specific date or a range. */ - delivery_estimate?: components['schemas']['delivery_estimate'] | null - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description: string - /** @description Unique identifier for the object. */ - id: string - } /** * ShippingRate * @description Shipping rates describe the price of shipping presented to your customers and can be - * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + * applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + * and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. */ shipping_rate: { /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ @@ -12688,7 +15412,7 @@ export interface components { * @enum {string|null} */ tax_behavior?: ('exclusive' | 'inclusive' | 'unspecified') | null - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ tax_code?: (string | components['schemas']['tax_code']) | null /** * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. @@ -12696,6 +15420,16 @@ export interface components { */ type: 'fixed_amount' } + /** ShippingRateCurrencyOption */ + shipping_rate_currency_option: { + /** @description A non-negative integer in cents representing how much to charge. */ + amount: number + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior: 'exclusive' | 'inclusive' | 'unspecified' + } /** ShippingRateDeliveryEstimate */ shipping_rate_delivery_estimate: { /** @description The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. */ @@ -12719,6 +15453,8 @@ export interface components { amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { [key: string]: components['schemas']['shipping_rate_currency_option'] } } /** SigmaScheduledQueryRunError */ sigma_scheduled_query_run_error: { @@ -12733,8 +15469,6 @@ export interface components { * the `size: large`, `color: red` version of that shirt. * * Can also be used to manage inventory. - * - * Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). */ sku: { /** @description Whether the SKU is available for purchase. */ @@ -13309,29 +16043,6 @@ export interface components { qr_code_url?: string | null statement_descriptor?: string } - /** StatusTransitions */ - status_transitions: { - /** - * Format: unix-time - * @description The time that the order was canceled. - */ - canceled?: number | null - /** - * Format: unix-time - * @description The time that the order was fulfilled. - */ - fulfiled?: number | null - /** - * Format: unix-time - * @description The time that the order was paid. - */ - paid?: number | null - /** - * Format: unix-time - * @description The time that the order was returned. - */ - returned?: number | null - } /** * Subscription * @description Subscriptions allow you to charge a customer on a recurring basis. @@ -13339,12 +16050,14 @@ export interface components { * Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). */ subscription: { + /** @description ID of the Connect Application that created the subscription. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. */ application_fee_percent?: number | null automatic_tax: components['schemas']['subscription_automatic_tax'] /** * Format: unix-time - * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description Determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period */ @@ -13371,6 +16084,8 @@ export interface components { * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** * Format: unix-time * @description End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. @@ -13388,18 +16103,11 @@ export interface components { /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: - | ( - | string - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - ) - | null + default_source?: (string | components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source']) | null /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string | null /** @description Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. */ discount?: components['schemas']['discount'] | null /** @@ -13472,6 +16180,8 @@ export interface components { * @enum {string} */ status: 'active' | 'canceled' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** @description ID of the test clock this subscription belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null /** @description The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ transfer_data?: components['schemas']['subscription_transfer_data'] | null /** @@ -13532,6 +16242,11 @@ export interface components { /** subscription_payment_method_options_card */ subscription_payment_method_options_card: { mandate_options?: components['schemas']['invoice_mandate_options_card'] + /** + * @description Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + * @enum {string|null} + */ + network?: ('amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa') | null /** * @description We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. * @enum {string|null} @@ -13555,6 +16270,8 @@ export interface components { * Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). */ subscription_schedule: { + /** @description ID of the Connect Application that created the schedule. */ + application?: (string | components['schemas']['application'] | components['schemas']['deleted_application']) | null /** * Format: unix-time * @description Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. @@ -13607,6 +16324,8 @@ export interface components { status: 'active' | 'canceled' | 'completed' | 'not_started' | 'released' /** @description ID of the subscription managed by the subscription schedule. */ subscription?: (string | components['schemas']['subscription']) | null + /** @description ID of the test clock this subscription schedule belongs to. */ + test_clock?: (string | components['schemas']['test_helpers.test_clock']) | null } /** * SubscriptionScheduleAddInvoiceItem @@ -13652,7 +16371,7 @@ export interface components { * @description A phase describes the plans, coupon, and trialing status of a subscription for a predefined time period. */ subscription_schedule_phase_configuration: { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this phase. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. */ add_invoice_items: components['schemas']['subscription_schedule_add_invoice_item'][] /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account during this phase of the schedule. */ application_fee_percent?: number | null @@ -13671,10 +16390,14 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the coupon to use during this phase of the subscription schedule. */ coupon?: (string | components['schemas']['coupon'] | components['schemas']['deleted_coupon']) | null + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null /** @description The default tax rates to apply to the subscription during this phase of the subscription schedule. */ default_tax_rates?: components['schemas']['tax_rate'][] | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** * Format: unix-time * @description The end of this phase of the subscription schedule. @@ -13684,6 +16407,8 @@ export interface components { invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description Subscription items to configure the subscription to during this phase of the subscription schedule. */ items: components['schemas']['subscription_schedule_configuration_item'][] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. */ + metadata?: { [key: string]: string } | null /** * @description If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. * @enum {string} @@ -13721,6 +16446,8 @@ export interface components { collection_method?: ('charge_automatically' | 'send_invoice') | null /** @description ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. */ default_payment_method?: (string | components['schemas']['payment_method']) | null + /** @description Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription. */ + description?: string | null /** @description The subscription schedule's default invoice settings. */ invoice_settings?: components['schemas']['invoice_setting_subscription_schedule_setting'] | null /** @description The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. */ @@ -13763,6 +16490,12 @@ export interface components { bancontact?: components['schemas']['invoice_payment_method_options_bancontact'] | null /** @description This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. */ card?: components['schemas']['subscription_payment_method_options_card'] | null + /** @description This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. */ + customer_balance?: components['schemas']['invoice_payment_method_options_customer_balance'] | null + /** @description This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. */ + konbini?: components['schemas']['invoice_payment_method_options_konbini'] | null + /** @description This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. */ + us_bank_account?: components['schemas']['invoice_payment_method_options_us_bank_account'] | null } /** SubscriptionsResourcePaymentSettings */ subscriptions_resource_payment_settings: { @@ -13779,15 +16512,26 @@ export interface components { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | null + /** + * @description Either `off`, or `on_subscription`. With `on_subscription` Stripe updates `subscription.default_payment_method` when a subscription payment succeeds. + * @enum {string|null} + */ + save_default_payment_method?: ('off' | 'on_subscription') | null } /** * SubscriptionsResourcePendingUpdate @@ -13797,7 +16541,7 @@ export interface components { subscriptions_resource_pending_update: { /** * Format: unix-time - * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number | null /** @@ -13817,7 +16561,7 @@ export interface components { } /** * TaxProductResourceTaxCode - * @description [Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods and services for tax purposes. + * @description [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. */ tax_code: { /** @description A detailed description of which types of products the tax code represents. */ @@ -13881,13 +16625,14 @@ export interface components { */ object: 'tax_id' /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type `unknown` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -13899,10 +16644,12 @@ export interface components { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -13922,6 +16669,7 @@ export interface components { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -13990,6 +16738,26 @@ export interface components { */ tax_type?: ('gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat') | null } + /** + * TerminalConfigurationConfiguration + * @description A Configurations object represents how features should be configured for terminal readers. + */ + 'terminal.configuration': { + bbpos_wisepos_e?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + /** @description Unique identifier for the object. */ + id: string + /** @description Whether this Configuration is the default for your account */ + is_account_default?: boolean | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'terminal.configuration' + tipping?: components['schemas']['terminal_configuration_configuration_resource_tipping'] + verifone_p400?: components['schemas']['terminal_configuration_configuration_resource_device_type_specific_config'] + } /** * TerminalConnectionToken * @description A Connection Token is used by the Stripe Terminal SDK to connect to a reader. @@ -14015,6 +16783,8 @@ export interface components { */ 'terminal.location': { address: components['schemas']['address'] + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string /** @description The display name of the location. */ display_name: string /** @description Unique identifier for the object. */ @@ -14036,13 +16806,15 @@ export interface components { * Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). */ 'terminal.reader': { + /** @description The most recent action performed by the reader. */ + action?: components['schemas']['terminal_reader_reader_resource_reader_action'] | null /** @description The current software version of the reader. */ device_sw_version?: string | null /** - * @description Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, or `verifone_P400`. + * @description Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. * @enum {string} */ - device_type: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' + device_type: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | 'verifone_P400' /** @description Unique identifier for the object. */ id: string /** @description The local IP address of the reader. */ @@ -14065,38 +16837,164 @@ export interface components { /** @description The networking status of the reader. */ status?: string | null } + /** TerminalConfigurationConfigurationResourceCurrencySpecificConfig */ + terminal_configuration_configuration_resource_currency_specific_config: { + /** @description Fixed amounts displayed when collecting a tip */ + fixed_amounts?: number[] | null + /** @description Percentages displayed when collecting a tip */ + percentages?: number[] | null + /** @description Below this amount, fixed amounts will be displayed; above it, percentages will be displayed */ + smart_tip_threshold?: number + } + /** TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig */ + terminal_configuration_configuration_resource_device_type_specific_config: { + /** @description A File ID representing an image you would like displayed on the reader. */ + splashscreen?: string | components['schemas']['file'] + } + /** TerminalConfigurationConfigurationResourceTipping */ + terminal_configuration_configuration_resource_tipping: { + aud?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + cad?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + chf?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + czk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + dkk?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + eur?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + gbp?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + hkd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + myr?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nok?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + nzd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sek?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + sgd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + usd?: components['schemas']['terminal_configuration_configuration_resource_currency_specific_config'] + } + /** + * TerminalReaderReaderResourceCart + * @description Represents a cart to be displayed on the reader + */ + terminal_reader_reader_resource_cart: { + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description List of line items in the cart. */ + line_items: components['schemas']['terminal_reader_reader_resource_line_item'][] + /** @description Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + tax?: number | null + /** @description Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + total: number + } /** - * ThreeDSecure - * @description Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - * object. Once the object has been created, you can use it to authenticate the - * cardholder and create a charge. + * TerminalReaderReaderResourceLineItem + * @description Represents a line item to be displayed on the reader */ - three_d_secure: { - /** @description Amount of the charge that you will create when authentication completes. */ + terminal_reader_reader_resource_line_item: { + /** @description The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ amount: number - /** @description True if the cardholder went through the authentication flow and their bank indicated that authentication succeeded. */ - authenticated: boolean - card: components['schemas']['card'] + /** @description Description of the line item. */ + description: string + /** @description The quantity of the line item. */ + quantity: number + } + /** + * TerminalReaderReaderResourceProcessConfig + * @description Represents a per-transaction override of a reader configuration + */ + terminal_reader_reader_resource_process_config: { + /** @description Override showing a tipping selection screen on this transaction. */ + skip_tipping?: boolean + } + /** + * TerminalReaderReaderResourceProcessPaymentIntentAction + * @description Represents a reader action to process a payment intent + */ + terminal_reader_reader_resource_process_payment_intent_action: { + /** @description Most recent PaymentIntent processed by the reader. */ + payment_intent: string | components['schemas']['payment_intent'] + process_config?: components['schemas']['terminal_reader_reader_resource_process_config'] + } + /** + * TerminalReaderReaderResourceProcessSetupIntentAction + * @description Represents a reader action to process a setup intent + */ + terminal_reader_reader_resource_process_setup_intent_action: { + /** @description ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. */ + generated_card?: string + /** @description Most recent SetupIntent processed by the reader. */ + setup_intent: string | components['schemas']['setup_intent'] + } + /** + * TerminalReaderReaderResourceReaderAction + * @description Represents an action performed by the reader + */ + terminal_reader_reader_resource_reader_action: { + /** @description Failure code, only set if status is `failed`. */ + failure_code?: string | null + /** @description Detailed failure message, only set if status is `failed`. */ + failure_message?: string | null + process_payment_intent?: components['schemas']['terminal_reader_reader_resource_process_payment_intent_action'] + process_setup_intent?: components['schemas']['terminal_reader_reader_resource_process_setup_intent_action'] + set_reader_display?: components['schemas']['terminal_reader_reader_resource_set_reader_display_action'] + /** + * @description Status of the action performed by the reader. + * @enum {string} + */ + status: 'failed' | 'in_progress' | 'succeeded' + /** + * @description Type of action performed by the reader. + * @enum {string} + */ + type: 'process_payment_intent' | 'process_setup_intent' | 'set_reader_display' + } + /** + * TerminalReaderReaderResourceSetReaderDisplayAction + * @description Represents a reader action to set the reader display + */ + terminal_reader_reader_resource_set_reader_display_action: { + /** @description Cart object to be displayed by the reader. */ + cart?: components['schemas']['terminal_reader_reader_resource_cart'] | null + /** + * @description Type of information to be displayed by the reader. + * @enum {string} + */ + type: 'cart' + } + /** + * TestClock + * @description A test clock enables deterministic control over objects in testmode. With a test clock, you can create + * objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + * you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + */ + 'test_helpers.test_clock': { /** * Format: unix-time * @description Time at which the object was created. Measured in seconds since the Unix epoch. */ created: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + /** + * Format: unix-time + * @description Time at which this clock is scheduled to auto delete. + */ + deletes_after: number + /** + * Format: unix-time + * @description Time at which all objects belonging to this clock are frozen. + */ + frozen_time: number /** @description Unique identifier for the object. */ id: string /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ livemode: boolean + /** @description The custom name supplied at creation. */ + name?: string | null /** * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'three_d_secure' - /** @description If present, this is the URL that you should send the cardholder to for authentication. If you are going to use Stripe.js to display the authentication page in an iframe, you should use the value "_callback". */ - redirect_url?: string | null - /** @description Possible values are `redirect_pending`, `succeeded`, or `failed`. When the cardholder can be authenticated, the object starts with status `redirect_pending`. When liability will be shifted to the cardholder's bank (either because the cardholder was successfully authenticated, or because the bank has not implemented 3D Secure, the object wlil be in status `succeeded`. `failed` indicates that authentication was attempted unsuccessfully. */ - status: string + object: 'test_helpers.test_clock' + /** + * @description The status of the Test Clock. + * @enum {string} + */ + status: 'advancing' | 'internal_failure' | 'ready' } /** three_d_secure_details */ three_d_secure_details: { @@ -14110,7 +17008,7 @@ export interface components { * @description Indicates the outcome of 3D Secure authentication. * @enum {string|null} */ - result?: ('attempt_acknowledged' | 'authenticated' | 'failed' | 'not_supported' | 'processing_error') | null + result?: ('attempt_acknowledged' | 'authenticated' | 'exempted' | 'failed' | 'not_supported' | 'processing_error') | null /** * @description Additional information about why 3D Secure succeeded or failed based * on the `result`. @@ -14216,7 +17114,8 @@ export interface components { * @enum {string} */ object: 'topup' - source: components['schemas']['source'] + /** @description For most Stripe users, the source of every top-up is a bank account. This hash is then the [source object](https://stripe.com/docs/api#source_object) describing that bank account. */ + source?: components['schemas']['source'] | null /** @description Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. */ statement_descriptor?: string | null /** @@ -14293,7 +17192,7 @@ export interface components { /** @description ID of the charge or payment that was used to fund the transfer. If null, the transfer was funded from the available balance. */ source_transaction?: (string | components['schemas']['charge']) | null /** @description The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. */ - source_type?: string | null + source_type?: string /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ transfer_group?: string | null } @@ -14383,6 +17282,1068 @@ export interface components { */ round: 'down' | 'up' } + /** + * TreasuryReceivedCreditsResourceCreditReversal + * @description You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + */ + 'treasury.credit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.credit_reversal' + /** @description The ReceivedCredit being reversed. */ + received_credit: string + /** + * @description Status of the CreditReversal + * @enum {string} + */ + status: 'canceled' | 'posted' | 'processing' + status_transitions: components['schemas']['treasury_received_credits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceDebitReversal + * @description You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + */ + 'treasury.debit_reversal': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description The FinancialAccount to reverse funds from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Other flows linked to a DebitReversal. */ + linked_flows?: components['schemas']['treasury_received_debits_resource_debit_reversal_linked_flows'] | null + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description The rails used to reverse the funds. + * @enum {string} + */ + network: 'ach' | 'card' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.debit_reversal' + /** @description The ReceivedDebit being reversed. */ + received_debit: string + /** + * @description Status of the DebitReversal + * @enum {string} + */ + status: 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_received_debits_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryFinancialAccountsResourceFinancialAccount + * @description Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + * FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + */ + 'treasury.financial_account': { + /** @description The array of paths to active Features in the Features hash. */ + active_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + balance: components['schemas']['treasury_financial_accounts_resource_balance'] + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country: string + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + features?: components['schemas']['treasury.financial_account_features'] + /** @description The set of credentials that resolve to a FinancialAccount. */ + financial_addresses: components['schemas']['treasury_financial_accounts_resource_financial_address'][] + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata?: { [key: string]: string } | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account' + /** @description The array of paths to pending Features in the Features hash. */ + pending_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** @description The set of functionalities that the platform can restrict on the FinancialAccount. */ + platform_restrictions?: components['schemas']['treasury_financial_accounts_resource_platform_restrictions'] | null + /** @description The array of paths to restricted Features in the Features hash. */ + restricted_features?: ( + | 'card_issuing' + | 'deposit_insurance' + | 'financial_addresses.aba' + | 'inbound_transfers.ach' + | 'intra_stripe_flows' + | 'outbound_payments.ach' + | 'outbound_payments.us_domestic_wire' + | 'outbound_transfers.ach' + | 'outbound_transfers.us_domestic_wire' + | 'remote_deposit_capture' + )[] + /** + * @description The enum specifying what state the account is in. + * @enum {string} + */ + status: 'closed' | 'open' + status_details: components['schemas']['treasury_financial_accounts_resource_status_details'] + /** @description The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. */ + supported_currencies: string[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAccountFeatures + * @description Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + * Stripe or the platform can control Features via the requested field. + */ + 'treasury.financial_account_features': { + card_issuing?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + deposit_insurance?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + financial_addresses?: components['schemas']['treasury_financial_accounts_resource_financial_addresses_features'] + inbound_transfers?: components['schemas']['treasury_financial_accounts_resource_inbound_transfers'] + intra_stripe_flows?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.financial_account_features' + outbound_payments?: components['schemas']['treasury_financial_accounts_resource_outbound_payments'] + outbound_transfers?: components['schemas']['treasury_financial_accounts_resource_outbound_transfers'] + } + /** + * TreasuryInboundTransfersResourceInboundTransfer + * @description Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + */ + 'treasury.inbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the InboundTransfer is able to be canceled. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description Details about this InboundTransfer's failure. Only set when status is `failed`. */ + failure_details?: components['schemas']['treasury_inbound_transfers_resource_failure_details'] | null + /** @description The FinancialAccount that received the funds. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + linked_flows: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.inbound_transfer' + /** @description The origin payment method to be debited for an InboundTransfer. */ + origin_payment_method: string + /** @description Details about the PaymentMethod for an InboundTransfer. */ + origin_payment_method_details?: components['schemas']['inbound_transfers'] | null + /** @description Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. */ + returned?: boolean | null + /** @description Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. */ + statement_descriptor: string + /** + * @description Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'processing' | 'succeeded' + status_transitions: components['schemas']['treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryOutboundPaymentsResourceOutboundPayment + * @description Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + * + * Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_payment': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. */ + customer?: string | null + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. */ + destination_payment_method?: string | null + /** @description Details about the PaymentMethod for an OutboundPayment. */ + destination_payment_method_details?: components['schemas']['outbound_payments_payment_method_details'] | null + /** @description Details about the end user. */ + end_user_details?: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_end_user_details'] | null + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_payment' + /** @description Details about a returned OutboundPayment. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_payments_resource_returned_status'] | null + /** @description The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). */ + statement_descriptor: string + /** + * @description Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_payments_resource_outbound_payment_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryOutboundTransfersResourceOutboundTransfer + * @description Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + * + * Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + */ + 'treasury.outbound_transfer': { + /** @description Amount (in cents) transferred. */ + amount: number + /** @description Returns `true` if the object can be canceled, and `false` otherwise. */ + cancelable: boolean + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string | null + /** @description The PaymentMethod used as the payment instrument for an OutboundTransfer. */ + destination_payment_method?: string | null + destination_payment_method_details: components['schemas']['outbound_transfers_payment_method_details'] + /** + * Format: unix-time + * @description The date when funds are expected to arrive in the destination account. + */ + expected_arrival_date: number + /** @description The FinancialAccount that funds were pulled from. */ + financial_account: string + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. */ + metadata: { [key: string]: string } + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.outbound_transfer' + /** @description Details about a returned OutboundTransfer. Only set when the status is `returned`. */ + returned_details?: components['schemas']['treasury_outbound_transfers_resource_returned_details'] | null + /** @description Information about the OutboundTransfer to be sent to the recipient account. */ + statement_descriptor: string + /** + * @description Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + * @enum {string} + */ + status: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + status_transitions: components['schemas']['treasury_outbound_transfers_resource_status_transitions'] + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** + * TreasuryReceivedCreditsResourceReceivedCredit + * @description ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + */ + 'treasury.received_credit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'other') | null + /** @description The FinancialAccount that received the funds. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_credits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The rails used to send the funds. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' | 'us_domestic_wire' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_credit' + /** @description Details describing when a ReceivedCredit may be reversed. */ + reversal_details?: components['schemas']['treasury_received_credits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryReceivedDebitsResourceReceivedDebit + * @description ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + */ + 'treasury.received_debit': { + /** @description Amount (in cents) transferred. */ + amount: number + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * @description Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + * @enum {string|null} + */ + failure_code?: ('account_closed' | 'account_frozen' | 'insufficient_funds' | 'other') | null + /** @description The FinancialAccount that funds were pulled from. */ + financial_account?: string | null + /** @description A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. */ + hosted_regulatory_receipt_url?: string | null + /** @description Unique identifier for the object. */ + id: string + initiating_payment_method_details?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details'] + linked_flows: components['schemas']['treasury_received_debits_resource_linked_flows'] + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description The network used for the ReceivedDebit. + * @enum {string} + */ + network: 'ach' | 'card' | 'stripe' + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.received_debit' + /** @description Details describing when a ReceivedDebit might be reversed. */ + reversal_details?: components['schemas']['treasury_received_debits_resource_reversal_details'] | null + /** + * @description Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + * @enum {string} + */ + status: 'failed' | 'succeeded' + /** @description The Transaction associated with this object. */ + transaction?: (string | components['schemas']['treasury.transaction']) | null + } + /** + * TreasuryTransactionsResourceTransaction + * @description Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. + */ + 'treasury.transaction': { + /** @description Amount (in cents) transferred. */ + amount: number + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description: string + /** + * TreasuryTransactionsResourceTransactionEntryList + * @description A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + */ + entries?: { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } | null + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description ID of the flow that created the Transaction. */ + flow?: string | null + /** @description Details of the flow that created the Transaction. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow that created the Transaction. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction' + /** + * @description Status of the Transaction. + * @enum {string} + */ + status: 'open' | 'posted' | 'void' + status_transitions: components['schemas']['treasury_transactions_resource_abstract_transaction_resource_status_transitions'] + } + /** + * TreasuryTransactionsResourceTransactionEntry + * @description TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). + */ + 'treasury.transaction_entry': { + balance_impact: components['schemas']['treasury_transactions_resource_balance_impact'] + /** + * Format: unix-time + * @description Time at which the object was created. Measured in seconds since the Unix epoch. + */ + created: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * Format: unix-time + * @description When the TransactionEntry will impact the FinancialAccount's balance. + */ + effective_at: number + /** @description The FinancialAccount associated with this object. */ + financial_account: string + /** @description Token of the flow associated with the TransactionEntry. */ + flow?: string | null + /** @description Details of the flow associated with the TransactionEntry. */ + flow_details?: components['schemas']['treasury_transactions_resource_flow_details'] | null + /** + * @description Type of the flow associated with the TransactionEntry. + * @enum {string} + */ + flow_type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + /** @description Unique identifier for the object. */ + id: string + /** @description Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. */ + livemode: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'treasury.transaction_entry' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + /** + * @description The specific money movement that generated the TransactionEntry. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'credit_reversal_posting' + | 'debit_reversal' + | 'inbound_transfer' + | 'inbound_transfer_return' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'other' + | 'outbound_payment' + | 'outbound_payment_cancellation' + | 'outbound_payment_failure' + | 'outbound_payment_posting' + | 'outbound_payment_return' + | 'outbound_transfer' + | 'outbound_transfer_cancellation' + | 'outbound_transfer_failure' + | 'outbound_transfer_posting' + | 'outbound_transfer_return' + | 'received_credit' + | 'received_debit' + } + /** + * TreasuryFinancialAccountsResourceABARecord + * @description ABA Records contain U.S. bank account details per the ABA format. + */ + treasury_financial_accounts_resource_aba_record: { + /** @description The name of the person or business that owns the bank account. */ + account_holder_name: string + /** @description The account number. */ + account_number?: string | null + /** @description The last four characters of the account number. */ + account_number_last4: string + /** @description Name of the bank. */ + bank_name: string + /** @description Routing number for the account. */ + routing_number: string + } + /** + * TreasuryFinancialAccountsResourceBalance + * @description Balance information for the FinancialAccount + */ + treasury_financial_accounts_resource_balance: { + /** @description Funds the user can spend right now. */ + cash: { [key: string]: number } + /** @description Funds not spendable yet, but will become available at a later time. */ + inbound_pending: { [key: string]: number } + /** @description Funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: { [key: string]: number } + } + /** TreasuryFinancialAccountsResourceClosedStatusDetails */ + treasury_financial_accounts_resource_closed_status_details: { + /** @description The array that contains reasons for a FinancialAccount closure. */ + reasons: ('account_rejected' | 'closed_by_platform' | 'other')[] + } + /** + * TreasuryFinancialAccountsResourceFinancialAddress + * @description FinancialAddresses contain identifying information that resolves to a FinancialAccount. + */ + treasury_financial_accounts_resource_financial_address: { + aba?: components['schemas']['treasury_financial_accounts_resource_aba_record'] + /** @description The list of networks that the address supports */ + supported_networks?: ('ach' | 'us_domestic_wire')[] + /** + * @description The type of financial address + * @enum {string} + */ + type: 'aba' + } + /** + * TreasuryFinancialAccountsResourceFinancialAddressesFeatures + * @description Settings related to Financial Addresses features on a Financial Account + */ + treasury_financial_accounts_resource_financial_addresses_features: { + aba?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceInboundTransfers + * @description InboundTransfers contains inbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_inbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundPayments + * @description Settings related to Outbound Payments features on a Financial Account + */ + treasury_financial_accounts_resource_outbound_payments: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourceOutboundTransfers + * @description OutboundTransfers contains outbound transfers features for a FinancialAccount. + */ + treasury_financial_accounts_resource_outbound_transfers: { + ach?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + us_domestic_wire?: components['schemas']['treasury_financial_accounts_resource_toggle_settings'] + } + /** + * TreasuryFinancialAccountsResourcePlatformRestrictions + * @description Restrictions that a Connect Platform has placed on this FinancialAccount. + */ + treasury_financial_accounts_resource_platform_restrictions: { + /** + * @description Restricts all inbound money movement. + * @enum {string|null} + */ + inbound_flows?: ('restricted' | 'unrestricted') | null + /** + * @description Restricts all outbound money movement. + * @enum {string|null} + */ + outbound_flows?: ('restricted' | 'unrestricted') | null + } + /** TreasuryFinancialAccountsResourceStatusDetails */ + treasury_financial_accounts_resource_status_details: { + /** @description Details related to the closure of this FinancialAccount */ + closed?: components['schemas']['treasury_financial_accounts_resource_closed_status_details'] | null + } + /** + * TreasuryFinancialAccountsResourceToggleSettings + * @description Toggle settings for enabling/disabling a feature + */ + treasury_financial_accounts_resource_toggle_settings: { + /** @description Whether the FinancialAccount should have the Feature. */ + requested: boolean + /** + * @description Whether the Feature is operational. + * @enum {string} + */ + status: 'active' | 'pending' | 'restricted' + /** @description Additional details; includes at least one entry when the status is not `active`. */ + status_details: components['schemas']['treasury_financial_accounts_resource_toggles_setting_status_details'][] + } + /** + * TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + * @description Additional details on the FinancialAccount Features information. + */ + treasury_financial_accounts_resource_toggles_setting_status_details: { + /** + * @description Represents the reason why the status is `pending` or `restricted`. + * @enum {string} + */ + code: + | 'activating' + | 'capability_not_requested' + | 'financial_account_closed' + | 'rejected_other' + | 'rejected_unsupported_business' + | 'requirements_past_due' + | 'requirements_pending_verification' + | 'restricted_by_platform' + | 'restricted_other' + /** + * @description Represents what the user should do, if anything, to activate the Feature. + * @enum {string|null} + */ + resolution?: ('contact_stripe' | 'provide_information' | 'remove_restriction') | null + /** + * @description The `platform_restrictions` that are restricting this Feature. + * @enum {string} + */ + restriction?: 'inbound_flows' | 'outbound_flows' + } + /** TreasuryInboundTransfersResourceFailureDetails */ + treasury_inbound_transfers_resource_failure_details: { + /** + * @description Reason for the failure. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + /** TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows */ + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: { + /** @description If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. */ + received_debit?: string | null + } + /** TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions */ + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an InboundTransfer changed status to `succeeded`. + */ + succeeded_at?: number | null + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails */ + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: { + /** @description IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. */ + ip_address?: string | null + /** @description `true`` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. */ + present: boolean + } + /** TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions */ + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `canceled`. + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `failed`. + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundPayment changed status to `returned`. + */ + returned_at?: number | null + } + /** TreasuryOutboundPaymentsResourceReturnedStatus */ + treasury_outbound_payments_resource_returned_status: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceReturnedDetails */ + treasury_outbound_transfers_resource_returned_details: { + /** + * @description Reason for the return. + * @enum {string} + */ + code: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + /** @description The Transaction associated with this object. */ + transaction: string | components['schemas']['treasury.transaction'] + } + /** TreasuryOutboundTransfersResourceStatusTransitions */ + treasury_outbound_transfers_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `canceled` + */ + canceled_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `failed` + */ + failed_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `posted` + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when an OutboundTransfer changed status to `returned` + */ + returned_at?: number | null + } + /** TreasuryReceivedCreditsResourceLinkedFlows */ + treasury_received_credits_resource_linked_flows: { + /** @description The CreditReversal created as a result of this ReceivedCredit being reversed. */ + credit_reversal?: string | null + /** @description Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. */ + issuing_transaction?: string | null + /** @description ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. */ + source_flow?: string | null + /** @description The expandable object of the source flow. */ + source_flow_details?: components['schemas']['treasury_received_credits_resource_source_flows_details'] | null + /** @description The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). */ + source_flow_type?: string | null + } + /** TreasuryReceivedCreditsResourceReversalDetails */ + treasury_received_credits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedCredit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedCredit cannot be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedCreditsResourceSourceFlowsDetails */ + treasury_received_credits_resource_source_flows_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + payout?: components['schemas']['payout'] + /** + * @description The type of the source flow that originated the ReceivedCredit. + * @enum {string} + */ + type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } + /** TreasuryReceivedCreditsResourceStatusTransitions */ + treasury_received_credits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the CreditReversal changed status to `posted` + */ + posted_at?: number | null + } + /** TreasuryReceivedDebitsResourceDebitReversalLinkedFlows */ + treasury_received_debits_resource_debit_reversal_linked_flows: { + /** @description Set if there is an Issuing dispute associated with the DebitReversal. */ + issuing_dispute?: string | null + } + /** TreasuryReceivedDebitsResourceLinkedFlows */ + treasury_received_debits_resource_linked_flows: { + /** @description The DebitReversal created as a result of this ReceivedDebit being reversed. */ + debit_reversal?: string | null + /** @description Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. */ + inbound_transfer?: string | null + /** @description Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. */ + issuing_authorization?: string | null + /** @description Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. */ + issuing_transaction?: string | null + } + /** TreasuryReceivedDebitsResourceReversalDetails */ + treasury_received_debits_resource_reversal_details: { + /** + * Format: unix-time + * @description Time before which a ReceivedDebit can be reversed. + */ + deadline?: number | null + /** + * @description Set if a ReceivedDebit can't be reversed. + * @enum {string|null} + */ + restricted_reason?: ('already_reversed' | 'deadline_passed' | 'network_restricted' | 'other' | 'source_flow_restricted') | null + } + /** TreasuryReceivedDebitsResourceStatusTransitions */ + treasury_received_debits_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the DebitReversal changed status to `completed`. + */ + completed_at?: number | null + } + /** TreasurySharedResourceBillingDetails */ + treasury_shared_resource_billing_details: { + address: components['schemas']['address'] + /** @description Email address. */ + email?: string | null + /** @description Full name. */ + name?: string | null + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails */ + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: { + /** + * @description Set when `type` is `balance`. + * @enum {string} + */ + balance?: 'payments' + billing_details: components['schemas']['treasury_shared_resource_billing_details'] + financial_account?: components['schemas']['received_payment_method_details_financial_account'] + /** @description Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. */ + issuing_card?: string + /** + * @description Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + * @enum {string} + */ + type: 'balance' | 'financial_account' | 'issuing_card' | 'stripe' | 'us_bank_account' + us_bank_account?: components['schemas']['treasury_shared_resource_initiating_payment_method_details_us_bank_account'] + } + /** TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount */ + treasury_shared_resource_initiating_payment_method_details_us_bank_account: { + /** @description Bank name. */ + bank_name?: string | null + /** @description The last four digits of the bank account number. */ + last4?: string | null + /** @description The routing number for the bank account. */ + routing_number?: string | null + } + /** TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions */ + treasury_transactions_resource_abstract_transaction_resource_status_transitions: { + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `posted`. + */ + posted_at?: number | null + /** + * Format: unix-time + * @description Timestamp describing when the Transaction changed status to `void`. + */ + void_at?: number | null + } + /** + * TreasuryTransactionsResourceBalanceImpact + * @description Change to a FinancialAccount's balance + */ + treasury_transactions_resource_balance_impact: { + /** @description The change made to funds the user can spend right now. */ + cash: number + /** @description The change made to funds that are not spendable yet, but will become available at a later time. */ + inbound_pending: number + /** @description The change made to funds in the account, but not spendable because they are being held for pending outbound flows. */ + outbound_pending: number + } + /** TreasuryTransactionsResourceFlowDetails */ + treasury_transactions_resource_flow_details: { + credit_reversal?: components['schemas']['treasury.credit_reversal'] + debit_reversal?: components['schemas']['treasury.debit_reversal'] + inbound_transfer?: components['schemas']['treasury.inbound_transfer'] + issuing_authorization?: components['schemas']['issuing.authorization'] + outbound_payment?: components['schemas']['treasury.outbound_payment'] + outbound_transfer?: components['schemas']['treasury.outbound_transfer'] + received_credit?: components['schemas']['treasury.received_credit'] + received_debit?: components['schemas']['treasury.received_debit'] + /** + * @description Type of the flow that created the Transaction. Set to the same value as `flow_type`. + * @enum {string} + */ + type: + | 'credit_reversal' + | 'debit_reversal' + | 'inbound_transfer' + | 'issuing_authorization' + | 'other' + | 'outbound_payment' + | 'outbound_transfer' + | 'received_credit' + | 'received_debit' + } + /** us_bank_account_networks */ + us_bank_account_networks: { + /** @description The preferred network. */ + preferred?: string | null + /** @description All supported networks. */ + supported: ('ach' | 'us_domestic_wire')[] + } /** * UsageRecord * @description Usage records allow you to report customer usage and metrics to Stripe for @@ -14483,13 +18444,19 @@ export interface components { } export interface operations { - /**

Initiate 3D Secure authentication.

*/ - Post3dSecure: { + /**

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']['three_d_secure'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14501,93 +18468,21 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount of the charge that you will create when authentication completes. */ - amount: number - /** @description The ID of a card token, or the ID of a card belonging to the given customer. */ - card?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The customer associated with this 3D secure authentication. */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The URL that the cardholder's browser will be returned to when authentication completes. */ - return_url: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Retrieves a 3D Secure object.

*/ - Get3dSecureThreeDSecure: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - three_d_secure: string - } - } + /** + *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ * + *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ */ + PostAccount: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['three_d_secure'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the details of an account.

*/ - GetAccount: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- * - *

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- */ - PostAccount: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['account'] + 'application/json': components['schemas']['account'] } } /** Error response. */ @@ -14655,6 +18550,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -14671,6 +18570,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -14715,10 +18622,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -14727,6 +18642,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -14746,6 +18669,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -14871,7 +18802,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -14921,6 +18852,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -14929,6 +18861,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -14976,6 +18917,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -14997,6 +18940,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -15563,8 +19516,6 @@ export interface operations { account: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -15721,6 +19672,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15739,6 +19692,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -15909,6 +19874,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -15927,6 +19894,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16140,6 +20119,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16158,6 +20139,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16328,6 +20321,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -16346,6 +20341,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -16578,6 +20585,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -16594,6 +20605,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -16638,10 +20657,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -16650,6 +20677,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -16669,6 +20704,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -16754,7 +20797,7 @@ export interface operations { } } } - /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. */ + /** @description The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. */ country?: string /** @description Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). */ default_currency?: string @@ -16796,7 +20839,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -16846,6 +20889,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -16854,6 +20898,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -16901,6 +20954,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -16922,6 +20977,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17057,6 +21122,10 @@ export interface operations { requested?: boolean } /** capability_param */ + affirm_payments?: { + requested?: boolean + } + /** capability_param */ afterpay_clearpay_payments?: { requested?: boolean } @@ -17073,6 +21142,14 @@ export interface operations { requested?: boolean } /** capability_param */ + bank_transfer_payments?: { + requested?: boolean + } + /** capability_param */ + blik_payments?: { + requested?: boolean + } + /** capability_param */ boleto_payments?: { requested?: boolean } @@ -17117,10 +21194,18 @@ export interface operations { requested?: boolean } /** capability_param */ + konbini_payments?: { + requested?: boolean + } + /** capability_param */ legacy_payments?: { requested?: boolean } /** capability_param */ + link_payments?: { + requested?: boolean + } + /** capability_param */ oxxo_payments?: { requested?: boolean } @@ -17129,6 +21214,14 @@ export interface operations { requested?: boolean } /** capability_param */ + paynow_payments?: { + requested?: boolean + } + /** capability_param */ + promptpay_payments?: { + requested?: boolean + } + /** capability_param */ sepa_debit_payments?: { requested?: boolean } @@ -17148,6 +21241,14 @@ export interface operations { transfers?: { requested?: boolean } + /** capability_param */ + treasury?: { + requested?: boolean + } + /** capability_param */ + us_bank_account_ach_payments?: { + requested?: boolean + } } /** * company_specs @@ -17273,7 +21374,7 @@ export interface operations { email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the bank account or card creation API. */ + /** @description A card or bank account to attach to the account for receiving [payouts](https://stripe.com/docs/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary, as documented in the `external_account` parameter for [bank account](https://stripe.com/docs/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](https://stripe.com/docs/api#account_create_bank_account) or [card creation](https://stripe.com/docs/api#account_create_card) APIs. */ external_account?: string /** * individual_specs @@ -17323,6 +21424,7 @@ export interface operations { full_name_aliases?: string[] | '' gender?: string id_number?: string + id_number_secondary?: string last_name?: string last_name_kana?: string last_name_kanji?: string @@ -17331,6 +21433,15 @@ export interface operations { phone?: string /** @enum {string} */ political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } ssn_last_4?: string /** person_verification_specs */ verification?: { @@ -17378,6 +21489,8 @@ export interface operations { cvc_failure?: boolean } statement_descriptor_prefix?: string + statement_descriptor_prefix_kana?: string | '' + statement_descriptor_prefix_kanji?: string | '' } /** payments_settings_specs */ payments?: { @@ -17399,6 +21512,16 @@ export interface operations { } statement_descriptor?: string } + /** treasury_settings_specs */ + treasury?: { + /** settings_terms_of_service_specs */ + tos_acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + } } /** * tos_acceptance_specs @@ -17996,8 +22119,6 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Where to redirect the user after they log out of their dashboard. */ - redirect_url?: string } } } @@ -18161,6 +22282,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18179,6 +22302,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18350,6 +22485,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18368,6 +22505,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18589,6 +22738,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18607,6 +22758,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -18778,6 +22941,8 @@ export interface operations { gender?: string /** @description The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ id_number?: string + /** @description The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). */ + id_number_secondary?: string /** @description The person's last name. */ last_name?: string /** @description The Kana variation of the person's last name (Japan only). */ @@ -18796,6 +22961,18 @@ export interface operations { phone?: string /** @description Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. */ political_exposure?: string + /** + * address_specs + * @description The person's registered address. + */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } /** * relationship_specs * @description The relationship that this person has with the account's legal entity. @@ -19293,7 +23470,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer, in _%s_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ + /** @description A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. */ amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -19303,6 +23480,172 @@ export interface operations { } } } + /**

List all secrets stored on the given scope.

*/ + GetAppsSecrets: { + 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 + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: 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']['apps.secret'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create or replace a secret in the secret store.

*/ + PostAppsSecrets: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The Unix timestamp for the expiry time of the secret, after which the secret deletes. + */ + expires_at?: number + /** @description A name for the secret that's unique within the scope. */ + name: string + /** @description The plaintext secret value to be stored. */ + payload: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Deletes a secret from the secret store by name and scope.

*/ + PostAppsSecretsDelete: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A name for the secret that's unique within the scope. */ + name: string + /** + * scope_param + * @description Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + } + } + /**

Finds a secret in the secret store by name and scope.

*/ + GetAppsSecretsFind: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A name for the secret that's unique within the scope. */ + name: string + /** Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. */ + scope: { + /** @enum {string} */ + type: 'account' | 'user' + user?: string + } + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['apps.secret'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

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.

@@ -19608,8 +23951,8 @@ export interface operations { */ business_profile: { headline?: string - privacy_policy_url: string - terms_of_service_url: string + privacy_policy_url?: string + terms_of_service_url?: string } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19622,7 +23965,7 @@ export interface operations { features: { /** customer_update_creation_param */ customer_update?: { - allowed_updates: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' + allowed_updates?: ('address' | 'email' | 'phone' | 'shipping' | 'tax_id')[] | '' enabled: boolean } /** invoice_list_param */ @@ -19675,6 +24018,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_create_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } } @@ -19744,8 +24094,8 @@ export interface operations { */ business_profile?: { headline?: string - privacy_policy_url?: string - terms_of_service_url?: string + privacy_policy_url?: string | '' + terms_of_service_url?: string | '' } /** @description The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. */ default_return_url?: string | '' @@ -19811,6 +24161,13 @@ export interface operations { proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' } } + /** + * login_page_update_param + * @description The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + */ + login_page?: { + enabled: boolean + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } @@ -19902,188 +24259,6 @@ export interface operations { } } } - /**

Returns a list of your receivers. Receivers are returned sorted by creation date, with the most recently created receivers appearing first.

*/ - GetBitcoinReceivers: { - parameters: { - query: { - /** Filter for active receivers. */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Filter for filled receivers. */ - filled?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** Filter for receivers with uncaptured funds. */ - uncaptured_funds?: boolean - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['bitcoin_receiver'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Retrieves the Bitcoin receiver with the given ID.

*/ - GetBitcoinReceiversId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['bitcoin_receiver'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinReceiversReceiverTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - receiver: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

List bitcoin transacitons for a given receiver.

*/ - GetBitcoinTransactions: { - parameters: { - query: { - /** Only return transactions for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - receiver?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['bitcoin_transaction'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.

*/ GetCharges: { parameters: { @@ -20165,7 +24340,7 @@ export interface operations { /** @description Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ amount?: number application_fee?: number - /** @description A fee in %s that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ application_fee_amount?: number /** @description Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. */ capture?: boolean @@ -20206,6 +24381,13 @@ export interface operations { metadata?: { [key: string]: string } | '' /** @description The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). */ on_behalf_of?: string + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } /** @description The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ receipt_email?: string /** @@ -20247,6 +24429,57 @@ export interface operations { } } } + /** + *

Search for charges you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetChargesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['charge'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

Retrieves the details of a 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: { @@ -20565,6 +24798,7 @@ export interface operations { amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' payment_intent?: string @@ -20649,11 +24883,23 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' payment_intent?: string /** @enum {string} */ reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' @@ -20731,6 +24977,12 @@ export interface operations { GetCheckoutSessions: { parameters: { query: { + /** Only return the Checkout Sessions for the Customer specified. */ + customer?: string + /** Only return the Checkout Sessions for the Customer details specified. */ + customer_details?: { + 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. */ @@ -20834,8 +25086,12 @@ export interface operations { */ consent_collection?: { /** @enum {string} */ - promotions?: 'auto' + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** * @description ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card * payment method will be used to prefill the email, name, card details, and billing address @@ -20856,7 +25112,8 @@ export interface operations { * When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout * with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). * - * Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + * Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + * in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. * * Can only be set in `payment` and `setup` mode. * @enum {string} @@ -20891,7 +25148,7 @@ export interface operations { expand?: string[] /** * Format: unix-time - * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 1 to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + * @description The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. */ expires_at?: number /** @@ -20899,7 +25156,7 @@ export interface operations { * * For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. * - * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + * For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. */ line_items?: { /** adjustable_quantity_params */ @@ -20908,7 +25165,6 @@ export interface operations { maximum?: number minimum?: number } - description?: string dynamic_tax_rates?: string[] price?: string /** price_data_with_product_data */ @@ -21030,6 +25286,16 @@ export interface operations { } transfer_group?: string } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + * This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' /** * payment_method_options_param * @description Payment-method-specific configuration. @@ -21050,26 +25316,168 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } /** payment_method_options_param */ + affirm?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + au_becs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + bacs_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + bancontact?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ boleto?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + card?: { + /** installments_param */ + installments?: { + enabled?: boolean + } + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string + statement_descriptor_suffix_kanji?: string + } + /** payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + eps?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + fpx?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + giropay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + grabpay?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + konbini?: { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } /** payment_method_options_param */ oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + paynow?: { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + /** payment_method_options_param */ + pix?: { + expires_after_seconds?: number + } + /** payment_method_options_param */ + sepa_debit?: { + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + /** payment_method_options_param */ + sofort?: { + /** @enum {string} */ + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' } /** payment_method_options_param */ wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } } /** * @description A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. * + * In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + * It is required in `setup` mode. + * * Read more about the supported payment methods and their requirements in our [payment * method details guide](/docs/payments/checkout/payment-methods). * @@ -21079,23 +25487,31 @@ export interface operations { */ payment_method_types?: ( | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' | 'card' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] /** @@ -21387,6 +25803,13 @@ export interface operations { fixed_amount?: { amount: number currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } metadata?: { [key: string]: string } /** @enum {string} */ @@ -21411,11 +25834,7 @@ export interface operations { subscription_data?: { application_fee_percent?: number default_tax_rates?: string[] - items?: { - plan: string - quantity?: number - tax_rates?: string[] - }[] + description?: string metadata?: { [key: string]: string } /** transfer_data_specs */ transfer_data?: { @@ -21722,6 +26141,12 @@ export interface operations { } /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). */ currency?: string + /** @description Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** * @description Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. Defaults to `once`. * @enum {string} @@ -21805,6 +26230,12 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + amount_off: number + } + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ @@ -21925,9 +26356,9 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s representing the total amount of the credit note. */ + /** @description The integer amount in cents (or local equivalent) representing the total amount of the credit note. */ amount?: number - /** @description The integer amount in %s representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. */ credit_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -21950,7 +26381,7 @@ export interface operations { memo?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** @description The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. */ out_of_band_amount?: number /** * @description Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` @@ -21959,7 +26390,7 @@ export interface operations { reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' /** @description ID of an existing refund to link this credit note to. */ refund?: string - /** @description The integer amount in %s representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ + /** @description The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -21969,9 +26400,9 @@ export interface operations { GetCreditNotesPreview: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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[] @@ -21994,13 +26425,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. */ refund_amount?: number } } @@ -22028,9 +26459,9 @@ export interface operations { GetCreditNotesPreviewLines: { parameters: { query: { - /** The integer amount in %s representing the total amount of the credit note. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22057,13 +26488,13 @@ export interface operations { memo?: string /** Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** The integer amount in %s representing the amount that is credited outside of Stripe. */ + /** The integer amount in cents (or local equivalent) 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. */ + /** The integer amount in cents (or local equivalent) 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 @@ -22267,6 +26698,8 @@ 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 + /** Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. */ + test_clock?: string } } responses: { @@ -22330,8 +26763,19 @@ export interface operations { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) 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 + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. */ description?: string @@ -22354,6 +26798,12 @@ export interface operations { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22404,6 +26854,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -22415,10 +26866,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -22438,6 +26891,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -22445,9 +26899,62 @@ export interface operations { | 'za_vat' value: string }[] + /** @description ID of the test clock to attach to the customer. */ + test_clock?: string + } + } + } + } + /** + *

Search for customers you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetCustomersSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['customer'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } /**

Retrieves a Customer object.

*/ GetCustomersCustomer: { @@ -22519,7 +27026,7 @@ export interface operations { state?: string } | '' - /** @description An integer amount in %s that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ + /** @description An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. */ balance?: number /** @description Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details. */ bank_account?: @@ -22554,6 +27061,17 @@ export interface operations { object?: 'card' } | string + /** + * cash_balance_param + * @description Balance information and default balance settings for this customer. + */ + cash_balance?: { + /** balance_settings_param */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' + } + } coupon?: string /** @description ID of Alipay account to make the customer's new default for invoice payments. */ default_alipay_account?: string @@ -22590,6 +27108,12 @@ export interface operations { | '' default_payment_method?: string footer?: string + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -22632,8 +27156,6 @@ export interface operations { * @enum {string} */ tax_exempt?: '' | 'exempt' | 'none' | 'reverse' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number } } } @@ -22738,7 +27260,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in **%s** to apply to the customer's credit balance. */ + /** @description The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). If the customer's [`currency`](https://stripe.com/docs/api/customers/object#customer_object-currency) is set, this value must match it. If the customer's `currency` is not set, it will be updated to this value. */ currency: string @@ -23375,7 +27897,8 @@ export interface operations { } } } - GetCustomersCustomerDiscount: { + /**

Retrieves a customer’s cash balance.

*/ + GetCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23389,7 +27912,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23405,8 +27928,8 @@ export interface operations { } } } - /**

Removes the currently applied discount on a customer.

*/ - DeleteCustomersCustomerDiscount: { + /**

Changes the settings on a customer’s cash balance.

*/ + PostCustomersCustomerCashBalance: { parameters: { path: { customer: string @@ -23416,7 +27939,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['cash_balance'] } } /** Error response. */ @@ -23428,81 +27951,23 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods for a given Customer

*/ - GetCustomersCustomerPaymentMethods: { - parameters: { - path: { - customer: string - } - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * balance_settings_param + * @description A hash of settings for this cash balance. + */ + settings?: { + /** @enum {string} */ + reconciliation_mode?: 'automatic' | 'manual' } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

List sources for a specified customer.

*/ - GetCustomersCustomerSources: { + /**

Returns a list of transactions that modified the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactions: { parameters: { path: { customer: string @@ -23514,8 +27979,6 @@ 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 - /** 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 } @@ -23526,13 +27989,311 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: ( - | components['schemas']['alipay_account'] - | components['schemas']['bank_account'] - | components['schemas']['bitcoin_receiver'] - | components['schemas']['card'] - | components['schemas']['source'] - )[] + data: components['schemas']['customer_cash_balance_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a specific cash balance transaction, which updated the customer’s cash balance.

*/ + GetCustomersCustomerCashBalanceTransactionsTransaction: { + 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_cash_balance_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + GetCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Removes the currently applied discount on a customer.

*/ + DeleteCustomersCustomerDiscount: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + * funding instructions will be created. If funding instructions have already been created for a given customer, the same + * funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ */ + PostCustomersCustomerFundingInstructions: { + parameters: { + path: { + customer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['funding_instructions'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bank_transfer_params + * @description Additional parameters for `bank_transfer` funding types + */ + bank_transfer: { + /** eu_bank_account_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The `funding_type` to get the instructions for. + * @enum {string} + */ + funding_type: 'bank_transfer' + } + } + } + } + /**

Returns a list of PaymentMethods for a given Customer

*/ + GetCustomersCustomerPaymentMethods: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_method'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a PaymentMethod object for a given Customer.

*/ + GetCustomersCustomerPaymentMethodsPaymentMethod: { + parameters: { + path: { + customer: string + payment_method: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List sources for a specified customer.

*/ + GetCustomersCustomerSources: { + parameters: { + path: { + customer: string + } + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter sources according to a particular object type. */ + object?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: (components['schemas']['bank_account'] | components['schemas']['card'] | components['schemas']['source'])[] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -23875,7 +28636,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -23895,7 +28656,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -23907,7 +28668,7 @@ export interface operations { backdate_start_date?: number /** * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. */ billing_cycle_anchor?: number /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ @@ -23931,6 +28692,8 @@ export interface operations { collection_method?: 'charge_automatically' | 'send_invoice' /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ coupon?: string + /** @description Three-letter [ISO currency 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 Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ @@ -24018,9 +28781,35 @@ export interface operations { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24032,15 +28821,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24053,9 +28850,7 @@ export interface operations { /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24134,7 +28929,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ add_invoice_items?: { price?: string /** one_time_price_data */ @@ -24154,7 +28949,7 @@ export interface operations { application_fee_percent?: number /** * automatic_tax_config - * @description Automatic tax settings for this subscription. + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. */ automatic_tax?: { enabled: boolean @@ -24281,9 +29076,35 @@ export interface operations { description?: string } /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -24295,15 +29116,23 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' } /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ pending_invoice_item_interval?: @@ -24316,11 +29145,7 @@ export interface operations { /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ promotion_code?: string /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. * @enum {string} */ proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' @@ -24520,13 +29345,14 @@ export interface operations { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + * @description Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` * @enum {string} */ type: | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -24538,10 +29364,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -24561,6 +29389,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -25081,6 +29910,7 @@ export interface operations { 200: { content: { 'application/json': { + /** @description Details about each object. */ data: components['schemas']['file_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean @@ -25133,7 +29963,7 @@ export interface operations { * @description A future timestamp after which the link will no longer be usable. */ expires_at?: number - /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`. */ + /** @description The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. */ file: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' @@ -25240,6 +30070,7 @@ export interface operations { | 'selfie' | 'sigma_scheduled_query' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -25326,6 +30157,7 @@ export interface operations { | 'identity_document' | 'pci_document' | 'tax_document_user_upload' + | 'terminal_reader_splashscreen' } } } @@ -25361,6 +30193,284 @@ export interface operations { } } } + /**

Returns a list of Financial Connections Account objects.

*/ + GetFinancialConnectionsAccounts: { + parameters: { + query: { + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an Financial Connections Account.

*/ + GetFinancialConnectionsAccountsAccount: { + 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']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostFinancialConnectionsAccountsAccountDisconnect: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Lists all owners for a given Account

*/ + GetFinancialConnectionsAccountsAccountOwners: { + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostFinancialConnectionsAccountsAccountRefresh: { + parameters: { + path: { + account: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.account'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] + } + } + } + } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostFinancialConnectionsSessions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string + } + } + } + } + /**

Retrieves the details of a Financial Connections Session

*/ + GetFinancialConnectionsSessionsSession: { + 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']['financial_connections.session'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /**

List all verification reports.

*/ GetIdentityVerificationReports: { parameters: { @@ -25814,7 +30924,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. */ amount?: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency?: string @@ -25839,7 +30949,7 @@ export interface operations { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25868,11 +30978,11 @@ export interface operations { subscription?: string /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. */ tax_rates?: string[] - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -25934,7 +31044,7 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The integer amount in %s of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ + /** @description The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. */ amount?: number /** @description An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. */ description?: string @@ -25953,7 +31063,7 @@ export interface operations { metadata?: { [key: string]: string } | '' /** * period - * @description The period associated with this invoice item. + * @description The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. */ period?: { /** Format: unix-time */ @@ -25980,11 +31090,11 @@ export interface operations { quantity?: number /** @description The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. */ tax_rates?: string[] | '' - /** @description The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ + /** @description The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. */ unit_amount?: number /** * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. */ unit_amount_decimal?: string } @@ -26087,7 +31197,7 @@ export interface operations { } } } - /**

This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ + /**

This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

*/ PostInvoices: { responses: { /** Successful response. */ @@ -26108,7 +31218,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. When `false`, the invoice's state will not automatically advance without an explicit action. */ auto_advance?: boolean @@ -26124,6 +31234,8 @@ export interface operations { * @enum {string} */ collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The currency to create this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** @description A list of up to 4 custom fields to be displayed on the invoice. */ custom_fields?: | { @@ -26132,7 +31244,7 @@ export interface operations { }[] | '' /** @description The ID of the customer who will be billed. */ - customer: string + customer?: string /** @description The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. */ days_until_due?: number /** @description ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. */ @@ -26159,6 +31271,15 @@ export interface operations { expand?: string[] /** @description Footer to be displayed on the invoice. */ footer?: string + /** + * from_invoice + * @description Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + */ + from_invoice?: { + /** @enum {string} */ + action: 'revision' + invoice: string + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' /** @description The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. */ @@ -26168,6 +31289,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26189,10 +31311,47 @@ export interface operations { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26204,19 +31363,37 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** + * @description How to handle pending invoice items on invoice creation. One of `include` or `exclude`. `include` will include any pending invoice items, and will create an empty draft invoice if no pending invoice items exist. `exclude` will always create an empty invoice draft regardless if there are pending invoice items or not. Defaults to `exclude` if the parameter is omitted. + * @enum {string} + */ + pending_invoice_items_behavior?: 'exclude' | 'include' | 'include_and_require' + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string - /** @description The ID of the subscription to invoice, if any. If not set, the created invoice will include all pending invoice items for the customer. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription. The subscription's billing cycle and regular subscription events won't be affected. */ + /** @description The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription and pending invoice items not associated with any subscription if `pending_invoice_items_behavior` is `include`. The subscription's billing cycle and regular subscription events won't be affected. */ subscription?: string /** * transfer_data_specs @@ -26230,6 +31407,57 @@ export interface operations { } } } + /** + *

Search for invoices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetInvoicesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['invoice'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } /** *

At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice.

* @@ -26246,6 +31474,8 @@ export interface operations { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26287,6 +31517,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26298,10 +31529,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26321,6 +31554,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26421,13 +31655,7 @@ export interface operations { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26469,6 +31697,8 @@ export interface operations { } /** 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 currency to preview this invoice in. Defaults to that of `customer` if not specified. */ + currency?: string /** The identifier of the customer whose upcoming invoice you'd like to retrieve. */ customer?: string /** Details about the customer you want to invoice or overrides for an existing customer. */ @@ -26510,6 +31740,7 @@ export interface operations { | 'ae_trn' | 'au_abn' | 'au_arn' + | 'bg_uic' | 'br_cnpj' | 'br_cpf' | 'ca_bn' @@ -26521,10 +31752,12 @@ export interface operations { | 'ch_vat' | 'cl_tin' | 'es_cif' + | 'eu_oss_vat' | 'eu_vat' | 'gb_vat' | 'ge_vat' | 'hk_br' + | 'hu_tin' | 'id_npwp' | 'il_vat' | 'in_gst' @@ -26544,6 +31777,7 @@ export interface operations { | 'sa_vat' | 'sg_gst' | 'sg_uen' + | 'si_tin' | 'th_vat' | 'tw_vat' | 'ua_vat' @@ -26650,13 +31884,7 @@ export interface operations { quantity?: number tax_rates?: string[] | '' }[] - /** - * Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - */ + /** 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. */ subscription_proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' /** If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period, and cannot be before the subscription was on its current plan. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. */ subscription_proration_date?: number @@ -26764,7 +31992,7 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description The account tax IDs associated with the invoice. Only editable when the invoice is a draft. */ account_tax_ids?: string[] | '' - /** @description A fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ + /** @description A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). */ application_fee_amount?: number /** @description Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) of the invoice. */ auto_advance?: boolean @@ -26822,6 +32050,7 @@ export interface operations { * @description Configuration settings for the PaymentIntent that is generated when the invoice is finalized. */ payment_settings?: { + default_mandate?: string /** payment_method_options */ payment_method_options?: { acss_debit?: @@ -26843,10 +32072,47 @@ export interface operations { | '' card?: | { + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' } | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' } payment_method_types?: | ( @@ -26858,16 +32124,29 @@ export interface operations { | 'bancontact' | 'boleto' | 'card' + | 'customer_balance' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' )[] | '' } + /** @description Options for invoice PDF rendering. */ + rendering_options?: + | { + /** @enum {string} */ + amount_tax_display?: '' | 'exclude_tax' | 'include_inclusive_tax' + } + | '' /** @description Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. */ statement_descriptor?: string /** @description If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. */ @@ -27051,6 +32330,8 @@ export interface operations { * Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. */ forgive?: boolean + /** @description ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. */ + mandate?: string /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). */ off_session?: boolean /** @description Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. */ @@ -27127,88 +32408,6 @@ export interface operations { } } } - /**

Returns a list of issuer fraud records.

*/ - GetIssuerFraudRecords: { - parameters: { - query: { - /** Only return issuer fraud records for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['issuer_fraud_record'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /** - *

Retrieves the details of an issuer fraud record that has previously been created.

- * - *

Please refer to the issuer fraud record object reference for more details.

- */ - GetIssuerFraudRecordsIssuerFraudRecord: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - issuer_fraud_record: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['issuer_fraud_record'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } /**

Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ GetIssuingAuthorizations: { parameters: { @@ -27529,7 +32728,7 @@ export interface operations { } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. */ + /** @description The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. */ name: string /** @description The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. */ phone_number?: string @@ -29518,6 +34717,7 @@ export interface operations { currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + financial_account?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } /** @description The card this is meant to be a replacement for (if any). */ @@ -29541,7 +34741,13 @@ export interface operations { postal_code: string state?: string } + /** customs_param */ + customs?: { + eori_number?: string + } name: string + phone_number?: string + require_signature?: boolean /** @enum {string} */ service?: 'express' | 'priority' | 'standard' /** @enum {string} */ @@ -31480,6 +36686,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31563,8 +36771,15 @@ export interface operations { expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The ID of the issuing transaction to create a dispute for. */ - transaction: string + /** @description The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. */ + transaction?: string + /** + * treasury_param + * @description Params for disputes related to Treasury FinancialAccounts + */ + treasury?: { + received_debit: string + } } } } @@ -31624,6 +36839,8 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). */ + amount?: number /** * evidence_param * @description Evidence provided for the dispute. @@ -31983,22 +37200,13 @@ export interface operations { } } } - /**

Retrieves a Mandate object.

*/ - GetMandatesMandate: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - mandate: string - } - } + /**

To launch the Financial Connections authorization flow, create a Session. The session’s client_secret can be used to launch the flow using Stripe.js.

*/ + PostLinkAccountSessions: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['mandate'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32010,82 +37218,54 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of your order returns. The returns are returned sorted by creation date, with the most recently created return appearing first.

*/ - GetOrderReturns: { - parameters: { - query: { - /** Date this return was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The order to retrieve returns for. */ - order?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['order_return'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** + * accountholder_params + * @description The account holder to link accounts for. + */ + account_holder: { + account?: string + customer?: string + /** @enum {string} */ + type: 'account' | 'customer' } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * filters_params + * @description Filters to restrict the kinds of accounts to collect. + */ + filters?: { + countries: string[] + } + /** + * @description List of data features that you would like to request access to. + * + * Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + */ + permissions: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + /** @description For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. */ + return_url?: string } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } - /**

Retrieves the details of an existing order return. Supply the unique order ID from either an order return creation request or the order return list, and Stripe will return the corresponding order information.

*/ - GetOrderReturnsId: { + /**

Retrieves the details of a Financial Connections Session

*/ + GetLinkAccountSessionsSession: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - id: string + session: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['financial_connections.session'] } } /** Error response. */ @@ -32101,70 +37281,25 @@ export interface operations { } } } - /**

Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first.

*/ - GetOrders: { + /**

Returns a list of Financial Connections Account objects.

*/ + GetLinkedAccounts: { parameters: { query: { - /** Date this order was created. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return orders for the given customer. */ - customer?: string + /** If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. */ + account_holder?: { + account?: string + 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 + /** If present, only return accounts that were collected as part of the given session. */ + session?: 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 orders that have the given status. One of `created`, `paid`, `fulfilled`, or `refunded`. */ - status?: string - /** Filter orders based on when they were paid, fulfilled, canceled, or returned. */ - status_transitions?: { - canceled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - fulfilled?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - paid?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - returned?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - } - /** Only return orders with the given upstream order IDs. */ - upstream_ids?: string[] } } responses: { @@ -32172,7 +37307,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['order'][] + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32198,13 +37334,22 @@ export interface operations { } } } - /**

Creates a new order object.

*/ - PostOrders: { + /**

Retrieves the details of an Financial Connections Account.

*/ + GetLinkedAccountsAccount: { + 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']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32216,66 +37361,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description The ID of an existing customer to use for this order. If provided, the customer email and shipping address will be used to create the order. Subsequently, the customer will also be charged to pay the order. If `email` or `shipping` are also provided, they will override the values retrieved from the customer object. */ - customer?: string - /** @description The email address of the customer placing the order. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items constituting the order. An order can have up to 25 items. */ - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * customer_shipping - * @description Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - name: string - phone?: string - } - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions).

*/ + PostLinkedAccountsAccountDisconnect: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32287,22 +37388,49 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostOrdersId: { + /**

Lists all owners for a given Account

*/ + GetLinkedAccountsAccountOwners: { parameters: { path: { - id: string + 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 + /** The ID of the ownership object to fetch owners from. */ + ownership: 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': components['schemas']['order'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['financial_connections.account_owner'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -32314,44 +37442,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A coupon code that represents a discount to be applied to this order. Must be one-time duration and in same currency as the order. An order can have multiple coupons. */ - coupon?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The shipping method to select for fulfilling this order. If specified, must be one of the `id`s of a shipping method in the `shipping_methods` array. If specified, will overwrite the existing selected shipping method, updating `items` as necessary. */ - selected_shipping_method?: string - /** - * shipping_tracking_params - * @description Tracking information once the order has been fulfilled. - */ - shipping?: { - carrier: string - tracking_number: string - } - /** - * @description Current order status. One of `created`, `paid`, `canceled`, `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - * @enum {string} - */ - status?: 'canceled' | 'created' | 'fulfilled' | 'paid' | 'returned' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Pay an order by providing a source to create a payment.

*/ - PostOrdersIdPay: { + /**

Refreshes the data associated with a Financial Connections Account.

*/ + PostLinkedAccountsAccountRefresh: { parameters: { path: { - id: string + account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order'] + 'application/json': components['schemas']['financial_connections.account'] } } /** Error response. */ @@ -32364,34 +37470,30 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A fee in %s that will be applied to the order and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). */ - application_fee?: number - /** @description The ID of an existing customer that will be charged for this order. If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified customer will be charged instead of the one attached to the order. */ - customer?: string - /** @description The email address of the customer placing the order. Required if not previously specified for the order. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A [Token](https://stripe.com/docs/api#tokens)'s or a [Source](https://stripe.com/docs/api#sources)'s ID, as returned by [Elements](https://stripe.com/docs/elements). If no customer was attached to the order at creation, either `source` or `customer` is required. Otherwise, the specified source will be charged intead of the customer attached to the order. */ - source?: string + /** @description The list of account features that you would like to refresh. */ + features: ('balance' | 'ownership')[] } } } } - /**

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: { + /**

Retrieves a Mandate object.

*/ + GetMandatesMandate: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + mandate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['order_return'] + 'application/json': components['schemas']['mandate'] } } /** Error response. */ @@ -32403,38 +37505,15 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description List of items to return. */ - items?: - | { - amount?: number - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of PaymentIntents.

*/ - GetPaymentIntents: { + /**

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: { - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return PaymentIntents for the customer specified by this customer ID. */ + /** 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 @@ -32451,7 +37530,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['payment_intent'][] + data: components['schemas']['order'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -32477,24 +37556,13 @@ export interface operations { } } } - /** - *

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: { + /**

Creates a new open order object.

*/ + PostOrders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -32507,288 +37575,117 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** - * automatic_payment_methods_param - * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + * automatic_tax + * @description Settings for automatic tax calculation for this order. */ - automatic_payment_methods?: { + automatic_tax?: { enabled: boolean } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' /** - * @description Controls when the funds will be captured from the customer's account. - * @enum {string} + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ - capture_method?: 'automatic' | 'manual' - /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ - confirm?: boolean - /** @enum {string} */ - confirmation_method?: 'automatic' | 'manual' + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string - /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. - */ + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - error_on_requires_action?: boolean + /** @description The coupons, promotion codes, and/or discounts to apply to the order. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - mandate?: string - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - off_session?: boolean | ('one_off' | 'recurring') - /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - on_behalf_of?: string - /** - * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. - * - * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. - */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } - } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { + * create_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** create_params */ + settings: { + application_fee_amount?: number + /** create_params */ + payment_method_options?: { + /** payment_intent_payment_method_options_param */ + acss_debit?: { /** payment_intent_payment_method_options_mandate_options_param */ mandate_options?: { custom_mandate_url?: string | '' @@ -32799,68 +37696,74 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } - | '' - afterpay_clearpay?: - | { + /** afterpay_clearpay_payment_method_options_param */ + afterpay_clearpay?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + /** payment_method_options_param */ + alipay?: { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + bancontact?: { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - boleto?: - | { - expires_after_days?: number + /** card_payment_method_options */ + card?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' + /** payment_intent_payment_method_options_param */ + customer_balance?: { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' } /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + funding_type?: 'bank_transfer' /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' + setup_future_usage?: 'none' + } + /** payment_method_options_param */ + ideal?: { /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { + /** payment_method_options_param */ + klarna?: { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -32871,130 +37774,243 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - oxxo?: - | { + /** payment_intent_payment_method_options_param */ + link?: { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + /** payment_method_options_param */ + oxxo?: { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - p24?: - | { + /** payment_method_options_param */ + p24?: { + /** @enum {string} */ + setup_future_usage?: 'none' tos_shown_and_accepted?: boolean } - | '' - sepa_debit?: - | { + /** payment_intent_payment_method_options_param */ + sepa_debit?: { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } - | '' - sofort?: - | { + /** payment_method_options_param */ + sofort?: { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } - | '' - wechat_pay?: - | { + /** payment_method_options_param */ + wechat_pay?: { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ - return_url?: string - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * @enum {string} - */ - setup_future_usage?: 'off_session' | 'on_session' - /** - * optional_fields_shipping - * @description Shipping information for this PaymentIntent. - */ - shipping?: { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string + statement_descriptor?: string + statement_descriptor_suffix?: string + /** transfer_data */ + transfer_data?: { + amount?: number + destination: string + } } - carrier?: string - name: string - phone?: string - tracking_number?: string } - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + metadata?: { [key: string]: string } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string + /** @enum {string} */ + type?: 'fixed_amount' + } + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: + | { + /** validated_optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + name: string + phone?: string + } + | '' /** - * transfer_data_creation_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. - * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number - destination: string + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string - /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ - use_stripe_sdk?: boolean } } } } - /** - *

Retrieves the details of a PaymentIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the payment intent object reference for more details.

- */ - GetPaymentIntentsIntent: { + /**

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: { - /** 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 + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33010,26 +38026,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostOrdersId: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33042,386 +38050,367 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ - amount?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number | '' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string /** - * @description ID of the Customer this PaymentIntent belongs to, if one exists. - * - * Payment methods attached to other Customers cannot be used with this PaymentIntent. - * - * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + * automatic_tax + * @description Settings for automatic tax calculation for this order. + */ + automatic_tax?: { + enabled: boolean + } + /** @description Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. */ + billing_details?: + | { + /** validated_optional_fields_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + | '' + /** + * client_permissions + * @description The fields on the order that are allowed to be updated from your frontend application with a publishable key and order client secret. */ + client_permissions?: { + /** @enum {string} */ + billing_details?: 'allow' | 'disallow' + /** @enum {string} */ + promotion_codes?: 'allow' | 'disallow' + /** @enum {string} */ + shipping_details?: 'allow' | 'disallow' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The customer associated with this order. */ customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. */ + discounts?: + | { + coupon?: string + discount?: string + promotion_code?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ - payment_method?: string - /** - * payment_method_data_params - * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear - * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) - * property on the PaymentIntent. - */ - payment_method_data?: { - /** payment_method_param */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** param */ - afterpay_clearpay?: { [key: string]: unknown } - /** param */ - alipay?: { [key: string]: unknown } - /** param */ - au_becs_debit?: { - account_number: string - bsb_number: string - } - /** param */ - bacs_debit?: { - account_number?: string - sort_code?: string + /** @description The IP address of the purchaser for this order. */ + ip_address?: string + /** @description A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + description?: string + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' + id?: string + price?: string + /** price_data_with_optional_product */ + price_data?: { + currency?: string + product?: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string } - /** param */ - bancontact?: { [key: string]: unknown } - /** billing_details_inner_params */ - billing_details?: { - address?: + product?: string + /** product_upsert_data */ + product_data?: { + description?: string + id: string + images?: string[] | '' + metadata?: { [key: string]: string } | '' + name: string + package_dimensions?: | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string + height: number + length: number + weight: number + width: number } | '' - email?: string | '' - name?: string - phone?: string - } - /** param */ - boleto?: { - tax_id: string - } - /** param */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** param */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** param */ - giropay?: { [key: string]: unknown } - /** param */ - grabpay?: { [key: string]: unknown } - /** param */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' + shippable?: boolean + tax_code?: string + url?: string | '' } - /** param */ - interac_present?: { [key: string]: unknown } - /** param */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * update_params + * @description Payment information associated with the order, including payment settings. + */ + payment?: { + /** update_params */ + settings: { + application_fee_amount?: number | '' + /** update_params */ + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' | 'off_session' | 'on_session' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + payment_method_types?: ( + | 'acss_debit' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'link' + | 'oxxo' + | 'p24' + | 'sepa_debit' + | 'sofort' + | 'wechat_pay' + )[] + return_url?: string | '' + statement_descriptor?: string + statement_descriptor_suffix?: string + transfer_data?: + | { + amount?: number + destination: string + } + | '' } - metadata?: { [key: string]: string } - /** param */ - oxxo?: { [key: string]: unknown } - /** param */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** param */ - sepa_debit?: { - iban: string - } - /** param */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** @enum {string} */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** param */ - wechat_pay?: { [key: string]: unknown } } - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this PaymentIntent. - */ - payment_method_options?: { - acss_debit?: - | { - /** payment_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + /** @description Settings for the customer cost of shipping for this order. */ + shipping_cost?: + | { + shipping_rate?: string + /** method_params */ + shipping_rate_data?: { + /** delivery_estimate */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + display_name: string + /** fixed_amount */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } } + metadata?: { [key: string]: string } /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - afterpay_clearpay?: - | { - reference?: string - } - | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' - bancontact?: - | { + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tax_code?: string /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - boleto?: - | { - expires_after_days?: number + type?: 'fixed_amount' } - | '' - card?: - | { - cvc_token?: string - /** installments_param */ - installments?: { - enabled?: boolean - plan?: - | { - count: number - /** @enum {string} */ - interval: 'month' - /** @enum {string} */ - type: 'fixed_count' - } - | '' - } - /** @enum {string} */ - network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - /** @enum {string} */ - setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' - } - | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' - interac_present?: { [key: string]: unknown } | '' - klarna?: - | { - /** @enum {string} */ - preferred_locale?: - | 'da-DK' - | 'de-AT' - | 'de-DE' - | 'en-AT' - | 'en-BE' - | 'en-DE' - | 'en-DK' - | 'en-ES' - | 'en-FI' - | 'en-FR' - | 'en-GB' - | 'en-IE' - | 'en-IT' - | 'en-NL' - | 'en-NO' - | 'en-SE' - | 'en-US' - | 'es-ES' - | 'es-US' - | 'fi-FI' - | 'fr-BE' - | 'fr-FR' - | 'it-IT' - | 'nb-NO' - | 'nl-BE' - | 'nl-NL' - | 'sv-FI' - | 'sv-SE' - } - | '' - oxxo?: - | { - expires_after_days?: number - } - | '' - p24?: - | { - tos_shown_and_accepted?: boolean - } - | '' - sepa_debit?: - | { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - | '' - sofort?: - | { - /** @enum {string} */ - preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' - } - | '' - wechat_pay?: - | { - app_id?: string - /** @enum {string} */ - client: 'android' | 'ios' | 'web' - } - | '' - } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ - payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' - /** - * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. - * - * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - * - * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. - * @enum {string} - */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: + } + | '' + /** @description Shipping details for the order. */ + shipping_details?: | { - /** optional_fields_address */ + /** validated_optional_fields_address */ address: { city?: string country?: string @@ -33430,45 +38419,85 @@ export interface operations { postal_code?: string state?: string } - carrier?: string name: string phone?: string - tracking_number?: string } | '' - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + * tax_details + * @description Additional tax details about the purchaser to be used for this order. */ - transfer_data?: { - amount?: number + tax_details?: { + /** @enum {string} */ + tax_exempt?: '' | 'exempt' | 'none' | 'reverse' + tax_ids?: { + /** @enum {string} */ + type: + | 'ae_trn' + | 'au_abn' + | 'au_arn' + | 'bg_uic' + | 'br_cnpj' + | 'br_cpf' + | 'ca_bn' + | 'ca_gst_hst' + | 'ca_pst_bc' + | 'ca_pst_mb' + | 'ca_pst_sk' + | 'ca_qst' + | 'ch_vat' + | 'cl_tin' + | 'es_cif' + | 'eu_oss_vat' + | 'eu_vat' + | 'gb_vat' + | 'ge_vat' + | 'hk_br' + | 'hu_tin' + | 'id_npwp' + | 'il_vat' + | 'in_gst' + | 'is_vat' + | 'jp_cn' + | 'jp_rn' + | 'kr_brn' + | 'li_uid' + | 'mx_rfc' + | 'my_frp' + | 'my_itn' + | 'my_sst' + | 'no_vat' + | 'nz_gst' + | 'ru_inn' + | 'ru_kpp' + | 'sa_vat' + | 'sg_gst' + | 'sg_uen' + | 'si_tin' + | 'th_vat' + | 'tw_vat' + | 'ua_vat' + | 'us_ein' + | 'za_vat' + value: string + }[] } - /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ - transfer_group?: string } } } } - /** - *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

- * - *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

- */ - PostPaymentIntentsIntentCancel: { + /**

Cancels the order as well as the payment intent if one is attached.

*/ + PostOrdersIdCancel: { parameters: { path: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33481,35 +38510,73 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /** - *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

- * - *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

- * - *

Learn more about separate authorization and capture.

- */ - PostPaymentIntentsIntentCapture: { + /**

When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetOrdersIdLineItems: { 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: { - intent: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reopens a submitted order.

*/ + PostOrdersIdReopen: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] } } /** Error response. */ @@ -33522,61 +38589,113 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ - amount_to_capture?: number - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ - application_fee_amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ - statement_descriptor?: string - /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ - statement_descriptor_suffix?: string - /** - * transfer_data_update_params - * @description The parameters used to automatically create a Transfer when the payment - * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). - */ - transfer_data?: { - amount?: number + } + } + } + } + /**

Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

*/ + PostOrdersIdSubmit: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['order'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. */ + expected_total: number + } + } + } + } + /**

Returns a list of PaymentIntents.

*/ + GetPaymentIntents: { + parameters: { + query: { + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return PaymentIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['payment_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string } } } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } } } /** - *

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).

+ *

Creates a PaymentIntent object.

* - *

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.

+ *

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.

* - *

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.

+ *

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.

*/ - PostPaymentIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostPaymentIntents: { responses: { /** Successful response. */ 200: { @@ -33594,47 +38713,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** + * automatic_payment_methods_param + * @description When enabled, this PaymentIntent will accept payment methods that you have enabled in the Dashboard and are compatible with this PaymentIntent's other parameters. + */ + automatic_payment_methods?: { + enabled: boolean + } + /** + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} + */ + capture_method?: 'automatic' | 'manual' + /** @description Set to `true` to attempt to [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, parameters available in the [confirm](https://stripe.com/docs/api/payment_intents/confirm) API may also be provided. */ + confirm?: boolean + /** @enum {string} */ + confirmation_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ error_on_requires_action?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description ID of the mandate to be used for this payment. */ + /** @description ID of the mandate to be used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ mandate?: string - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string } - /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ off_session?: boolean | ('one_off' | 'recurring') - /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + /** @description The Stripe account ID for which these funds are intended. For details, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + on_behalf_of?: string + /** + * @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + * + * If this parameter is omitted with `confirm=true`, `customer.default_source` will be attached as this PaymentIntent's payment instrument to improve the migration experience for users of the Charges API. We recommend that you explicitly provide the `payment_method` going forward. + */ payment_method?: string /** * payment_method_data_params @@ -33650,6 +38797,8 @@ export interface operations { transit_number: string } /** param */ + affirm?: { [key: string]: unknown } + /** param */ afterpay_clearpay?: { [key: string]: unknown } /** param */ alipay?: { [key: string]: unknown } @@ -33682,10 +38831,14 @@ export interface operations { phone?: string } /** param */ + blik?: { [key: string]: unknown } + /** param */ boleto?: { tax_id: string } /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ eps?: { /** @enum {string} */ bank?: @@ -33699,6 +38852,7 @@ export interface operations { | 'brull_kallmus_bank_ag' | 'btv_vier_lander_bank' | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' | 'dolomitenbank' | 'easybank_ag' | 'erste_bank_und_sparkassen' @@ -33776,6 +38930,10 @@ export interface operations { year: number } } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } metadata?: { [key: string]: string } /** param */ oxxo?: { [key: string]: unknown } @@ -33810,6 +38968,16 @@ export interface operations { | 'volkswagen_bank' } /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ sepa_debit?: { iban: string } @@ -33821,23 +38989,42 @@ export interface operations { /** @enum {string} */ type: | 'acss_debit' + | 'affirm' | 'afterpay_clearpay' | 'alipay' | 'au_becs_debit' | 'bacs_debit' | 'bancontact' + | 'blik' | 'boleto' + | 'customer_balance' | 'eps' | 'fpx' | 'giropay' | 'grabpay' | 'ideal' | 'klarna' + | 'konbini' + | 'link' | 'oxxo' | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' | 'sepa_debit' | 'sofort' + | 'us_bank_account' | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } /** param */ wechat_pay?: { [key: string]: unknown } } @@ -33858,30 +39045,70 @@ export interface operations { transaction_type?: 'business' | 'personal' } /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' afterpay_clearpay?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' - alipay?: { [key: string]: unknown } | '' - au_becs_debit?: { [key: string]: unknown } | '' - bacs_debit?: { [key: string]: unknown } | '' bancontact?: | { /** @enum {string} */ preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string } | '' boleto?: | { expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' card?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' cvc_token?: string /** installments_param */ installments?: { @@ -33896,30 +39123,102 @@ export interface operations { } | '' } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } /** @enum {string} */ network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' /** @enum {string} */ request_three_d_secure?: 'any' | 'automatic' /** @enum {string} */ setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' } | '' - card_present?: { [key: string]: unknown } | '' - eps?: { [key: string]: unknown } | '' - fpx?: { [key: string]: unknown } | '' - giropay?: { [key: string]: unknown } | '' - grabpay?: { [key: string]: unknown } | '' - ideal?: { [key: string]: unknown } | '' interac_present?: { [key: string]: unknown } | '' klarna?: | { + /** @enum {string} */ + capture_method?: '' | 'manual' /** @enum {string} */ preferred_locale?: | 'da-DK' | 'de-AT' + | 'de-CH' | 'de-DE' | 'en-AT' + | 'en-AU' | 'en-BE' + | 'en-CA' + | 'en-CH' | 'en-DE' | 'en-DK' | 'en-ES' @@ -33930,41 +39229,116 @@ export interface operations { | 'en-IT' | 'en-NL' | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' | 'en-SE' | 'en-US' | 'es-ES' | 'es-US' | 'fi-FI' | 'fr-BE' + | 'fr-CA' + | 'fr-CH' | 'fr-FR' + | 'it-CH' | 'it-IT' | 'nb-NO' | 'nl-BE' | 'nl-NL' + | 'pl-PL' + | 'pt-PT' | 'sv-FI' | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - oxxo?: + konbini?: | { - expires_after_days?: number + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' } | '' - p24?: + link?: | { - tos_shown_and_accepted?: boolean - } + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } | '' sepa_debit?: | { /** payment_method_options_mandate_options_param */ mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' } | '' sofort?: | { /** @enum {string} */ preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' } | '' wechat_pay?: @@ -33972,18 +39346,23 @@ export interface operations { app_id?: string /** @enum {string} */ client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' } | '' } - /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. */ + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults to ["card"]. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ payment_method_types?: string[] - /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ - receipt_email?: string | '' /** - * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ + radar_options?: { + session?: string + } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). */ return_url?: string /** * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. @@ -33991,47 +39370,85 @@ export interface operations { * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. * * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - * - * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. * @enum {string} */ - setup_future_usage?: '' | 'off_session' | 'on_session' - /** @description Shipping information for this PaymentIntent. */ - shipping?: - | { - /** optional_fields_address */ - address: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name: string - phone?: string - tracking_number?: string - } - | '' + setup_future_usage?: 'off_session' | 'on_session' + /** + * optional_fields_shipping + * @description Shipping information for this PaymentIntent. + */ + shipping?: { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_creation_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + destination: string + } + /** @description A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ use_stripe_sdk?: boolean } } } } - /**

Verifies microdeposits on a PaymentIntent object.

*/ - PostPaymentIntentsIntentVerifyMicrodeposits: { + /** + *

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPaymentIntentsSearch: { parameters: { - path: { - intent: 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). */ + query: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_intent'] + 'application/json': { + data: components['schemas']['payment_intent'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } } } /** Error response. */ @@ -34043,49 +39460,34 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the PaymentIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your payment links.

*/ - GetPaymentLinks: { + /** + *

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: { - /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ - active?: boolean - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string + /** 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[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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: { + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['payment_link'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34101,13 +39503,26 @@ export interface operations { } } } - /**

Creates a payment link.

*/ - PostPaymentLinks: { + /** + *

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_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34120,348 +39535,663 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). */ + amount?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number | '' /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ - application_fee_amount?: number - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - automatic_tax?: { - enabled: boolean - } + capture_method?: 'automatic' | 'manual' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string /** - * @description Configuration for collecting the customer's billing address. - * @enum {string} + * @description ID of the Customer this PaymentIntent belongs to, if one exists. + * + * Payment methods attached to other Customers cannot be used with this PaymentIntent. + * + * If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. */ - billing_address_collection?: 'auto' | 'required' + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - price: string - quantity: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string - /** @description The list of payment method types that customers can use. Only `card` is supported. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ - payment_method_types?: 'card'[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * phone_number_collection_params - * @description Controls phone number collection settings during checkout. - * - * We recommend that you review your privacy policy and check with your legal contacts. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - phone_number_collection?: { - enabled: boolean + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } } /** - * shipping_address_collection_params - * @description Configuration for collecting the customer's shipping address. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - 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' - )[] + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * subscription_data_params - * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - subscription_data?: { - trial_period_days?: number - } + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name: string + phone?: string + tracking_number?: string + } + | '' + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string /** - * transfer_data_params - * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment succeeds. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ transfer_data?: { amount?: number - destination: string } + /** @description A string that identifies the resulting payment as part of a group. `transfer_group` may only be provided if it has not been set. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. */ + transfer_group?: string } } } } - /**

Retrieve a payment link.

*/ - GetPaymentLinksPaymentLink: { + /**

Manually reconcile the remaining amount for a customer_balance PaymentIntent.

*/ + PostPaymentIntentsIntentApplyCustomerBalance: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34473,22 +40203,43 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * @description Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + * + * 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 maximum amount is the amount of the PaymentIntent. + * + * When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + */ + amount?: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates a payment link.

*/ - PostPaymentLinksPaymentLink: { - parameters: { - path: { - payment_link: string - } - } + /** + *

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

+ * + *

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+ * + *

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

+ */ + PostPaymentIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_link'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34501,337 +40252,35 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ - active?: boolean - /** - * after_completion_params - * @description Behavior after the purchase is complete. - */ - after_completion?: { - /** after_completion_confirmation_page_params */ - hosted_confirmation?: { - custom_message?: string - } - /** after_completion_redirect_params */ - redirect?: { - url: string - } - /** @enum {string} */ - type: 'hosted_confirmation' | 'redirect' - } - /** @description Enables user redeemable promotion codes. */ - allow_promotion_codes?: boolean - /** - * automatic_tax_params - * @description Configuration for automatic tax collection. - */ - automatic_tax?: { - enabled: boolean - } /** - * @description Configuration for collecting the customer's billing address. + * @description Reason for canceling this PaymentIntent. Possible values are `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` * @enum {string} */ - billing_address_collection?: 'auto' | 'required' + cancellation_reason?: 'abandoned' | 'duplicate' | 'fraudulent' | 'requested_by_customer' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ - line_items?: { - /** adjustable_quantity_params */ - adjustable_quantity?: { - enabled: boolean - maximum?: number - minimum?: number - } - id: string - quantity?: number - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ - metadata?: { [key: string]: string } - /** @description The list of payment method types that customers can use. Only `card` is supported. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ - payment_method_types?: 'card'[] | '' - /** @description Configuration for collecting the customer's shipping address. */ - shipping_address_collection?: - | { - allowed_countries: ( - | 'AC' - | 'AD' - | 'AE' - | 'AF' - | 'AG' - | 'AI' - | 'AL' - | 'AM' - | 'AO' - | 'AQ' - | 'AR' - | 'AT' - | 'AU' - | 'AW' - | 'AX' - | 'AZ' - | 'BA' - | 'BB' - | 'BD' - | 'BE' - | 'BF' - | 'BG' - | 'BH' - | 'BI' - | 'BJ' - | 'BL' - | 'BM' - | 'BN' - | 'BO' - | 'BQ' - | 'BR' - | 'BS' - | 'BT' - | 'BV' - | 'BW' - | 'BY' - | 'BZ' - | 'CA' - | 'CD' - | 'CF' - | 'CG' - | 'CH' - | 'CI' - | 'CK' - | 'CL' - | 'CM' - | 'CN' - | 'CO' - | 'CR' - | 'CV' - | 'CW' - | 'CY' - | 'CZ' - | 'DE' - | 'DJ' - | 'DK' - | 'DM' - | 'DO' - | 'DZ' - | 'EC' - | 'EE' - | 'EG' - | 'EH' - | 'ER' - | 'ES' - | 'ET' - | 'FI' - | 'FJ' - | 'FK' - | 'FO' - | 'FR' - | 'GA' - | 'GB' - | 'GD' - | 'GE' - | 'GF' - | 'GG' - | 'GH' - | 'GI' - | 'GL' - | 'GM' - | 'GN' - | 'GP' - | 'GQ' - | 'GR' - | 'GS' - | 'GT' - | 'GU' - | 'GW' - | 'GY' - | 'HK' - | 'HN' - | 'HR' - | 'HT' - | 'HU' - | 'ID' - | 'IE' - | 'IL' - | 'IM' - | 'IN' - | 'IO' - | 'IQ' - | 'IS' - | 'IT' - | 'JE' - | 'JM' - | 'JO' - | 'JP' - | 'KE' - | 'KG' - | 'KH' - | 'KI' - | 'KM' - | 'KN' - | 'KR' - | 'KW' - | 'KY' - | 'KZ' - | 'LA' - | 'LB' - | 'LC' - | 'LI' - | 'LK' - | 'LR' - | 'LS' - | 'LT' - | 'LU' - | 'LV' - | 'LY' - | 'MA' - | 'MC' - | 'MD' - | 'ME' - | 'MF' - | 'MG' - | 'MK' - | 'ML' - | 'MM' - | 'MN' - | 'MO' - | 'MQ' - | 'MR' - | 'MS' - | 'MT' - | 'MU' - | 'MV' - | 'MW' - | 'MX' - | 'MY' - | 'MZ' - | 'NA' - | 'NC' - | 'NE' - | 'NG' - | 'NI' - | 'NL' - | 'NO' - | 'NP' - | 'NR' - | 'NU' - | 'NZ' - | 'OM' - | 'PA' - | 'PE' - | 'PF' - | 'PG' - | 'PH' - | 'PK' - | 'PL' - | 'PM' - | 'PN' - | 'PR' - | 'PS' - | 'PT' - | 'PY' - | 'QA' - | 'RE' - | 'RO' - | 'RS' - | 'RU' - | 'RW' - | 'SA' - | 'SB' - | 'SC' - | 'SE' - | 'SG' - | 'SH' - | 'SI' - | 'SJ' - | 'SK' - | 'SL' - | 'SM' - | 'SN' - | 'SO' - | 'SR' - | 'SS' - | 'ST' - | 'SV' - | 'SX' - | 'SZ' - | 'TA' - | 'TC' - | 'TD' - | 'TF' - | 'TG' - | 'TH' - | 'TJ' - | 'TK' - | 'TL' - | 'TM' - | 'TN' - | 'TO' - | 'TR' - | 'TT' - | 'TV' - | 'TW' - | 'TZ' - | 'UA' - | 'UG' - | 'US' - | 'UY' - | 'UZ' - | 'VA' - | 'VC' - | 'VE' - | 'VG' - | 'VN' - | 'VU' - | 'WF' - | 'WS' - | 'XK' - | 'YE' - | 'YT' - | 'ZA' - | 'ZM' - | 'ZW' - | 'ZZ' - )[] - } - | '' } } } } - /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetPaymentLinksPaymentLinkLineItems: { + /** + *

Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture.

+ * + *

Uncaptured PaymentIntents will be canceled a set number of days after they are created (7 by default).

+ * + *

Learn more about separate authorization and capture.

+ */ + PostPaymentIntentsIntentCapture: { parameters: { - query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } path: { - payment_link: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34843,89 +40292,67 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Returns a list of PaymentMethods. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ - GetPaymentMethods: { - parameters: { - query: { - /** The ID of the customer whose PaymentMethods will be retrieved. If not provided, the response list will be empty. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** A required filter on the list, based on the object `type` field. */ - type: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['payment_method'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string + 'application/x-www-form-urlencoded': { + /** @description The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. Defaults to the full `amount_capturable` if not provided. */ + amount_to_capture?: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description For non-card charges, you can use this value as the complete description that appears on your customers’ statements. Must contain at least one letter, maximum 22 characters. */ + statement_descriptor?: string + /** @description Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. */ + statement_descriptor_suffix?: string + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment + * is captured. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number } } } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } } } /** - *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ *

Confirm that your customer intends to pay with current or provided + * payment method. Upon confirmation, the PaymentIntent will attempt to initiate + * a payment.

* - *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ *

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.

*/ - PostPaymentMethods: { + PostPaymentIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -34939,52 +40366,653 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * payment_method_param - * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. - */ - acss_debit?: { - account_number: string - institution_number: string - transit_number: string - } - /** - * param - * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + * @description Controls when the funds will be captured from the customer's account. + * @enum {string} */ - afterpay_clearpay?: { [key: string]: unknown } + capture_method?: 'automatic' | 'manual' + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). */ + error_on_requires_action?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description ID of the mandate to be used for this payment. */ + mandate?: string + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description Set to `true` to indicate that the customer is not in your checkout flow during this payment attempt, and therefore is unable to authenticate. This parameter is intended for scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). */ + off_session?: boolean | ('one_off' | 'recurring') + /** @description ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. */ + payment_method?: string /** - * param - * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + * payment_method_data_params + * @description If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + * in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + * property on the PaymentIntent. */ - alipay?: { [key: string]: unknown } + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } /** - * param - * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + * payment_method_options_param + * @description Payment-method-specific configuration for this PaymentIntent. */ - au_becs_debit?: { - account_number: string - bsb_number: string + payment_method_options?: { + acss_debit?: + | { + /** payment_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + affirm?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + afterpay_clearpay?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + reference?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + alipay?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + au_becs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bacs_debit?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + blik?: + | { + code?: string + } + | '' + boleto?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + card?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + cvc_token?: string + /** installments_param */ + installments?: { + enabled?: boolean + plan?: + | { + count: number + /** @enum {string} */ + interval: 'month' + /** @enum {string} */ + type: 'fixed_count' + } + | '' + } + /** mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + statement_descriptor_suffix_kana?: string | '' + statement_descriptor_suffix_kanji?: string | '' + } + | '' + card_present?: + | { + request_extended_authorization?: boolean + request_incremental_authorization_support?: boolean + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_params */ + eu_bank_transfer?: { + country: string + } + requested_address_types?: ('iban' | 'sepa' | 'sort_code' | 'spei' | 'zengin')[] + /** @enum {string} */ + type: 'eu_bank_transfer' | 'gb_bank_transfer' | 'jp_bank_transfer' | 'mx_bank_transfer' + } + /** @enum {string} */ + funding_type?: 'bank_transfer' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + eps?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + fpx?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + giropay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + grabpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + ideal?: + | { + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + interac_present?: { [key: string]: unknown } | '' + klarna?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + /** @enum {string} */ + preferred_locale?: + | 'da-DK' + | 'de-AT' + | 'de-CH' + | 'de-DE' + | 'en-AT' + | 'en-AU' + | 'en-BE' + | 'en-CA' + | 'en-CH' + | 'en-DE' + | 'en-DK' + | 'en-ES' + | 'en-FI' + | 'en-FR' + | 'en-GB' + | 'en-IE' + | 'en-IT' + | 'en-NL' + | 'en-NO' + | 'en-NZ' + | 'en-PL' + | 'en-PT' + | 'en-SE' + | 'en-US' + | 'es-ES' + | 'es-US' + | 'fi-FI' + | 'fr-BE' + | 'fr-CA' + | 'fr-CH' + | 'fr-FR' + | 'it-CH' + | 'it-IT' + | 'nb-NO' + | 'nl-BE' + | 'nl-NL' + | 'pl-PL' + | 'pt-PT' + | 'sv-FI' + | 'sv-SE' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + konbini?: + | { + confirmation_number?: string + expires_after_days?: number | '' + expires_at?: number | '' + product_description?: string + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + link?: + | { + /** @enum {string} */ + capture_method?: '' | 'manual' + persistent_token?: string + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + oxxo?: + | { + expires_after_days?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + p24?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + tos_shown_and_accepted?: boolean + } + | '' + paynow?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + pix?: + | { + expires_after_seconds?: number + /** Format: unix-time */ + expires_at?: number + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + promptpay?: + | { + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' + sepa_debit?: + | { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + } + | '' + sofort?: + | { + /** @enum {string} */ + preferred_language?: '' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'nl' | 'pl' + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' + } + | '' + us_bank_account?: + | { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + setup_future_usage?: '' | 'none' | 'off_session' | 'on_session' + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + wechat_pay?: + | { + app_id?: string + /** @enum {string} */ + client: 'android' | 'ios' | 'web' + /** @enum {string} */ + setup_future_usage?: 'none' + } + | '' } + /** @description The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. Use automatic_payment_methods to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: string[] /** - * param - * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. */ - bacs_debit?: { - account_number?: string - sort_code?: string + radar_options?: { + session?: string } + /** @description Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). */ + receipt_email?: string | '' /** - * param - * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + * @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. */ - bancontact?: { [key: string]: unknown } + return_url?: string /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + * @description Indicates that you intend to make future payments with this PaymentIntent's payment method. + * + * Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + * + * When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + * + * If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + * @enum {string} */ - billing_details?: { - address?: - | { + setup_future_usage?: '' | 'off_session' | 'on_session' + /** @description Shipping information for this PaymentIntent. */ + shipping?: + | { + /** optional_fields_address */ + address: { city?: string country?: string line1?: string @@ -34992,349 +41020,55 @@ export interface operations { postal_code?: string state?: string } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * param - * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. - */ - boleto?: { - tax_id: string - } - /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ - card?: - | { - cvc?: string - exp_month: number - exp_year: number - number: string + carrier?: string + name: string + phone?: string + tracking_number?: string } - | { - token: string - } - /** @description The `Customer` to whom the original PaymentMethod is attached. */ - customer?: string - /** - * param - * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. - */ - eps?: { - /** @enum {string} */ - bank?: - | 'arzte_und_apotheker_bank' - | 'austrian_anadi_bank_ag' - | 'bank_austria' - | 'bankhaus_carl_spangler' - | 'bankhaus_schelhammer_und_schattera_ag' - | 'bawag_psk_ag' - | 'bks_bank_ag' - | 'brull_kallmus_bank_ag' - | 'btv_vier_lander_bank' - | 'capital_bank_grawe_gruppe_ag' - | 'dolomitenbank' - | 'easybank_ag' - | 'erste_bank_und_sparkassen' - | 'hypo_alpeadriabank_international_ag' - | 'hypo_bank_burgenland_aktiengesellschaft' - | 'hypo_noe_lb_fur_niederosterreich_u_wien' - | 'hypo_oberosterreich_salzburg_steiermark' - | 'hypo_tirol_bank_ag' - | 'hypo_vorarlberg_bank_ag' - | 'marchfelder_bank' - | 'oberbank_ag' - | 'raiffeisen_bankengruppe_osterreich' - | 'schoellerbank_ag' - | 'sparda_bank_wien' - | 'volksbank_gruppe' - | 'volkskreditbank_ag' - | 'vr_bank_braunau' - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * param - * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. - */ - fpx?: { - /** @enum {string} */ - bank: - | 'affin_bank' - | 'agrobank' - | 'alliance_bank' - | 'ambank' - | 'bank_islam' - | 'bank_muamalat' - | 'bank_rakyat' - | 'bsn' - | 'cimb' - | 'deutsche_bank' - | 'hong_leong_bank' - | 'hsbc' - | 'kfh' - | 'maybank2e' - | 'maybank2u' - | 'ocbc' - | 'pb_enterprise' - | 'public_bank' - | 'rhb' - | 'standard_chartered' - | 'uob' - } - /** - * param - * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. - */ - giropay?: { [key: string]: unknown } - /** - * param - * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. - */ - grabpay?: { [key: string]: unknown } - /** - * param - * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. - */ - ideal?: { - /** @enum {string} */ - bank?: - | 'abn_amro' - | 'asn_bank' - | 'bunq' - | 'handelsbanken' - | 'ing' - | 'knab' - | 'moneyou' - | 'rabobank' - | 'regiobank' - | 'revolut' - | 'sns_bank' - | 'triodos_bank' - | 'van_lanschot' - } - /** - * param - * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. - */ - interac_present?: { [key: string]: unknown } - /** - * param - * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. - */ - klarna?: { - /** date_of_birth */ - dob?: { - day: number - month: number - year: number - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * param - * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. - */ - oxxo?: { [key: string]: unknown } - /** - * param - * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. - */ - p24?: { - /** @enum {string} */ - bank?: - | 'alior_bank' - | 'bank_millennium' - | 'bank_nowy_bfg_sa' - | 'bank_pekao_sa' - | 'banki_spbdzielcze' - | 'blik' - | 'bnp_paribas' - | 'boz' - | 'citi_handlowy' - | 'credit_agricole' - | 'envelobank' - | 'etransfer_pocztowy24' - | 'getin_bank' - | 'ideabank' - | 'ing' - | 'inteligo' - | 'mbank_mtransfer' - | 'nest_przelew' - | 'noble_pay' - | 'pbac_z_ipko' - | 'plus_bank' - | 'santander_przelew24' - | 'tmobile_usbugi_bankowe' - | 'toyota_bank' - | 'volkswagen_bank' - } - /** @description The PaymentMethod to share. */ - payment_method?: string - /** - * param - * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. - */ - sepa_debit?: { - iban: string - } - /** - * param - * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. - */ - sofort?: { - /** @enum {string} */ - country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' - } - /** - * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. - * @enum {string} - */ - type?: - | 'acss_debit' - | 'afterpay_clearpay' - | 'alipay' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'eps' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'klarna' - | 'oxxo' - | 'p24' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - /** - * param - * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. - */ - wechat_pay?: { [key: string]: unknown } - } - } - } - } - /**

Retrieves a PaymentMethod object.

*/ - GetPaymentMethodsPaymentMethod: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ - PostPaymentMethodsPaymentMethod: { - parameters: { - path: { - payment_method: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payment_method'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** - * billing_details_inner_params - * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. - */ - billing_details?: { - address?: - | { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - | '' - email?: string | '' - name?: string - phone?: string - } - /** - * update_api_param - * @description If this is a `card` PaymentMethod, this hash contains the user's card details. - */ - card?: { - exp_month?: number - exp_year?: number - } - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + | '' + /** @description Set to `true` only when using manual confirmation and the iOS or Android SDKs to handle additional authentication steps. */ + use_stripe_sdk?: boolean } } } } /** - *

Attaches a PaymentMethod object to a Customer.

+ *

Perform an incremental authorization on an eligible + * PaymentIntent. To be eligible, the + * PaymentIntent’s status must be requires_capture and + * incremental_authorization_supported + * must be true.

* - *

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.

+ *

Incremental authorizations attempt to increase the authorized amount on + * your customer’s card to the new, higher amount provided. As with the + * initial authorization, incremental authorizations may be declined. A + * single PaymentIntent can call this endpoint multiple times to further + * increase the authorized amount.

* - *

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.

+ *

If the incremental authorization succeeds, the PaymentIntent object is + * returned with the updated + * amount. + * If the incremental authorization fails, a + * card_declined error is returned, and no + * fields on the PaymentIntent or Charge are updated. The PaymentIntent + * object remains capturable for the previously authorized amount.

+ * + *

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + * Once captured, a PaymentIntent can no longer be incremented.

+ * + *

Learn more about incremental authorizations.

*/ - PostPaymentMethodsPaymentMethodAttach: { + PostPaymentIntentsIntentIncrementAuthorization: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35347,26 +41081,42 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The ID of the customer to which to attach the PaymentMethod. */ - customer: string + /** @description The updated total amount you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. */ + amount: number + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). */ + application_fee_amount?: number + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description 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 + /** + * transfer_data_update_params + * @description The parameters used to automatically create a Transfer when the payment is captured. + * For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + */ + transfer_data?: { + amount?: number + } } } } } - /**

Detaches a PaymentMethod object from a Customer.

*/ - PostPaymentMethodsPaymentMethodDetach: { + /**

Verifies microdeposits on a PaymentIntent object.

*/ + PostPaymentIntentsIntentVerifyMicrodeposits: { parameters: { path: { - payment_method: string + intent: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payment_method'] + 'application/json': components['schemas']['payment_intent'] } } /** Error response. */ @@ -35379,34 +41129,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the PaymentIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] } } } } - /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ - GetPayouts: { + /**

Returns a list of your payment links.

*/ + GetPaymentLinks: { parameters: { query: { - arrival_date?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** The ID of an external account - only return payouts sent to this external account. */ - destination?: string + /** Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). */ + active?: boolean /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -35415,8 +41155,6 @@ 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 - /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ - status?: string } } responses: { @@ -35424,7 +41162,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['payout'][] + data: components['schemas']['payment_link'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35450,19 +41188,13 @@ export interface operations { } } } - /** - *

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: { + /**

Creates a payment link.

*/ + PostPaymentLinks: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['payout'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35475,207 +41207,427 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer in cents representing how much to payout. */ - amount: number - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ - destination?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } /** - * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * after_completion_params + * @description Behavior after the purchase is complete. + */ + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. */ + application_fee_amount?: number + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number + /** + * automatic_tax_params + * @description Configuration for automatic tax collection. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - method?: 'instant' | 'standard' + billing_address_collection?: 'auto' | 'required' /** - * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * consent_collection_params + * @description Configure fields to gather active consent from customers. + */ + consent_collection?: { + /** @enum {string} */ + promotions?: 'auto' | 'none' + /** @enum {string} */ + terms_of_service?: 'none' | 'required' + } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. */ + currency?: string + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). * @enum {string} */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ - statement_descriptor?: string - } - } - } - } - /**

Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list, and Stripe will return the corresponding payout information.

*/ - GetPayoutsPayout: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified payout by setting the values of the parameters passed. Any parameters not provided will be left unchanged. This request accepts only the metadata as arguments.

*/ - PostPayoutsPayout: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } - } - } - } - /**

A previously created payout can be canceled if it has not yet been paid out. Funds will be refunded to your available balance. You may not cancel automatic Stripe payouts.

*/ - PostPayoutsPayoutCancel: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /** - *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

- * - *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

- */ - PostPayoutsPayoutReverse: { - parameters: { - path: { - payout: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['payout'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + price: string + quantity: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string + /** + * payment_intent_data_params + * @description A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + */ + payment_intent_data?: { + /** @enum {string} */ + capture_method?: 'automatic' | 'manual' + /** @enum {string} */ + setup_future_usage?: 'off_session' | 'on_session' + } + /** + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + * @enum {string} + */ + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). */ + payment_method_types?: ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + /** + * phone_number_collection_params + * @description Controls phone number collection settings during checkout. + * + * We recommend that you review your privacy policy and check with your legal contacts. + */ + phone_number_collection?: { + enabled: boolean + } + /** + * shipping_address_collection_params + * @description Configuration for collecting the customer's shipping address. + */ + shipping_address_collection?: { + allowed_countries: ( + | 'AC' + | 'AD' + | 'AE' + | 'AF' + | 'AG' + | 'AI' + | 'AL' + | 'AM' + | 'AO' + | 'AQ' + | 'AR' + | 'AT' + | 'AU' + | 'AW' + | 'AX' + | 'AZ' + | 'BA' + | 'BB' + | 'BD' + | 'BE' + | 'BF' + | 'BG' + | 'BH' + | 'BI' + | 'BJ' + | 'BL' + | 'BM' + | 'BN' + | 'BO' + | 'BQ' + | 'BR' + | 'BS' + | 'BT' + | 'BV' + | 'BW' + | 'BY' + | 'BZ' + | 'CA' + | 'CD' + | 'CF' + | 'CG' + | 'CH' + | 'CI' + | 'CK' + | 'CL' + | 'CM' + | 'CN' + | 'CO' + | 'CR' + | 'CV' + | 'CW' + | 'CY' + | 'CZ' + | 'DE' + | 'DJ' + | 'DK' + | 'DM' + | 'DO' + | 'DZ' + | 'EC' + | 'EE' + | 'EG' + | 'EH' + | 'ER' + | 'ES' + | 'ET' + | 'FI' + | 'FJ' + | 'FK' + | 'FO' + | 'FR' + | 'GA' + | 'GB' + | 'GD' + | 'GE' + | 'GF' + | 'GG' + | 'GH' + | 'GI' + | 'GL' + | 'GM' + | 'GN' + | 'GP' + | 'GQ' + | 'GR' + | 'GS' + | 'GT' + | 'GU' + | 'GW' + | 'GY' + | 'HK' + | 'HN' + | 'HR' + | 'HT' + | 'HU' + | 'ID' + | 'IE' + | 'IL' + | 'IM' + | 'IN' + | 'IO' + | 'IQ' + | 'IS' + | 'IT' + | 'JE' + | 'JM' + | 'JO' + | 'JP' + | 'KE' + | 'KG' + | 'KH' + | 'KI' + | 'KM' + | 'KN' + | 'KR' + | 'KW' + | 'KY' + | 'KZ' + | 'LA' + | 'LB' + | 'LC' + | 'LI' + | 'LK' + | 'LR' + | 'LS' + | 'LT' + | 'LU' + | 'LV' + | 'LY' + | 'MA' + | 'MC' + | 'MD' + | 'ME' + | 'MF' + | 'MG' + | 'MK' + | 'ML' + | 'MM' + | 'MN' + | 'MO' + | 'MQ' + | 'MR' + | 'MS' + | 'MT' + | 'MU' + | 'MV' + | 'MW' + | 'MX' + | 'MY' + | 'MZ' + | 'NA' + | 'NC' + | 'NE' + | 'NG' + | 'NI' + | 'NL' + | 'NO' + | 'NP' + | 'NR' + | 'NU' + | 'NZ' + | 'OM' + | 'PA' + | 'PE' + | 'PF' + | 'PG' + | 'PH' + | 'PK' + | 'PL' + | 'PM' + | 'PN' + | 'PR' + | 'PS' + | 'PT' + | 'PY' + | 'QA' + | 'RE' + | 'RO' + | 'RS' + | 'RU' + | 'RW' + | 'SA' + | 'SB' + | 'SC' + | 'SE' + | 'SG' + | 'SH' + | 'SI' + | 'SJ' + | 'SK' + | 'SL' + | 'SM' + | 'SN' + | 'SO' + | 'SR' + | 'SS' + | 'ST' + | 'SV' + | 'SX' + | 'SZ' + | 'TA' + | 'TC' + | 'TD' + | 'TF' + | 'TG' + | 'TH' + | 'TJ' + | 'TK' + | 'TL' + | 'TM' + | 'TN' + | 'TO' + | 'TR' + | 'TT' + | 'TV' + | 'TW' + | 'TZ' + | 'UA' + | 'UG' + | 'US' + | 'UY' + | 'UZ' + | 'VA' + | 'VC' + | 'VE' + | 'VG' + | 'VN' + | 'VU' + | 'WF' + | 'WS' + | 'XK' + | 'YE' + | 'YT' + | 'ZA' + | 'ZM' + | 'ZW' + | 'ZZ' + )[] + } + /** @description The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + shipping_options?: { + shipping_rate?: string + }[] + /** + * @description Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + * @enum {string} + */ + submit_type?: 'auto' | 'book' | 'donate' | 'pay' + /** + * subscription_data_params + * @description When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + */ + subscription_data?: { + description?: string + trial_period_days?: number + } + /** + * tax_id_collection_params + * @description Controls tax ID collection during checkout. + */ + tax_id_collection?: { + enabled: boolean + } + /** + * transfer_data_params + * @description The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + */ + transfer_data?: { + amount?: number + destination: string + } } } } } - /**

Returns a list of your plans.

*/ - GetPlans: { + /**

Retrieve a payment link.

*/ + GetPaymentLinksPaymentLink: { parameters: { query: { - /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return plans for the given product. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + } + path: { + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['plan'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35691,13 +41643,18 @@ export interface operations { } } } - /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ - PostPlans: { + /**

Updates a payment link.

*/ + PostPaymentLinksPaymentLink: { + parameters: { + path: { + payment_link: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['plan'] + 'application/json': components['schemas']['payment_link'] } } /** Error response. */ @@ -35710,171 +41667,379 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ + /** @description Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. */ active?: boolean /** - * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. - * @enum {string} + * after_completion_params + * @description Behavior after the purchase is complete. */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @description A positive integer in %s (or 0 for a free plan) representing how much to charge on a recurring basis. */ - amount?: number + after_completion?: { + /** after_completion_confirmation_page_params */ + hosted_confirmation?: { + custom_message?: string + } + /** after_completion_redirect_params */ + redirect?: { + url: string + } + /** @enum {string} */ + type: 'hosted_confirmation' | 'redirect' + } + /** @description Enables user redeemable promotion codes. */ + allow_promotion_codes?: boolean /** - * Format: decimal - * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + * automatic_tax_params + * @description Configuration for automatic tax collection. */ - amount_decimal?: string + automatic_tax?: { + enabled: boolean + } /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @description Configuration for collecting the customer's billing address. * @enum {string} */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string + billing_address_collection?: 'auto' | 'required' + /** + * @description Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + * @enum {string} + */ + customer_creation?: 'always' | 'if_required' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ - id?: string + /** @description The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. */ + line_items?: { + /** adjustable_quantity_params */ + adjustable_quantity?: { + enabled: boolean + maximum?: number + minimum?: number + } + id: string + quantity?: number + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. */ + metadata?: { [key: string]: string } /** - * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @description Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + * + * Can only be set in `subscription` mode. + * + * If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). * @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ - interval_count?: number - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - product?: + payment_method_collection?: 'always' | 'if_required' + /** @description The list of payment method types that customers can use. Pass an empty string to enable automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). */ + payment_method_types?: + | ( + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @description Configuration for collecting the customer's shipping address. */ + shipping_address_collection?: | { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string - } - | string - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] - /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} - */ - tiers_mode?: 'graduated' | 'volume' - /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. - */ - transform_usage?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' - } - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - /** - * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. - * @enum {string} - */ - usage_type?: 'licensed' | 'metered' + 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' + )[] + } + | '' } } } } - /**

Retrieves the plan with the given ID.

*/ - GetPlansPlan: { + /**

When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetPaymentLinksPaymentLinkLineItems: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan’s ID, amount, currency, or billing cycle.

*/ - PostPlansPlan: { - parameters: { - path: { - plan: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['plan'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Whether the plan is currently available for new subscriptions. */ - active?: boolean - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A brief description of the plan, hidden from customers. */ - nickname?: string - /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ - product?: string - /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ - trial_period_days?: number - } - } - } - } - /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ - DeletePlansPlan: { - parameters: { - path: { - plan: string + payment_link: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_plan'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -35890,44 +42055,50 @@ export interface operations { } } } - /**

Returns a list of your prices.

*/ - GetPrices: { + /**

Returns a list of PaymentMethods attached to the StripeAccount. For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

*/ + GetPaymentMethods: { parameters: { query: { - /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return prices for the given currency. */ - currency?: string + /** 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 - /** Only return the price with these lookup_keys, if any exist. */ - lookup_keys?: string[] - /** Only return prices for the given product. */ - product?: string - /** Only return prices with these recurring fields. */ - recurring?: { - /** @enum {string} */ - interval?: 'day' | 'month' | 'week' | 'year' - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return prices of type `recurring` or `one_time`. */ - type?: 'one_time' | 'recurring' + /** A required filter on the list, based on the object `type` field. */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' } } responses: { @@ -35935,8 +42106,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['price'][] + data: components['schemas']['payment_method'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -35962,13 +42132,17 @@ export interface operations { } } } - /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ - PostPrices: { + /** + *

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.

+ * + *

Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

+ */ + PostPaymentMethods: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -35981,109 +42155,375 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean - /** - * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. - * @enum {string} - */ - billing_scheme?: 'per_unit' | 'tiered' - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description A brief description of the price, hidden from customers. */ - nickname?: string - /** @description The ID of the product that this price will belong to. */ - product?: string /** - * inline_product_params - * @description These fields can be used to create a new product that this price will belong to. + * payment_method_param + * @description If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. */ - product_data?: { - active?: boolean - id?: string - metadata?: { [key: string]: string } - name: string - statement_descriptor?: string - tax_code?: string - unit_label?: string + acss_debit?: { + account_number: string + institution_number: string + transit_number: string } /** - * recurring - * @description The recurring components of a price such as `interval` and `usage_type`. + * param + * @description If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. */ - recurring?: { - /** @enum {string} */ - aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - /** @enum {string} */ - usage_type?: 'licensed' | 'metered' - } + affirm?: { [key: string]: unknown } /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * param + * @description If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ - tiers?: { - flat_amount?: number - /** Format: decimal */ - flat_amount_decimal?: string - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - up_to: 'inf' | number - }[] + afterpay_clearpay?: { [key: string]: unknown } /** - * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. - * @enum {string} + * param + * @description If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. */ - tiers_mode?: 'graduated' | 'volume' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + alipay?: { [key: string]: unknown } /** - * transform_usage_param - * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + * param + * @description If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. */ - transform_quantity?: { - divide_by: number - /** @enum {string} */ - round: 'down' | 'up' + au_becs_debit?: { + account_number: string + bsb_number: string } - /** @description A positive integer in %s (or 0 for a free price) representing how much to charge. */ - unit_amount?: number /** - * Format: decimal - * @description Same as `unit_amount`, but accepts a decimal value in %s with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + * param + * @description If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. */ - unit_amount_decimal?: string + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** + * param + * @description If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + */ + bancontact?: { [key: string]: unknown } + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * param + * @description If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + */ + blik?: { [key: string]: unknown } + /** + * param + * @description If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + */ + boleto?: { + tax_id: string + } + /** @description If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. */ + card?: + | { + cvc?: string + exp_month: number + exp_year: number + number: string + } + | { + token: string + } + /** @description The `Customer` to whom the original PaymentMethod is attached. */ + customer?: string + /** + * param + * @description If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + */ + customer_balance?: { [key: string]: unknown } + /** + * param + * @description If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * param + * @description If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** + * param + * @description If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + */ + giropay?: { [key: string]: unknown } + /** + * param + * @description If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + */ + grabpay?: { [key: string]: unknown } + /** + * param + * @description If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** + * param + * @description If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + */ + interac_present?: { [key: string]: unknown } + /** + * param + * @description If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** + * param + * @description If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + */ + konbini?: { [key: string]: unknown } + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * param + * @description If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + */ + oxxo?: { [key: string]: unknown } + /** + * param + * @description If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** @description The PaymentMethod to share. */ + payment_method?: string + /** + * param + * @description If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + */ + paynow?: { [key: string]: unknown } + /** + * param + * @description If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + */ + pix?: { [key: string]: unknown } + /** + * param + * @description If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + */ + promptpay?: { [key: string]: unknown } + /** + * radar_options + * @description Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + */ + radar_options?: { + session?: string + } + /** + * param + * @description If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + */ + sepa_debit?: { + iban: string + } + /** + * param + * @description If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** + * @description The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + * @enum {string} + */ + type?: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'card' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** + * payment_method_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** + * param + * @description If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + */ + wechat_pay?: { [key: string]: unknown } } } } } - /**

Retrieves the price with the given ID.

*/ - GetPricesPrice: { + /**

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

*/ + GetPaymentMethodsPaymentMethod: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36099,18 +42539,18 @@ export interface operations { } } } - /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ - PostPricesPrice: { + /**

Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.

*/ + PostPaymentMethodsPaymentMethod: { parameters: { path: { - price: string + payment_method: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['price'] + 'application/json': components['schemas']['payment_method'] } } /** Error response. */ @@ -36123,34 +42563,142 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the price can be used for new purchases. Defaults to `true`. */ - active?: boolean + /** + * billing_details_inner_params + * @description Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** + * update_api_param + * @description If this is a `card` PaymentMethod, this hash contains the user's card details. + */ + card?: { + exp_month?: number + exp_year?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ - lookup_key?: string + /** + * param + * @description If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + */ + link?: { [key: string]: unknown } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description A brief description of the price, hidden from customers. */ - nickname?: string /** - * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. - * @enum {string} + * update_param + * @description If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ - transfer_lookup_key?: boolean + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + } } } } } - /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ - GetProducts: { + /** + *

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 set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + * endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + * future use, which makes later declines and payment friction more likely. + * See Optimizing cards for future payments for more information about setting up + * future payments.

+ * + *

To use this PaymentMethod as the default for invoice or subscription payments, + * set invoice_settings.default_payment_method, + * on the Customer to the PaymentMethod’s ID.

+ */ + PostPaymentMethodsPaymentMethodAttach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The ID of the customer to which to attach the PaymentMethod. */ + customer: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer.

*/ + PostPaymentMethodsPaymentMethodDetach: { + parameters: { + path: { + payment_method: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payment_method'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent you. The payouts are returned in sorted order, with the most recently created payouts appearing first.

*/ + GetPayouts: { parameters: { query: { - /** 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. */ + arrival_date?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number created?: | { gt?: number @@ -36159,20 +42707,18 @@ export interface operations { lte?: number } | number + /** The ID of an external account - only return payouts sent to this external account. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Only return products with the given IDs. */ - ids?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** Only return products that can be shipped (i.e., physical, not digital products). */ - shippable?: boolean /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** Only return products with the given url. */ - url?: string + /** Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. */ + status?: string } } responses: { @@ -36180,8 +42726,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['product'][] + data: components['schemas']['payout'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36207,13 +42752,19 @@ export interface operations { } } } - /**

Creates a new product object.

*/ - PostProducts: { + /** + *

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']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36226,65 +42777,50 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is currently available for purchase. Defaults to `true`. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + /** @description A positive integer in cents representing how much to payout. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The ID of a bank account or a card to send the payout to. If no destination is supplied, the default external account for the specified currency will be used. */ + destination?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ - id?: string - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name: string /** - * package_dimensions_specs - * @description The dimensions of this product for shipping purposes. + * @description The method used to send this payout, which can be `standard` or `instant`. `instant` is only supported for payouts to debit cards. (See [Instant payouts for marketplaces for more information](https://stripe.com/blog/instant-payouts-for-marketplaces).) + * @enum {string} */ - package_dimensions?: { - height: number - length: number - weight: number - width: number - } - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean + method?: 'instant' | 'standard' /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. + * @description The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the balances API. One of `bank_account`, `card`, or `fpx`. + * @enum {string} */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string to be displayed on the recipient's bank or card statement. This may be at most 22 characters. Attempting to use a `statement_descriptor` longer than 22 characters will return an error. Note: Most banks will truncate this information and/or display it inconsistently. Some may not display it at all. */ statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.

*/ - GetProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36300,18 +42836,18 @@ export interface operations { } } } - /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36324,58 +42860,26 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the product is available for purchase. */ - active?: boolean - /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ - images?: string[] | '' /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions. */ - name?: string - /** @description The dimensions of this product for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description Whether this product is shipped (i.e., physical goods). */ - shippable?: boolean - /** - * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. - * - * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. - * It must contain at least one letter. May only be set if `type=service`. - */ - statement_descriptor?: string - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. */ - tax_code?: string | '' - /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ - unit_label?: string - /** @description A URL of a publicly-accessible webpage for this product. */ - url?: string } } } } - /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ - DeleteProductsId: { + /**

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: { - id: string + payout: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_product'] + 'application/json': components['schemas']['payout'] } } /** Error response. */ @@ -36387,20 +42891,55 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your promotion codes.

*/ - GetPromotionCodes: { + /** + *

Reverses a payout by debiting the destination bank account. Only payouts for connected accounts to US bank accounts may be reversed at this time. If the payout is in the pending status, /v1/payouts/:id/cancel should be used instead.

+ * + *

By requesting a reversal via /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account has authorized the debit on the bank account and that no other authorization is required.

+ */ + PostPayoutsPayoutReverse: { + parameters: { + path: { + payout: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['payout'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + } + } + } + } + /**

Returns a list of your plans.

*/ + GetPlans: { parameters: { query: { - /** Filter promotion codes by whether they are active. */ + /** Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). */ active?: boolean - /** Only return promotion codes that have this case-insensitive code. */ - code?: string - /** Only return promotion codes for this coupon. */ - coupon?: string /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { @@ -36410,14 +42949,14 @@ export interface operations { lte?: number } | number - /** Only return promotion codes that are restricted to this customer. */ - customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** 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 } @@ -36427,7 +42966,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['promotion_code'][] + /** @description Details about each object. */ + data: components['schemas']['plan'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36453,13 +42993,13 @@ export interface operations { } } } - /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ - PostPromotionCodes: { + /**

You can now model subscriptions more flexibly using the Prices API. It replaces the Plans API and is backwards compatible to simplify your migration.

*/ + PostPlans: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36472,54 +43012,104 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. */ + /** @description Whether the plan is currently available for new subscriptions. Defaults to `true`. */ active?: boolean - /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ - code?: string - /** @description The coupon for this promotion code. */ - coupon: string - /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ - customer?: string + /** + * @description Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + * @enum {string} + */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. */ + amount?: number + /** + * Format: decimal + * @description Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + */ + amount_decimal?: string + /** + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} + */ + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. */ + id?: string /** - * Format: unix-time - * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + * @description Specifies billing frequency. Either `day`, `week`, `month` or `year`. + * @enum {string} */ - expires_at?: number - /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ - max_redemptions?: number + interval: 'day' | 'month' | 'week' | 'year' + /** @description The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). */ + interval_count?: number /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + product?: + | { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } + | string + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] /** - * restrictions_params - * @description Settings that restrict the redemption of the promotion code. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - restrictions?: { - first_time_transaction?: boolean - minimum_amount?: number - minimum_amount_currency?: string + tiers_mode?: 'graduated' | 'volume' + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_usage?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number + /** + * @description Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + * @enum {string} + */ + usage_type?: 'licensed' | 'metered' } } } } - /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ - GetPromotionCodesPromotionCode: { + /**

Retrieves the plan with the given ID.

*/ + GetPlansPlan: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36535,18 +43125,18 @@ export interface operations { } } } - /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ - PostPromotionCodesPromotionCode: { + /**

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: { - promotion_code: string + plan: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['promotion_code'] + 'application/json': components['schemas']['plan'] } } /** Error response. */ @@ -36559,32 +43149,87 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + /** @description Whether the plan is currently available for new subscriptions. */ active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' + /** @description A brief description of the plan, hidden from customers. */ + nickname?: string + /** @description The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. */ + product?: string + /** @description Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). */ + trial_period_days?: number } } } } - /**

Returns a list of your quotes.

*/ - GetQuotes: { + /**

Deleting plans means new subscribers can’t be added. Existing subscribers aren’t affected.

*/ + DeletePlansPlan: { + parameters: { + path: { + plan: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_plan'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your prices.

*/ + GetPrices: { parameters: { query: { - /** The ID of the customer whose quotes will be retrieved. */ - customer?: string + /** Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return prices for the given currency. */ + currency?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number + /** Only return the price with these lookup_keys, if any exist. */ + lookup_keys?: string[] + /** Only return prices for the given product. */ + product?: string + /** Only return prices with these recurring fields. */ + recurring?: { + /** @enum {string} */ + interval?: 'day' | 'month' | 'week' | 'year' + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string - /** The status of the quote. */ - status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Only return prices of type `recurring` or `one_time`. */ + type?: 'one_time' | 'recurring' } } responses: { @@ -36592,7 +43237,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['quote'][] + /** @description Details about each object. */ + data: components['schemas']['price'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36618,13 +43264,13 @@ export interface operations { } } } - /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ - PostQuotes: { + /**

Creates a new price for an existing product. The price can be recurring or one-time.

*/ + PostPrices: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36637,123 +43283,196 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + * @description Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + * @enum {string} */ - automatic_tax?: { - enabled: boolean + billing_scheme?: 'per_unit' | 'tiered' + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } } /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} + * custom_unit_amount + * @description When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: - | { - coupon?: string - discount?: string - }[] - | '' + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description A brief description of the price, hidden from customers. */ + nickname?: string + /** @description The ID of the product that this price will belong to. */ + product?: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + * inline_product_params + * @description These fields can be used to create a new product that this price will belong to. */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - footer?: string + product_data?: { + active?: boolean + id?: string + metadata?: { [key: string]: string } + name: string + statement_descriptor?: string + tax_code?: string + unit_label?: string + } /** - * from_quote_params - * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + * recurring + * @description The recurring components of a price such as `interval` and `usage_type`. */ - from_quote?: { - is_revision?: boolean - quote: string + recurring?: { + /** @enum {string} */ + aggregate_usage?: 'last_during_period' | 'last_ever' | 'max' | 'sum' + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + /** @enum {string} */ + usage_type?: 'licensed' | 'metered' } - /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - header?: string /** - * quote_param - * @description All invoices will be billed using the specified settings. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. */ + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' /** - * subscription_data_create_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' + tiers_mode?: 'graduated' | 'volume' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean + /** + * transform_usage_param + * @description Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + */ + transform_quantity?: { + divide_by: number + /** @enum {string} */ + round: 'down' | 'up' } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' + /** @description A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount` or `custom_unit_amount` is required, unless `billing_scheme=tiered`. */ + unit_amount?: number + /** + * Format: decimal + * @description Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + */ + unit_amount_decimal?: string } } } } - /**

Retrieves the quote with the given ID.

*/ - GetQuotesQuote: { + /** + *

Search for prices you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetPricesSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['price'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the price with the given ID.

*/ + GetPricesPrice: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36769,18 +43488,18 @@ export interface operations { } } } - /**

A quote models prices and services for a customer.

*/ - PostQuotesQuote: { + /**

Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged.

*/ + PostPricesPrice: { parameters: { path: { - quote: string + price: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['price'] } } /** Error response. */ @@ -36793,175 +43512,84 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ - application_fee_amount?: number | '' - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ - application_fee_percent?: number | '' - /** - * automatic_tax_param - * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ - customer?: string - /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ - default_tax_rates?: string[] | '' - /** @description A description that will be displayed on the quote PDF. */ - description?: string - /** @description The discounts applied to the quote. You can only set up to one discount. */ - discounts?: + /** @description Whether the price can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). */ + currency_options?: | { - coupon?: string - discount?: string - }[] + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. - */ - expires_at?: number - /** @description A footer that will be displayed on the quote PDF. */ - footer?: string - /** @description A header that will be displayed on the quote PDF. */ - header?: string - /** - * quote_param - * @description All invoices will be billed using the specified settings. - */ - invoice_settings?: { - days_until_due?: number - } - /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ - line_items?: { - id?: string - price?: string - /** price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring?: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] + /** @description A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. */ + lookup_key?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The account on behalf of which to charge. */ - on_behalf_of?: string | '' + metadata?: { [key: string]: string } | '' + /** @description A brief description of the price, hidden from customers. */ + nickname?: string /** - * subscription_data_update_params - * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + * @description Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + * @enum {string} */ - subscription_data?: { - effective_date?: 'current_period_end' | number | '' - trial_period_days?: number | '' - } - /** @description The data with which to automatically create a Transfer for each of the invoices. */ - transfer_data?: - | { - amount?: number - amount_percent?: number - destination: string - } - | '' - } - } - } - } - /**

Accepts the specified quote.

*/ - PostQuotesQuoteAccept: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } - } - } - } - /**

Cancels the quote.

*/ - PostQuotesQuoteCancel: { - parameters: { - path: { - quote: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['quote'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. */ + transfer_lookup_key?: boolean } } } } - /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ - GetQuotesQuoteComputedUpfrontLineItems: { + /**

Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.

*/ + GetProducts: { parameters: { query: { + /** Only return products that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return products that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). */ + 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 - } - path: { - quote: string + /** Only return products with the given url. */ + url?: string } } responses: { @@ -36970,7 +43598,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['item'][] + data: components['schemas']['product'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -36996,18 +43624,13 @@ export interface operations { } } } - /**

Finalizes the quote.

*/ - PostQuotesQuoteFinalize: { - parameters: { - path: { - quote: string - } - } + /**

Creates a new product object.

*/ + PostProducts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['quote'] + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37020,32 +43643,109 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the product is currently available for purchase. Defaults to `true`. */ + active?: boolean + /** + * price_data_without_product + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + */ + default_price_data?: { + currency: string + currency_options?: { + [key: string]: { + /** custom_unit_amount */ + custom_unit_amount?: { + enabled: boolean + maximum?: number + minimum?: number + preset?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + tiers?: { + flat_amount?: number + /** Format: decimal */ + flat_amount_decimal?: string + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + up_to: 'inf' | number + }[] + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + } + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. */ + id?: string + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The product's name, meant to be displayable to the customer. */ + name: string /** - * Format: unix-time - * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + * package_dimensions_specs + * @description The dimensions of this product for shipping purposes. */ - expires_at?: number + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string } } } } - /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ - GetQuotesQuoteLineItems: { + /** + *

Search for products you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetProductsSearch: { parameters: { query: { - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - path: { - quote: string + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). */ + query: string } } responses: { @@ -37053,16 +43753,16 @@ export interface operations { 200: { content: { 'application/json': { - /** @description Details about each object. */ - data: components['schemas']['item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ + data: components['schemas']['product'][] has_more: boolean + next_page?: string | null /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @description String representing the object's type. Objects of the same type share the same value. * @enum {string} */ - object: 'list' - /** @description The URL where this list can be accessed. */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number url: string } } @@ -37080,22 +43780,22 @@ export interface operations { } } } - /**

Download the PDF for a finalized quote

*/ - GetQuotesQuotePdf: { + /**

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: { - quote: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/pdf': string + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37111,40 +43811,18 @@ export interface operations { } } } - /**

Returns a list of early fraud warnings.

*/ - GetRadarEarlyFraudWarnings: { + /**

Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostProductsId: { parameters: { - query: { - /** Only return early fraud warnings for the charge specified by this charge ID. */ - charge?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ - payment_intent?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['radar.early_fraud_warning'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['product'] } } /** Error response. */ @@ -37156,30 +43834,61 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the product is available for purchase. */ + active?: boolean + /** @description The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. */ + default_price?: string + /** @description The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 8 URLs of images for this product, meant to be displayable to the customer. */ + images?: string[] | '' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The product's name, meant to be displayable to the customer. */ + name?: string + /** @description The dimensions of this product for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description Whether this product is shipped (i.e., physical goods). */ + shippable?: boolean + /** + * @description An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + * + * This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + * It must contain at least one letter. May only be set if `type=service`. + */ + statement_descriptor?: string + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. */ + tax_code?: string | '' + /** @description A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions. May only be set if `type=service`. */ + unit_label?: string + /** @description A URL of a publicly-accessible webpage for this product. */ + url?: string | '' + } } } } - /** - *

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: { + /**

Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.

*/ + DeleteProductsId: { parameters: { path: { - early_fraud_warning: string - } - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.early_fraud_warning'] + 'application/json': components['schemas']['deleted_product'] } } /** Error response. */ @@ -37195,10 +43904,17 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of your promotion codes.

*/ + GetPromotionCodes: { parameters: { query: { + /** Filter promotion codes by whether they are active. */ + active?: boolean + /** Only return promotion codes that have this case-insensitive code. */ + code?: string + /** Only return promotion codes for this coupon. */ + coupon?: string + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ created?: | { gt?: number @@ -37207,6 +43923,8 @@ export interface operations { lte?: number } | number + /** Only return promotion codes that are restricted to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37215,10 +43933,6 @@ 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 - /** 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: { @@ -37226,7 +43940,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list_item'][] + data: components['schemas']['promotion_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37252,13 +43966,13 @@ export interface operations { } } } - /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ - PostRadarValueListItems: { + /**

A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date.

*/ + PostPromotionCodes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37271,32 +43985,59 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. */ + active?: boolean + /** @description The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. If left blank, we will generate one automatically. */ + code?: string + /** @description The coupon for this promotion code. */ + coupon: string + /** @description The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. */ + customer?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The value of the item (whose type must match the type of the parent value list). */ - value: string - /** @description The identifier of the value list which the created item will be added to. */ - value_list: string + /** + * Format: unix-time + * @description The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + */ + expires_at?: number + /** @description A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. */ + max_redemptions?: number + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + first_time_transaction?: boolean + minimum_amount?: number + minimum_amount_currency?: string + } } } } } - /**

Retrieves a ValueListItem object.

*/ - GetRadarValueListItemsItem: { + /**

Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use list with the desired code.

*/ + GetPromotionCodesPromotionCode: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37312,18 +44053,18 @@ export interface operations { } } } - /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ - DeleteRadarValueListItemsItem: { + /**

Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable.

*/ + PostPromotionCodesPromotionCode: { parameters: { path: { - item: string + promotion_code: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list_item'] + 'application/json': components['schemas']['promotion_code'] } } /** Error response. */ @@ -37335,26 +44076,34 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * restrictions_params + * @description Settings that restrict the redemption of the promotion code. + */ + restrictions?: { + currency_options?: { + [key: string]: { + minimum_amount?: number + } + } + } + } } } } - /**

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: { + /**

Returns a list of your quotes.

*/ + GetQuotes: { parameters: { query: { - /** The alias used to reference the value list when writing rules. */ - alias?: string - /** A value contained within a value list - returns all value lists containing this value. */ - contains?: string - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** The ID of the customer whose quotes will be retrieved. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37363,6 +44112,10 @@ 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 quote. */ + status?: 'accepted' | 'canceled' | 'draft' | 'open' + /** Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. */ + test_clock?: string } } responses: { @@ -37370,7 +44123,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['radar.value_list'][] + data: components['schemas']['quote'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37396,13 +44149,13 @@ export interface operations { } } } - /**

Creates a new ValueList object, which can then be referenced in rules.

*/ - PostRadarValueLists: { + /**

A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the quote template.

*/ + PostQuotes: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37415,39 +44168,126 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. - * @enum {string} + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ - item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name: string - } - } - } - } - /**

Retrieves a ValueList object.

*/ - GetRadarValueListsValueList: { + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + footer?: string + /** + * from_quote_params + * @description Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + */ + from_quote?: { + is_revision?: boolean + quote: string + } + /** @description A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_create_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description ID of the test clock to attach to the quote. */ + test_clock?: string + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' + } + } + } + } + /**

Retrieves the quote with the given ID.

*/ + GetQuotesQuote: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37463,18 +44303,18 @@ export interface operations { } } } - /**

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: { + /**

A quote models prices and services for a customer.

*/ + PostQuotesQuote: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37487,30 +44327,113 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The name of the value list for use in rules. */ - alias?: string + /** @description The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. */ + application_fee_amount?: number | '' + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. */ + application_fee_percent?: number | '' + /** + * automatic_tax_param + * @description Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. */ + customer?: string + /** @description The tax rates that will apply to any line item that does not have `tax_rates` set. */ + default_tax_rates?: string[] | '' + /** @description A description that will be displayed on the quote PDF. */ + description?: string + /** @description The discounts applied to the quote. You can only set up to one discount. */ + discounts?: + | { + coupon?: string + discount?: string + }[] + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number + /** @description A footer that will be displayed on the quote PDF. */ + footer?: string + /** @description A header that will be displayed on the quote PDF. */ + header?: string + /** + * quote_param + * @description All invoices will be billed using the specified settings. + */ + invoice_settings?: { + days_until_due?: number + } + /** @description A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. */ + line_items?: { + id?: string + price?: string + /** price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring?: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } - /** @description The human-readable name of the value list. */ - name?: string + /** @description The account on behalf of which to charge. */ + on_behalf_of?: string | '' + /** + * subscription_data_update_params + * @description When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + */ + subscription_data?: { + description?: string + effective_date?: 'current_period_end' | number | '' + trial_period_days?: number | '' + } + /** @description The data with which to automatically create a Transfer for each of the invoices. */ + transfer_data?: + | { + amount?: number + amount_percent?: number + destination: string + } + | '' } } } } - /**

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: { + /**

Accepts the specified quote.

*/ + PostQuotesQuoteAccept: { parameters: { path: { - value_list: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_radar.value_list'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37522,22 +44445,47 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Cancels the quote.

*/ + PostQuotesQuoteCancel: { + parameters: { + path: { + quote: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['quote'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your recipients. The recipients are returned sorted by creation date, with the most recently created recipients appearing first.

*/ - GetRecipients: { + /**

When retrieving a quote, there is an includable computed.upfront.line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items.

*/ + GetQuotesQuoteComputedUpfrontLineItems: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -37546,9 +44494,9 @@ 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 - type?: 'corporation' | 'individual' - /** Only return recipients that are verified or unverified. */ - verified?: boolean + } + path: { + quote: string } } responses: { @@ -37556,7 +44504,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['recipient'][] + /** @description Details about each object. */ + data: components['schemas']['item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37582,16 +44531,18 @@ export interface operations { } } } - /** - *

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: { + /**

Finalizes the quote.

*/ + PostQuotesQuoteFinalize: { + parameters: { + path: { + quote: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/json': components['schemas']['quote'] } } /** Error response. */ @@ -37604,44 +44555,51 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (_not_ prepaid) to attach to the recipient. If the debit card is not valid, recipient creation will fail. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Although not all information is required, the extra info helps prevent fraud. */ - card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string - /** @description Type of the recipient: either `individual` or `corporation`. */ - type: string + /** + * Format: unix-time + * @description A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + */ + expires_at?: number } } } } - /**

Retrieves the details of an existing recipient. You need only supply the unique recipient identifier that was returned upon recipient creation.

*/ - GetRecipientsId: { + /**

When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items.

*/ + GetQuotesQuoteLineItems: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } path: { - id: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] | components['schemas']['deleted_recipient'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -37657,24 +44615,22 @@ export interface operations { } } } - /** - *

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: { + /**

Download the PDF for a finalized quote

*/ + GetQuotesQuotePdf: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - id: string + quote: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['recipient'] + 'application/pdf': string } } /** Error response. */ @@ -37686,41 +44642,79 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A bank account to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's bank account details, with the options described below. */ - bank_account?: string - /** @description A U.S. Visa or MasterCard debit card (not prepaid) to attach to the recipient. You can provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary containing a user's debit card details, with the options described below. Passing `card` will create a new card, make it the new recipient default card, and delete the old recipient default (if one exists). If you want to add additional debit cards instead of replacing the existing default, use the [card creation API](https://stripe.com/docs/api#create_card). Whenever you attach a card to a recipient, Stripe will automatically validate the debit card. */ - card?: string - /** @description ID of the card to set as the recipient's new default for payouts. */ - default_card?: string - /** @description An arbitrary string which you can attach to a `Recipient` object. It is displayed alongside the recipient in the web interface. */ - description?: string - /** @description The recipient's email address. It is displayed alongside the recipient in the web interface, and can be useful for searching and tracking. */ - email?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The recipient's full, legal name. For type `individual`, should be in the format `First Last`, `First Middle Last`, or `First M Last` (no prefixes or suffixes). For `corporation`, the full, incorporated name. */ - name?: string - /** @description The recipient's tax ID, as a string. For type `individual`, the full SSN; for type `corporation`, the full EIN. */ - tax_id?: string + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of early fraud warnings.

*/ + GetRadarEarlyFraudWarnings: { + parameters: { + query: { + /** Only return early fraud warnings for the charge specified by this charge ID. */ + charge?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['radar.early_fraud_warning'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } - /**

Permanently deletes a recipient. It cannot be undone.

*/ - DeleteRecipientsId: { + /** + *

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: { - id: string + 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']['deleted_recipient'] + 'application/json': components['schemas']['radar.early_fraud_warning'] } } /** Error response. */ @@ -37736,12 +44730,10 @@ export interface operations { } } } - /**

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: { + /**

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: { - /** Only return refunds for the charge specified by this charge ID. */ - charge?: string created?: | { gt?: number @@ -37756,10 +44748,12 @@ 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 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 + /** 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: { @@ -37767,7 +44761,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['refund'][] + data: components['schemas']['radar.value_list_item'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37793,13 +44787,13 @@ export interface operations { } } } - /**

Create a refund.

*/ - PostRefunds: { + /**

Creates a new ValueListItem object, which is added to the specified parent value list.

*/ + PostRadarValueListItems: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37812,37 +44806,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - amount?: number - charge?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - payment_intent?: string - /** @enum {string} */ - reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' - refund_application_fee?: boolean - reverse_transfer?: boolean + /** @description The value of the item (whose type must match the type of the parent value list). */ + value: string + /** @description The identifier of the value list which the created item will be added to. */ + value_list: string } } } } - /**

Retrieves the details of an existing refund.

*/ - GetRefundsRefund: { + /**

Retrieves a ValueListItem object.

*/ + GetRadarValueListItemsItem: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['radar.value_list_item'] } } /** Error response. */ @@ -37858,22 +44847,18 @@ export interface operations { } } } - /** - *

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: { + /**

Deletes a ValueListItem object, removing it from its parent value list.

*/ + DeleteRadarValueListItemsItem: { parameters: { path: { - refund: string + item: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['refund'] + 'application/json': components['schemas']['deleted_radar.value_list_item'] } } /** Error response. */ @@ -37885,19 +44870,18 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of Report Runs, with the most recent appearing first.

*/ - GetReportingReportRuns: { + /**

Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetRadarValueLists: { parameters: { query: { + /** The alias used to reference the value list when writing rules. */ + alias?: string + /** A value contained within a value list - returns all value lists containing this value. */ + contains?: string created?: | { gt?: number @@ -37921,7 +44905,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_run'][] + data: components['schemas']['radar.value_list'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -37947,13 +44931,13 @@ export interface operations { } } } - /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ - PostReportingReportRuns: { + /**

Creates a new ValueList object, which can then be referenced in rules.

*/ + PostRadarValueLists: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['radar.value_list'] } } /** Error response. */ @@ -37966,86 +44950,473 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * run_parameter_specs - * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + * @description Type of the items in the value list. One of `card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + * @enum {string} */ - parameters?: { - columns?: string[] - connected_account?: string - currency?: string - /** Format: unix-time */ - interval_end?: number - /** Format: unix-time */ - interval_start?: number - payout?: string - /** @enum {string} */ - reporting_category?: - | 'advance' - | 'advance_funding' - | 'anticipation_repayment' - | 'charge' - | 'charge_failure' - | 'connect_collection_transfer' - | 'connect_reserved_funds' - | 'contribution' - | 'dispute' - | 'dispute_reversal' - | 'fee' - | 'financing_paydown' - | 'financing_paydown_reversal' - | 'financing_payout' - | 'financing_payout_reversal' - | 'issuing_authorization_hold' - | 'issuing_authorization_release' - | 'issuing_dispute' - | 'issuing_transaction' - | 'network_cost' - | 'other_adjustment' - | 'partial_capture_reversal' - | 'payout' - | 'payout_reversal' - | 'platform_earning' - | 'platform_earning_refund' - | 'refund' - | 'refund_failure' - | 'risk_reserved_funds' - | 'tax' - | 'topup' - | 'topup_reversal' - | 'transfer' - | 'transfer_reversal' - /** @enum {string} */ - timezone?: - | 'Africa/Abidjan' - | 'Africa/Accra' - | 'Africa/Addis_Ababa' - | 'Africa/Algiers' - | 'Africa/Asmara' - | 'Africa/Asmera' - | 'Africa/Bamako' - | 'Africa/Bangui' - | 'Africa/Banjul' - | 'Africa/Bissau' - | 'Africa/Blantyre' - | 'Africa/Brazzaville' - | 'Africa/Bujumbura' - | 'Africa/Cairo' - | 'Africa/Casablanca' - | 'Africa/Ceuta' - | 'Africa/Conakry' - | 'Africa/Dakar' - | 'Africa/Dar_es_Salaam' - | 'Africa/Djibouti' - | 'Africa/Douala' - | 'Africa/El_Aaiun' - | 'Africa/Freetown' - | 'Africa/Gaborone' - | 'Africa/Harare' - | 'Africa/Johannesburg' - | 'Africa/Juba' + item_type?: 'card_bin' | 'card_fingerprint' | 'case_sensitive_string' | 'country' | 'customer_id' | 'email' | 'ip_address' | 'string' + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name: string + } + } + } + } + /**

Retrieves a ValueList object.

*/ + GetRadarValueListsValueList: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.

*/ + PostRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The name of the value list for use in rules. */ + alias?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The human-readable name of the value list. */ + name?: string + } + } + } + } + /**

Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.

*/ + DeleteRadarValueListsValueList: { + parameters: { + path: { + value_list: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_radar.value_list'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of all refunds you’ve previously created. The refunds are returned in sorted order, with the most recent refunds appearing first. For convenience, the 10 most recent refunds are always available by default on the charge object.

*/ + GetRefunds: { + parameters: { + query: { + /** Only return refunds for the charge specified by this charge ID. */ + charge?: string + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return refunds for the PaymentIntent specified by this ID. */ + payment_intent?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['refund'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Create a refund.

*/ + PostRefunds: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A positive integer representing how much to refund. */ + amount?: number + charge?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Customer whose customer balance to refund from. */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Address to send refund email, use customer email if not specified */ + instructions_email?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Origin of the refund + * @enum {string} + */ + origin?: 'customer_balance' + payment_intent?: string + /** @enum {string} */ + reason?: 'duplicate' | 'fraudulent' | 'requested_by_customer' + refund_application_fee?: boolean + reverse_transfer?: boolean + } + } + } + } + /**

Retrieves the details of an existing refund.

*/ + GetRefundsRefund: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata as an argument.

+ */ + PostRefundsRefund: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /** + *

Cancels a refund with a status of requires_action.

+ * + *

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ */ + PostRefundsRefundCancel: { + parameters: { + path: { + refund: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['refund'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of Report Runs, with the most recent appearing first.

*/ + GetReportingReportRuns: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new object and begin running the report. (Certain report types require a live-mode API key.)

*/ + PostReportingReportRuns: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * run_parameter_specs + * @description Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + */ + parameters?: { + columns?: string[] + connected_account?: string + currency?: string + /** Format: unix-time */ + interval_end?: number + /** Format: unix-time */ + interval_start?: number + payout?: string + /** @enum {string} */ + reporting_category?: + | 'advance' + | 'advance_funding' + | 'anticipation_repayment' + | 'charge' + | 'charge_failure' + | 'connect_collection_transfer' + | 'connect_reserved_funds' + | 'contribution' + | 'dispute' + | 'dispute_reversal' + | 'fee' + | 'financing_paydown' + | 'financing_paydown_reversal' + | 'financing_payout' + | 'financing_payout_reversal' + | 'issuing_authorization_hold' + | 'issuing_authorization_release' + | 'issuing_dispute' + | 'issuing_transaction' + | 'network_cost' + | 'other_adjustment' + | 'partial_capture_reversal' + | 'payout' + | 'payout_reversal' + | 'platform_earning' + | 'platform_earning_refund' + | 'refund' + | 'refund_failure' + | 'risk_reserved_funds' + | 'tax' + | 'topup' + | 'topup_reversal' + | 'transfer' + | 'transfer_reversal' + /** @enum {string} */ + timezone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmara' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' | 'Africa/Kampala' | 'Africa/Khartoum' | 'Africa/Kigali' @@ -38614,28 +45985,3921 @@ export interface operations { | 'WET' | 'Zulu' } - /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ - report_type: string + /** @description The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. */ + report_type: string + } + } + } + } + /**

Retrieves the details of an existing Report Run.

*/ + GetReportingReportRunsReportRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a full list of Report Types.

*/ + GetReportingReportTypes: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['reporting.report_type'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ + GetReportingReportTypesReportType: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + report_type: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['reporting.report_type'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

*/ + GetReviews: { + parameters: { + query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['review'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves a Review object.

*/ + GetReviewsReview: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ + PostReviewsReviewApprove: { + parameters: { + path: { + review: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['review'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ + GetSetupAttempts: { + parameters: { + query: { + /** + * A filter on the list, based on the object `created` field. The value + * can be a string with an integer Unix timestamp, or it can be a + * dictionary with a number of different query options. + */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** + * Only return SetupAttempts created by the SetupIntent specified by + * this ID. + */ + setup_intent: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_attempt'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of SetupIntents.

*/ + GetSetupIntents: { + parameters: { + query: { + /** + * If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return SetupIntents for the customer specified by this customer ID. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return SetupIntents associated with the specified payment method. */ + payment_method?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['setup_intent'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a SetupIntent object.

+ * + *

After the SetupIntent is created, attach a payment method and confirm + * to collect any required permissions to charge the payment method later.

+ */ + PostSetupIntents: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ + confirm?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** + * secret_key_param + * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + */ + mandate_data?: { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The Stripe account ID for which this SetupIntent is created. */ + on_behalf_of?: string + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ + return_url?: string + /** + * setup_intent_single_use_params + * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. + */ + single_use?: { + amount: number + currency: string + } + /** + * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + * @enum {string} + */ + usage?: 'off_session' | 'on_session' + } + } + } + } + /** + *

Retrieves the details of a SetupIntent that has previously been created.

+ * + *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

+ * + *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

+ */ + GetSetupIntentsIntent: { + parameters: { + query: { + /** The client secret of the SetupIntent. Required if a publishable key is used to retrieve the SetupIntent. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates a SetupIntent object.

*/ + PostSetupIntentsIntent: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + * + * It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + */ + attach_to_self?: boolean + /** + * @description ID of the Customer this SetupIntent belongs to, if one exists. + * + * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + */ + customer?: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Indicates the directions of money movement for which this payment method is intended to be used. + * + * Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + */ + flow_directions?: ('inbound' | 'outbound')[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ + payment_method_types?: string[] + } + } + } + } + /** + *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

+ * + *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ */ + PostSetupIntentsIntentCancel: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` + * @enum {string} + */ + cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /** + *

Confirm that your customer intends to set up the current or + * provided payment method. For example, you would confirm a SetupIntent + * when a customer hits the “Save” button on a payment method management + * page on your website.

+ * + *

If the selected payment method does not require any additional + * steps from the customer, the SetupIntent will transition to the + * succeeded status.

+ * + *

Otherwise, it will transition to the requires_action status and + * suggest additional actions via next_action. If setup fails, + * the SetupIntent will transition to the + * requires_payment_method status.

+ */ + PostSetupIntentsIntentConfirm: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This hash contains details about the Mandate to create */ + mandate_data?: + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** Format: unix-time */ + accepted_at?: number + /** offline_param */ + offline?: { [key: string]: unknown } + /** online_param */ + online?: { + ip_address: string + user_agent: string + } + /** @enum {string} */ + type: 'offline' | 'online' + } + } + | { + /** customer_acceptance_param */ + customer_acceptance: { + /** online_param */ + online: { + ip_address?: string + user_agent?: string + } + /** @enum {string} */ + type: 'online' + } + } + /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ + payment_method?: string + /** + * payment_method_data_params + * @description When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + * value in the SetupIntent. + */ + payment_method_data?: { + /** payment_method_param */ + acss_debit?: { + account_number: string + institution_number: string + transit_number: string + } + /** param */ + affirm?: { [key: string]: unknown } + /** param */ + afterpay_clearpay?: { [key: string]: unknown } + /** param */ + alipay?: { [key: string]: unknown } + /** param */ + au_becs_debit?: { + account_number: string + bsb_number: string + } + /** param */ + bacs_debit?: { + account_number?: string + sort_code?: string + } + /** param */ + bancontact?: { [key: string]: unknown } + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + /** param */ + blik?: { [key: string]: unknown } + /** param */ + boleto?: { + tax_id: string + } + /** param */ + customer_balance?: { [key: string]: unknown } + /** param */ + eps?: { + /** @enum {string} */ + bank?: + | 'arzte_und_apotheker_bank' + | 'austrian_anadi_bank_ag' + | 'bank_austria' + | 'bankhaus_carl_spangler' + | 'bankhaus_schelhammer_und_schattera_ag' + | 'bawag_psk_ag' + | 'bks_bank_ag' + | 'brull_kallmus_bank_ag' + | 'btv_vier_lander_bank' + | 'capital_bank_grawe_gruppe_ag' + | 'deutsche_bank_ag' + | 'dolomitenbank' + | 'easybank_ag' + | 'erste_bank_und_sparkassen' + | 'hypo_alpeadriabank_international_ag' + | 'hypo_bank_burgenland_aktiengesellschaft' + | 'hypo_noe_lb_fur_niederosterreich_u_wien' + | 'hypo_oberosterreich_salzburg_steiermark' + | 'hypo_tirol_bank_ag' + | 'hypo_vorarlberg_bank_ag' + | 'marchfelder_bank' + | 'oberbank_ag' + | 'raiffeisen_bankengruppe_osterreich' + | 'schoellerbank_ag' + | 'sparda_bank_wien' + | 'volksbank_gruppe' + | 'volkskreditbank_ag' + | 'vr_bank_braunau' + } + /** param */ + fpx?: { + /** @enum {string} */ + bank: + | 'affin_bank' + | 'agrobank' + | 'alliance_bank' + | 'ambank' + | 'bank_islam' + | 'bank_muamalat' + | 'bank_rakyat' + | 'bsn' + | 'cimb' + | 'deutsche_bank' + | 'hong_leong_bank' + | 'hsbc' + | 'kfh' + | 'maybank2e' + | 'maybank2u' + | 'ocbc' + | 'pb_enterprise' + | 'public_bank' + | 'rhb' + | 'standard_chartered' + | 'uob' + } + /** param */ + giropay?: { [key: string]: unknown } + /** param */ + grabpay?: { [key: string]: unknown } + /** param */ + ideal?: { + /** @enum {string} */ + bank?: + | 'abn_amro' + | 'asn_bank' + | 'bunq' + | 'handelsbanken' + | 'ing' + | 'knab' + | 'moneyou' + | 'rabobank' + | 'regiobank' + | 'revolut' + | 'sns_bank' + | 'triodos_bank' + | 'van_lanschot' + } + /** param */ + interac_present?: { [key: string]: unknown } + /** param */ + klarna?: { + /** date_of_birth */ + dob?: { + day: number + month: number + year: number + } + } + /** param */ + konbini?: { [key: string]: unknown } + /** param */ + link?: { [key: string]: unknown } + metadata?: { [key: string]: string } + /** param */ + oxxo?: { [key: string]: unknown } + /** param */ + p24?: { + /** @enum {string} */ + bank?: + | 'alior_bank' + | 'bank_millennium' + | 'bank_nowy_bfg_sa' + | 'bank_pekao_sa' + | 'banki_spbdzielcze' + | 'blik' + | 'bnp_paribas' + | 'boz' + | 'citi_handlowy' + | 'credit_agricole' + | 'envelobank' + | 'etransfer_pocztowy24' + | 'getin_bank' + | 'ideabank' + | 'ing' + | 'inteligo' + | 'mbank_mtransfer' + | 'nest_przelew' + | 'noble_pay' + | 'pbac_z_ipko' + | 'plus_bank' + | 'santander_przelew24' + | 'tmobile_usbugi_bankowe' + | 'toyota_bank' + | 'volkswagen_bank' + } + /** param */ + paynow?: { [key: string]: unknown } + /** param */ + pix?: { [key: string]: unknown } + /** param */ + promptpay?: { [key: string]: unknown } + /** radar_options */ + radar_options?: { + session?: string + } + /** param */ + sepa_debit?: { + iban: string + } + /** param */ + sofort?: { + /** @enum {string} */ + country: 'AT' | 'BE' | 'DE' | 'ES' | 'IT' | 'NL' + } + /** @enum {string} */ + type: + | 'acss_debit' + | 'affirm' + | 'afterpay_clearpay' + | 'alipay' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'blik' + | 'boleto' + | 'customer_balance' + | 'eps' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'klarna' + | 'konbini' + | 'link' + | 'oxxo' + | 'p24' + | 'paynow' + | 'pix' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + /** param */ + wechat_pay?: { [key: string]: unknown } + } + /** + * payment_method_options_param + * @description Payment-method-specific configuration for this SetupIntent. + */ + payment_method_options?: { + /** setup_intent_payment_method_options_param */ + acss_debit?: { + /** @enum {string} */ + currency?: 'cad' | 'usd' + /** setup_intent_payment_method_options_mandate_options_param */ + mandate_options?: { + custom_mandate_url?: string | '' + default_for?: ('invoice' | 'subscription')[] + interval_description?: string + /** @enum {string} */ + payment_schedule?: 'combined' | 'interval' | 'sporadic' + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + /** setup_intent_payment_method_options_param */ + blik?: { + code?: string + } + /** setup_intent_param */ + card?: { + /** setup_intent_mandate_options_param */ + mandate_options?: { + amount: number + /** @enum {string} */ + amount_type: 'fixed' | 'maximum' + currency: string + description?: string + /** Format: unix-time */ + end_date?: number + /** @enum {string} */ + interval: 'day' | 'month' | 'sporadic' | 'week' | 'year' + interval_count?: number + reference: string + /** Format: unix-time */ + start_date: number + supported_types?: 'india'[] + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + /** setup_intent_payment_method_options_param */ + link?: { + persistent_token?: string + } + /** setup_intent_payment_method_options_param */ + sepa_debit?: { + /** payment_method_options_mandate_options_param */ + mandate_options?: { [key: string]: unknown } + } + /** setup_intent_payment_method_options_param */ + us_bank_account?: { + /** linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + return_url?: string + } + /** networks_options_param */ + networks?: { + requested?: ('ach' | 'us_domestic_wire')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + } + /** + * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. + * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + * This parameter is only used for cards and other redirect-based payment methods. + */ + return_url?: string + } + } + } + } + /**

Verifies microdeposits on a SetupIntent object.

*/ + PostSetupIntentsIntentVerifyMicrodeposits: { + parameters: { + path: { + intent: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['setup_intent'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ + amounts?: number[] + /** @description The client secret of the SetupIntent. */ + client_secret?: string + /** @description A six-character code starting with SM present in the microdeposit sent to the bank account. */ + descriptor_code?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of your shipping rates.

*/ + GetShippingRates: { + parameters: { + query: { + /** Only return shipping rates that are active or inactive. */ + active?: boolean + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return shipping rates for the given currency. */ + currency?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['shipping_rate'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new shipping rate object.

*/ + PostShippingRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * delivery_estimate + * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + */ + delivery_estimate?: { + /** delivery_estimate_bound */ + maximum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + /** delivery_estimate_bound */ + minimum?: { + /** @enum {string} */ + unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' + value: number + } + } + /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + amount: number + currency: string + currency_options?: { + [key: string]: { + amount: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + /** @description A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. */ + tax_code?: string + /** + * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. + * @enum {string} + */ + type?: 'fixed_amount' + } + } + } + } + /**

Returns the shipping rate object with the given ID.

*/ + GetShippingRatesShippingRateToken: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing shipping rate object.

*/ + PostShippingRatesShippingRateToken: { + parameters: { + path: { + shipping_rate_token: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['shipping_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ + active?: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * fixed_amount_update + * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + */ + fixed_amount?: { + currency_options?: { + [key: string]: { + amount?: number + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + * @enum {string} + */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + } + } + } + } + /**

Returns a list of scheduled query runs.

*/ + GetSigmaScheduledQueryRuns: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['scheduled_query_run'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the details of an scheduled query run.

*/ + GetSigmaScheduledQueryRunsScheduledQueryRun: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + scheduled_query_run: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['scheduled_query_run'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ + GetSkus: { + parameters: { + query: { + /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ + active?: boolean + /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ + attributes?: { [key: string]: string } + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** Only return SKUs with the given IDs. */ + ids?: string[] + /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ + in_stock?: boolean + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ + product?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['sku'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new SKU associated with a product.

*/ + PostSkus: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether the SKU is available for purchase. Default to `true`. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ + id?: string + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_create_specs + * @description Description of the SKU's inventory. + */ + inventory: { + quantity?: number + /** @enum {string} */ + type: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * package_dimensions_specs + * @description The dimensions of this SKU for shipping purposes. + */ + package_dimensions?: { + height: number + length: number + weight: number + width: number + } + /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price: number + /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ + product: string + } + } + } + } + /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ + GetSkusId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specific SKU by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

Note that a SKU’s attributes are not editable. Instead, you would need to deactivate the existing SKU and create a new one with the new attribute values.

+ */ + PostSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Whether this SKU is available for purchase. */ + active?: boolean + /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ + attributes?: { [key: string]: string } + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ + image?: string + /** + * inventory_update_specs + * @description Description of the SKU's inventory. + */ + inventory?: { + quantity?: number + /** @enum {string} */ + type?: 'bucket' | 'finite' | 'infinite' + /** @enum {string} */ + value?: '' | 'in_stock' | 'limited' | 'out_of_stock' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description The dimensions of this SKU for shipping purposes. */ + package_dimensions?: + | { + height: number + length: number + weight: number + width: number + } + | '' + /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ + price?: number + /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ + product?: string + } + } + } + } + /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ + DeleteSkusId: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_sku'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new source object.

*/ + PostSources: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ + amount?: number + /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ + currency?: string + /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ + customer?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + * @enum {string} + */ + flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + metadata?: { [key: string]: string } + /** @description The source to share. */ + original_source?: string + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * receiver_params + * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + */ + receiver?: { + /** @enum {string} */ + refund_attributes_method?: 'email' | 'manual' | 'none' + } + /** + * redirect_params + * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + */ + redirect?: { + return_url: string + } + /** + * shallow_order_specs + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ + statement_descriptor?: string + /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ + token?: string + /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ + type?: string + /** @enum {string} */ + usage?: 'reusable' | 'single_use' + } + } + } + } + /**

Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSource: { + parameters: { + query: { + /** The client secret of the source. Required if a publishable key is used to retrieve the source. */ + client_secret?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our payment method guides for more detail.

+ */ + PostSourcesSource: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount associated with the source. */ + amount?: number + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * mandate_params + * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + */ + mandate?: { + /** mandate_acceptance_params */ + acceptance?: { + /** Format: unix-time */ + date?: number + ip?: string + /** mandate_offline_acceptance_params */ + offline?: { + contact_email: string + } + /** mandate_online_acceptance_params */ + online?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + /** @enum {string} */ + status: 'accepted' | 'pending' | 'refused' | 'revoked' + /** @enum {string} */ + type?: 'offline' | 'online' + user_agent?: string + } + amount?: number | '' + currency?: string + /** @enum {string} */ + interval?: 'one_time' | 'scheduled' | 'variable' + /** @enum {string} */ + notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' + } + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** + * owner + * @description Information about the owner of the payment instrument that may be used or required by particular source types. + */ + owner?: { + /** source_address */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + email?: string + name?: string + phone?: string + } + /** + * order_params + * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + */ + source_order?: { + items?: { + amount?: number + currency?: string + description?: string + parent?: string + quantity?: number + /** @enum {string} */ + type?: 'discount' | 'shipping' | 'sku' | 'tax' + }[] + /** order_shipping */ + shipping?: { + /** address */ + address: { + city?: string + country?: string + line1: string + line2?: string + postal_code?: string + state?: string + } + carrier?: string + name?: string + phone?: string + tracking_number?: string + } + } + } + } + } + } + /**

Retrieves a new Source MandateNotification.

*/ + GetSourcesSourceMandateNotificationsMandateNotification: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + mandate_notification: string + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_mandate_notification'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

List source transactions for a given source.

*/ + GetSourcesSourceSourceTransactions: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['source_transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieve an existing source transaction object. Supply the unique source ID from a source creation request and the source transaction ID and Stripe will return the corresponding up-to-date source object information.

*/ + GetSourcesSourceSourceTransactionsSourceTransaction: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + source: string + source_transaction: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source_transaction'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Verify a given source.

*/ + PostSourcesSourceVerify: { + parameters: { + path: { + source: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['source'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The values needed to verify the source. */ + values: string[] + } + } + } + } + /**

Returns a list of your subscription items for a given subscription.

*/ + GetSubscriptionItems: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The ID of the subscription whose items will be retrieved. */ + subscription: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_item'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ + PostSubscriptionItems: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description The identifier of the subscription to modify. */ + subscription: string + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Retrieves the subscription item with the given ID.

*/ + GetSubscriptionItemsItem: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the plan or quantity of an item on a current subscription.

*/ + PostSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + usage_gte: number + } + | '' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ + price?: string + /** + * recurring_price_data + * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + /** @description The quantity you'd like to apply to the subscription item you're creating. */ + quantity?: number + /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ + tax_rates?: string[] | '' + } + } + } + } + /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ + DeleteSubscriptionItemsItem: { + parameters: { + path: { + item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_subscription_item'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ + clear_usage?: boolean + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + */ + proration_date?: number + } + } + } + } + /** + *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ * + *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ */ + GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + parameters: { + query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['usage_record_summary'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a usage record for a specified subscription item and date, and fills it with a quantity.

+ * + *

Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the metered billing plan, Stripe helps you send accurate invoices to your customers.

+ * + *

The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan’s aggregate_usage parameter. When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter.

+ * + *

The default pricing model for metered billing is per-unit pricing. For finer granularity, you can configure metered billing to have a tiered pricing model.

+ */ + PostSubscriptionItemsSubscriptionItemUsageRecords: { + parameters: { + path: { + subscription_item: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['usage_record'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + * @enum {string} + */ + action?: 'increment' | 'set' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The usage quantity for the specified timestamp. */ + quantity: number + /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ + timestamp?: 'now' | number + } + } + } + } + /**

Retrieves the list of your subscription schedules.

*/ + GetSubscriptionSchedules: { + parameters: { + query: { + /** Only return subscription schedules that were created canceled the given date interval. */ + canceled_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that completed during the given date interval. */ + completed_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that were created during the given date interval. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules for the given customer. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Only return subscription schedules that were released during the given date interval. */ + released_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return subscription schedules that have not started yet. */ + scheduled?: boolean + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription_schedule'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ + PostSubscriptionSchedules: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description The identifier of the customer to create the subscription schedule for. */ + customer?: string + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ + from_subscription?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + currency?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + /** Format: unix-time */ + end_date?: number + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + /** Format: unix-time */ + trial_end?: number + }[] + /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ + start_date?: number | 'now' + } + } + } + } + /**

Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation.

*/ + GetSubscriptionSchedulesSchedule: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates an existing subscription schedule.

*/ + PostSubscriptionSchedulesSchedule: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * default_settings_params + * @description Object representing the subscription schedule's default settings. + */ + default_settings?: { + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + default_payment_method?: string + description?: string + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + } + /** + * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @enum {string} + */ + end_behavior?: 'cancel' | 'none' | 'release' | 'renew' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ + phases?: { + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + application_fee_percent?: number + /** automatic_tax_config */ + automatic_tax?: { + enabled: boolean + } + /** @enum {string} */ + billing_cycle_anchor?: 'automatic' | 'phase_start' + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @enum {string} */ + collection_method?: 'charge_automatically' | 'send_invoice' + coupon?: string + default_payment_method?: string + default_tax_rates?: string[] | '' + description?: string + end_date?: number | 'now' + /** subscription_schedules_param */ + invoice_settings?: { + days_until_due?: number + } + items: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + iterations?: number + metadata?: { [key: string]: string } + /** @enum {string} */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + start_date?: number | 'now' + /** transfer_data_specs */ + transfer_data?: { + amount_percent?: number + destination: string + } + trial?: boolean + trial_end?: number | 'now' + }[] + /** + * @description If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + } + } + } + } + /**

Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active.

*/ + PostSubscriptionSchedulesScheduleCancel: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ + invoice_now?: boolean + /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ + prorate?: boolean + } + } + } + } + /**

Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription’s ID to the released_subscription property.

*/ + PostSubscriptionSchedulesScheduleRelease: { + parameters: { + path: { + schedule: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription_schedule'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Keep any cancellation on the subscription that the schedule has set */ + preserve_cancel_date?: boolean + } + } + } + } + /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ + GetSubscriptions: { + parameters: { + query: { + /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ + collection_method?: 'charge_automatically' | 'send_invoice' + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_end?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + current_period_start?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** The ID of the customer whose subscriptions will be retrieved. */ + customer?: string + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** Filter for subscriptions that contain this recurring price ID. */ + price?: string + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ + status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' + /** Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. */ + test_clock?: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

+ * + *

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + * The payment_behavior parameter determines the exact behavior of the initial payment.

+ * + *

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + * Schedules provide the flexibility to model more complex billing configurations that change over time.

+ */ + PostSubscriptions: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * Format: unix-time + * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + */ + backdate_start_date?: number + /** + * Format: unix-time + * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + */ + billing_cycle_anchor?: number + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** + * Format: unix-time + * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + */ + cancel_at?: number + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency?: string + /** @description The identifier of the customer to subscribe. */ + customer: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + metadata?: { [key: string]: string } + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** + * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * + * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * transfer_data_specs + * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + */ + transfer_data?: { + amount_percent?: number + destination: string + } + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_period_days?: number } } } } - /**

Retrieves the details of an existing Report Run.

*/ - GetReportingReportRunsReportRun: { + /** + *

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + * Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + * conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + * to an hour behind during outages. Search functionality is not available to merchants in India.

+ */ + GetSubscriptionsSearch: { + parameters: { + 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 + /** A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. */ + page?: string + /** The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). */ + query: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + data: components['schemas']['subscription'][] + has_more: boolean + next_page?: string | null + /** + * @description String representing the object's type. Objects of the same type share the same value. + * @enum {string} + */ + object: 'search_result' + /** @description The total number of objects that match the query, only accurate up to 10,000. */ + total_count?: number + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Retrieves the subscription with the given ID.

*/ + GetSubscriptionsSubscriptionExposedId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_run: string + subscription_exposed_id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_run'] + 'application/json': components['schemas']['subscription'] } } /** Error response. */ @@ -38651,12 +49915,351 @@ export interface operations { } } } - /**

Returns a full list of Report Types.

*/ - GetReportingReportTypes: { + /**

Updates an existing subscription on a customer to match the specified parameters. When changing plans or quantities, we will optionally prorate the price we charge next month to make up for any price changes. To preview how the proration will be calculated, use the upcoming invoice endpoint.

*/ + PostSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. */ + add_invoice_items?: { + price?: string + /** one_time_price_data */ + price_data?: { + currency: string + product: string + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ + application_fee_percent?: number + /** + * automatic_tax_config + * @description Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + */ + automatic_tax?: { + enabled: boolean + } + /** + * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + * @enum {string} + */ + billing_cycle_anchor?: 'now' | 'unchanged' + /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ + billing_thresholds?: + | { + amount_gte?: number + reset_billing_cycle_anchor?: boolean + } + | '' + /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ + cancel_at?: number | '' + /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ + cancel_at_period_end?: boolean + /** + * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. + * @enum {string} + */ + collection_method?: 'charge_automatically' | 'send_invoice' + /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ + coupon?: string + /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ + days_until_due?: number + /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_payment_method?: string + /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ + default_source?: string + /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ + default_tax_rates?: string[] | '' + /** @description The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A list of up to 20 subscription items, each with an attached price. */ + items?: { + billing_thresholds?: + | { + usage_gte: number + } + | '' + clear_usage?: boolean + deleted?: boolean + id?: string + metadata?: { [key: string]: string } | '' + price?: string + /** recurring_price_data */ + price_data?: { + currency: string + product: string + /** recurring_adhoc */ + recurring: { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + /** @enum {string} */ + tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' + unit_amount?: number + /** Format: decimal */ + unit_amount_decimal?: string + } + quantity?: number + tax_rates?: string[] | '' + }[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ + off_session?: boolean + /** @description If specified, payment collection for this subscription will be paused. */ + pause_collection?: + | { + /** @enum {string} */ + behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' + /** Format: unix-time */ + resumes_at?: number + } + | '' + /** + * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + * + * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + * + * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + * + * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + * @enum {string} + */ + payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' + /** + * payment_settings + * @description Payment settings to pass to invoices created by the subscription. + */ + payment_settings?: { + /** payment_method_options */ + payment_method_options?: { + acss_debit?: + | { + /** mandate_options_param */ + mandate_options?: { + /** @enum {string} */ + transaction_type?: 'business' | 'personal' + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + bancontact?: + | { + /** @enum {string} */ + preferred_language?: 'de' | 'en' | 'fr' | 'nl' + } + | '' + card?: + | { + /** mandate_options_param */ + mandate_options?: { + amount?: number + /** @enum {string} */ + amount_type?: 'fixed' | 'maximum' + description?: string + } + /** @enum {string} */ + network?: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'unknown' | 'visa' + /** @enum {string} */ + request_three_d_secure?: 'any' | 'automatic' + } + | '' + customer_balance?: + | { + /** bank_transfer_param */ + bank_transfer?: { + /** eu_bank_transfer_param */ + eu_bank_transfer?: { + country: string + } + type?: string + } + funding_type?: string + } + | '' + konbini?: { [key: string]: unknown } | '' + us_bank_account?: + | { + /** invoice_linked_account_options_param */ + financial_connections?: { + permissions?: ('balances' | 'ownership' | 'payment_method' | 'transactions')[] + } + /** @enum {string} */ + verification_method?: 'automatic' | 'instant' | 'microdeposits' + } + | '' + } + payment_method_types?: + | ( + | 'ach_credit_transfer' + | 'ach_debit' + | 'acss_debit' + | 'au_becs_debit' + | 'bacs_debit' + | 'bancontact' + | 'boleto' + | 'card' + | 'customer_balance' + | 'fpx' + | 'giropay' + | 'grabpay' + | 'ideal' + | 'konbini' + | 'link' + | 'paynow' + | 'promptpay' + | 'sepa_debit' + | 'sofort' + | 'us_bank_account' + | 'wechat_pay' + )[] + | '' + /** @enum {string} */ + save_default_payment_method?: 'off' | 'on_subscription' + } + /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ + pending_invoice_item_interval?: + | { + /** @enum {string} */ + interval: 'day' | 'month' | 'week' | 'year' + interval_count?: number + } + | '' + /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ + promotion_code?: string + /** + * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. + * @enum {string} + */ + proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** + * Format: unix-time + * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + */ + proration_date?: number + /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ + transfer_data?: + | { + amount_percent?: number + destination: string + } + | '' + /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ + trial_end?: 'now' | number + /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ + trial_from_plan?: boolean + } + } + } + } + /** + *

Cancels a customer’s subscription immediately. The customer will not be charged again for the subscription.

+ * + *

Note, however, that any pending invoice items that you’ve created will still be charged for at the end of the period, unless manually deleted. If you’ve set the subscription to cancel at the end of the period, any pending prorations will also be left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations will be removed.

+ * + *

By default, upon subscription cancellation, Stripe will stop automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all.

+ */ + DeleteSubscriptionsSubscriptionExposedId: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['subscription'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ + invoice_now?: boolean + /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ + prorate?: boolean + } + } + } + } + /**

Removes the currently applied discount on a subscription.

*/ + DeleteSubscriptionsSubscriptionExposedIdDiscount: { + parameters: { + path: { + subscription_exposed_id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_discount'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ + GetTaxCodes: { parameters: { query: { + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string } } responses: { @@ -38664,7 +50267,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['reporting.report_type'][] + data: components['schemas']['tax_code'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38690,22 +50293,22 @@ export interface operations { } } } - /**

Retrieves the details of a Report Type. (Certain report types require a live-mode API key.)

*/ - GetReportingReportTypesReportType: { + /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ + GetTaxCodesId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - report_type: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['reporting.report_type'] + 'application/json': components['schemas']['tax_code'] } } /** Error response. */ @@ -38721,10 +50324,13 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first.

*/ + GetTaxRates: { parameters: { query: { + /** Optional flag to filter by tax rates that are either active or inactive (archived). */ + active?: boolean + /** Optional range for filtering created date. */ created?: | { gt?: number @@ -38737,6 +50343,8 @@ export interface operations { 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. */ @@ -38748,7 +50356,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['review'][] + data: components['schemas']['tax_rate'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38768,28 +50376,76 @@ export interface operations { } } } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates a new tax rate.

*/ + PostTaxRates: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['tax_rate'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description This specifies if the tax rate is inclusive or exclusive. */ + inclusive: boolean + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description This represents the tax rate percent out of 100. */ + percentage: number + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + } + } + } } - /**

Retrieves a Review object.

*/ - GetReviewsReview: { + /**

Retrieves a tax rate with the given ID

*/ + GetTaxRatesTaxRate: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38805,18 +50461,18 @@ export interface operations { } } } - /**

Approves a Review object, closing it and removing it from the list of reviews.

*/ - PostReviewsReviewApprove: { + /**

Updates an existing tax rate.

*/ + PostTaxRatesTaxRate: { parameters: { path: { - review: string + tax_rate: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['review'] + 'application/json': components['schemas']['tax_rate'] } } /** Error response. */ @@ -38829,40 +50485,43 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ + active?: boolean + /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ + country?: string + /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + description?: string + /** @description The display name of the tax rate, which will be shown to users. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ + jurisdiction?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ + state?: string + /** + * @description The high-level tax type, such as `vat` or `sales_tax`. + * @enum {string} + */ + tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } } - /**

Returns a list of SetupAttempts associated with a provided SetupIntent.

*/ - GetSetupAttempts: { + /**

Returns a list of Configuration objects.

*/ + GetTerminalConfigurations: { parameters: { query: { - /** - * A filter on the list, based on the object `created` field. The value - * can be a string with an integer Unix timestamp, or it can be a - * dictionary with a number of different query options. - */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** if present, only return the account default or non-default configurations. */ + is_account_default?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number - /** - * Only return SetupAttempts created by the SetupIntent specified by - * this ID. - */ - setup_intent: string /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } @@ -38872,7 +50531,7 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['setup_attempt'][] + data: components['schemas']['terminal.configuration'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -38898,49 +50557,150 @@ export interface operations { } } } - /**

Returns a list of SetupIntents.

*/ - GetSetupIntents: { + /**

Creates a new Configuration object.

*/ + PostTerminalConfigurations: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.configuration'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** + * bbpos_wise_pose + * @description An object containing device type specific settings for BBPOS WisePOS E readers + */ + bbpos_wisepos_e?: { + splashscreen?: string | '' + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + } + | '' + /** + * verifone_p400 + * @description An object containing device type specific settings for Verifone P400 readers + */ + verifone_p400?: { + splashscreen?: string | '' + } + } + } + } + } + /**

Retrieves a Configuration object.

*/ + GetTerminalConfigurationsConfiguration: { parameters: { + path: { + configuration: 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?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return SetupIntents for the customer specified by this customer ID. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return SetupIntents associated with the specified payment method. */ - payment_method?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['setup_intent'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38956,18 +50716,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates a new Configuration object.

*/ + PostTerminalConfigurationsConfiguration: { + parameters: { + path: { + configuration: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.configuration'] | components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -38980,122 +50740,125 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If the payment method attached is a card, a return_url may be provided in case additional authentication is required. */ - confirm?: boolean - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string + /** @description An object containing device type specific settings for BBPOS WisePOS E readers */ + bbpos_wisepos_e?: + | { + splashscreen?: string | '' + } + | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * secret_key_param - * @description This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - */ - mandate_data?: { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string + /** @description Tipping configurations for readers supporting on-reader tips */ + tipping?: + | { + /** currency_specific_config */ + aud?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + cad?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + chf?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + czk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + dkk?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + eur?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + gbp?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + hkd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + myr?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nok?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + nzd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sek?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + sgd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } + /** currency_specific_config */ + usd?: { + fixed_amounts?: number[] + percentages?: number[] + smart_tip_threshold?: number + } } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description The Stripe account ID for which this SetupIntent is created. */ - on_behalf_of?: string - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' + | '' + /** @description An object containing device type specific settings for Verifone P400 readers */ + verifone_p400?: + | { + splashscreen?: string | '' } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to use. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] - /** @description The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). */ - return_url?: string - /** - * setup_intent_single_use_params - * @description If this hash is populated, this SetupIntent will generate a single_use Mandate on success. - */ - single_use?: { - amount: number - currency: string - } - /** - * @description Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. - * @enum {string} - */ - usage?: 'off_session' | 'on_session' + | '' } } } } - /** - *

Retrieves the details of a SetupIntent that has previously been created.

- * - *

Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string.

- * - *

When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the SetupIntent object reference for more details.

- */ - GetSetupIntentsIntent: { + /**

Deletes a Configuration object.

*/ + DeleteTerminalConfigurationsConfiguration: { 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 + configuration: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['deleted_terminal.configuration'] } } /** Error response. */ @@ -39111,18 +50874,13 @@ export interface operations { } } } - /**

Updates a SetupIntent object.

*/ - PostSetupIntentsIntent: { - parameters: { - path: { - intent: string - } - } + /**

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']['setup_intent'] + 'application/json': components['schemas']['terminal.connection_token'] } } /** Error response. */ @@ -39135,75 +50893,44 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description ID of the Customer this SetupIntent belongs to, if one exists. - * - * If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - */ - customer?: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string - /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. - */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } - } - /** @description The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. If this is not provided, defaults to ["card"]. */ - payment_method_types?: string[] + /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ + location?: string } } } } - /** - *

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

- * - *

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- */ - PostSetupIntentsIntentCancel: { + /**

Returns a list of Location objects.

*/ + GetTerminalLocations: { parameters: { - path: { - intent: 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': components['schemas']['setup_intent'] + 'application/json': { + data: components['schemas']['terminal.location'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -39215,44 +50942,20 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** - * @description Reason for canceling this SetupIntent. Possible values are `abandoned`, `requested_by_customer`, or `duplicate` - * @enum {string} - */ - cancellation_reason?: 'abandoned' | 'duplicate' | 'requested_by_customer' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } /** - *

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.

+ *

Creates a new Location object. + * For further details, including which address fields are required in each country, see the Manage locations guide.

*/ - PostSetupIntentsIntentConfirm: { - parameters: { - path: { - intent: string - } - } + PostTerminalLocations: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] } } /** Error response. */ @@ -39265,97 +50968,73 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The client secret of the SetupIntent. */ - client_secret?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description This hash contains details about the Mandate to create */ - mandate_data?: - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** Format: unix-time */ - accepted_at?: number - /** offline_param */ - offline?: { [key: string]: unknown } - /** online_param */ - online?: { - ip_address: string - user_agent: string - } - /** @enum {string} */ - type: 'offline' | 'online' - } - } - | { - /** customer_acceptance_param */ - customer_acceptance: { - /** online_param */ - online: { - ip_address?: string - user_agent?: string - } - /** @enum {string} */ - type: 'online' - } - } - /** @description ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. */ - payment_method?: string /** - * payment_method_options_param - * @description Payment-method-specific configuration for this SetupIntent. + * create_location_address_param + * @description The full address of the location. */ - payment_method_options?: { - /** setup_intent_payment_method_options_param */ - acss_debit?: { - /** @enum {string} */ - currency?: 'cad' | 'usd' - /** setup_intent_payment_method_options_mandate_options_param */ - mandate_options?: { - custom_mandate_url?: string | '' - default_for?: ('invoice' | 'subscription')[] - interval_description?: string - /** @enum {string} */ - payment_schedule?: 'combined' | 'interval' | 'sporadic' - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - /** setup_intent_param */ - card?: { - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - /** setup_intent_payment_method_options_param */ - sepa_debit?: { - /** payment_method_options_mandate_options_param */ - mandate_options?: { [key: string]: unknown } - } + address: { + city?: string + country: string + line1?: string + line2?: string + postal_code?: string + state?: string } - /** - * @description The URL to redirect your customer back to after they authenticate on the payment method's app or site. - * If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - * This parameter is only used for cards and other redirect-based payment methods. - */ - return_url?: string + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' + } + } + } + } + /**

Retrieves a Location object.

*/ + GetTerminalLocationsLocation: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] } } } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } } - /**

Verifies microdeposits on a SetupIntent object.

*/ - PostSetupIntentsIntentVerifyMicrodeposits: { + /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalLocationsLocation: { parameters: { path: { - intent: string + location: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['setup_intent'] + 'application/json': components['schemas']['terminal.location'] | components['schemas']['deleted_terminal.location'] } } /** Error response. */ @@ -39368,41 +51047,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. */ - amounts?: number[] - /** @description The client secret of the SetupIntent. */ - client_secret?: string + /** + * optional_fields_address + * @description The full address of the location. + */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** @description The ID of a configuration that will be used to customize all readers in this location. */ + configuration_overrides?: string + /** @description A name for the location. */ + display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of your shipping rates.

*/ - GetShippingRates: { + /**

Deletes a Location object.

*/ + DeleteTerminalLocationsLocation: { + parameters: { + path: { + location: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['deleted_terminal.location'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Returns a list of Reader objects.

*/ + GetTerminalReaders: { parameters: { query: { - /** Only return shipping rates that are active or inactive. */ - active?: boolean - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return shipping rates for the given currency. */ - currency?: string + /** Filters readers by device type */ + device_type?: 'bbpos_chipper2x' | 'bbpos_wisepad3' | 'bbpos_wisepos_e' | 'simulated_wisepos_e' | 'stripe_m2' | '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: { @@ -39410,7 +51123,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['shipping_rate'][] + /** @description A list of readers */ + data: components['schemas']['terminal.reader'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -39436,13 +51150,13 @@ export interface operations { } } } - /**

Creates a new shipping rate object.

*/ - PostShippingRates: { + /**

Creates a new Reader object.

*/ + PostTerminalReaders: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39455,70 +51169,36 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * delivery_estimate - * @description The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. - */ - delivery_estimate?: { - /** delivery_estimate_bound */ - maximum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - /** delivery_estimate_bound */ - minimum?: { - /** @enum {string} */ - unit: 'business_day' | 'day' | 'hour' | 'month' | 'week' - value: number - } - } - /** @description The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * fixed_amount - * @description Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. - */ - fixed_amount?: { - amount: number - currency: string - } + /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ + label?: string + /** @description The location to assign the reader to. */ + location?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - * @enum {string} - */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - /** @description A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The Shipping tax code is `txcd_92010001`. */ - tax_code?: string - /** - * @description The type of calculation to use on the shipping rate. Can only be `fixed_amount` for now. - * @enum {string} - */ - type?: 'fixed_amount' + metadata?: { [key: string]: string } | '' + /** @description A code generated by the reader used for registering to an account. */ + registration_code: string } } } } - /**

Returns the shipping rate object with the given ID.

*/ - GetShippingRatesShippingRateToken: { + /**

Retrieves a Reader object.

*/ + GetTerminalReadersReader: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39534,18 +51214,18 @@ export interface operations { } } } - /**

Updates an existing shipping rate object.

*/ - PostShippingRatesShippingRateToken: { + /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ + PostTerminalReadersReader: { parameters: { path: { - shipping_rate_token: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['shipping_rate'] + 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39558,46 +51238,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the shipping rate can be used for new purchases. Defaults to `true`. */ - active?: boolean /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The new label of the reader. */ + label?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of scheduled query runs.

*/ - GetSigmaScheduledQueryRuns: { + /**

Deletes a Reader object.

*/ + DeleteTerminalReadersReader: { 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: { + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['scheduled_query_run'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['deleted_terminal.reader'] } } /** Error response. */ @@ -39613,22 +51275,18 @@ export interface operations { } } } - /**

Retrieves the details of an scheduled query run.

*/ - GetSigmaScheduledQueryRunsScheduledQueryRun: { + /**

Cancels the current reader action.

*/ + PostTerminalReadersReaderCancelAction: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - scheduled_query_run: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['scheduled_query_run'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39640,72 +51298,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Returns a list of your SKUs. The SKUs are returned sorted by creation date, with the most recently created SKUs appearing first.

*/ - GetSkus: { + /**

Initiates a payment flow on a Reader.

*/ + PostTerminalReadersReaderProcessPaymentIntent: { parameters: { - query: { - /** Only return SKUs that are active or inactive (e.g., pass `false` to list all inactive products). */ - active?: boolean - /** Only return SKUs that have the specified key-value pairs in this partially constructed dictionary. Can be specified only if `product` is also supplied. For instance, if the associated product has attributes `["color", "size"]`, passing in `attributes[color]=red` returns all the SKUs for this product that have `color` set to `red`. */ - attributes?: { [key: string]: string } - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** Only return SKUs with the given IDs. */ - ids?: string[] - /** Only return SKUs that are either in stock or out of stock (e.g., pass `false` to list all SKUs that are out of stock). If no value is provided, all SKUs are returned. */ - in_stock?: boolean - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** The ID of the product whose SKUs will be retrieved. Must be a product with type `good`. */ - product?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['sku'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + path: { + reader: string } } - } - /**

Creates a new SKU associated with a product.

*/ - PostSkus: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39718,65 +51329,33 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether the SKU is available for purchase. Default to `true`. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. If, for example, a product's attributes are `["size", "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": "Medium", "gender": "Unisex"}`. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated. */ - id?: string - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string - /** - * inventory_create_specs - * @description Description of the SKU's inventory. - */ - inventory: { - quantity?: number - /** @enum {string} */ - type: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } + /** @description PaymentIntent ID */ + payment_intent: string /** - * package_dimensions_specs - * @description The dimensions of this SKU for shipping purposes. + * process_config + * @description Configuration overrides */ - package_dimensions?: { - height: number - length: number - weight: number - width: number + process_config?: { + skip_tipping?: boolean } - /** @description The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price: number - /** @description The ID of the product this SKU is associated with. Must be a product with type `good`. */ - product: string } } } } - /**

Retrieves the details of an existing SKU. Supply the unique SKU identifier from either a SKU creation request or from the product, and Stripe will return the corresponding SKU information.

*/ - GetSkusId: { + /**

Initiates a setup intent flow on a Reader.

*/ + PostTerminalReadersReaderProcessSetupIntent: { parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] | components['schemas']['deleted_sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39788,26 +51367,29 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Customer Consent Collected */ + customer_consent_collected: boolean + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description SetupIntent ID */ + setup_intent: string + } } } } - /** - *

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: { + /**

Sets reader display to show cart details.

*/ + PostTerminalReadersReaderSetReaderDisplay: { parameters: { path: { - id: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['sku'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -39820,58 +51402,43 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Whether this SKU is available for purchase. */ - active?: boolean - /** @description A dictionary of attributes and values for the attributes defined by the product. When specified, `attributes` will partially update the existing attributes dictionary on the product, with the postcondition that a value must be present for each attribute key on the product. */ - attributes?: { [key: string]: string } - /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ - currency?: string + /** + * cart + * @description Cart + */ + cart?: { + currency: string + line_items: { + amount: number + description: string + quantity: number + }[] + tax?: number + total: number + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The URL of an image for this SKU, meant to be displayable to the customer. */ - image?: string /** - * inventory_update_specs - * @description Description of the SKU's inventory. + * @description Type + * @enum {string} */ - inventory?: { - quantity?: number - /** @enum {string} */ - type?: 'bucket' | 'finite' | 'infinite' - /** @enum {string} */ - value?: '' | 'in_stock' | 'limited' | 'out_of_stock' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The dimensions of this SKU for shipping purposes. */ - package_dimensions?: - | { - height: number - length: number - weight: number - width: number - } - | '' - /** @description The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency). */ - price?: number - /** @description The ID of the product that this SKU should belong to. The product must exist, have the same set of attribute names as the SKU's current product, and be of type `good`. */ - product?: string + type: 'cart' } } } } - /**

Delete a SKU. Deleting a SKU is only possible until it has been used in an order.

*/ - DeleteSkusId: { + /**

Create an incoming testmode bank transfer

*/ + PostTestHelpersCustomersCustomerFundCashBalance: { parameters: { path: { - id: string + customer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_sku'] + 'application/json': components['schemas']['customer_cash_balance_transaction'] } } /** Error response. */ @@ -39883,17 +51450,31 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. */ + reference?: string + } } } } - /**

Creates a new source object.

*/ - PostSources: { + /**

Updates the shipping status of the specified Issuing Card object to delivered.

*/ + PostTestHelpersIssuingCardsCardShippingDeliver: { + parameters: { + path: { + card: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -39905,151 +51486,55 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. */ - amount?: number - /** @description Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. */ - currency?: string - /** @description The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). */ - customer?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** - * @description The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. - * @enum {string} - */ - flow?: 'code_verification' | 'none' | 'receiver' | 'redirect' - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - metadata?: { [key: string]: string } - /** @description The source to share. */ - original_source?: string - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * receiver_params - * @description Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). - */ - receiver?: { - /** @enum {string} */ - refund_attributes_method?: 'email' | 'manual' | 'none' - } - /** - * redirect_params - * @description Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). - */ - redirect?: { - return_url: string - } - /** - * shallow_order_specs - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } - /** @description An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. */ - statement_descriptor?: string - /** @description An optional token used to create the source. When passed, token properties will override source parameters. */ - token?: string - /** @description The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) */ - type?: string - /** @enum {string} */ - usage?: 'reusable' | 'single_use' + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] } } } } - /**

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: { + /**

Updates the shipping status of the specified Issuing Card object to failure.

*/ + PostTestHelpersIssuingCardsCardShippingFail: { 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: { + card: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['issuing.card'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Updates the shipping status of the specified Issuing Card object to returned.

*/ + PostTestHelpersIssuingCardsCardShippingReturn: { + parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40061,26 +51546,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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: { + /**

Updates the shipping status of the specified Issuing Card object to shipped.

*/ + PostTestHelpersIssuingCardsCardShippingShip: { parameters: { path: { - source: string + card: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['issuing.card'] } } /** Error response. */ @@ -40093,116 +51577,54 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Amount associated with the source. */ - amount?: number /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** - * mandate_params - * @description Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. - */ - mandate?: { - /** mandate_acceptance_params */ - acceptance?: { - /** Format: unix-time */ - date?: number - ip?: string - /** mandate_offline_acceptance_params */ - offline?: { - contact_email: string - } - /** mandate_online_acceptance_params */ - online?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - /** @enum {string} */ - status: 'accepted' | 'pending' | 'refused' | 'revoked' - /** @enum {string} */ - type?: 'offline' | 'online' - user_agent?: string - } - amount?: number | '' - currency?: string - /** @enum {string} */ - interval?: 'one_time' | 'scheduled' | 'variable' - /** @enum {string} */ - notification_method?: 'deprecated_none' | 'email' | 'manual' | 'none' | 'stripe_email' - } - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** - * owner - * @description Information about the owner of the payment instrument that may be used or required by particular source types. - */ - owner?: { - /** source_address */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - email?: string - name?: string - phone?: string - } - /** - * order_params - * @description Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. - */ - source_order?: { - items?: { - amount?: number - currency?: string - description?: string - parent?: string - quantity?: number - /** @enum {string} */ - type?: 'discount' | 'shipping' | 'sku' | 'tax' - }[] - /** order_shipping */ - shipping?: { - /** address */ - address: { - city?: string - country?: string - line1: string - line2?: string - postal_code?: string - state?: string - } - carrier?: string - name?: string - phone?: string - tracking_number?: string - } - } } } } } - /**

Retrieves a new Source MandateNotification.

*/ - GetSourcesSourceMandateNotificationsMandateNotification: { + /**

Expire a refund with a status of requires_action.

*/ + PostTestHelpersRefundsRefundExpire: { 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': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction.

*/ + PostTestHelpersTerminalReadersReaderPresentPaymentMethod: { + parameters: { path: { - mandate_notification: string - source: string + reader: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_mandate_notification'] + 'application/json': components['schemas']['terminal.reader'] } } /** Error response. */ @@ -40214,12 +51636,27 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** + * card_present + * @description Simulated data for the card_present payment method + */ + card_present?: { + number?: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * @description Simulated payment type + * @enum {string} + */ + type?: 'card_present' + } } } } - /**

List source transactions for a given source.

*/ - GetSourcesSourceSourceTransactions: { + /**

Returns a list of your test clocks.

*/ + GetTestHelpersTestClocks: { 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. */ @@ -40231,16 +51668,13 @@ 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 } - path: { - source: string - } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['source_transaction'][] + data: components['schemas']['test_helpers.test_clock'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -40266,23 +51700,54 @@ export interface operations { } } } - /**

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: { + /**

Creates a new test clock that can be attached to new customers and quotes.

*/ + PostTestHelpersTestClocks: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['test_helpers.test_clock'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The initial frozen time for this test clock. + */ + frozen_time: number + /** @description The name for this test clock. */ + name?: string + } + } + } + } + /**

Retrieves a test clock.

*/ + GetTestHelpersTestClocksTestClock: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - source: string - source_transaction: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source_transaction'] + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40298,18 +51763,18 @@ export interface operations { } } } - /**

Verify a given source.

*/ - PostSourcesSourceVerify: { + /**

Deletes a test clock.

*/ + DeleteTestHelpersTestClocksTestClock: { parameters: { path: { - source: string + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['source'] + 'application/json': components['schemas']['deleted_test_helpers.test_clock'] } } /** Error response. */ @@ -40321,47 +51786,22 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description The values needed to verify the source. */ - values: string[] - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

Returns a list of your subscription items for a given subscription.

*/ - GetSubscriptionItems: { + /**

Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready.

*/ + PostTestHelpersTestClocksTestClockAdvance: { 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 + path: { + test_clock: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_item'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['test_helpers.test_clock'] } } /** Error response. */ @@ -40373,17 +51813,30 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * Format: unix-time + * @description The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + */ + frozen_time: number + } } } } - /**

Adds a new item to an existing subscription. No existing items will be changed or replaced.

*/ - PostSubscriptionItems: { + /**

Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdFail: { + parameters: { + path: { + id: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40396,88 +51849,75 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. */ - price?: string /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + * failure_details_params + * @description Details about a failed InboundTransfer. */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } + failure_details?: { /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'debit_not_authorized' + | 'incorrect_account_holder_address' + | 'incorrect_account_holder_name' + | 'incorrect_account_holder_tax_id' + | 'insufficient_funds' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description The identifier of the subscription to modify. */ - subscription: string - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

Retrieves the subscription item with the given ID.

*/ - GetSubscriptionItemsItem: { + /**

Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state.

*/ + PostTestHelpersTreasuryInboundTransfersIdReturn: { 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']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } + } + } + /**

Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryInboundTransfersIdSucceed: { + parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -40489,22 +51929,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

Updates the plan or quantity of an item on a current subscription.

*/ - PostSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdFail: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40517,84 +51960,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - usage_gte: number - } - | '' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** @description The ID of the price object. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. */ - price?: string - /** - * recurring_price_data - * @description Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. - */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. - */ - proration_date?: number - /** @description The quantity you'd like to apply to the subscription item you're creating. */ - quantity?: number - /** @description A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. */ - tax_rates?: string[] | '' } } } } - /**

Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription.

*/ - DeleteSubscriptionItemsItem: { + /**

Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdPost: { parameters: { path: { - item: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_subscription_item'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -40607,63 +51990,72 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. */ - clear_usage?: boolean - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundPaymentsIdReturn: { + parameters: { + path: { + id: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] /** - * Format: unix-time - * @description 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. + * returned_details_params + * @description Optional hash to set the the return code. */ - proration_date?: number + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } } } } } - /** - *

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

- * - *

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- */ - GetSubscriptionItemsSubscriptionItemUsageRecordSummaries: { + /**

Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail: { 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 + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['usage_record_summary'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40675,30 +52067,25 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /** - *

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: { + /**

Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost: { parameters: { path: { - subscription_item: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['usage_record'] + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40711,91 +52098,24 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * @description Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. - * @enum {string} - */ - action?: 'increment' | 'set' /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The usage quantity for the specified timestamp. */ - quantity: number - /** @description The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. */ - timestamp?: 'now' | number } } } } - /**

Retrieves the list of your subscription schedules.

*/ - GetSubscriptionSchedules: { + /**

Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state.

*/ + PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn: { parameters: { - query: { - /** Only return subscription schedules that were created canceled the given date interval. */ - canceled_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that completed during the given date interval. */ - completed_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that were created during the given date interval. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules for the given customer. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Only return subscription schedules that were released during the given date interval. */ - released_at?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return subscription schedules that have not started yet. */ - scheduled?: boolean - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string + path: { + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': { - data: components['schemas']['subscription_schedule'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -40807,17 +52127,38 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * returned_details_params + * @description Details about a returned OutboundTransfer. + */ + returned_details?: { + /** @enum {string} */ + code?: + | 'account_closed' + | 'account_frozen' + | 'bank_account_restricted' + | 'bank_ownership_changed' + | 'declined' + | 'incorrect_account_holder_name' + | 'invalid_account_number' + | 'invalid_currency' + | 'no_account' + | 'other' + } + } } } } - /**

Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptionSchedules: { + /**

Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can’t directly create ReceivedCredits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedCredits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -40830,152 +52171,46 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description The identifier of the customer to create the subscription schedule for. */ - customer?: string + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * source_params + * @description Initiating payment method details for the object. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' + initiating_payment_method_details?: { /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string } - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' } /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. + * @description The rails used for the object. * @enum {string} */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. */ - from_subscription?: string - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - /** Format: unix-time */ - end_date?: number - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number - } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string - } - trial?: boolean - /** Format: unix-time */ - trial_end?: number - }[] - /** @description When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. */ - start_date?: number | 'now' + network: 'ach' | 'us_domestic_wire' } } } } - /**

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 - } - } + /**

Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can’t directly create ReceivedDebits initiated by third parties.

*/ + PostTestHelpersTreasuryReceivedDebits: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -40987,22 +52222,50 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string + /** + * source_params + * @description Initiating payment method details for the object. + */ + initiating_payment_method_details?: { + /** @enum {string} */ + type: 'us_bank_account' + /** us_bank_account_source_params */ + us_bank_account?: { + account_holder_name?: string + account_number?: string + routing_number?: string + } + } + /** + * @description The rails used for the object. + * @enum {string} + */ + network: 'ach' + } } } } - /**

Updates an existing subscription schedule.

*/ - PostSubscriptionSchedulesSchedule: { - parameters: { - path: { - schedule: string - } - } + /** + *

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']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41016,179 +52279,348 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * default_settings_params - * @description Object representing the subscription schedule's default settings. + * connect_js_account_token_specs + * @description Information for the account this token will represent. */ - default_settings?: { - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean - } + account?: { /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean + business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' + /** connect_js_account_token_company_specs */ + company?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + directors_provided?: boolean + executives_provided?: boolean + name?: string + name_kana?: string + name_kanji?: string + owners_provided?: boolean + /** company_ownership_declaration */ + ownership_declaration?: { + /** Format: unix-time */ + date?: number + ip?: string + user_agent?: string + } + ownership_declaration_shown_and_signed?: boolean + phone?: string + registration_number?: string + /** @enum {string} */ + structure?: + | '' + | 'free_zone_establishment' + | 'free_zone_llc' + | 'government_instrumentality' + | 'governmental_unit' + | 'incorporated_non_profit' + | 'limited_liability_partnership' + | 'llc' + | 'multi_member_llc' + | 'private_company' + | 'private_corporation' + | 'private_partnership' + | 'public_company' + | 'public_corporation' + | 'public_partnership' + | 'single_member_llc' + | 'sole_establishment' + | 'sole_proprietorship' + | 'tax_exempt_government_instrumentality' + | 'unincorporated_association' + | 'unincorporated_non_profit' + tax_id?: string + tax_id_registrar?: string + vat_id?: string + /** verification_specs */ + verification?: { + /** verification_document_specs */ + document?: { + back?: string + front?: string } - | '' + } + } + /** individual_specs */ + individual?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: + | { + day: number + month: number + year: number + } + | '' + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + phone?: string + /** @enum {string} */ + political_exposure?: 'existing' | 'none' + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string + } + } + } + tos_shown_and_accepted?: boolean + } + /** + * token_create_bank_account + * @description The bank account this token will represent. + */ + bank_account?: { + account_holder_name?: string /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - default_payment_method?: string - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + account_holder_type?: 'company' | 'individual' + account_number: string + /** @enum {string} */ + account_type?: 'checking' | 'futsu' | 'savings' | 'toza' + country: string + currency?: string + routing_number?: string + } + card?: + | { + address_city?: string + address_country?: string + address_line1?: string + address_line2?: string + address_state?: string + address_zip?: string + currency?: string + cvc?: string + exp_month: string + exp_year: string + name?: string + number: string + } + | string + /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ + customer?: string + /** + * cvc_params + * @description The updated CVC value this token will represent. + */ + cvc_update?: { + cvc: string + } + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** + * person_token_specs + * @description Information for the person this token will represent. + */ + person?: { + /** address_specs */ + address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + /** japan_address_kana_specs */ + address_kana?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string } - transfer_data?: + /** japan_address_kanji_specs */ + address_kanji?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + town?: string + } + dob?: | { - amount_percent?: number - destination: string + day: number + month: number + year: number } | '' - } - /** - * @description Configures how the subscription schedule behaves when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running.`cancel` will end the subscription schedule and cancel the underlying subscription. - * @enum {string} - */ - end_behavior?: 'cancel' | 'none' | 'release' | 'renew' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. */ - phases?: { - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** person_documents_specs */ + documents?: { + /** documents_param */ + company_authorization?: { + files?: string[] + } + /** documents_param */ + passport?: { + files?: string[] + } + /** documents_param */ + visa?: { + files?: string[] } - quantity?: number - tax_rates?: string[] | '' - }[] - application_fee_percent?: number - /** automatic_tax_config */ - automatic_tax?: { - enabled: boolean } - /** @enum {string} */ - billing_cycle_anchor?: 'automatic' | 'phase_start' - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @enum {string} */ - collection_method?: 'charge_automatically' | 'send_invoice' - coupon?: string - default_payment_method?: string - default_tax_rates?: string[] | '' - end_date?: number | 'now' - /** subscription_schedules_param */ - invoice_settings?: { - days_until_due?: number + email?: string + first_name?: string + first_name_kana?: string + first_name_kanji?: string + full_name_aliases?: string[] | '' + gender?: string + id_number?: string + id_number_secondary?: string + last_name?: string + last_name_kana?: string + last_name_kanji?: string + maiden_name?: string + metadata?: { [key: string]: string } | '' + nationality?: string + phone?: string + political_exposure?: string + /** address_specs */ + registered_address?: { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string } - items: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string + /** relationship_specs */ + relationship?: { + director?: boolean + executive?: boolean + owner?: boolean + percent_ownership?: number | '' + representative?: boolean + title?: string + } + ssn_last_4?: string + /** person_verification_specs */ + verification?: { + /** person_verification_document_specs */ + additional_document?: { + back?: string + front?: string + } + /** person_verification_document_specs */ + document?: { + back?: string + front?: string } - quantity?: number - tax_rates?: string[] | '' - }[] - iterations?: number - /** @enum {string} */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - start_date?: number | 'now' - /** transfer_data_specs */ - transfer_data?: { - amount_percent?: number - destination: string } - trial?: boolean - trial_end?: number | 'now' - }[] + } /** - * @description If the update changes the current phase, indicates if the changes should be prorated. Possible values are `create_prorations` or `none`, and the default value is `create_prorations`. - * @enum {string} + * pii_token_specs + * @description The PII this token will represent. */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' + pii?: { + id_number?: string + } } } } } - /**

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: { + /**

Retrieves the token with the given ID.

*/ + GetTokensToken: { parameters: { - path: { - schedule: string - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription_schedule'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. */ - invoice_now?: boolean - /** @description If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. */ - prorate?: boolean - } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } - } - } - /**

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 + token: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription_schedule'] + 'application/json': components['schemas']['token'] } } /** Error response. */ @@ -41200,30 +52632,16 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Keep any cancellation on the subscription that the schedule has set */ - preserve_cancel_date?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled.

*/ - GetSubscriptions: { + /**

Returns a list of top-ups.

*/ + GetTopups: { parameters: { query: { - /** The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. */ - collection_method?: 'charge_automatically' | 'send_invoice' - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - current_period_end?: + /** A positive integer representing how much to transfer. */ + amount?: | { gt?: number gte?: number @@ -41231,300 +52649,43 @@ export interface operations { lte?: number } | number - current_period_start?: + /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ + created?: | { gt?: number gte?: number lt?: number - lte?: number - } - | number - /** The ID of the customer whose subscriptions will be retrieved. */ - customer?: string - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ - ending_before?: string - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ - limit?: number - /** Filter for subscriptions that contain this recurring price ID. */ - price?: string - /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ - starting_after?: string - /** The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. */ - status?: 'active' | 'all' | 'canceled' | 'ended' | 'incomplete' | 'incomplete_expired' | 'past_due' | 'trialing' | 'unpaid' - } - } - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': { - data: components['schemas']['subscription'][] - /** @description True if this list has another page of items after this one that can be fetched. */ - has_more: boolean - /** - * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. - * @enum {string} - */ - object: 'list' - /** @description The URL where this list can be accessed. */ - url: string - } - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } - } - } - } - /**

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

*/ - PostSubscriptions: { - responses: { - /** Successful response. */ - 200: { - content: { - 'application/json': components['schemas']['subscription'] - } - } - /** Error response. */ - default: { - content: { - 'application/json': components['schemas']['error'] - } - } - } - requestBody: { - content: { - 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * Format: unix-time - * @description For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. - */ - backdate_start_date?: number - /** - * Format: unix-time - * @description A future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. - */ - billing_cycle_anchor?: number - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** - * Format: unix-time - * @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. - */ - cancel_at?: number - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description The identifier of the customer to subscribe. */ - customer: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. */ - default_tax_rates?: string[] | '' - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - metadata?: { [key: string]: string } - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** - * @description Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * - * `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The API ID of a promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * transfer_data_specs - * @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. - */ - transfer_data?: { - amount_percent?: number - destination: string - } - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean - /** @description Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_period_days?: number - } - } - } - } - /**

Retrieves the subscription with the given ID.

*/ - GetSubscriptionsSubscriptionExposedId: { - parameters: { - query: { + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - subscription_exposed_id: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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': components['schemas']['subscription'] + 'application/json': { + data: components['schemas']['topup'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -41540,18 +52701,13 @@ export interface operations { } } } - /**

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 - } - } + /**

Top up the balance of an account

*/ + PostTopups: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41564,234 +52720,69 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A list of prices and quantities that will generate invoice items appended to the first invoice for this subscription. You may pass up to 20 items. */ - add_invoice_items?: { - price?: string - /** one_time_price_data */ - price_data?: { - currency: string - product: string - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] - /** @description A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). */ - application_fee_percent?: number - /** - * automatic_tax_config - * @description Automatic tax settings for this subscription. - */ - automatic_tax?: { - enabled: boolean - } - /** - * @description Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - * @enum {string} - */ - billing_cycle_anchor?: 'now' | 'unchanged' - /** @description Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. */ - billing_thresholds?: - | { - amount_gte?: number - reset_billing_cycle_anchor?: boolean - } - | '' - /** @description A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. */ - cancel_at?: number | '' - /** @description Boolean indicating whether this subscription should cancel at the end of the current period. */ - cancel_at_period_end?: boolean - /** - * @description Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions. Defaults to `charge_automatically`. - * @enum {string} - */ - collection_method?: 'charge_automatically' | 'send_invoice' - /** @description The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. */ - coupon?: string - /** @description Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. */ - days_until_due?: number - /** @description ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_payment_method?: string - /** @description ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). */ - default_source?: string - /** @description The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. */ - default_tax_rates?: string[] | '' + /** @description A positive integer representing how much to transfer. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description A list of up to 20 subscription items, each with an attached price. */ - items?: { - billing_thresholds?: - | { - usage_gte: number - } - | '' - clear_usage?: boolean - deleted?: boolean - id?: string - metadata?: { [key: string]: string } | '' - price?: string - /** recurring_price_data */ - price_data?: { - currency: string - product: string - /** recurring_adhoc */ - recurring: { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - /** @enum {string} */ - tax_behavior?: 'exclusive' | 'inclusive' | 'unspecified' - unit_amount?: number - /** Format: decimal */ - unit_amount_decimal?: string - } - quantity?: number - tax_rates?: string[] | '' - }[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description Indicates if a customer is on or off-session while an invoice payment is attempted. */ - off_session?: boolean - /** @description If specified, payment collection for this subscription will be paused. */ - pause_collection?: - | { - /** @enum {string} */ - behavior: 'keep_as_draft' | 'mark_uncollectible' | 'void' - /** Format: unix-time */ - resumes_at?: number - } - | '' - /** - * @description Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - * - * Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - * - * Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - * - * Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - * @enum {string} - */ - payment_behavior?: 'allow_incomplete' | 'default_incomplete' | 'error_if_incomplete' | 'pending_if_incomplete' - /** - * payment_settings - * @description Payment settings to pass to invoices created by the subscription. - */ - payment_settings?: { - /** payment_method_options */ - payment_method_options?: { - acss_debit?: - | { - /** mandate_options_param */ - mandate_options?: { - /** @enum {string} */ - transaction_type?: 'business' | 'personal' - } - /** @enum {string} */ - verification_method?: 'automatic' | 'instant' | 'microdeposits' - } - | '' - bancontact?: - | { - /** @enum {string} */ - preferred_language?: 'de' | 'en' | 'fr' | 'nl' - } - | '' - card?: - | { - /** mandate_options_param */ - mandate_options?: { - amount?: number - /** @enum {string} */ - amount_type?: 'fixed' | 'maximum' - description?: string - } - /** @enum {string} */ - request_three_d_secure?: 'any' | 'automatic' - } - | '' - } - payment_method_types?: - | ( - | 'ach_credit_transfer' - | 'ach_debit' - | 'acss_debit' - | 'au_becs_debit' - | 'bacs_debit' - | 'bancontact' - | 'boleto' - | 'card' - | 'fpx' - | 'giropay' - | 'grabpay' - | 'ideal' - | 'sepa_debit' - | 'sofort' - | 'wechat_pay' - )[] - | '' - } - /** @description Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. */ - pending_invoice_item_interval?: - | { - /** @enum {string} */ - interval: 'day' | 'month' | 'week' | 'year' - interval_count?: number - } - | '' - /** @description The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. */ - promotion_code?: string - /** - * @description Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - * - * Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - * - * Prorations can be disabled by passing `none`. - * @enum {string} - */ - proration_behavior?: 'always_invoice' | 'create_prorations' | 'none' - /** - * Format: unix-time - * @description If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. - */ - proration_date?: number - /** @description If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. */ - transfer_data?: - | { - amount_percent?: number - destination: string - } - | '' - /** @description Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. */ - trial_end?: 'now' | number - /** @description Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. */ - trial_from_plan?: boolean + /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ + source?: string + /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + statement_descriptor?: string + /** @description A string that identifies this top-up as part of a group. */ + transfer_group?: string } } } } - /** - *

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: { + /**

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: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['subscription'] + 'application/json': components['schemas']['topup'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ + PostTopupsTopup: { + parameters: { + path: { + topup: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41804,28 +52795,28 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. */ - invoice_now?: boolean - /** @description Will generate a proration invoice item that credits remaining unused time until the subscription period end. */ - prorate?: boolean + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Removes the currently applied discount on a subscription.

*/ - DeleteSubscriptionsSubscriptionExposedIdDiscount: { + /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ + PostTopupsTopupCancel: { parameters: { path: { - subscription_exposed_id: string + topup: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_discount'] + 'application/json': components['schemas']['topup'] } } /** Error response. */ @@ -41837,14 +52828,27 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } } } } - /**

A list of all tax codes available to add to Products in order to allow specific tax calculations.

*/ - GetTaxCodes: { + /**

Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first.

*/ + GetTransfers: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** Only return transfers for the destination specified by this account ID. */ + destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ @@ -41853,6 +52857,8 @@ 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 + /** Only return transfers with the specified transfer group. */ + transfer_group?: string } } responses: { @@ -41860,7 +52866,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['tax_code'][] + /** @description Details about each object. */ + data: components['schemas']['transfer'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41886,22 +52893,13 @@ export interface operations { } } } - /**

Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information.

*/ - GetTaxCodesId: { - parameters: { - query: { - /** Specifies which fields in the response should be expanded. */ - expand?: string[] - } - path: { - id: string - } - } + /**

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']['tax_code'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -41913,43 +52911,56 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { [key: string]: unknown } + 'application/x-www-form-urlencoded': { + /** @description A positive integer in cents (or local equivalent) representing how much to transfer. */ + amount?: number + /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ + destination: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ + source_transaction?: string + /** + * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + * @enum {string} + */ + source_type?: 'bank_account' | 'card' | 'fpx' + /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ + transfer_group?: string + } } } } - /**

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: { + /**

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: { - /** Optional flag to filter by tax rates that are either active or inactive (archived). */ - active?: boolean - /** Optional range for filtering created date. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - /** Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). */ - inclusive?: boolean /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ starting_after?: string } + path: { + id: string + } } responses: { /** Successful response. */ 200: { content: { 'application/json': { - data: components['schemas']['tax_rate'][] + /** @description Details about each object. */ + data: components['schemas']['transfer_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -41975,13 +52986,24 @@ export interface operations { } } } - /**

Creates a new tax rate.

*/ - PostTaxRates: { + /** + *

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']['tax_rate'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -41994,51 +53016,36 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ + amount?: number + /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description This specifies if the tax rate is inclusive or exclusive. */ - inclusive: boolean - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description This represents the tax rate percent out of 100. */ - percentage: number - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' + metadata?: { [key: string]: string } | '' + /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ + refund_application_fee?: boolean } } } } - /**

Retrieves a tax rate with the given ID

*/ - GetTaxRatesTaxRate: { + /**

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42054,18 +53061,22 @@ export interface operations { } } } - /**

Updates an existing tax rate.

*/ - PostTaxRatesTaxRate: { + /** + *

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: { - tax_rate: string + transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['tax_rate'] + 'application/json': components['schemas']['transfer'] } } /** Error response. */ @@ -42078,38 +53089,65 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. */ - active?: boolean - /** @description Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). */ - country?: string - /** @description An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. */ + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string - /** @description The display name of the tax rate, which will be shown to users. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. */ - jurisdiction?: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ metadata?: { [key: string]: string } | '' - /** @description [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. */ - state?: string - /** - * @description The high-level tax type, such as `vat` or `sales_tax`. - * @enum {string} - */ - tax_type?: 'gst' | 'hst' | 'jct' | 'pst' | 'qst' | 'rst' | 'sales_tax' | 'vat' } } } - } - /**

To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token.

*/ - PostTerminalConnectionTokens: { + } + /**

By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer.

*/ + GetTransfersTransferReversalsId: { + parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } + path: { + id: string + transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['transfer_reversal'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /** + *

Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

+ * + *

This request only accepts metadata and description as arguments.

+ */ + PostTransfersTransferReversalsId: { + parameters: { + path: { + id: string + transfer: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.connection_token'] + 'application/json': components['schemas']['transfer_reversal'] } } /** Error response. */ @@ -42124,24 +53162,30 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). */ - location?: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } | '' } } } } - /**

Returns a list of Location objects.

*/ - GetTerminalLocations: { + /**

Returns a list of CreditReversals.

*/ + GetTreasuryCreditReversals: { 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** 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 CreditReversals for the ReceivedCredit ID. */ + received_credit?: 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 CreditReversals for a given status. */ + status?: 'canceled' | 'posted' | 'processing' } } responses: { @@ -42149,7 +53193,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['terminal.location'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.credit_reversal'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42175,16 +53220,13 @@ export interface operations { } } } - /** - *

Creates a new Location object. - * For further details, including which address fields are required in each country, see the Manage locations guide.

- */ - PostTerminalLocations: { + /**

Reverses a ReceivedCredit and creates a CreditReversal object.

*/ + PostTreasuryCreditReversals: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42197,44 +53239,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * create_location_address_param - * @description The full address of the location. - */ - address: { - city?: string - country: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedCredit to reverse. */ + received_credit: string } } } } - /**

Retrieves a Location object.

*/ - GetTerminalLocationsLocation: { + /**

Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list

*/ + GetTreasuryCreditReversalsCreditReversal: { parameters: { + path: { + credit_reversal: string + } 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'] + 'application/json': components['schemas']['treasury.credit_reversal'] } } /** Error response. */ @@ -42250,18 +53280,67 @@ export interface operations { } } } - /**

Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalLocationsLocation: { + /**

Returns a list of DebitReversals.

*/ + GetTreasuryDebitReversals: { parameters: { - path: { - location: 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 DebitReversals for the ReceivedDebit ID. */ + received_debit?: string + /** Only return DebitReversals for a given resolution. */ + resolution?: 'lost' | 'won' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 DebitReversals for a given status. */ + status?: 'canceled' | 'completed' | 'processing' } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.location'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.debit_reversal'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Reverses a ReceivedDebit and creates a DebitReversal object.

*/ + PostTreasuryDebitReversals: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42274,40 +53353,32 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** - * optional_fields_address - * @description The full address of the location. - */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** @description A name for the location. */ - display_name?: string /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description The ReceivedDebit to reverse. */ + received_debit: string } } } } - /**

Deletes a Location object.

*/ - DeleteTerminalLocationsLocation: { + /**

Retrieves a DebitReversal object.

*/ + GetTreasuryDebitReversalsDebitReversal: { parameters: { path: { - location: string + debit_reversal: string + } + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.location'] + 'application/json': components['schemas']['treasury.debit_reversal'] } } /** Error response. */ @@ -42323,24 +53394,26 @@ export interface operations { } } } - /**

Returns a list of Reader objects.

*/ - GetTerminalReaders: { + /**

Returns a list of FinancialAccounts.

*/ + GetTreasuryFinancialAccounts: { parameters: { query: { - /** Filters readers by device type */ - device_type?: 'bbpos_chipper2x' | 'bbpos_wisepos_e' | 'verifone_P400' - /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** An object ID cursor for use in pagination. */ ending_before?: string /** Specifies which fields 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. */ + /** A limit ranging from 1 to 100 (defaults to 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. */ + /** An object ID cursor for use in pagination. */ starting_after?: string - /** A status filter to filter readers to only offline or online readers */ - status?: 'offline' | 'online' } } responses: { @@ -42348,8 +53421,7 @@ export interface operations { 200: { content: { 'application/json': { - /** @description A list of readers */ - data: components['schemas']['terminal.reader'][] + data: components['schemas']['treasury.financial_account'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42375,13 +53447,13 @@ export interface operations { } } } - /**

Creates a new Reader object.

*/ - PostTerminalReaders: { + /**

Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.

*/ + PostTreasuryFinancialAccounts: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42396,34 +53468,94 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. */ - label?: string - /** @description The location to assign the reader to. */ - location?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description A code generated by the reader used for registering to an account. */ - registration_code: string + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } + /** @description The currencies the FinancialAccount can hold a balance in. */ + supported_currencies: string[] } } } } - /**

Retrieves a Reader object.

*/ - GetTerminalReadersReader: { + /**

Retrieves the details of a FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccount: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42439,18 +53571,18 @@ export interface operations { } } } - /**

Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

*/ - PostTerminalReadersReader: { + /**

Updates the details of a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccount: { parameters: { path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['terminal.reader'] | components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account'] } } /** Error response. */ @@ -42465,26 +53597,92 @@ export interface operations { 'application/x-www-form-urlencoded': { /** @description Specifies which fields in the response should be expanded. */ expand?: string[] - /** @description The new label of the reader. */ - label?: string + /** + * feature_access + * @description Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + */ + features?: { + /** access */ + card_issuing?: { + requested: boolean + } + /** access */ + deposit_insurance?: { + requested: boolean + } + /** financial_addresses */ + financial_addresses?: { + /** access */ + aba?: { + requested: boolean + } + } + /** inbound_transfers */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + } + /** access */ + intra_stripe_flows?: { + requested: boolean + } + /** outbound_payments */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + /** outbound_transfers */ + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } + } + } /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** + * platform_restrictions + * @description The set of functionalities that the platform can restrict on the FinancialAccount. + */ + platform_restrictions?: { + /** @enum {string} */ + inbound_flows?: 'restricted' | 'unrestricted' + /** @enum {string} */ + outbound_flows?: 'restricted' | 'unrestricted' + } } } } } - /**

Deletes a Reader object.

*/ - DeleteTerminalReadersReader: { + /**

Retrieves Features information associated with the FinancialAccount.

*/ + GetTreasuryFinancialAccountsFinancialAccountFeatures: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - reader: string + financial_account: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['deleted_terminal.reader'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42500,16 +53698,18 @@ export interface operations { } } } - /** - *

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: { + /**

Updates the Features associated with a FinancialAccount.

*/ + PostTreasuryFinancialAccountsFinancialAccountFeatures: { + parameters: { + path: { + financial_account: string + } + } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.financial_account_features'] } } /** Error response. */ @@ -42523,328 +53723,185 @@ export interface operations { content: { 'application/x-www-form-urlencoded': { /** - * connect_js_account_token_specs - * @description Information for the account this token will represent. - */ - account?: { - /** @enum {string} */ - business_type?: 'company' | 'government_entity' | 'individual' | 'non_profit' - /** connect_js_account_token_company_specs */ - company?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - directors_provided?: boolean - executives_provided?: boolean - name?: string - name_kana?: string - name_kanji?: string - owners_provided?: boolean - /** company_ownership_declaration */ - ownership_declaration?: { - /** Format: unix-time */ - date?: number - ip?: string - user_agent?: string - } - ownership_declaration_shown_and_signed?: boolean - phone?: string - registration_number?: string - /** @enum {string} */ - structure?: - | '' - | 'free_zone_establishment' - | 'free_zone_llc' - | 'government_instrumentality' - | 'governmental_unit' - | 'incorporated_non_profit' - | 'limited_liability_partnership' - | 'llc' - | 'multi_member_llc' - | 'private_company' - | 'private_corporation' - | 'private_partnership' - | 'public_company' - | 'public_corporation' - | 'public_partnership' - | 'single_member_llc' - | 'sole_establishment' - | 'sole_proprietorship' - | 'tax_exempt_government_instrumentality' - | 'unincorporated_association' - | 'unincorporated_non_profit' - tax_id?: string - tax_id_registrar?: string - vat_id?: string - /** verification_specs */ - verification?: { - /** verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - /** individual_specs */ - individual?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - dob?: - | { - day: number - month: number - year: number - } - | '' - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - phone?: string - /** @enum {string} */ - political_exposure?: 'existing' | 'none' - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } - } - } - tos_shown_and_accepted?: boolean - } - /** - * token_create_bank_account - * @description The bank account this token will represent. + * access + * @description Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. */ - bank_account?: { - account_holder_name?: string - /** @enum {string} */ - account_holder_type?: 'company' | 'individual' - account_number: string - /** @enum {string} */ - account_type?: 'checking' | 'futsu' | 'savings' | 'toza' - country: string - currency?: string - routing_number?: string + card_issuing?: { + requested: boolean } - card?: - | { - address_city?: string - address_country?: string - address_line1?: string - address_line2?: string - address_state?: string - address_zip?: string - currency?: string - cvc?: string - exp_month: string - exp_year: string - name?: string - number: string - } - | string - /** @description The customer (owned by the application's account) for which to create a token. This can be used only with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). */ - customer?: string /** - * cvc_params - * @description The updated CVC value this token will represent. + * access + * @description Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. */ - cvc_update?: { - cvc: string + deposit_insurance?: { + requested: boolean } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] /** - * person_token_specs - * @description Information for the person this token will represent. + * financial_addresses + * @description Contains Features that add FinancialAddresses to the FinancialAccount. */ - person?: { - /** address_specs */ - address?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - } - /** japan_address_kana_specs */ - address_kana?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string - } - /** japan_address_kanji_specs */ - address_kanji?: { - city?: string - country?: string - line1?: string - line2?: string - postal_code?: string - state?: string - town?: string + financial_addresses?: { + /** access */ + aba?: { + requested: boolean } - dob?: - | { - day: number - month: number - year: number - } - | '' - /** person_documents_specs */ - documents?: { - /** documents_param */ - company_authorization?: { - files?: string[] - } - /** documents_param */ - passport?: { - files?: string[] - } - /** documents_param */ - visa?: { - files?: string[] - } - } - email?: string - first_name?: string - first_name_kana?: string - first_name_kanji?: string - full_name_aliases?: string[] | '' - gender?: string - id_number?: string - last_name?: string - last_name_kana?: string - last_name_kanji?: string - maiden_name?: string - metadata?: { [key: string]: string } | '' - nationality?: string - phone?: string - political_exposure?: string - /** relationship_specs */ - relationship?: { - director?: boolean - executive?: boolean - owner?: boolean - percent_ownership?: number | '' - representative?: boolean - title?: string + } + /** + * inbound_transfers + * @description Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + */ + inbound_transfers?: { + /** access */ + ach?: { + requested: boolean } - ssn_last_4?: string - /** person_verification_specs */ - verification?: { - /** person_verification_document_specs */ - additional_document?: { - back?: string - front?: string - } - /** person_verification_document_specs */ - document?: { - back?: string - front?: string - } + } + /** + * access + * @description Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + */ + intra_stripe_flows?: { + requested: boolean + } + /** + * outbound_payments + * @description Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + */ + outbound_payments?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean } } /** - * pii_token_specs - * @description The PII this token will represent. + * outbound_transfers + * @description Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. */ - pii?: { - id_number?: string + outbound_transfers?: { + /** access */ + ach?: { + requested: boolean + } + /** access */ + us_domestic_wire?: { + requested: boolean + } } } } } } - /**

Retrieves the token with the given ID.

*/ - GetTokensToken: { + /**

Returns a list of InboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryInboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. */ + status?: 'canceled' | 'failed' | 'processing' | 'succeeded' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.inbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an InboundTransfer.

*/ + PostTreasuryInboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string + /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ + description?: string + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + /** @description The FinancialAccount to send funds to. */ + financial_account: string + /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ + metadata?: { [key: string]: string } + /** @description The origin payment method to be debited for the InboundTransfer. */ + origin_payment_method: string + /** @description The complete description that appears on your customers' statements. Maximum 10 characters. */ + statement_descriptor?: string + } + } + } + } + /**

Retrieves the details of an existing InboundTransfer.

*/ + GetTreasuryInboundTransfersId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - token: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['token'] + 'application/json': components['schemas']['treasury.inbound_transfer'] } } /** Error response. */ @@ -42860,38 +53917,54 @@ export interface operations { } } } - /**

Returns a list of top-ups.

*/ - GetTopups: { + /**

Cancels an InboundTransfer.

*/ + PostTreasuryInboundTransfersInboundTransferCancel: { + parameters: { + path: { + inbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.inbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundPayments sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundPayments: { parameters: { query: { - /** A positive integer representing how much to transfer. */ - amount?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. */ - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number + /** Only return OutboundPayments sent to this customer. */ + customer?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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' + /** Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' } } responses: { @@ -42899,7 +53972,8 @@ export interface operations { 200: { content: { 'application/json': { - data: components['schemas']['topup'][] + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_payment'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -42925,13 +53999,13 @@ export interface operations { } } } - /**

Top up the balance of an account

*/ - PostTopups: { + /**

Creates an OutboundPayment.

*/ + PostTreasuryOutboundPayments: { responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42944,42 +54018,100 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { - /** @description A positive integer representing how much to transfer. */ + /** @description Amount (in cents) to be transferred. */ amount: number /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ currency: string + /** @description ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. */ + customer?: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. */ + destination_payment_method?: string + /** + * payment_method_data + * @description Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + */ + destination_payment_method_data?: { + /** billing_details_inner_params */ + billing_details?: { + address?: + | { + city?: string + country?: string + line1?: string + line2?: string + postal_code?: string + state?: string + } + | '' + email?: string | '' + name?: string + phone?: string + } + financial_account?: string + metadata?: { [key: string]: string } + /** @enum {string} */ + type: 'financial_account' | 'us_bank_account' + /** payment_method_param */ + us_bank_account?: { + /** @enum {string} */ + account_holder_type?: 'company' | 'individual' + account_number?: string + /** @enum {string} */ + account_type?: 'checking' | 'savings' + financial_connections_account?: string + routing_number?: string + } + } + /** + * payment_method_options + * @description Payment method-specific configuration for this OutboundPayment. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } + /** + * end_user_details_params + * @description End user details. + */ + end_user_details?: { + ip_address?: string + present: boolean + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). */ - source?: string - /** @description Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. */ + metadata?: { [key: string]: string } + /** @description The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `wire` payments, or 500 characters for `stripe` network transfers. The default value is `payment`. */ statement_descriptor?: string - /** @description A string that identifies this top-up as part of a group. */ - transfer_group?: string } } } } - /**

Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information.

*/ - GetTopupsTopup: { + /**

Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list.

*/ + GetTreasuryOutboundPaymentsId: { parameters: { query: { /** Specifies which fields in the response should be expanded. */ expand?: string[] } path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] } } /** Error response. */ @@ -42995,18 +54127,93 @@ export interface operations { } } } - /**

Updates the metadata of a top-up. Other top-up details are not editable by design.

*/ - PostTopupsTopup: { + /**

Cancel an OutboundPayment.

*/ + PostTreasuryOutboundPaymentsIdCancel: { parameters: { path: { - topup: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_payment'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { + /** @description Specifies which fields in the response should be expanded. */ + expand?: string[] + } + } + } + } + /**

Returns a list of OutboundTransfers sent from the specified FinancialAccount.

*/ + GetTreasuryOutboundTransfers: { + 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[] + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ + limit?: number + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. */ + status?: 'canceled' | 'failed' | 'posted' | 'processing' | 'returned' + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.outbound_transfer'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

Creates an OutboundTransfer.

*/ + PostTreasuryOutboundTransfers: { + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43019,28 +54226,81 @@ export interface operations { requestBody: { content: { 'application/x-www-form-urlencoded': { + /** @description Amount (in cents) to be transferred. */ + amount: number + /** @description Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). */ + currency: string /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ description?: string + /** @description The PaymentMethod to use as the payment instrument for the OutboundTransfer. */ + destination_payment_method?: string + /** + * payment_method_options + * @description Hash describing payment method configuration details. + */ + destination_payment_method_options?: { + us_bank_account?: + | { + /** @enum {string} */ + network?: 'ach' | 'us_domestic_wire' + } + | '' + } /** @description Specifies which fields in the response should be expanded. */ expand?: string[] + /** @description The FinancialAccount to pull funds from. */ + financial_account: string /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' + metadata?: { [key: string]: string } + /** @description Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `wire` transfers. The default value is `transfer`. */ + statement_descriptor?: string } } } } - /**

Cancels a top-up. Only pending top-ups can be canceled.

*/ - PostTopupsTopupCancel: { + /**

Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list.

*/ + GetTreasuryOutboundTransfersOutboundTransfer: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - topup: string + outbound_transfer: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['topup'] + 'application/json': components['schemas']['treasury.outbound_transfer'] + } + } + /** Error response. */ + default: { + content: { + 'application/json': components['schemas']['error'] + } + } + } + requestBody: { + content: { + 'application/x-www-form-urlencoded': { [key: string]: unknown } + } + } + } + /**

An OutboundTransfer can be canceled if the funds have not yet been paid out.

*/ + PostTreasuryOutboundTransfersOutboundTransferCancel: { + parameters: { + path: { + outbound_transfer: string + } + } + responses: { + /** Successful response. */ + 200: { + content: { + 'application/json': components['schemas']['treasury.outbound_transfer'] } } /** Error response. */ @@ -43059,30 +54319,27 @@ export interface operations { } } } - /**

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: { + /**

Returns a list of ReceivedCredits.

*/ + GetTreasuryReceivedCredits: { parameters: { query: { - created?: - | { - gt?: number - gte?: number - lt?: number - lte?: number - } - | number - /** Only return transfers for the destination specified by this account ID. */ - destination?: string /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] + /** The FinancialAccount that received the funds. */ + financial_account: string /** 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 ReceivedCredits described by the flow. */ + linked_flows?: { + /** @enum {string} */ + source_flow_type: 'credit_reversal' | 'other' | 'outbound_payment' | 'payout' + } /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedCredits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43091,7 +54348,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer'][] + data: components['schemas']['treasury.received_credit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43117,13 +54374,22 @@ export interface operations { } } } - /**

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: { + /**

Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list.

*/ + GetTreasuryReceivedCreditsId: { + 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']['transfer'] + 'application/json': components['schemas']['treasury.received_credit'] } } /** Error response. */ @@ -43135,47 +54401,26 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much to transfer. */ - amount?: number - /** @description 3-letter [ISO code for currency](https://stripe.com/docs/payouts). */ - currency: string - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description The ID of a connected Stripe account. See the Connect documentation for details. */ - destination: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } - /** @description You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) for details. */ - source_transaction?: string - /** - * @description The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. - * @enum {string} - */ - source_type?: 'bank_account' | 'card' | 'fpx' - /** @description A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) for details. */ - transfer_group?: string - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Returns a list of ReceivedDebits.

*/ + GetTreasuryReceivedDebits: { 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[] + /** The FinancialAccount that funds were pulled from. */ + financial_account: string /** A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. */ limit?: number /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 + /** Only return ReceivedDebits that have the given status: `succeeded` or `failed`. */ + status?: 'failed' | 'succeeded' } } responses: { @@ -43184,7 +54429,7 @@ export interface operations { content: { 'application/json': { /** @description Details about each object. */ - data: components['schemas']['transfer_reversal'][] + data: components['schemas']['treasury.received_debit'][] /** @description True if this list has another page of items after this one that can be fetched. */ has_more: boolean /** @@ -43210,15 +54455,13 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list

*/ + GetTreasuryReceivedDebitsId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { id: string } @@ -43227,7 +54470,7 @@ export interface operations { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': components['schemas']['treasury.received_debit'] } } /** Error response. */ @@ -43239,37 +54482,63 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description A positive integer in %s representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. */ - amount?: number - /** @description An arbitrary string which you can attach to a reversal object. It is displayed alongside the reversal in the Dashboard. This will be unset if you POST an empty value. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - /** @description Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. */ - refund_application_fee?: boolean - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Retrieves a list of TransactionEntry objects.

*/ + GetTreasuryTransactionEntries: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + effective_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `effective_at`. The default is `created`. */ + order_by?: 'created' | 'effective_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `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 TransactionEntries associated with this Transaction. */ + transaction?: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction_entry'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43285,22 +54554,22 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves a TransactionEntry object.

*/ + GetTreasuryTransactionEntriesId: { parameters: { + query: { + /** Specifies which fields in the response should be expanded. */ + expand?: string[] + } path: { - transfer: string + id: string } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer'] + 'application/json': components['schemas']['treasury.transaction_entry'] } } /** Error response. */ @@ -43312,34 +54581,66 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description An arbitrary string attached to the object. Often useful for displaying to users. */ - description?: string - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } - /**

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: { + /**

Retrieves a list of Transaction objects.

*/ + GetTreasuryTransactions: { parameters: { query: { + created?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + /** A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. */ + ending_before?: string /** Specifies which fields in the response should be expanded. */ expand?: string[] - } - path: { - id: string - transfer: string + /** Returns objects associated with this FinancialAccount. */ + financial_account: string + /** 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 results are in reverse chronological order by `created` or `posted_at`. The default is `created`. */ + order_by?: 'created' | 'posted_at' + /** A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. */ + starting_after?: string + /** Only return Transactions that have the given status: `open`, `posted`, or `void`. */ + status?: 'open' | 'posted' | 'void' + /** A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. */ + status_transitions?: { + posted_at?: + | { + gt?: number + gte?: number + lt?: number + lte?: number + } + | number + } } } responses: { /** Successful response. */ 200: { content: { - 'application/json': components['schemas']['transfer_reversal'] + 'application/json': { + /** @description Details about each object. */ + data: components['schemas']['treasury.transaction'][] + /** @description True if this list has another page of items after this one that can be fetched. */ + has_more: boolean + /** + * @description String representing the object's type. Objects of the same type share the same value. Always has the value `list`. + * @enum {string} + */ + object: 'list' + /** @description The URL where this list can be accessed. */ + url: string + } } } /** Error response. */ @@ -43355,23 +54656,22 @@ export interface operations { } } } - /** - *

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: { + /**

Retrieves the details of an existing Transaction.

*/ + GetTreasuryTransactionsId: { 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'] + 'application/json': components['schemas']['treasury.transaction'] } } /** Error response. */ @@ -43383,12 +54683,7 @@ export interface operations { } requestBody: { content: { - 'application/x-www-form-urlencoded': { - /** @description Specifies which fields in the response should be expanded. */ - expand?: string[] - /** @description Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. */ - metadata?: { [key: string]: string } | '' - } + 'application/x-www-form-urlencoded': { [key: string]: unknown } } } } @@ -43557,6 +54852,7 @@ export interface operations { | '2019-12-03' | '2020-03-02' | '2020-08-27' + | '2022-08-01' /** @description Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. */ connect?: boolean /** @description An optional description of what the webhook is used for. */ @@ -43576,7 +54872,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43619,7 +54917,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43658,13 +54962,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43733,16 +55034,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] @@ -43828,7 +55162,9 @@ export interface operations { | 'balance.available' | 'billing_portal.configuration.created' | 'billing_portal.configuration.updated' + | 'billing_portal.session.created' | 'capability.updated' + | 'cash_balance.funds_available' | 'charge.captured' | 'charge.dispute.closed' | 'charge.dispute.created' @@ -43871,7 +55207,13 @@ export interface operations { | 'customer.tax_id.deleted' | 'customer.tax_id.updated' | 'customer.updated' + | 'customer_cash_balance_transaction.created' | 'file.created' + | 'financial_connections.account.created' + | 'financial_connections.account.deactivated' + | 'financial_connections.account.disconnected' + | 'financial_connections.account.reactivated' + | 'financial_connections.account.refreshed_balance' | 'identity.verification_session.canceled' | 'identity.verification_session.created' | 'identity.verification_session.processing' @@ -43910,13 +55252,10 @@ export interface operations { | '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.partially_funded' | 'payment_intent.payment_failed' | 'payment_intent.processing' | 'payment_intent.requires_action' @@ -43985,16 +55324,49 @@ export interface operations { | 'subscription_schedule.updated' | 'tax_rate.created' | 'tax_rate.updated' + | 'terminal.reader.action_failed' + | 'terminal.reader.action_succeeded' + | 'test_helpers.test_clock.advancing' + | 'test_helpers.test_clock.created' + | 'test_helpers.test_clock.deleted' + | 'test_helpers.test_clock.internal_failure' + | 'test_helpers.test_clock.ready' | 'topup.canceled' | 'topup.created' | 'topup.failed' | 'topup.reversed' | 'topup.succeeded' | 'transfer.created' - | 'transfer.failed' - | 'transfer.paid' | 'transfer.reversed' | 'transfer.updated' + | 'treasury.credit_reversal.created' + | 'treasury.credit_reversal.posted' + | 'treasury.debit_reversal.completed' + | 'treasury.debit_reversal.created' + | 'treasury.debit_reversal.initial_credit_granted' + | 'treasury.financial_account.closed' + | 'treasury.financial_account.created' + | 'treasury.financial_account.features_status_updated' + | 'treasury.inbound_transfer.canceled' + | 'treasury.inbound_transfer.created' + | 'treasury.inbound_transfer.failed' + | 'treasury.inbound_transfer.succeeded' + | 'treasury.outbound_payment.canceled' + | 'treasury.outbound_payment.created' + | 'treasury.outbound_payment.expected_arrival_date_updated' + | 'treasury.outbound_payment.failed' + | 'treasury.outbound_payment.posted' + | 'treasury.outbound_payment.returned' + | 'treasury.outbound_transfer.canceled' + | 'treasury.outbound_transfer.created' + | 'treasury.outbound_transfer.expected_arrival_date_updated' + | 'treasury.outbound_transfer.failed' + | 'treasury.outbound_transfer.posted' + | 'treasury.outbound_transfer.returned' + | 'treasury.received_credit.created' + | 'treasury.received_credit.failed' + | 'treasury.received_credit.succeeded' + | 'treasury.received_debit.created' )[] /** @description Specifies which fields in the response should be expanded. */ expand?: string[] diff --git a/test/v3/specs/github.yaml b/test/v3/specs/github.yaml index 5dbe659a6..ba18f6bbf 100644 --- a/test/v3/specs/github.yaml +++ b/test/v3/specs/github.yaml @@ -34,6 +34,8 @@ tags: description: Administer a GitHub enterprise. - name: dependabot description: Endpoints to manage Dependabot. +- name: dependency-graph + description: Endpoints to access Dependency Graph features. - name: gists description: View, modify your gists. - name: git @@ -47,13 +49,13 @@ tags: - name: licenses description: View various OSS licenses. - name: markdown - description: Render Github flavored markdown + description: Render GitHub flavored markdown +- name: merge-queue + description: Interact with GitHub Merge Queues. - name: meta description: Endpoints that give information about the API. - name: migrations description: Move projects to or from GitHub. -- name: oauth-authorizations - description: Manage access of OAuth applications - name: orgs description: Interact with GitHub Orgs. - name: packages @@ -68,8 +70,6 @@ tags: description: Interact with reactions to various GitHub entities. - name: repos description: Interact with GitHub Repos. -- name: scim - description: Provisioning of GitHub organization membership for SCIM-enabled providers. - name: search description: Look for stuff on GitHub. - name: secret-scanning @@ -81,10 +81,17 @@ tags: - name: users description: Interact with and view information about users and also current user. servers: -- url: https://api.github.com +- url: "{protocol}://{hostname}/api/v3" + variables: + hostname: + description: Self-hosted Enterprise Server or Enterprise Cloud hostname + default: HOSTNAME + protocol: + description: Self-hosted Enterprise Server or Enterprise Cloud protocol + default: http externalDocs: - description: GitHub v3 REST API - url: https://docs.github.com/rest/ + description: GitHub Enterprise Developer Docs + url: https://docs.github.com/enterprise-server@3.6/rest/ paths: "/": get: @@ -99,648 +106,635 @@ paths: content: application/json: schema: - type: object - properties: - current_user_url: - type: string - format: uri-template - current_user_authorizations_html_url: - type: string - format: uri-template - authorizations_url: - type: string - format: uri-template - code_search_url: - type: string - format: uri-template - commit_search_url: - type: string - format: uri-template - emails_url: - type: string - format: uri-template - emojis_url: - type: string - format: uri-template - events_url: - type: string - format: uri-template - feeds_url: - type: string - format: uri-template - followers_url: - type: string - format: uri-template - following_url: - type: string - format: uri-template - gists_url: - type: string - format: uri-template - hub_url: - type: string - format: uri-template - issue_search_url: - type: string - format: uri-template - issues_url: - type: string - format: uri-template - keys_url: - type: string - format: uri-template - label_search_url: - type: string - format: uri-template - notifications_url: - type: string - format: uri-template - organization_url: - type: string - format: uri-template - organization_repositories_url: - type: string - format: uri-template - organization_teams_url: - type: string - format: uri-template - public_gists_url: - type: string - format: uri-template - rate_limit_url: - type: string - format: uri-template - repository_url: - type: string - format: uri-template - repository_search_url: - type: string - format: uri-template - current_user_repositories_url: - type: string - format: uri-template - starred_url: - type: string - format: uri-template - starred_gists_url: - type: string - format: uri-template - topic_search_url: - type: string - format: uri-template - user_url: - type: string - format: uri-template - user_organizations_url: - type: string - format: uri-template - user_repositories_url: - type: string - format: uri-template - user_search_url: - type: string - format: uri-template - required: - - current_user_url - - current_user_authorizations_html_url - - authorizations_url - - code_search_url - - commit_search_url - - emails_url - - emojis_url - - events_url - - feeds_url - - followers_url - - following_url - - gists_url - - hub_url - - issue_search_url - - issues_url - - keys_url - - label_search_url - - notifications_url - - organization_url - - organization_repositories_url - - organization_teams_url - - public_gists_url - - rate_limit_url - - repository_url - - repository_search_url - - current_user_repositories_url - - starred_url - - starred_gists_url - - user_url - - user_organizations_url - - user_repositories_url - - user_search_url + "$ref": "#/components/schemas/root" + examples: + default: + "$ref": "#/components/examples/root" x-github: githubCloudOnly: false enabledForGitHubApps: true category: meta externalDocs: description: API method documentation - url: https://docs.github.com/rest/overview/resources-in-the-rest-api#root-endpoint - "/app": + url: https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#root-endpoint + "/admin/hooks": get: - summary: Get the authenticated app - description: |- - 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. + summary: List global webhooks + description: '' + operationId: enterprise-admin/list-global-webhooks tags: - - apps - operationId: apps/get-authenticated + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-the-authenticated-app - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-global-webhooks + parameters: + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/integration" + type: array + items: + "$ref": "#/components/schemas/global-hook" examples: default: - "$ref": "#/components/examples/integration" + "$ref": "#/components/examples/global-hook-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: - "/app-manifests/{code}/conversions": + enabledForGitHubApps: false + category: enterprise-admin + subcategory: global-webhooks post: - summary: Create a GitHub App from a manifest - description: 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`. + summary: Create a global webhook + description: '' + operationId: enterprise-admin/create-global-webhook tags: - - apps - operationId: apps/create-from-manifest + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#create-a-github-app-from-a-manifest - parameters: - - name: code - in: path - required: true - schema: - type: string - requestBody: - required: false - content: - application/json: - schema: - type: object - additionalProperties: false + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-a-global-webhook responses: '201': description: Response content: application/json: schema: - allOf: - - "$ref": "#/components/schemas/integration" - - type: object + "$ref": "#/components/schemas/global-hook" + examples: + default: + "$ref": "#/components/examples/global-hook" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Must be passed as "web". + config: + type: object + description: Key/value pairs to provide settings for this webhook. properties: - client_id: + url: type: string - client_secret: + description: The URL to which the payloads will be delivered. + content_type: type: string - webhook_secret: + description: The media type used to serialize the payloads. + Supported values include `json` and `form`. The default is + `form`. + secret: type: string - nullable: true - pem: + description: If provided, the `secret` will be used as the `key` + to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) + header. + insecure_ssl: type: string + description: 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.** required: - - client_id - - client_secret - - webhook_secret - - pem - additionalProperties: true - examples: - default: - "$ref": "#/components/examples/integration-from-manifest" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + - url + events: + type: array + description: 'The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + that trigger this webhook. A global webhook can be triggered by + `user` and `organization` events. Default: `user` and `organization`.' + items: + type: string + active: + type: boolean + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. + default: true + required: + - name + - config + examples: + default: + value: + name: web + events: + - organization + - user + config: + url: https://example.com/webhook + content_type: json + secret: secret x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: - "/app/hook/config": + category: enterprise-admin + subcategory: global-webhooks + "/admin/hooks/{hook_id}": get: - summary: Get a webhook configuration for an app - description: |- - 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. + summary: Get a global webhook + description: '' + operationId: enterprise-admin/get-global-webhook tags: - - apps - operationId: apps/get-webhook-config-for-app + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-webhook-configuration-for-an-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-a-global-webhook + parameters: + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/webhook-config" + "$ref": "#/components/schemas/global-hook" examples: default: - "$ref": "#/components/examples/webhook-config" + "$ref": "#/components/examples/global-hook" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: webhooks + category: enterprise-admin + subcategory: global-webhooks patch: - summary: Update a webhook configuration for an app - description: |- - 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. - tags: - - apps - operationId: apps/update-webhook-config-for-app - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/apps#update-a-webhook-configuration-for-an-app - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - example: - content_type: json - insecure_ssl: '0' - secret: "********" - url: https://example.com/webhook - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/webhook-config" - examples: - default: - "$ref": "#/components/examples/webhook-config" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: webhooks - "/app/hook/deliveries": - get: - summary: List deliveries for an app webhook - description: |- - Returns a list of webhook deliveries for the webhook configured for a GitHub App. - - You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + summary: Update a global webhook + description: Parameters that are not provided will be overwritten with the default + value or removed if no default exists. + operationId: enterprise-admin/update-global-webhook tags: - - apps - operationId: apps/list-webhook-deliveries + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-deliveries-for-an-app-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-a-global-webhook parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/cursor" + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/hook-delivery-item" + "$ref": "#/components/schemas/global-hook-2" examples: default: - "$ref": "#/components/examples/hook-delivery-items" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/global-hook-2" + requestBody: + content: + application/json: + schema: + type: object + properties: + config: + type: object + description: Key/value pairs to provide settings for this webhook. + properties: + url: + type: string + description: The URL to which the payloads will be delivered. + content_type: + type: string + description: The media type used to serialize the payloads. + Supported values include `json` and `form`. The default is + `form`. + secret: + type: string + description: If provided, the `secret` will be used as the `key` + to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers) + header. + insecure_ssl: + type: string + description: 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.** + required: + - url + events: + type: array + description: 'The [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + that trigger this webhook. A global webhook can be triggered by + `user` and `organization` events. Default: `user` and `organization`.' + items: + type: string + active: + type: boolean + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. + default: true + examples: + default: + value: + events: + - organization + config: + url: https://example.com/webhook x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: webhooks - "/app/hook/deliveries/{delivery_id}": - get: - summary: Get a delivery for an app webhook - description: |- - Returns a delivery for the webhook configured for a GitHub App. - - You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + category: enterprise-admin + subcategory: global-webhooks + delete: + summary: Delete a global webhook + description: '' + operationId: enterprise-admin/delete-global-webhook tags: - - apps - operationId: apps/get-webhook-delivery + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-delivery-for-an-app-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-global-webhook parameters: - - "$ref": "#/components/parameters/delivery-id" + - "$ref": "#/components/parameters/hook-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/hook-delivery" - examples: - default: - "$ref": "#/components/examples/hook-delivery" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: webhooks - "/app/hook/deliveries/{delivery_id}/attempts": + category: enterprise-admin + subcategory: global-webhooks + "/admin/hooks/{hook_id}/pings": post: - summary: Redeliver a delivery for an app webhook - description: |- - Redeliver a delivery for the webhook configured for a GitHub App. - - You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + summary: Ping a global webhook + description: This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) + to be sent to the webhook. + operationId: enterprise-admin/ping-global-webhook tags: - - apps - operationId: apps/redeliver-webhook-delivery + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#ping-a-global-webhook parameters: - - "$ref": "#/components/parameters/delivery-id" + - "$ref": "#/components/parameters/hook-id" responses: - '202': - "$ref": "#/components/responses/accepted" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" + '204': + description: Response x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: webhooks - "/app/installations": + category: enterprise-admin + subcategory: global-webhooks + "/admin/keys": get: - summary: List installations for the authenticated app - description: |- - 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. + summary: List public keys + description: '' + operationId: enterprise-admin/list-public-keys tags: - - apps - operationId: apps/list-installations + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-installations-for-the-authenticated-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-public-keys parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/since" - - name: outdated + - "$ref": "#/components/parameters/direction" + - name: sort + in: query + required: false + schema: + type: string + enum: + - created + - updated + - accessed + default: created + - name: since + description: Only show public keys accessed after the given time. in: query required: false schema: type: string responses: '200': - description: The permissions the installation has are included under the - `permissions` key. + description: Response content: application/json: schema: type: array items: - "$ref": "#/components/schemas/installation" + "$ref": "#/components/schemas/public-key-full" examples: default: - "$ref": "#/components/examples/base-installation-items" + "$ref": "#/components/examples/enterprise-public-key-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: - "/app/installations/{installation_id}": - get: - summary: Get an installation for the authenticated app - description: |- - Enables an authenticated GitHub App to find an installation's information using the installation id. - - You must use a [JWT](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users + "/admin/keys/{key_ids}": + delete: + summary: Delete a public key + description: '' + operationId: enterprise-admin/delete-public-key tags: - - apps - operationId: apps/get-installation + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-an-installation-for-the-authenticated-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-public-key parameters: - - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/key-ids" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users + "/admin/ldap/teams/{team_id}/mapping": + patch: + summary: Update LDAP mapping for a team + description: Updates the [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) + (DN) of the LDAP entry to map to a team. [LDAP synchronization](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap#enabling-ldap-sync) + must be enabled to map LDAP entries to a team. Use the [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#create-a-team) + endpoint to create a team with LDAP mapping. + operationId: enterprise-admin/update-ldap-mapping-for-team + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team + parameters: + - "$ref": "#/components/parameters/team-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/installation" + "$ref": "#/components/schemas/ldap-mapping-team" examples: default: - "$ref": "#/components/examples/base-installation" - '404': - "$ref": "#/components/responses/not_found" - '415': - "$ref": "#/components/responses/preview_header_missing" + "$ref": "#/components/examples/ldap-mapping-team" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + ldap_dn: + type: string + description: The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) + (DN) of the LDAP entry to map to a team. + required: + - ldap_dn + examples: + default: + value: + ldap_dn: cn=Enterprise Ops,ou=teams,dc=github,dc=com x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: - delete: - summary: Delete an installation for the authenticated app - description: |- - 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. + enabledForGitHubApps: false + category: enterprise-admin + subcategory: ldap + "/admin/ldap/teams/{team_id}/sync": + post: + summary: Sync LDAP mapping for a team + description: Note that this API call does not automatically initiate an LDAP + sync. Rather, if a `201` is returned, the sync job is queued successfully, + and is performed when the instance is ready. + operationId: enterprise-admin/sync-ldap-mapping-for-team tags: - - apps - operationId: apps/delete-installation + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#delete-an-installation-for-the-authenticated-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#sync-ldap-mapping-for-a-team parameters: - - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/team-id" responses: - '204': + '201': description: Response - '404': - "$ref": "#/components/responses/not_found" + content: + application/json: + schema: + type: object + properties: + status: + type: string + examples: + default: + value: + status: queued x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: - "/app/installations/{installation_id}/access_tokens": - post: - summary: Create an installation access token for an app - description: |- - 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. + category: enterprise-admin + subcategory: ldap + "/admin/ldap/users/{username}/mapping": + patch: + summary: Update LDAP mapping for a user + description: '' + operationId: enterprise-admin/update-ldap-mapping-for-user tags: - - apps - operationId: apps/create-installation-access-token + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps/#create-an-installation-access-token-for-an-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user parameters: - - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/username" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/ldap-mapping-user" + examples: + default: + "$ref": "#/components/examples/ldap-mapping-user" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - repositories: - description: List of repository names that the token should have - access to - type: array - items: - type: string - example: rails - repository_ids: - description: List of repository IDs that the token should have access - to - example: - - 1 - type: array - items: - type: integer - permissions: - "$ref": "#/components/schemas/app-permissions" + ldap_dn: + type: string + description: The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) + (DN) of the LDAP entry to map to a team. + required: + - ldap_dn + examples: + default: + value: + ldap_dn: uid=asdf,ou=users,dc=github,dc=com + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: ldap + "/admin/ldap/users/{username}/sync": + post: + summary: Sync LDAP mapping for a user + description: Note that this API call does not automatically initiate an LDAP + sync. Rather, if a `201` is returned, the sync job is queued successfully, + and is performed when the instance is ready. + operationId: enterprise-admin/sync-ldap-mapping-for-user + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#sync-ldap-mapping-for-a-user + parameters: + - "$ref": "#/components/parameters/username" responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/installation-token" + type: object + properties: + status: + type: string examples: default: - "$ref": "#/components/examples/installation-token" - '403': - "$ref": "#/components/responses/forbidden" - '415': - "$ref": "#/components/responses/preview_header_missing" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + value: + status: queued x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: - "/app/installations/{installation_id}/suspended": - put: - summary: Suspend an app installation - description: |- - 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. + enabledForGitHubApps: false + category: enterprise-admin + subcategory: ldap + "/admin/organizations": + post: + summary: Create an organization + description: '' + operationId: enterprise-admin/create-org tags: - - apps - operationId: apps/suspend-installation + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#suspend-an-app-installation - parameters: - - "$ref": "#/components/parameters/installation-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-an-organization responses: - '204': + '201': description: Response - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: - delete: - summary: Unsuspend an app installation - description: |- - 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. + content: + application/json: + schema: + "$ref": "#/components/schemas/organization-simple" + examples: + default: + "$ref": "#/components/examples/organization-simple" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + login: + type: string + description: The organization's username. + admin: + type: string + description: The login of the user who will manage this organization. + profile_name: + type: string + description: The organization's display name. + required: + - login + - admin + examples: + default: + value: + login: github + profile_name: GitHub, Inc. + admin: monalisaoctocat + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: orgs + "/admin/organizations/{org}": + patch: + summary: Update an organization name + description: '' + operationId: enterprise-admin/update-org-name tags: - - apps - operationId: apps/unsuspend-installation + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#unsuspend-an-app-installation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-an-organization-name parameters: - - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/org" responses: - '204': + '202': description: Response - '404': - "$ref": "#/components/responses/not_found" + content: + application/json: + schema: + type: object + properties: + message: + type: string + url: + type: string + examples: + default: + value: + message: Job queued to rename organization. It may take a few + minutes to complete. + url: https:///api/v3/organizations/1 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + login: + type: string + description: The organization's new name. + required: + - login + examples: + default: + value: + login: the-new-octocats x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: - "/applications/grants": + category: enterprise-admin + subcategory: orgs + "/admin/pre-receive-environments": get: - summary: List your grants - description: |- - **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"]`. + summary: List pre-receive environments + description: '' + operationId: enterprise-admin/list-pre-receive-environments tags: - - oauth-authorizations - operationId: oauth-authorizations/list-grants + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#list-your-grants + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-pre-receive-environments parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" - - name: client_id + - "$ref": "#/components/parameters/direction" + - name: sort in: query required: false - description: The client ID of your GitHub app. schema: type: string + enum: + - created + - updated + - name + default: created responses: '200': description: Response @@ -749,116 +743,34 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/application-grant" + "$ref": "#/components/schemas/pre-receive-environment" examples: default: - "$ref": "#/components/examples/application-grant-items" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/pre-receive-environment-items" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/applications/grants/{grant_id}": - get: - summary: Get a single grant - description: "**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/)." + category: enterprise-admin + subcategory: pre-receive-environments + post: + summary: Create a pre-receive environment + description: '' + operationId: enterprise-admin/create-pre-receive-environment tags: - - oauth-authorizations - operationId: oauth-authorizations/get-grant + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-grant - parameters: - - "$ref": "#/components/parameters/grant-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-a-pre-receive-environment responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/application-grant" + "$ref": "#/components/schemas/pre-receive-environment" examples: default: - "$ref": "#/components/examples/application-grant" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - delete: - summary: Delete a grant - description: |- - **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). - tags: - - oauth-authorizations - operationId: oauth-authorizations/delete-grant - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#delete-a-grant - parameters: - - "$ref": "#/components/parameters/grant-id" - responses: - '204': - description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/applications/{client_id}/grant": - delete: - summary: Delete an app authorization - description: |- - 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). - operationId: apps/delete-authorization - tags: - - apps - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/apps#delete-an-app-authorization - parameters: - - "$ref": "#/components/parameters/client-id" + "$ref": "#/components/examples/pre-receive-environment" requestBody: required: true content: @@ -866,303 +778,291 @@ paths: schema: type: object properties: - access_token: + name: type: string - description: The OAuth access token used to authenticate to the - GitHub API. + description: The new pre-receive environment's name. + image_url: + type: string + description: URL from which to download a tarball of this environment. required: - - access_token - example: - access_token: e72e16c7e42f292c6912e7710c838347ae178b4a - responses: - '204': - description: Response - '422': - "$ref": "#/components/responses/validation_failed" + - name + - image_url + examples: + default: + value: + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: oauth-applications - "/applications/{client_id}/token": - post: - summary: Check a token - description: 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`. + category: enterprise-admin + subcategory: pre-receive-environments + "/admin/pre-receive-environments/{pre_receive_environment_id}": + get: + summary: Get a pre-receive environment + description: '' + operationId: enterprise-admin/get-pre-receive-environment tags: - - apps - operationId: apps/check-token + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#check-a-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-a-pre-receive-environment parameters: - - "$ref": "#/components/parameters/client-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - access_token: - description: The access_token of the OAuth application. - type: string - required: - - access_token - type: object + - "$ref": "#/components/parameters/pre-receive-environment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + "$ref": "#/components/schemas/pre-receive-environment" examples: default: - "$ref": "#/components/examples/authorization-with-user" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/pre-receive-environment" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: oauth-applications + category: enterprise-admin + subcategory: pre-receive-environments patch: - summary: Reset a token - description: 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`. + summary: Update a pre-receive environment + description: You cannot modify the default environment. If you attempt to modify + the default environment, you will receive a `422 Unprocessable Entity` response. + operationId: enterprise-admin/update-pre-receive-environment tags: - - apps - operationId: apps/reset-token + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#reset-a-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-a-pre-receive-environment parameters: - - "$ref": "#/components/parameters/client-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - access_token: - description: The access_token of the OAuth application. - type: string - required: - - access_token - type: object + - "$ref": "#/components/parameters/pre-receive-environment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + "$ref": "#/components/schemas/pre-receive-environment" examples: - default: - "$ref": "#/components/examples/authorization-with-user" + default-response: + "$ref": "#/components/examples/pre-receive-environment-default-response" '422': - "$ref": "#/components/responses/validation_failed" + description: Client Errors + content: + application/json: + schema: + type: object + properties: + message: + type: string + errors: + type: array + items: + type: object + properties: + resource: + type: string + code: + type: string + message: + type: string + examples: + client-errors: + value: + message: Validation Failed + errors: + - resource: PreReceiveEnvironment + code: custom + message: Cannot modify or delete the default environment + requestBody: + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: This pre-receive environment's new name. + image_url: + type: string + description: URL from which to download a tarball of this environment. x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: oauth-applications + category: enterprise-admin + subcategory: pre-receive-environments delete: - summary: Delete an app token - description: 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. + summary: Delete a pre-receive environment + description: |- + If you attempt to delete an environment that cannot be deleted, you will receive a `422 Unprocessable Entity` response. + + The possible error messages are: + + * _Cannot modify or delete the default environment_ + * _Cannot delete environment that has hooks_ + * _Cannot delete environment when download is in progress_ + operationId: enterprise-admin/delete-pre-receive-environment tags: - - apps - operationId: apps/delete-token + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#delete-an-app-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-pre-receive-environment parameters: - - "$ref": "#/components/parameters/client-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - access_token: - type: string - description: The OAuth access token used to authenticate to the - GitHub API. - required: - - access_token - example: - access_token: e72e16c7e42f292c6912e7710c838347ae178b4a + - "$ref": "#/components/parameters/pre-receive-environment-id" responses: '204': description: Response '422': - "$ref": "#/components/responses/validation_failed" + description: Client Errors + content: + application/json: + schema: + type: object + properties: + message: + type: string + errors: + type: array + items: + type: object + properties: + resource: + type: string + code: + type: string + message: + type: string + examples: + client-errors: + value: + message: Validation Failed + errors: + - resource: PreReceiveEnvironment + code: custom + message: Cannot modify or delete the default environment x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: oauth-applications - "/applications/{client_id}/token/scoped": + category: enterprise-admin + subcategory: pre-receive-environments + "/admin/pre-receive-environments/{pre_receive_environment_id}/downloads": post: - summary: Create a scoped access token - description: Use a non-scoped user-to-server OAuth access token to create a - repository scoped and/or permission scoped user-to-server OAuth access token. - You can specify which repositories the token can access and which permissions - are granted to the token. You must use [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication) - when accessing this endpoint, using the OAuth application's `client_id` and - `client_secret` as the username and password. Invalid tokens will return `404 - NOT FOUND`. + summary: Start a pre-receive environment download + description: |- + Triggers a new download of the environment tarball from the environment's `image_url`. When the download is finished, the newly downloaded tarball will overwrite the existing environment. + + If a download cannot be triggered, you will receive a `422 Unprocessable Entity` response. + + The possible error messages are: + + * _Cannot modify or delete the default environment_ + * _Can not start a new download when a download is in progress_ + operationId: enterprise-admin/start-pre-receive-environment-download tags: - - apps - operationId: apps/scope-token + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#create-a-scoped-access-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-pre-receive-environment-download parameters: - - "$ref": "#/components/parameters/client-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - access_token: - type: string - description: The OAuth access token used to authenticate to the - GitHub API. - example: e72e16c7e42f292c6912e7710c838347ae178b4a - target: - description: The name of the user or organization to scope the user-to-server - access token to. **Required** unless `target_id` is specified. - type: string - example: octocat - target_id: - description: The ID of the user or organization to scope the user-to-server - access token to. **Required** unless `target` is specified. - example: 1 - type: integer - repositories: - description: The list of repository names to scope the user-to-server - access token to. `repositories` may not be specified if `repository_ids` - is specified. - type: array - items: - type: string - example: rails - repository_ids: - description: The list of repository IDs to scope the user-to-server - access token to. `repository_ids` may not be specified if `repositories` - is specified. - example: - - 1 - type: array - items: - type: integer - permissions: - "$ref": "#/components/schemas/app-permissions" - required: - - access_token + - "$ref": "#/components/parameters/pre-receive-environment-id" responses: - '200': + '202': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + "$ref": "#/components/schemas/pre-receive-environment-download-status" examples: - default: - "$ref": "#/components/examples/scope-token" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + default-response: + "$ref": "#/components/examples/pre-receive-environment-download-status-default-response" '422': - "$ref": "#/components/responses/validation_failed" + description: Client Errors + content: + application/json: + schema: + type: object + properties: + message: + type: string + errors: + type: array + items: + type: object + properties: + resource: + type: string + code: + type: string + message: + type: string + examples: + client-errors: + value: + message: Validation Failed + errors: + - resource: PreReceiveEnvironment + code: custom + message: Can not start a new download when a download is in + progress x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: oauth-applications - "/apps/{app_slug}": + category: enterprise-admin + subcategory: pre-receive-environments + "/admin/pre-receive-environments/{pre_receive_environment_id}/downloads/latest": get: - summary: Get an app - description: |- - **Note**: The `:app_slug` is just the URL-friendly name of your GitHub App. You can find this on the settings page for your GitHub App (e.g., `https://github.com/settings/apps/:app_slug`). - - If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. + summary: Get the download status for a pre-receive environment + description: In addition to seeing the download status at the "[Get a pre-receive + environment](#get-a-pre-receive-environment)" endpoint, there is also this + separate endpoint for just the download status. + operationId: enterprise-admin/get-download-status-for-pre-receive-environment tags: - - apps - operationId: apps/get-by-slug + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps/#get-an-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-the-download-status-for-a-pre-receive-environment parameters: - - "$ref": "#/components/parameters/app-slug" + - "$ref": "#/components/parameters/pre-receive-environment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/integration" + "$ref": "#/components/schemas/pre-receive-environment-download-status" examples: default: - "$ref": "#/components/examples/integration" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '415': - "$ref": "#/components/responses/preview_header_missing" + "$ref": "#/components/examples/pre-receive-environment-download-status" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: - "/authorizations": + enabledForGitHubApps: false + category: enterprise-admin + subcategory: pre-receive-environments + "/admin/pre-receive-hooks": get: - summary: List your authorizations - description: "**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/)." + summary: List pre-receive hooks + description: '' + operationId: enterprise-admin/list-pre-receive-hooks tags: - - oauth-authorizations - operationId: oauth-authorizations/list-authorizations + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#list-your-authorizations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-pre-receive-hooks parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" - - name: client_id + - "$ref": "#/components/parameters/direction" + - name: sort + description: The property to sort the results by. in: query required: false - description: The client ID of your GitHub app. schema: type: string + enum: + - created + - updated + - name + default: created responses: '200': description: Response @@ -1171,478 +1071,455 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/authorization" + "$ref": "#/components/schemas/pre-receive-hook" examples: default: - "$ref": "#/components/examples/authorization-items" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/pre-receive-hook-items" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true + category: enterprise-admin + subcategory: pre-receive-hooks post: - summary: Create a new authorization - description: |- - **Deprecation Notice:** GitHub will discontinue the [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations), which is used by integrations to create personal access tokens and OAuth tokens, and you must now create these tokens using our [web application flow](https://docs.github.com/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/rest/reference/oauth-authorizations) will be removed on November, 13, 2020. For more information, including scheduled brownouts, see the [blog post](https://developer.github.com/changes/2020-02-14-deprecating-oauth-auth-endpoint/). - - **Warning:** Apps must use the [web application flow](https://docs.github.com/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - - Creates OAuth tokens using [Basic Authentication](https://docs.github.com/rest/overview/other-authentication-methods#basic-authentication). If you have two-factor authentication setup, Basic Authentication for this endpoint requires that you use a one-time password (OTP) and your username and password instead of tokens. For more information, see "[Working with two-factor authentication](https://docs.github.com/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - - To create tokens for a particular OAuth application using this endpoint, you must authenticate as the user you want to create an authorization for and provide the app's client ID and secret, found on your OAuth application's settings page. If your OAuth application intends to create multiple tokens for one user, use `fingerprint` to differentiate between them. - - You can also create tokens on GitHub from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). - - Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). + summary: Create a pre-receive hook + description: '' + operationId: enterprise-admin/create-pre-receive-hook tags: - - oauth-authorizations - operationId: oauth-authorizations/create-authorization + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#create-a-new-authorization - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-a-pre-receive-hook + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/pre-receive-hook" + examples: + default: + "$ref": "#/components/examples/pre-receive-hook" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - scopes: - description: A list of scopes that this authorization is in. - type: array - items: - type: string - example: - - public_repo - - user - nullable: true - note: - description: A note to remind you what the OAuth token is for. - type: string - example: Update all gems - note_url: - description: A URL to remind you what app the OAuth token is for. - type: string - client_id: - description: The OAuth app client key for which to create the token. - maxLength: 20 + name: type: string - client_secret: - description: The OAuth app client secret for which to create the - token. - maxLength: 40 + description: The name of the hook. + script: type: string - fingerprint: - description: A unique string to distinguish an authorization from - others created for the same client ID and user. + description: The script that the hook runs. + script_repository: + type: object + description: The GitHub repository where the script is kept. + properties: {} + additionalProperties: true + environment: + type: object + description: The pre-receive environment where the script is executed. + properties: {} + additionalProperties: true + enforcement: type: string + description: 'The state of enforcement for this hook. default: `disabled`' + allow_downstream_configuration: + type: boolean + description: 'Whether enforcement can be overridden at the org or + repo level. default: `false`' + required: + - name + - script + - script_repository + - environment + examples: + default: + value: + name: Check Commits + script: scripts/commit_check.sh + enforcement: disabled + allow_downstream_configuration: false + script_repository: + full_name: DevIT/hooks + environment: + id: 2 + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: pre-receive-hooks + "/admin/pre-receive-hooks/{pre_receive_hook_id}": + get: + summary: Get a pre-receive hook + description: '' + operationId: enterprise-admin/get-pre-receive-hook + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-a-pre-receive-hook + parameters: + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + "$ref": "#/components/schemas/pre-receive-hook" examples: default: - "$ref": "#/components/examples/authorization" - headers: - Location: - example: https://api.github.com/authorizations/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '410': - "$ref": "#/components/responses/gone" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/pre-receive-hook" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/authorizations/clients/{client_id}": - put: - summary: Get-or-create an authorization for a specific app - description: |- - **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/). + category: enterprise-admin + subcategory: pre-receive-hooks + patch: + summary: Update a pre-receive hook + description: '' + operationId: enterprise-admin/update-pre-receive-hook tags: - - oauth-authorizations - operationId: oauth-authorizations/get-or-create-authorization-for-app + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-a-pre-receive-hook parameters: - - "$ref": "#/components/parameters/client-id" + - "$ref": "#/components/parameters/pre-receive-hook-id" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/pre-receive-hook" + examples: + default: + "$ref": "#/components/examples/pre-receive-hook-2" requestBody: - required: true content: application/json: schema: + type: object properties: - client_secret: - description: The OAuth app client secret for which to create the - token. - maxLength: 40 - type: string - scopes: - description: A list of scopes that this authorization is in. - type: array - items: - type: string - example: - - public_repo - - user - nullable: true - note: - description: A note to remind you what the OAuth token is for. + name: type: string - example: Update all gems - note_url: - description: A URL to remind you what app the OAuth token is for. + description: The name of the hook. + script: type: string - fingerprint: - description: A unique string to distinguish an authorization from - others created for the same client ID and user. + description: The script that the hook runs. + script_repository: + type: object + description: The GitHub repository where the script is kept. + properties: {} + additionalProperties: true + environment: + type: object + description: The pre-receive environment where the script is executed. + properties: {} + additionalProperties: true + enforcement: type: string - required: - - client_secret - type: object + description: The state of enforcement for this hook. + allow_downstream_configuration: + type: boolean + description: Whether enforcement can be overridden at the org or + repo level. + examples: + default: + value: + name: Check Commits + environment: + id: 1 + allow_downstream_configuration: true + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: pre-receive-hooks + delete: + summary: Delete a pre-receive hook + description: '' + operationId: enterprise-admin/delete-pre-receive-hook + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-pre-receive-hook + parameters: + - "$ref": "#/components/parameters/pre-receive-hook-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: pre-receive-hooks + "/admin/tokens": + get: + summary: List personal access tokens + description: Lists personal access tokens for all users, including admin users. + operationId: enterprise-admin/list-personal-access-tokens + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-personal-access-tokens + parameters: + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - description: if returning an existing token - content: - application/json: - schema: - "$ref": "#/components/schemas/authorization" - examples: - response-if-returning-an-existing-token: - "$ref": "#/components/examples/authorization-response-if-returning-an-existing-token-2" - headers: - Location: - example: https://api.github.com/authorizations/1 - schema: - type: string - '201': - description: "**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/)." + description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + type: array + items: + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/authorization" + "$ref": "#/components/examples/authorization-items" headers: - Location: - example: https://api.github.com/authorizations/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/authorizations/clients/{client_id}/{fingerprint}": - put: - summary: Get-or-create an authorization for a specific app and fingerprint + category: enterprise-admin + subcategory: users + "/admin/tokens/{token_id}": + delete: + summary: Delete a personal access token + description: Deletes a personal access token. Returns a `403 - Forbidden` status + when a personal access token is in use. For example, if you access this endpoint + with the same personal access token that you are trying to delete, you will + receive this error. + operationId: enterprise-admin/delete-personal-access-token + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-personal-access-token + parameters: + - "$ref": "#/components/parameters/token-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users + "/admin/users": + post: + summary: Create a user description: |- - **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). + If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also [update the LDAP mapping](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-user) for the user. - 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. + The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send `"octo_cat"` as the login, a user named `"octo-cat"` will be created. - 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)." + If the login name or email address is already associated with an account, the server will return a `422` response. + operationId: enterprise-admin/create-user tags: - - oauth-authorizations - operationId: oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint - parameters: - - "$ref": "#/components/parameters/client-id" - - name: fingerprint - in: path - required: true - schema: - type: string + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-a-user + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/simple-user" + examples: + default: + "$ref": "#/components/examples/simple-user" requestBody: required: true content: application/json: schema: + type: object properties: - client_secret: - description: The OAuth app client secret for which to create the - token. - maxLength: 40 - type: string - scopes: - description: A list of scopes that this authorization is in. - type: array - items: - type: string - example: - - public_repo - - user - nullable: true - note: - description: A note to remind you what the OAuth token is for. + login: type: string - example: Update all gems - note_url: - description: A URL to remind you what app the OAuth token is for. + description: The user's username. + email: type: string + description: |- + **Required for built-in authentication.** The user's email + address. This parameter can be omitted when using CAS, LDAP, or SAML. + For more information, see "[About authentication for your enterprise](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise)." required: - - client_secret - type: object - responses: - '200': - description: if returning an existing token - content: - application/json: - schema: - "$ref": "#/components/schemas/authorization" - examples: - response-if-returning-an-existing-token: - "$ref": "#/components/examples/authorization-response-if-returning-an-existing-token" - headers: - Location: - example: https://api.github.com/authorizations/1 - schema: - type: string - '201': - description: Response if returning a new token - content: - application/json: - schema: - "$ref": "#/components/schemas/authorization" - examples: - default: - "$ref": "#/components/examples/authorization-3" - headers: - Location: - example: https://api.github.com/authorizations/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" + - login + examples: + default: + value: + login: monalisa + email: octocat@github.com x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/authorizations/{authorization_id}": - get: - summary: Get a single authorization - description: "**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/)." + category: enterprise-admin + subcategory: users + "/admin/users/{username}": + patch: + summary: Update the username for a user + description: '' + operationId: enterprise-admin/update-username-for-user tags: - - oauth-authorizations - operationId: oauth-authorizations/get-authorization + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#get-a-single-authorization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-the-username-for-a-user parameters: - - "$ref": "#/components/parameters/authorization-id" + - "$ref": "#/components/parameters/username" responses: - '200': + '202': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authorization" + type: object + properties: + message: + type: string + url: + type: string examples: default: - "$ref": "#/components/examples/authorization-2" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + value: + message: Job queued to rename user. It may take a few minutes + to complete. + url: https://api.github.com/user/1 + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + login: + type: string + description: The user's new username. + required: + - login + examples: + default: + value: + login: thenewmonalisa x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - patch: - summary: Update an existing authorization + category: enterprise-admin + subcategory: users + delete: + summary: Delete a user description: |- - **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 a user will delete all their repositories, gists, applications, and personal settings. [Suspending a user](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user) is often a better option. - 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. + You can delete any user account except your own. + operationId: enterprise-admin/delete-user tags: - - oauth-authorizations - operationId: oauth-authorizations/update-authorization + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#update-an-existing-authorization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-user parameters: - - "$ref": "#/components/parameters/authorization-id" + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users + "/admin/users/{username}/authorizations": + post: + summary: Create an impersonation OAuth token + description: '' + operationId: enterprise-admin/create-impersonation-o-auth-token + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-an-impersonation-oauth-token + parameters: + - "$ref": "#/components/parameters/username" + responses: + '201': + description: Response when creating a new impersonation OAuth token + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/authorization" + '200': + description: Response when getting an existing impersonation OAuth token + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/authorization" requestBody: - required: false + required: true content: application/json: schema: type: object properties: scopes: - description: A list of scopes that this authorization is in. - type: array - items: - type: string - example: - - public_repo - - user - nullable: true - add_scopes: - description: A list of scopes to add to this authorization. type: array + description: A list of [scopes](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). items: type: string - remove_scopes: - description: A list of scopes to remove from this authorization. - type: array - items: - type: string - note: - description: A note to remind you what the OAuth token is for. - type: string - example: Update all gems - note_url: - description: A URL to remind you what app the OAuth token is for. - type: string - fingerprint: - description: A unique string to distinguish an authorization from - others created for the same client ID and user. - type: string - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/authorization" - examples: - default: - "$ref": "#/components/examples/authorization-2" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true + category: enterprise-admin + subcategory: users delete: - summary: Delete an authorization - description: "**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/)." + summary: Delete an impersonation OAuth token + description: '' + operationId: enterprise-admin/delete-impersonation-o-auth-token tags: - - oauth-authorizations - operationId: oauth-authorizations/delete-authorization + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/oauth-authorizations#delete-an-authorization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-an-impersonation-oauth-token parameters: - - "$ref": "#/components/parameters/authorization-id" + - "$ref": "#/components/parameters/username" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - removalDate: '2020-11-13' - deprecationDate: '2020-02-14' - category: oauth-authorizations - subcategory: - deprecated: true - "/codes_of_conduct": + category: enterprise-admin + subcategory: users + "/app": get: - summary: Get all codes of conduct - description: '' + summary: Get the authenticated app + description: |- + 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/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app)" endpoint. + + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - codes-of-conduct - operationId: codes-of-conduct/get-all-codes-of-conduct + - apps + operationId: apps/get-authenticated externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codes-of-conduct#get-all-codes-of-conduct + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-the-authenticated-app parameters: [] responses: '200': @@ -1650,128 +1527,111 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/code-of-conduct" + "$ref": "#/components/schemas/integration" examples: default: - "$ref": "#/components/examples/code-of-conduct-simple-items" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/integration" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: codes-of-conduct - subcategory: - "/codes_of_conduct/{key}": - get: - summary: Get a code of conduct - description: '' + category: apps + subcategory: + "/app-manifests/{code}/conversions": + post: + summary: Create a GitHub App from a manifest + description: Use this endpoint to complete the handshake necessary when implementing + the [GitHub App Manifest flow](https://docs.github.com/enterprise-server@3.6/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`. tags: - - codes-of-conduct - operationId: codes-of-conduct/get-conduct-code + - apps + operationId: apps/create-from-manifest externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codes-of-conduct#get-a-code-of-conduct + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#create-a-github-app-from-a-manifest parameters: - - name: key + - name: code in: path required: true schema: type: string responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/code-of-conduct" - examples: + allOf: + - "$ref": "#/components/schemas/integration" + - type: object + properties: + client_id: + type: string + client_secret: + type: string + webhook_secret: + type: string + nullable: true + pem: + type: string + required: + - client_id + - client_secret + - webhook_secret + - pem + additionalProperties: true + examples: default: - "$ref": "#/components/examples/code-of-conduct" + "$ref": "#/components/examples/integration-from-manifest" '404': "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: codes-of-conduct - subcategory: - "/emojis": - get: - summary: Get emojis - description: Lists all the emojis available to use on GitHub. - operationId: emojis/get - tags: - - emojis - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/emojis#get-emojis - parameters: [] - responses: - '200': - content: - application/json: - schema: - type: object - additionalProperties: - type: string - description: Response - '304': - "$ref": "#/components/responses/not_modified" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: emojis - subcategory: - "/enterprises/{enterprise}/actions/permissions": + enabledForGitHubApps: false + category: apps + subcategory: + "/app/hook/config": get: - summary: Get GitHub Actions permissions for an enterprise + summary: Get a webhook configuration for an app description: |- - Gets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/get-github-actions-permissions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/get-webhook-config-for-app externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-github-actions-permissions-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-a-webhook-configuration-for-an-app responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-enterprise-permissions" + "$ref": "#/components/schemas/webhook-config" examples: default: - "$ref": "#/components/examples/actions-enterprise-permissions" + "$ref": "#/components/examples/webhook-config" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - put: - summary: Set GitHub Actions permissions for an enterprise + enabledForGitHubApps: false + category: apps + subcategory: webhooks + patch: + summary: Update a webhook configuration for an app description: |- - Sets the GitHub Actions permissions policy for organizations and allowed actions in an enterprise. + 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 authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/set-github-actions-permissions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/update-webhook-config-for-app externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-github-actions-permissions-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - responses: - '204': - description: Response + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#update-a-webhook-configuration-for-an-app requestBody: required: true content: @@ -1779,766 +1639,814 @@ paths: schema: type: object properties: - enabled_organizations: - "$ref": "#/components/schemas/enabled-organizations" - allowed_actions: - "$ref": "#/components/schemas/allowed-actions" - required: - - enabled_organizations - example: - enabled_organizations: all - allowed_actions: selected + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + examples: + default: + value: + content_type: json + insecure_ssl: '0' + secret: "********" + url: https://example.com/webhook + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-config" + examples: + default: + "$ref": "#/components/examples/webhook-config" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/permissions/organizations": + enabledForGitHubApps: false + category: apps + subcategory: webhooks + "/app/hook/deliveries": get: - summary: List selected organizations enabled for GitHub Actions in an enterprise + summary: List deliveries for an app webhook description: |- - 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)." + Returns a list of webhook deliveries for the webhook configured for a GitHub App. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/list-webhook-deliveries externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-selected-organizations-enabled-for-github-actions-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#list-deliveries-for-an-app-webhook parameters: - - "$ref": "#/components/parameters/enterprise" - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/cursor" responses: '200': description: Response content: application/json: schema: - type: object - properties: - total_count: - type: number - organizations: - type: array - items: - "$ref": "#/components/schemas/organization-simple" - required: - - total_count - - organizations + type: array + items: + "$ref": "#/components/schemas/hook-delivery-item" examples: default: - "$ref": "#/components/examples/organization-targets" + "$ref": "#/components/examples/hook-delivery-items" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - put: - summary: Set selected organizations enabled for GitHub Actions in an enterprise + enabledForGitHubApps: false + category: apps + subcategory: webhooks + "/app/hook/deliveries/{delivery_id}": + get: + summary: Get a delivery for an app webhook description: |- - 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)." + Returns a delivery for the webhook configured for a GitHub App. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/get-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-selected-organizations-enabled-for-github-actions-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-a-delivery-for-an-app-webhook parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/delivery-id" responses: - '204': + '200': description: Response - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - selected_organization_ids: - description: List of organization IDs to enable for GitHub Actions. - type: array - items: - type: integer - description: Unique identifier of the organization. - required: - - selected_organization_ids - example: - selected_organization_ids: - - 32 - - 91 + content: + application/json: + schema: + "$ref": "#/components/schemas/hook-delivery" + examples: + default: + "$ref": "#/components/examples/hook-delivery" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": - put: - summary: Enable a selected organization for GitHub Actions in an enterprise + enabledForGitHubApps: false + category: apps + subcategory: webhooks + "/app/hook/deliveries/{delivery_id}/attempts": + post: + summary: Redeliver a delivery for an app webhook description: |- - 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)." + Redeliver a delivery for the webhook configured for a GitHub App. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/enable-selected-organization-github-actions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/redeliver-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#enable-a-selected-organization-for-github-actions-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#redeliver-a-delivery-for-an-app-webhook parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/org-id" + - "$ref": "#/components/parameters/delivery-id" responses: - '204': - description: Response + '202': + "$ref": "#/components/responses/accepted" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - delete: - summary: Disable a selected organization for GitHub Actions in an enterprise + enabledForGitHubApps: false + category: apps + subcategory: webhooks + "/app/installations": + get: + summary: List installations for the authenticated app description: |- - 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 use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/disable-selected-organization-github-actions-enterprise + The permissions the installation has are included under the `permissions` key. tags: - - enterprise-admin + - apps + operationId: apps/list-installations externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#disable-a-selected-organization-for-github-actions-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#list-installations-for-the-authenticated-app parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/org-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/since" + - name: outdated + in: query + required: false + schema: + type: string responses: - '204': - description: Response + '200': + description: The permissions the installation has are included under the + `permissions` key. + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/installation" + examples: + default: + "$ref": "#/components/examples/base-installation-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/permissions/selected-actions": + enabledForGitHubApps: true + category: apps + subcategory: + "/app/installations/{installation_id}": get: - summary: Get allowed actions for an enterprise + summary: Get an installation for the authenticated app description: |- - 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)." + Enables an authenticated GitHub App to find an installation's information using the installation id. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/get-allowed-actions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/get-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-allowed-actions-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-an-installation-for-the-authenticated-app parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/installation-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/selected-actions" + "$ref": "#/components/schemas/installation" examples: default: - "$ref": "#/components/examples/selected-actions" + "$ref": "#/components/examples/base-installation" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - put: - summary: Set allowed actions for an enterprise + enabledForGitHubApps: true + category: apps + subcategory: + delete: + summary: Delete an installation for the authenticated app description: |- - 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)." + 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/enterprise-server@3.6/rest/reference/apps/#suspend-an-app-installation)" endpoint. - You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. - operationId: enterprise-admin/set-allowed-actions-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/delete-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-allowed-actions-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#delete-an-installation-for-the-authenticated-app parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/installation-id" responses: '204': description: Response - requestBody: - required: true - content: - application/json: - schema: - "$ref": "#/components/schemas/selected-actions" - examples: - selected_actions: - "$ref": "#/components/examples/selected-actions" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups": - get: - summary: List self-hosted runner groups for an enterprise - description: |- - Lists all self-hosted runner groups for an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-self-hosted-runner-groups-for-enterprise - tags: - - enterprise-admin - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runner-groups-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: object - properties: - total_count: - type: number - runner_groups: - type: array - items: - "$ref": "#/components/schemas/runner-groups-enterprise" - required: - - total_count - - runner_groups - examples: - default: - "$ref": "#/components/examples/runner-groups-enterprise" - x-github: enabledForGitHubApps: false - githubCloudOnly: false - category: enterprise-admin - subcategory: actions + category: apps + subcategory: + "/app/installations/{installation_id}/access_tokens": post: - summary: Create a self-hosted runner group for an enterprise + summary: Create an installation access token for an app description: |- - Creates a new self-hosted runner group for an enterprise. + 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 authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/create-self-hosted-runner-group-for-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/create-installation-access-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#create-self-hosted-runner-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps/#create-an-installation-access-token-for-an-app parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/installation-id" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - name: - description: Name of the runner group. - type: string - visibility: - description: 'Visibility of a runner group. You can select all organizations - or select individual organization. Can be one of: `all` or `selected`' - type: string - enum: - - selected - - all - selected_organization_ids: - description: List of organization IDs that can access the runner - group. + repositories: + description: List of repository names that the token should have + access to type: array items: - type: integer - description: Unique identifier of the organization. - runners: - description: List of runner IDs to add to the runner group. + type: string + example: rails + repository_ids: + description: List of repository IDs that the token should have access + to + example: + - 1 type: array items: type: integer - description: Unique identifier of the runner. - allows_public_repositories: - description: Whether the runner group can be used by `public` repositories. - type: boolean - default: false - required: - - name - example: - name: Expensive hardware runners - visibility: selected - selected_organization_ids: - - 32 - - 91 - runners: - - 9 - - 2 + permissions: + "$ref": "#/components/schemas/app-permissions" + examples: + default: + value: + repository: Hello-World + permissions: + issues: write + contents: read responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/runner-groups-enterprise" + "$ref": "#/components/schemas/installation-token" examples: default: - "$ref": "#/components/examples/runner-group-enterprise" + "$ref": "#/components/examples/installation-token" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": - get: - summary: Get a self-hosted runner group for an enterprise + enabledForGitHubApps: true + category: apps + subcategory: + "/app/installations/{installation_id}/suspended": + put: + summary: Suspend an app installation description: |- - Gets a specific self-hosted runner group for an enterprise. + 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 Enterprise Server API or webhook events is blocked for that account. - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/get-self-hosted-runner-group-for-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/suspend-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#suspend-an-app-installation parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/installation-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/runner-groups-enterprise" - examples: - default: - "$ref": "#/components/examples/runner-group-enterprise" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - patch: - summary: Update a self-hosted runner group for an enterprise + enabledForGitHubApps: false + category: apps + subcategory: + delete: + summary: Unsuspend an app installation description: |- - Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + Removes a GitHub App installation suspension. - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/update-self-hosted-runner-group-for-enterprise + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/unsuspend-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#update-a-self-hosted-runner-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#unsuspend-an-app-installation parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - name: - description: Name of the runner group. - type: string - visibility: - description: 'Visibility of a runner group. You can select all organizations - or select individual organizations. Can be one of: `all` or `selected`' - type: string - enum: - - selected - - all - default: all - allows_public_repositories: - description: Whether the runner group can be used by `public` repositories. - type: boolean - default: false - example: - name: Expensive hardware runners - visibility: selected + - "$ref": "#/components/parameters/installation-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/runner-groups-enterprise" - examples: - default: - "$ref": "#/components/examples/runner-group-update-enterprise" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - delete: - summary: Delete a self-hosted runner group from an enterprise - description: |- - Deletes a self-hosted runner group for an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/delete-self-hosted-runner-group-from-enterprise - tags: - - enterprise-admin - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#delete-a-self-hosted-runner-group-from-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - responses: - '204': - description: Response - x-github: enabledForGitHubApps: false - githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": + category: apps + subcategory: + "/applications/grants": get: - summary: List organization access to a self-hosted runner group in an enterprise + summary: List your grants description: |- - Lists the organizations with access to a self-hosted runner group. + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise + 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/enterprise-server@3.6/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"]`. tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/list-grants externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#list-your-grants parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - name: client_id + in: query + required: false + description: The client ID of your GitHub app. + schema: + type: string responses: '200': description: Response content: application/json: schema: - type: object - properties: - total_count: - type: number - organizations: - type: array - items: - "$ref": "#/components/schemas/organization-simple" - required: - - total_count - - organizations + type: array + items: + "$ref": "#/components/schemas/application-grant" examples: default: - "$ref": "#/components/examples/organization-targets" + "$ref": "#/components/examples/application-grant-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - put: - summary: Set organization access for a self-hosted runner group in an enterprise - description: |- - Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/applications/grants/{grant_id}": + get: + summary: Get a single grant + description: "**Deprecation Notice:** GitHub Enterprise Server will discontinue + the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). + The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/)." tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/get-grant externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#get-a-single-grant parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - selected_organization_ids: - description: List of organization IDs that can access the runner - group. - type: array - items: - type: integer - description: Unique identifier of the organization. - required: - - selected_organization_ids - example: - selected_organization_ids: - - 32 - - 91 + - "$ref": "#/components/parameters/grant-id" responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/application-grant" + examples: + default: + "$ref": "#/components/examples/application-grant" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": - put: - summary: Add organization access to a self-hosted runner group in an enterprise + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + delete: + summary: Delete a grant description: |- - 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)." + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise + 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). tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/delete-grant externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#delete-a-grant parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/org-id" + - "$ref": "#/components/parameters/grant-id" responses: '204': description: Response + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/applications/{client_id}/grant": delete: - summary: Remove organization access to a self-hosted runner group in an enterprise + summary: Delete an app authorization description: |- - Removes an organization from the list of selected organizations that can access a self-hosted runner group. The runner group must have `visibility` set to `selected`. For more information, see "[Create a self-hosted runner group for an enterprise](#create-a-self-hosted-runner-group-for-an-enterprise)." - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise + OAuth application owners can revoke a grant for their OAuth application and a specific user. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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). + operationId: apps/delete-authorization tags: - - enterprise-admin + - apps externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#delete-an-app-authorization parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/org-id" + - "$ref": "#/components/parameters/client-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + access_token: + type: string + description: The OAuth access token used to authenticate to the + GitHub API. + required: + - access_token + examples: + default: + value: + access_token: e72e16c7e42f292c6912e7710c838347ae178b4a responses: '204': description: Response + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": - get: - summary: List self-hosted runners in a group for an enterprise - description: |- - Lists the self-hosted runners that are in a specific enterprise group. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-self-hosted-runners-in-group-for-enterprise + enabledForGitHubApps: false + category: apps + subcategory: oauth-applications + "/applications/{client_id}/token": + post: + summary: Check a token + description: 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/enterprise-server@3.6/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`. tags: - - enterprise-admin + - apps + operationId: apps/check-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-in-a-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#check-a-token parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/client-id" + requestBody: + required: true + content: + application/json: + schema: + properties: + access_token: + description: The access_token of the OAuth application. + type: string + required: + - access_token + type: object + examples: + default: + value: + access_token: e72e16c7e42f292c6912e7710c838347ae178b4a responses: '200': description: Response content: application/json: schema: - type: object - properties: - total_count: - type: number - runners: - type: array - items: - "$ref": "#/components/schemas/runner" - required: - - total_count - - runners + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/runner-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/authorization-with-user" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - put: - summary: Set self-hosted runners in a group for an enterprise - description: |- - Replaces the list of self-hosted runners that are part of an enterprise runner group. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/set-self-hosted-runners-in-group-for-enterprise + enabledForGitHubApps: false + category: apps + subcategory: oauth-applications + patch: + summary: Reset a token + description: 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/enterprise-server@3.6/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`. tags: - - enterprise-admin + - apps + operationId: apps/reset-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-self-hosted-runners-in-a-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#reset-a-token parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/client-id" requestBody: required: true content: application/json: schema: - type: object properties: - runners: - description: List of runner IDs to add to the runner group. - type: array - items: - type: integer - description: Unique identifier of the runner. + access_token: + description: The access_token of the OAuth application. + type: string required: - - runners - example: - runners: - - 9 - - 2 + - access_token + type: object + examples: + default: + value: + access_token: e72e16c7e42f292c6912e7710c838347ae178b4a responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/authorization-with-user" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": - put: - summary: Add a self-hosted runner to a group for an enterprise - description: |- - Adds a self-hosted runner to a runner group configured in an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` - scope to use this endpoint. - operationId: enterprise-admin/add-self-hosted-runner-to-group-for-enterprise + enabledForGitHubApps: false + category: apps + subcategory: oauth-applications + delete: + summary: Delete an app token + description: OAuth application owners can revoke a single token for an OAuth + application. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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. tags: - - enterprise-admin + - apps + operationId: apps/delete-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#add-a-self-hosted-runner-to-a-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#delete-an-app-token parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/client-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + access_token: + type: string + description: The OAuth access token used to authenticate to the + GitHub API. + required: + - access_token + examples: + default: + value: + access_token: e72e16c7e42f292c6912e7710c838347ae178b4a responses: '204': description: Response + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - delete: - summary: Remove a self-hosted runner from a group for an enterprise - description: |- - Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise + enabledForGitHubApps: false + category: apps + subcategory: oauth-applications + "/applications/{client_id}/token/scoped": + post: + summary: Create a scoped access token + description: Use a non-scoped user-to-server OAuth access token to create a + repository scoped and/or permission scoped user-to-server OAuth access token. + You can specify which repositories the token can access and which permissions + are granted to the token. You must use [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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`. tags: - - enterprise-admin + - apps + operationId: apps/scope-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#remove-a-self-hosted-runner-from-a-group-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#create-a-scoped-access-token parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/client-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + access_token: + type: string + description: The OAuth access token used to authenticate to the + GitHub API. + example: e72e16c7e42f292c6912e7710c838347ae178b4a + target: + description: The name of the user or organization to scope the user-to-server + access token to. **Required** unless `target_id` is specified. + type: string + example: octocat + target_id: + description: The ID of the user or organization to scope the user-to-server + access token to. **Required** unless `target` is specified. + example: 1 + type: integer + repositories: + description: The list of repository names to scope the user-to-server + access token to. `repositories` may not be specified if `repository_ids` + is specified. + type: array + items: + type: string + example: rails + repository_ids: + description: The list of repository IDs to scope the user-to-server + access token to. `repository_ids` may not be specified if `repositories` + is specified. + example: + - 1 + type: array + items: + type: integer + permissions: + "$ref": "#/components/schemas/app-permissions" + required: + - access_token + examples: + default: + value: + access_token: e72e16c7e42f292c6912e7710c838347ae178b4a + target: octocat + permissions: + metadata: read + issues: write + contents: read responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/scope-token" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners": + enabledForGitHubApps: false + category: apps + subcategory: oauth-applications + "/apps/{app_slug}": get: - summary: List self-hosted runners for an enterprise + summary: Get an app description: |- - Lists all self-hosted runners configured for an enterprise. + **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`). - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-self-hosted-runners-for-enterprise + If the GitHub App you specify is public, you can access this endpoint without authenticating. If the GitHub App you specify is private, you must authenticate with a [personal access token](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line/) or an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. tags: - - enterprise-admin + - apps + operationId: apps/get-by-slug externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-self-hosted-runners-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps/#get-an-app parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/app-slug" responses: '200': description: Response content: application/json: schema: - type: object - properties: - total_count: - type: number - runners: - type: array - items: - "$ref": "#/components/schemas/runner" + "$ref": "#/components/schemas/integration" examples: default: - "$ref": "#/components/examples/runner-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/integration" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/downloads": + enabledForGitHubApps: true + category: apps + subcategory: + "/authorizations": get: - summary: List runner applications for an enterprise - description: |- - Lists binaries for the runner application that you can download and run. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/list-runner-applications-for-enterprise + summary: List your authorizations + description: "**Deprecation Notice:** GitHub Enterprise Server will discontinue + the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). + The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/)." tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/list-authorizations externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-runner-applications-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#list-your-authorizations parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - name: client_id + in: query + required: false + description: The client ID of your GitHub app. + schema: + type: string responses: '200': description: Response @@ -2547,1195 +2455,1106 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/runner-application" + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/runner-application-items" + "$ref": "#/components/examples/authorization-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/registration-token": + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true post: - summary: Create a registration token for an enterprise + summary: Create a new authorization description: |- - Returns a token that you can pass to the `config` script. The token expires after one hour. + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - #### Example using registration token + Creates OAuth tokens using [Basic Authentication](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + 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. - ``` - ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN - ``` - operationId: enterprise-admin/create-registration-token-for-enterprise + You can also create tokens on GitHub Enterprise Server from the [personal access tokens settings](https://github.com/settings/tokens) page. Read more about these tokens in [the GitHub Help documentation](https://docs.github.com/articles/creating-an-access-token-for-command-line-use). + + Organizations that enforce SAML SSO require personal access tokens to be allowed. Read more about allowing tokens in [the GitHub Help documentation](https://docs.github.com/articles/about-identity-and-access-management-with-saml-single-sign-on). tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/create-authorization externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#create-a-registration-token-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#create-a-new-authorization + parameters: [] + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + scopes: + description: A list of scopes that this authorization is in. + type: array + items: + type: string + example: + - public_repo + - user + nullable: true + note: + description: A note to remind you what the OAuth token is for. + type: string + example: Update all gems + note_url: + description: A URL to remind you what app the OAuth token is for. + type: string + client_id: + description: The OAuth app client key for which to create the token. + maxLength: 20 + type: string + client_secret: + description: The OAuth app client secret for which to create the + token. + maxLength: 40 + type: string + fingerprint: + description: A unique string to distinguish an authorization from + others created for the same client ID and user. + type: string + examples: + default: + summary: Create an authorization + value: + scopes: + - public_repo + note: optional note + note_url: http://optional/note/url + client_id: abcde12345fghij67890 + client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/authentication-token" + "$ref": "#/components/examples/authorization" + headers: + Location: + example: https://api.github.com/authorizations/1 + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" + '410': + "$ref": "#/components/responses/gone" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/remove-token": - post: - summary: Create a remove token for an enterprise + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/authorizations/clients/{client_id}": + put: + summary: Get-or-create an authorization for a specific app description: |- - 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. + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server SAML organizations. For more information, see the [blog post](https://developer.github.com/changes/2019-11-05-deprecated-passwords-and-authorizations-api). - #### Example using remove token + 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. - To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this - 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." - ``` - ./config.sh remove --token TOKEN - ``` - operationId: enterprise-admin/create-remove-token-for-enterprise + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/). tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/get-or-create-authorization-for-app externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#create-a-remove-token-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app parameters: - - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/oauth-client-id" + requestBody: + required: true + content: + application/json: + schema: + properties: + client_secret: + description: The OAuth app client secret for which to create the + token. + maxLength: 40 + type: string + scopes: + description: A list of scopes that this authorization is in. + type: array + items: + type: string + example: + - public_repo + - user + nullable: true + note: + description: A note to remind you what the OAuth token is for. + type: string + example: Update all gems + note_url: + description: A URL to remind you what app the OAuth token is for. + type: string + fingerprint: + description: A unique string to distinguish an authorization from + others created for the same client ID and user. + type: string + required: + - client_secret + type: object + examples: + default: + summary: Create an authorization for an app + value: + client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f + scopes: + - public_repo + note: optional note + note_url: http://optional/note/url responses: + '200': + description: if returning an existing token + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + response-if-returning-an-existing-token: + "$ref": "#/components/examples/authorization-response-if-returning-an-existing-token-2" + headers: + Location: + example: https://api.github.com/authorizations/1 + schema: + type: string '201': - description: Response + description: "**Deprecation Notice:** GitHub will discontinue the [OAuth + Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). + The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/)." content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/authentication-token-2" + "$ref": "#/components/examples/authorization" + headers: + Location: + example: https://api.github.com/authorizations/1 + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/{runner_id}": - get: - summary: Get a self-hosted runner for an enterprise + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/authorizations/clients/{client_id}/{fingerprint}": + put: + summary: Get-or-create an authorization for a specific app and fingerprint description: |- - Gets a specific self-hosted runner configured in an enterprise. + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/get-self-hosted-runner-for-enterprise + **Warning:** Apps must use the [web application flow](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to obtain OAuth tokens that work with GitHub Enterprise Server SAML organizations. OAuth tokens created using the Authorizations API will be unable to access GitHub Enterprise Server 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." tags: - - enterprise-admin + - oauth-authorizations + operationId: oauth-authorizations/get-or-create-authorization-for-app-and-fingerprint externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-a-self-hosted-runner-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#get-or-create-an-authorization-for-a-specific-app-and-fingerprint parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/oauth-client-id" + - name: fingerprint + in: path + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + properties: + client_secret: + description: The OAuth app client secret for which to create the + token. + maxLength: 40 + type: string + scopes: + description: A list of scopes that this authorization is in. + type: array + items: + type: string + example: + - public_repo + - user + nullable: true + note: + description: A note to remind you what the OAuth token is for. + type: string + example: Update all gems + note_url: + description: A URL to remind you what app the OAuth token is for. + type: string + required: + - client_secret + type: object + examples: + default: + summary: Create an authorization for an app and fingerprint + value: + client_secret: 3ef4ad510c59ad37bac6bb4f80047fb3aee3cc7f + scopes: + - public_repo + note: optional note + note_url: http://optional/note/url responses: '200': - description: Response + description: if returning an existing token content: application/json: schema: - "$ref": "#/components/schemas/runner" + "$ref": "#/components/schemas/authorization" + examples: + response-if-returning-an-existing-token: + "$ref": "#/components/examples/authorization-response-if-returning-an-existing-token" + headers: + Location: + example: https://api.github.com/authorizations/1 + schema: + type: string + '201': + description: Response if returning a new token + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" examples: default: - "$ref": "#/components/examples/runner" + "$ref": "#/components/examples/authorization-3" + headers: + Location: + example: https://api.github.com/authorizations/1 + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - delete: - summary: Delete a self-hosted runner from an enterprise - description: |- - Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. - operationId: enterprise-admin/delete-self-hosted-runner-from-enterprise - tags: - - enterprise-admin - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#delete-self-hosted-runner-from-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" - responses: - '204': - description: Response - x-github: enabledForGitHubApps: false - githubCloudOnly: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/authorizations/{authorization_id}": get: - summary: List labels for a self-hosted runner for an enterprise - description: |- - Lists all labels for a self-hosted runner configured in an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + summary: Get a single authorization + description: "**Deprecation Notice:** GitHub Enterprise Server will discontinue + the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). + The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/)." tags: - - enterprise-admin - operationId: enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise + - oauth-authorizations + operationId: oauth-authorizations/get-authorization externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-labels-for-a-self-hosted-runner-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#get-a-single-authorization parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/authorization-id" responses: '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/authorization-2" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: false githubCloudOnly: false - category: enterprise-admin - subcategory: actions - post: - summary: Add custom labels to a self-hosted runner for an enterprise + enabledForGitHubApps: false + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + patch: + summary: Update an existing authorization description: |- - Add custom labels to a self-hosted runner configured in an enterprise. + **Deprecation Notice:** GitHub Enterprise Server will discontinue the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/developers/apps/authorizing-oauth-apps#web-application-flow). The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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 must authenticate using an access token with the `manage_runners:enterprise` scope to use this 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/enterprise-server@3.6/rest/overview/other-authentication-methods#working-with-two-factor-authentication)." + + You can only send one of these scope keys at a time. tags: - - enterprise-admin - operationId: enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise + - oauth-authorizations + operationId: oauth-authorizations/update-authorization externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#update-an-existing-authorization parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/authorization-id" requestBody: - required: true + required: false content: application/json: schema: type: object - required: - - labels properties: - labels: + scopes: + description: A list of scopes that this authorization is in. type: array - minItems: 1 - maxItems: 100 - description: The names of the custom labels to add to the runner. items: type: string - example: - labels: - - gpu - - accelerated + example: + - public_repo + - user + nullable: true + add_scopes: + description: A list of scopes to add to this authorization. + type: array + items: + type: string + remove_scopes: + description: A list of scopes to remove from this authorization. + type: array + items: + type: string + note: + description: A note to remind you what the OAuth token is for. + type: string + example: Update all gems + note_url: + description: A URL to remind you what app the OAuth token is for. + type: string + fingerprint: + description: A unique string to distinguish an authorization from + others created for the same client ID and user. + type: string responses: '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authorization" + examples: + default: + "$ref": "#/components/examples/authorization-2" '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: enterprise-admin - subcategory: actions - put: - summary: Set custom labels for a self-hosted runner for an enterprise - description: |- - Remove all previous custom labels and set the new custom labels for a specific - self-hosted runner configured in an enterprise. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + delete: + summary: Delete an authorization + description: "**Deprecation Notice:** GitHub Enterprise Server will discontinue + the [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow). + The [OAuth Authorizations API](https://docs.github.com/enterprise-server@3.6/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/)." tags: - - enterprise-admin - operationId: enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise + - oauth-authorizations + operationId: oauth-authorizations/delete-authorization externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/oauth-authorizations#delete-an-authorization parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - labels - properties: - labels: - type: array - minItems: 0 - maxItems: 100 - description: The names of the custom labels to set for the runner. - You can pass an empty array to remove all custom labels. - items: - type: string - example: - labels: - - gpu - - accelerated + - "$ref": "#/components/parameters/authorization-id" responses: - '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + '204': + description: Response + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: enterprise-admin - subcategory: actions - delete: - summary: Remove all custom labels from a self-hosted runner for an enterprise - description: |- - Remove all custom labels from a self-hosted runner configured in an - enterprise. Returns the remaining read-only labels from the runner. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + removalDate: '2020-11-13' + deprecationDate: '2020-02-14' + category: oauth-authorizations + subcategory: + deprecated: true + "/codes_of_conduct": + get: + summary: Get all codes of conduct + description: '' tags: - - enterprise-admin - operationId: enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise + - codes-of-conduct + operationId: codes-of-conduct/get-all-codes-of-conduct externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/codes-of-conduct#get-all-codes-of-conduct + parameters: [] responses: '200': - "$ref": "#/components/responses/actions_runner_labels_readonly" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: enterprise-admin - subcategory: actions - "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": - delete: - summary: Remove a custom label from a self-hosted runner for an enterprise - description: |- - Remove a custom label from a self-hosted runner configured - in an enterprise. Returns the remaining labels from the runner. - - This endpoint returns a `404 Not Found` status if the custom label is not - present on the runner. - - You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/code-of-conduct" + examples: + default: + "$ref": "#/components/examples/code-of-conduct-simple-items" + '304': + "$ref": "#/components/responses/not_modified" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: codes-of-conduct + subcategory: + "/codes_of_conduct/{key}": + get: + summary: Get a code of conduct + description: '' tags: - - enterprise-admin - operationId: enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise + - codes-of-conduct + operationId: codes-of-conduct/get-conduct-code externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/codes-of-conduct#get-a-code-of-conduct parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/runner-id" - - "$ref": "#/components/parameters/runner-label-name" + - name: key + in: path + required: true + schema: + type: string responses: '200': - "$ref": "#/components/responses/actions_runner_labels" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/code-of-conduct" + examples: + default: + "$ref": "#/components/examples/code-of-conduct" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: actions - subcategory: self-hosted-runners - "/enterprises/{enterprise}/audit-log": + enabledForGitHubApps: true + category: codes-of-conduct + subcategory: + "/emojis": get: - summary: Get the audit log for an enterprise - operationId: enterprise-admin/get-audit-log - description: 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. + summary: Get emojis + description: Lists all the emojis available to use on GitHub Enterprise Server. + operationId: emojis/get tags: - - enterprise-admin + - emojis externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/audit-log-phrase" - - "$ref": "#/components/parameters/audit-log-include" - - "$ref": "#/components/parameters/audit-log-after" - - "$ref": "#/components/parameters/audit-log-before" - - "$ref": "#/components/parameters/audit-log-order" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/emojis#get-emojis + parameters: [] responses: '200': - description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/audit-log-event" + type: object + additionalProperties: + type: string examples: default: - "$ref": "#/components/examples/audit-log" + "$ref": "#/components/examples/emojis-get" + description: Response + '304': + "$ref": "#/components/responses/not_modified" x-github: - githubCloudOnly: true - enabledForGitHubApps: false - category: enterprise-admin - subcategory: audit-log - "/enterprises/{enterprise}/secret-scanning/alerts": + githubCloudOnly: false + enabledForGitHubApps: true + category: emojis + subcategory: + "/enterprise/announcement": get: - summary: List secret scanning alerts for an enterprise - description: |- - Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. - To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). + summary: Get the global announcement banner + description: Gets the current message and expiration date of the global announcement + banner in your enterprise. tags: - - secret-scanning - operationId: secret-scanning/list-alerts-for-enterprise - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/secret-scanning-alert-state" - - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" - - "$ref": "#/components/parameters/secret-scanning-alert-resolution" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/pagination-before" - - "$ref": "#/components/parameters/pagination-after" + - enterprise-admin + operationId: enterprise-admin/get-announcement responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/organization-secret-scanning-alert" + "$ref": "#/components/schemas/announcement" examples: default: - "$ref": "#/components/examples/organization-secret-scanning-alert-list" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/announcement" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: secret-scanning - subcategory: - "/enterprises/{enterprise}/settings/billing/actions": - get: - summary: Get GitHub Actions billing for an enterprise - description: |- - Gets the summary of the free and paid GitHub Actions minutes used. - - Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - - The authenticated user must be an enterprise admin. - operationId: billing/get-github-actions-billing-ghe + category: enterprise-admin + subcategory: announcement + patch: + summary: Set the global announcement banner + description: Sets the message and expiration time for the global announcement + banner in your enterprise. tags: - - billing - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" + - enterprise-admin + operationId: enterprise-admin/set-announcement + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/announcement" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-billing-usage" + "$ref": "#/components/schemas/announcement" examples: default: - "$ref": "#/components/examples/actions-billing-usage" + "$ref": "#/components/examples/announcement" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: false category: enterprise-admin - subcategory: billing - "/enterprises/{enterprise}/settings/billing/advanced-security": + subcategory: announcement + delete: + summary: Remove the global announcement banner + description: Removes the global announcement banner in your enterprise. + tags: + - enterprise-admin + operationId: enterprise-admin/remove-announcement + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: announcement + "/enterprise/settings/license": get: - summary: Get GitHub Advanced Security active committers for an enterprise - description: |- - Gets the GitHub Advanced Security active committers for an enterprise per repository. - Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of active_users for each repository. + summary: Get license information + description: '' + operationId: enterprise-admin/get-license-information tags: - - billing - operationId: billing/get-github-advanced-security-billing-ghe + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-license-information responses: '200': - description: Success + description: Response content: application/json: schema: - "$ref": "#/components/schemas/advanced-security-active-committers" + "$ref": "#/components/schemas/license-info" examples: default: - "$ref": "#/components/examples/advanced-security-active-committers" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" + "$ref": "#/components/examples/license-info" x-github: githubCloudOnly: false enabledForGitHubApps: false category: enterprise-admin - subcategory: billing - "/enterprises/{enterprise}/settings/billing/packages": + subcategory: license + "/enterprise/stats/all": get: - summary: Get GitHub Packages billing for an enterprise - description: |- - Gets the free and paid storage used for GitHub Packages in gigabytes. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - - The authenticated user must be an enterprise admin. - operationId: billing/get-github-packages-billing-ghe + summary: Get all statistics + description: '' + operationId: enterprise-admin/get-all-stats tags: - - billing + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-statistics responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/packages-billing-usage" + "$ref": "#/components/schemas/enterprise-overview" examples: default: - "$ref": "#/components/examples/packages-billing-usage" + "$ref": "#/components/examples/enterprise-overview" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: false category: enterprise-admin - subcategory: billing - "/enterprises/{enterprise}/settings/billing/shared-storage": + subcategory: admin-stats + "/enterprise/stats/comments": get: - summary: Get shared storage billing for an enterprise - description: |- - Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - - The authenticated user must be an enterprise admin. - operationId: billing/get-shared-storage-billing-ghe + summary: Get comment statistics + description: '' + operationId: enterprise-admin/get-comment-stats tags: - - billing + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-comment-statistics responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/combined-billing-usage" - examples: - default: - "$ref": "#/components/examples/combined-billing-usage" + "$ref": "#/components/schemas/enterprise-comment-overview" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: false category: enterprise-admin - subcategory: billing - "/events": + subcategory: admin-stats + "/enterprise/stats/gists": get: - summary: List public events - description: 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. + summary: Get gist statistics + description: '' + operationId: enterprise-admin/get-gist-stats tags: - - activity - operationId: activity/list-public-events + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-public-events - parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-gist-statistics responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/event" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/schemas/enterprise-gist-overview" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: activity - subcategory: events - "/feeds": + enabledForGitHubApps: false + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/hooks": get: - summary: Get feeds - description: |- - 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. + summary: Get hooks statistics + operationId: enterprise-admin/get-hooks-stats tags: - - activity - operationId: activity/get-feeds + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#get-feeds - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-hooks-statistics responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/feed" - examples: - default: - "$ref": "#/components/examples/feed" + "$ref": "#/components/schemas/enterprise-hook-overview" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: activity - subcategory: feeds - "/gists": + enabledForGitHubApps: false + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/issues": get: - summary: List gists for the authenticated user - description: 'Lists the authenticated user''s gists or if called anonymously, - this endpoint returns all public gists:' + summary: Get issue statistics + description: '' + operationId: enterprise-admin/get-issue-stats tags: - - gists - operationId: gists/list + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-gists-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-issues-statistics responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/base-gist" - examples: - default: - "$ref": "#/components/examples/base-gist-items" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/schemas/enterprise-issue-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - post: - summary: Create a gist - description: |- - 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. - operationId: gists/create + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/milestones": + get: + summary: Get milestone statistics + description: '' + operationId: enterprise-admin/get-milestone-stats tags: - - gists + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#create-a-gist - parameters: [] - requestBody: - required: true - content: - application/json: - schema: - properties: - description: - description: Description of the gist - example: Example Ruby script - type: string - files: - description: Names and content for the files that make up the gist - example: - hello.rb: - content: puts "Hello, World!" - type: object - additionalProperties: - type: object - properties: - content: - description: Content of the file - readOnly: false - type: string - required: - - content - public: - oneOf: - - description: Flag indicating whether the gist is public - example: true - type: boolean - default: false - - type: string - example: 'true' - default: 'false' - enum: - - 'true' - - 'false' - required: - - files - type: object + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-milestone-statistics responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-simple" - examples: - default: - "$ref": "#/components/examples/gist" - headers: - Location: - example: https://api.github.com/gists/aa5a315d61ae9438b18d - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/schemas/enterprise-milestone-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gists/public": + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/orgs": get: - summary: List public gists - description: |- - 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. + summary: Get organization statistics + description: '' + operationId: enterprise-admin/get-org-stats tags: - - gists - operationId: gists/list-public + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-public-gists - parameters: - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-organization-statistics responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/base-gist" - examples: - default: - "$ref": "#/components/examples/base-gist-items" - headers: - Link: - "$ref": "#/components/headers/link" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/schemas/enterprise-organization-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gists/starred": + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/pages": get: - summary: List starred gists - description: 'List the authenticated user''s starred gists:' + summary: Get pages statistics + description: '' + operationId: enterprise-admin/get-pages-stats tags: - - gists - operationId: gists/list-starred + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-starred-gists - parameters: - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-pages-statistics responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/base-gist" - examples: - default: - "$ref": "#/components/examples/base-gist-items" - headers: - Link: - "$ref": "#/components/headers/link" - '401': - "$ref": "#/components/responses/requires_authentication" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/schemas/enterprise-page-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gists/{gist_id}": + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/pulls": get: - summary: Get a gist + summary: Get pull request statistics description: '' + operationId: enterprise-admin/get-pull-request-stats tags: - - gists - operationId: gists/get + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#get-a-gist - parameters: - - "$ref": "#/components/parameters/gist-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-pull-requests-statistics responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-simple" - examples: - default: - "$ref": "#/components/examples/gist" - '403': - "$ref": "#/components/responses/forbidden_gist" - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/schemas/enterprise-pull-request-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - patch: - summary: Update a gist - description: 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. + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/repos": + get: + summary: Get repository statistics + operationId: enterprise-admin/get-repo-stats tags: - - gists - operationId: gists/update + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists/#update-a-gist - parameters: - - "$ref": "#/components/parameters/gist-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - description: - description: Description of the gist - example: Example Ruby script - type: string - files: - description: Names of files to be updated - example: - hello.rb: - content: blah - filename: goodbye.rb - type: object - additionalProperties: - type: object - nullable: true - properties: - content: - description: The new content of the file - type: string - filename: - description: The new filename for the file - type: string - nullable: true - anyOf: - - required: - - content - - required: - - filename - - type: object - maxProperties: 0 - anyOf: - - required: - - description - - required: - - files - type: object - nullable: true + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-repository-statistics responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-simple" - examples: - default: - "$ref": "#/components/examples/gist" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/schemas/enterprise-repository-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - delete: - summary: Delete a gist + category: enterprise-admin + subcategory: admin-stats + "/enterprise/stats/users": + get: + summary: Get users statistics description: '' + operationId: enterprise-admin/get-user-stats tags: - - gists - operationId: gists/delete + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#delete-a-gist - parameters: - - "$ref": "#/components/parameters/gist-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-users-statistics responses: - '204': + '200': description: Response - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + content: + application/json: + schema: + "$ref": "#/components/schemas/enterprise-user-overview" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gists/{gist_id}/comments": + category: enterprise-admin + subcategory: admin-stats + "/enterprises/{enterprise}/actions/cache/usage": get: - summary: List gist comments - description: '' + summary: Get GitHub Actions cache usage for an enterprise + description: |- + Gets the total GitHub Actions cache usage for an enterprise. + The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + operationId: actions/get-actions-cache-usage-for-enterprise tags: - - gists - operationId: gists/list-comments + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-gist-comments + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-cache-usage-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/gist-comment" + "$ref": "#/components/schemas/actions-cache-usage-org-enterprise" examples: default: - "$ref": "#/components/examples/gist-comment-items" + "$ref": "#/components/examples/actions-cache-usage-org-enterprise" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - category: gists - subcategory: comments - post: - summary: Create a gist comment - description: '' + category: actions + subcategory: cache + "/enterprises/{enterprise}/actions/cache/usage-policy": + get: + summary: Get GitHub Actions cache usage policy for an enterprise + description: |- + Gets the GitHub Actions cache usage policy for an enterprise. + You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. tags: - - gists - operationId: gists/create-comment + - actions + operationId: actions/get-actions-cache-usage-policy-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#create-a-gist-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-cache-usage-policy-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - body: - description: The comment text. - type: string - maxLength: 65535 - example: Body of the attachment - type: object - required: - - body + - "$ref": "#/components/parameters/enterprise" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-comment" + "$ref": "#/components/schemas/actions-cache-usage-policy-enterprise" examples: default: - "$ref": "#/components/examples/gist-comment" + "$ref": "#/components/examples/actions-cache-usage-policy-enterprise" headers: - Location: - example: https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 - schema: - type: string - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + Link: + "$ref": "#/components/headers/link" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - category: gists - subcategory: comments - "/gists/{gist_id}/comments/{comment_id}": - get: - summary: Get a gist comment - description: '' + category: actions + subcategory: cache + patch: + summary: Set GitHub Actions cache usage policy for an enterprise + description: |- + Sets the GitHub Actions cache usage policy for an enterprise. + You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. tags: - - gists - operationId: gists/get-comment + - actions + operationId: actions/set-actions-cache-usage-policy-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#get-a-gist-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-github-actions-cache-usage-policy-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/enterprise" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/gist-comment" - examples: - default: - "$ref": "#/components/examples/gist-comment" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden_gist" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-cache-usage-policy-enterprise" + examples: + selected_actions: + "$ref": "#/components/examples/actions-cache-usage-policy-enterprise" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - category: gists - subcategory: comments - patch: - summary: Update a gist comment - description: '' + category: actions + subcategory: cache + "/enterprises/{enterprise}/actions/permissions": + get: + summary: Get GitHub Actions permissions for an enterprise + description: |- + 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. + operationId: enterprise-admin/get-github-actions-permissions-enterprise tags: - - gists - operationId: gists/update-comment + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#update-a-gist-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-permissions-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - - "$ref": "#/components/parameters/comment-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - body: - description: The comment text. - type: string - maxLength: 65535 - example: Body of the attachment - type: object - required: - - body + - "$ref": "#/components/parameters/enterprise" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-comment" + "$ref": "#/components/schemas/actions-enterprise-permissions" examples: default: - "$ref": "#/components/examples/gist-comment" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/actions-enterprise-permissions" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: comments - delete: - summary: Delete a gist comment - description: '' + githubCloudOnly: false + category: actions + subcategory: permissions + put: + summary: Set GitHub Actions permissions for an enterprise + description: |- + 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. + operationId: enterprise-admin/set-github-actions-permissions-enterprise tags: - - gists - operationId: gists/delete-comment + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#delete-a-gist-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-github-actions-permissions-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/enterprise" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + enabled_organizations: + "$ref": "#/components/schemas/enabled-organizations" + allowed_actions: + "$ref": "#/components/schemas/allowed-actions" + required: + - enabled_organizations + examples: + default: + value: + enabled_organizations: all + allowed_actions: selected x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: comments - "/gists/{gist_id}/commits": - get: - summary: List gist commits - description: '' - tags: - - gists - operationId: gists/list-commits - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-gist-commits - parameters: - - "$ref": "#/components/parameters/gist-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/gist-commit" - examples: - default: - "$ref": "#/components/examples/gist-commit-items" - headers: - Link: - example: ; rel="next" - schema: - type: string - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: gists - subcategory: - "/gists/{gist_id}/forks": + category: actions + subcategory: permissions + "/enterprises/{enterprise}/actions/permissions/organizations": get: - summary: List gist forks - description: '' + summary: List selected organizations enabled for GitHub Actions in an enterprise + description: |- + 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. + operationId: enterprise-admin/list-selected-organizations-enabled-github-actions-enterprise tags: - - gists - operationId: gists/list-forks + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-gist-forks + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-organizations-enabled-for-github-actions-in-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/enterprise" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -3744,674 +3563,518 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/gist-simple" + type: object + properties: + total_count: + type: number + organizations: + type: array + items: + "$ref": "#/components/schemas/organization-simple" + required: + - total_count + - organizations examples: default: - "$ref": "#/components/examples/gist-fork-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/organization-targets" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - post: - summary: Fork a gist - description: "**Note**: This was previously `/gists/:gist_id/fork`." - tags: - - gists - operationId: gists/fork - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/gists#fork-a-gist - parameters: - - "$ref": "#/components/parameters/gist-id" - responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/base-gist" - examples: - default: - "$ref": "#/components/examples/base-gist" - headers: - Location: - example: https://api.github.com/gists/aa5a315d61ae9438b18d - schema: - type: string - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: gists - subcategory: - "/gists/{gist_id}/star": - get: - summary: Check if a gist is starred - description: '' + category: actions + subcategory: permissions + put: + summary: Set selected organizations enabled for GitHub Actions in an enterprise + description: |- + 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. + operationId: enterprise-admin/set-selected-organizations-enabled-github-actions-enterprise tags: - - gists - operationId: gists/check-is-starred + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#check-if-a-gist-is-starred + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-organizations-enabled-for-github-actions-in-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/enterprise" responses: '204': - description: Response if gist is starred - '404': - description: Not Found if gist is not starred - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: false - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + description: Response + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + selected_organization_ids: + description: List of organization IDs to enable for GitHub Actions. + type: array + items: + type: integer + description: Unique identifier of the organization. + required: + - selected_organization_ids + examples: + default: + value: + selected_organization_ids: + - 32 + - 91 x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: + githubCloudOnly: false + category: actions + subcategory: permissions + "/enterprises/{enterprise}/actions/permissions/organizations/{org_id}": put: - summary: Star a gist - description: 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)." + summary: Enable a selected organization for GitHub Actions in an enterprise + description: |- + 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. + operationId: enterprise-admin/enable-selected-organization-github-actions-enterprise tags: - - gists - operationId: gists/star + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#star-a-gist + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#enable-a-selected-organization-for-github-actions-in-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/org-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: + githubCloudOnly: false + category: actions + subcategory: permissions delete: - summary: Unstar a gist - description: '' + summary: Disable a selected organization for GitHub Actions in an enterprise + description: |- + 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. + operationId: enterprise-admin/disable-selected-organization-github-actions-enterprise tags: - - gists - operationId: gists/unstar + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#unstar-a-gist + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#disable-a-selected-organization-for-github-actions-in-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/org-id" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gists/{gist_id}/{sha}": + githubCloudOnly: false + category: actions + subcategory: permissions + "/enterprises/{enterprise}/actions/permissions/selected-actions": get: - summary: Get a gist revision - description: '' + summary: Get allowed actions for an enterprise + description: |- + 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. + operationId: enterprise-admin/get-allowed-actions-enterprise tags: - - gists - operationId: gists/get-revision + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#get-a-gist-revision + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-allowed-actions-for-an-enterprise parameters: - - "$ref": "#/components/parameters/gist-id" - - name: sha - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/enterprise" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gist-simple" + "$ref": "#/components/schemas/selected-actions" examples: default: - "$ref": "#/components/examples/gist" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/selected-actions" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: gists - subcategory: - "/gitignore/templates": - get: - summary: Get all gitignore templates - description: 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). - operationId: gitignore/get-all-templates + githubCloudOnly: false + category: actions + subcategory: permissions + put: + summary: Set allowed actions for an enterprise + description: |- + 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. + operationId: enterprise-admin/set-allowed-actions-enterprise tags: - - gitignore + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gitignore#get-all-gitignore-templates - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-allowed-actions-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - type: string - example: - - Actionscript - - Android - - AppceleratorTitanium - - Autotools - - Bancha - - C - - C++ - '304': - "$ref": "#/components/responses/not_modified" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/selected-actions" + examples: + selected_actions: + "$ref": "#/components/examples/selected-actions" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: gitignore - subcategory: - "/gitignore/templates/{name}": + category: actions + subcategory: permissions + "/enterprises/{enterprise}/actions/permissions/workflow": get: - summary: Get a gitignore template + summary: Get default workflow permissions for an enterprise description: |- - 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. - operationId: gitignore/get-template + Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, + as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." + + You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. tags: - - gitignore + - actions + operationId: actions/get-github-actions-default-workflow-permissions-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gitignore#get-a-gitignore-template + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-default-workflow-permissions-for-an-enterprise parameters: - - name: name - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/enterprise" responses: '200': - description: Response + description: Success response content: application/json: schema: - "$ref": "#/components/schemas/gitignore-template" + "$ref": "#/components/schemas/actions-get-default-workflow-permissions" examples: default: - "$ref": "#/components/examples/gitignore-template" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/actions-default-workflow-permissions" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: gitignore - subcategory: - "/installation/repositories": - get: - summary: List repositories accessible to the app installation + category: actions + subcategory: permissions + put: + summary: Set default workflow permissions for an enterprise description: |- - List repositories that an app installation can access. + Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an enterprise, and sets + whether GitHub Actions can submit approving pull request reviews. For more information, see + "[Enforcing a policy for workflow permissions in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)." - 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. + You must authenticate using an access token with the `admin:enterprise` scope to use this endpoint. + GitHub Apps must have the `enterprise_administration:write` permission to use this endpoint. tags: - - apps - operationId: apps/list-repos-accessible-to-installation + - actions + operationId: actions/set-github-actions-default-workflow-permissions-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-app-installation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-default-workflow-permissions-for-an-enterprise parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - repositories - properties: - total_count: - type: integer - repositories: - type: array - items: - "$ref": "#/components/schemas/repository" - repository_selection: - type: string - example: selected - examples: - default: - "$ref": "#/components/examples/repository-paginated-2" - headers: - Link: - "$ref": "#/components/headers/link" - '403': - "$ref": "#/components/responses/forbidden" - '304': - "$ref": "#/components/responses/not_modified" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: apps - subcategory: installations - "/installation/token": - delete: - summary: Revoke an installation access token - description: |- - 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. - tags: - - apps - operationId: apps/revoke-installation-access-token - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/apps#revoke-an-installation-access-token - parameters: [] + - "$ref": "#/components/parameters/enterprise" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-set-default-workflow-permissions" + examples: + default: + "$ref": "#/components/examples/actions-default-workflow-permissions" responses: '204': - description: Response + description: Success response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: apps - subcategory: installations - "/issues": + category: actions + subcategory: permissions + "/enterprises/{enterprise}/actions/runner-groups": get: - summary: List issues assigned to the authenticated user + summary: List self-hosted runner groups for an enterprise description: |- - 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. - + Lists all self-hosted runner groups for an enterprise. - **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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/list-self-hosted-runner-groups-for-enterprise tags: - - issues - operationId: issues/list + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-issues-assigned-to-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runner-groups-for-an-enterprise parameters: - - name: filter - description: "Indicates which sorts of issues to return. Can be one of: \n\\* - `assigned`: Issues assigned to you \n\\* `created`: Issues created by you - \ \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're - subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated - user can see, regardless of participation or creation" - in: query - required: false - schema: - type: string - enum: - - assigned - - created - - mentioned - - subscribed - - repos - - all - default: assigned - - name: state - description: Indicates the state of the issues to return. Can be either `open`, - `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - "$ref": "#/components/parameters/labels" - - name: sort - description: What to sort results by. Can be either `created`, `updated`, - `comments`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - comments - default: created - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/since" - - name: collab - in: query - required: false - schema: - type: boolean - - name: orgs - in: query - required: false - schema: - type: boolean - - name: owned - in: query - required: false - schema: - type: boolean - - name: pulls - in: query - required: false - schema: - type: boolean + - "$ref": "#/components/parameters/enterprise" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/visible-to-organization" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/issue" + type: object + properties: + total_count: + type: number + runner_groups: + type: array + items: + "$ref": "#/components/schemas/runner-groups-enterprise" + required: + - total_count + - runner_groups examples: default: - "$ref": "#/components/examples/issue-with-repo-items" - headers: - Link: - "$ref": "#/components/headers/link" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/runner-groups-enterprise" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: issues - subcategory: - "/licenses": - get: - summary: Get all commonly used licenses - description: '' + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + post: + summary: Create a self-hosted runner group for an enterprise + description: |- + Creates a new self-hosted runner group for an enterprise. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/create-self-hosted-runner-group-for-enterprise tags: - - licenses - operationId: licenses/get-all-commonly-used + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/licenses#get-all-commonly-used-licenses + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-self-hosted-runner-group-for-an-enterprise parameters: - - name: featured - in: query - required: false - schema: - type: boolean - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + description: Name of the runner group. + type: string + visibility: + description: Visibility of a runner group. You can select all organizations + or select individual organization. + type: string + enum: + - selected + - all + selected_organization_ids: + description: List of organization IDs that can access the runner + group. + type: array + items: + type: integer + description: Unique identifier of the organization. + runners: + description: List of runner IDs to add to the runner group. + type: array + items: + type: integer + description: Unique identifier of the runner. + allows_public_repositories: + description: Whether the runner group can be used by `public` repositories. + type: boolean + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running + only the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed + to run. This setting will be ignored unless `restricted_to_workflows` + is set to `true`. + type: array + items: + type: string + description: Name of workflow the runner group should be allowed + to run. Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main + required: + - name + examples: + default: + value: + name: Expensive hardware runners + visibility: selected + selected_organization_ids: + - 32 + - 91 + runners: + - 9 + - 2 responses: - '200': + '201': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/license-simple" + "$ref": "#/components/schemas/runner-groups-enterprise" examples: default: - "$ref": "#/components/examples/license-simple-items" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/runner-group-enterprise" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: licenses - subcategory: - "/licenses/{license}": + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}": get: - summary: Get a license - description: '' + summary: Get a self-hosted runner group for an enterprise + description: |- + Gets a specific self-hosted runner group for an enterprise. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/get-self-hosted-runner-group-for-enterprise tags: - - licenses - operationId: licenses/get + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/licenses#get-a-license + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-self-hosted-runner-group-for-an-enterprise parameters: - - name: license - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/license" + "$ref": "#/components/schemas/runner-groups-enterprise" examples: default: - "$ref": "#/components/examples/license" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/runner-group-enterprise" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: licenses - subcategory: - "/markdown": - post: - summary: Render a Markdown document - description: '' - operationId: markdown/render + category: actions + subcategory: self-hosted-runner-groups + patch: + summary: Update a self-hosted runner group for an enterprise + description: |- + Updates the `name` and `visibility` of a self-hosted runner group in an enterprise. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/update-self-hosted-runner-group-for-enterprise tags: - - markdown + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/markdown#render-a-markdown-document - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#update-a-self-hosted-runner-group-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" requestBody: - required: true + required: false content: application/json: schema: + type: object properties: - text: - description: The Markdown text to render in HTML. - type: string - mode: - description: The rendering mode. Can be either `markdown` or `gfm`. - enum: - - markdown - - gfm - default: markdown - example: markdown + name: + description: Name of the runner group. type: string - context: - description: The repository context to use when creating references - in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` - will change the text `#42` into an HTML link to issue 42 in the - `octo-org/octo-repo` repository. + visibility: + description: Visibility of a runner group. You can select all organizations + or select individual organizations. type: string - required: - - text - type: object - responses: - '200': - description: Response - headers: - Content-Type: - "$ref": "#/components/headers/content-type" - Content-Length: - example: '279' - schema: - type: string - X-CommonMarker-Version: - "$ref": "#/components/headers/x-common-marker-version" - content: - text/html: - schema: - type: string - '304': - "$ref": "#/components/responses/not_modified" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: markdown - subcategory: - "/markdown/raw": - post: - summary: Render a Markdown document in raw mode - description: 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. - operationId: markdown/render-raw - tags: - - markdown - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/markdown#render-a-markdown-document-in-raw-mode - parameters: [] - requestBody: - required: false - content: - text/plain: - schema: - type: string - text/x-markdown: - schema: - type: string + enum: + - selected + - all + default: all + allows_public_repositories: + description: Whether the runner group can be used by `public` repositories. + type: boolean + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running + only the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed + to run. This setting will be ignored unless `restricted_to_workflows` + is set to `true`. + type: array + items: + type: string + description: Name of workflow the runner group should be allowed + to run. Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main + examples: + default: + value: + name: Expensive hardware runners + visibility: selected responses: '200': description: Response - headers: - X-CommonMarker-Version: - "$ref": "#/components/headers/x-common-marker-version" content: - text/html: + application/json: schema: - type: string - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/schemas/runner-groups-enterprise" + examples: + default: + "$ref": "#/components/examples/runner-group-update-enterprise" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: markdown - subcategory: - "/marketplace_listing/accounts/{account_id}": - get: - summary: Get a subscription plan for an account + category: actions + subcategory: self-hosted-runner-groups + delete: + summary: Delete a self-hosted runner group from an enterprise description: |- - 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. + Deletes a self-hosted runner group for an enterprise. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/delete-self-hosted-runner-group-from-enterprise tags: - - apps - operationId: apps/get-subscription-plan-for-account + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-enterprise parameters: - - "$ref": "#/components/parameters/account-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/marketplace-purchase" - examples: - default: - "$ref": "#/components/examples/marketplace-purchase" - '404': - description: Not Found when the account has not purchased the listing - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/marketplace_listing/plans": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations": get: - summary: List plans + summary: List organization access to a self-hosted runner group in an enterprise description: |- - Lists all plans that are part of your GitHub Marketplace listing. + Lists the organizations with access to a self-hosted runner group. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/list-org-access-to-self-hosted-runner-group-in-enterprise tags: - - apps - operationId: apps/list-plans + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-plans + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-organization-access-to-a-self-hosted-runner-group-in-a-enterprise parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -4420,176 +4083,135 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/marketplace-listing-plan" + type: object + properties: + total_count: + type: number + organizations: + type: array + items: + "$ref": "#/components/schemas/organization-simple" + required: + - total_count + - organizations examples: default: - "$ref": "#/components/examples/marketplace-listing-plan-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/organization-targets" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/marketplace_listing/plans/{plan_id}/accounts": - get: - summary: List accounts for a plan + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + put: + summary: Set organization access for a self-hosted runner group in an enterprise description: |- - 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. + Replaces the list of organizations that have access to a self-hosted runner configured in an enterprise. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/set-org-access-to-self-hosted-runner-group-in-enterprise tags: - - apps - operationId: apps/list-accounts-for-plan + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-organization-access-to-a-self-hosted-runner-group-in-an-enterprise parameters: - - "$ref": "#/components/parameters/plan-id" - - "$ref": "#/components/parameters/sort" - - name: direction - description: To return the oldest accounts first, set to `asc`. Can be one - of `asc` or `desc`. Ignored without the `sort` parameter. - in: query - required: false - schema: - type: string - enum: - - asc - - desc - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/marketplace-purchase" - examples: - default: - "$ref": "#/components/examples/marketplace-purchase-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '401': - "$ref": "#/components/responses/requires_authentication" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + selected_organization_ids: + description: List of organization IDs that can access the runner + group. + type: array + items: + type: integer + description: Unique identifier of the organization. + required: + - selected_organization_ids + examples: + default: + value: + selected_organization_ids: + - 32 + - 91 + responses: + '204': + description: Response x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/marketplace_listing/stubbed/accounts/{account_id}": - get: - summary: Get a subscription plan for an account (stubbed) + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations/{org_id}": + put: + summary: Add organization access to a self-hosted runner group in an enterprise description: |- - 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. + 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)." - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/add-org-access-to-self-hosted-runner-group-in-enterprise tags: - - apps - operationId: apps/get-subscription-plan-for-account-stubbed + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-subscription-plan-for-an-account-stubbed + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-organization-access-to-a-self-hosted-runner-group-in-an-enterprise parameters: - - "$ref": "#/components/parameters/account-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/org-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/marketplace-purchase" - examples: - default: - "$ref": "#/components/examples/marketplace-purchase" - '404': - description: Not Found when the account has not purchased the listing - '401': - "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/marketplace_listing/stubbed/plans": - get: - summary: List plans (stubbed) + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + delete: + summary: Remove organization access to a self-hosted runner group in an enterprise description: |- - Lists all plans that are part of your GitHub Marketplace listing. + 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)." - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/remove-org-access-to-self-hosted-runner-group-in-enterprise tags: - - apps - operationId: apps/list-plans-stubbed + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-plans-stubbed + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-organization-access-to-a-self-hosted-runner-group-in-an-enterprise parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/org-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/marketplace-listing-plan" - examples: - default: - "$ref": "#/components/examples/marketplace-listing-plan-items" - headers: - Link: - "$ref": "#/components/headers/link" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/marketplace_listing/stubbed/plans/{plan_id}/accounts": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners": get: - summary: List accounts for a plan (stubbed) + summary: List self-hosted runners in a group for an enterprise description: |- - 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. + Lists the self-hosted runners that are in a specific enterprise group. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/list-self-hosted-runners-in-group-for-enterprise tags: - - apps - operationId: apps/list-accounts-for-plan-stubbed + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-accounts-for-a-plan-stubbed + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-enterprise parameters: - - "$ref": "#/components/parameters/plan-id" - - "$ref": "#/components/parameters/sort" - - name: direction - description: To return the oldest accounts first, set to `asc`. Can be one - of `asc` or `desc`. Ignored without the `sort` parameter. - in: query - required: false - schema: - type: string - enum: - - asc - - desc + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -4598,106 +4220,137 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/marketplace-purchase" + type: object + properties: + total_count: + type: number + runners: + type: array + items: + "$ref": "#/components/schemas/runner" + required: + - total_count + - runners examples: default: - "$ref": "#/components/examples/marketplace-purchase-items" + "$ref": "#/components/examples/runner-paginated" headers: Link: "$ref": "#/components/headers/link" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: + enabledForGitHubApps: false githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + put: + summary: Set self-hosted runners in a group for an enterprise + description: |- + Replaces the list of self-hosted runners that are part of an enterprise runner group. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/set-self-hosted-runners-in-group-for-enterprise + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + runners: + description: List of runner IDs to add to the runner group. + type: array + items: + type: integer + description: Unique identifier of the runner. + required: + - runners + examples: + default: + value: + runners: + - 9 + - 2 + responses: + '204': + description: Response + x-github: enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/meta": - get: - summary: Get GitHub meta information + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": + put: + summary: Add a self-hosted runner to a group for an enterprise description: |- - Returns meta information about GitHub, including a list of GitHub's IP addresses. For more information, see "[About GitHub's IP addresses](https://docs.github.com/articles/about-github-s-ip-addresses/)." + Adds a self-hosted runner to a runner group configured in an enterprise. - **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. + You must authenticate using an access token with the `manage_runners:enterprise` + scope to use this endpoint. + operationId: enterprise-admin/add-self-hosted-runner-to-group-for-enterprise tags: - - meta - operationId: meta/get + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/meta#get-github-meta-information - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/runner-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/api-overview" - examples: - default: - "$ref": "#/components/examples/api-overview" - '304': - "$ref": "#/components/responses/not_modified" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: meta - subcategory: - "/networks/{owner}/{repo}/events": - get: - summary: List public events for a network of repositories - description: '' + category: actions + subcategory: self-hosted-runner-groups + delete: + summary: Remove a self-hosted runner from a group for an enterprise + description: |- + Removes a self-hosted runner from a group configured in an enterprise. The runner is then returned to the default group. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/remove-self-hosted-runner-from-group-for-enterprise tags: - - activity - operationId: activity/list-public-events-for-repo-network + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-public-events-for-a-network-of-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-enterprise parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/runner-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/event" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '304': - "$ref": "#/components/responses/not_modified" - '301': - "$ref": "#/components/responses/moved_permanently" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: activity - subcategory: events - "/notifications": + category: actions + subcategory: self-hosted-runner-groups + "/enterprises/{enterprise}/actions/runners": get: - summary: List notifications for the authenticated user - description: List all notifications for the current user, sorted by most recently - updated. + summary: List self-hosted runners for an enterprise + description: |- + Lists all self-hosted runners configured for an enterprise. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/list-self-hosted-runners-for-enterprise tags: - - activity - operationId: activity/list-notifications-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-notifications-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runners-for-an-enterprise parameters: - - "$ref": "#/components/parameters/all" - - "$ref": "#/components/parameters/participating" - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/before" + - "$ref": "#/components/parameters/enterprise" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -4706,702 +4359,508 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/thread" + type: object + properties: + total_count: + type: number + runners: + type: array + items: + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/thread-items" + "$ref": "#/components/examples/runner-paginated" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications - put: - summary: Mark notifications as read - description: 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`. + githubCloudOnly: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/downloads": + get: + summary: List runner applications for an enterprise + description: |- + Lists binaries for the runner application that you can download and run. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/list-runner-applications-for-enterprise tags: - - activity - operationId: activity/mark-notifications-as-read + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#mark-notifications-as-read - parameters: [] - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - last_read_at: - description: Describes the last point that notifications were checked. - type: string - format: date-time - read: - description: Whether the notification has been read. - type: boolean + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-runner-applications-for-an-enterprise + parameters: + - "$ref": "#/components/parameters/enterprise" responses: - '202': + '200': description: Response content: application/json: schema: - type: object - properties: - message: - type: string - '205': - description: Reset Content - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + type: array + items: + "$ref": "#/components/schemas/runner-application" + examples: + default: + "$ref": "#/components/examples/runner-application-items-airgap" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications - "/notifications/threads/{thread_id}": - get: - summary: Get a thread - description: '' + githubCloudOnly: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/registration-token": + post: + summary: Create a registration token for an enterprise + description: |- + Returns a token that you can pass to the `config` script. The token expires after one hour. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + + #### Example using registration token + + Configure your self-hosted runner, replacing `TOKEN` with the registration token provided by this endpoint. + + ``` + ./config.sh --url https://github.com/enterprises/octo-enterprise --token TOKEN + ``` + operationId: enterprise-admin/create-registration-token-for-enterprise tags: - - activity - operationId: activity/get-thread + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#get-a-thread + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-registration-token-for-an-enterprise parameters: - - "$ref": "#/components/parameters/thread-id" + - "$ref": "#/components/parameters/enterprise" responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/thread" + "$ref": "#/components/schemas/authentication-token" examples: default: - "$ref": "#/components/examples/thread" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/authentication-token" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications - patch: - summary: Mark a thread as read - description: '' - tags: - - activity - operationId: activity/mark-thread-as-read - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/activity#mark-a-thread-as-read - parameters: - - "$ref": "#/components/parameters/thread-id" - responses: - '205': - description: Reset Content - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: notifications - "/notifications/threads/{thread_id}/subscription": - get: - summary: Get a thread subscription for the authenticated user + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/remove-token": + post: + summary: Create a remove token for an enterprise description: |- - 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). + 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. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + + #### Example using remove token + + To remove your self-hosted runner from an enterprise, replace `TOKEN` with the remove token provided by this + endpoint. + + ``` + ./config.sh remove --token TOKEN + ``` + operationId: enterprise-admin/create-remove-token-for-enterprise tags: - - activity - operationId: activity/get-thread-subscription-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-remove-token-for-an-enterprise parameters: - - "$ref": "#/components/parameters/thread-id" + - "$ref": "#/components/parameters/enterprise" responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/thread-subscription" + "$ref": "#/components/schemas/authentication-token" examples: default: - "$ref": "#/components/examples/thread-subscription" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/authentication-token-2" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications - put: - summary: Set a thread subscription + githubCloudOnly: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/{runner_id}": + get: + summary: Get a self-hosted runner for an enterprise description: |- - 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. + Gets a specific self-hosted runner configured in an enterprise. - 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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/get-self-hosted-runner-for-enterprise tags: - - activity - operationId: activity/set-thread-subscription + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#set-a-thread-subscription + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-self-hosted-runner-for-an-enterprise parameters: - - "$ref": "#/components/parameters/thread-id" - requestBody: - required: false - content: - application/json: - schema: - properties: - ignored: - description: Whether to block all notifications from a thread. - default: false - type: boolean - type: object + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/thread-subscription" + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/thread-subscription" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/runner" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications + githubCloudOnly: false + category: actions + subcategory: self-hosted-runners delete: - summary: Delete a thread subscription - description: 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`. + summary: Delete a self-hosted runner from an enterprise + description: |- + Forces the removal of a self-hosted runner from an enterprise. You can use this endpoint to completely remove the runner when the machine you were using no longer exists. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. + operationId: enterprise-admin/delete-self-hosted-runner-from-enterprise tags: - - activity - operationId: activity/delete-thread-subscription + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#delete-a-thread-subscription + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-self-hosted-runner-from-an-enterprise parameters: - - "$ref": "#/components/parameters/thread-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: false enabledForGitHubApps: false - category: activity - subcategory: notifications - "/octocat": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels": get: - summary: Get Octocat - description: Get the octocat as ASCII art + summary: List labels for a self-hosted runner for an enterprise + description: |- + Lists all labels for a self-hosted runner configured in an enterprise. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. tags: - - meta - operationId: meta/get-octocat + - enterprise-admin + operationId: enterprise-admin/list-labels-for-self-hosted-runner-for-enterprise + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-enterprise parameters: - - name: s - in: query - description: The words to show in Octocat's speech bubble - schema: - type: string - required: false + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" responses: '200': - description: Response - content: - application/octocat-stream: - schema: - type: string - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/meta#get-octocat + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" x-github: + enabledForGitHubApps: false githubCloudOnly: false - enabledForGitHubApps: true - category: meta - "/organizations": - get: - summary: List organizations + category: actions + subcategory: self-hosted-runners + post: + summary: Add custom labels to a self-hosted runner for an enterprise description: |- - Lists all organizations, in the order that they were created on GitHub. + Add custom labels to a self-hosted runner configured in an enterprise. - **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. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. tags: - - orgs - operationId: orgs/list + - enterprise-admin + operationId: enterprise-admin/add-custom-labels-to-self-hosted-runner-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organizations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-enterprise parameters: - - "$ref": "#/components/parameters/since-org" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + minItems: 1 + maxItems: 100 + description: The names of the custom labels to add to the runner. + items: + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/organization-simple" - examples: - default: - "$ref": "#/components/examples/organization-simple-items" - headers: - Link: - example: ; rel="next" - schema: - type: string - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: - "/organizations/{organization_id}/custom_roles": - get: - summary: List custom repository roles in an organization + enabledForGitHubApps: false + category: actions + subcategory: self-hosted-runners + put: + summary: Set custom labels for a self-hosted runner for an enterprise description: |- - List the custom repository roles available in this organization. In order to see custom - repository roles in an organization, the authenticated user must be an organization owner. + Remove all previous custom labels and set the new custom labels for a specific + self-hosted runner configured in an enterprise. - For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. tags: - - orgs - operationId: orgs/list-custom-roles + - enterprise-admin + operationId: enterprise-admin/set-custom-labels-for-self-hosted-runner-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-custom-repository-roles-in-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-enterprise parameters: - - name: organization_id - in: path + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" + requestBody: required: true - schema: - type: string + content: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + minItems: 0 + maxItems: 100 + description: The names of the custom labels to set for the runner. + You can pass an empty array to remove all custom labels. + items: + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: '200': - description: Response - list of custom role names - content: - application/json: - schema: - type: object - properties: - total_count: - description: The number of custom roles in this organization - example: 3 - type: integer - custom_roles: - type: array - items: - "$ref": "#/components/schemas/organization-custom-repository-role" - examples: - default: - "$ref": "#/components/examples/organization-custom-repository-role-example" + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: custom_roles - "/organizations/{org}/team/{team_slug}/external-groups": - get: - summary: List a connection between an external group and a team + enabledForGitHubApps: false + category: actions + subcategory: self-hosted-runners + delete: + summary: Remove all custom labels from a self-hosted runner for an enterprise description: |- - Lists a connection between a team and an external group. + Remove all custom labels from a self-hosted runner configured in an + enterprise. Returns the remaining read-only labels from the runner. - You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. tags: - - teams - operationId: teams/list-linked-external-idp-groups-to-team-for-org + - enterprise-admin + operationId: enterprise-admin/remove-all-custom-labels-from-self-hosted-runner-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-external-idp-group-team-connection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-enterprise parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" responses: '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/external-groups" - examples: - default: - "$ref": "#/components/examples/external-groups" + "$ref": "#/components/responses/actions_runner_labels_readonly" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: - githubCloudOnly: true - enabledForGitHubApps: true - category: teams - subcategory: external-groups - "/orgs/{org}": - get: - summary: Get an organization + githubCloudOnly: false + enabledForGitHubApps: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/actions/runners/{runner_id}/labels/{name}": + delete: + summary: Remove a custom label from a self-hosted runner for an enterprise description: |- - To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + Remove a custom label from a self-hosted runner configured + in an enterprise. Returns the remaining labels from the runner. - 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." + This endpoint returns a `404 Not Found` status if the custom label is not + present on the runner. + + You must authenticate using an access token with the `manage_runners:enterprise` scope to use this endpoint. tags: - - orgs - operationId: orgs/get + - enterprise-admin + operationId: enterprise-admin/remove-custom-label-from-self-hosted-runner-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-enterprise parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/runner-label-name" responses: '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/organization-full" - examples: - default-response: - "$ref": "#/components/examples/organization-full-default-response" + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: - patch: - summary: Update an organization - description: |- - **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. + enabledForGitHubApps: false + category: actions + subcategory: self-hosted-runners + "/enterprises/{enterprise}/audit-log": + get: + summary: Get the audit log for an enterprise + operationId: enterprise-admin/get-audit-log + description: 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. tags: - - orgs - operationId: orgs/update + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs/#update-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-the-audit-log-for-an-enterprise parameters: - - "$ref": "#/components/parameters/org" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - billing_email: - type: string - description: Billing email address. This address is not publicized. - company: - type: string - description: The company name. - email: - type: string - description: The publicly visible email address. - twitter_username: - type: string - description: The Twitter username of the company. - location: - type: string - description: The location. - name: - type: string - description: The shorthand name of the company. - description: - type: string - description: The description of the company. - has_organization_projects: - type: boolean - description: Toggles whether an organization can use organization - projects. - has_repository_projects: - type: boolean - description: Toggles whether repositories that belong to the organization - can use repository projects. - default_repository_permission: - type: string - description: "Default permission level members have for organization - repositories: \n\\* `read` - can pull, but not push to or administer - this repository. \n\\* `write` - can pull and push, but not administer - this repository. \n\\* `admin` - can pull, push, and administer - this repository. \n\\* `none` - no permissions granted by default." - enum: - - read - - write - - admin - - none - default: read - members_can_create_repositories: - type: boolean - description: "Toggles the ability of non-admin organization members - to create repositories. Can be one of: \n\\* `true` - all organization - members can create repositories. \n\\* `false` - only organization - owners can create repositories. \nDefault: `true` \n**Note:** - A parameter can override this parameter. See `members_allowed_repository_creation_type` - in this table for details. **Note:** A parameter can override - this parameter. See `members_allowed_repository_creation_type` - in this table for details." - default: true - members_can_create_internal_repositories: - type: boolean - description: "Toggles whether organization members can create internal - repositories, which are visible to all enterprise members. You - can only allow members to create internal repositories if your - organization is associated with an enterprise account using GitHub - Enterprise Cloud or GitHub Enterprise Server 2.20+. Can be one - of: \n\\* `true` - all organization members can create internal - repositories. \n\\* `false` - only organization owners can create - internal repositories. \nDefault: `true`. For more information, - see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" - in the GitHub Help documentation." - members_can_create_private_repositories: - type: boolean - description: "Toggles whether organization members can create private - repositories, which are visible to organization members with permission. - Can be one of: \n\\* `true` - all organization members can create - private repositories. \n\\* `false` - only organization owners - can create private repositories. \nDefault: `true`. For more - information, see \"[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" - in the GitHub Help documentation." - members_can_create_public_repositories: - type: boolean - description: "Toggles whether organization members can create public - repositories, which are visible to anyone. Can be one of: \n\\* - `true` - all organization members can create public repositories. - \ \n\\* `false` - only organization owners can create public repositories. - \ \nDefault: `true`. For more information, see \"[Restricting - repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)\" - in the GitHub Help documentation." - members_allowed_repository_creation_type: - type: string - description: "Specifies which types of repositories non-admin organization - members can create. Can be one of: \n\\* `all` - all organization - members can create public and private repositories. \n\\* `private` - - members can create private repositories. This option is only - available to repositories that are part of an organization on - GitHub Enterprise Cloud. \n\\* `none` - only admin members can - create repositories. \n**Note:** This parameter is deprecated - and will be removed in the future. Its return value ignores internal - repositories. Using this parameter overrides values set in `members_can_create_repositories`. - See the parameter deprecation notice in the operation description - for details." - enum: - - all - - private - - none - members_can_create_pages: - type: boolean - description: "Toggles whether organization members can create GitHub - Pages sites. Can be one of: \n\\* `true` - all organization members - can create GitHub Pages sites. \n\\* `false` - no organization - members can create GitHub Pages sites. Existing published sites - will not be impacted." - default: true - members_can_create_public_pages: - type: boolean - description: "Toggles whether organization members can create public - GitHub Pages sites. Can be one of: \n\\* `true` - all organization - members can create public GitHub Pages sites. \n\\* `false` - - no organization members can create public GitHub Pages sites. - Existing published sites will not be impacted." - default: true - members_can_create_private_pages: - type: boolean - description: "Toggles whether organization members can create private - GitHub Pages sites. Can be one of: \n\\* `true` - all organization - members can create private GitHub Pages sites. \n\\* `false` - - no organization members can create private GitHub Pages sites. - Existing published sites will not be impacted." - default: true - members_can_fork_private_repositories: - type: boolean - description: "Toggles whether organization members can fork private - organization repositories. Can be one of: \n\\* `true` - all - organization members can fork private repositories within the - organization. \n\\* `false` - no organization members can fork - private repositories within the organization." - default: false - blog: - type: string - example: '"http://github.blog"' - example: - billing_email: mona@github.com - company: GitHub - email: mona@github.com - twitter_username: github - location: San Francisco - name: github - description: GitHub, the company. - default_repository_permission: read - members_can_create_repositories: true - members_allowed_repository_creation_type: all + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/audit-log-phrase" + - "$ref": "#/components/parameters/audit-log-include" + - "$ref": "#/components/parameters/audit-log-after" + - "$ref": "#/components/parameters/audit-log-before" + - "$ref": "#/components/parameters/audit-log-order" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/organization-full" + type: array + items: + "$ref": "#/components/schemas/audit-log-event" examples: default: - "$ref": "#/components/examples/organization-full" - '422': - description: Validation failed - content: - application/json: - schema: - oneOf: - - "$ref": "#/components/schemas/validation-error" - - "$ref": "#/components/schemas/validation-error-simple" - '409': - "$ref": "#/components/responses/conflict" + "$ref": "#/components/examples/audit-log" x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: - "/orgs/{org}/actions/permissions": + githubCloudOnly: true + enabledForGitHubApps: false + category: enterprise-admin + subcategory: audit-log + "/enterprises/{enterprise}/secret-scanning/alerts": get: - summary: Get GitHub Actions permissions for an organization + summary: List secret scanning alerts for an enterprise description: |- - 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. - operationId: actions/get-github-actions-permissions-organization + Lists secret scanning alerts for eligible repositories in an enterprise, from newest to oldest. + To use this endpoint, you must be a member of the enterprise, and you must use an access token with the `repo` scope or `security_events` scope. Alerts are only returned for organizations in the enterprise for which you are an organization owner or a [security manager](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization). tags: - - actions + - secret-scanning + operationId: secret-scanning/list-alerts-for-enterprise externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-enterprise parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/secret-scanning-alert-state" + - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" + - "$ref": "#/components/parameters/secret-scanning-alert-resolution" + - "$ref": "#/components/parameters/secret-scanning-alert-sort" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-organization-permissions" + type: array + items: + "$ref": "#/components/schemas/organization-secret-scanning-alert" examples: default: - "$ref": "#/components/examples/actions-organization-permissions" + "$ref": "#/components/examples/organization-secret-scanning-alert-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - put: - summary: Set GitHub Actions permissions for an organization + enabledForGitHubApps: false + category: secret-scanning + subcategory: + "/enterprises/{enterprise}/settings/billing/advanced-security": + get: + summary: Get GitHub Advanced Security active committers for an enterprise description: |- - Sets the GitHub Actions permissions policy for repositories and allowed actions in an organization. + Gets the GitHub Advanced Security active committers for an enterprise per repository. - 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. + Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of active_users for each repository. - 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. - operationId: actions/set-github-actions-permissions-organization + The total number of repositories with committer information is tracked by the `total_count` field. tags: - - actions + - billing + operationId: billing/get-github-advanced-security-billing-ghe externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/billing#export-advanced-security-active-committers-data-for-enterprise parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': - description: Response - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - enabled_repositories: - "$ref": "#/components/schemas/enabled-repositories" - allowed_actions: - "$ref": "#/components/schemas/allowed-actions" - required: - - enabled_repositories - example: - enabled_repositories: all - allowed_actions: selected + '200': + description: Success + content: + application/json: + schema: + "$ref": "#/components/schemas/advanced-security-active-committers" + examples: + default: + "$ref": "#/components/examples/advanced-security-active-committers" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - "/orgs/{org}/actions/permissions/repositories": + enabledForGitHubApps: false + category: enterprise-admin + subcategory: billing + "/events": get: - summary: List selected repositories enabled for GitHub Actions in an organization - description: |- - 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. - operationId: actions/list-selected-repositories-enabled-github-actions-organization + summary: List public events + description: 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. tags: - - actions + - activity + operationId: activity/list-public-events externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-public-events parameters: - - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -5410,258 +4869,204 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - repositories - properties: - total_count: - type: number - repositories: - type: array - items: - "$ref": "#/components/schemas/repository" + type: array + items: + "$ref": "#/components/schemas/event" examples: default: - "$ref": "#/components/examples/repository-paginated" + "$ref": "#/components/examples/public-events-items" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - put: - summary: Set selected repositories enabled for GitHub Actions in an organization - description: |- - 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. - operationId: actions/set-selected-repositories-enabled-github-actions-organization - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization - parameters: - - "$ref": "#/components/parameters/org" - responses: - '204': - description: Response - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - selected_repository_ids: - description: List of repository IDs to enable for GitHub Actions. - type: array - items: - type: integer - description: Unique identifier of the repository. - required: - - selected_repository_ids - example: - selected_repository_ids: - - 32 - - 42 - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - "/orgs/{org}/actions/permissions/repositories/{repository_id}": - put: - summary: Enable a selected repository for GitHub Actions in an organization - description: |- - 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. - operationId: actions/enable-selected-repository-github-actions-organization - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/repository-id" - responses: - '204': - description: Response - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - delete: - summary: Disable a selected repository for GitHub Actions in an organization - description: |- - 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. - operationId: actions/disable-selected-repository-github-actions-organization - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/repository-id" - responses: - '204': - description: Response - x-github: enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - "/orgs/{org}/actions/permissions/selected-actions": + category: activity + subcategory: events + "/feeds": get: - summary: Get allowed actions for an organization + summary: Get feeds description: |- - 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)."" + GitHub Enterprise Server 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: - 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. - operationId: actions/get-allowed-actions-organization + * **Timeline**: The GitHub Enterprise Server global public timeline + * **User**: The public timeline for any user, using [URI template](https://docs.github.com/enterprise-server@3.6/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 Enterprise Server. + + **Note**: Private feeds are only returned when [authenticating via Basic Auth](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication) since current feed URIs use the older, non revocable auth tokens. tags: - - actions + - activity + operationId: activity/get-feeds externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-allowed-actions-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-feeds + parameters: [] responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/selected-actions" + "$ref": "#/components/schemas/feed" examples: default: - "$ref": "#/components/examples/selected-actions" + "$ref": "#/components/examples/feed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - put: - summary: Set allowed actions for an organization - description: |- - 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. - operationId: actions/set-allowed-actions-organization - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" - responses: - '204': - description: Response - requestBody: - required: false - content: - application/json: - schema: - "$ref": "#/components/schemas/selected-actions" - examples: - selected_actions: - "$ref": "#/components/examples/selected-actions" - x-github: enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - "/orgs/{org}/actions/permissions/workflow": + category: activity + subcategory: feeds + "/gists": get: - summary: Get default workflow permissions - description: |- - Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, - as well if GitHub Actions can submit approving pull request reviews. - - You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `administration` organization permission to use this API. + summary: List gists for the authenticated user + description: 'Lists the authenticated user''s gists or if called anonymously, + this endpoint returns all public gists:' tags: - - actions - operationId: actions/get-github-actions-default-workflow-permissions-organization + - gists + operationId: gists/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-default-workflow-permissions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-gists-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-get-default-workflow-permissions" + type: array + items: + "$ref": "#/components/schemas/base-gist" examples: default: - "$ref": "#/components/examples/actions-default-workflow-permissions" + "$ref": "#/components/examples/base-gist-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: permissions - put: - summary: Set default workflow permissions + enabledForGitHubApps: false + category: gists + subcategory: + post: + summary: Create a gist description: |- - Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions - can submit approving pull request reviews. + Allows you to add a new gist with one or more files. - 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. + **Note:** Don't name your files "gistfile" with a numerical suffix. This is the format of the automatic naming scheme that Gist uses internally. + operationId: gists/create tags: - - actions - operationId: actions/set-github-actions-default-workflow-permissions-organization + - gists externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-default-workflow-permissions - parameters: - - "$ref": "#/components/parameters/org" - responses: - '204': - description: Response + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#create-a-gist + parameters: [] requestBody: - required: false + required: true content: application/json: schema: - "$ref": "#/components/schemas/actions-set-default-workflow-permissions" + properties: + description: + description: Description of the gist + example: Example Ruby script + type: string + files: + description: Names and content for the files that make up the gist + example: + hello.rb: + content: puts "Hello, World!" + type: object + additionalProperties: + type: object + properties: + content: + description: Content of the file + readOnly: false + type: string + required: + - content + public: + oneOf: + - description: Flag indicating whether the gist is public + example: true + type: boolean + default: false + - type: string + example: 'true' + default: 'false' + enum: + - 'true' + - 'false' + required: + - files + type: object examples: default: - "$ref": "#/components/examples/actions-default-workflow-permissions" + summary: Creating a gist + value: + description: Example of a gist + public: false + files: + README.md: + content: Hello World + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/gist-simple" + examples: + default: + "$ref": "#/components/examples/gist" + headers: + Location: + example: https://api.github.com/gists/aa5a315d61ae9438b18d + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: permissions - "/orgs/{org}/actions/runner-groups": + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/public": get: - summary: List self-hosted runner groups for an organization + summary: List public gists description: |- - 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. + List public gists sorted by most recently updated to least recently updated. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. - operationId: actions/list-self-hosted-runner-groups-for-org + Note: With [pagination](https://docs.github.com/enterprise-server@3.6/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. tags: - - actions + - gists + operationId: gists/list-public externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-public-gists parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/since" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -5670,529 +5075,441 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - runner_groups - properties: - total_count: - type: number - runner_groups: - type: array - items: - "$ref": "#/components/schemas/runner-groups-org" + type: array + items: + "$ref": "#/components/schemas/base-gist" examples: default: - "$ref": "#/components/examples/runner-groups-org" + "$ref": "#/components/examples/base-gist-items" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - post: - summary: Create a self-hosted runner group for an organization - description: |- - 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. - operationId: actions/create-self-hosted-runner-group-for-org + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/starred": + get: + summary: List starred gists + description: 'List the authenticated user''s starred gists:' tags: - - actions + - gists + operationId: gists/list-starred externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-starred-gists parameters: - - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - description: Name of the runner group. - type: string - visibility: - description: 'Visibility of a runner group. You can select all repositories, - select individual repositories, or limit access to private repositories. - Can be one of: `all`, `selected`, or `private`.' - type: string - enum: - - selected - - all - - private - default: all - selected_repository_ids: - description: List of repository IDs that can access the runner group. - type: array - items: - type: integer - description: Unique identifier of the repository. - runners: - description: List of runner IDs to add to the runner group. - type: array - items: - type: integer - description: Unique identifier of the runner. - allows_public_repositories: - description: Whether the runner group can be used by `public` repositories. - type: boolean - default: false - required: - - name - example: - name: Expensive hardware runners - visibility: selected - selected_repository_ids: - - 32 - - 91 - runners: - - 9 - - 2 + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/runner-groups-org" + type: array + items: + "$ref": "#/components/schemas/base-gist" examples: default: - "$ref": "#/components/examples/runner-group" + "$ref": "#/components/examples/base-gist-items" + headers: + Link: + "$ref": "#/components/headers/link" + '401': + "$ref": "#/components/responses/requires_authentication" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runner-groups/{runner_group_id}": + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/{gist_id}": get: - summary: Get a self-hosted runner group for an organization - description: |- - 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. - operationId: actions/get-self-hosted-runner-group-for-org + summary: Get a gist + description: '' tags: - - actions + - gists + operationId: gists/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#get-a-gist parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/gist-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/runner-groups-org" + "$ref": "#/components/schemas/gist-simple" examples: default: - "$ref": "#/components/examples/runner-group-item" + "$ref": "#/components/examples/gist" + '403': + "$ref": "#/components/responses/forbidden_gist" + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups + enabledForGitHubApps: false + category: gists + subcategory: patch: - summary: Update a self-hosted runner group for an organization - description: |- - 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. - operationId: actions/update-self-hosted-runner-group-for-org + summary: Update a gist + description: Allows you to update a gist's description and to update, delete, + or rename gist files. Files from the previous version of the gist that aren't + explicitly changed during an edit are unchanged. tags: - - actions + - gists + operationId: gists/update externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists/#update-a-gist parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/gist-id" requestBody: required: true content: application/json: schema: - type: object properties: - name: - description: Name of the runner group. - type: string - visibility: - description: 'Visibility of a runner group. You can select all repositories, - select individual repositories, or all private repositories. Can - be one of: `all`, `selected`, or `private`.' + description: + description: The description of the gist. + example: Example Ruby script type: string - enum: - - selected - - all - - private - allows_public_repositories: - description: Whether the runner group can be used by `public` repositories. - type: boolean - default: false - required: - - name - example: - name: Expensive hardware runners - visibility: selected + files: + description: |- + The gist files to be updated, renamed, or deleted. Each `key` must match the current filename + (including extension) of the targeted gist file. For example: `hello.py`. + + To delete a file, set the whole file to null. For example: `hello.py : null`. + example: + hello.rb: + content: blah + filename: goodbye.rb + type: object + additionalProperties: + type: object + nullable: true + properties: + content: + description: The new content of the file. + type: string + filename: + description: The new filename for the file. + type: string + nullable: true + anyOf: + - required: + - content + - required: + - filename + - type: object + maxProperties: 0 + anyOf: + - required: + - description + - required: + - files + type: object + nullable: true + examples: + updateGist: + summary: Updating a gist + value: + description: An updated gist description + files: + README.md: + content: Hello World from GitHub + deleteFile: + summary: Deleting a gist file + value: + files: + hello.py: + renameFile: + summary: Renaming a gist file + value: + files: + hello.py: + filename: goodbye.py responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/runner-groups-org" + "$ref": "#/components/schemas/gist-simple" examples: - default: - "$ref": "#/components/examples/runner-group" + updateGist: + "$ref": "#/components/examples/gist" + deleteFile: + "$ref": "#/components/examples/delete-gist-file" + renameFile: + "$ref": "#/components/examples/rename-gist-file" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups + enabledForGitHubApps: false + category: gists + subcategory: delete: - summary: Delete a self-hosted runner group from an organization - description: |- - 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. - operationId: actions/delete-self-hosted-runner-group-from-org + summary: Delete a gist + description: '' tags: - - actions + - gists + operationId: gists/delete externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#delete-a-gist parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/gist-id" responses: '204': description: Response + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/{gist_id}/comments": get: - summary: List repository access to a self-hosted runner group in an organization - description: |- - 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. - operationId: actions/list-repo-access-to-self-hosted-runner-group-in-org + summary: List gist comments + description: '' tags: - - actions + - gists + operationId: gists/list-comments externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-gist-comments parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/gist-id" - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - repositories - properties: - total_count: - type: number - repositories: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + type: array + items: + "$ref": "#/components/schemas/gist-comment" examples: default: - "$ref": "#/components/examples/minimal-repository-paginated" + "$ref": "#/components/examples/gist-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - put: - summary: Set repository access for a self-hosted runner group in an organization - description: |- - 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. - operationId: actions/set-repo-access-to-self-hosted-runner-group-in-org + enabledForGitHubApps: false + category: gists + subcategory: comments + post: + summary: Create a gist comment + description: '' tags: - - actions + - gists + operationId: gists/create-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#create-a-gist-comment parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/gist-id" requestBody: required: true content: application/json: schema: - type: object properties: - selected_repository_ids: - description: List of repository IDs that can access the runner group. - type: array - items: - type: integer - description: Unique identifier of the repository. + body: + description: The comment text. + type: string + maxLength: 65535 + example: Body of the attachment + type: object required: - - selected_repository_ids - example: - selected_repository_ids: - - 32 - - 91 - responses: - '204': - description: Response - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": - put: - summary: Add repository access to a self-hosted runner group in an organization - description: |- - 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. - operationId: actions/add-repo-access-to-self-hosted-runner-group-in-org - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#add-repository-acess-to-a-self-hosted-runner-group-in-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/repository-id" - responses: - '204': - description: Response - x-github: - enabledForGitHubApps: true - githubCloudOnly: true - category: actions - subcategory: self-hosted-runner-groups - delete: - summary: Remove repository access to a self-hosted runner group in an organization - description: |- - 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. - operationId: actions/remove-repo-access-to-self-hosted-runner-group-in-org - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/repository-id" + - body + examples: + default: + summary: Creating a comment in a gist + value: + body: This is a comment to a gist responses: - '204': + '201': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/gist-comment" + examples: + default: + "$ref": "#/components/examples/gist-comment" + headers: + Location: + example: https://api.github.com/gists/a6db0bec360bb87e9418/comments/1 + schema: + type: string + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": + enabledForGitHubApps: false + category: gists + subcategory: comments + "/gists/{gist_id}/comments/{comment_id}": get: - summary: List self-hosted runners in a group for an organization - description: |- - 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. - operationId: actions/list-self-hosted-runners-in-group-for-org + summary: Get a gist comment + description: '' tags: - - actions + - gists + operationId: gists/get-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#get-a-gist-comment parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/comment-id" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - runners - properties: - total_count: - type: number - runners: - type: array - items: - "$ref": "#/components/schemas/runner" + "$ref": "#/components/schemas/gist-comment" examples: default: - "$ref": "#/components/examples/runner-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/gist-comment" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden_gist" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - put: - summary: Set self-hosted runners in a group for an organization - description: |- - 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. - operationId: actions/set-self-hosted-runners-in-group-for-org + enabledForGitHubApps: false + category: gists + subcategory: comments + patch: + summary: Update a gist comment + description: '' tags: - - actions + - gists + operationId: gists/update-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#update-a-gist-comment parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: application/json: schema: - type: object properties: - runners: - description: List of runner IDs to add to the runner group. - type: array - items: - type: integer - description: Unique identifier of the runner. + body: + description: The comment text. + type: string + maxLength: 65535 + example: Body of the attachment + type: object required: - - runners - example: - runners: - - 9 - - 2 - responses: - '204': - description: Response - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": - put: - summary: Add a self-hosted runner to a group for an organization - description: |- - 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. - operationId: actions/add-self-hosted-runner-to-group-for-org - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/runner-id" + - body + examples: + default: + summary: Updating a comment in a gist + value: + body: This is an update to a comment in a gist responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/gist-comment" + examples: + default: + "$ref": "#/components/examples/gist-comment" + '404': + "$ref": "#/components/responses/not_found" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups + enabledForGitHubApps: false + category: gists + subcategory: comments delete: - summary: Remove a self-hosted runner from a group for an organization - description: |- - 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. - operationId: actions/remove-self-hosted-runner-from-group-for-org + summary: Delete a gist comment + description: '' tags: - - actions + - gists + operationId: gists/delete-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#delete-a-gist-comment parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-group-id" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/comment-id" responses: '204': description: Response + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: self-hosted-runner-groups - "/orgs/{org}/actions/runners": + enabledForGitHubApps: false + category: gists + subcategory: comments + "/gists/{gist_id}/commits": get: - summary: List self-hosted runners for an organization - description: |- - 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. + summary: List gist commits + description: '' tags: - - actions - operationId: actions/list-self-hosted-runners-for-org + - gists + operationId: gists/list-commits externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-gist-commits parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/gist-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -6201,43 +5518,42 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - runners - properties: - total_count: - type: integer - runners: - type: array - items: - "$ref": "#/components/schemas/runner" + type: array + items: + "$ref": "#/components/schemas/gist-commit" examples: default: - "$ref": "#/components/examples/runner-paginated" + "$ref": "#/components/examples/gist-commit-items" headers: Link: - "$ref": "#/components/headers/link" + example: ; rel="next" + schema: + type: string + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/downloads": + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/{gist_id}/forks": get: - summary: List runner applications for an organization - description: |- - 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. + summary: List gist forks + description: '' tags: - - actions - operationId: actions/list-runner-applications-for-org + - gists + operationId: gists/list-forks externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-runner-applications-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-gist-forks parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/gist-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -6246,342 +5562,417 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/runner-application" + "$ref": "#/components/schemas/gist-simple" examples: default: - "$ref": "#/components/examples/runner-application-items" + "$ref": "#/components/examples/gist-fork-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/registration-token": + enabledForGitHubApps: false + category: gists + subcategory: post: - summary: Create a registration token for an organization - description: |- - 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 - ``` + summary: Fork a gist + description: '' tags: - - actions - operationId: actions/create-registration-token-for-org + - gists + operationId: gists/fork externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-registration-token-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#fork-a-gist parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/gist-id" responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" + "$ref": "#/components/schemas/base-gist" examples: default: - "$ref": "#/components/examples/authentication-token" + "$ref": "#/components/examples/base-gist" + headers: + Location: + example: https://api.github.com/gists/aa5a315d61ae9438b18d + schema: + type: string + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/remove-token": - post: - summary: Create a remove token for an organization - description: |- - 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 - ``` + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/{gist_id}/star": + get: + summary: Check if a gist is starred + description: '' tags: - - actions - operationId: actions/create-remove-token-for-org + - gists + operationId: gists/check-is-starred externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-remove-token-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#check-if-a-gist-is-starred parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/gist-id" responses: - '201': - description: Response + '204': + description: Response if gist is starred + '404': + description: Not Found if gist is not starred content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" - examples: - default: - "$ref": "#/components/examples/authentication-token-2" + type: object + properties: {} + additionalProperties: false + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/{runner_id}": - get: - summary: Get a self-hosted runner for an organization - description: |- - 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. + enabledForGitHubApps: false + category: gists + subcategory: + put: + summary: Star a gist + description: 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - - actions - operationId: actions/get-self-hosted-runner-for-org + - gists + operationId: gists/star externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#star-a-gist parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/gist-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/runner" - examples: - default: - "$ref": "#/components/examples/runner" + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners + enabledForGitHubApps: false + category: gists + subcategory: delete: - summary: Delete a self-hosted runner from an organization - description: |- - 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. + summary: Unstar a gist + description: '' tags: - - actions - operationId: actions/delete-self-hosted-runner-from-org + - gists + operationId: gists/unstar externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#unstar-a-gist parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/gist-id" responses: '204': description: Response + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/{runner_id}/labels": + enabledForGitHubApps: false + category: gists + subcategory: + "/gists/{gist_id}/{sha}": get: - summary: List labels for a self-hosted runner for an organization - description: |- - Lists all labels for a self-hosted runner configured in an organization. - - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + summary: Get a gist revision + description: '' tags: - - actions - operationId: actions/list-labels-for-self-hosted-runner-for-org + - gists + operationId: gists/get-revision externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#get-a-gist-revision parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/gist-id" + - name: sha + in: path + required: true + schema: + type: string responses: '200': - "$ref": "#/components/responses/actions_runner_labels" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/gist-simple" + examples: + default: + "$ref": "#/components/examples/gist" + '422': + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - post: - summary: Add custom labels to a self-hosted runner for an organization - description: |- - Add custom labels to a self-hosted runner configured in an organization. - - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + enabledForGitHubApps: false + category: gists + subcategory: + "/gitignore/templates": + get: + summary: Get all gitignore templates + description: List all templates available to pass as an option when [creating + a repository](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-for-the-authenticated-user). + operationId: gitignore/get-all-templates tags: - - actions - operationId: actions/add-custom-labels-to-self-hosted-runner-for-org + - gitignore externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - labels - properties: - labels: - type: array - minItems: 1 - maxItems: 100 - description: The names of the custom labels to add to the runner. - items: - type: string - example: - labels: - - gpu - - accelerated + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gitignore#get-all-gitignore-templates + parameters: [] responses: '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + description: Response + content: + application/json: + schema: + type: array + items: + type: string + examples: + default: + value: + - Actionscript + - Android + - AppceleratorTitanium + - Autotools + - Bancha + - C + - C++ + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - put: - summary: Set custom labels for a self-hosted runner for an organization + category: gitignore + subcategory: + "/gitignore/templates/{name}": + get: + summary: Get a gitignore template description: |- - Remove all previous custom labels and set the new custom labels for a specific - self-hosted runner configured in an organization. - - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + The API also allows fetching the source of a single template. + Use the raw [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) to get the raw contents. + operationId: gitignore/get-template tags: - - actions - operationId: actions/set-custom-labels-for-self-hosted-runner-for-org + - gitignore externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gitignore#get-a-gitignore-template parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" - requestBody: + - name: name + in: path required: true - content: - application/json: - schema: - type: object - required: - - labels - properties: - labels: - type: array - minItems: 0 - maxItems: 100 - description: The names of the custom labels to set for the runner. - You can pass an empty array to remove all custom labels. - items: - type: string - example: - labels: - - gpu - - accelerated + schema: + type: string responses: '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/gitignore-template" + examples: + default: + "$ref": "#/components/examples/gitignore-template" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - delete: - summary: Remove all custom labels from a self-hosted runner for an organization + category: gitignore + subcategory: + "/installation/repositories": + get: + summary: List repositories accessible to the app installation description: |- - Remove all custom labels from a self-hosted runner configured in an - organization. Returns the remaining read-only labels from the runner. + List repositories that an app installation can access. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. tags: - - actions - operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-org + - apps + operationId: apps/list-repos-accessible-to-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#list-repositories-accessible-to-the-app-installation parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - "$ref": "#/components/responses/actions_runner_labels_readonly" - '404': - "$ref": "#/components/responses/not_found" + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - repositories + properties: + total_count: + type: integer + repositories: + type: array + items: + "$ref": "#/components/schemas/repository" + repository_selection: + type: string + example: selected + examples: + default: + "$ref": "#/components/examples/repository-paginated-2" + headers: + Link: + "$ref": "#/components/headers/link" + '403': + "$ref": "#/components/responses/forbidden" + '304': + "$ref": "#/components/responses/not_modified" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": + category: apps + subcategory: installations + "/installation/token": delete: - summary: Remove a custom label from a self-hosted runner for an organization + summary: Revoke an installation access token description: |- - Remove a custom label from a self-hosted runner configured - in an organization. Returns the remaining labels from the runner. + Revokes the installation token you're using to authenticate as an installation and access this endpoint. - This endpoint returns a `404 Not Found` status if the custom label is not - present on the runner. + 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/enterprise-server@3.6/rest/reference/apps#create-an-installation-access-token-for-an-app)" endpoint. - You must authenticate using an access token with the `admin:org` scope to use this endpoint. + You must use an [installation access token](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint. tags: - - actions - operationId: actions/remove-custom-label-from-self-hosted-runner-for-org + - apps + operationId: apps/revoke-installation-access-token externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/runner-id" - - "$ref": "#/components/parameters/runner-label-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#revoke-an-installation-access-token + parameters: [] responses: - '200': - "$ref": "#/components/responses/actions_runner_labels" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + '204': + description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/orgs/{org}/actions/secrets": + category: apps + subcategory: installations + "/issues": get: - summary: List organization secrets - description: 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. + summary: List issues assigned to the authenticated user + description: |- + 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. tags: - - actions - operationId: actions/list-org-secrets + - issues + operationId: issues/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-organization-secrets + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-issues-assigned-to-the-authenticated-user parameters: - - "$ref": "#/components/parameters/org" + - name: filter + description: Indicates which sorts of issues to return. `assigned` means issues + assigned to you. `created` means issues created by you. `mentioned` means + issues mentioning you. `subscribed` means issues you're subscribed to updates + for. `all` or `repos` means all issues you can see, regardless of participation + or creation. + in: query + required: false + schema: + type: string + enum: + - assigned + - created + - mentioned + - subscribed + - repos + - all + default: assigned + - name: state + description: Indicates the state of the issues to return. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - "$ref": "#/components/parameters/labels" + - name: sort + description: What to sort results by. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - comments + default: created + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/since" + - name: collab + in: query + required: false + schema: + type: boolean + - name: orgs + in: query + required: false + schema: + type: boolean + - name: owned + in: query + required: false + schema: + type: boolean + - name: pulls + in: query + required: false + schema: + type: boolean - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -6590,439 +5981,244 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/organization-actions-secret" + type: array + items: + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/organization-actions-secret-paginated" + "$ref": "#/components/examples/issue-with-repo-items" headers: Link: "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: secrets - "/orgs/{org}/actions/secrets/public-key": + enabledForGitHubApps: false + category: issues + subcategory: + "/licenses": get: - summary: Get an organization public key - description: 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. + summary: Get all commonly used licenses + description: '' tags: - - actions - operationId: actions/get-org-public-key + - licenses + operationId: licenses/get-all-commonly-used externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-an-organization-public-key + url: https://docs.github.com/enterprise-server@3.6/rest/reference/licenses#get-all-commonly-used-licenses parameters: - - "$ref": "#/components/parameters/org" + - name: featured + in: query + required: false + schema: + type: boolean + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-public-key" + type: array + items: + "$ref": "#/components/schemas/license-simple" examples: default: - "$ref": "#/components/examples/actions-public-key" + "$ref": "#/components/examples/license-simple-items" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/orgs/{org}/actions/secrets/{secret_name}": + category: licenses + subcategory: + "/licenses/{license}": get: - summary: Get an organization secret - description: 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. + summary: Get a license + description: '' tags: - - actions - operationId: actions/get-org-secret + - licenses + operationId: licenses/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/licenses#get-a-license parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" + - name: license + in: path + required: true + schema: + type: string responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/organization-actions-secret" + "$ref": "#/components/schemas/license" examples: default: - "$ref": "#/components/examples/organization-actions-secret" + "$ref": "#/components/examples/license" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - put: - summary: Create or update an organization secret - description: |- - Creates or updates an organization secret with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to - use this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` - - #### Example encrypting a secret using C# - - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - - ``` - var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - - var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - - Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - ``` - - #### Example encrypting a secret using Ruby - - Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - - ```ruby - require "rbnacl" - require "base64" - - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) - - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") - - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + category: licenses + subcategory: + "/markdown": + post: + summary: Render a Markdown document + description: '' + operationId: markdown/render tags: - - actions - operationId: actions/create-or-update-org-secret + - markdown externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-or-update-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/markdown#render-a-markdown-document + parameters: [] requestBody: required: true content: application/json: schema: - type: object properties: - encrypted_value: + text: + description: The Markdown text to render in HTML. type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get an organization public - key](https://docs.github.com/rest/reference/actions#get-an-organization-public-key) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: + mode: + description: The rendering mode. + enum: + - markdown + - gfm + default: markdown + example: markdown type: string - description: ID of the key you used to encrypt the secret. - visibility: + context: + description: The repository context to use when creating references + in `gfm` mode. For example, setting `context` to `octo-org/octo-repo` + will change the text `#42` into an HTML link to issue 42 in the + `octo-org/octo-repo` repository. type: string - description: "Configures the access that repositories have to the - organization secret. Can be one of: \n\\- `all` - All repositories - in an organization can access the secret. \n\\- `private` - Private - repositories in an organization can access the secret. \n\\- - `selected` - Only specific repositories can access the secret." - enum: - - all - - private - - selected - selected_repository_ids: - type: array - description: An array of repository ids that can access the organization - secret. You can only provide a list of repository ids when the - `visibility` is set to `selected`. You can manage the list of - selected repositories using the [List selected repositories for - an organization secret](https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret), - [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret), - and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) - endpoints. - items: - type: string required: - - visibility - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' - visibility: selected - selected_repository_ids: - - '1296269' - - '1296280' + - text + type: object responses: - '201': - description: Response when creating a secret + '200': + description: Response + headers: + Content-Type: + "$ref": "#/components/headers/content-type" + Content-Length: + example: '279' + schema: + type: string + X-CommonMarker-Version: + "$ref": "#/components/headers/x-common-marker-version" content: - application/json: + text/html: schema: - "$ref": "#/components/schemas/empty-object" - '204': - description: Response when updating a secret + type: string + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - delete: - summary: Delete an organization secret - description: 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. + category: markdown + subcategory: + "/markdown/raw": + post: + summary: Render a Markdown document in raw mode + description: 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. + operationId: markdown/render-raw tags: - - actions - operationId: actions/delete-org-secret + - markdown externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/markdown#render-a-markdown-document-in-raw-mode + parameters: [] + requestBody: + required: false + content: + text/plain: + schema: + type: string + text/x-markdown: + schema: + type: string responses: - '204': + '200': description: Response + headers: + X-CommonMarker-Version: + "$ref": "#/components/headers/x-common-marker-version" + content: + text/html: + schema: + type: string + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/orgs/{org}/actions/secrets/{secret_name}/repositories": + category: markdown + subcategory: + "/meta": get: - summary: List selected repositories for an organization secret - description: 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. + summary: Get GitHub Enterprise Server meta information + description: '' tags: - - actions - operationId: actions/list-selected-repos-for-org-secret + - meta + operationId: meta/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-selected-repositories-for-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/meta#get-github-meta-information + parameters: [] responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - repositories - properties: - total_count: - type: integer - repositories: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/api-overview" examples: default: - "$ref": "#/components/examples/public-repository-paginated" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: secrets - put: - summary: Set selected repositories for an organization secret - description: 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. - tags: - - actions - operationId: actions/set-selected-repos-for-org-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - selected_repository_ids: - type: array - description: An array of repository ids that can access the organization - secret. You can only provide a list of repository ids when the - `visibility` is set to `selected`. You can add and remove individual - repositories using the [Set selected repositories for an organization - secret](https://docs.github.com/rest/reference/actions#set-selected-repositories-for-an-organization-secret) - and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret) - endpoints. - items: - type: integer - required: - - selected_repository_ids - example: - selected_repository_ids: - - 64780797 - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: secrets - "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": - put: - summary: Add selected repository to an organization secret - description: 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. - tags: - - actions - operationId: actions/add-selected-repo-to-org-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#add-selected-repository-to-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer - responses: - '204': - description: No Content when repository was added to the selected list - '409': - description: Conflict when visibility type is not set to selected - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: secrets - delete: - summary: Remove selected repository from an organization secret - description: 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. - tags: - - actions - operationId: actions/remove-selected-repo-from-org-secret - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-selected-repository-from-an-organization-secret - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer - responses: - '204': - description: Response when repository was removed from the selected list - '409': - description: Conflict when visibility type not set to selected + "$ref": "#/components/examples/api-overview" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/orgs/{org}/audit-log": + category: meta + subcategory: + "/networks/{owner}/{repo}/events": get: - summary: Get the audit log for an organization - description: |- - Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization)." - - This endpoint is available for organizations on GitHub Enterprise Cloud. To use this endpoint, you must be an organization owner, and you must use an access token with the `admin:org` scope. GitHub Apps must have the `organization_administration` read permission to use this endpoint. - operationId: orgs/get-audit-log + summary: List public events for a network of repositories + description: '' tags: - - orgs + - activity + operationId: activity/list-public-events-for-repo-network externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-audit-log + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-public-events-for-a-network-of-repositories parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/audit-log-phrase" - - "$ref": "#/components/parameters/audit-log-include" - - "$ref": "#/components/parameters/audit-log-after" - - "$ref": "#/components/parameters/audit-log-before" - - "$ref": "#/components/parameters/audit-log-order" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -7031,27 +6227,46 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/audit-log-event" + "$ref": "#/components/schemas/event" examples: default: - "$ref": "#/components/examples/audit-log" + "$ref": "#/components/examples/public-repo-events-items" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '304': + "$ref": "#/components/responses/not_modified" + '301': + "$ref": "#/components/responses/moved_permanently" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: - "/orgs/{org}/blocks": + category: activity + subcategory: events + "/notifications": get: - summary: List users blocked by an organization - description: List the users blocked by an organization. + summary: List notifications for the authenticated user + description: List all notifications for the current user, sorted by most recently + updated. tags: - - orgs - operationId: orgs/list-blocked-users + - activity + operationId: activity/list-notifications-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-users-blocked-by-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/all" + - "$ref": "#/components/parameters/participating" + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/before" + - "$ref": "#/components/parameters/page" + - name: per_page + description: The number of results per page (max 50). + in: query + schema: + type: integer + default: 50 responses: '200': description: Response @@ -7060,524 +6275,623 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/thread" examples: default: - "$ref": "#/components/examples/simple-user-items" - '415': - "$ref": "#/components/responses/preview_header_missing" + "$ref": "#/components/examples/thread-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: blocking - "/orgs/{org}/blocks/{username}": - get: - summary: Check if a user is blocked by an organization - description: '' + enabledForGitHubApps: false + category: activity + subcategory: notifications + put: + summary: Mark notifications as read + description: Marks all notifications as "read" for the current user. If the + number of notifications is too large to complete in one request, you will + receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user) + endpoint and pass the query parameter `all=false`. tags: - - orgs - operationId: orgs/check-blocked-user + - activity + operationId: activity/mark-notifications-as-read externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#check-if-a-user-is-blocked-by-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#mark-notifications-as-read + parameters: [] + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + last_read_at: + description: 'Describes the last point that notifications were checked. + Anything updated since this time will not be marked as read. If + you omit this parameter, all notifications are marked as read. + This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.' + type: string + format: date-time + read: + description: Whether the notification has been read. + type: boolean + examples: + default: + value: + last_read_at: '2022-06-10T00:00:00Z' + read: true responses: - '204': - description: 'If the user is blocked:' - '404': - description: 'If the user is not blocked:' + '202': + description: Response content: application/json: schema: - "$ref": "#/components/schemas/basic-error" + type: object + properties: + message: + type: string + examples: + default: + "$ref": "#/components/examples/notifications-mark-read" + '205': + description: Reset Content + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: blocking - put: - summary: Block a user from an organization - description: '' + enabledForGitHubApps: false + category: activity + subcategory: notifications + "/notifications/threads/{thread_id}": + get: + summary: Get a thread + description: Gets information about a notification thread. tags: - - orgs - operationId: orgs/block-user + - activity + operationId: activity/get-thread externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#block-a-user-from-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-thread parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/thread-id" responses: - '204': + '200': description: Response - '422': - "$ref": "#/components/responses/validation_failed" + content: + application/json: + schema: + "$ref": "#/components/schemas/thread" + examples: + default: + "$ref": "#/components/examples/thread" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: blocking - delete: - summary: Unblock a user from an organization - description: '' + enabledForGitHubApps: false + category: activity + subcategory: notifications + patch: + summary: Mark a thread as read + description: 'Marks a thread as "read." Marking a thread as "read" is equivalent + to clicking a notification in your notification inbox on GitHub Enterprise + Server: https://github.com/notifications.' tags: - - orgs - operationId: orgs/unblock-user + - activity + operationId: activity/mark-thread-as-read externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#unblock-a-user-from-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#mark-a-thread-as-read parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/thread-id" responses: - '204': - description: Response + '205': + description: Reset Content + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: blocking - "/orgs/{org}/code-scanning/alerts": + enabledForGitHubApps: false + category: activity + subcategory: notifications + "/notifications/threads/{thread_id}/subscription": get: - summary: List code scanning alerts for an organization + summary: Get a thread subscription for the authenticated user description: |- - Lists all code scanning alerts for the default branch (usually `main` - or `master`) for all eligible repositories in an organization. - To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + This checks to see if the current user is subscribed to a thread. You can also [get a repository subscription](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription). - GitHub Apps must have the `security_events` read permission to use this endpoint. + 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. tags: - - code-scanning - operationId: code-scanning/list-alerts-for-org + - activity + operationId: activity/get-thread-subscription-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-by-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-thread-subscription-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/pagination-before" - - "$ref": "#/components/parameters/pagination-after" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/direction" - - name: state - description: Set to `open`, `closed, `fixed`, or `dismissed` to list code - scanning alerts in a specific state. - in: query - required: false - schema: - "$ref": "#/components/schemas/code-scanning-alert-state" - - name: sort - description: Can be one of `created`, `updated`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - default: created + - "$ref": "#/components/parameters/thread-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/code-scanning-organization-alert-items" + "$ref": "#/components/schemas/thread-subscription" examples: default: - "$ref": "#/components/examples/code-scanning-organization-alert-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/thread-subscription" + '304': + "$ref": "#/components/responses/not_modified" '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: code-scanning - subcategory: - "/orgs/{org}/credential-authorizations": - get: - summary: List SAML SSO authorizations for an organization + enabledForGitHubApps: false + category: activity + subcategory: notifications + put: + summary: Set a thread subscription description: |- - Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). + 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. - An authenticated organization owner with the `read:org` scope can list all credential authorizations for an organization that uses SAML single sign-on (SSO). The credentials are either personal access tokens or SSH keys that organization members have authorized for the organization. For more information, see [About authentication with SAML single sign-on](https://docs.github.com/en/articles/about-authentication-with-saml-single-sign-on). + 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/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription) endpoint. tags: - - orgs - operationId: orgs/list-saml-sso-authorizations + - activity + operationId: activity/set-thread-subscription externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-saml-sso-authorizations-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - name: page - description: Page token - in: query - schema: - type: integer - - name: login - description: Limits the list of credentials authorizations for an organization - to a specific login - in: query - schema: - type: string + - "$ref": "#/components/parameters/thread-id" + requestBody: + required: false + content: + application/json: + schema: + properties: + ignored: + description: Whether to block all notifications from a thread. + default: false + type: boolean + type: object + examples: + default: + value: + ignored: false responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/credential-authorization" + "$ref": "#/components/schemas/thread-subscription" examples: default: - "$ref": "#/components/examples/credential-authorization-items" + "$ref": "#/components/examples/thread-subscription" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: true - enabledForGitHubApps: true - category: orgs - subcategory: - "/orgs/{org}/credential-authorizations/{credential_id}": + githubCloudOnly: false + enabledForGitHubApps: false + category: activity + subcategory: notifications delete: - summary: Remove a SAML SSO authorization for an organization - description: |- - Listing and deleting credential authorizations is available to organizations with GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products). - - An authenticated organization owner with the `admin:org` scope can remove a credential authorization for an organization that uses SAML SSO. Once you remove someone's credential authorization, they will need to create a new personal access token or SSH key and authorize it for the organization they want to access. + summary: Delete a thread subscription + description: 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/enterprise-server@3.6/rest/reference/activity#set-a-thread-subscription) + endpoint and set `ignore` to `true`. tags: - - orgs - operationId: orgs/remove-saml-sso-authorization + - activity + operationId: activity/delete-thread-subscription externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#remove-a-saml-sso-authorization-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-thread-subscription parameters: - - "$ref": "#/components/parameters/org" - - name: credential_id - in: path - required: true - schema: - type: integer + - "$ref": "#/components/parameters/thread-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - githubCloudOnly: true + githubCloudOnly: false + enabledForGitHubApps: false + category: activity + subcategory: notifications + "/octocat": + get: + summary: Get Octocat + description: Get the octocat as ASCII art + tags: + - meta + operationId: meta/get-octocat + parameters: + - name: s + in: query + description: The words to show in Octocat's speech bubble + schema: + type: string + required: false + responses: + '200': + description: Response + content: + application/octocat-stream: + schema: + type: string + examples: + default: + "$ref": "#/components/examples/octocat" + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/meta#get-octocat + x-github: + githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: - "/orgs/{org}/dependabot/secrets": + category: meta + "/organizations": get: - summary: List organization secrets - description: Lists all secrets available in an organization without revealing - their encrypted values. You must authenticate using an access token with the - `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` - organization permission to use this endpoint. + summary: List organizations + description: |- + Lists all organizations, in the order that they were created on GitHub Enterprise Server. + + **Note:** Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of organizations. tags: - - dependabot - operationId: dependabot/list-org-secrets + - orgs + operationId: orgs/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#list-organization-secrets + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organizations parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/since-org" - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/organization-dependabot-secret" + type: array + items: + "$ref": "#/components/schemas/organization-simple" examples: default: - "$ref": "#/components/examples/organization-dependabot-secret-paginated" + "$ref": "#/components/examples/organization-simple-items" headers: Link: - "$ref": "#/components/headers/link" + example: ; rel="next" + schema: + type: string + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/orgs/{org}/dependabot/secrets/public-key": + category: orgs + subcategory: + "/organizations/{organization_id}/custom_roles": get: - summary: Get an organization public key - description: Gets your public key, which you need to encrypt secrets. You need - to encrypt a secret before you can create or update secrets. You must authenticate - using an access token with the `admin:org` scope to use this endpoint. GitHub - Apps must have the `dependabot_secrets` organization permission to use this - endpoint. + summary: List custom repository roles in an organization + description: |- + List the custom repository roles available in this organization. In order to see custom + repository roles in an organization, the authenticated user must be an organization owner. + + To use this endpoint the authenticated user must be an administrator for the organization or of an repository of the organizaiton and must use an access token with `admin:org repo` scope. + GitHub Apps must have the `organization_custom_roles:read` organization permission to use this endpoint. + + For more information on custom repository roles, see "[Managing custom repository roles for an organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)". tags: - - dependabot - operationId: dependabot/get-org-public-key + - orgs + operationId: orgs/list-custom-roles externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-custom-repository-roles-in-an-organization parameters: - - "$ref": "#/components/parameters/org" + - name: organization_id + description: The unique identifier of the organization. + in: path + required: true + schema: + type: string responses: '200': - description: Response + description: Response - list of custom role names content: application/json: schema: - "$ref": "#/components/schemas/dependabot-public-key" + type: object + properties: + total_count: + description: The number of custom roles in this organization + example: 3 + type: integer + custom_roles: + type: array + items: + "$ref": "#/components/schemas/organization-custom-repository-role" examples: default: - "$ref": "#/components/examples/dependabot-public-key" + "$ref": "#/components/examples/organization-custom-repository-role-example" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/orgs/{org}/dependabot/secrets/{secret_name}": + category: orgs + subcategory: custom_roles + "/orgs/{org}": get: - summary: Get an organization secret - description: Gets a single organization secret without revealing its encrypted - value. You must authenticate using an access token with the `admin:org` scope - to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. + summary: Get an organization + description: |- + To see many of the organization response values, you need to be an authenticated organization owner with the `admin:org` scope. When the value of `two_factor_requirement_enabled` is `true`, the organization requires all members, billing managers, and outside collaborators to enable [two-factor authentication](https://docs.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/). + + GitHub Apps with the `Organization plan` permission can use this endpoint to retrieve information about an organization's GitHub Enterprise Server plan. See "[Authenticating with GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/)" for details. For an example response, see 'Response with GitHub Enterprise Server plan information' below." tags: - - dependabot - operationId: dependabot/get-org-secret + - orgs + operationId: orgs/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#get-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/organization-dependabot-secret" + "$ref": "#/components/schemas/organization-full" examples: - default: - "$ref": "#/components/examples/organization-dependabot-secret" + default-response: + "$ref": "#/components/examples/organization-full-default-response" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - put: - summary: Create or update an organization secret + category: orgs + subcategory: + patch: + summary: Update an organization description: |- - Creates or updates an organization secret with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` - - #### Example encrypting a secret using C# - - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - - ``` - var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - - var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - - Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - ``` - - #### Example encrypting a secret using Ruby - - Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - - ```ruby - require "rbnacl" - require "base64" - - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) - - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") + **Parameter Deprecation Notice:** GitHub Enterprise Server 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). - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + Enables an authenticated organization owner with the `admin:org` scope to update the organization's profile and member privileges. tags: - - dependabot - operationId: dependabot/create-or-update-org-secret + - orgs + operationId: orgs/update externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs/#update-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - encrypted_value: + billing_email: type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get an organization public - key](https://docs.github.com/rest/reference/dependabot#get-an-organization-public-key) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: + description: Billing email address. This address is not publicized. + company: type: string - description: ID of the key you used to encrypt the secret. - visibility: + description: The company name. + email: + type: string + description: The publicly visible email address. + twitter_username: + type: string + description: The Twitter username of the company. + location: + type: string + description: The location. + name: + type: string + description: The shorthand name of the company. + description: + type: string + description: The description of the company. + has_organization_projects: + type: boolean + description: Whether an organization can use organization projects. + has_repository_projects: + type: boolean + description: Whether repositories that belong to the organization + can use repository projects. + default_repository_permission: + type: string + description: Default permission level members have for organization + repositories. + enum: + - read + - write + - admin + - none + default: read + members_can_create_repositories: + type: boolean + description: Whether of non-admin organization members can create + repositories. **Note:** A parameter can override this parameter. + See `members_allowed_repository_creation_type` in this table for + details. + default: true + members_can_create_internal_repositories: + type: boolean + description: 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+. For more information, + see "[Restricting repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" + in the GitHub Help documentation. + members_can_create_private_repositories: + type: boolean + description: Whether organization members can create private repositories, + which are visible to organization members with permission. For + more information, see "[Restricting repository creation in your + organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" + in the GitHub Help documentation. + members_can_create_public_repositories: + type: boolean + description: Whether organization members can create public repositories, + which are visible to anyone. For more information, see "[Restricting + repository creation in your organization](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/restricting-repository-creation-in-your-organization)" + in the GitHub Help documentation. + members_allowed_repository_creation_type: type: string - description: "Configures the access that repositories have to the - organization secret. Can be one of: \n\\- `all` - All repositories - in an organization can access the secret. \n\\- `private` - Private - repositories in an organization can access the secret. \n\\- - `selected` - Only specific repositories can access the secret." + description: "Specifies which types of repositories non-admin organization + members can create. \n**Note:** This parameter is deprecated and + will be removed in the future. Its return value ignores internal + repositories. Using this parameter overrides values set in `members_can_create_repositories`. + See the parameter deprecation notice in the operation description + for details." enum: - all - private - - selected - selected_repository_ids: - type: array - description: An array of repository ids that can access the organization - secret. You can only provide a list of repository ids when the - `visibility` is set to `selected`. You can manage the list of - selected repositories using the [List selected repositories for - an organization secret](https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), - [Set selected repositories for an organization secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), - and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) - endpoints. - items: - type: string - required: - - visibility - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' - visibility: selected - selected_repository_ids: - - '1296269' - - '1296280' + - none + members_can_create_pages: + type: boolean + description: Whether organization members can create GitHub Pages + sites. Existing published sites will not be impacted. + default: true + members_can_fork_private_repositories: + type: boolean + description: Whether organization members can fork private organization + repositories. + default: false + web_commit_signoff_required: + type: boolean + description: Whether contributors to organization repositories are + required to sign off on commits they make through GitHub's web + interface. + default: false + blog: + type: string + example: '"http://github.blog"' + examples: + default: + value: + billing_email: mona@github.com + company: GitHub + email: mona@github.com + twitter_username: github + location: San Francisco + name: github + description: GitHub, the company. + default_repository_permission: read + members_can_create_repositories: true + members_allowed_repository_creation_type: all responses: - '201': - description: Response when creating a secret + '200': + description: Response content: application/json: schema: - "$ref": "#/components/schemas/empty-object" - '204': - description: Response when updating a secret + "$ref": "#/components/schemas/organization-full" + examples: + default: + "$ref": "#/components/examples/organization-full" + '422': + description: Validation failed + content: + application/json: + schema: + oneOf: + - "$ref": "#/components/schemas/validation-error" + - "$ref": "#/components/schemas/validation-error-simple" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - delete: - summary: Delete an organization secret - description: Deletes a secret in an organization using the secret name. You - must authenticate using an access token with the `admin:org` scope to use - this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. + category: orgs + subcategory: + "/orgs/{org}/actions/cache/usage": + get: + summary: Get GitHub Actions cache usage for an organization + description: |- + Gets the total GitHub Actions cache usage for an organization. + The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. tags: - - dependabot - operationId: dependabot/delete-org-secret + - actions + operationId: actions/get-actions-cache-usage-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#delete-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-cache-usage-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-cache-usage-org-enterprise" + examples: + default: + "$ref": "#/components/examples/actions-cache-usage-org-enterprise" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": + category: actions + subcategory: cache + "/orgs/{org}/actions/cache/usage-by-repository": get: - summary: List selected repositories for an organization secret - description: Lists all repositories that have been selected when the `visibility` - for repository access to a secret is set to `selected`. You must authenticate - using an access token with the `admin:org` scope to use this endpoint. GitHub - Apps must have the `dependabot_secrets` organization permission to use this - endpoint. + summary: List repositories with GitHub Actions cache usage for an organization + description: |- + Lists repositories and their GitHub Actions cache usage for an organization. + The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + You must authenticate using an access token with the `read:org` scope to use this endpoint. GitHub Apps must have the `organization_admistration:read` permission to use this endpoint. tags: - - dependabot - operationId: dependabot/list-selected-repos-for-org-secret + - actions + operationId: actions/get-actions-cache-usage-by-repo-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-repositories-with-github-actions-cache-usage-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - "$ref": "#/components/parameters/page" - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -7587,325 +6901,418 @@ paths: type: object required: - total_count - - repositories + - repository_cache_usages properties: total_count: type: integer - repositories: + repository_cache_usages: type: array items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/actions-cache-usage-by-repository" examples: default: - "$ref": "#/components/examples/public-repository-paginated" + "$ref": "#/components/examples/org-actions-cache-usage-by-repo" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - put: - summary: Set selected repositories for an organization secret - description: Replaces all repositories for an organization secret when the `visibility` - for repository access is set to `selected`. The visibility is set when you - [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. + category: actions + subcategory: cache + "/orgs/{org}/actions/permissions": + get: + summary: Get GitHub Actions permissions for an organization + description: |- + 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. + operationId: actions/get-github-actions-permissions-organization tags: - - dependabot - operationId: dependabot/set-selected-repos-for-org-secret + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-permissions-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - selected_repository_ids: - type: array - description: An array of repository ids that can access the organization - secret. You can only provide a list of repository ids when the - `visibility` is set to `selected`. You can add and remove individual - repositories using the [Set selected repositories for an organization - secret](https://docs.github.com/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) - and [Remove selected repository from an organization secret](https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) - endpoints. - items: - type: integer - required: - - selected_repository_ids - example: - selected_repository_ids: - - 64780797 responses: - '204': + '200': description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-organization-permissions" + examples: + default: + "$ref": "#/components/examples/actions-organization-permissions" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: actions + subcategory: permissions put: - summary: Add selected repository to an organization secret - description: Adds a repository to an organization secret when the `visibility` - for repository access is set to `selected`. The visibility is set when you - [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. + summary: Set GitHub Actions permissions for an organization + description: |- + 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. + operationId: actions/set-github-actions-permissions-organization tags: - - dependabot - operationId: dependabot/add-selected-repo-to-org-secret + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#add-selected-repository-to-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-github-actions-permissions-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer responses: '204': - description: No Content when repository was added to the selected list - '409': - description: Conflict when visibility type is not set to selected + description: Response + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + enabled_repositories: + "$ref": "#/components/schemas/enabled-repositories" + allowed_actions: + "$ref": "#/components/schemas/allowed-actions" + required: + - enabled_repositories + examples: + default: + value: + enabled_repositories: all + allowed_actions: selected x-github: + enabledForGitHubApps: true githubCloudOnly: false + category: actions + subcategory: permissions + "/orgs/{org}/actions/permissions/repositories": + get: + summary: List selected repositories enabled for GitHub Actions in an organization + description: |- + 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. + operationId: actions/list-selected-repositories-enabled-github-actions-organization + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-enabled-for-github-actions-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - repositories + properties: + total_count: + type: number + repositories: + type: array + items: + "$ref": "#/components/schemas/repository" + examples: + default: + "$ref": "#/components/examples/repository-paginated" + x-github: enabledForGitHubApps: true - category: dependabot - subcategory: secrets - delete: - summary: Remove selected repository from an organization secret - description: Removes a repository from an organization secret when the `visibility` - for repository access is set to `selected`. The visibility is set when you - [Create or update an organization secret](https://docs.github.com/rest/reference/dependabot#create-or-update-an-organization-secret). - You must authenticate using an access token with the `admin:org` scope to - use this endpoint. GitHub Apps must have the `dependabot_secrets` organization - permission to use this endpoint. + githubCloudOnly: false + category: actions + subcategory: permissions + put: + summary: Set selected repositories enabled for GitHub Actions in an organization + description: |- + 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. + operationId: actions/set-selected-repositories-enabled-github-actions-organization tags: - - dependabot - operationId: dependabot/remove-selected-repo-from-org-secret + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-enabled-for-github-actions-in-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer responses: '204': - description: Response when repository was removed from the selected list - '409': - description: Conflict when visibility type not set to selected + description: Response + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + selected_repository_ids: + description: List of repository IDs to enable for GitHub Actions. + type: array + items: + type: integer + description: Unique identifier of the repository. + required: + - selected_repository_ids + examples: + default: + value: + selected_repository_ids: + - 32 + - 42 x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/orgs/{org}/events": - get: - summary: List public organization events - description: '' + githubCloudOnly: false + category: actions + subcategory: permissions + "/orgs/{org}/actions/permissions/repositories/{repository_id}": + put: + summary: Enable a selected repository for GitHub Actions in an organization + description: |- + 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. + operationId: actions/enable-selected-repository-github-actions-organization tags: - - activity - operationId: activity/list-public-org-events + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-public-organization-events + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#enable-a-selected-repository-for-github-actions-in-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/repository-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/event" x-github: + enabledForGitHubApps: true githubCloudOnly: false + category: actions + subcategory: permissions + delete: + summary: Disable a selected repository for GitHub Actions in an organization + description: |- + 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. + operationId: actions/disable-selected-repository-github-actions-organization + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#disable-a-selected-repository-for-github-actions-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/repository-id" + responses: + '204': + description: Response + x-github: enabledForGitHubApps: true - category: activity - subcategory: events - "/orgs/{org}/external-group/{group_id}": + githubCloudOnly: false + category: actions + subcategory: permissions + "/orgs/{org}/actions/permissions/selected-actions": get: - summary: Get an external group + summary: Get allowed actions for an organization description: |- - Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + 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 can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + 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. + operationId: actions/get-allowed-actions-organization tags: - - teams - operationId: teams/external-idp-group-info-for-org + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#external-idp-group-info-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-allowed-actions-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/group-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/external-group" + "$ref": "#/components/schemas/selected-actions" examples: default: - "$ref": "#/components/examples/external-group" + "$ref": "#/components/examples/selected-actions" x-github: - githubCloudOnly: true enabledForGitHubApps: true - category: teams - subcategory: external-groups - "/orgs/{org}/external-groups": - get: - summary: List external groups in an organization + githubCloudOnly: false + category: actions + subcategory: permissions + put: + summary: Set allowed actions for an organization description: |- - Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + 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)." - You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + 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. + operationId: actions/set-allowed-actions-organization tags: - - teams - operationId: teams/list-external-idp-groups-for-org + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-external-idp-groups-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-allowed-actions-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - name: page - description: Page token - in: query - schema: - type: integer - - name: display_name - description: Limits the list to groups containing the text in the group name - in: query - schema: - type: string responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/external-groups" - examples: - default: - "$ref": "#/components/examples/external-groups" - headers: - Link: - example: ; - rel="next" - schema: - type: string + requestBody: + required: false + content: + application/json: + schema: + "$ref": "#/components/schemas/selected-actions" + examples: + selected_actions: + "$ref": "#/components/examples/selected-actions" x-github: - githubCloudOnly: true enabledForGitHubApps: true - category: teams - subcategory: external-groups - "/orgs/{org}/failed_invitations": + githubCloudOnly: false + category: actions + subcategory: permissions + "/orgs/{org}/actions/permissions/workflow": get: - summary: List failed organization invitations - description: 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. + summary: Get default workflow permissions for an organization + description: |- + Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, + as well as whether GitHub Actions can submit approving pull request reviews. For more information, see + "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. tags: - - orgs - operationId: orgs/list-failed-invitations + - actions + operationId: actions/get-github-actions-default-workflow-permissions-organization externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-failed-organization-invitations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-default-workflow-permissions parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/organization-invitation" + "$ref": "#/components/schemas/actions-get-default-workflow-permissions" examples: default: - "$ref": "#/components/examples/organization-invitation-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/actions-default-workflow-permissions" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/hooks": + category: actions + subcategory: permissions + put: + summary: Set default workflow permissions for an organization + description: |- + Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in an organization, and sets if GitHub Actions + can submit approving pull request reviews. For more information, see + "[Setting the permissions of the GITHUB_TOKEN for your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-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. + tags: + - actions + operationId: actions/set-github-actions-default-workflow-permissions-organization + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-default-workflow-permissions + parameters: + - "$ref": "#/components/parameters/org" + responses: + '204': + description: Success response + '409': + description: Conflict response when changing a setting is prevented by the + owning enterprise + requestBody: + required: false + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-set-default-workflow-permissions" + examples: + default: + "$ref": "#/components/examples/actions-default-workflow-permissions" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: permissions + "/orgs/{org}/actions/runner-groups": get: - summary: List organization webhooks - description: '' + summary: List self-hosted runner groups for an organization + description: |- + 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. + operationId: actions/list-self-hosted-runner-groups-for-org tags: - - orgs - operationId: orgs/list-webhooks + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organization-webhooks + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runner-groups-for-an-organization parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/visible-to-repository" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/org-hook" + type: object + required: + - total_count + - runner_groups + properties: + total_count: + type: number + runner_groups: + type: array + items: + "$ref": "#/components/schemas/runner-groups-org" examples: default: - "$ref": "#/components/examples/org-hook-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/runner-groups-org" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups post: - summary: Create an organization webhook - description: 'Here''s how you can create a hook that posts payloads in JSON - format:' + summary: Create a self-hosted runner group for an organization + description: |- + 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. + operationId: actions/create-self-hosted-runner-group-for-org tags: - - orgs - operationId: orgs/create-webhook + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#create-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-self-hosted-runner-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -7916,452 +7323,484 @@ paths: type: object properties: name: + description: Name of the runner group. type: string - description: Must be passed as "web". - config: - type: object - description: Key/value pairs to provide settings for this webhook. - [These are defined below](https://docs.github.com/rest/reference/orgs#create-hook-config-params). - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - username: - type: string - example: '"kdaigle"' - password: - type: string - example: '"password"' - required: - - url - events: + visibility: + description: Visibility of a runner group. You can select all repositories, + select individual repositories, or limit access to private repositories. + type: string + enum: + - selected + - all + - private + default: all + selected_repository_ids: + description: List of repository IDs that can access the runner group. type: array - description: Determines what [events](https://docs.github.com/webhooks/event-payloads) - the hook is triggered for. - default: - - push items: - type: string - active: + type: integer + description: Unique identifier of the repository. + runners: + description: List of runner IDs to add to the runner group. + type: array + items: + type: integer + description: Unique identifier of the runner. + allows_public_repositories: + description: Whether the runner group can be used by `public` repositories. type: boolean - description: Determines if notifications are sent when the webhook - is triggered. Set to `true` to send notifications. - default: true + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running + only the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed + to run. This setting will be ignored unless `restricted_to_workflows` + is set to `true`. + type: array + items: + type: string + description: Name of workflow the runner group should be allowed + to run. Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main required: - name - - config - example: - name: web - active: true - events: - - push - - pull_request - config: - url: http://example.com/webhook - content_type: json + examples: + default: + value: + name: Expensive hardware runners + visibility: selected + selected_repository_ids: + - 32 + - 91 + runners: + - 9 + - 2 responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/org-hook" + "$ref": "#/components/schemas/runner-groups-org" examples: default: - "$ref": "#/components/examples/org-hook" - headers: - Location: - example: https://api.github.com/orgs/octocat/hooks/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/runner-group" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}": get: - summary: Get an organization webhook - description: 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)." + summary: Get a self-hosted runner group for an organization + description: |- + 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. + operationId: actions/get-self-hosted-runner-group-for-org tags: - - orgs - operationId: orgs/get-webhook + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-self-hosted-runner-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/org-hook" + "$ref": "#/components/schemas/runner-groups-org" examples: default: - "$ref": "#/components/examples/org-hook" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/runner-group-item" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups patch: - summary: Update an organization webhook - description: 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)." + summary: Update a self-hosted runner group for an organization + description: |- + 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. + operationId: actions/update-self-hosted-runner-group-for-org tags: - - orgs - operationId: orgs/update-webhook + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#update-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#update-a-self-hosted-runner-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - config: - type: object - description: Key/value pairs to provide settings for this webhook. - [These are defined below](https://docs.github.com/rest/reference/orgs#update-hook-config-params). - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - required: - - url - events: + name: + description: Name of the runner group. + type: string + visibility: + description: Visibility of a runner group. You can select all repositories, + select individual repositories, or all private repositories. + type: string + enum: + - selected + - all + - private + allows_public_repositories: + description: Whether the runner group can be used by `public` repositories. + type: boolean + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running + only the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed + to run. This setting will be ignored unless `restricted_to_workflows` + is set to `true`. type: array - description: Determines what [events](https://docs.github.com/webhooks/event-payloads) - the hook is triggered for. - default: - - push items: type: string - active: - type: boolean - description: Determines if notifications are sent when the webhook - is triggered. Set to `true` to send notifications. - default: true - name: - type: string - example: '"web"' - example: - active: true - events: - - pull_request + description: Name of workflow the runner group should be allowed + to run. Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main + required: + - name + examples: + default: + value: + name: Expensive hardware runners + visibility: selected responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/org-hook" + "$ref": "#/components/schemas/runner-groups-org" examples: default: - "$ref": "#/components/examples/org-hook-2" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/runner-group" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups delete: - summary: Delete an organization webhook - description: '' + summary: Delete a self-hosted runner group from an organization + description: |- + 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. + operationId: actions/delete-self-hosted-runner-group-from-org tags: - - orgs - operationId: orgs/delete-webhook + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#delete-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-self-hosted-runner-group-from-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}/config": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories": get: - summary: Get a webhook configuration for an organization + summary: List repository access to a self-hosted runner group in an organization description: |- - 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)." + 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)." - Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. + 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. + operationId: actions/list-repo-access-to-self-hosted-runner-group-in-org tags: - - orgs - operationId: orgs/get-webhook-config-for-org + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-a-webhook-configuration-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/webhook-config" + type: object + required: + - total_count + - repositories + properties: + total_count: + type: number + repositories: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/webhook-config" + "$ref": "#/components/examples/minimal-repository-paginated" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - patch: - summary: Update a webhook configuration for an organization + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + put: + summary: Set repository access for a self-hosted runner group in an organization description: |- - 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. + 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. + operationId: actions/set-repo-access-to-self-hosted-runner-group-in-org tags: - - orgs - operationId: orgs/update-webhook-config-for-org + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#update-a-webhook-configuration-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - example: - content_type: json - insecure_ssl: '0' - secret: "********" - url: https://example.com/webhook - additionalProperties: false + selected_repository_ids: + description: List of repository IDs that can access the runner group. + type: array + items: + type: integer + description: Unique identifier of the repository. + required: + - selected_repository_ids + examples: + default: + value: + selected_repository_ids: + - 32 + - 91 responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/webhook-config" - examples: - default: - "$ref": "#/components/examples/webhook-config" x-github: + enabledForGitHubApps: true githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}/repositories/{repository_id}": + put: + summary: Add repository access to a self-hosted runner group in an organization + description: |- + 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. + operationId: actions/add-repo-access-to-self-hosted-runner-group-in-org + tags: + - actions + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-repository-acess-to-a-self-hosted-runner-group-in-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/repository-id" + responses: + '204': + description: Response + x-github: enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}/deliveries": - get: - summary: List deliveries for an organization webhook - description: Returns a list of webhook deliveries for a webhook configured in - an organization. + githubCloudOnly: true + category: actions + subcategory: self-hosted-runner-groups + delete: + summary: Remove repository access to a self-hosted runner group in an organization + description: |- + 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. + operationId: actions/remove-repo-access-to-self-hosted-runner-group-in-org tags: - - orgs - operationId: orgs/list-webhook-deliveries + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-deliveries-for-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-repository-access-to-a-self-hosted-runner-group-in-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/cursor" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/repository-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/hook-delivery-item" - examples: - default: - "$ref": "#/components/examples/hook-delivery-items" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners": get: - summary: Get a webhook delivery for an organization webhook - description: Returns a delivery for a webhook configured in an organization. + summary: List self-hosted runners in a group for an organization + description: |- + 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. + operationId: actions/list-self-hosted-runners-in-group-for-org tags: - - orgs - operationId: orgs/get-webhook-delivery + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runners-in-a-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/delivery-id" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/hook-delivery" + type: object + required: + - total_count + - runners + properties: + total_count: + type: number + runners: + type: array + items: + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/hook-delivery" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/runner-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": - post: - summary: Redeliver a delivery for an organization webhook - description: Redeliver a delivery for a webhook configured in an organization. + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + put: + summary: Set self-hosted runners in a group for an organization + description: |- + 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. + operationId: actions/set-self-hosted-runners-in-group-for-org tags: - - orgs - operationId: orgs/redeliver-webhook-delivery + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/delivery-id" + - "$ref": "#/components/parameters/runner-group-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + runners: + description: List of runner IDs to add to the runner group. + type: array + items: + type: integer + description: Unique identifier of the runner. + required: + - runners + examples: + default: + value: + runners: + - 9 + - 2 responses: - '202': - "$ref": "#/components/responses/accepted" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" + '204': + description: Response x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/hooks/{hook_id}/pings": - post: - summary: Ping an organization webhook - description: This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) - to be sent to the hook. + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runner-groups/{runner_group_id}/runners/{runner_id}": + put: + summary: Add a self-hosted runner to a group for an organization + description: |- + 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. + operationId: actions/add-self-hosted-runner-to-group-for-org tags: - - orgs - operationId: orgs/ping-webhook + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#ping-an-organization-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-a-self-hosted-runner-to-a-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/runner-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: webhooks - "/orgs/{org}/installation": - get: - summary: Get an organization installation for the authenticated app + githubCloudOnly: false + category: actions + subcategory: self-hosted-runner-groups + delete: + summary: Remove a self-hosted runner from a group for an organization description: |- - 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. + 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. + operationId: actions/remove-self-hosted-runner-from-group-for-org tags: - - apps - operationId: apps/get-org-installation + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-group-id" + - "$ref": "#/components/parameters/runner-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/installation" - examples: - default: - "$ref": "#/components/examples/installation" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: - "/orgs/{org}/installations": + category: actions + subcategory: self-hosted-runner-groups + "/orgs/{org}/actions/runners": get: - summary: List app installations for an organization - description: 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. + summary: List self-hosted runners for an organization + description: |- + 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. tags: - - orgs - operationId: orgs/list-app-installations + - actions + operationId: actions/list-self-hosted-runners-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-app-installations-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runners-for-an-organization parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/per-page" @@ -8375,37 +7814,38 @@ paths: type: object required: - total_count - - installations + - runners properties: total_count: type: integer - installations: + runners: type: array items: - "$ref": "#/components/schemas/installation" + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/installation-paginated" + "$ref": "#/components/examples/runner-paginated" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: - "/orgs/{org}/interaction-limits": + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/downloads": get: - summary: Get interaction restrictions for an organization - description: 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. + summary: List runner applications for an organization + description: |- + 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. tags: - - interactions - operationId: interactions/get-restrictions-for-org + - actions + operationId: actions/list-runner-applications-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-runner-applications-for-an-organization parameters: - "$ref": "#/components/parameters/org" responses: @@ -8414,386 +7854,348 @@ paths: content: application/json: schema: - anyOf: - - "$ref": "#/components/schemas/interaction-limit-response" - - type: object - properties: {} - additionalProperties: false + type: array + items: + "$ref": "#/components/schemas/runner-application" examples: default: - "$ref": "#/components/examples/interaction-limit-response" + "$ref": "#/components/examples/runner-application-items-airgap" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: interactions - subcategory: orgs - put: - summary: Set interaction restrictions for an organization - description: 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. + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/registration-token": + post: + summary: Create a registration token for an organization + description: |- + 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 + ``` tags: - - interactions - operationId: interactions/set-restrictions-for-org + - actions + operationId: actions/create-registration-token-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-registration-token-for-an-organization parameters: - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - "$ref": "#/components/schemas/interaction-limit" responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/interaction-limit-response" + "$ref": "#/components/schemas/authentication-token" examples: default: - "$ref": "#/components/examples/interaction-limit-response" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/authentication-token" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: interactions - subcategory: orgs - delete: - summary: Remove interaction restrictions for an organization - description: Removes all interaction restrictions from public repositories in - the given organization. You must be an organization owner to remove restrictions. + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/remove-token": + post: + summary: Create a remove token for an organization + description: |- + 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 + ``` tags: - - interactions - operationId: interactions/remove-restrictions-for-org + - actions + operationId: actions/create-remove-token-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-remove-token-for-an-organization parameters: - "$ref": "#/components/parameters/org" responses: - '204': + '201': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authentication-token" + examples: + default: + "$ref": "#/components/examples/authentication-token-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: interactions - subcategory: orgs - "/orgs/{org}/invitations": + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/{runner_id}": get: - summary: List pending organization invitations - description: '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`.' + summary: Get a self-hosted runner for an organization + description: |- + 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. tags: - - orgs - operationId: orgs/list-pending-invitations + - actions + operationId: actions/get-self-hosted-runner-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-pending-organization-invitations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-self-hosted-runner-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/runner-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/organization-invitation" + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/organization-invitation-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/runner" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: self-hosted-runners + delete: + summary: Delete a self-hosted runner from an organization + description: |- + 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. + tags: + - actions + operationId: actions/delete-self-hosted-runner-from-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-self-hosted-runner-from-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/{runner_id}/labels": + get: + summary: List labels for a self-hosted runner for an organization + description: |- + Lists all labels for a self-hosted runner configured in an organization. + + You must authenticate using an access token with the `admin:org` scope to use this endpoint. + tags: + - actions + operationId: actions/list-labels-for-self-hosted-runner-for-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-id" + responses: + '200': + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members + category: actions + subcategory: self-hosted-runners post: - summary: Create an organization invitation + summary: Add custom labels to a self-hosted runner for an organization description: |- - 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. + Add custom labels to a self-hosted runner configured in an organization. - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + You must authenticate using an access token with the `admin:org` scope to use this endpoint. tags: - - orgs - operationId: orgs/create-invitation + - actions + operationId: actions/add-custom-labels-to-self-hosted-runner-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#create-an-organization-invitation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-an-organization parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/runner-id" requestBody: - required: false + required: true content: application/json: schema: type: object + required: + - labels properties: - invitee_id: - type: integer - description: "**Required unless you provide `email`**. GitHub user - ID for the person you are inviting." - email: - type: string - description: "**Required unless you provide `invitee_id`**. Email - address of the person you are inviting, which can be an existing - GitHub user." - role: - type: string - description: "Specify role for new member. Can be one of: \n\\* - `admin` - Organization owners with full administrative rights - to the organization and complete access to all repositories and - teams. \n\\* `direct_member` - Non-owner organization members - with ability to see other members and join teams by invitation. - \ \n\\* `billing_manager` - Non-owner organization members with - ability to manage the billing settings of your organization." - enum: - - admin - - direct_member - - billing_manager - default: direct_member - team_ids: + labels: type: array - description: Specify IDs for the teams you want to invite new members - to. + minItems: 1 + maxItems: 100 + description: The names of the custom labels to add to the runner. items: - type: integer - example: - email: octocat@github.com - role: direct_member - team_ids: - - 12 - - 26 + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/organization-invitation" - examples: - default: - "$ref": "#/components/examples/organization-invitation" - '422': - "$ref": "#/components/responses/validation_failed" + '200': + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/invitations/{invitation_id}": - delete: - summary: Cancel an organization invitation + category: actions + subcategory: self-hosted-runners + put: + summary: Set custom labels for a self-hosted runner for an organization description: |- - Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner. + Remove all previous custom labels and set the new custom labels for a specific + self-hosted runner configured in an organization. - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). + You must authenticate using an access token with the `admin:org` scope to use this endpoint. tags: - - orgs - operationId: orgs/cancel-invitation + - actions + operationId: actions/set-custom-labels-for-self-hosted-runner-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#cancel-an-organization-invitation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/invitation-id" + - "$ref": "#/components/parameters/runner-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + minItems: 0 + maxItems: 100 + description: The names of the custom labels to set for the runner. + You can pass an empty array to remove all custom labels. + items: + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: - '204': - description: Response - '422': - "$ref": "#/components/responses/validation_failed" + '200': + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/invitations/{invitation_id}/teams": - get: - summary: List organization invitation teams - description: List all teams associated with an invitation. In order to see invitations - in an organization, the authenticated user must be an organization owner. + category: actions + subcategory: self-hosted-runners + delete: + summary: Remove all custom labels from a self-hosted runner for an organization + description: |- + Remove all custom labels from a self-hosted runner configured in an + organization. Returns the remaining read-only labels from the runner. + + You must authenticate using an access token with the `admin:org` scope to use this endpoint. tags: - - orgs - operationId: orgs/list-invitation-teams + - actions + operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organization-invitation-teams + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/invitation-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/runner-id" responses: '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/team" - examples: - default: - "$ref": "#/components/examples/team-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/responses/actions_runner_labels_readonly" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/issues": - get: - summary: List organization issues assigned to the authenticated user + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/runners/{runner_id}/labels/{name}": + delete: + summary: Remove a custom label from a self-hosted runner for an organization description: |- - List issues in an organization assigned to the authenticated user. + Remove a custom label from a self-hosted runner configured + in an organization. Returns the remaining labels from the runner. - **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. + This endpoint returns a `404 Not Found` status if the custom label is not + present on the runner. + + You must authenticate using an access token with the `admin:org` scope to use this endpoint. tags: - - issues - operationId: issues/list-for-org + - actions + operationId: actions/remove-custom-label-from-self-hosted-runner-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - name: filter - description: "Indicates which sorts of issues to return. Can be one of: \n\\* - `assigned`: Issues assigned to you \n\\* `created`: Issues created by you - \ \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're - subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated - user can see, regardless of participation or creation" - in: query - required: false - schema: - type: string - enum: - - assigned - - created - - mentioned - - subscribed - - repos - - all - default: assigned - - name: state - description: Indicates the state of the issues to return. Can be either `open`, - `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - "$ref": "#/components/parameters/labels" - - name: sort - description: What to sort results by. Can be either `created`, `updated`, - `comments`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - comments - default: created - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/runner-label-name" responses: '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/issue" - examples: - default: - "$ref": "#/components/examples/issue-with-repo-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: issues - subcategory: - "/orgs/{org}/members": + enabledForGitHubApps: true + category: actions + subcategory: self-hosted-runners + "/orgs/{org}/actions/secrets": get: - summary: List organization members - description: 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. + summary: List organization secrets + description: 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. tags: - - orgs - operationId: orgs/list-members + - actions + operationId: actions/list-org-secrets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organization-members + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-organization-secrets parameters: - "$ref": "#/components/parameters/org" - - name: filter - description: "Filter members returned in the list. Can be one of: \n\\* `2fa_disabled` - - Members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) - enabled. Available for organization owners. \n\\* `all` - All members the - authenticated user can see." - in: query - required: false - schema: - type: string - enum: - - 2fa_disabled - - all - default: all - - name: role - description: "Filter members returned by their role. Can be one of: \n\\* - `all` - All members of the organization, regardless of role. \n\\* `admin` - - Organization owners. \n\\* `member` - Non-owner organization members." - in: query - required: false - schema: - type: string - enum: - - all - - admin - - member - default: all - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -8802,261 +8204,325 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + type: object + required: + - total_count + - secrets + properties: + total_count: + type: integer + secrets: + type: array + items: + "$ref": "#/components/schemas/organization-actions-secret" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/organization-actions-secret-paginated" headers: Link: "$ref": "#/components/headers/link" - '302': - description: Response if requester is not an organization member - headers: - Location: - example: https://api.github.com/orgs/github/public_members - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/members/{username}": + category: actions + subcategory: secrets + "/orgs/{org}/actions/secrets/public-key": get: - summary: Check organization membership for a user - description: Check if a user is, publicly or privately, a member of the organization. - tags: - - orgs - operationId: orgs/check-membership-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/orgs#check-organization-membership-for-a-user - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response if requester is an organization member and user is - a member - '302': - description: Response if requester is not an organization member - headers: - Location: - example: https://api.github.com/orgs/github/public_members/pezra - schema: - type: string - '404': - description: Not Found if requester is an organization member and user is - not a member - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: members - delete: - summary: Remove an organization member - description: 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. + summary: Get an organization public key + description: 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. tags: - - orgs - operationId: orgs/remove-member + - actions + operationId: actions/get-org-public-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#remove-an-organization-member + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-public-key" + examples: + default: + "$ref": "#/components/examples/actions-public-key" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/memberships/{username}": + category: actions + subcategory: secrets + "/orgs/{org}/actions/secrets/{secret_name}": get: - summary: Get organization membership for a user - description: In order to get a user's membership with an organization, the authenticated - user must be an organization member. The `state` parameter in the response - can be used to identify the user's membership status. + summary: Get an organization secret + description: 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. tags: - - orgs - operationId: orgs/get-membership-for-user + - actions + operationId: actions/get-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-organization-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/org-membership" + "$ref": "#/components/schemas/organization-actions-secret" examples: - response-if-user-has-an-active-admin-membership-with-organization: - "$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + default: + "$ref": "#/components/examples/organization-actions-secret" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members + category: actions + subcategory: secrets put: - summary: Set organization membership for a user - description: "Only authenticated organization owners can add a member to the - organization or update the member's role.\n\n* 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.\n \n* 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.\n\n**Rate limits**\n\nTo 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." + summary: Create or update an organization secret + description: |- + Creates or updates an organization secret with an encrypted value. Encrypt your secret using + [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to + use this endpoint. + + #### Example encrypting a secret using Node.js + + Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + + ``` + const sodium = require('tweetsodium'); + + const key = "base64-encoded-public-key"; + const value = "plain-text-secret"; + + // Convert the message and key to Uint8Array's (Buffer implements that interface) + const messageBytes = Buffer.from(value); + const keyBytes = Buffer.from(key, 'base64'); + + // Encrypt using LibSodium. + const encryptedBytes = sodium.seal(messageBytes, keyBytes); + + // Base64 the encrypted secret + const encrypted = Buffer.from(encryptedBytes).toString('base64'); + + console.log(encrypted); + ``` + + + #### Example encrypting a secret using Python + + Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + + ``` + from base64 import b64encode + from nacl import encoding, public + + def encrypt(public_key: str, secret_value: str) -> str: + """Encrypt a Unicode string using the public key.""" + public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + sealed_box = public.SealedBox(public_key) + encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + return b64encode(encrypted).decode("utf-8") + ``` + + #### Example encrypting a secret using C# + + Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + + ``` + var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + + var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + + Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + ``` + + #### Example encrypting a secret using Ruby + + Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + + ```ruby + require "rbnacl" + require "base64" + + key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + public_key = RbNaCl::PublicKey.new(key) + + box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + encrypted_secret = box.encrypt("my_secret") + + # Print the base64 encoded secret + puts Base64.strict_encode64(encrypted_secret) + ``` tags: - - orgs - operationId: orgs/set-membership-for-user + - actions + operationId: actions/create-or-update-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#set-organization-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-or-update-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/secret-name" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - role: + encrypted_value: type: string - description: "The role to give the user in the organization. Can - be one of: \n\\* `admin` - The user will become an owner of the - organization. \n\\* `member` - The user will become a non-owner - member of the organization." + description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + using the public key retrieved from the [Get an organization public + key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-organization-public-key) + endpoint. + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" + key_id: + type: string + description: ID of the key you used to encrypt the secret. + visibility: + type: string + description: Which type of organization repositories have access + to the organization secret. `selected` means only the repositories + specified by `selected_repository_ids` can access the secret. enum: - - admin - - member - default: member + - all + - private + - selected + selected_repository_ids: + type: array + description: An array of repository ids that can access the organization + secret. You can only provide a list of repository ids when the + `visibility` is set to `selected`. You can manage the list of + selected repositories using the [List selected repositories for + an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret), + [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret), + and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) + endpoints. + items: + type: integer + required: + - visibility + examples: + default: + value: + encrypted_value: c2VjcmV0 + key_id: '012345678912345678' + visibility: selected + selected_repository_ids: + - 1296269 + - 1296280 responses: - '200': - description: Response + '201': + description: Response when creating a secret content: application/json: schema: - "$ref": "#/components/schemas/org-membership" + "$ref": "#/components/schemas/empty-object" examples: - response-if-user-already-had-membership-with-organization: - "$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization" - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" + default: + value: + '204': + description: Response when updating a secret x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members + category: actions + subcategory: secrets delete: - summary: Remove organization membership for a user - description: |- - 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. + summary: Delete an organization secret + description: 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. tags: - - orgs - operationId: orgs/remove-membership-for-user + - actions + operationId: actions/delete-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#remove-organization-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/secret-name" responses: '204': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/migrations": + category: actions + subcategory: secrets + "/orgs/{org}/actions/secrets/{secret_name}/repositories": get: - summary: List organization migrations - description: Lists the most recent migrations. + summary: List selected repositories for an organization secret + description: 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. tags: - - migrations - operationId: migrations/list-for-org + - actions + operationId: actions/list-selected-repos-for-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#list-organization-migrations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-selected-repositories-for-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/secret-name" - "$ref": "#/components/parameters/page" - - name: exclude - description: Exclude attributes from the API response to improve performance - in: query - schema: - type: array - items: - description: Allowed values that can be passed to the exclude param. - enum: - - repositories - example: repositories - type: string + - "$ref": "#/components/parameters/per-page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/migration" + type: object + required: + - total_count + - repositories + properties: + total_count: + type: integer + repositories: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/migration-with-short-org-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/public-repository-paginated" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - post: - summary: Start an organization migration - description: Initiates the generation of a migration archive. + enabledForGitHubApps: true + category: actions + subcategory: secrets + put: + summary: Set selected repositories for an organization secret + description: 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/enterprise-server@3.6/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. tags: - - migrations - operationId: migrations/start-for-org + - actions + operationId: actions/set-selected-repos-for-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#start-an-organization-migration + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-selected-repositories-for-an-organization-secret parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/secret-name" requestBody: required: true content: @@ -9064,205 +8530,121 @@ paths: schema: type: object properties: - repositories: - type: array - description: A list of arrays indicating which repositories should - be migrated. - items: - type: string - lock_repositories: - type: boolean - example: true - description: Indicates whether repositories should be locked (to - prevent manipulation) while migrating data. - default: false - exclude_attachments: - type: boolean - example: true - description: Indicates whether attachments should be excluded from - the migration (to reduce migration archive file size). - default: false - exclude_releases: - type: boolean - example: true - description: Indicates whether releases should be excluded from - the migration (to reduce migration archive file size). - default: false - exclude_owner_projects: - type: boolean - example: true - description: Indicates whether projects owned by the organization - or users should be excluded. from the migration. - default: false - exclude: + selected_repository_ids: type: array + description: An array of repository ids that can access the organization + secret. You can only provide a list of repository ids when the + `visibility` is set to `selected`. You can add and remove individual + repositories using the [Add selected repository to an organization + secret](https://docs.github.com/enterprise-server@3.6/rest/actions/secrets#add-selected-repository-to-an-organization-secret) + and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret) + endpoints. items: - type: string - enum: - - repositories + type: integer required: - - repositories - example: - repositories: - - github/Hello-World - lock_repositories: true + - selected_repository_ids + examples: + default: + value: + selected_repository_ids: + - 64780797 responses: - '201': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/migration" - examples: - default: - "$ref": "#/components/examples/migration-with-short-org-2" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - "/orgs/{org}/migrations/{migration_id}": - get: - summary: Get an organization migration status - description: |- - 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. + enabledForGitHubApps: true + category: actions + subcategory: secrets + "/orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}": + put: + summary: Add selected repository to an organization secret + description: 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/enterprise-server@3.6/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. tags: - - migrations - operationId: migrations/get-status-for-org + - actions + operationId: actions/add-selected-repo-to-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#get-an-organization-migration-status + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-selected-repository-to-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/migration-id" - - name: exclude - description: Exclude attributes from the API response to improve performance - in: query + - "$ref": "#/components/parameters/secret-name" + - name: repository_id + in: path + required: true schema: - type: array - items: - description: Allowed values that can be passed to the exclude param. - enum: - - repositories - example: repositories - type: string - responses: - '200': - description: |- - * `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. - content: - application/json: - schema: - "$ref": "#/components/schemas/migration" - examples: - default: - "$ref": "#/components/examples/migration-with-short-org" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - "/orgs/{org}/migrations/{migration_id}/archive": - get: - summary: Download an organization migration archive - description: Fetches the URL to a migration archive. - tags: - - migrations - operationId: migrations/download-archive-for-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/migrations#download-an-organization-migration-archive - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/migration-id" - responses: - '302': - description: Response - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - delete: - summary: Delete an organization migration archive - description: Deletes a previous migration archive. Migration archives are automatically - deleted after seven days. - tags: - - migrations - operationId: migrations/delete-archive-for-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/migrations#delete-an-organization-migration-archive - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/migration-id" + type: integer responses: '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" + description: No Content when repository was added to the selected list + '409': + description: Conflict when visibility type is not set to selected x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - "/orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock": + enabledForGitHubApps: true + category: actions + subcategory: secrets delete: - summary: Unlock an organization repository - description: 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. + summary: Remove selected repository from an organization secret + description: 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/enterprise-server@3.6/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. tags: - - migrations - operationId: migrations/unlock-repo-for-org + - actions + operationId: actions/remove-selected-repo-from-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#unlock-an-organization-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-selected-repository-from-an-organization-secret parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/migration-id" - - "$ref": "#/components/parameters/repo-name" + - "$ref": "#/components/parameters/secret-name" + - name: repository_id + in: path + required: true + schema: + type: integer responses: '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" + description: Response when repository was removed from the selected list + '409': + description: Conflict when visibility type not set to selected x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - "/orgs/{org}/migrations/{migration_id}/repositories": + enabledForGitHubApps: true + category: actions + subcategory: secrets + "/orgs/{org}/audit-log": get: - summary: List repositories in an organization migration - description: List all the repositories for this organization migration. + summary: Get the audit log for an organization + description: |- + Gets the audit log for an organization. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/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. + + By default, the response includes up to 30 events from the past three months. Use the `phrase` parameter to filter results and retrieve older events. For example, use the `phrase` parameter with the `created` qualifier to filter events based on when the events occurred. For more information, see "[Reviewing the audit log for your organization](https://docs.github.com/enterprise-server@3.6/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#searching-the-audit-log)." + + Use pagination to retrieve fewer or more than 30 events. For more information, see "[Resources in the REST API](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination)." + operationId: orgs/get-audit-log tags: - - migrations - operationId: migrations/list-repos-for-org + - orgs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#list-repositories-in-an-organization-migration + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-audit-log parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/migration-id" + - "$ref": "#/components/parameters/audit-log-phrase" + - "$ref": "#/components/parameters/audit-log-include" + - "$ref": "#/components/parameters/audit-log-after" + - "$ref": "#/components/parameters/audit-log-before" + - "$ref": "#/components/parameters/audit-log-order" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -9273,46 +8655,56 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/audit-log-event" examples: default: - "$ref": "#/components/examples/minimal-repository-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/audit-log" x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: orgs - "/orgs/{org}/outside_collaborators": + githubCloudOnly: true + enabledForGitHubApps: true + category: orgs + subcategory: + "/orgs/{org}/code-scanning/alerts": get: - summary: List outside collaborators for an organization - description: List all users who are outside collaborators of an organization. + summary: List code scanning alerts for an organization + description: |- + Lists code scanning alerts for the default branch for all eligible repositories in an organization. Eligible repositories are repositories that are owned by organizations that you own or for which you are a security manager. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + + To use this endpoint, you must be an owner or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + + GitHub Apps must have the `security_events` read permission to use this endpoint. tags: - - orgs - operationId: orgs/list-outside-collaborators + - code-scanning + operationId: code-scanning/list-alerts-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-outside-collaborators-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#list-code-scanning-alerts-by-organization parameters: - "$ref": "#/components/parameters/org" - - name: filter - description: "Filter the list of outside collaborators. Can be one of: \n\\* - `2fa_disabled`: Outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) - enabled. \n\\* `all`: All outside collaborators." + - "$ref": "#/components/parameters/tool-name" + - "$ref": "#/components/parameters/tool-guid" + - "$ref": "#/components/parameters/pagination-before" + - "$ref": "#/components/parameters/pagination-after" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/direction" + - name: state + description: If specified, only code scanning alerts with this state will + be returned. + in: query + required: false + schema: + "$ref": "#/components/schemas/code-scanning-alert-state" + - name: sort + description: The property by which to sort the results. in: query required: false schema: type: string enum: - - 2fa_disabled - - all - default: all - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - created + - updated + default: created responses: '200': description: Response @@ -9321,442 +8713,478 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/code-scanning-organization-alert-items" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/code-scanning-organization-alert-items" headers: Link: "$ref": "#/components/headers/link" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: orgs - subcategory: outside-collaborators - "/orgs/{org}/outside_collaborators/{username}": - put: - summary: Convert an organization member to outside collaborator - description: When an organization member is converted to an outside collaborator, - they'll only have access to the repositories that their current team membership - allows. The user will no longer be a member of the organization. For more - information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/articles/converting-an-organization-member-to-an-outside-collaborator/)". - tags: - - orgs - operationId: orgs/convert-member-to-outside-collaborator - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" - responses: - '202': - description: User is getting converted asynchronously - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: false - '204': - description: User was converted '403': - description: Forbidden if user is the last owner of the organization or - not a member of the organization + "$ref": "#/components/responses/code_scanning_forbidden_read" '404': "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: outside-collaborators - delete: - summary: Remove outside collaborator from an organization - description: Removing a user from this list will remove them from all the organization's - repositories. + category: code-scanning + subcategory: + "/orgs/{org}/dependabot/secrets": + get: + summary: List organization secrets + description: Lists all secrets available in an organization without revealing + their encrypted values. You must authenticate using an access token with the + `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` + organization permission to use this endpoint. tags: - - orgs - operationId: orgs/remove-outside-collaborator + - dependabot + operationId: dependabot/list-org-secrets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#remove-outside-collaborator-from-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-organization-secrets parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response - '422': - description: Unprocessable Entity if user is a member of the organization content: application/json: schema: type: object + required: + - total_count + - secrets properties: - message: - type: string - documentation_url: - type: string + total_count: + type: integer + secrets: + type: array + items: + "$ref": "#/components/schemas/organization-dependabot-secret" examples: - response-if-user-is-a-member-of-the-organization: - value: - message: You cannot specify an organization member to remove as - an outside collaborator. - documentation_url: https://docs.github.com/rest/reference/orgs#remove-outside-collaborator + default: + "$ref": "#/components/examples/organization-dependabot-secret-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: orgs - subcategory: outside-collaborators - "/orgs/{org}/packages": + category: dependabot + subcategory: secrets + "/orgs/{org}/dependabot/secrets/public-key": get: - summary: List packages for an organization - description: |- - Lists all packages in an organization readable by the user. - - To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - If `package_type` is not `container`, your token must also include the `repo` scope. + summary: Get an organization public key + description: Gets your public key, which you need to encrypt secrets. You need + to encrypt a secret before you can create or update secrets. You must authenticate + using an access token with the `admin:org` scope to use this endpoint. GitHub + Apps must have the `dependabot_secrets` organization permission to use this + endpoint. tags: - - packages - operationId: packages/list-packages-for-organization + - dependabot + operationId: dependabot/get-org-public-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#list-packages-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key parameters: - - name: package_type - description: The type of supported package. Can be one of `npm`, `maven`, - `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle - registry have the type `maven`. Docker images pushed to GitHub's Container - registry (`ghcr.io`) have the type `container`. You can use the type `docker` - to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), - even if these have now been migrated to the Container registry. - in: query - required: true - schema: - type: string - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/package-visibility" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/package" + "$ref": "#/components/schemas/dependabot-public-key" examples: default: - "$ref": "#/components/examples/packages-for-org" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/dependabot-public-key" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/packages/{package_type}/{package_name}": + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + "/orgs/{org}/dependabot/secrets/{secret_name}": get: - summary: Get a package for an organization - description: |- - 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. + summary: Get an organization secret + description: Gets a single organization secret without revealing its encrypted + value. You must authenticate using an access token with the `admin:org` scope + to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. tags: - - packages - operationId: packages/get-package-for-organization + - dependabot + operationId: dependabot/get-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/package" + "$ref": "#/components/schemas/organization-dependabot-secret" examples: default: - "$ref": "#/components/examples/package-org" + "$ref": "#/components/examples/organization-dependabot-secret" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete a package for an organization + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + put: + summary: Create or update an organization secret description: |- - Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. + Creates or updates an organization secret with an encrypted value. Encrypt your secret using + [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. + + #### Example encrypting a secret using Node.js + + Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + + ``` + const sodium = require('tweetsodium'); + + const key = "base64-encoded-public-key"; + const value = "plain-text-secret"; + + // Convert the message and key to Uint8Array's (Buffer implements that interface) + const messageBytes = Buffer.from(value); + const keyBytes = Buffer.from(key, 'base64'); + + // Encrypt using LibSodium. + const encryptedBytes = sodium.seal(messageBytes, keyBytes); + + // Base64 the encrypted secret + const encrypted = Buffer.from(encryptedBytes).toString('base64'); + + console.log(encrypted); + ``` + + + #### Example encrypting a secret using Python + + Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + + ``` + from base64 import b64encode + from nacl import encoding, public + + def encrypt(public_key: str, secret_value: str) -> str: + """Encrypt a Unicode string using the public key.""" + public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + sealed_box = public.SealedBox(public_key) + encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + return b64encode(encrypted).decode("utf-8") + ``` + + #### Example encrypting a secret using C# + + Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + + ``` + var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + + var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + + Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + ``` + + #### Example encrypting a secret using Ruby + + Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + + ```ruby + require "rbnacl" + require "base64" + + key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + public_key = RbNaCl::PublicKey.new(key) + + box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + encrypted_secret = box.encrypt("my_secret") - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + # Print the base64 encoded secret + puts Base64.strict_encode64(encrypted_secret) + ``` tags: - - packages - operationId: packages/delete-package-for-org + - dependabot + operationId: dependabot/create-or-update-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/secret-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + encrypted_value: + type: string + description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + using the public key retrieved from the [Get an organization public + key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-an-organization-public-key) + endpoint. + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" + key_id: + type: string + description: ID of the key you used to encrypt the secret. + visibility: + type: string + description: Which type of organization repositories have access + to the organization secret. `selected` means only the repositories + specified by `selected_repository_ids` can access the secret. + enum: + - all + - private + - selected + selected_repository_ids: + type: array + description: An array of repository ids that can access the organization + secret. You can only provide a list of repository ids when the + `visibility` is set to `selected`. You can manage the list of + selected repositories using the [List selected repositories for + an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret), + [Set selected repositories for an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret), + and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) + endpoints. + items: + type: string + required: + - visibility + examples: + default: + value: + encrypted_value: c2VjcmV0 + key_id: '012345678912345678' + visibility: selected + selected_repository_ids: + - '1296269' + - '1296280' responses: + '201': + description: Response when creating a secret + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: Response when updating a secret x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/packages/{package_type}/{package_name}/restore": - post: - summary: Restore a package for an organization - description: |- - Restores an entire package in an organization. - - You can restore a deleted package under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + delete: + summary: Delete an organization secret + description: Deletes a secret in an organization using the secret name. You + must authenticate using an access token with the `admin:org` scope to use + this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. tags: - - packages - operationId: packages/restore-package-for-org + - dependabot + operationId: dependabot/delete-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#delete-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" - - name: token - description: package token - schema: - type: string - required: false - in: query + - "$ref": "#/components/parameters/secret-name" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/packages/{package_type}/{package_name}/versions": + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories": get: - summary: Get all package versions for a package owned by an organization - description: |- - 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. + summary: List selected repositories for an organization secret + description: Lists all repositories that have been selected when the `visibility` + for repository access to a secret is set to `selected`. You must authenticate + using an access token with the `admin:org` scope to use this endpoint. GitHub + Apps must have the `dependabot_secrets` organization permission to use this + endpoint. tags: - - packages - operationId: packages/get-all-package-versions-for-package-owned-by-org + - dependabot + operationId: dependabot/list-selected-repos-for-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-selected-repositories-for-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/secret-name" - "$ref": "#/components/parameters/page" - "$ref": "#/components/parameters/per-page" - - name: state - in: query - required: false - description: The state of the package, either active or deleted. - schema: - type: string - enum: - - active - - deleted - default: active responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/package-version" + type: object + required: + - total_count + - repositories + properties: + total_count: + type: integer + repositories: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/package-versions-for-org" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/public-repository-paginated" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}": - get: - summary: Get a package version for an organization - description: |- - 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. + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + put: + summary: Set selected repositories for an organization secret + description: 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). + You must authenticate using an access token with the `admin:org` scope to + use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. tags: - - packages - operationId: packages/get-package-version-for-organization + - dependabot + operationId: dependabot/set-selected-repos-for-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/package-version-id" + - "$ref": "#/components/parameters/secret-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + selected_repository_ids: + type: array + description: An array of repository ids that can access the organization + secret. You can only provide a list of repository ids when the + `visibility` is set to `selected`. You can add and remove individual + repositories using the [Set selected repositories for an organization + secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#set-selected-repositories-for-an-organization-secret) + and [Remove selected repository from an organization secret](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret) + endpoints. + items: + type: integer + required: + - selected_repository_ids + examples: + default: + value: + selected_repository_ids: + - 64780797 responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/package-version" - examples: - default: - "$ref": "#/components/examples/package-version-org" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete package version for an organization - description: |- - Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + "/orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}": + put: + summary: Add selected repository to an organization secret + description: 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). + You must authenticate using an access token with the `admin:org` scope to + use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. tags: - - packages - operationId: packages/delete-package-version-for-org + - dependabot + operationId: dependabot/add-selected-repo-to-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#add-selected-repository-to-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/package-version-id" + - "$ref": "#/components/parameters/secret-name" + - name: repository_id + in: path + required: true + schema: + type: integer responses: '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: No Content when repository was added to the selected list + '409': + description: Conflict when visibility type is not set to selected x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": - post: - summary: Restore package version for an organization - description: |- - Restores a specific package version in an organization. - - You can restore a deleted package under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + delete: + summary: Remove selected repository from an organization secret + description: 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/enterprise-server@3.6/rest/reference/dependabot#create-or-update-an-organization-secret). + You must authenticate using an access token with the `admin:org` scope to + use this endpoint. GitHub Apps must have the `dependabot_secrets` organization + permission to use this endpoint. tags: - - packages - operationId: packages/restore-package-version-for-org + - dependabot + operationId: dependabot/remove-selected-repo-from-org-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#remove-selected-repository-from-an-organization-secret parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/package-version-id" + - "$ref": "#/components/parameters/secret-name" + - name: repository_id + in: path + required: true + schema: + type: integer responses: '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: Response when repository was removed from the selected list + '409': + description: Conflict when visibility type not set to selected x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/orgs/{org}/projects": + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + "/orgs/{org}/events": get: - summary: List organization projects - description: 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. + summary: List public organization events + description: '' tags: - - projects - operationId: projects/list-for-org + - activity + operationId: activity/list-public-org-events externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-organization-projects + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-public-organization-events parameters: - "$ref": "#/components/parameters/org" - - name: state - description: Indicates the state of the projects to return. Can be either - `open`, `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -9767,274 +9195,139 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/event" examples: - default: - "$ref": "#/components/examples/project-items" - headers: - Link: - "$ref": "#/components/headers/link" - '422': - "$ref": "#/components/responses/validation_failed_simple" + 200-response: + "$ref": "#/components/examples/public-org-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: - post: - summary: Create an organization project - description: 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. + category: activity + subcategory: events + "/orgs/{org}/external-group/{group_id}": + get: + summary: Get an external group + description: |- + Displays information about the specific group's usage. Provides a list of the group's external members as well as a list of teams that this group is connected to. + + You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. tags: - - projects - operationId: projects/create-for-org + - teams + operationId: teams/external-idp-group-info-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#create-an-organization-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#external-idp-group-info-for-an-organization parameters: - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the project. - body: - type: string - description: The description of the project. - required: - - name - example: - name: Organization Roadmap - body: High-level roadmap for the upcoming year. + - "$ref": "#/components/parameters/group-id" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/external-group" examples: default: - "$ref": "#/components/examples/project-2" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/examples/external-group" x-github: - githubCloudOnly: false + githubCloudOnly: true enabledForGitHubApps: true - category: projects - subcategory: - "/orgs/{org}/public_members": + category: teams + subcategory: external-groups + "/orgs/{org}/external-groups": get: - summary: List public organization members - description: Members of an organization can choose to have their membership - publicized or not. + summary: List external groups in an organization + description: |- + Lists external groups available in an organization. You can query the groups using the `display_name` parameter, only groups with a `group_name` containing the text provided in the `display_name` parameter will be returned. You can also limit your page results using the `per_page` parameter. GitHub Enterprise Server generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + + You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. tags: - - orgs - operationId: orgs/list-public-members + - teams + operationId: teams/list-external-idp-groups-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-public-organization-members + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-external-idp-groups-for-an-organization parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - name: page + description: Page token + in: query + schema: + type: integer + - name: display_name + description: Limits the list to groups containing the text in the group name + in: query + schema: + type: string responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/external-groups" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/external-groups" headers: Link: - "$ref": "#/components/headers/link" + example: ; + rel="next" + schema: + type: string x-github: - githubCloudOnly: false + githubCloudOnly: true enabledForGitHubApps: true - category: orgs - subcategory: members - "/orgs/{org}/public_members/{username}": + category: teams + subcategory: external-groups + "/orgs/{org}/hooks": get: - summary: Check public organization membership for a user + summary: List organization webhooks description: '' tags: - orgs - operationId: orgs/check-public-membership-for-user + operationId: orgs/list-webhooks externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#check-public-organization-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organization-webhooks parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': - description: Response if user is a public member + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/org-hook" + examples: + default: + "$ref": "#/components/examples/org-hook-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': - description: Not Found if user is not a public member + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: orgs - subcategory: members - put: - summary: Set public organization membership for the authenticated user - description: |- - 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)." + subcategory: webhooks + post: + summary: Create an organization webhook + description: 'Here''s how you can create a hook that posts payloads in JSON + format:' tags: - orgs - operationId: orgs/set-public-membership-for-authenticated-user + operationId: orgs/create-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response - '403': - "$ref": "#/components/responses/forbidden" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: orgs - subcategory: members - delete: - summary: Remove public organization membership for the authenticated user - description: '' - tags: - - orgs - operationId: orgs/remove-public-membership-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: orgs - subcategory: members - "/orgs/{org}/repos": - get: - summary: List organization repositories - description: Lists repositories for the specified organization. - tags: - - repos - operationId: repos/list-for-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-organization-repositories - parameters: - - "$ref": "#/components/parameters/org" - - name: type - description: 'Specifies the types of repositories you want returned. Can be - one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`. - Note: For GitHub AE, can be one of `all`, `private`, `forks`, `sources`, - `member`, `internal`. Default: `all`. If your organization is associated - with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise - Server 2.20+, `type` can also be `internal`. However, the `internal` value - is not yet supported when a GitHub App calls this API with an installation - access token.' - in: query - required: false - schema: - type: string - enum: - - all - - public - - private - - forks - - sources - - member - - internal - - name: sort - description: Can be one of `created`, `updated`, `pushed`, `full_name`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - pushed - - full_name - default: created - - name: direction - description: 'Can be one of `asc` or `desc`. Default: when using `full_name`: - `asc`, otherwise `desc`' - in: query - required: false - schema: - type: string - enum: - - asc - - desc - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" - examples: - default: - "$ref": "#/components/examples/minimal-repository-items" - headers: - Link: - "$ref": "#/components/headers/link" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: - post: - summary: Create an organization repository - description: |- - Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - - **OAuth scope requirements** - - When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - - * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * `repo` scope to create a private repository - tags: - - repos - operationId: repos/create-in-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-an-organization-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" requestBody: @@ -10046,641 +9339,552 @@ paths: properties: name: type: string - description: The name of the repository. - description: - type: string - description: A short description of the repository. - homepage: - type: string - description: A URL with more information about the repository. - private: - type: boolean - description: Whether the repository is private. - default: false - visibility: - type: string - description: 'Can be `public` or `private`. If your organization - is associated with an enterprise account using GitHub Enterprise - Cloud or GitHub Enterprise Server 2.20+, `visibility` can also - be `internal`. Note: For GitHub Enterprise Server and GitHub AE, - this endpoint will only list repositories available to all users - on the enterprise. For more information, see "[Creating an internal - repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" - in the GitHub Help documentation.' - enum: - - public - - private - - internal - has_issues: - type: boolean - description: Either `true` to enable issues for this repository - or `false` to disable them. - default: true - has_projects: - type: boolean - description: Either `true` to enable projects for this repository - or `false` to disable them. **Note:** If you're creating a repository - in an organization that has disabled repository projects, the - default is `false`, and if you pass `true`, the API returns an - error. - default: true - has_wiki: - type: boolean - description: Either `true` to enable the wiki for this repository - or `false` to disable it. - default: true - is_template: - type: boolean - description: Either `true` to make this repo available as a template - repository or `false` to prevent it. - default: false - team_id: - type: integer - description: The id of the team that will be granted access to this - repository. This is only valid when creating a repository in an - organization. - auto_init: - type: boolean - description: Pass `true` to create an initial commit with empty - README. - default: false - gitignore_template: - type: string - description: Desired language or platform [.gitignore template](https://github.com/github/gitignore) - to apply. Use the name of the template without the extension. - For example, "Haskell". - license_template: - type: string - description: Choose an [open source license template](https://choosealicense.com/) - that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) - as the `license_template` string. For example, "mit" or "mpl-2.0". - allow_squash_merge: - type: boolean - description: Either `true` to allow squash-merging pull requests, - or `false` to prevent squash-merging. - default: true - allow_merge_commit: - type: boolean - description: Either `true` to allow merging pull requests with a - merge commit, or `false` to prevent merging pull requests with - merge commits. - default: true - allow_rebase_merge: + description: Must be passed as "web". + config: + type: object + description: Key/value pairs to provide settings for this webhook. + [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#create-hook-config-params). + properties: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + username: + type: string + example: '"kdaigle"' + password: + type: string + example: '"password"' + required: + - url + events: + type: array + description: Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + the hook is triggered for. + default: + - push + items: + type: string + active: type: boolean - description: Either `true` to allow rebase-merging pull requests, - or `false` to prevent rebase-merging. + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. default: true - allow_auto_merge: - type: boolean - description: Either `true` to allow auto-merge on pull requests, - or `false` to disallow auto-merge. - default: false - delete_branch_on_merge: - type: boolean - description: Either `true` to allow automatically deleting head - branches when pull requests are merged, or `false` to prevent - automatic deletion. - default: false required: - name - example: - name: Hello-World - description: This is your first repository - homepage: https://github.com - private: false - has_issues: true - has_projects: true - has_wiki: true + - config + examples: + default: + value: + name: web + active: true + events: + - push + - pull_request + config: + url: http://example.com/webhook + content_type: json responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/repository" + "$ref": "#/components/schemas/org-hook" examples: default: - "$ref": "#/components/examples/repository" + "$ref": "#/components/examples/org-hook" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World + example: https://api.github.com/orgs/octocat/hooks/1 schema: type: string - '403': - "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/orgs/{org}/secret-scanning/alerts": + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}": get: - summary: List secret scanning alerts for an organization - description: |- - Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. - To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. - - GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + summary: Get an organization webhook + description: 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)." tags: - - secret-scanning - operationId: secret-scanning/list-alerts-for-org + - orgs + operationId: orgs/get-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/secret-scanning-alert-state" - - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" - - "$ref": "#/components/parameters/secret-scanning-alert-resolution" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/organization-secret-scanning-alert" + "$ref": "#/components/schemas/org-hook" examples: default: - "$ref": "#/components/examples/organization-secret-scanning-alert-list" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/org-hook" '404': "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: secret-scanning - subcategory: - "/orgs/{org}/settings/billing/actions": - get: - summary: Get GitHub Actions billing for an organization - description: |- - Gets the summary of the free and paid GitHub Actions minutes used. - - Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - - Access tokens must have the `repo` or `admin:org` scope. - operationId: billing/get-github-actions-billing-org + category: orgs + subcategory: webhooks + patch: + summary: Update an organization webhook + description: 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)." tags: - - billing + - orgs + operationId: orgs/update-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hook-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + config: + type: object + description: Key/value pairs to provide settings for this webhook. + [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-hook-config-params). + properties: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + required: + - url + events: + type: array + description: Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + the hook is triggered for. + default: + - push + items: + type: string + active: + type: boolean + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. + default: true + name: + type: string + example: '"web"' + examples: + default: + value: + active: true + events: + - pull_request responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-billing-usage" + "$ref": "#/components/schemas/org-hook" examples: default: - "$ref": "#/components/examples/actions-billing-usage" + "$ref": "#/components/examples/org-hook-2" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: billing - subcategory: - "/orgs/{org}/settings/billing/advanced-security": - get: - summary: Get GitHub Advanced Security active committers for an organization - description: |- - Gets the GitHub Advanced Security active committers for an organization per repository. - Each distinct user login across all repositories is counted as a single Advanced Security seat, so the total_advanced_security_committers is not the sum of advanced_security_committers for each repository. - If this organization defers to an enterprise for billing, the total_advanced_security_committers returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + enabledForGitHubApps: true + category: orgs + subcategory: webhooks + delete: + summary: Delete an organization webhook + description: '' tags: - - billing - operationId: billing/get-github-advanced-security-billing-org + - orgs + operationId: orgs/delete-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#delete-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/hook-id" responses: - '200': - description: Success - content: - application/json: - schema: - "$ref": "#/components/schemas/advanced-security-active-committers" - examples: - default: - "$ref": "#/components/examples/advanced-security-active-committers" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: billing - subcategory: - "/orgs/{org}/settings/billing/packages": + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}/config": get: - summary: Get GitHub Packages billing for an organization + summary: Get a webhook configuration for an organization description: |- - Gets the free and paid storage used for GitHub Packages in gigabytes. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + 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 `repo` or `admin:org` scope. - operationId: billing/get-github-packages-billing-org + Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:read` permission. tags: - - billing + - orgs + operationId: orgs/get-webhook-config-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-a-webhook-configuration-for-an-organization parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/packages-billing-usage" + "$ref": "#/components/schemas/webhook-config" examples: default: - "$ref": "#/components/examples/packages-billing-usage" + "$ref": "#/components/examples/webhook-config" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: billing - subcategory: - "/orgs/{org}/settings/billing/shared-storage": - get: - summary: Get shared storage billing for an organization + enabledForGitHubApps: true + category: orgs + subcategory: webhooks + patch: + summary: Update a webhook configuration for an organization description: |- - Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." + 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 `repo` or `admin:org` scope. - operationId: billing/get-shared-storage-billing-org + Access tokens must have the `admin:org_hook` scope, and GitHub Apps must have the `organization_hooks:write` permission. tags: - - billing + - orgs + operationId: orgs/update-webhook-config-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-a-webhook-configuration-for-an-organization parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hook-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + examples: + default: + summary: Update an existing webhook + value: + url: http://example.com/webhook + content_type: json + insecure_ssl: '0' + secret: "********" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/combined-billing-usage" + "$ref": "#/components/schemas/webhook-config" examples: default: - "$ref": "#/components/examples/combined-billing-usage" + "$ref": "#/components/examples/webhook-config" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: billing - subcategory: - "/orgs/{org}/team-sync/groups": + enabledForGitHubApps: true + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}/deliveries": get: - summary: List IdP groups for an organization - description: |- - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - List IdP groups available in an organization. You can limit your page results using the `per_page` parameter. GitHub generates a url-encoded `page` token using a cursor value for where the next page begins. For more information on cursor pagination, see "[Offset and Cursor Pagination explained](https://dev.to/jackmarchant/offset-and-cursor-pagination-explained-b89)." + summary: List deliveries for an organization webhook + description: Returns a list of webhook deliveries for a webhook configured in + an organization. tags: - - teams - operationId: teams/list-idp-groups-for-org + - orgs + operationId: orgs/list-webhook-deliveries externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-idp-groups-for-an-organization + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-deliveries-for-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/hook-id" - "$ref": "#/components/parameters/per-page" - - name: page - description: Page token - in: query - schema: - type: string + - "$ref": "#/components/parameters/cursor" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/group-mapping" + type: array + items: + "$ref": "#/components/schemas/hook-delivery-item" examples: default: - "$ref": "#/components/examples/group-mapping-3" - headers: - Link: - example: ; - rel="next" - schema: - type: string + "$ref": "#/components/examples/hook-delivery-items" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: team-sync - "/orgs/{org}/teams": + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}": get: - summary: List teams - description: Lists all teams in an organization that are visible to the authenticated - user. + summary: Get a webhook delivery for an organization webhook + description: Returns a delivery for a webhook configured in an organization. tags: - - teams - operationId: teams/list + - orgs + operationId: orgs/get-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-teams + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-a-webhook-delivery-for-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/delivery-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + "$ref": "#/components/schemas/hook-delivery" examples: default: - "$ref": "#/components/examples/team-items" - headers: - Link: - "$ref": "#/components/headers/link" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/hook-delivery" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": post: - summary: Create a team - description: |- - To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - - When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". + summary: Redeliver a delivery for an organization webhook + description: Redeliver a delivery for a webhook configured in an organization. tags: - - teams - operationId: teams/create + - orgs + operationId: orgs/redeliver-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the team. - description: - type: string - description: The description of the team. - maintainers: - type: array - description: List GitHub IDs for organization members who will become - team maintainers. - items: - type: string - repo_names: - type: array - description: The full name (e.g., "organization-name/repository-name") - of repositories to add the team to. - items: - type: string - privacy: - type: string - description: "The level of privacy this team should have. The options - are: \n**For a non-nested team:** \n\\* `secret` - only visible - to organization owners and members of this team. \n\\* `closed` - - visible to all members of this organization. \nDefault: `secret` - \ \n**For a parent or child team:** \n\\* `closed` - visible - to all members of this organization. \nDefault for child team: - `closed`" - enum: - - secret - - closed - permission: - type: string - description: "**Deprecated**. The permission that new repositories - will be added to the team with when none is specified. Can be - one of: \n\\* `pull` - team members can pull, but not push to - or administer newly-added repositories. \n\\* `push` - team members - can pull and push, but not administer newly-added repositories." - enum: - - pull - - push - default: pull - parent_team_id: - type: integer - description: The ID of a team to set as the parent team. - required: - - name - example: - name: Justice League - description: A great team - permission: push - privacy: closed + - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/delivery-id" responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/team-full" - examples: - default: - "$ref": "#/components/examples/team-full" + '202': + "$ref": "#/components/responses/accepted" + '400': + "$ref": "#/components/responses/bad_request" '422': "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}": - get: - summary: Get a team by name - description: |- - 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}`. + category: orgs + subcategory: webhooks + "/orgs/{org}/hooks/{hook_id}/pings": + post: + summary: Ping an organization webhook + description: This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) + to be sent to the hook. tags: - - teams - operationId: teams/get-by-name + - orgs + operationId: orgs/ping-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-a-team-by-name + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#ping-an-organization-webhook parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/hook-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/team-full" - examples: - default: - "$ref": "#/components/examples/team-full" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: - patch: - summary: Update a team + category: orgs + subcategory: webhooks + "/orgs/{org}/installation": + get: + summary: Get an organization installation for the authenticated app description: |- - To edit a team, the authenticated user must either be an organization owner or a team maintainer. + Enables an authenticated GitHub App to find the organization's installation information. - **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}`. + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - teams - operationId: teams/update-in-org + - apps + operationId: apps/get-org-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#update-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-an-organization-installation-for-the-authenticated-app parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the team. - description: - type: string - description: The description of the team. - privacy: - type: string - description: "The level of privacy this team should have. Editing - teams without specifying this parameter leaves `privacy` intact. - When a team is nested, the `privacy` for parent teams cannot be - `secret`. The options are: \n**For a non-nested team:** \n\\* - `secret` - only visible to organization owners and members of - this team. \n\\* `closed` - visible to all members of this organization. - \ \n**For a parent or child team:** \n\\* `closed` - visible - to all members of this organization." - enum: - - secret - - closed - permission: - type: string - description: "**Deprecated**. The permission that new repositories - will be added to the team with when none is specified. Can be - one of: \n\\* `pull` - team members can pull, but not push to - or administer newly-added repositories. \n\\* `push` - team members - can pull and push, but not administer newly-added repositories. - \ \n\\* `admin` - team members can pull, push and administer newly-added - repositories." - enum: - - pull - - push - - admin - default: pull - parent_team_id: - type: integer - description: The ID of a team to set as the parent team. - nullable: true - example: - name: new team name - description: new team description - privacy: closed responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-full" + "$ref": "#/components/schemas/installation" examples: default: - "$ref": "#/components/examples/team-full" + "$ref": "#/components/examples/installation" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: - delete: - summary: Delete a team - description: |- - 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}`. + enabledForGitHubApps: false + category: apps + subcategory: + "/orgs/{org}/installations": + get: + summary: List app installations for an organization + description: 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. tags: - - teams - operationId: teams/delete-in-org + - orgs + operationId: orgs/list-app-installations externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#delete-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-app-installations-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - installations + properties: + total_count: + type: integer + installations: + type: array + items: + "$ref": "#/components/schemas/installation" + examples: + default: + "$ref": "#/components/examples/installation-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}/discussions": + category: orgs + subcategory: + "/orgs/{org}/issues": get: - summary: List discussions + summary: List organization issues assigned to the authenticated user description: |- - 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/). + List issues in an organization assigned 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}/discussions`. + **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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. tags: - - teams - operationId: teams/list-discussions-in-org + - issues + operationId: issues/list-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-discussions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - - name: pinned + - name: filter + description: Indicates which sorts of issues to return. `assigned` means issues + assigned to you. `created` means issues created by you. `mentioned` means + issues mentioning you. `subscribed` means issues you're subscribed to updates + for. `all` or `repos` means all issues you can see, regardless of participation + or creation. + in: query + required: false + schema: + type: string + enum: + - assigned + - created + - mentioned + - subscribed + - repos + - all + default: assigned + - name: state + description: Indicates the state of the issues to return. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - "$ref": "#/components/parameters/labels" + - name: sort + description: What to sort results by. in: query required: false - description: Pinned discussions only filter schema: type: string + enum: + - created + - updated + - comments + default: created + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -10689,125 +9893,195 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/team-discussion-items" + "$ref": "#/components/examples/issue-with-repo-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: discussions - post: - summary: Create a discussion - description: |- - Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - - **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions`. + enabledForGitHubApps: false + category: issues + subcategory: + "/orgs/{org}/members": + get: + summary: List organization members + description: 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. tags: - - teams - operationId: teams/create-discussion-in-org + - orgs + operationId: orgs/list-members externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-a-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organization-members parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - title: - type: string - description: The discussion post's title. - body: - type: string - description: The discussion post's body text. - private: - type: boolean - description: Private posts are only visible to team members, organization - owners, and team maintainers. Public posts are visible to all - members of the organization. Set to `true` to create a private - post. - default: false - required: - - title - - body - example: - title: Our first team post - body: Hi! This is an area for us to collaborate as a team. + - name: filter + description: Filter members returned in the list. `2fa_disabled` means that + only members without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) + enabled will be returned. This options is only available for organization + owners. + in: query + required: false + schema: + type: string + enum: + - 2fa_disabled + - all + default: all + - name: role + description: Filter members returned by their role. + in: query + required: false + schema: + type: string + enum: + - all + - admin + - member + default: all + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/team-discussion" + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussions - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": + category: orgs + subcategory: members + "/orgs/{org}/members/{username}": get: - summary: Get a discussion - description: |- - 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}`. + summary: Check organization membership for a user + description: Check if a user is, publicly or privately, a member of the organization. tags: - - teams - operationId: teams/get-discussion-in-org + - orgs + operationId: orgs/check-membership-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-a-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#check-organization-membership-for-a-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response if requester is an organization member and user is + a member + '302': + description: Response if requester is not an organization member + headers: + Location: + example: https://api.github.com/orgs/github/public_members/pezra + schema: + type: string + '404': + description: Not Found if requester is an organization member and user is + not a member + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: members + delete: + summary: Remove an organization member + description: 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. + tags: + - orgs + operationId: orgs/remove-member + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#remove-an-organization-member + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: members + "/orgs/{org}/memberships/{username}": + get: + summary: Get organization membership for a user + description: In order to get a user's membership with an organization, the authenticated + user must be an organization member. The `state` parameter in the response + can be used to identify the user's membership status. + tags: + - orgs + operationId: orgs/get-membership-for-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-organization-membership-for-a-user + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/org-membership" examples: - default: - "$ref": "#/components/examples/team-discussion" + response-if-user-has-an-active-admin-membership-with-organization: + "$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussions - patch: - summary: Update a discussion - description: |- - 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}`. + category: orgs + subcategory: members + put: + summary: Set organization membership for a user + description: "Only authenticated organization owners can add a member to the + organization or update the member's role.\n\n* 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/enterprise-server@3.6/rest/reference/orgs#get-organization-membership-for-a-user) + will be `pending` until they accept the invitation.\n \n* 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.\n\n**Rate limits**\n\nTo 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." tags: - - teams - operationId: teams/update-discussion-in-org + - orgs + operationId: orgs/set-membership-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#update-a-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#set-organization-membership-for-a-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/username" requestBody: required: false content: @@ -10815,73 +10089,92 @@ paths: schema: type: object properties: - title: - type: string - description: The discussion post's title. - body: + role: type: string - description: The discussion post's body text. - example: - title: Welcome to our first team post + description: "The role to give the user in the organization. Can + be one of: \n\\* `admin` - The user will become an owner of the + organization. \n\\* `member` - The user will become a non-owner + member of the organization." + enum: + - admin + - member + default: member + examples: + default: + summary: Set an organization membership role for a user + value: + role: member responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/org-membership" examples: - default: - "$ref": "#/components/examples/team-discussion-2" + response-if-user-already-had-membership-with-organization: + "$ref": "#/components/examples/org-membership-response-if-user-has-an-active-admin-membership-with-organization" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussions + category: orgs + subcategory: members delete: - summary: Delete a discussion + summary: Remove organization membership for a user description: |- - 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/). + In order to remove a user's membership with an organization, the authenticated user must be an organization owner. - **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}`. + 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. tags: - - teams - operationId: teams/delete-discussion-in-org + - orgs + operationId: orgs/remove-membership-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#delete-a-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#remove-organization-membership-for-a-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/username" responses: '204': description: Response + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussions - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": - get: - summary: List discussion comments - description: |- - 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`. + category: orgs + subcategory: members + "/orgs/{org}/migrations": + get: + summary: List organization migrations + description: Lists the most recent migrations. tags: - - teams - operationId: teams/list-discussion-comments-in-org + - migrations + operationId: migrations/list-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-discussion-comments + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#list-organization-migrations parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/direction" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - name: exclude + description: Exclude attributes from the API response to improve performance + in: query + schema: + type: array + items: + description: Allowed values that can be passed to the exclude param. + enum: + - repositories + example: repositories + type: string responses: '200': description: Response @@ -10890,36 +10183,29 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/team-discussion-comment" + "$ref": "#/components/schemas/migration" examples: default: - "$ref": "#/components/examples/team-discussion-comment-items" + "$ref": "#/components/examples/migration-with-short-org-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: discussion-comments + enabledForGitHubApps: false + category: migrations + subcategory: orgs post: - summary: Create a discussion comment - description: |- - Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - - **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}/comments`. + summary: Start an organization migration + description: Initiates the generation of a migration archive. tags: - - teams - operationId: teams/create-discussion-comment-in-org + - migrations + operationId: migrations/start-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-a-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#start-an-organization-migration parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" requestBody: required: true content: @@ -10927,169 +10213,320 @@ paths: schema: type: object properties: - body: - type: string - description: The discussion comment's body text. + repositories: + type: array + description: A list of arrays indicating which repositories should + be migrated. + items: + type: string + lock_repositories: + type: boolean + example: true + description: Indicates whether repositories should be locked (to + prevent manipulation) while migrating data. + default: false + exclude_metadata: + type: boolean + description: Indicates whether metadata should be excluded and only + git source should be included for the migration. + default: false + exclude_git_data: + type: boolean + description: Indicates whether the repository git data should be + excluded from the migration. + default: false + exclude_attachments: + type: boolean + example: true + description: Indicates whether attachments should be excluded from + the migration (to reduce migration archive file size). + default: false + exclude_releases: + type: boolean + example: true + description: Indicates whether releases should be excluded from + the migration (to reduce migration archive file size). + default: false + exclude_owner_projects: + type: boolean + example: true + description: Indicates whether projects owned by the organization + or users should be excluded. from the migration. + default: false + org_metadata_only: + type: boolean + example: true + description: Indicates whether this should only include organization + metadata (repositories array should be empty and will ignore other + flags). + default: false + exclude: + type: array + description: 'Exclude related items from being returned in the response + in order to improve performance of the request. The array can + include any of: `"repositories"`.' + items: + type: string + enum: + - repositories required: - - body - example: - body: Do you like apples? + - repositories + examples: + default: + value: + repositories: + - github/Hello-World + lock_repositories: true responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + "$ref": "#/components/schemas/migration" examples: default: - "$ref": "#/components/examples/team-discussion-comment" + "$ref": "#/components/examples/migration-with-short-org-2" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: discussion-comments - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": + enabledForGitHubApps: false + category: migrations + subcategory: orgs + "/orgs/{org}/migrations/{migration_id}": get: - summary: Get a discussion comment + summary: Get an organization migration status description: |- - 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/). + Fetches the status of a migration. - **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}`. + 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. tags: - - teams - operationId: teams/get-discussion-comment-in-org + - migrations + operationId: migrations/get-status-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-a-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#get-an-organization-migration-status parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/migration-id" + - name: exclude + description: Exclude attributes from the API response to improve performance + in: query + schema: + type: array + items: + description: Allowed values that can be passed to the exclude param. + enum: + - repositories + example: repositories + type: string + responses: + '200': + description: |- + * `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. + content: + application/json: + schema: + "$ref": "#/components/schemas/migration" + examples: + default: + "$ref": "#/components/examples/migration-with-short-org" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: migrations + subcategory: orgs + "/orgs/{org}/outside_collaborators": + get: + summary: List outside collaborators for an organization + description: List all users who are outside collaborators of an organization. + tags: + - orgs + operationId: orgs/list-outside-collaborators + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-outside-collaborators-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - name: filter + description: Filter the list of outside collaborators. `2fa_disabled` means + that only outside collaborators without [two-factor authentication](https://github.com/blog/1614-two-factor-authentication) + enabled will be returned. + in: query + required: false + schema: + type: string + enum: + - 2fa_disabled + - all + default: all + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/team-discussion-comment" + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussion-comments - patch: - summary: Update a discussion comment - description: |- - 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}`. + category: orgs + subcategory: outside-collaborators + "/orgs/{org}/outside_collaborators/{username}": + put: + summary: Convert an organization member to outside collaborator + description: When an organization member is converted to an outside collaborator, + they'll only have access to the repositories that their current team membership + allows. The user will no longer be a member of the organization. For more + information, see "[Converting an organization member to an outside collaborator](https://docs.github.com/enterprise-server@3.6/articles/converting-an-organization-member-to-an-outside-collaborator/)". + Converting an organization member to an outside collaborator may be restricted + by enterprise administrators. For more information, see "[Enforcing repository + management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." tags: - - teams - operationId: teams/update-discussion-comment-in-org + - orgs + operationId: orgs/convert-member-to-outside-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#update-a-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#convert-an-organization-member-to-outside-collaborator parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/username" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - body: - type: string - description: The discussion comment's body text. - required: - - body - example: - body: Do you like pineapples? + async: + type: boolean + description: When set to `true`, the request will be performed asynchronously. + Returns a 202 status code when the job is successfully queued. + default: false + examples: + '202': + summary: Status code 202, asynchronous request + value: + async: true + '204': + summary: Status code 204, synchronous request + value: responses: - '200': - description: Response + '202': + description: User is getting converted asynchronously content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + type: object + properties: {} + additionalProperties: false examples: - default: - "$ref": "#/components/examples/team-discussion-comment-2" + '202': + value: + '204': + description: User was converted + '403': + description: Forbidden if user is the last owner of the organization, not + a member of the organization, or if the enterprise enforces a policy for + inviting outside collaborators. For more information, see "[Enforcing + repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussion-comments + category: orgs + subcategory: outside-collaborators delete: - summary: Delete a discussion comment - description: |- - 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}`. + summary: Remove outside collaborator from an organization + description: Removing a user from this list will remove them from all the organization's + repositories. tags: - - teams - operationId: teams/delete-discussion-comment-in-org + - orgs + operationId: orgs/remove-outside-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#delete-a-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#remove-outside-collaborator-from-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/username" responses: '204': description: Response + '422': + description: Unprocessable Entity if user is a member of the organization + content: + application/json: + schema: + type: object + properties: + message: + type: string + documentation_url: + type: string + examples: + response-if-user-is-a-member-of-the-organization: + value: + message: You cannot specify an organization member to remove as + an outside collaborator. + documentation_url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#remove-outside-collaborator x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: discussion-comments - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": + category: orgs + subcategory: outside-collaborators + "/orgs/{org}/pre-receive-hooks": get: - summary: List reactions for a team discussion comment - description: |- - 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`. + summary: List pre-receive hooks for an organization + description: List all pre-receive hooks that are enabled or testing for this + organization as well as any disabled hooks that can be configured at the organization + level. Globally disabled pre-receive hooks that do not allow downstream configuration + are not listed. + operationId: enterprise-admin/list-pre-receive-hooks-for-org tags: - - reactions - operationId: reactions/list-for-team-discussion-comment-in-org + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-pre-receive-hooks-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" - - name: content - description: 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. + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/direction" + - name: sort + description: The sort order for the response collection. in: query required: false schema: type: string enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - created + - updated + - name + default: created responses: '200': description: Response @@ -11098,143 +10535,141 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/org-pre-receive-hook" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/org-pre-receive-hook-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - post: - summary: Create reaction for a team discussion comment - description: |- - Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. - - **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. + category: enterprise-admin + subcategory: org-pre-receive-hooks + "/orgs/{org}/pre-receive-hooks/{pre_receive_hook_id}": + get: + summary: Get a pre-receive hook for an organization + description: '' + operationId: enterprise-admin/get-pre-receive-hook-for-org tags: - - reactions - operationId: reactions/create-for-team-discussion-comment-in-org + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-a-pre-receive-hook-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - content: - type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the team discussion comment. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - required: - - content - example: - content: heart + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/org-pre-receive-hook" examples: default: - "$ref": "#/components/examples/reaction" - '201': + "$ref": "#/components/examples/org-pre-receive-hook" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: enterprise-admin + subcategory: org-pre-receive-hooks + patch: + summary: Update pre-receive hook enforcement for an organization + description: For pre-receive hooks which are allowed to be configured at the + org level, you can set `enforcement` and `allow_downstream_configuration` + operationId: enterprise-admin/update-pre-receive-hook-enforcement-for-org + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-pre-receive-hook-enforcement-for-an-organization + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/pre-receive-hook-id" + responses: + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/org-pre-receive-hook" examples: default: - "$ref": "#/components/examples/reaction" + "$ref": "#/components/examples/org-pre-receive-hook-2" + requestBody: + content: + application/json: + schema: + type: object + properties: + enforcement: + description: The state of enforcement for the hook on this repository. + type: string + allow_downstream_configuration: + description: Whether repositories can override enforcement. + type: boolean + examples: + default: + value: + enforcement: enabled + allow_downstream_configuration: false x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": + category: enterprise-admin + subcategory: org-pre-receive-hooks delete: - summary: Delete team discussion comment reaction - description: |- - **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/). + summary: Remove pre-receive hook enforcement for an organization + description: Removes any overrides for this hook at the org level for this org. + operationId: enterprise-admin/remove-pre-receive-hook-enforcement-for-org tags: - - reactions - operationId: reactions/delete-for-team-discussion-comment + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-team-discussion-comment-reaction + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#remove-pre-receive-hook-enforcement-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" - - "$ref": "#/components/parameters/reaction-id" + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/org-pre-receive-hook" + examples: + default: + "$ref": "#/components/examples/org-pre-receive-hook" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": + category: enterprise-admin + subcategory: org-pre-receive-hooks + "/orgs/{org}/projects": get: - summary: List reactions for a team discussion - description: |- - 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`. + summary: List organization projects + description: 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. tags: - - reactions - operationId: reactions/list-for-team-discussion-in-org + - projects + operationId: projects/list-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-a-team-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-organization-projects parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - name: content - description: 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. + - name: state + description: Indicates the state of the projects to return. in: query required: false schema: type: string enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + - open + - closed + - all + default: open - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -11245,34 +10680,34 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/project" examples: default: - "$ref": "#/components/examples/reaction-items" + "$ref": "#/components/examples/project-items" headers: Link: "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: + category: projects + subcategory: post: - summary: Create reaction for a team discussion - description: |- - Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. - - **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. + summary: Create an organization project + description: Creates an organization project board. Returns a `410 Gone` status + if projects are disabled in the organization or if the organization does not + have existing classic projects. If you do not have sufficient privileges to + perform this action, a `401 Unauthorized` or `410 Gone` status is returned. tags: - - reactions - operationId: reactions/create-for-team-discussion-in-org + - projects + operationId: projects/create-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-a-team-discussion + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#create-an-organization-project parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" requestBody: required: true content: @@ -11280,209 +10715,199 @@ paths: schema: type: object properties: - content: + name: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the team discussion. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: The name of the project. + body: + type: string + description: The description of the project. required: - - content - example: - content: heart + - name + examples: + default: + value: + name: Organization Roadmap + body: High-level roadmap for the upcoming year. responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/reaction" - examples: - default: - "$ref": "#/components/examples/reaction" '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/project" examples: default: - "$ref": "#/components/examples/reaction" + "$ref": "#/components/examples/project-2" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: reactions - subcategory: - "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": - delete: - summary: Delete team discussion reaction - description: |- - **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/). + enabledForGitHubApps: true + category: projects + subcategory: + "/orgs/{org}/public_members": + get: + summary: List public organization members + description: Members of an organization can choose to have their membership + publicized or not. tags: - - reactions - operationId: reactions/delete-for-team-discussion + - orgs + operationId: orgs/list-public-members externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-team-discussion-reaction + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-public-organization-members parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/reaction-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/simple-user" + examples: + default: + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/orgs/{org}/teams/{team_slug}/external-groups": - patch: - summary: Update the connection between an external group and a team - description: |- - Creates a connection between a team and an external group. Only one external group can be linked to a team. - - You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. + category: orgs + subcategory: members + "/orgs/{org}/public_members/{username}": + get: + summary: Check public organization membership for a user + description: '' tags: - - teams - operationId: teams/link-external-idp-group-to-team-for-org + - orgs + operationId: orgs/check-public-membership-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#link-external-idp-group-team-connection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#check-public-organization-membership-for-a-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - group_id: - type: integer - description: External Group Id - example: 1 - required: - - group_id - example: - group_id: 123 + - "$ref": "#/components/parameters/username" responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/external-group" - examples: - default: - "$ref": "#/components/examples/external-group" + '204': + description: Response if user is a public member + '404': + description: Not Found if user is not a public member x-github: - githubCloudOnly: true - enabledForGitHubApps: false - category: teams - subcategory: external-groups - delete: - summary: Remove the connection between an external group and a team + githubCloudOnly: false + enabledForGitHubApps: true + category: orgs + subcategory: members + put: + summary: Set public organization membership for the authenticated user description: |- - Deletes a connection between a team and an external group. + The user can publicize their own membership. (A user cannot publicize the membership for another user.) - You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - - teams - operationId: teams/unlink-external-idp-group-from-team-for-org + - orgs + operationId: orgs/set-public-membership-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#unlink-external-idp-group-team-connection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#set-public-organization-membership-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/username" responses: '204': description: Response + '403': + "$ref": "#/components/responses/forbidden" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: false - category: teams - subcategory: external-groups - "/orgs/{org}/teams/{team_slug}/invitations": - get: - summary: List pending team invitations - description: |- - 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`. + category: orgs + subcategory: members + delete: + summary: Remove public organization membership for the authenticated user + description: '' tags: - - teams - operationId: teams/list-pending-invitations-in-org + - orgs + operationId: orgs/remove-public-membership-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-pending-team-invitations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#remove-public-organization-membership-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/username" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/organization-invitation" - examples: - default: - "$ref": "#/components/examples/organization-invitation-items" - headers: - Link: - "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: teams + enabledForGitHubApps: false + category: orgs subcategory: members - "/orgs/{org}/teams/{team_slug}/members": + "/orgs/{org}/repos": get: - summary: List team members - description: |- - Team members will include the members of child teams. - - To list members in a team, the team must be visible to the authenticated user. + summary: List organization repositories + description: Lists repositories for the specified organization. tags: - - teams - operationId: teams/list-members-in-org + - repos + operationId: repos/list-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-team-members + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-organization-repositories parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - name: role - description: "Filters members returned by their role in the team. Can be one - of: \n\\* `member` - normal members of the team. \n\\* `maintainer` - - team maintainers. \n\\* `all` - all members of the team." + - name: type + description: Specifies the types of repositories you want returned. If your + organization is associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, `type` can also be `internal`. + However, the `internal` value is not yet supported when a GitHub App calls + this API with an installation access token. in: query required: false schema: type: string enum: - - member - - maintainer - all - default: all + - public + - private + - forks + - sources + - member + - internal + - name: sort + description: The property to sort the results by. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - pushed + - full_name + default: created + - name: direction + description: 'The order to sort by. Default: `asc` when using `full_name`, + otherwise `desc`.' + in: query + required: false + schema: + type: string + enum: + - asc + - desc - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -11493,239 +10918,497 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/minimal-repository-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: members - "/orgs/{org}/teams/{team_slug}/memberships/{username}": - get: - summary: Get team membership for a user - description: |- - Team members will include the members of child teams. - - To get a user's membership with a team, the team must be visible to the authenticated user. - - **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. - - **Note:** - The response contains the `state` of the membership and the member's `role`. - - The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). - tags: - - teams - operationId: teams/get-membership-for-user-in-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/team-membership" - examples: - response-if-user-is-a-team-maintainer: - "$ref": "#/components/examples/team-membership-response-if-user-is-a-team-maintainer" - '404': - description: if user has no team membership - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: members - put: - summary: Add or update team membership for a user + category: repos + subcategory: + post: + summary: Create an organization repository description: |- - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + Creates a new repository in the specified organization. The authenticated user must be a member of the organization. - 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. + **OAuth scope requirements** - 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. + When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - **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}`. + * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * `repo` scope to create a private repository tags: - - teams - operationId: teams/add-or-update-membership-for-user-in-org + - repos + operationId: repos/create-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-an-organization-repository parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/username" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - role: + name: + type: string + description: The name of the repository. + description: type: string - description: "The role that this user should have in the team. Can - be one of: \n\\* `member` - a normal member of the team. \n\\* - `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." + description: A short description of the repository. + homepage: + type: string + description: A URL with more information about the repository. + private: + type: boolean + description: Whether the repository is private. + default: false + visibility: + type: string + description: 'Can be `public` or `private`. If your organization + is associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, `visibility` can also + be `internal`. Note: For GitHub Enterprise Server and GitHub AE, + this endpoint will only list repositories available to all users + on the enterprise. For more information, see "[Creating an internal + repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)" + in the GitHub Help documentation.' enum: - - member - - maintainer - default: member + - public + - private + - internal + has_issues: + type: boolean + description: Either `true` to enable issues for this repository + or `false` to disable them. + default: true + has_projects: + type: boolean + description: Either `true` to enable projects for this repository + or `false` to disable them. **Note:** If you're creating a repository + in an organization that has disabled repository projects, the + default is `false`, and if you pass `true`, the API returns an + error. + default: true + has_wiki: + type: boolean + description: Either `true` to enable the wiki for this repository + or `false` to disable it. + default: true + is_template: + type: boolean + description: Either `true` to make this repo available as a template + repository or `false` to prevent it. + default: false + team_id: + type: integer + description: The id of the team that will be granted access to this + repository. This is only valid when creating a repository in an + organization. + auto_init: + type: boolean + description: Pass `true` to create an initial commit with empty + README. + default: false + gitignore_template: + type: string + description: Desired language or platform [.gitignore template](https://github.com/github/gitignore) + to apply. Use the name of the template without the extension. + For example, "Haskell". + license_template: + type: string + description: Choose an [open source license template](https://choosealicense.com/) + that best suits your needs, and then use the [license keyword](https://docs.github.com/articles/licensing-a-repository/#searching-github-by-license-type) + as the `license_template` string. For example, "mit" or "mpl-2.0". + allow_squash_merge: + type: boolean + description: Either `true` to allow squash-merging pull requests, + or `false` to prevent squash-merging. + default: true + allow_merge_commit: + type: boolean + description: Either `true` to allow merging pull requests with a + merge commit, or `false` to prevent merging pull requests with + merge commits. + default: true + allow_rebase_merge: + type: boolean + description: Either `true` to allow rebase-merging pull requests, + or `false` to prevent rebase-merging. + default: true + allow_auto_merge: + type: boolean + description: Either `true` to allow auto-merge on pull requests, + or `false` to disallow auto-merge. + default: false + delete_branch_on_merge: + type: boolean + description: Either `true` to allow automatically deleting head + branches when pull requests are merged, or `false` to prevent + automatic deletion. + default: false + use_squash_pr_title_as_default: + type: boolean + description: Either `true` to allow squash-merge commits to use + pull request title, or `false` to use commit message. **This property + has been deprecated. Please use `squash_merge_commit_title` instead. + default: false + deprecated: true + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. + required: + - name + examples: + default: + value: + name: Hello-World + description: This is your first repository + homepage: https://github.com + private: false + has_issues: true + has_projects: true + has_wiki: true responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-membership" + "$ref": "#/components/schemas/repository" examples: - response-if-users-membership-with-team-is-now-pending: - "$ref": "#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending" + default: + "$ref": "#/components/examples/repository" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World + schema: + type: string '403': - description: Forbidden if team synchronization is set up + "$ref": "#/components/responses/forbidden" '422': - description: Unprocessable Entity if you attempt to add an organization - to a team + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: members - delete: - summary: Remove team membership for a user + category: repos + subcategory: + "/orgs/{org}/secret-scanning/alerts": + get: + summary: List secret scanning alerts for an organization description: |- - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + Lists secret scanning alerts for eligible repositories in an organization, from newest to oldest. + To use this endpoint, you must be an administrator or security manager for the organization, and you must use an access token with the `repo` scope or `security_events` scope. + For public repositories, you may instead use the `public_repo` scope. - **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}`. + GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. tags: - - teams - operationId: teams/remove-membership-for-user-in-org + - secret-scanning + operationId: secret-scanning/list-alerts-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/secret-scanning-alert-state" + - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" + - "$ref": "#/components/parameters/secret-scanning-alert-resolution" + - "$ref": "#/components/parameters/secret-scanning-alert-sort" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: - '204': + '200': description: Response - '403': - description: Forbidden if team synchronization is set up + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/organization-secret-scanning-alert" + examples: + default: + "$ref": "#/components/examples/organization-secret-scanning-alert-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: members - "/orgs/{org}/teams/{team_slug}/projects": + category: secret-scanning + subcategory: + "/orgs/{org}/settings/billing/advanced-security": get: - summary: List team projects + summary: Get GitHub Advanced Security active committers for an organization description: |- - Lists the organization projects for a team. + Gets the GitHub Advanced Security active committers for an organization per repository. - **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/projects`. + Each distinct user login across all repositories is counted as a single Advanced Security seat, so the `total_advanced_security_committers` is not the sum of advanced_security_committers for each repository. + + If this organization defers to an enterprise for billing, the `total_advanced_security_committers` returned from the organization API may include some users that are in more than one organization, so they will only consume a single Advanced Security seat at the enterprise level. + + The total number of repositories with committer information is tracked by the `total_count` field. tags: - - teams - operationId: teams/list-projects-in-org + - billing + operationId: billing/get-github-advanced-security-billing-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-team-projects + url: https://docs.github.com/enterprise-server@3.6/rest/reference/billing#get-github-advanced-security-active-committers-for-an-organization parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: Success content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team-project" + "$ref": "#/components/schemas/advanced-security-active-committers" examples: default: - "$ref": "#/components/examples/team-project-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/advanced-security-active-committers" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}/projects/{project_id}": + category: billing + subcategory: + "/orgs/{org}/teams": get: - summary: Check team permissions for a project - description: |- - 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}`. + summary: List teams + description: Lists all teams in an organization that are visible to the authenticated + user. tags: - teams - operationId: teams/check-permissions-for-project-in-org + operationId: teams/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#check-team-permissions-for-a-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-teams parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-project" + type: array + items: + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/team-project" - '404': - description: Not Found if project is not managed by this team + "$ref": "#/components/examples/team-items" + headers: + Link: + "$ref": "#/components/headers/link" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: - put: - summary: Add or update team project permissions + subcategory: + post: + summary: Create a team description: |- - 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. + To create a team, the authenticated user must be a member or owner of `{org}`. By default, organization members can create teams. Organization owners can limit team creation to organization owners. For more information, see "[Setting team creation permissions](https://docs.github.com/en/articles/setting-team-creation-permissions-in-your-organization)." - **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}`. + When you create a new team, you automatically become a team maintainer without explicitly adding yourself to the optional array of `maintainers`. For more information, see "[About teams](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams)". tags: - teams - operationId: teams/add-or-update-project-permissions-in-org + operationId: teams/create externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team parameters: - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/project-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the team. + description: + type: string + description: The description of the team. + maintainers: + type: array + description: List GitHub IDs for organization members who will become + team maintainers. + items: + type: string + repo_names: + type: array + description: The full name (e.g., "organization-name/repository-name") + of repositories to add the team to. + items: + type: string + privacy: + type: string + description: "The level of privacy this team should have. The options + are: \n**For a non-nested team:** \n\\* `secret` - only visible + to organization owners and members of this team. \n\\* `closed` + - visible to all members of this organization. \nDefault: `secret` + \ \n**For a parent or child team:** \n\\* `closed` - visible + to all members of this organization. \nDefault for child team: + `closed`" + enum: + - secret + - closed + permission: + type: string + description: "**Deprecated**. The permission that new repositories + will be added to the team with when none is specified." + enum: + - pull + - push + default: pull + parent_team_id: + type: integer + description: The ID of a team to set as the parent team. + ldap_dn: + type: string + description: The [distinguished name](https://www.ldap.com/ldap-dns-and-rdns) + (DN) of the LDAP entry to map to a team. LDAP synchronization + must be enabled to map LDAP entries to a team. Use the "[Update + LDAP mapping for a team](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-ldap-mapping-for-a-team)" + endpoint to change the LDAP DN. For more information, see "[Using + LDAP](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap#enabling-ldap-sync)." + required: + - name + examples: + default: + value: + name: Justice League + description: A great team + permission: push + privacy: closed + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-full" + examples: + default: + "$ref": "#/components/examples/team-full" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: teams + subcategory: + "/orgs/{org}/teams/{team_slug}": + get: + summary: Get a team by name + description: |- + Gets a team using the team's `slug`. GitHub Enterprise Server 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}`. + tags: + - teams + operationId: teams/get-by-name + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-full" + examples: + default: + "$ref": "#/components/examples/team-full" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: teams + subcategory: + patch: + summary: Update a team + description: |- + 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}`. + tags: + - teams + operationId: teams/update-in-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#update-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" requestBody: required: false content: @@ -11733,63 +11416,91 @@ paths: schema: type: object properties: + name: + type: string + description: The name of the team. + description: + type: string + description: The description of the team. + privacy: + type: string + description: "The level of privacy this team should have. Editing + teams without specifying this parameter leaves `privacy` intact. + When a team is nested, the `privacy` for parent teams cannot be + `secret`. The options are: \n**For a non-nested team:** \n\\* + `secret` - only visible to organization owners and members of + this team. \n\\* `closed` - visible to all members of this organization. + \ \n**For a parent or child team:** \n\\* `closed` - visible + to all members of this organization." + enum: + - secret + - closed permission: type: string - description: "The permission to grant to the team for this project. - Can be one of: \n\\* `read` - team members can read, but not - write to or administer this project. \n\\* `write` - team members - can read and write, but not administer this project. \n\\* `admin` - - team members can read, write and administer this project. \nDefault: - 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).\"" + description: "**Deprecated**. The permission that new repositories + will be added to the team with when none is specified." enum: - - read - - write + - pull + - push - admin - nullable: true + default: pull + parent_team_id: + type: integer + description: The ID of a team to set as the parent team. + nullable: true + examples: + default: + value: + name: new team name + description: new team description + privacy: closed responses: - '204': + '200': + description: Response when the updated information already exists + content: + application/json: + schema: + "$ref": "#/components/schemas/team-full" + examples: + default: + "$ref": "#/components/examples/team-full" + '201': description: Response - '403': - description: Forbidden if the project is not owned by the organization content: application/json: schema: - type: object - properties: - message: - type: string - documentation_url: - type: string + "$ref": "#/components/schemas/team-full" examples: - response-if-the-project-is-not-owned-by-the-organization: - value: - message: Must have admin rights to Repository. - documentation_url: https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions + default: + "$ref": "#/components/examples/team-full" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: + subcategory: delete: - summary: Remove a project from a team + summary: Delete a team description: |- - 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. + To delete a team, the authenticated user must be an organization owner or team maintainer. - **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}`. + 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}`. tags: - teams - operationId: teams/remove-project-in-org + operationId: teams/delete-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#remove-a-project-from-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#delete-a-team parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/project-id" responses: '204': description: Response @@ -11797,25 +11508,32 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}/repos": + subcategory: + "/orgs/{org}/teams/{team_slug}/discussions": get: - summary: List team repositories + summary: List discussions description: |- - Lists a team's repositories visible to the authenticated user. + List all discussions on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/repos`. + **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/discussions`. tags: - teams - operationId: teams/list-repos-in-org + operationId: teams/list-discussions-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-team-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-discussions parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/direction" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - name: pinned + in: query + required: false + description: Pinned discussions only filter + schema: + type: string responses: '200': description: Response @@ -11824,10 +11542,10 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/team-discussion" examples: default: - "$ref": "#/components/examples/minimal-repository-items" + "$ref": "#/components/examples/team-discussion-items" headers: Link: "$ref": "#/components/headers/link" @@ -11835,69 +11553,116 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": - get: - summary: Check team permissions for a repository + subcategory: discussions + post: + summary: Create a discussion description: |- - 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. + Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - 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. + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - 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 `POST /organizations/{org_id}/team/{team_id}/discussions`. + tags: + - teams + operationId: teams/create-discussion-in-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: The discussion post's title. + body: + type: string + description: The discussion post's body text. + private: + type: boolean + description: Private posts are only visible to team members, organization + owners, and team maintainers. Public posts are visible to all + members of the organization. Set to `true` to create a private + post. + default: false + required: + - title + - body + examples: + default: + value: + title: Our first team post + body: Hi! This is an area for us to collaborate as a team. + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-discussion" + examples: + default: + "$ref": "#/components/examples/team-discussion" + x-github: + triggersNotification: true + githubCloudOnly: false + enabledForGitHubApps: true + category: teams + subcategory: discussions + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}": + get: + summary: Get a discussion + description: |- + Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/repos/{owner}/{repo}`. + **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}`. tags: - teams - operationId: teams/check-permissions-for-repo-in-org + operationId: teams/get-discussion-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-discussion parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/discussion-number" responses: '200': - description: Alternative response with repository permissions + description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-repository" + "$ref": "#/components/schemas/team-discussion" examples: - alternative-response-with-repository-permissions: - "$ref": "#/components/examples/team-repository-alternative-response-with-repository-permissions" - '204': - description: Response if team has permission for the repository. This is - the response when the repository media type hasn't been provded in the - Accept header. - '404': - description: Not Found if team does not have permission for the repository + default: + "$ref": "#/components/examples/team-discussion" x-github: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: - put: - summary: Add or update team repository permissions + subcategory: discussions + patch: + summary: Update a discussion description: |- - 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}`. + 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". + **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}`. tags: - teams - operationId: teams/add-or-update-repo-permissions-in-org + operationId: teams/update-discussion-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#update-a-discussion parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/discussion-number" requestBody: required: false content: @@ -11905,56 +11670,47 @@ paths: schema: type: object properties: - permission: + title: type: string - description: "The permission to grant the team on this repository. - Can be one of: \n\\* `pull` - team members can pull, but not - push to or administer this repository. \n\\* `push` - team members - can pull and push, but not administer this repository. \n\\* - `admin` - team members can pull, push and administer this repository. - \ \n\\* `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. - \ \n\\* `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. \n\\* custom repository role name - A custom repository - role if the owning organization has defined any. \n \nIf no - permission is specified, the team's `permission` attribute will - be used to determine what permission to grant the team on this - repository." - enum: - - pull - - push - - admin - - maintain - - triage - default: push + description: The discussion post's title. + body: + type: string + description: The discussion post's body text. + examples: + default: + value: + title: Welcome to our first team post responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-discussion" + examples: + default: + "$ref": "#/components/examples/team-discussion-2" x-github: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: + subcategory: discussions delete: - summary: Remove a repository from a team + summary: Delete a discussion description: |- - 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. + Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/repos/{owner}/{repo}`. + **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}`. tags: - teams - operationId: teams/remove-repo-in-org + operationId: teams/delete-discussion-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#delete-a-discussion parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/discussion-number" responses: '204': description: Response @@ -11962,57 +11718,65 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: teams - subcategory: - "/orgs/{org}/teams/{team_slug}/team-sync/group-mappings": + subcategory: discussions + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments": get: - summary: List IdP groups for a team + summary: List discussion comments description: |- - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - List IdP groups connected to a team on GitHub. + List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/team-sync/group-mappings`. + **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`. tags: - teams - operationId: teams/list-idp-groups-in-org + operationId: teams/list-discussion-comments-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-discussion-comments parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/group-mapping" + type: array + items: + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/group-mapping-3" + "$ref": "#/components/examples/team-discussion-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: - githubCloudOnly: true - enabledForGitHubApps: false + githubCloudOnly: false + enabledForGitHubApps: true category: teams - subcategory: team-sync - patch: - summary: Create or update IdP group connections + subcategory: discussion-comments + post: + summary: Create a discussion comment description: |- - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - 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. + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - **Note:** You can also specify a team by `org_id` and `team_id` using the route `PATCH /organizations/{org_id}/team/{team_id}/team-sync/group-mappings`. + **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`. tags: - teams - operationId: teams/create-or-update-idp-group-connections-in-org + operationId: teams/create-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" requestBody: required: true content: @@ -12020,442 +11784,321 @@ paths: schema: type: object properties: - groups: - type: array - description: The IdP groups you want to connect to a GitHub team. - When updating, the new `groups` object will replace the original - one. You must include any existing groups that you don't want - to remove. - items: - type: object - properties: - group_id: - type: string - description: ID of the IdP group. - group_name: - type: string - description: Name of the IdP group. - group_description: - type: string - description: Description of the IdP group. - required: - - group_id - - group_name - - group_description - additionalProperties: false - example: - groups: - - group_id: '123' - group_name: Octocat admins - group_description: string + body: + type: string + description: The discussion comment's body text. + required: + - body + examples: + default: + value: + body: Do you like apples? responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/group-mapping" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/group-mapping" + "$ref": "#/components/examples/team-discussion-comment" x-github: - githubCloudOnly: true - enabledForGitHubApps: false + triggersNotification: true + githubCloudOnly: false + enabledForGitHubApps: true category: teams - subcategory: team-sync - "/orgs/{org}/teams/{team_slug}/teams": + subcategory: discussion-comments + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}": get: - summary: List child teams + summary: Get a discussion comment description: |- - Lists the child teams of the team specified by `{team_slug}`. + Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}/teams`. + **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}`. tags: - teams - operationId: teams/list-child-in-org + operationId: teams/get-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-child-teams + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-discussion-comment parameters: - "$ref": "#/components/parameters/org" - "$ref": "#/components/parameters/team-slug" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: if child teams exist - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/team" - examples: - response-if-child-teams-exist: - "$ref": "#/components/examples/team-items-response-if-child-teams-exist" - headers: - Link: - "$ref": "#/components/headers/link" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: teams - subcategory: - "/projects/columns/cards/{card_id}": - get: - summary: Get a project card - description: '' - tags: - - projects - operationId: projects/get-card - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/projects#get-a-project-card - parameters: - - "$ref": "#/components/parameters/card-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-card" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/project-card" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/team-discussion-comment" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: cards + category: teams + subcategory: discussion-comments patch: - summary: Update an existing project card - description: '' + summary: Update a discussion comment + description: |- + Edits the body text of a discussion comment. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. tags: - - projects - operationId: projects/update-card + - teams + operationId: teams/update-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#update-a-project-card + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#update-a-discussion-comment parameters: - - "$ref": "#/components/parameters/card-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - note: - description: The project card's note - example: Update all gems + body: type: string - nullable: true - archived: - description: Whether or not the card is archived - example: false - type: boolean + description: The discussion comment's body text. + required: + - body + examples: + default: + value: + body: Do you like pineapples? responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-card" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/project-card" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/examples/team-discussion-comment-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: cards + category: teams + subcategory: discussion-comments delete: - summary: Delete a project card - description: '' + summary: Delete a discussion comment + description: |- + Deletes a comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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}`. tags: - - projects - operationId: projects/delete-card + - teams + operationId: teams/delete-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#delete-a-project-card + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#delete-a-discussion-comment parameters: - - "$ref": "#/components/parameters/card-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: string - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: projects - subcategory: cards - "/projects/columns/cards/{card_id}/moves": - post: - summary: Move a project card - description: '' - tags: - - projects - operationId: projects/move-card - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/projects#move-a-project-card - parameters: - - "$ref": "#/components/parameters/card-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - position: - description: 'The position of the card in a column. Can be one of: - `top`, `bottom`, or `after:` to place after the specified - card.' - example: bottom - type: string - pattern: "^(?:top|bottom|after:\\d+)$" - column_id: - description: The unique identifier of the column the card should - be moved to - example: 42 - type: integer - required: - - position - type: object - responses: - '201': - description: Response - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: false - '304': - "$ref": "#/components/responses/not_modified" - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: object - properties: - code: - type: string - message: - type: string - resource: - type: string - field: - type: string - '401': - "$ref": "#/components/responses/requires_authentication" - '503': - description: Response - content: - application/json: - schema: - type: object - properties: - code: - type: string - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: object - properties: - code: - type: string - message: - type: string - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: cards - "/projects/columns/{column_id}": + category: teams + subcategory: discussion-comments + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions": get: - summary: Get a project column - description: '' + summary: List reactions for a team discussion comment + description: |- + List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments/). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. tags: - - projects - operationId: projects/get-column + - reactions + operationId: reactions/list-for-team-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#get-a-project-column + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment parameters: - - "$ref": "#/components/parameters/column-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a team discussion comment. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-column" + type: array + items: + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-column" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/reaction-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns - patch: - summary: Update an existing project column - description: '' + category: reactions + subcategory: + post: + summary: Create reaction for a team discussion comment + description: |- + Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/comments/:comment_number/reactions`. tags: - - projects - operationId: projects/update-column + - reactions + operationId: reactions/create-for-team-discussion-comment-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#update-a-project-column + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment parameters: - - "$ref": "#/components/parameters/column-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" requestBody: required: true content: application/json: schema: + type: object properties: - name: - description: Name of the project column - example: Remaining tasks + content: type: string + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the team discussion comment. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes required: - - name - type: object + - content + examples: + default: + value: + content: heart responses: '200': + description: Response when the reaction type has already been added to this + team discussion comment + content: + application/json: + schema: + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-column" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-column" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/reaction" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns + category: reactions + subcategory: + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}": delete: - summary: Delete a project column - description: '' + summary: Delete team discussion comment reaction + description: |- + **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/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - projects - operationId: projects/delete-column + - reactions + operationId: reactions/delete-for-team-discussion-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#delete-a-project-column + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-team-discussion-comment-reaction parameters: - - "$ref": "#/components/parameters/column-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/reaction-id" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns - "/projects/columns/{column_id}/cards": + category: reactions + subcategory: + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions": get: - summary: List project cards - description: '' + summary: List reactions for a team discussion + description: |- + List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/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`. tags: - - projects - operationId: projects/list-cards + - reactions + operationId: reactions/list-for-team-discussion-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-project-cards + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion parameters: - - "$ref": "#/components/parameters/column-id" - - name: archived_state - description: Filters the project cards that are returned by the card's state. - Can be one of `all`,`archived`, or `not_archived`. + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a team discussion. in: query required: false schema: type: string enum: - - all - - archived - - not_archived - default: not_archived + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -12466,360 +12109,236 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/project-card" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-card-items" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: cards + category: reactions + subcategory: post: - summary: Create a project card - description: '' + summary: Create reaction for a team discussion + description: |- + Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `POST /organizations/:org_id/team/:team_id/discussions/:discussion_number/reactions`. tags: - - projects - operationId: projects/create-card + - reactions + operationId: reactions/create-for-team-discussion-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#create-a-project-card + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion parameters: - - "$ref": "#/components/parameters/column-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" requestBody: required: true content: application/json: schema: - oneOf: - - type: object - properties: - note: - description: The project card's note - example: Update all gems - type: string - nullable: true - required: - - note - - type: object - properties: - content_id: - description: The unique identifier of the content associated with - the card - example: 42 - type: integer - content_type: - description: The piece of content associated with the card - example: PullRequest - type: string - required: - - content_id - - content_type + type: object + properties: + content: + type: string + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the team discussion. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + required: + - content + examples: + default: + value: + content: heart responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-card" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-card" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - description: Validation failed - content: - application/json: - schema: - oneOf: - - "$ref": "#/components/schemas/validation-error" - - "$ref": "#/components/schemas/validation-error-simple" - '503': + "$ref": "#/components/examples/reaction" + '201': description: Response content: application/json: schema: - type: object - properties: - code: - type: string - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: object - properties: - code: - type: string - message: - type: string + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: projects - subcategory: cards - "/projects/columns/{column_id}/moves": - post: - summary: Move a project column - description: '' + enabledForGitHubApps: false + category: reactions + subcategory: + "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}": + delete: + summary: Delete team discussion reaction + description: |- + **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/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - projects - operationId: projects/move-column + - reactions + operationId: reactions/delete-for-team-discussion externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#move-a-project-column + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-team-discussion-reaction parameters: - - "$ref": "#/components/parameters/column-id" - requestBody: - required: true - content: - application/json: - schema: - properties: - position: - description: 'The position of the column in a project. Can be one - of: `first`, `last`, or `after:` to place after the - specified column.' - example: last - type: string - pattern: "^(?:first|last|after:\\d+)$" - required: - - position - type: object + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/reaction-id" responses: - '201': + '204': description: Response - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: false - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns - "/projects/{project_id}": + category: reactions + subcategory: + "/orgs/{org}/teams/{team_slug}/external-groups": get: - summary: Get a project - description: 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. + summary: List a connection between an external group and a team + description: |- + Lists a connection between a team and an external group. + + You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. tags: - - projects - operationId: projects/get + - teams + operationId: teams/list-linked-external-idp-groups-to-team-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#get-a-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-external-idp-group-team-connection parameters: - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/external-groups" examples: default: - "$ref": "#/components/examples/project-3" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/external-groups" x-github: - githubCloudOnly: false + githubCloudOnly: true enabledForGitHubApps: true - category: projects - subcategory: + category: teams + subcategory: external-groups patch: - summary: Update a project - description: 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. - operationId: projects/update + summary: Update the connection between an external group and a team + description: |- + Creates a connection between a team and an external group. Only one external group can be linked to a team. + + You can manage team membership with your identity provider using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see "[GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products)" in the GitHub Help documentation. tags: - - projects + - teams + operationId: teams/link-external-idp-group-to-team-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#update-a-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#link-external-idp-group-team-connection parameters: - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" requestBody: - required: false + required: true content: application/json: schema: - properties: - name: - description: Name of the project - example: Week One Sprint - type: string - body: - description: Body of the project - example: This project represents the sprint of the first week in - January - type: string - nullable: true - state: - description: State of the project; either 'open' or 'closed' - example: open - type: string - organization_permission: - description: The baseline permission that all organization members - have on this project - type: string - enum: - - read - - write - - admin - - none - private: - description: Whether or not this project can be seen by everyone. - type: boolean type: object + properties: + group_id: + type: integer + description: External Group Id + example: 1 + required: + - group_id + examples: + default: + value: + group_id: 123 responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/external-group" examples: default: - "$ref": "#/components/examples/project-3" - '404': - description: Not Found if the authenticated user does not have access to - the project - '304': - "$ref": "#/components/responses/not_modified" - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: string - '401': - "$ref": "#/components/responses/requires_authentication" - '410': - "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/examples/external-group" x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: projects - subcategory: + githubCloudOnly: true + enabledForGitHubApps: false + category: teams + subcategory: external-groups delete: - summary: Delete a project - description: Deletes a project board. Returns a `404 Not Found` status if projects - are disabled. - operationId: projects/delete + summary: Remove the connection between an external group and a team + description: |- + Deletes a connection between a team and an external group. + + You can manage team membership with your IdP using Enterprise Managed Users for GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.6/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. tags: - - projects + - teams + operationId: teams/unlink-external-idp-group-from-team-for-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#delete-a-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#unlink-external-idp-group-team-connection parameters: - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" responses: '204': - description: Delete Success - '304': - "$ref": "#/components/responses/not_modified" - '403': - description: Forbidden - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - errors: - type: array - items: - type: string - '401': - "$ref": "#/components/responses/requires_authentication" - '410': - "$ref": "#/components/responses/gone" - '404': - "$ref": "#/components/responses/not_found" + description: Response x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: projects - subcategory: - "/projects/{project_id}/collaborators": + githubCloudOnly: true + enabledForGitHubApps: false + category: teams + subcategory: external-groups + "/orgs/{org}/teams/{team_slug}/members": get: - summary: List project collaborators - description: 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. + summary: List team members + description: |- + Team members will include the members of child teams. + + To list members in a team, the team must be visible to the authenticated user. tags: - - projects - operationId: projects/list-collaborators + - teams + operationId: teams/list-members-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-project-collaborators + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-members parameters: - - "$ref": "#/components/parameters/project-id" - - name: affiliation - description: "Filters the collaborators by their affiliation. Can be one of: - \ \n\\* `outside`: Outside collaborators of a project that are not a member - of the project's organization. \n\\* `direct`: Collaborators with permissions - to a project, regardless of organization membership status. \n\\* `all`: - All collaborators the authenticated user can see." + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - name: role + description: Filters members returned by their role in the team. in: query required: false schema: type: string enum: - - outside - - direct + - member + - maintainer - all default: all - "$ref": "#/components/parameters/per-page" @@ -12839,34 +12358,75 @@ paths: headers: Link: "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: teams + subcategory: members + "/orgs/{org}/teams/{team_slug}/memberships/{username}": + get: + summary: Get team membership for a user + description: |- + Team members will include the members of child teams. + + To get a user's membership with a team, the team must be visible to the authenticated user. + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/memberships/{username}`. + + **Note:** + The response contains the `state` of the membership and the member's `role`. + + The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). + tags: + - teams + operationId: teams/get-membership-for-user-in-org + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/username" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-membership" + examples: + response-if-user-is-a-team-maintainer: + "$ref": "#/components/examples/team-membership-response-if-user-is-a-team-maintainer" '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: if user has no team membership x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: collaborators - "/projects/{project_id}/collaborators/{username}": + category: teams + subcategory: members put: - summary: Add project collaborator - description: 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. + summary: Add or update team membership for a user + description: |- + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + Adds an organization member to a team. An authenticated organization owner or team maintainer can add organization members to a team. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + + An organization owner can add someone who is not part of the team's organization to a team. When an organization owner adds someone to a team who is not an organization member, this endpoint will send an invitation to the person via email. This newly-created membership will be in the "pending" state until the person accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. + + If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/memberships/{username}`. tags: - - projects - operationId: projects/add-collaborator + - teams + operationId: teams/add-or-update-membership-for-user-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#add-project-collaborator + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user parameters: - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/username" requestBody: required: false @@ -12875,321 +12435,327 @@ paths: schema: type: object properties: - permission: - description: The permission to grant the collaborator. - enum: - - read - - write - - admin - default: write - example: write + role: type: string - nullable: true + description: The role that this user should have in the team. + enum: + - member + - maintainer + default: member + examples: + default: + summary: Add or update team membership for an organization member + value: + role: maintainer responses: - '204': + '200': description: Response - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" + content: + application/json: + schema: + "$ref": "#/components/schemas/team-membership" + examples: + response-if-users-membership-with-team-is-now-pending: + "$ref": "#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending" '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: Forbidden if team synchronization is set up + '422': + description: Unprocessable Entity if you attempt to add an organization + to a team x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: collaborators + category: teams + subcategory: members delete: - summary: Remove user as a collaborator - description: Removes a collaborator from an organization project. You must be - an organization owner or a project `admin` to remove a collaborator. + summary: Remove team membership for a user + description: |- + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `DELETE /organizations/{org_id}/team/{team_id}/memberships/{username}`. tags: - - projects - operationId: projects/remove-collaborator + - teams + operationId: teams/remove-membership-for-user-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#remove-project-collaborator + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user parameters: - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/username" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" - '401': - "$ref": "#/components/responses/requires_authentication" + description: Forbidden if team synchronization is set up x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: collaborators - "/projects/{project_id}/collaborators/{username}/permission": + category: teams + subcategory: members + "/orgs/{org}/teams/{team_slug}/projects": get: - summary: Get project permission for a user - description: '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.' + summary: List team projects + description: |- + 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`. tags: - - projects - operationId: projects/get-permission-for-user + - teams + operationId: teams/list-projects-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#get-project-permission-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-projects parameters: - - "$ref": "#/components/parameters/project-id" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project-collaborator-permission" + type: array + items: + "$ref": "#/components/schemas/team-project" examples: default: - "$ref": "#/components/examples/project-collaborator-permission" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/team-project-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: collaborators - "/projects/{project_id}/columns": + category: teams + subcategory: + "/orgs/{org}/teams/{team_slug}/projects/{project_id}": get: - summary: List project columns - description: '' + summary: Check team permissions for a project + description: |- + 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}`. tags: - - projects - operationId: projects/list-columns + - teams + operationId: teams/check-permissions-for-project-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-project-columns + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/project-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/project-column" + "$ref": "#/components/schemas/team-project" examples: default: - "$ref": "#/components/examples/project-column-items" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/team-project" + '404': + description: Not Found if project is not managed by this team x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns - post: - summary: Create a project column - description: '' + category: teams + subcategory: + put: + summary: Add or update team project permissions + description: |- + 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}`. tags: - - projects - operationId: projects/create-column + - teams + operationId: teams/add-or-update-project-permissions-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#create-a-project-column + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/project-id" requestBody: - required: true + required: false content: application/json: schema: + type: object properties: - name: - description: Name of the project column - example: Remaining tasks + permission: type: string - required: - - name - type: object + description: 'The permission to grant to the team for 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 this endpoint. For more + information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)."' + enum: + - read + - write + - admin + nullable: true + examples: + default: + summary: Updates the permissions for the team to write for the project + value: + permission: write responses: - '201': + '204': description: Response + '403': + description: Forbidden if the project is not owned by the organization content: application/json: schema: - "$ref": "#/components/schemas/project-column" - example: - url: https://api.github.com/projects/columns/367 - project_url: https://api.github.com/projects/120 - cards_url: https://api.github.com/projects/columns/367/cards - id: 367 - node_id: MDEzOlByb2plY3RDb2x1bW4zNjc= - name: To Do - created_at: '2016-09-05T14:18:44Z' - updated_at: '2016-09-05T14:22:28Z' - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '401': - "$ref": "#/components/responses/requires_authentication" + type: object + properties: + message: + type: string + documentation_url: + type: string + examples: + response-if-the-project-is-not-owned-by-the-organization: + value: + message: Must have admin rights to Repository. + documentation_url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: columns - "/rate_limit": - get: - summary: Get rate limit status for the authenticated user + category: teams + subcategory: + delete: + summary: Remove a project from a team description: |- - **Note:** Accessing this endpoint does not count against your REST API rate limit. + 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:** 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. + **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}`. tags: - - rate-limit - operationId: rate-limit/get + - teams + operationId: teams/remove-project-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team + parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/project-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/rate-limit-overview" - examples: - default: - "$ref": "#/components/examples/rate-limit-overview" - headers: - X-RateLimit-Limit: - "$ref": "#/components/headers/x-rate-limit-limit" - X-RateLimit-Remaining: - "$ref": "#/components/headers/x-rate-limit-remaining" - X-RateLimit-Reset: - "$ref": "#/components/headers/x-rate-limit-reset" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: rate-limit - subcategory: - "/reactions/{reaction_id}": - delete: - summary: Delete a reaction (Legacy) + category: teams + subcategory: + "/orgs/{org}/teams/{team_slug}/repos": + get: + summary: List team repositories description: |- - **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/). + Lists a team's repositories visible to the authenticated user. - 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). + **Note:** You can also specify a team by `org_id` and `team_id` using the route `GET /organizations/{org_id}/team/{team_id}/repos`. tags: - - reactions - operationId: reactions/delete-legacy + - teams + operationId: teams/list-repos-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#delete-a-reaction-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-repositories parameters: - - "$ref": "#/components/parameters/reaction-id" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '410': - "$ref": "#/components/responses/gone" + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" + examples: + default: + "$ref": "#/components/examples/minimal-repository-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-21' - deprecationDate: '2020-02-26' - category: reactions - subcategory: - deprecated: true - "/repos/{owner}/{repo}": + category: teams + subcategory: + "/orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}": get: - summary: Get a repository - description: 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. + summary: Check team permissions for a repository + description: |- + 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/enterprise-server@3.6/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}`. tags: - - repos - operationId: repos/get + - teams + operationId: teams/check-permissions-for-repo-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#check-team-permissions-for-a-repository parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" responses: '200': - description: Response + description: Alternative response with repository permissions content: application/json: schema: - "$ref": "#/components/schemas/full-repository" + "$ref": "#/components/schemas/team-repository" examples: - default-response: - "$ref": "#/components/examples/full-repository-default-response" - '403': - "$ref": "#/components/responses/forbidden" + alternative-response-with-repository-permissions: + "$ref": "#/components/examples/team-repository-alternative-response-with-repository-permissions" + '204': + description: Response if team has permission for the repository. This is + the response when the repository media type hasn't been provded in the + Accept header. '404': - "$ref": "#/components/responses/not_found" - '301': - "$ref": "#/components/responses/moved_permanently" + description: Not Found if team does not have permission for the repository x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - patch: - summary: Update a repository - description: "**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." + category: teams + subcategory: + put: + summary: Add or update team repository permissions + description: |- + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + + **Note:** You can also specify a team by `org_id` and `team_id` using the route `PUT /organizations/{org_id}/team/{team_id}/repos/{owner}/{repo}`. + + For more information about the permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". tags: - - repos - operationId: repos/update + - teams + operationId: teams/add-or-update-repo-permissions-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos/#update-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#add-or-update-team-repository-permissions parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" requestBody: @@ -13199,602 +12765,465 @@ paths: schema: type: object properties: - name: - type: string - description: The name of the repository. - description: - type: string - description: A short description of the repository. - homepage: - type: string - description: A URL with more information about the repository. - private: - type: boolean - description: "Either `true` to make the repository private or `false` - to make it public. Default: `false`. \n**Note**: You will get - a `422` error if the organization restricts [changing repository - visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) - to organization owners and a non-owner tries to change the value - of private. **Note**: You will get a `422` error if the organization - restricts [changing repository visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) - to organization owners and a non-owner tries to change the value - of private." - default: false - visibility: - type: string - description: Can be `public` or `private`. If your organization - is associated with an enterprise account using GitHub Enterprise - Cloud or GitHub Enterprise Server 2.20+, `visibility` can also - be `internal`." - enum: - - public - - private - - internal - security_and_analysis: - type: object - description: 'Specify which security and analysis features to enable - or disable. For example, to enable GitHub Advanced Security, use - this data in the body of the PATCH request: `{"security_and_analysis": - {"advanced_security": {"status": "enabled"}}}`. If you have admin - permissions for a private repository covered by an Advanced Security - license, you can check which security and analysis features are - currently enabled by using a `GET /repos/{owner}/{repo}` request.' - nullable: true - properties: - advanced_security: - type: object - description: Use the `status` property to enable or disable - GitHub Advanced Security for this repository. For more information, - see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." - properties: - status: - type: string - description: Can be `enabled` or `disabled`. - secret_scanning: - type: object - description: Use the `status` property to enable or disable - secret scanning for this repository. For more information, - see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." - properties: - status: - type: string - description: Can be `enabled` or `disabled`. - has_issues: - type: boolean - description: Either `true` to enable issues for this repository - or `false` to disable them. - default: true - has_projects: - type: boolean - description: Either `true` to enable projects for this repository - or `false` to disable them. **Note:** If you're creating a repository - in an organization that has disabled repository projects, the - default is `false`, and if you pass `true`, the API returns an - error. - default: true - has_wiki: - type: boolean - description: Either `true` to enable the wiki for this repository - or `false` to disable it. - default: true - is_template: - type: boolean - description: Either `true` to make this repo available as a template - repository or `false` to prevent it. - default: false - default_branch: + permission: type: string - description: Updates the default branch for this repository. - allow_squash_merge: - type: boolean - description: Either `true` to allow squash-merging pull requests, - or `false` to prevent squash-merging. - default: true - allow_merge_commit: - type: boolean - description: Either `true` to allow merging pull requests with a - merge commit, or `false` to prevent merging pull requests with - merge commits. - default: true - allow_rebase_merge: - type: boolean - description: Either `true` to allow rebase-merging pull requests, - or `false` to prevent rebase-merging. - default: true - allow_auto_merge: - type: boolean - description: Either `true` to allow auto-merge on pull requests, - or `false` to disallow auto-merge. - default: false - delete_branch_on_merge: - type: boolean - description: Either `true` to allow automatically deleting head - branches when pull requests are merged, or `false` to prevent - automatic deletion. - default: false - archived: - type: boolean - description: "`true` to archive this repository. **Note**: You cannot - unarchive repositories through the API." - default: false - allow_forking: - type: boolean - description: Either `true` to allow private forks, or `false` to - prevent private forks. - default: false - example: - name: Hello-World - description: This is your first repository - homepage: https://github.com - private: true - has_issues: true - has_projects: true - has_wiki: true + description: The permission to grant the team on 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. + default: push + examples: + default: + summary: Adding a team to an organization repository with the write + role + value: + permission: push responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/full-repository" - examples: - default: - "$ref": "#/components/examples/full-repository" - '307': - "$ref": "#/components/responses/temporary_redirect" - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: + category: teams + subcategory: delete: - summary: Delete a repository + summary: Remove a repository from a team description: |- - Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. + 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. - If an organization owner has configured the organization to prevent members from deleting organization-owned - repositories, you will get a `403 Forbidden` response. + **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}`. tags: - - repos - operationId: repos/delete + - teams + operationId: teams/remove-repo-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#remove-a-repository-from-a-team parameters: + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" responses: '204': description: Response - '403': - description: 'If an organization owner has configured the organization to - prevent members from deleting organization-owned repositories, a member - will get this response:' - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - example: - message: Organization members cannot delete repositories. - documentation_url: https://docs.github.com/rest/reference/repos#delete-a-repository - '307': - "$ref": "#/components/responses/temporary_redirect" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/actions/artifacts": + category: teams + subcategory: + "/orgs/{org}/teams/{team_slug}/teams": get: - summary: List artifacts for a repository - description: 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. + summary: List child teams + description: |- + 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`. tags: - - actions - operationId: actions/list-artifacts-for-repo + - teams + operationId: teams/list-child-in-org externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-artifacts-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-child-teams parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/team-slug" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: if child teams exist content: application/json: schema: - type: object - required: - - total_count - - artifacts - properties: - total_count: - type: integer - artifacts: - type: array - items: - "$ref": "#/components/schemas/artifact" + type: array + items: + "$ref": "#/components/schemas/team" examples: - default: - "$ref": "#/components/examples/artifact-paginated" + response-if-child-teams-exist: + "$ref": "#/components/examples/team-items-response-if-child-teams-exist" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: artifacts - "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": + category: teams + subcategory: + "/projects/columns/cards/{card_id}": get: - summary: Get an artifact - description: 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. + summary: Get a project card + description: '' tags: - - actions - operationId: actions/get-artifact + - projects + operationId: projects/get-card externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-an-artifact + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#get-a-project-card parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/artifact-id" + - "$ref": "#/components/parameters/card-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/artifact" + "$ref": "#/components/schemas/project-card" examples: default: - "$ref": "#/components/examples/artifact" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: artifacts - delete: - summary: Delete an artifact - description: 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. - tags: - - actions - operationId: actions/delete-artifact - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-an-artifact - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/artifact-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: actions - subcategory: artifacts - "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": - get: - summary: Download an artifact - description: |- - 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. - tags: - - actions - operationId: actions/download-artifact - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#download-an-artifact - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/artifact-id" - - name: archive_format - in: path - required: true - schema: - type: string - responses: - '302': - description: Response - headers: - Location: - "$ref": "#/components/headers/location" + "$ref": "#/components/examples/project-card" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: artifacts - "/repos/{owner}/{repo}/actions/jobs/{job_id}": - get: - summary: Get a job for a workflow run - description: 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. + category: projects + subcategory: cards + patch: + summary: Update an existing project card + description: '' tags: - - actions - operationId: actions/get-job-for-workflow-run + - projects + operationId: projects/update-card externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-job-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#update-a-project-card parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/job-id" + - "$ref": "#/components/parameters/card-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + note: + description: The project card's note + example: Update all gems + type: string + nullable: true + archived: + description: Whether or not the card is archived + example: false + type: boolean + examples: + default: + summary: Change the note on the card + value: + note: Add payload for delete Project column responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/job" + "$ref": "#/components/schemas/project-card" examples: default: - "$ref": "#/components/examples/job" + "$ref": "#/components/examples/project-card" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-jobs - "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": - get: - summary: Download job logs for a workflow run - description: |- - 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. + category: projects + subcategory: cards + delete: + summary: Delete a project card + description: '' tags: - - actions - operationId: actions/download-job-logs-for-workflow-run + - projects + operationId: projects/delete-card externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#download-job-logs-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#delete-a-project-card parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/job-id" + - "$ref": "#/components/parameters/card-id" responses: - '302': + '204': description: Response - headers: - Location: - example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/jobs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D + '304': + "$ref": "#/components/responses/not_modified" + '403': + description: Forbidden + content: + application/json: schema: - type: string + type: object + properties: + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: string + '401': + "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-jobs - "/repos/{owner}/{repo}/actions/permissions": - get: - summary: Get GitHub Actions permissions for a repository - description: |- - 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. - operationId: actions/get-github-actions-permissions-repository + category: projects + subcategory: cards + "/projects/columns/cards/{card_id}/moves": + post: + summary: Move a project card + description: '' tags: - - actions + - projects + operationId: projects/move-card externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-github-actions-permissions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#move-a-project-card parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/actions-repository-permissions" - examples: - default: - "$ref": "#/components/examples/actions-repository-permissions" - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - put: - summary: Set GitHub Actions permissions for a repository - description: |- - 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. - operationId: actions/set-github-actions-permissions-repository - tags: - - actions - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-github-actions-permissions-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '204': - description: Response + - "$ref": "#/components/parameters/card-id" requestBody: required: true content: application/json: schema: - type: object properties: - enabled: - "$ref": "#/components/schemas/actions-enabled" - allowed_actions: - "$ref": "#/components/schemas/allowed-actions" + position: + description: 'The position of the card in a column. Can be one of: + `top`, `bottom`, or `after:` to place after the specified + card.' + example: bottom + type: string + pattern: "^(?:top|bottom|after:\\d+)$" + column_id: + description: The unique identifier of the column the card should + be moved to + example: 42 + type: integer required: - - enabled - example: - enabled: true - allowed_actions: selected + - position + type: object + examples: + default: + summary: Move the card to the bottom of the column + value: + column_id: 42 + position: bottom + responses: + '201': + description: Response + content: + application/json: + schema: + type: object + properties: {} + additionalProperties: false + examples: + default: + value: + '304': + "$ref": "#/components/responses/not_modified" + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: object + properties: + code: + type: string + message: + type: string + resource: + type: string + field: + type: string + '401': + "$ref": "#/components/responses/requires_authentication" + '503': + description: Response + content: + application/json: + schema: + type: object + properties: + code: + type: string + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: object + properties: + code: + type: string + message: + type: string + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - "/repos/{owner}/{repo}/actions/permissions/selected-actions": + enabledForGitHubApps: true + category: projects + subcategory: cards + "/projects/columns/{column_id}": get: - summary: Get allowed actions for a repository - description: |- - 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. - operationId: actions/get-allowed-actions-repository + summary: Get a project column + description: '' tags: - - actions + - projects + operationId: projects/get-column externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-allowed-actions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#get-a-project-column parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/column-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/selected-actions" + "$ref": "#/components/schemas/project-column" examples: default: - "$ref": "#/components/examples/selected-actions" + "$ref": "#/components/examples/project-column" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: actions - subcategory: permissions - put: - summary: Set allowed actions for a repository - description: |- - 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. - operationId: actions/set-allowed-actions-repository + enabledForGitHubApps: true + category: projects + subcategory: columns + patch: + summary: Update an existing project column + description: '' tags: - - actions + - projects + operationId: projects/update-column externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-allowed-actions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#update-a-project-column parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '204': - description: Response + - "$ref": "#/components/parameters/column-id" requestBody: - required: false + required: true content: application/json: schema: - "$ref": "#/components/schemas/selected-actions" + properties: + name: + description: Name of the project column + example: Remaining tasks + type: string + required: + - name + type: object examples: - selected_actions: - "$ref": "#/components/examples/selected-actions" - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: actions - subcategory: permissions - "/repos/{owner}/{repo}/actions/runners": - get: - summary: List self-hosted runners for a repository - description: Lists all self-hosted runners configured in a repository. You must - authenticate using an access token with the `repo` scope to use this endpoint. - tags: - - actions - operationId: actions/list-self-hosted-runners-for-repo - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-self-hosted-runners-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + default: + summary: Rename the project column + value: + name: To Do responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - runners - properties: - total_count: - type: integer - runners: - type: array - items: - "$ref": "#/components/schemas/runner" + "$ref": "#/components/schemas/project-column" examples: default: - "$ref": "#/components/examples/runner-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/project-column" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/downloads": + category: projects + subcategory: columns + delete: + summary: Delete a project column + description: '' + tags: + - projects + operationId: projects/delete-column + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#delete-a-project-column + parameters: + - "$ref": "#/components/parameters/column-id" + responses: + '204': + description: Response + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: projects + subcategory: columns + "/projects/columns/{column_id}/cards": get: - summary: List runner applications for a repository - description: |- - 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. + summary: List project cards + description: '' tags: - - actions - operationId: actions/list-runner-applications-for-repo + - projects + operationId: projects/list-cards externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-runner-applications-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-project-cards parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/column-id" + - name: archived_state + description: Filters the project cards that are returned by the card's state. + in: query + required: false + schema: + type: string + enum: + - all + - archived + - not_archived + default: not_archived + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -13803,523 +13232,1025 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/runner-application" + "$ref": "#/components/schemas/project-card" examples: default: - "$ref": "#/components/examples/runner-application-items" + "$ref": "#/components/examples/project-card-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/registration-token": + category: projects + subcategory: cards post: - summary: Create a registration token for a repository - description: "Returns a token that you can pass to the `config` script. The - token expires after one hour. You must authenticate\nusing an access token - with the `repo` scope to use this endpoint.\n\n#### Example using registration - token\n \nConfigure your self-hosted runner, replacing `TOKEN` with the registration - token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org/octo-repo-artifacts - --token TOKEN\n```" + summary: Create a project card + description: '' tags: - - actions - operationId: actions/create-registration-token-for-repo + - projects + operationId: projects/create-card externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-registration-token-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#create-a-project-card parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/column-id" + requestBody: + required: true + content: + application/json: + schema: + oneOf: + - type: object + properties: + note: + description: The project card's note + example: Update all gems + type: string + nullable: true + required: + - note + - type: object + properties: + content_id: + description: The unique identifier of the content associated with + the card + example: 42 + type: integer + content_type: + description: The piece of content associated with the card + example: PullRequest + type: string + required: + - content_id + - content_type + examples: + default: + summary: Create a new card + value: + note: Add payload for delete Project column responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" + "$ref": "#/components/schemas/project-card" examples: default: - "$ref": "#/components/examples/authentication-token" + "$ref": "#/components/examples/project-card" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '422': + description: Validation failed + content: + application/json: + schema: + oneOf: + - "$ref": "#/components/schemas/validation-error" + - "$ref": "#/components/schemas/validation-error-simple" + '503': + description: Response + content: + application/json: + schema: + type: object + properties: + code: + type: string + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: object + properties: + code: + type: string + message: + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/remove-token": + category: projects + subcategory: cards + "/projects/columns/{column_id}/moves": post: - summary: Create a remove token for a repository - description: "Returns a token that you can pass to remove a self-hosted runner - from a repository. The token expires after one hour.\nYou must authenticate - using an access token with the `repo` scope to use this endpoint.\n\n#### - Example using remove token\n \nTo remove your self-hosted runner from a repository, - replace TOKEN with the remove token provided by this endpoint.\n\n```\n./config.sh - remove --token TOKEN\n```" + summary: Move a project column + description: '' tags: - - actions - operationId: actions/create-remove-token-for-repo + - projects + operationId: projects/move-column externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-remove-token-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#move-a-project-column parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/column-id" + requestBody: + required: true + content: + application/json: + schema: + properties: + position: + description: 'The position of the column in a project. Can be one + of: `first`, `last`, or `after:` to place after the + specified column.' + example: last + type: string + pattern: "^(?:first|last|after:\\d+)$" + required: + - position + type: object + examples: + default: + summary: Move the column to the end of the board + value: + position: last responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/authentication-token" + type: object + properties: {} + additionalProperties: false examples: default: - "$ref": "#/components/examples/authentication-token-2" + value: + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed_simple" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/{runner_id}": + category: projects + subcategory: columns + "/projects/{project_id}": get: - summary: Get a self-hosted runner for a repository - description: |- - 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. + summary: Get a project + description: 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. tags: - - actions - operationId: actions/get-self-hosted-runner-for-repo + - projects + operationId: projects/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#get-a-project parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/project-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/runner" + "$ref": "#/components/schemas/project" examples: default: - "$ref": "#/components/examples/runner" + "$ref": "#/components/examples/project-3" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - delete: - summary: Delete a self-hosted runner from a repository - description: |- - 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. + category: projects + subcategory: + patch: + summary: Update a project + description: 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. + operationId: projects/update tags: - - actions - operationId: actions/delete-self-hosted-runner-from-repo + - projects externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#update-a-project parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false + - "$ref": "#/components/parameters/project-id" + requestBody: + required: false + content: + application/json: + schema: + properties: + name: + description: Name of the project + example: Week One Sprint + type: string + body: + description: Body of the project + example: This project represents the sprint of the first week in + January + type: string + nullable: true + state: + description: State of the project; either 'open' or 'closed' + example: open + type: string + organization_permission: + description: The baseline permission that all organization members + have on this project + type: string + enum: + - read + - write + - admin + - none + private: + description: Whether or not this project can be seen by everyone. + type: boolean + type: object + examples: + default: + summary: Change the name, state, and permissions for a project + value: + name: Week One Sprint + state: open + organization_permission: write + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/project" + examples: + default: + "$ref": "#/components/examples/project-3" + '404': + description: Not Found if the authenticated user does not have access to + the project + '304': + "$ref": "#/components/responses/not_modified" + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: string + '401': + "$ref": "#/components/responses/requires_authentication" + '410': + "$ref": "#/components/responses/gone" + '422': + "$ref": "#/components/responses/validation_failed_simple" + x-github: + githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": - get: - summary: List labels for a self-hosted runner for a repository - description: |- - Lists all labels for a self-hosted runner configured in a repository. - - You must authenticate using an access token with the `repo` scope to use this - endpoint. + category: projects + subcategory: + delete: + summary: Delete a project + description: Deletes a project board. Returns a `404 Not Found` status if projects + are disabled. + operationId: projects/delete tags: - - actions - operationId: actions/list-labels-for-self-hosted-runner-for-repo + - projects externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#delete-a-project parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/project-id" responses: - '200': - "$ref": "#/components/responses/actions_runner_labels" + '204': + description: Delete Success + '304': + "$ref": "#/components/responses/not_modified" + '403': + description: Forbidden + content: + application/json: + schema: + type: object + properties: + message: + type: string + documentation_url: + type: string + errors: + type: array + items: + type: string + '401': + "$ref": "#/components/responses/requires_authentication" + '410': + "$ref": "#/components/responses/gone" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - post: - summary: Add custom labels to a self-hosted runner for a repository - description: |- - Add custom labels to a self-hosted runner configured in a repository. - - You must authenticate using an access token with the `repo` scope to use this - endpoint. + category: projects + subcategory: + "/projects/{project_id}/collaborators": + get: + summary: List project collaborators + description: 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. tags: - - actions - operationId: actions/add-custom-labels-to-self-hosted-runner-for-repo + - projects + operationId: projects/list-collaborators externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-project-collaborators parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - labels - properties: - labels: - type: array - minItems: 1 - maxItems: 100 - description: The names of the custom labels to add to the runner. - items: - type: string - example: - labels: - - gpu - - accelerated + - "$ref": "#/components/parameters/project-id" + - name: affiliation + description: Filters the collaborators by their affiliation. `outside` means + outside collaborators of a project that are not a member of the project's + organization. `direct` means collaborators with permissions to a project, + regardless of organization membership status. `all` means all collaborators + the authenticated user can see. + in: query + required: false + schema: + type: string + enum: + - outside + - direct + - all + default: all + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - "$ref": "#/components/responses/actions_runner_labels" + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/simple-user" + examples: + default: + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners + category: projects + subcategory: collaborators + "/projects/{project_id}/collaborators/{username}": put: - summary: Set custom labels for a self-hosted runner for a repository - description: |- - Remove all previous custom labels and set the new custom labels for a specific - self-hosted runner configured in a repository. - - You must authenticate using an access token with the `repo` scope to use this - endpoint. + summary: Add project collaborator + description: 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. tags: - - actions - operationId: actions/set-custom-labels-for-self-hosted-runner-for-repo + - projects + operationId: projects/add-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#add-project-collaborator parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/username" requestBody: - required: true + required: false content: application/json: schema: type: object - required: - - labels properties: - labels: - type: array - minItems: 0 - maxItems: 100 - description: The names of the custom labels to set for the runner. - You can pass an empty array to remove all custom labels. - items: - type: string - example: - labels: - - gpu - - accelerated + permission: + description: The permission to grant the collaborator. + enum: + - read + - write + - admin + default: write + example: write + type: string + nullable: true + examples: + default: + summary: Applying write permissions for the new collaborator + value: + permission: write responses: - '200': - "$ref": "#/components/responses/actions_runner_labels" + '204': + description: Response '404': "$ref": "#/components/responses/not_found" '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners + category: projects + subcategory: collaborators delete: - summary: Remove all custom labels from a self-hosted runner for a repository - description: |- - Remove all custom labels from a self-hosted runner configured in a - repository. Returns the remaining read-only labels from the runner. - - You must authenticate using an access token with the `repo` scope to use this - endpoint. + summary: Remove user as a collaborator + description: Removes a collaborator from an organization project. You must be + an organization owner or a project `admin` to remove a collaborator. tags: - - actions - operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-repo + - projects + operationId: projects/remove-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#remove-project-collaborator parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/username" responses: - '200': - "$ref": "#/components/responses/actions_runner_labels_readonly" + '204': + description: Response + '304': + "$ref": "#/components/responses/not_modified" '404': "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": - delete: - summary: Remove a custom label from a self-hosted runner for a repository - description: |- - Remove a custom label from a self-hosted runner configured - in a repository. Returns the remaining labels from the runner. - - This endpoint returns a `404 Not Found` status if the custom label is not - present on the runner. - - You must authenticate using an access token with the `repo` scope to use this - endpoint. + category: projects + subcategory: collaborators + "/projects/{project_id}/collaborators/{username}/permission": + get: + summary: Get project permission for a user + description: '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.' tags: - - actions - operationId: actions/remove-custom-label-from-self-hosted-runner-for-repo + - projects + operationId: projects/get-permission-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#get-project-permission-for-a-user parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/runner-id" - - "$ref": "#/components/parameters/runner-label-name" + - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/username" responses: '200': - "$ref": "#/components/responses/actions_runner_labels" + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/project-collaborator-permission" + examples: + default: + "$ref": "#/components/examples/project-collaborator-permission" '404': "$ref": "#/components/responses/not_found" '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: self-hosted-runners - "/repos/{owner}/{repo}/actions/runs": + category: projects + subcategory: collaborators + "/projects/{project_id}/columns": get: - summary: List workflow runs for a repository - description: |- - 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. + summary: List project columns + description: '' tags: - - actions - operationId: actions/list-workflow-runs-for-repo + - projects + operationId: projects/list-columns externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-workflow-runs-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-project-columns parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/actor" - - "$ref": "#/components/parameters/workflow-run-branch" - - "$ref": "#/components/parameters/event" - - "$ref": "#/components/parameters/workflow-run-status" + - "$ref": "#/components/parameters/project-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/created" - - "$ref": "#/components/parameters/exclude-pull-requests" - - "$ref": "#/components/parameters/workflow-run-check-suite-id" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - workflow_runs - properties: - total_count: - type: integer - workflow_runs: - type: array - items: - "$ref": "#/components/schemas/workflow-run" + type: array + items: + "$ref": "#/components/schemas/project-column" examples: default: - "$ref": "#/components/examples/workflow-run-paginated" + "$ref": "#/components/examples/project-column-items" headers: Link: "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}": - get: - summary: Get a workflow run - description: 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. + category: projects + subcategory: columns + post: + summary: Create a project column + description: '' tags: - - actions - operationId: actions/get-workflow-run + - projects + operationId: projects/create-column externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#create-a-project-column parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - - "$ref": "#/components/parameters/exclude-pull-requests" + - "$ref": "#/components/parameters/project-id" + requestBody: + required: true + content: + application/json: + schema: + properties: + name: + description: Name of the project column + example: Remaining tasks + type: string + required: + - name + type: object + examples: + default: + value: + name: Remaining tasks responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/workflow-run" + "$ref": "#/components/schemas/project-column" examples: default: - "$ref": "#/components/examples/workflow-run" + value: + url: https://api.github.com/projects/columns/367 + project_url: https://api.github.com/projects/120 + cards_url: https://api.github.com/projects/columns/367/cards + id: 367 + node_id: MDEzOlByb2plY3RDb2x1bW4zNjc= + name: To Do + created_at: '2016-09-05T14:18:44Z' + updated_at: '2016-09-05T14:22:28Z' + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed_simple" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-runs - delete: - summary: Delete a workflow run + category: projects + subcategory: columns + "/rate_limit": + get: + summary: Get rate limit status for the authenticated user description: |- - 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. - operationId: actions/delete-workflow-run + **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. tags: - - actions + - rate-limit + operationId: rate-limit/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-a-workflow-run - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/rate-limit#get-rate-limit-status-for-the-authenticated-user + parameters: [] responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/rate-limit-overview" + examples: + default: + "$ref": "#/components/examples/rate-limit-overview" + headers: + X-RateLimit-Limit: + "$ref": "#/components/headers/x-rate-limit-limit" + X-RateLimit-Remaining: + "$ref": "#/components/headers/x-rate-limit-remaining" + X-RateLimit-Reset: + "$ref": "#/components/headers/x-rate-limit-reset" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": + category: rate-limit + subcategory: + "/repos/{owner}/{repo}": get: - summary: Get the review history for a workflow run - description: 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. + summary: Get a repository + description: 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. tags: - - actions - operationId: actions/get-reviews-for-run + - repos + operationId: repos/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-the-review-history-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/environment-approvals" + "$ref": "#/components/schemas/full-repository" + examples: + default-response: + "$ref": "#/components/examples/full-repository-default-response" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + '301': + "$ref": "#/components/responses/moved_permanently" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: + patch: + summary: Update a repository + description: "**Note**: To edit a repository's topics, use the [Replace all + repository topics](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics) + endpoint." + tags: + - repos + operationId: repos/update + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#update-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the repository. + description: + type: string + description: A short description of the repository. + homepage: + type: string + description: A URL with more information about the repository. + private: + type: boolean + description: "Either `true` to make the repository private or `false` + to make it public. Default: `false`. \n**Note**: You will get + a `422` error if the organization restricts [changing repository + visibility](https://docs.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories) + to organization owners and a non-owner tries to change the value + of private." + default: false + visibility: + type: string + description: Can be `public` or `private`. If your organization + is associated with an enterprise account using GitHub Enterprise + Cloud or GitHub Enterprise Server 2.20+, `visibility` can also + be `internal`." + enum: + - public + - private + - internal + security_and_analysis: + type: object + description: |- + Specify which security and analysis features to enable or disable for the repository. + + To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-server@3.6/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)." + + For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: + `{ "security_and_analysis": {"advanced_security": { "status": "enabled" } } }`. + + You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request. + nullable: true + properties: + advanced_security: + type: object + description: Use the `status` property to enable or disable + GitHub Advanced Security for this repository. For more information, + see "[About GitHub Advanced Security](/github/getting-started-with-github/learning-about-github/about-github-advanced-security)." + properties: + status: + type: string + description: Can be `enabled` or `disabled`. + secret_scanning: + type: object + description: Use the `status` property to enable or disable + secret scanning for this repository. For more information, + see "[About secret scanning](/code-security/secret-security/about-secret-scanning)." + properties: + status: + type: string + description: Can be `enabled` or `disabled`. + secret_scanning_push_protection: + type: object + description: Use the `status` property to enable or disable + secret scanning push protection for this repository. For more + information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." + properties: + status: + type: string + description: Can be `enabled` or `disabled`. + has_issues: + type: boolean + description: Either `true` to enable issues for this repository + or `false` to disable them. + default: true + has_projects: + type: boolean + description: Either `true` to enable projects for this repository + or `false` to disable them. **Note:** If you're creating a repository + in an organization that has disabled repository projects, the + default is `false`, and if you pass `true`, the API returns an + error. + default: true + has_wiki: + type: boolean + description: Either `true` to enable the wiki for this repository + or `false` to disable it. + default: true + is_template: + type: boolean + description: Either `true` to make this repo available as a template + repository or `false` to prevent it. + default: false + default_branch: + type: string + description: Updates the default branch for this repository. + allow_squash_merge: + type: boolean + description: Either `true` to allow squash-merging pull requests, + or `false` to prevent squash-merging. + default: true + allow_merge_commit: + type: boolean + description: Either `true` to allow merging pull requests with a + merge commit, or `false` to prevent merging pull requests with + merge commits. + default: true + allow_rebase_merge: + type: boolean + description: Either `true` to allow rebase-merging pull requests, + or `false` to prevent rebase-merging. + default: true + allow_auto_merge: + type: boolean + description: Either `true` to allow auto-merge on pull requests, + or `false` to disallow auto-merge. + default: false + delete_branch_on_merge: + type: boolean + description: Either `true` to allow automatically deleting head + branches when pull requests are merged, or `false` to prevent + automatic deletion. + default: false + allow_update_branch: + type: boolean + description: Either `true` to always allow a pull request head branch + that is behind its base branch to be updated even if it is not + required to be up to date before merging, or false otherwise. + default: false + use_squash_pr_title_as_default: + type: boolean + description: Either `true` to allow squash-merge commits to use + pull request title, or `false` to use commit message. **This property + has been deprecated. Please use `squash_merge_commit_title` instead. + default: false + deprecated: true + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. + archived: + type: boolean + description: "`true` to archive this repository. **Note**: You cannot + unarchive repositories through the API." + default: false + allow_forking: + type: boolean + description: Either `true` to allow private forks, or `false` to + prevent private forks. + default: false + web_commit_signoff_required: + type: boolean + description: Either `true` to require contributors to sign off on + web-based commits, or `false` to not require contributors to sign + off on web-based commits. + default: false + examples: + default: + value: + name: Hello-World + description: This is your first repository + homepage: https://github.com + private: true + has_issues: true + has_projects: true + has_wiki: true + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/full-repository" examples: default: - "$ref": "#/components/examples/environment-approvals-items" + "$ref": "#/components/examples/full-repository" + '307': + "$ref": "#/components/responses/temporary_redirect" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/approve": - post: - summary: Approve a workflow run for a fork pull request + category: repos + subcategory: + delete: + summary: Delete a repository description: |- - Approves a workflow run for a pull request from a public fork of a first time contributor. For more information, see ["Approving workflow runs from public forks](https://docs.github.com/actions/managing-workflow-runs/approving-workflow-runs-from-public-forks)." + Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required. - 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. + If an organization owner has configured the organization to prevent members from deleting organization-owned + repositories, you will get a `403 Forbidden` response. tags: - - actions - operationId: actions/approve-workflow-run + - repos + operationId: repos/delete externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#approve-a-workflow-run-for-a-fork-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: - '201': + '204': description: Response + '403': + description: 'If an organization owner has configured the organization to + prevent members from deleting organization-owned repositories, a member + will get this response:' content: application/json: schema: - "$ref": "#/components/schemas/empty-object" + type: object + properties: + message: + type: string + documentation_url: + type: string + examples: + default: + value: + message: Organization members cannot delete repositories. + documentation_url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-repository + '307': + "$ref": "#/components/responses/temporary_redirect" '404': "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": + category: repos + subcategory: + "/repos/{owner}/{repo}/actions/artifacts": get: - summary: List workflow run artifacts - description: Lists artifacts for a workflow run. Anyone with read access to + summary: List artifacts for a repository + description: 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. tags: - actions - operationId: actions/list-workflow-run-artifacts + operationId: actions/list-artifacts-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-workflow-run-artifacts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-artifacts-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -14350,707 +14281,593 @@ paths: enabledForGitHubApps: true category: actions subcategory: artifacts - "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}": get: - summary: Get a workflow run attempt - description: |- - Gets a specific workflow run attempt. Anyone with read access to the repository - can use this endpoint. If the repository is private you must use an access token - with the `repo` scope. GitHub Apps must have the `actions:read` permission to - use this endpoint. + summary: Get an artifact + description: 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. tags: - actions - operationId: actions/get-workflow-run-attempt + operationId: actions/get-artifact externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-workflow-run-attempt + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-artifact parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - - "$ref": "#/components/parameters/attempt-number" - - "$ref": "#/components/parameters/exclude-pull-requests" + - "$ref": "#/components/parameters/artifact-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/workflow-run" + "$ref": "#/components/schemas/artifact" examples: default: - "$ref": "#/components/examples/workflow-run" + "$ref": "#/components/examples/artifact" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": - get: - summary: List jobs for a workflow run attempt - description: Lists jobs for a specific workflow run attempt. Anyone with read - access to the repository can use this endpoint. If the repository is private - you must use an access token with the `repo` scope. GitHub Apps must have - the `actions:read` permission to use this endpoint. You can use parameters - to narrow the list of results. For more information about using parameters, - see [Parameters](https://docs.github.com/rest/overview/resources-in-the-rest-api#parameters). + subcategory: artifacts + delete: + summary: Delete an artifact + description: 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. tags: - actions - operationId: actions/list-jobs-for-workflow-run-attempt + operationId: actions/delete-artifact externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run-attempt + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-an-artifact parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - - "$ref": "#/components/parameters/attempt-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/artifact-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - jobs - properties: - total_count: - type: integer - jobs: - type: array - items: - "$ref": "#/components/schemas/job" - examples: - default: - "$ref": "#/components/examples/job-paginated" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-jobs - "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": + subcategory: artifacts + "/repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}": get: - summary: Download workflow run attempt logs + summary: Download an artifact description: |- - Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after - 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + 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. tags: - actions - operationId: actions/download-workflow-run-attempt-logs + operationId: actions/download-artifact externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#download-workflow-run-attempt-logs + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#download-an-artifact parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - - "$ref": "#/components/parameters/attempt-number" + - "$ref": "#/components/parameters/artifact-id" + - name: archive_format + in: path + required: true + schema: + type: string responses: '302': description: Response headers: Location: - example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D - schema: - type: string + "$ref": "#/components/headers/location" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": - post: - summary: Cancel a workflow run - description: 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. + subcategory: artifacts + "/repos/{owner}/{repo}/actions/cache/usage": + get: + summary: Get GitHub Actions cache usage for a repository + description: |- + Gets GitHub Actions cache usage for a repository. + The data fetched using this API is refreshed approximately every 5 minutes, so values returned from this endpoint may take at least 5 minutes to get updated. + 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. tags: - actions - operationId: actions/cancel-workflow-run + operationId: actions/get-actions-cache-usage externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#cancel-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-cache-usage-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: - '202': + '200': description: Response content: application/json: schema: - type: object - properties: {} - additionalProperties: false + "$ref": "#/components/schemas/actions-cache-usage-by-repository" + examples: + default: + "$ref": "#/components/examples/actions-cache-usage" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": + subcategory: cache + "/repos/{owner}/{repo}/actions/cache/usage-policy": get: - summary: List jobs for a workflow run - description: 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). + summary: Get GitHub Actions cache usage policy for a repository + description: |- + Gets GitHub Actions cache usage policy for a repository. + You must authenticate using an access token with the `repo` scope to use this endpoint. + GitHub Apps must have the `actions:read` permission to use this endpoint. tags: - actions - operationId: actions/list-jobs-for-workflow-run + operationId: actions/get-actions-cache-usage-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-jobs-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-cache-usage-policy-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" - - name: filter - description: "Filters jobs by their `completed_at` timestamp. Can be one of: - \ \n\\* `latest`: Returns jobs from the most recent execution of the workflow - run. \n\\* `all`: Returns all jobs for a workflow run, including from old - executions of the workflow run." - in: query - required: false - schema: - type: string - enum: - - latest - - all - default: latest - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - jobs - properties: - total_count: - type: integer - jobs: - type: array - items: - "$ref": "#/components/schemas/job" + "$ref": "#/components/schemas/actions-cache-usage-policy-for-repository" examples: default: - "$ref": "#/components/examples/job-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/actions-cache-usage-policy" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-jobs - "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": - get: - summary: Download workflow run logs + subcategory: cache + patch: + summary: Set GitHub Actions cache usage policy for a repository description: |- - 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. + Sets GitHub Actions cache usage policy for a repository. + 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. tags: - actions - operationId: actions/download-workflow-run-logs + operationId: actions/set-actions-cache-usage-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#download-workflow-run-logs + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-github-actions-cache-usage-policy-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: - '302': + '204': description: Response - headers: - Location: - example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D - schema: - type: string + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-cache-usage-policy-for-repository" + examples: + selected_actions: + "$ref": "#/components/examples/actions-cache-usage-policy" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - delete: - summary: Delete workflow run logs - description: 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. + subcategory: cache + "/repos/{owner}/{repo}/actions/jobs/{job_id}": + get: + summary: Get a job for a workflow run + description: 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. tags: - actions - operationId: actions/delete-workflow-run-logs + operationId: actions/get-job-for-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-workflow-run-logs + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-job-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/job-id" responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '500': - "$ref": "#/components/responses/internal_error" + content: + application/json: + schema: + "$ref": "#/components/schemas/job" + examples: + default: + "$ref": "#/components/examples/job" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": + subcategory: workflow-jobs + "/repos/{owner}/{repo}/actions/jobs/{job_id}/logs": get: - summary: Get pending deployments for a workflow run + summary: Download job logs for a workflow run description: |- - 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. + 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. tags: - actions - operationId: actions/get-pending-deployments-for-run + operationId: actions/download-job-logs-for-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-pending-deployments-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#download-job-logs-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/job-id" responses: - '200': + '302': description: Response - content: - application/json: + headers: + Location: + example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/jobs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D schema: - type: array - items: - "$ref": "#/components/schemas/pending-deployment" - examples: - default: - "$ref": "#/components/examples/pending-deployment-items" + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs + subcategory: workflow-jobs + "/repos/{owner}/{repo}/actions/jobs/{job_id}/rerun": post: - summary: Review pending deployments for a workflow run - description: |- - 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. + summary: Re-run a job from a workflow run + description: Re-run a job and its dependent jobs in 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. tags: - actions - operationId: actions/review-pending-deployments-for-run + operationId: actions/re-run-job-for-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#review-pending-deployments-for-a-workflow-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#re-run-job-for-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/job-id" requestBody: - required: true + required: false content: application/json: schema: type: object + nullable: true properties: - environment_ids: - type: array - description: The list of environment ids to approve or reject - example: - - 161171787 - - 161171795 - items: - type: integer - example: 161171787 - state: - type: string - description: 'Whether to approve or reject deployment to the specified - environments. Must be one of: `approved` or `rejected`' - enum: - - approved - - rejected - example: approved - comment: - type: string - description: A comment to accompany the deployment review - example: Ship it! - required: - - environment_ids - - state - - comment + enable_debug_logging: + type: boolean + default: false + description: Whether to enable debug logging for the re-run. + examples: + default: + value: responses: - '200': + '201': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/deployment" + "$ref": "#/components/schemas/empty-object" examples: default: - "$ref": "#/components/examples/deployment-items" + value: + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": - post: - summary: Re-run a workflow - description: 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. + "/repos/{owner}/{repo}/actions/permissions": + get: + summary: Get GitHub Actions permissions for a repository + description: |- + 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. + operationId: actions/get-github-actions-permissions-repository tags: - actions - operationId: actions/re-run-workflow externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#re-run-a-workflow + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-github-actions-permissions-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: - '201': + '200': description: Response content: application/json: schema: - type: object - properties: {} - additionalProperties: false + "$ref": "#/components/schemas/actions-repository-permissions" + examples: + default: + "$ref": "#/components/examples/actions-repository-permissions" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - deprecationDate: '2021-09-14' category: actions - subcategory: workflow-runs - deprecated: true - "/repos/{owner}/{repo}/actions/runs/{run_id}/timing": - get: - summary: Get workflow run usage + subcategory: permissions + put: + summary: Set GitHub Actions permissions for a repository description: |- - Gets the number of billable minutes and total run time for a specific workflow run. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + Sets the GitHub Actions permissions policy for enabling GitHub Actions and allowed actions in the 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. + 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. + operationId: actions/set-github-actions-permissions-repository tags: - actions - operationId: actions/get-workflow-run-usage externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-workflow-run-usage + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-github-actions-permissions-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/run-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/workflow-run-usage" - examples: - default: - "$ref": "#/components/examples/workflow-run-usage" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + enabled: + "$ref": "#/components/schemas/actions-enabled" + allowed_actions: + "$ref": "#/components/schemas/allowed-actions" + required: + - enabled + examples: + default: + value: + enabled: true + allowed_actions: selected x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/secrets": + subcategory: permissions + "/repos/{owner}/{repo}/actions/permissions/access": get: - summary: List repository secrets - description: 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. + summary: Get the level of access for workflows outside of the repository + description: |- + Gets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + repository `administration` permission to use this endpoint. tags: - actions - operationId: actions/list-repo-secrets + operationId: actions/get-workflow-access-to-repository externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-repository-secrets + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-workflow-access-level-to-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/actions-secret" + "$ref": "#/components/schemas/actions-workflow-access-to-repository" examples: default: - "$ref": "#/components/examples/actions-secret-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/actions-workflow-access-to-repository" x-github: githubCloudOnly: false enabledForGitHubApps: true + previews: [] category: actions - subcategory: secrets - "/repos/{owner}/{repo}/actions/secrets/public-key": - get: - summary: Get a repository public key - description: 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. + subcategory: permissions + put: + summary: Set the level of access for workflows outside of the repository + description: |- + Sets the level of access that workflows outside of the repository have to actions and reusable workflows in the repository. + This endpoint only applies to internal repositories. For more information, see "[Managing GitHub Actions settings for a repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#allowing-access-to-components-in-an-internal-repository)." + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the + repository `administration` permission to use this endpoint. tags: - actions - operationId: actions/get-repo-public-key + operationId: actions/set-workflow-access-to-repository externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-repository-public-key + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-workflow-access-to-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-workflow-access-to-repository" + examples: + default: + "$ref": "#/components/examples/actions-workflow-access-to-repository" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/actions-public-key" - examples: - default: - "$ref": "#/components/examples/actions-public-key" x-github: githubCloudOnly: false enabledForGitHubApps: true + previews: [] category: actions - subcategory: secrets - "/repos/{owner}/{repo}/actions/secrets/{secret_name}": + subcategory: permissions + "/repos/{owner}/{repo}/actions/permissions/selected-actions": get: - summary: Get a repository secret - description: 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. + summary: Get allowed actions for a repository + description: |- + 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. + operationId: actions/get-allowed-actions-repository tags: - actions - operationId: actions/get-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-allowed-actions-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-secret" + "$ref": "#/components/schemas/selected-actions" examples: default: - "$ref": "#/components/examples/actions-secret" + "$ref": "#/components/examples/selected-actions" x-github: - githubCloudOnly: false enabledForGitHubApps: true + githubCloudOnly: false category: actions - subcategory: secrets + subcategory: permissions put: - summary: Create or update a repository secret + summary: Set allowed actions for a repository description: |- - Creates or updates a repository secret with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` - - #### Example encrypting a secret using C# - - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - - ``` - var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - - var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - - Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - ``` - - #### Example encrypting a secret using Ruby - - Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - - ```ruby - require "rbnacl" - require "base64" + 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)." - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) + 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. - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") + 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. - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + 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. + operationId: actions/set-allowed-actions-repository tags: - actions - operationId: actions/create-or-update-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-or-update-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-allowed-actions-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" + responses: + '204': + description: Response requestBody: - required: true + required: false content: application/json: schema: - type: object - properties: - encrypted_value: - type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get a repository public - key](https://docs.github.com/rest/reference/actions#get-a-repository-public-key) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: - type: string - description: ID of the key you used to encrypt the secret. - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' + "$ref": "#/components/schemas/selected-actions" + examples: + selected_actions: + "$ref": "#/components/examples/selected-actions" + x-github: + enabledForGitHubApps: true + githubCloudOnly: false + category: actions + subcategory: permissions + "/repos/{owner}/{repo}/actions/permissions/workflow": + get: + summary: Get default workflow permissions for a repository + description: |- + Gets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, + as well as if GitHub Actions can submit approving pull request reviews. + For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. + tags: + - actions + operationId: actions/get-github-actions-default-workflow-permissions-repository + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-default-workflow-permissions-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: - '201': - description: Response when creating a secret + '200': + description: Response content: application/json: schema: - type: object - properties: {} - additionalProperties: false - '204': - description: Response when updating a secret + "$ref": "#/components/schemas/actions-get-default-workflow-permissions" + examples: + default: + "$ref": "#/components/examples/actions-default-workflow-permissions" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: secrets - delete: - summary: Delete a repository secret - description: 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. + subcategory: permissions + put: + summary: Set default workflow permissions for a repository + description: |- + Sets the default workflow permissions granted to the `GITHUB_TOKEN` when running workflows in a repository, and sets if GitHub Actions + can submit approving pull request reviews. + For more information, see "[Setting the permissions of the GITHUB_TOKEN for your repository](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the repository `administration` permission to use this API. tags: - actions - operationId: actions/delete-repo-secret + operationId: actions/set-github-actions-default-workflow-permissions-repository externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-default-workflow-permissions-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" responses: '204': - description: Response + description: Success response + '409': + description: Conflict response when changing a setting is prevented by the + owning organization or enterprise + requestBody: + required: true + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-set-default-workflow-permissions" + examples: + default: + "$ref": "#/components/examples/actions-default-workflow-permissions" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: secrets - "/repos/{owner}/{repo}/actions/workflows": + subcategory: permissions + "/repos/{owner}/{repo}/actions/runners": get: - summary: List repository workflows - description: 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. + summary: List self-hosted runners for a repository + description: Lists all self-hosted runners configured in a repository. You must + authenticate using an access token with the `repo` scope to use this endpoint. tags: - actions - operationId: actions/list-repo-workflows + operationId: actions/list-self-hosted-runners-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-repository-workflows + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-self-hosted-runners-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -15065,17 +14882,17 @@ paths: type: object required: - total_count - - workflows + - runners properties: total_count: type: integer - workflows: + runners: type: array items: - "$ref": "#/components/schemas/workflow" + "$ref": "#/components/schemas/runner" examples: default: - "$ref": "#/components/examples/workflow-paginated" + "$ref": "#/components/examples/runner-paginated" headers: Link: "$ref": "#/components/headers/link" @@ -15083,136 +14900,156 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/downloads": get: - summary: Get a workflow - description: 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. + summary: List runner applications for a repository + description: |- + 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. tags: - actions - operationId: actions/get-workflow + operationId: actions/list-runner-applications-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-a-workflow + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-runner-applications-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/workflow" + type: array + items: + "$ref": "#/components/schemas/runner-application" examples: default: - "$ref": "#/components/examples/workflow" + "$ref": "#/components/examples/runner-application-items-airgap" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": - put: - summary: Disable a workflow - description: |- - 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. + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/registration-token": + post: + summary: Create a registration token for a repository + description: "Returns a token that you can pass to the `config` script. The + token expires after one hour. You must authenticate\nusing an access token + with the `repo` scope to use this endpoint.\n\n#### Example using registration + token\n \nConfigure your self-hosted runner, replacing `TOKEN` with the registration + token provided by this endpoint.\n\n```\n./config.sh --url https://github.com/octo-org/octo-repo-artifacts + --token TOKEN\n```" tags: - actions - operationId: actions/disable-workflow + operationId: actions/create-registration-token-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#disable-a-workflow + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-registration-token-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" responses: - '204': + '201': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authentication-token" + examples: + default: + "$ref": "#/components/examples/authentication-token" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/remove-token": post: - summary: Create a workflow dispatch event + summary: Create a remove token for a repository + description: "Returns a token that you can pass to remove a self-hosted runner + from a repository. The token expires after one hour.\nYou must authenticate + using an access token with the `repo` scope to use this endpoint.\n\n#### + Example using remove token\n \nTo remove your self-hosted runner from a repository, + replace TOKEN with the remove token provided by this endpoint.\n\n```\n./config.sh + remove --token TOKEN\n```" + tags: + - actions + operationId: actions/create-remove-token-for-repo + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-remove-token-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/authentication-token" + examples: + default: + "$ref": "#/components/examples/authentication-token-2" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/{runner_id}": + get: + summary: Get a self-hosted runner for a repository description: |- - 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)." + 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. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." - operationId: actions/create-workflow-dispatch + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - actions + operationId: actions/get-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-a-workflow-dispatch-event + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" + - "$ref": "#/components/parameters/runner-id" responses: - '204': + '200': description: Response - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - ref: - type: string - description: The git reference for the workflow. The reference can - be a branch or tag name. - inputs: - type: object - description: Input keys and values configured in the workflow file. - The maximum number of properties is 10. Any default properties - configured in the workflow file will be used when `inputs` are - omitted. - additionalProperties: - type: string - maxProperties: 10 - required: - - ref - example: - ref: topic-branch - inputs: - name: Mona the Octocat - home: San Francisco, CA + content: + application/json: + schema: + "$ref": "#/components/schemas/runner" + examples: + default: + "$ref": "#/components/examples/runner" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": - put: - summary: Enable a workflow + subcategory: self-hosted-runners + delete: + summary: Delete a self-hosted runner from a repository description: |- - 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`. + 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. GitHub Apps must have the `actions:write` permission to use this endpoint. + You must authenticate using an access token with the `repo` + scope to use this endpoint. tags: - actions - operationId: actions/enable-workflow + operationId: actions/delete-self-hosted-runner-from-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#enable-a-workflow + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-self-hosted-runner-from-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" + - "$ref": "#/components/parameters/runner-id" responses: '204': description: Response @@ -15220,383 +15057,362 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels": get: - summary: List workflow runs + summary: List labels for a self-hosted runner for a repository description: |- - 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). + Lists all labels for a self-hosted runner configured 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. + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - actions - operationId: actions/list-workflow-runs + operationId: actions/list-labels-for-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-workflow-runs + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-labels-for-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" - - "$ref": "#/components/parameters/actor" - - "$ref": "#/components/parameters/workflow-run-branch" - - "$ref": "#/components/parameters/event" - - "$ref": "#/components/parameters/workflow-run-status" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/created" - - "$ref": "#/components/parameters/exclude-pull-requests" - - "$ref": "#/components/parameters/workflow-run-check-suite-id" + - "$ref": "#/components/parameters/runner-id" responses: '200': - description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - workflow_runs - properties: - total_count: - type: integer - workflow_runs: - type: array - items: - "$ref": "#/components/schemas/workflow-run" - examples: - default: - "$ref": "#/components/examples/workflow-run-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: actions - subcategory: workflow-runs - "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing": - get: - summary: Get workflow usage + subcategory: self-hosted-runners + post: + summary: Add custom labels to a self-hosted runner for a repository description: |- - Gets the number of billable minutes used by a specific workflow during the current billing cycle. Billable minutes only apply to workflows in private repositories that use GitHub-hosted runners. Usage is listed for each GitHub-hosted runner operating system in milliseconds. Any job re-runs are also included in the usage. The usage does not include the multiplier for macOS and Windows runners and is not rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". + Add custom labels to a self-hosted runner configured in a repository. - 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. + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - actions - operationId: actions/get-workflow-usage + operationId: actions/add-custom-labels-to-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-workflow-usage + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#add-custom-labels-to-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/workflow-id" + - "$ref": "#/components/parameters/runner-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + minItems: 1 + maxItems: 100 + description: The names of the custom labels to add to the runner. + items: + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/workflow-usage" - examples: - default: - "$ref": "#/components/examples/workflow-usage" + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false - enabledForGitHubApps: false + enabledForGitHubApps: true category: actions - subcategory: workflows - "/repos/{owner}/{repo}/assignees": - get: - summary: List assignees - description: Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) - for issues in a repository. + subcategory: self-hosted-runners + put: + summary: Set custom labels for a self-hosted runner for a repository + description: |- + Remove all previous custom labels and set the new custom labels for a specific + self-hosted runner configured in a repository. + + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - - issues - operationId: issues/list-assignees + - actions + operationId: actions/set-custom-labels-for-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-assignees + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#set-custom-labels-for-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/runner-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - labels + properties: + labels: + type: array + minItems: 0 + maxItems: 100 + description: The names of the custom labels to set for the runner. + You can pass an empty array to remove all custom labels. + items: + type: string + examples: + default: + value: + labels: + - gpu + - accelerated responses: '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" - examples: - default: - "$ref": "#/components/examples/simple-user-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/responses/actions_runner_labels" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: assignees - "/repos/{owner}/{repo}/assignees/{assignee}": - get: - summary: Check if a user can be assigned + category: actions + subcategory: self-hosted-runners + delete: + summary: Remove all custom labels from a self-hosted runner for a repository description: |- - 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. + Remove all custom labels from a self-hosted runner configured in a + repository. Returns the remaining read-only labels from the runner. - Otherwise a `404` status code is returned. + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - - issues - operationId: issues/check-user-can-be-assigned + - actions + operationId: actions/remove-all-custom-labels-from-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#check-if-a-user-can-be-assigned + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-all-custom-labels-from-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: assignee - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/runner-id" responses: - '204': - description: If the `assignee` can be assigned to issues in the repository, - a `204` header with no content is returned. + '200': + "$ref": "#/components/responses/actions_runner_labels_readonly" '404': - description: Otherwise a `404` status code is returned. - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: assignees - "/repos/{owner}/{repo}/autolinks": - get: - summary: List all autolinks of a repository + category: actions + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}": + delete: + summary: Remove a custom label from a self-hosted runner for a repository description: |- - This returns a list of autolinks configured for the given repository. + Remove a custom label from a self-hosted runner configured + in a repository. Returns the remaining labels from the runner. - Information about autolinks are only available to repository administrators. + This endpoint returns a `404 Not Found` status if the custom label is not + present on the runner. + + You must authenticate using an access token with the `repo` scope to use this + endpoint. tags: - - repos - operationId: repos/list-autolinks + - actions + operationId: actions/remove-custom-label-from-self-hosted-runner-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/v3/repos#list-autolinks + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#remove-a-custom-label-from-a-self-hosted-runner-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/runner-id" + - "$ref": "#/components/parameters/runner-label-name" responses: '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/autolink" - examples: - default: - "$ref": "#/components/examples/autolink-items" + "$ref": "#/components/responses/actions_runner_labels" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: autolinks - post: - summary: Create an autolink reference for a repository - description: Users with admin access to the repository can create an autolink. + category: actions + subcategory: self-hosted-runners + "/repos/{owner}/{repo}/actions/runs": + get: + summary: List workflow runs for a repository + description: |- + 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/enterprise-server@3.6/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. tags: - - repos - operationId: repos/create-autolink + - actions + operationId: actions/list-workflow-runs-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/v3/repos#create-an-autolink + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-workflow-runs-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - key_prefix: - type: string - description: The prefix appended by a number will generate a link - any time it is found in an issue, pull request, or commit. - url_template: - type: string - description: The URL must contain for the reference number. - required: - - key_prefix - - url_template - example: - key_prefix: TICKET- - url_template: https://example.com/TICKET?query= + - "$ref": "#/components/parameters/actor" + - "$ref": "#/components/parameters/workflow-run-branch" + - "$ref": "#/components/parameters/event" + - "$ref": "#/components/parameters/workflow-run-status" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/created" + - "$ref": "#/components/parameters/exclude-pull-requests" + - "$ref": "#/components/parameters/workflow-run-check-suite-id" responses: - '201': - description: response + '200': + description: Response content: application/json: schema: - "$ref": "#/components/schemas/autolink" + type: object + required: + - total_count + - workflow_runs + properties: + total_count: + type: integer + workflow_runs: + type: array + items: + "$ref": "#/components/schemas/workflow-run" examples: default: - "$ref": "#/components/examples/autolink" + "$ref": "#/components/examples/workflow-run-paginated" headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/autolinks/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: autolinks - "/repos/{owner}/{repo}/autolinks/{autolink_id}": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}": get: - summary: Get an autolink reference of a repository - description: |- - This returns a single autolink reference by ID that was configured for the given repository. - - Information about autolinks are only available to repository administrators. + summary: Get a workflow run + description: 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. tags: - - repos - operationId: repos/get-autolink + - actions + operationId: actions/get-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/v3/repos#get-autolink + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/autolink-id" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/exclude-pull-requests" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/autolink" + "$ref": "#/components/schemas/workflow-run" examples: default: - "$ref": "#/components/examples/autolink" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/workflow-run" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: autolinks + category: actions + subcategory: workflow-runs delete: - summary: Delete an autolink reference from a repository + summary: Delete a workflow run description: |- - This deletes a single autolink reference by ID that was configured for the given repository. - - Information about autolinks are only available to repository administrators. - tags: - - repos - operationId: repos/delete-autolink - externalDocs: - description: API method documentation - url: https://docs.github.com/v3/repos#delete-autolink - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/autolink-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: autolinks - "/repos/{owner}/{repo}/automated-security-fixes": - put: - summary: Enable automated security fixes - description: Enables automated security fixes for a repository. The authenticated - user must have admin access to the repository. For more information, see "[Configuring - automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". + 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. + operationId: actions/delete-workflow-run tags: - - repos - operationId: repos/enable-automated-security-fixes + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#enable-automated-security-fixes + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - delete: - summary: Disable automated security fixes - description: Disables automated security fixes for a repository. The authenticated - user must have admin access to the repository. For more information, see "[Configuring - automated security fixes](https://docs.github.com/en/articles/configuring-automated-security-fixes)". + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/approvals": + get: + summary: Get the review history for a workflow run + description: 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. tags: - - repos - operationId: repos/disable-automated-security-fixes + - actions + operationId: actions/get-reviews-for-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#disable-automated-security-fixes + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-the-review-history-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/run-id" responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/environment-approvals" + examples: + default: + "$ref": "#/components/examples/environment-approvals-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/branches": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/artifacts": get: - summary: List branches - description: '' + summary: List workflow run artifacts + description: 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. tags: - - repos - operationId: repos/list-branches + - actions + operationId: actions/list-workflow-run-artifacts externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-branches + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-workflow-run-artifacts parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: protected - description: Setting to `true` returns only protected branches. When set to - `false`, only unprotected branches are returned. Omitting this parameter - returns all branches. - in: query - required: false - schema: - type: boolean + - "$ref": "#/components/parameters/run-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -15605,1139 +15421,1088 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/short-branch" + type: object + required: + - total_count + - artifacts + properties: + total_count: + type: integer + artifacts: + type: array + items: + "$ref": "#/components/schemas/artifact" examples: default: - "$ref": "#/components/examples/short-branch-with-protection-items" + "$ref": "#/components/examples/artifact-paginated" headers: Link: "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}": + category: actions + subcategory: artifacts + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}": get: - summary: Get a branch - description: '' + summary: Get a workflow run attempt + description: |- + Gets a specific workflow run attempt. Anyone with read access to the repository + can use this endpoint. If the repository is private you must use an access token + with the `repo` scope. GitHub Apps must have the `actions:read` permission to + use this endpoint. tags: - - repos - operationId: repos/get-branch + - actions + operationId: actions/get-workflow-run-attempt externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-workflow-run-attempt parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/attempt-number" + - "$ref": "#/components/parameters/exclude-pull-requests" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/branch-with-protection" - '301': - "$ref": "#/components/responses/moved_permanently" - '415': - "$ref": "#/components/responses/preview_header_missing" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/schemas/workflow-run" + examples: + default: + "$ref": "#/components/examples/workflow-run" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs": get: - summary: Get branch protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: List jobs for a workflow run attempt + description: Lists jobs for a specific workflow run attempt. Anyone with read + access to the repository can use this endpoint. If the repository is private + you must use an access token with the `repo` scope. GitHub Apps must have + the `actions:read` permission to use this endpoint. You can use parameters + to narrow the list of results. For more information about using parameters, + see [Parameters](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). tags: - - repos - operationId: repos/get-branch-protection + - actions + operationId: actions/list-jobs-for-workflow-run-attempt externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-jobs-for-a-workflow-run-attempt parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/attempt-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/branch-protection" + type: object + required: + - total_count + - jobs + properties: + total_count: + type: integer + jobs: + type: array + items: + "$ref": "#/components/schemas/job" examples: default: - "$ref": "#/components/examples/branch-protection" + "$ref": "#/components/examples/job-paginated" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - put: - summary: Update branch protection + category: actions + subcategory: workflow-jobs + "/repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs": + get: + summary: Download workflow run attempt logs description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Protecting a branch requires admin or owner permissions to the repository. - - **Note**: Passing new arrays of `users` and `teams` replaces their previous values. - - **Note**: The list of users, apps, and teams in total is limited to 100 items. + Gets a redirect URL to download an archive of log files for a specific workflow run attempt. This link expires after + 1 minute. Look for `Location:` in the response header to find the URL for the download. Anyone with read access to + the repository can use this endpoint. If the repository is private you must use an access token with the `repo` scope. + GitHub Apps must have the `actions:read` permission to use this endpoint. tags: - - repos - operationId: repos/update-branch-protection + - actions + operationId: actions/download-workflow-run-attempt-logs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#download-workflow-run-attempt-logs parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - required_status_checks: - type: object - description: Require status checks to pass before merging. Set to - `null` to disable. - nullable: true - properties: - strict: - type: boolean - description: Require branches to be up to date before merging. - contexts: - type: array - deprecated: true - description: "**Deprecated**: The list of status checks to require - in order to merge into this branch. If any of these checks - have recently been set by a particular GitHub App, they will - be required to come from that app in future for the branch - to merge. Use `checks` instead of `contexts` for more fine-grained - control.\n" - items: - type: string - checks: - type: array - description: The list of status checks to require in order to - merge into this branch. - items: - type: object - required: - - context - properties: - context: - type: string - description: The name of the required check - app_id: - type: integer - description: The ID of the GitHub App that must provide - this check. Omit this field to automatically select - the GitHub App that has recently provided this check, - or any app if it was not set by a GitHub App. Pass -1 - to explicitly allow any app to set the status. - required: - - strict - - contexts - enforce_admins: - type: boolean - description: Enforce all configured restrictions for administrators. - Set to `true` to enforce required status checks for repository - administrators. Set to `null` to disable. - nullable: true - required_pull_request_reviews: - type: object - description: Require at least one approving review on a pull request, - before merging. Set to `null` to disable. - nullable: true - properties: - dismissal_restrictions: - type: object - description: Specify which users and teams can dismiss pull - request reviews. Pass an empty `dismissal_restrictions` object - to disable. User and team `dismissal_restrictions` are only - available for organization-owned repositories. Omit this parameter - for personal repositories. - properties: - users: - type: array - description: The list of user `login`s with dismissal access - items: - type: string - teams: - type: array - description: The list of team `slug`s with dismissal access - items: - type: string - dismiss_stale_reviews: - type: boolean - description: Set to `true` if you want to automatically dismiss - approving reviews when someone pushes a new commit. - require_code_owner_reviews: - type: boolean - description: Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) - review them. - required_approving_review_count: - type: integer - description: Specify the number of reviewers required to approve - pull requests. Use a number between 1 and 6 or 0 to not require - reviewers. - bypass_pull_request_allowances: - type: object - description: Allow specific users or teams to bypass pull request - requirements. Set to `null` to disable. - nullable: true - properties: - users: - type: array - description: The list of user `login`s allowed to bypass - pull request requirements. - items: - type: string - teams: - type: array - description: The list of team `slug`s allowed to bypass - pull request requirements. - items: - type: string - restrictions: - type: object - description: Restrict who can push to the protected branch. User, - app, and team `restrictions` are only available for organization-owned - repositories. Set to `null` to disable. - nullable: true - properties: - users: - type: array - description: The list of user `login`s with push access - items: - type: string - teams: - type: array - description: The list of team `slug`s with push access - items: - type: string - apps: - type: array - description: The list of app `slug`s with push access - items: - type: string - required: - - users - - teams - required_linear_history: - type: boolean - description: 'Enforces a linear commit Git history, which prevents - anyone from pushing merge commits to a branch. Set to `true` to - enforce a linear commit history. Set to `false` to disable a linear - commit Git history. Your repository must allow squash merging - or rebase merging before you can enable a linear commit history. - Default: `false`. For more information, see "[Requiring a linear - commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" - in the GitHub Help documentation.' - allow_force_pushes: - type: boolean - description: 'Permits force pushes to the protected branch by anyone - with write access to the repository. Set to `true` to allow force - pushes. Set to `false` or `null` to block force pushes. Default: - `false`. For more information, see "[Enabling force pushes to - a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" - in the GitHub Help documentation."' - nullable: true - allow_deletions: - type: boolean - description: 'Allows deletion of the protected branch by anyone - with write access to the repository. Set to `false` to prevent - deletion of the protected branch. Default: `false`. For more information, - see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" - in the GitHub Help documentation.' - required_conversation_resolution: - type: boolean - description: 'Requires all conversations on code to be resolved - before a pull request can be merged into a branch that matches - this rule. Set to `false` to disable. Default: `false`.' - required: - - required_status_checks - - enforce_admins - - required_pull_request_reviews - - restrictions - example: - required_status_checks: - strict: true - contexts: - - continuous-integration/travis-ci - enforce_admins: true - required_pull_request_reviews: - dismissal_restrictions: - users: - - octocat - teams: - - justice-league - dismiss_stale_reviews: true - require_code_owner_reviews: true - required_approving_review_count: 2 - bypass_pull_request_allowances: - users: - - octocat - teams: - - justice-league - restrictions: - users: - - octocat - teams: - - justice-league - apps: - - super-ci - required_linear_history: true - allow_force_pushes: true - allow_deletions: true - required_conversation_resolution: true + - "$ref": "#/components/parameters/run-id" + - "$ref": "#/components/parameters/attempt-number" responses: - '200': + '302': description: Response - content: - application/json: + headers: + Location: + example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D schema: - "$ref": "#/components/schemas/protected-branch" - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '404': - "$ref": "#/components/responses/not_found" + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - delete: - summary: Delete branch protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/cancel": + post: + summary: Cancel a workflow run + description: 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. tags: - - repos - operationId: repos/delete-branch-protection + - actions + operationId: actions/cancel-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#cancel-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" responses: - '204': + '202': description: Response - '403': - "$ref": "#/components/responses/forbidden" + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/jobs": get: - summary: Get admin branch protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: List jobs for a workflow run + description: 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#parameters). tags: - - repos - operationId: repos/get-admin-branch-protection + - actions + operationId: actions/list-jobs-for-workflow-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-admin-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-jobs-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" + - name: filter + description: Filters jobs by their `completed_at` timestamp. `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. + in: query + required: false + schema: + type: string + enum: + - latest + - all + default: latest + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/protected-branch-admin-enforced" + type: object + required: + - total_count + - jobs + properties: + total_count: + type: integer + jobs: + type: array + items: + "$ref": "#/components/schemas/job" examples: default: - "$ref": "#/components/examples/protected-branch-admin-enforced-2" + "$ref": "#/components/examples/job-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - post: - summary: Set admin branch protection + category: actions + subcategory: workflow-jobs + "/repos/{owner}/{repo}/actions/runs/{run_id}/logs": + get: + summary: Download workflow run logs description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + 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. tags: - - repos - operationId: repos/set-admin-branch-protection + - actions + operationId: actions/download-workflow-run-logs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#set-admin-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#download-workflow-run-logs parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" responses: - '200': + '302': description: Response - content: - application/json: + headers: + Location: + example: https://pipelines.actions.githubusercontent.com/ab1f3cCFPB34Nd6imvFxpGZH5hNlDp2wijMwl2gDoO0bcrrlJj/_apis/pipelines/1/runs/19/signedlogcontent?urlExpires=2020-01-22T22%3A44%3A54.1389777Z&urlSigningMethod=HMACV1&urlSignature=2TUDfIg4fm36OJmfPy6km5QD5DLCOkBVzvhWZM8B%2BUY%3D schema: - "$ref": "#/components/schemas/protected-branch-admin-enforced" - examples: - default: - "$ref": "#/components/examples/protected-branch-admin-enforced-2" + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches + category: actions + subcategory: workflow-runs delete: - summary: Delete admin branch protection - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + summary: Delete workflow run logs + description: 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. tags: - - repos - operationId: repos/delete-admin-branch-protection + - actions + operationId: actions/delete-workflow-run-logs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-admin-branch-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-workflow-run-logs parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '500': + "$ref": "#/components/responses/internal_error" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments": get: - summary: Get pull request review protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: Get pending deployments for a workflow run + description: |- + 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. tags: - - repos - operationId: repos/get-pull-request-review-protection + - actions + operationId: actions/get-pending-deployments-for-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-pull-request-review-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-pending-deployments-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/protected-branch-pull-request-review" + type: array + items: + "$ref": "#/components/schemas/pending-deployment" examples: default: - "$ref": "#/components/examples/protected-branch-pull-request-review" + "$ref": "#/components/examples/pending-deployment-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - patch: - summary: Update pull request review protection + category: actions + subcategory: workflow-runs + post: + summary: Review pending deployments for a workflow run description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. + Approve or reject pending deployments that are waiting on approval by a required reviewer. - **Note**: Passing new arrays of `users` and `teams` replaces their previous values. + Required reviewers with read access to the repository contents and deployments can use this endpoint. Required reviewers must authenticate using an access token with the `repo` scope to use this endpoint. tags: - - repos - operationId: repos/update-pull-request-review-protection + - actions + operationId: actions/review-pending-deployments-for-run externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-pull-request-review-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#review-pending-deployments-for-a-workflow-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - dismissal_restrictions: - type: object - description: Specify which users and teams can dismiss pull request - reviews. Pass an empty `dismissal_restrictions` object to disable. - User and team `dismissal_restrictions` are only available for - organization-owned repositories. Omit this parameter for personal - repositories. - properties: - users: - type: array - description: The list of user `login`s with dismissal access - items: - type: string - teams: - type: array - description: The list of team `slug`s with dismissal access - items: - type: string - dismiss_stale_reviews: - type: boolean - description: Set to `true` if you want to automatically dismiss - approving reviews when someone pushes a new commit. - require_code_owner_reviews: - type: boolean - description: Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) - have reviewed. - required_approving_review_count: - type: integer - description: Specifies the number of reviewers required to approve - pull requests. Use a number between 1 and 6 or 0 to not require - reviewers. - bypass_pull_request_allowances: - type: object - description: Allow specific users or teams to bypass pull request - requirements. Set to `null` to disable. - nullable: true - properties: - users: - type: array - description: The list of user `login`s allowed to bypass pull - request requirements. - items: - type: string - teams: - type: array - description: The list of team `slug`s allowed to bypass pull - request requirements. - items: - type: string - example: - dismissal_restrictions: - users: - - octocat - teams: - - justice-league - bypass_pull_request_allowances: - users: - - octocat - teams: - - justice-league - dismiss_stale_reviews: true - require_code_owner_reviews: true - required_approving_review_count: 2 + environment_ids: + type: array + description: The list of environment ids to approve or reject + example: + - 161171787 + - 161171795 + items: + type: integer + example: 161171787 + state: + type: string + description: Whether to approve or reject deployment to the specified + environments. + enum: + - approved + - rejected + example: approved + comment: + type: string + description: A comment to accompany the deployment review + example: Ship it! + required: + - environment_ids + - state + - comment + examples: + default: + value: + environment_ids: + - 161171787 + state: approved + comment: Ship it! responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/protected-branch-pull-request-review" + type: array + items: + "$ref": "#/components/schemas/deployment" examples: default: - "$ref": "#/components/examples/protected-branch-pull-request-review" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/deployment-items" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: branches - delete: - summary: Delete pull request review protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + enabledForGitHubApps: false + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun": + post: + summary: Re-run a workflow + description: 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. tags: - - repos - operationId: repos/delete-pull-request-review-protection + - actions + operationId: actions/re-run-workflow externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-pull-request-review-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#re-run-a-workflow parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": - get: - summary: Get commit signature protection - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. - - **Note**: You must enable branch protection to require signed commits. + - "$ref": "#/components/parameters/run-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + nullable: true + properties: + enable_debug_logging: + type: boolean + default: false + description: Whether to enable debug logging for the re-run. + examples: + default: + value: + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs": + post: + summary: Re-run failed jobs from a workflow run + description: Re-run all of the failed jobs and their dependent jobs in a workflow + run using the `id` of the workflow run. You must authenticate using an access + token with the `repo` scope to use this endpoint. tags: - - repos - operationId: repos/get-commit-signature-protection + - actions + operationId: actions/re-run-workflow-failed-jobs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-commit-signature-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#re-run-workflow-failed-jobs parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/run-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + nullable: true + properties: + enable_debug_logging: + type: boolean + default: false + description: Whether to enable debug logging for the re-run. + examples: + default: + value: responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/protected-branch-admin-enforced" + "$ref": "#/components/schemas/empty-object" examples: default: - "$ref": "#/components/examples/protected-branch-admin-enforced" - '404': - "$ref": "#/components/responses/not_found" + value: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - post: - summary: Create commit signature protection - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits. + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/actions/secrets": + get: + summary: List repository secrets + description: 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. tags: - - repos - operationId: repos/create-commit-signature-protection + - actions + operationId: actions/list-repo-secrets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-commit-signature-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-repository-secrets parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/protected-branch-admin-enforced" + type: object + required: + - total_count + - secrets + properties: + total_count: + type: integer + secrets: + type: array + items: + "$ref": "#/components/schemas/actions-secret" examples: default: - "$ref": "#/components/examples/protected-branch-admin-enforced" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/actions-secret-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - delete: - summary: Delete commit signature protection - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + category: actions + subcategory: secrets + "/repos/{owner}/{repo}/actions/secrets/public-key": + get: + summary: Get a repository public key + description: 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. tags: - - repos - operationId: repos/delete-commit-signature-protection + - actions + operationId: actions/get-repo-public-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-commit-signature-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" responses: - '204': + '200': description: Response - '404': - "$ref": "#/components/responses/not_found" + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-public-key" + examples: + default: + "$ref": "#/components/examples/actions-public-key" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": + category: actions + subcategory: secrets + "/repos/{owner}/{repo}/actions/secrets/{secret_name}": get: - summary: Get status checks protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: Get a repository secret + description: 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. tags: - - repos - operationId: repos/get-status-checks-protection + - actions + operationId: actions/get-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-status-checks-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-secret parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/status-check-policy" + "$ref": "#/components/schemas/actions-secret" examples: default: - "$ref": "#/components/examples/status-check-policy" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/actions-secret" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - patch: - summary: Update status check protection + category: actions + subcategory: secrets + put: + summary: Create or update a repository secret description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + 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. - Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. + #### Example encrypting a secret using Node.js + + Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + + ``` + const sodium = require('tweetsodium'); + + const key = "base64-encoded-public-key"; + const value = "plain-text-secret"; + + // Convert the message and key to Uint8Array's (Buffer implements that interface) + const messageBytes = Buffer.from(value); + const keyBytes = Buffer.from(key, 'base64'); + + // Encrypt using LibSodium. + const encryptedBytes = sodium.seal(messageBytes, keyBytes); + + // Base64 the encrypted secret + const encrypted = Buffer.from(encryptedBytes).toString('base64'); + + console.log(encrypted); + ``` + + + #### Example encrypting a secret using Python + + Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + + ``` + from base64 import b64encode + from nacl import encoding, public + + def encrypt(public_key: str, secret_value: str) -> str: + """Encrypt a Unicode string using the public key.""" + public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + sealed_box = public.SealedBox(public_key) + encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + return b64encode(encrypted).decode("utf-8") + ``` + + #### Example encrypting a secret using C# + + Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + + ``` + var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + + var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + + Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + ``` + + #### Example encrypting a secret using Ruby + + Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + + ```ruby + require "rbnacl" + require "base64" + + key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + public_key = RbNaCl::PublicKey.new(key) + + box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + encrypted_secret = box.encrypt("my_secret") + + # Print the base64 encoded secret + puts Base64.strict_encode64(encrypted_secret) + ``` tags: - - repos - operationId: repos/update-status-check-protection + - actions + operationId: actions/create-or-update-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-status-check-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-or-update-a-repository-secret parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/secret-name" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - strict: - type: boolean - description: Require branches to be up to date before merging. - contexts: - type: array - deprecated: true - description: "**Deprecated**: The list of status checks to require - in order to merge into this branch. If any of these checks have - recently been set by a particular GitHub App, they will be required - to come from that app in future for the branch to merge. Use `checks` - instead of `contexts` for more fine-grained control.\n" - items: - type: string - checks: - type: array - description: The list of status checks to require in order to merge - into this branch. - items: - type: object - required: - - context - properties: - context: - type: string - description: The name of the required check - app_id: - type: integer - description: The ID of the GitHub App that must provide this - check. Omit this field to automatically select the GitHub - App that has recently provided this check, or any app if - it was not set by a GitHub App. Pass -1 to explicitly allow - any app to set the status. - example: - strict: true - contexts: - - continuous-integration/travis-ci + encrypted_value: + type: string + description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + using the public key retrieved from the [Get a repository public + key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-repository-public-key) + endpoint. + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" + key_id: + type: string + description: ID of the key you used to encrypt the secret. + examples: + default: + value: + encrypted_value: c2VjcmV0 + key_id: '012345678912345678' responses: - '200': - description: Response + '201': + description: Response when creating a secret content: application/json: schema: - "$ref": "#/components/schemas/status-check-policy" + "$ref": "#/components/schemas/empty-object" examples: default: - "$ref": "#/components/examples/status-check-policy" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + value: + '204': + description: Response when updating a secret x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches + category: actions + subcategory: secrets delete: - summary: Remove status check protection - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: Delete a repository secret + description: 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. tags: - - repos - operationId: repos/remove-status-check-protection + - actions + operationId: actions/delete-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-status-check-protection + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-a-repository-secret parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/secret-name" responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": + category: actions + subcategory: secrets + "/repos/{owner}/{repo}/actions/workflows": get: - summary: Get all status check contexts - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: List repository workflows + description: 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. tags: - - repos - operationId: repos/get-all-status-check-contexts + - actions + operationId: actions/list-repo-workflows externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-all-status-check-contexts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-repository-workflows parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - type: string - example: - - continuous-integration/travis-ci - '404': - "$ref": "#/components/responses/not_found" + type: object + required: + - total_count + - workflows + properties: + total_count: + type: integer + workflows: + type: array + items: + "$ref": "#/components/schemas/workflow" + examples: + default: + "$ref": "#/components/examples/workflow-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - post: - summary: Add status check contexts - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + category: actions + subcategory: workflows + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}": + get: + summary: Get a workflow + description: 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. tags: - - repos - operationId: repos/add-status-check-contexts + - actions + operationId: actions/get-workflow externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#add-status-check-contexts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-a-workflow parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - contexts: - type: array - description: contexts parameter - items: - type: string - required: - - contexts - example: - contexts: - - contexts - - type: array - description: contexts parameter - items: - type: string + - "$ref": "#/components/parameters/workflow-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - type: string - example: - - continuous-integration/travis-ci - - continuous-integration/jenkins - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/schemas/workflow" + examples: + default: + "$ref": "#/components/examples/workflow" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: contexts - category: repos - subcategory: branches + category: actions + subcategory: workflows + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable": put: - summary: Set status check contexts - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: Disable a workflow + description: |- + 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. tags: - - repos - operationId: repos/set-status-check-contexts + - actions + operationId: actions/disable-workflow externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#set-status-check-contexts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#disable-a-workflow parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - contexts: - type: array - description: contexts parameter - items: - type: string - required: - - contexts - example: - contexts: - - contexts - - type: array - description: contexts parameter - items: - type: string + - "$ref": "#/components/parameters/workflow-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - type: string - example: - - continuous-integration/travis-ci - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: contexts - category: repos - subcategory: branches - delete: - summary: Remove status check contexts - description: Protected branches are available in public repositories with GitHub - Free and GitHub Free for organizations, and in public and private repositories - with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise - Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. - tags: - - repos - operationId: repos/remove-status-check-contexts + category: actions + subcategory: workflows + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches": + post: + summary: Create a workflow dispatch event + description: |- + You can use this endpoint to manually trigger a GitHub Actions workflow run. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. + + You must configure your GitHub Actions workflow to run when the [`workflow_dispatch` webhook](/developers/webhooks-and-events/webhook-events-and-payloads#workflow_dispatch) event occurs. The `inputs` are configured in the workflow file. For more information about how to configure the `workflow_dispatch` event in the workflow file, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `actions:write` permission to use this endpoint. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)." + operationId: actions/create-workflow-dispatch + tags: + - actions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-status-check-contexts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-a-workflow-dispatch-event parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/workflow-id" + responses: + '204': + description: Response requestBody: + required: true content: application/json: schema: - oneOf: - - type: object - properties: - contexts: - type: array - description: contexts parameter - items: - type: string - required: - - contexts - example: - contexts: - - contexts - - type: array - description: contexts parameter - items: + type: object + properties: + ref: type: string + description: The git reference for the workflow. The reference can + be a branch or tag name. + inputs: + type: object + description: Input keys and values configured in the workflow file. + The maximum number of properties is 10. Any default properties + configured in the workflow file will be used when `inputs` are + omitted. + additionalProperties: + type: string + maxProperties: 10 + required: + - ref + examples: + default: + value: + ref: topic-branch + inputs: + name: Mona the Octocat + home: San Francisco, CA + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: workflows + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable": + put: + summary: Enable a workflow + description: |- + 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. + tags: + - actions + operationId: actions/enable-workflow + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#enable-a-workflow + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/workflow-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: workflows + "/repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs": + get: + summary: List workflow runs for a workflow + description: |- + 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/enterprise-server@3.6/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. + tags: + - actions + operationId: actions/list-workflow-runs + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-workflow-runs + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/workflow-id" + - "$ref": "#/components/parameters/actor" + - "$ref": "#/components/parameters/workflow-run-branch" + - "$ref": "#/components/parameters/event" + - "$ref": "#/components/parameters/workflow-run-status" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/created" + - "$ref": "#/components/parameters/exclude-pull-requests" + - "$ref": "#/components/parameters/workflow-run-check-suite-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - type: string - example: - - continuous-integration/travis-ci - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + type: object + required: + - total_count + - workflow_runs + properties: + total_count: + type: integer + workflow_runs: + type: array + items: + "$ref": "#/components/schemas/workflow-run" + examples: + default: + "$ref": "#/components/examples/workflow-run-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: contexts - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": + category: actions + subcategory: workflow-runs + "/repos/{owner}/{repo}/assignees": get: - summary: Get access restrictions - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Lists who has access to this protected branch. - - **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. + summary: List assignees + description: Lists the [available assignees](https://docs.github.com/articles/assigning-issues-and-pull-requests-to-other-github-users/) + for issues in a repository. tags: - - repos - operationId: repos/get-access-restrictions + - issues + operationId: issues/list-assignees externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-assignees parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/branch-restriction-policy" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/branch-restriction-policy" + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - delete: - summary: Delete access restrictions + category: issues + subcategory: assignees + "/repos/{owner}/{repo}/assignees/{assignee}": + get: + summary: Check if a user can be assigned description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + Checks if a user has permission to be assigned to an issue in this repository. - Disables the ability to restrict who can push to this branch. + 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. tags: - - repos - operationId: repos/delete-access-restrictions + - issues + operationId: issues/check-user-can-be-assigned externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#check-if-a-user-can-be-assigned parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - name: assignee + in: path + required: true + schema: + type: string responses: '204': - description: Response + description: If the `assignee` can be assigned to issues in the repository, + a `204` header with no content is returned. + '404': + description: Otherwise a `404` status code is returned. + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": + category: issues + subcategory: assignees + "/repos/{owner}/{repo}/autolinks": get: - summary: Get apps with access to the protected branch + summary: List all autolinks of a repository description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + This returns a list of autolinks configured for the given repository. - 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. + Information about autolinks are only available to repository administrators. tags: - repos - operationId: repos/get-apps-with-access-to-protected-branch + operationId: repos/list-autolinks externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-apps-with-access-to-the-protected-branch + url: https://docs.github.com/enterprise-server@3.6/v3/repos#list-autolinks parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -16746,179 +16511,163 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/integration" + "$ref": "#/components/schemas/autolink" examples: default: - "$ref": "#/components/examples/integration-items" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/autolink-items" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: branches + subcategory: autolinks post: - summary: Add app access restrictions - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. - - | Type | Description | - | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | - | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + summary: Create an autolink reference for a repository + description: Users with admin access to the repository can create an autolink. tags: - repos - operationId: repos/add-app-access-restrictions + operationId: repos/create-autolink externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#add-app-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/v3/repos#create-an-autolink parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - apps: - type: array - description: apps parameter - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: + type: object + properties: + key_prefix: + type: string + description: The prefix appended by a number will generate a link + any time it is found in an issue, pull request, or commit. + url_template: type: string + description: The URL must contain `` for the reference number. + is_alphanumeric: + type: boolean + default: 'true' + description: Whether this autolink reference matches alphanumeric + characters. If true, the `` parameter of the `url_template` + matches alphanumeric characters `A-Z` (case insensitive), `0-9`, + and `-`. If false, this autolink reference only matches numeric + characters. + required: + - key_prefix + - url_template + examples: + default: + value: + key_prefix: TICKET- + url_template: https://example.com/TICKET?query= + is_alphanumeric: true responses: - '200': - description: Response + '201': + description: response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/integration" + "$ref": "#/components/schemas/autolink" examples: default: - "$ref": "#/components/examples/integration-items" + "$ref": "#/components/examples/autolink" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/autolinks/1 + schema: + type: string '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: apps category: repos - subcategory: branches - put: - summary: Set app access restrictions + subcategory: autolinks + "/repos/{owner}/{repo}/autolinks/{autolink_id}": + get: + summary: Get an autolink reference of a repository description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Replaces the list of apps that have push access to this branch. This removes all apps that previously had push access and grants push access to the new list of apps. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + This returns a single autolink reference by ID that was configured for the given repository. - | 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. | + Information about autolinks are only available to repository administrators. tags: - repos - operationId: repos/set-app-access-restrictions + operationId: repos/get-autolink externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#set-app-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/v3/repos#get-autolink parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - apps: - type: array - description: apps parameter - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: - type: string + - "$ref": "#/components/parameters/autolink-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/integration" + "$ref": "#/components/schemas/autolink" examples: default: - "$ref": "#/components/examples/integration-items" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/autolink" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: apps category: repos - subcategory: branches + subcategory: autolinks delete: - summary: Remove app access restrictions + summary: Delete an autolink reference from a repository description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Removes the ability of an app to push to this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + This deletes a single autolink reference by ID that was configured for the given repository. - | 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. | + Information about autolinks are only available to repository administrators. tags: - repos - operationId: repos/remove-app-access-restrictions + operationId: repos/delete-autolink externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-app-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/v3/repos#delete-autolink parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/branch" - requestBody: - content: - application/json: - schema: - oneOf: - - type: object - properties: - apps: - type: array - description: apps parameter - items: - type: string - required: - - apps - example: - apps: - - my-app - - type: array - items: - type: string + - "$ref": "#/components/parameters/autolink-id" + responses: + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: autolinks + "/repos/{owner}/{repo}/branches": + get: + summary: List branches + description: '' + tags: + - repos + operationId: repos/list-branches + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-branches + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: protected + description: Setting to `true` returns only protected branches. When set to + `false`, only unprotected branches are returned. Omitting this parameter + returns all branches. + in: query + required: false + schema: + type: boolean + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -16927,31 +16676,30 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/integration" + "$ref": "#/components/schemas/short-branch" examples: default: - "$ref": "#/components/examples/integration-items" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/short-branch-with-protection-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: apps category: repos subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": + "/repos/{owner}/{repo}/branches/{branch}": get: - summary: Get teams with access to the protected branch - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Lists the teams who have push access to this branch. The list includes child teams. + summary: Get a branch + description: '' tags: - repos - operationId: repos/get-teams-with-access-to-protected-branch + operationId: repos/get-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-teams-with-access-to-the-protected-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -16962,12 +16710,12 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + "$ref": "#/components/schemas/branch-with-protection" examples: default: - "$ref": "#/components/examples/team-items" + "$ref": "#/components/examples/branch-get" + '301': + "$ref": "#/components/responses/moved_permanently" '404': "$ref": "#/components/responses/not_found" x-github: @@ -16975,204 +16723,345 @@ paths: enabledForGitHubApps: true category: repos subcategory: branches - post: - summary: Add team access restrictions - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Grants the specified teams push access for this branch. You can also give push access to child teams. - - | Type | Description | - | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | - | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + "/repos/{owner}/{repo}/branches/{branch}/protection": + get: + summary: Get branch protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - repos - operationId: repos/add-team-access-restrictions + operationId: repos/get-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#add-team-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - teams: - type: array - description: teams parameter - items: - type: string - required: - - teams - example: - teams: - - my-team - - type: array - description: teams parameter - items: - type: string responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + "$ref": "#/components/schemas/branch-protection" examples: default: - "$ref": "#/components/examples/team-items" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/branch-protection" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: teams category: repos subcategory: branches put: - summary: Set team access restrictions + summary: Update branch protection description: |- Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + Protecting a branch requires admin or owner permissions to the repository. - | 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. | + **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. tags: - repos - operationId: repos/set-team-access-restrictions + operationId: repos/update-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#set-team-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#update-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - teams: - type: array - description: teams parameter - items: - type: string - required: - - teams - example: - teams: - - my-team - - type: array - description: teams parameter - items: - type: string + type: object + properties: + required_status_checks: + type: object + description: Require status checks to pass before merging. Set to + `null` to disable. + nullable: true + properties: + strict: + type: boolean + description: Require branches to be up to date before merging. + contexts: + type: array + deprecated: true + description: "**Deprecated**: The list of status checks to require + in order to merge into this branch. If any of these checks + have recently been set by a particular GitHub App, they will + be required to come from that app in future for the branch + to merge. Use `checks` instead of `contexts` for more fine-grained + control.\n" + items: + type: string + checks: + type: array + description: The list of status checks to require in order to + merge into this branch. + items: + type: object + required: + - context + properties: + context: + type: string + description: The name of the required check + app_id: + type: integer + description: The ID of the GitHub App that must provide + this check. Omit this field to automatically select + the GitHub App that has recently provided this check, + or any app if it was not set by a GitHub App. Pass -1 + to explicitly allow any app to set the status. + required: + - strict + - contexts + enforce_admins: + type: boolean + description: Enforce all configured restrictions for administrators. + Set to `true` to enforce required status checks for repository + administrators. Set to `null` to disable. + nullable: true + required_pull_request_reviews: + type: object + description: Require at least one approving review on a pull request, + before merging. Set to `null` to disable. + nullable: true + properties: + dismissal_restrictions: + type: object + description: Specify which users, teams, and apps 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. + properties: + users: + type: array + description: The list of user `login`s with dismissal access + items: + type: string + teams: + type: array + description: The list of team `slug`s with dismissal access + items: + type: string + apps: + type: array + description: The list of app `slug`s with dismissal access + items: + type: string + dismiss_stale_reviews: + type: boolean + description: Set to `true` if you want to automatically dismiss + approving reviews when someone pushes a new commit. + require_code_owner_reviews: + type: boolean + description: Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) + review them. + required_approving_review_count: + type: integer + description: Specify the number of reviewers required to approve + pull requests. Use a number between 1 and 6 or 0 to not require + reviewers. + bypass_pull_request_allowances: + type: object + description: Allow specific users, teams, or apps to bypass + pull request requirements. + properties: + users: + type: array + description: The list of user `login`s allowed to bypass + pull request requirements. + items: + type: string + teams: + type: array + description: The list of team `slug`s allowed to bypass + pull request requirements. + items: + type: string + apps: + type: array + description: The list of app `slug`s allowed to bypass pull + request requirements. + items: + type: string + restrictions: + type: object + description: Restrict who can push to the protected branch. User, + app, and team `restrictions` are only available for organization-owned + repositories. Set to `null` to disable. + nullable: true + properties: + users: + type: array + description: The list of user `login`s with push access + items: + type: string + teams: + type: array + description: The list of team `slug`s with push access + items: + type: string + apps: + type: array + description: The list of app `slug`s with push access + items: + type: string + required: + - users + - teams + required_linear_history: + type: boolean + description: 'Enforces a linear commit Git history, which prevents + anyone from pushing merge commits to a branch. Set to `true` to + enforce a linear commit history. Set to `false` to disable a linear + commit Git history. Your repository must allow squash merging + or rebase merging before you can enable a linear commit history. + Default: `false`. For more information, see "[Requiring a linear + commit history](https://docs.github.com/github/administering-a-repository/requiring-a-linear-commit-history)" + in the GitHub Help documentation.' + allow_force_pushes: + type: boolean + description: 'Permits force pushes to the protected branch by anyone + with write access to the repository. Set to `true` to allow force + pushes. Set to `false` or `null` to block force pushes. Default: + `false`. For more information, see "[Enabling force pushes to + a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" + in the GitHub Help documentation."' + nullable: true + allow_deletions: + type: boolean + description: 'Allows deletion of the protected branch by anyone + with write access to the repository. Set to `false` to prevent + deletion of the protected branch. Default: `false`. For more information, + see "[Enabling force pushes to a protected branch](https://docs.github.com/en/github/administering-a-repository/enabling-force-pushes-to-a-protected-branch)" + in the GitHub Help documentation.' + block_creations: + type: boolean + description: 'If set to `true`, the `restrictions` branch protection + settings which limits who can push will also block pushes which + create new branches, unless the push is initiated by a user, team, + or app which has the ability to push. Set to `true` to restrict + new branch creation. Default: `false`.' + required_conversation_resolution: + type: boolean + description: 'Requires all conversations on code to be resolved + before a pull request can be merged into a branch that matches + this rule. Set to `false` to disable. Default: `false`.' + required: + - required_status_checks + - enforce_admins + - required_pull_request_reviews + - restrictions + examples: + default: + value: + required_status_checks: + strict: true + contexts: + - continuous-integration/travis-ci + enforce_admins: true + required_pull_request_reviews: + dismissal_restrictions: + users: + - octocat + teams: + - justice-league + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + bypass_pull_request_allowances: + users: + - octocat + teams: + - justice-league + restrictions: + users: + - octocat + teams: + - justice-league + apps: + - super-ci + required_linear_history: true + allow_force_pushes: true + allow_deletions: true + block_creations: true + required_conversation_resolution: true responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + "$ref": "#/components/schemas/protected-branch" examples: default: - "$ref": "#/components/examples/team-items" + "$ref": "#/components/examples/branch-protection-update" + '403': + "$ref": "#/components/responses/forbidden" '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/responses/validation_failed_simple" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: teams category: repos subcategory: branches delete: - summary: Remove team access restrictions - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Removes the ability of a team to push to this branch. You can also remove push access for child teams. - - | Type | Description | - | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | - | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + summary: Delete branch protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - repos - operationId: repos/remove-team-access-restrictions + operationId: repos/delete-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-team-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" - requestBody: - content: - application/json: - schema: - oneOf: - - type: object - properties: - teams: - type: array - description: teams parameter - items: - type: string - required: - - teams - example: - teams: - - my-team - - type: array - description: teams parameter - items: - type: string responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/team" - examples: - default: - "$ref": "#/components/examples/team-items" - '422': - "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: teams category: repos subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": + "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins": get: - summary: Get users with access to the protected branch - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Lists the people who have push access to this branch. + summary: Get admin branch protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - repos - operationId: repos/get-users-with-access-to-protected-branch + operationId: repos/get-admin-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-users-with-access-to-the-protected-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-admin-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -17183,258 +17072,219 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/protected-branch-admin-enforced" examples: default: - "$ref": "#/components/examples/simple-user-items" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/protected-branch-admin-enforced-2" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos subcategory: branches post: - summary: Add user access restrictions + summary: Set admin branch protection description: |- Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - Grants the specified people push access for this branch. - - | Type | Description | - | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. tags: - repos - operationId: repos/add-user-access-restrictions + operationId: repos/set-admin-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#add-user-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#set-admin-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - users: - type: array - description: users parameter - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/protected-branch-admin-enforced" examples: default: - "$ref": "#/components/examples/simple-user-items" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/protected-branch-admin-enforced-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: users category: repos subcategory: branches - put: - summary: Set user access restrictions + delete: + summary: Delete admin branch protection description: |- Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people. - - | Type | Description | - | ------- | ----------------------------------------------------------------------------------------------------------------------------- | - | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled. tags: - repos - operationId: repos/set-user-access-restrictions + operationId: repos/delete-admin-branch-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#set-user-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-admin-branch-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - users: - type: array - description: users parameter - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" - examples: - default: - "$ref": "#/components/examples/simple-user-items" - '422': - "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: users category: repos subcategory: branches - delete: - summary: Remove user access restrictions - description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Removes the ability of a user to push to this branch. - - | Type | Description | - | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- | - | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews": + get: + summary: Get pull request review protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - repos - operationId: repos/remove-user-access-restrictions + operationId: repos/get-pull-request-review-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-user-access-restrictions + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-pull-request-review-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" - requestBody: - content: - application/json: - schema: - oneOf: - - type: object - properties: - users: - type: array - description: users parameter - items: - type: string - required: - - users - example: - users: - - mona - - type: array - items: - type: string responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/protected-branch-pull-request-review" examples: default: - "$ref": "#/components/examples/simple-user-items" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/protected-branch-pull-request-review" x-github: githubCloudOnly: false enabledForGitHubApps: true - requestBodyParameterName: users category: repos subcategory: branches - "/repos/{owner}/{repo}/branches/{branch}/rename": - post: - summary: Rename a branch + patch: + summary: Update pull request review protection description: |- - 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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - To rename the default branch: + Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled. - * Users must have admin or owner permissions. - * GitHub Apps must have the `administration:write` repository permission. + **Note**: Passing new arrays of `users` and `teams` replaces their previous values. tags: - repos - operationId: repos/rename-branch + operationId: repos/update-pull-request-review-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#rename-a-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#update-pull-request-review-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/branch" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - new_name: - type: string - description: The new name of the branch. - required: - - new_name - example: - new_name: my_renamed_branch + dismissal_restrictions: + type: object + description: Specify which users, teams, and apps 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. + properties: + users: + type: array + description: The list of user `login`s with dismissal access + items: + type: string + teams: + type: array + description: The list of team `slug`s with dismissal access + items: + type: string + apps: + type: array + description: The list of app `slug`s with dismissal access + items: + type: string + dismiss_stale_reviews: + type: boolean + description: Set to `true` if you want to automatically dismiss + approving reviews when someone pushes a new commit. + require_code_owner_reviews: + type: boolean + description: Blocks merging pull requests until [code owners](https://docs.github.com/articles/about-code-owners/) + have reviewed. + required_approving_review_count: + type: integer + description: Specifies the number of reviewers required to approve + pull requests. Use a number between 1 and 6 or 0 to not require + reviewers. + bypass_pull_request_allowances: + type: object + description: Allow specific users, teams, or apps to bypass pull + request requirements. + properties: + users: + type: array + description: The list of user `login`s allowed to bypass pull + request requirements. + items: + type: string + teams: + type: array + description: The list of team `slug`s allowed to bypass pull + request requirements. + items: + type: string + apps: + type: array + description: The list of app `slug`s allowed to bypass pull + request requirements. + items: + type: string + examples: + default: + value: + dismissal_restrictions: + users: + - octocat + teams: + - justice-league + apps: + - octoapp + bypass_pull_request_allowances: + users: + - octocat + teams: + - justice-league + apps: + - octoapp + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/branch-with-protection" + "$ref": "#/components/schemas/protected-branch-pull-request-review" examples: default: - "$ref": "#/components/examples/branch-with-protection" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/protected-branch-pull-request-review" '422': "$ref": "#/components/responses/validation_failed" x-github: @@ -17442,631 +17292,352 @@ paths: enabledForGitHubApps: true category: repos subcategory: branches - "/repos/{owner}/{repo}/check-runs": - post: - summary: Create a check run - description: |- - **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. - tags: - - checks - operationId: checks/create - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/checks#create-a-check-run - parameters: + delete: + summary: Delete pull request review protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. + tags: + - repos + operationId: repos/delete-pull-request-review-protection + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-pull-request-review-protection + parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the check. For example, "code-coverage". - head_sha: - type: string - description: The SHA of the commit. - details_url: - type: string - description: The URL of the integrator's site that has the full - details of the check. If the integrator does not provide this, - then the homepage of the GitHub app is used. - external_id: - type: string - description: A reference for the run on the integrator's system. - status: - type: string - description: The current status. Can be one of `queued`, `in_progress`, - or `completed`. - enum: - - queued - - in_progress - - completed - default: queued - started_at: - type: string - format: date-time - description: 'The time that the check run began. This is a timestamp - in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: - `YYYY-MM-DDTHH:MM:SSZ`.' - conclusion: - type: string - description: "**Required if you provide `completed_at` or a `status` - of `completed`**. The final conclusion of the check. Can be one - of `action_required`, `cancelled`, `failure`, `neutral`, `success`, - `skipped`, `stale`, or `timed_out`. When the conclusion is `action_required`, - additional details should be provided on the site specified by - `details_url`. \n**Note:** Providing `conclusion` will automatically - set the `status` parameter to `completed`. You cannot change a - check run conclusion to `stale`, only GitHub can set this." - enum: - - action_required - - cancelled - - failure - - neutral - - success - - skipped - - stale - - timed_out - completed_at: - type: string - format: date-time - description: 'The time the check completed. This is a timestamp - in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: - `YYYY-MM-DDTHH:MM:SSZ`.' - output: - type: object - description: Check runs can accept a variety of data in the `output` - object, including a `title` and `summary` and can optionally provide - descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object) - description. - properties: - title: - type: string - description: The title of the check run. - summary: - type: string - maxLength: 65535 - description: The summary of the check run. This parameter supports - Markdown. - text: - type: string - maxLength: 65535 - description: The details of the check run. This parameter supports - Markdown. - annotations: - type: array - description: Adds information from your analysis to specific - lines of code. Annotations are visible on GitHub in the **Checks** - and **Files changed** tab of the pull request. The Checks - API limits the number of annotations to a maximum of 50 per - API request. To create more than 50 annotations, you have - to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) - endpoint. Each time you update the check run, annotations - are appended to the list of annotations that already exist - for the check run. For details about how you can view annotations - on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". - See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object) - description for details about how to use this parameter. - maxItems: 50 - items: - type: object - properties: - path: - type: string - description: The path of the file to add an annotation - to. For example, `assets/css/main.css`. - start_line: - type: integer - description: The start line of the annotation. - end_line: - type: integer - description: The end line of the annotation. - start_column: - type: integer - description: The start column of the annotation. Annotations - only support `start_column` and `end_column` on the - same line. Omit this parameter if `start_line` and `end_line` - have different values. - end_column: - type: integer - description: The end column of the annotation. Annotations - only support `start_column` and `end_column` on the - same line. Omit this parameter if `start_line` and `end_line` - have different values. - annotation_level: - type: string - description: The level of the annotation. Can be one of - `notice`, `warning`, or `failure`. - enum: - - notice - - warning - - failure - message: - type: string - description: A short description of the feedback for these - lines of code. The maximum size is 64 KB. - title: - type: string - description: The title that represents the annotation. - The maximum size is 255 characters. - raw_details: - type: string - description: Details about this annotation. The maximum - size is 64 KB. - required: - - path - - start_line - - end_line - - annotation_level - - message - images: - type: array - description: Adds images to the output displayed in the GitHub - pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#images-object) - description for details. - items: - type: object - properties: - alt: - type: string - description: The alternative text for the image. - image_url: - type: string - description: The full URL of the image. - caption: - type: string - description: A short image description. - required: - - alt - - image_url - required: - - title - - summary - actions: - type: array - description: Displays a button on GitHub that can be clicked to - alert your app to do additional tasks. For example, a code linting - app can display a button that automatically fixes detected errors. - The button created in this object is displayed after the check - run completes. When a user clicks the button, GitHub sends the - [`check_run.requested_action` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) - to your app. Each action includes a `label`, `identifier` and - `description`. A maximum of three actions are accepted. See the - [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) - description. To learn more about check runs and requested actions, - see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." - maxItems: 3 - items: - type: object - properties: - label: - type: string - maxLength: 20 - description: The text to be displayed on a button in the web - UI. The maximum size is 20 characters. - description: - type: string - maxLength: 40 - description: A short explanation of what this action would - do. The maximum size is 40 characters. - identifier: - type: string - maxLength: 20 - description: A reference for the action on the integrator's - system. The maximum size is 20 characters. - required: - - label - - description - - identifier - required: - - name - - head_sha - oneOf: - - properties: - status: - enum: - - completed - required: - - status - - conclusion - additionalProperties: true - - properties: - status: - enum: - - queued - - in_progress - additionalProperties: true - examples: - example-of-in-progress-conclusion: - summary: Response for in_progress conclusion - value: - name: mighty_readme - head_sha: ce587453ced02b1526dfb4cb910479d431683101 - status: in_progress - external_id: '42' - started_at: '2018-05-04T01:14:52Z' - output: - title: Mighty Readme report - summary: '' - text: '' - example-of-completed-conclusion: - summary: Response for completed conclusion - value: - name: mighty_readme - head_sha: ce587453ced02b1526dfb4cb910479d431683101 - status: completed - started_at: '2017-11-30T19:39:10Z' - conclusion: success - completed_at: '2017-11-30T19:49:10Z' - output: - title: Mighty Readme report - summary: There are 0 failures, 2 warnings, and 1 notices. - text: You may have some misspelled words on lines 2 and 4. You - also may want to add a section in your README about how to install - your app. - annotations: - - path: README.md - annotation_level: warning - title: Spell Checker - message: Check your spelling for 'banaas'. - raw_details: Do you mean 'bananas' or 'banana'? - start_line: 2 - end_line: 2 - - path: README.md - annotation_level: warning - title: Spell Checker - message: Check your spelling for 'aples' - raw_details: Do you mean 'apples' or 'Naples' - start_line: 4 - end_line: 4 - images: - - alt: Super bananas - image_url: http://example.com/images/42 - actions: - - label: Fix - identifier: fix_errors - description: Allow us to fix these errors for you + - "$ref": "#/components/parameters/branch" responses: - '201': + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures": + get: + summary: Get commit signature protection + description: |- + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://docs.github.com/articles/signing-commits-with-gpg) in GitHub Help. + + **Note**: You must enable branch protection to require signed commits. + tags: + - repos + operationId: repos/get-commit-signature-protection + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-commit-signature-protection + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + responses: + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/check-run" + "$ref": "#/components/schemas/protected-branch-admin-enforced" examples: - example-of-completed-conclusion: - "$ref": "#/components/examples/check-run-example-of-completed-conclusion" + default: + "$ref": "#/components/examples/protected-branch-admin-enforced" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/check-runs/{check_run_id}": - get: - summary: Get a check run + category: repos + subcategory: branches + post: + summary: Create commit signature protection description: |- - **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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - 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. + 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. tags: - - checks - operationId: checks/get + - repos + operationId: repos/create-commit-signature-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#get-a-check-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-commit-signature-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-run-id" + - "$ref": "#/components/parameters/branch" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/check-run" + "$ref": "#/components/schemas/protected-branch-admin-enforced" examples: default: - "$ref": "#/components/examples/check-run" + "$ref": "#/components/examples/protected-branch-admin-enforced" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs + category: repos + subcategory: branches + delete: + summary: Delete commit signature protection + description: |- + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits. + tags: + - repos + operationId: repos/delete-commit-signature-protection + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-commit-signature-protection + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + responses: + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks": + get: + summary: Get status checks protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. + tags: + - repos + operationId: repos/get-status-checks-protection + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-status-checks-protection + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/status-check-policy" + examples: + default: + "$ref": "#/components/examples/status-check-policy" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches patch: - summary: Update a check run + summary: Update status check protection description: |- - **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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - Updates a check run for a specific commit in a repository. Your GitHub App must have the `checks:write` permission to edit check runs. + Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled. tags: - - checks - operationId: checks/update + - repos + operationId: repos/update-status-check-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#update-a-check-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#update-status-check-protection parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-run-id" + - "$ref": "#/components/parameters/branch" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - name: - type: string - description: The name of the check. For example, "code-coverage". - details_url: + strict: + type: boolean + description: Require branches to be up to date before merging. + contexts: + type: array + deprecated: true + description: "**Deprecated**: The list of status checks to require + in order to merge into this branch. If any of these checks have + recently been set by a particular GitHub App, they will be required + to come from that app in future for the branch to merge. Use `checks` + instead of `contexts` for more fine-grained control.\n" + items: + type: string + checks: + type: array + description: The list of status checks to require in order to merge + into this branch. + items: + type: object + required: + - context + properties: + context: + type: string + description: The name of the required check + app_id: + type: integer + description: The ID of the GitHub App that must provide this + check. Omit this field to automatically select the GitHub + App that has recently provided this check, or any app if + it was not set by a GitHub App. Pass -1 to explicitly allow + any app to set the status. + examples: + default: + value: + strict: true + contexts: + - continuous-integration/travis-ci + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/status-check-policy" + examples: + default: + "$ref": "#/components/examples/status-check-policy" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches + delete: + summary: Remove status check protection + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. + tags: + - repos + operationId: repos/remove-status-check-protection + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#remove-status-check-protection + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts": + get: + summary: Get all status check contexts + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. + tags: + - repos + operationId: repos/get-all-status-check-contexts + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-all-status-check-contexts + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: type: string - description: The URL of the integrator's site that has the full - details of the check. - external_id: - type: string - description: A reference for the run on the integrator's system. - started_at: - type: string - format: date-time - description: 'This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - format: `YYYY-MM-DDTHH:MM:SSZ`.' - status: - type: string - description: The current status. Can be one of `queued`, `in_progress`, - or `completed`. - enum: - - queued - - in_progress - - completed - conclusion: - type: string - description: "**Required if you provide `completed_at` or a `status` - of `completed`**. The final conclusion of the check. Can be one - of `action_required`, `cancelled`, `failure`, `neutral`, `success`, - `skipped`, `stale`, or `timed_out`. \n**Note:** Providing `conclusion` - will automatically set the `status` parameter to `completed`. - You cannot change a check run conclusion to `stale`, only GitHub - can set this." - enum: - - action_required - - cancelled - - failure - - neutral - - success - - skipped - - stale - - timed_out - completed_at: - type: string - format: date-time - description: 'The time the check completed. This is a timestamp - in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: - `YYYY-MM-DDTHH:MM:SSZ`.' - output: - type: object - description: Check runs can accept a variety of data in the `output` - object, including a `title` and `summary` and can optionally provide - descriptive details about the run. See the [`output` object](https://docs.github.com/rest/reference/checks#output-object-1) - description. - properties: - title: - type: string - description: "**Required**." - summary: - type: string - description: Can contain Markdown. - maxLength: 65535 - text: - type: string - description: Can contain Markdown. - maxLength: 65535 - annotations: - type: array - description: Adds information from your analysis to specific - lines of code. Annotations are visible in GitHub's pull request - UI. Annotations are visible in GitHub's pull request UI. The - Checks API limits the number of annotations to a maximum of - 50 per API request. To create more than 50 annotations, you - have to make multiple requests to the [Update a check run](https://docs.github.com/rest/reference/checks#update-a-check-run) - endpoint. Each time you update the check run, annotations - are appended to the list of annotations that already exist - for the check run. For details about annotations in the UI, - see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". - See the [`annotations` object](https://docs.github.com/rest/reference/checks#annotations-object-1) - description for details. - maxItems: 50 - items: - type: object - properties: - path: - type: string - description: The path of the file to add an annotation - to. For example, `assets/css/main.css`. - start_line: - type: integer - description: The start line of the annotation. - end_line: - type: integer - description: The end line of the annotation. - start_column: - type: integer - description: The start column of the annotation. Annotations - only support `start_column` and `end_column` on the - same line. Omit this parameter if `start_line` and `end_line` - have different values. - end_column: - type: integer - description: The end column of the annotation. Annotations - only support `start_column` and `end_column` on the - same line. Omit this parameter if `start_line` and `end_line` - have different values. - annotation_level: - type: string - description: The level of the annotation. Can be one of - `notice`, `warning`, or `failure`. - enum: - - notice - - warning - - failure - message: - type: string - description: A short description of the feedback for these - lines of code. The maximum size is 64 KB. - title: - type: string - description: The title that represents the annotation. - The maximum size is 255 characters. - raw_details: - type: string - description: Details about this annotation. The maximum - size is 64 KB. - required: - - path - - start_line - - end_line - - annotation_level - - message - images: - type: array - description: Adds images to the output displayed in the GitHub - pull request UI. See the [`images` object](https://docs.github.com/rest/reference/checks#annotations-object-1) - description for details. - items: - type: object - properties: - alt: - type: string - description: The alternative text for the image. - image_url: - type: string - description: The full URL of the image. - caption: - type: string - description: A short image description. - required: - - alt - - image_url - required: - - summary - actions: - type: array - description: Possible further actions the integrator can perform, - which a user may trigger. Each action includes a `label`, `identifier` - and `description`. A maximum of three actions are accepted. See - the [`actions` object](https://docs.github.com/rest/reference/checks#actions-object) - description. To learn more about check runs and requested actions, - see "[Check runs and requested actions](https://docs.github.com/rest/reference/checks#check-runs-and-requested-actions)." - maxItems: 3 - items: - type: object - properties: - label: - type: string - maxLength: 20 - description: The text to be displayed on a button in the web - UI. The maximum size is 20 characters. - description: - type: string - maxLength: 40 - description: A short explanation of what this action would - do. The maximum size is 40 characters. - identifier: - type: string - maxLength: 20 - description: A reference for the action on the integrator's - system. The maximum size is 20 characters. - required: - - label - - description - - identifier - anyOf: - - properties: - status: - enum: - - completed - required: - - conclusion - additionalProperties: true - - properties: - status: - enum: - - queued - - in_progress - additionalProperties: true - example: - name: mighty_readme - started_at: '2018-05-04T01:14:52Z' - status: completed - conclusion: success - completed_at: '2018-05-04T01:14:52Z' - output: - title: Mighty Readme report - summary: There are 0 failures, 2 warnings, and 1 notices. - text: You may have some misspelled words on lines 2 and 4. You also - may want to add a section in your README about how to install your - app. - annotations: - - path: README.md - annotation_level: warning - title: Spell Checker - message: Check your spelling for 'banaas'. - raw_details: Do you mean 'bananas' or 'banana'? - start_line: 2 - end_line: 2 - - path: README.md - annotation_level: warning - title: Spell Checker - message: Check your spelling for 'aples' - raw_details: Do you mean 'apples' or 'Naples' - start_line: 4 - end_line: 4 - images: - - alt: Super bananas - image_url: http://example.com/images/42 - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/check-run" examples: default: - "$ref": "#/components/examples/check-run" + value: + - continuous-integration/travis-ci + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": - get: - summary: List check run annotations - description: 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. + category: repos + subcategory: branches + post: + summary: Add status check contexts + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - - checks - operationId: checks/list-annotations + - repos + operationId: repos/add-status-check-contexts externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#list-check-run-annotations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#add-status-check-contexts parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-run-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/branch" + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object + properties: + contexts: + type: array + description: The name of the status checks + items: + type: string + required: + - contexts + example: + contexts: + - contexts + - type: array + description: The name of the status checks + items: + type: string + examples: + default: + summary: Example adding status checks to a branch protection rule + value: + contexts: + - continuous-integration/travis-ci + - continuous-integration/jenkins responses: '200': description: Response @@ -18075,353 +17646,417 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/check-annotation" + type: string examples: default: - "$ref": "#/components/examples/check-annotation-items" - headers: - Link: - "$ref": "#/components/headers/link" + value: + - continuous-integration/travis-ci + - continuous-integration/jenkins + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": - post: - summary: Rerequest a check run - description: |- - Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. - - To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + requestBodyParameterName: contexts + category: repos + subcategory: branches + put: + summary: Set status check contexts + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - - checks - operationId: checks/rerequest-run + - repos + operationId: repos/set-status-check-contexts externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#rerequest-a-check-run + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#set-status-check-contexts parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-run-id" + - "$ref": "#/components/parameters/branch" + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object + properties: + contexts: + type: array + description: The name of the status checks + items: + type: string + required: + - contexts + example: + contexts: + - contexts + - type: array + description: The name of the status checks + items: + type: string + examples: + default: + summary: Example updating status checks for a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: - '201': + '200': description: Response content: application/json: schema: - type: object - properties: {} - additionalProperties: false - '403': - description: Forbidden if the check run is not rerequestable or doesn't - belong to the authenticated GitHub App - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" + type: array + items: + type: string + examples: + default: + value: + - continuous-integration/travis-ci '422': - description: Validation error if the check run is not rerequestable - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/check-suites": - post: - summary: Create a check suite - description: |- - **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. + requestBodyParameterName: contexts + category: repos + subcategory: branches + delete: + summary: Remove status check contexts + description: Protected branches are available in public repositories with GitHub + Free and GitHub Free for organizations, and in public and private repositories + with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise + Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - - checks - operationId: checks/create-suite + - repos + operationId: repos/remove-status-check-contexts externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#create-a-check-suite + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#remove-status-check-contexts parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" requestBody: - required: true content: application/json: schema: - type: object - properties: - head_sha: + oneOf: + - type: object + properties: + contexts: + type: array + description: The name of the status checks + items: + type: string + required: + - contexts + example: + contexts: + - contexts + - type: array + description: The name of the status checks + items: type: string - description: The sha of the head commit. - required: - - head_sha - example: - head_sha: d6fde92930d4715a2b49857d24b940956b26d2d3 + examples: + default: + summary: Example removing status checks from a branch protection rule + value: + contexts: + - continuous-integration/travis-ci responses: '200': - description: when the suite already existed - content: - application/json: - schema: - "$ref": "#/components/schemas/check-suite" - examples: - default: - "$ref": "#/components/examples/check-suite" - '201': - description: Response when the suite was created + description: Response content: application/json: schema: - "$ref": "#/components/schemas/check-suite" + type: array + items: + type: string examples: default: - "$ref": "#/components/examples/check-suite" + value: + - continuous-integration/travis-ci + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: suites - "/repos/{owner}/{repo}/check-suites/preferences": - patch: - summary: Update repository preferences for check suites - description: 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. + requestBodyParameterName: contexts + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions": + get: + summary: Get access restrictions + description: |- + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + Lists who has access to this protected branch. + + **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories. tags: - - checks - operationId: checks/set-suites-preferences + - repos + operationId: repos/get-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#update-repository-preferences-for-check-suites + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - auto_trigger_checks: - type: array - description: Enables or disables automatic creation of CheckSuite - events upon pushes to the repository. Enabled by default. See - the [`auto_trigger_checks` object](https://docs.github.com/rest/reference/checks#auto_trigger_checks-object) - description for details. - items: - type: object - properties: - app_id: - type: integer - description: The `id` of the GitHub App. - setting: - type: boolean - description: Set to `true` to enable automatic creation of - CheckSuite events upon pushes to the repository, or `false` - to disable them. - default: true - required: - - app_id - - setting - example: - auto_trigger_checks: - - app_id: 4 - setting: false + - "$ref": "#/components/parameters/branch" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/check-suite-preference" + "$ref": "#/components/schemas/branch-restriction-policy" examples: default: - "$ref": "#/components/examples/check-suite-preference" + "$ref": "#/components/examples/branch-restriction-policy" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: suites - "/repos/{owner}/{repo}/check-suites/{check_suite_id}": - get: - summary: Get a check suite + category: repos + subcategory: branches + delete: + summary: Delete access restrictions description: |- - **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`. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - 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. + Disables the ability to restrict who can push to this branch. tags: - - checks - operationId: checks/get-suite + - repos + operationId: repos/delete-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#get-a-check-suite + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-suite-id" + - "$ref": "#/components/parameters/branch" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/check-suite" - examples: - default: - "$ref": "#/components/examples/check-suite" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: suites - "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps": get: - summary: List check runs in a check suite + summary: Get apps with access to the protected branch description: |- - **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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - Lists 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. + 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. tags: - - checks - operationId: checks/list-for-suite + - repos + operationId: repos/get-apps-with-access-to-protected-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#list-check-runs-in-a-check-suite + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-apps-with-access-to-the-protected-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-suite-id" - - "$ref": "#/components/parameters/check-name" - - "$ref": "#/components/parameters/status" - - name: filter - description: Filters check runs by their `completed_at` timestamp. Can be - one of `latest` (returning the most recent check runs) or `all`. - in: query - required: false - schema: - type: string - enum: - - latest - - all - default: latest - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/branch" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - check_runs + type: array + items: + "$ref": "#/components/schemas/integration" + examples: + default: + "$ref": "#/components/examples/integration-items" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: branches + post: + summary: Add app access restrictions + description: |- + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + Grants the specified apps push access for this branch. Only installed GitHub Apps with `write` access to the `contents` permission can be added as authorized actors on a protected branch. + + | Type | Description | + | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | + | `array` | The GitHub Apps that have push access to this branch. Use the app's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | + tags: + - repos + operationId: repos/add-app-access-restrictions + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#add-app-access-restrictions + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object properties: - total_count: - type: integer - check_runs: + apps: type: array + description: apps parameter items: - "$ref": "#/components/schemas/check-run" + type: string + required: + - apps + example: + apps: + - my-app + - type: array + items: + type: string + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/integration" examples: default: - "$ref": "#/components/examples/check-run-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/integration-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": - post: - summary: Rerequest a check suite + requestBodyParameterName: apps + category: repos + subcategory: branches + put: + summary: Set app access restrictions description: |- - 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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - 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. + 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. | tags: - - checks - operationId: checks/rerequest-suite + - repos + operationId: repos/set-app-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#rerequest-a-check-suite + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#set-app-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/check-suite-id" + - "$ref": "#/components/parameters/branch" + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object + properties: + apps: + type: array + description: apps parameter + items: + type: string + required: + - apps + example: + apps: + - my-app + - type: array + items: + type: string responses: - '201': + '200': description: Response content: application/json: schema: - type: object - properties: {} - additionalProperties: false + type: array + items: + "$ref": "#/components/schemas/integration" + examples: + default: + "$ref": "#/components/examples/integration-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: suites - "/repos/{owner}/{repo}/code-scanning/alerts": - get: - summary: List code scanning alerts for a repository + requestBodyParameterName: apps + category: repos + subcategory: branches + delete: + summary: Remove app access restrictions description: |- - Lists all open code scanning alerts for the default branch (usually `main` - or `master`). You must use an access token with the `security_events` scope to use - this endpoint with private repos, the `public_repo` scope also grants permission to read - security events on public repos only. GitHub Apps must have the `security_events` read - permission to use this endpoint. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - The response includes a `most_recent_instance` object. - This provides details of the most recent instance of this alert - for the default branch or for the specified Git reference - (if you used `ref` in the request). + 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. | tags: - - code-scanning - operationId: code-scanning/list-alerts-for-repo + - repos + operationId: repos/remove-app-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#remove-app-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/tool-name" - - "$ref": "#/components/parameters/tool-guid" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/git-ref" - - "$ref": "#/components/parameters/direction" - - name: sort - description: Can be one of `created`, `updated`, `number`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - number - default: number - - name: state - description: Set to `open`, `closed, `fixed`, or `dismissed` to list code - scanning alerts in a specific state. - in: query - required: false - schema: - "$ref": "#/components/schemas/code-scanning-alert-state" + - "$ref": "#/components/parameters/branch" + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + properties: + apps: + type: array + description: apps parameter + items: + type: string + required: + - apps + example: + apps: + - my-app + - type: array + items: + type: string responses: '200': description: Response @@ -18430,138 +18065,170 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/code-scanning-alert-items" + "$ref": "#/components/schemas/integration" examples: default: - "$ref": "#/components/examples/code-scanning-alert-items" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/integration-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: code-scanning - subcategory: - "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": + requestBodyParameterName: apps + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams": get: - summary: Get a code scanning alert + summary: Get teams with access to the protected branch description: |- - Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - **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`. + Lists the teams who have push access to this branch. The list includes child teams. tags: - - code-scanning - operationId: code-scanning/get-alert + - repos + operationId: repos/get-teams-with-access-to-protected-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-teams-with-access-to-the-protected-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" + - "$ref": "#/components/parameters/branch" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/code-scanning-alert" + type: array + items: + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/code-scanning-alert" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" + "$ref": "#/components/examples/team-items" '404': "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: code-scanning - subcategory: - patch: - summary: Update a code scanning alert - description: Updates the status of a single code scanning alert. You must use - an access token with the `security_events` scope to use this endpoint with - private repositories. You can also use tokens with the `public_repo` scope - for public repositories only. GitHub Apps must have the `security_events` - write permission to use this endpoint. - operationId: code-scanning/update-alert + category: repos + subcategory: branches + post: + summary: Add team access restrictions + description: |- + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + Grants the specified teams push access for this branch. You can also give push access to child teams. + + | Type | Description | + | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | tags: - - code-scanning + - repos + operationId: repos/add-team-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#update-a-code-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#add-team-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" + - "$ref": "#/components/parameters/branch" requestBody: - required: true + required: false content: application/json: schema: - type: object - properties: - state: - "$ref": "#/components/schemas/code-scanning-alert-set-state" - dismissed_reason: - "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" - required: - - state - example: - state: dismissed - dismissed_reason: false positive + oneOf: + - type: object + properties: + teams: + type: array + description: The slug values for teams + items: + type: string + required: + - teams + example: + teams: + - my-team + - type: array + description: The slug values for teams + items: + type: string + examples: + default: + summary: Example adding a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/code-scanning-alert" + type: array + items: + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/code-scanning-alert-dismissed" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_write" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/team-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: code-scanning - "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": - get: - summary: List instances of a code scanning alert + enabledForGitHubApps: true + requestBodyParameterName: teams + category: repos + subcategory: branches + put: + summary: Set team access restrictions description: |- - Lists all instances of the specified code scanning alert. - You must use an access token with the `security_events` scope to use this endpoint with private repos, - the `public_repo` scope also grants permission to read security events on public repos only. - GitHub Apps must have the `security_events` read permission to use this endpoint. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams. + + | Type | Description | + | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | + | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. | tags: - - code-scanning - operationId: code-scanning/list-alert-instances + - repos + operationId: repos/set-team-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#set-team-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/git-ref" + - "$ref": "#/components/parameters/branch" + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object + properties: + teams: + type: array + description: The slug values for teams + items: + type: string + required: + - teams + example: + teams: + - justice-league + - type: array + description: The slug values for teams + items: + type: string + examples: + default: + summary: Example replacing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18570,69 +18237,65 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/code-scanning-alert-instance" + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/code-scanning-alert-instances" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/team-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: code-scanning - subcategory: - "/repos/{owner}/{repo}/code-scanning/analyses": - get: - summary: List code scanning analyses for a repository + requestBodyParameterName: teams + category: repos + subcategory: branches + delete: + summary: Remove team access restrictions description: |- - 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. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - You must use an access token with the `security_events` scope to use this endpoint with private repos, - the `public_repo` scope also grants permission to read security events on public repos only. - GitHub Apps must have the `security_events` read permission to use this endpoint. + Removes the ability of a team to push to this branch. You can also remove push access for child teams. - **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. - operationId: code-scanning/list-recent-analyses + | 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. | tags: - - code-scanning + - repos + operationId: repos/remove-team-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#remove-team-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/tool-name" - - "$ref": "#/components/parameters/tool-guid" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - name: ref - in: query - description: 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`. - required: false - schema: - "$ref": "#/components/schemas/code-scanning-ref" - - name: sarif_id - in: query - description: Filter analyses belonging to the same SARIF upload. - required: false - schema: - "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" + - "$ref": "#/components/parameters/branch" + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + properties: + teams: + type: array + description: The slug values for teams + items: + type: string + required: + - teams + example: + teams: + - my-team + - type: array + description: The slug values for teams + items: + type: string + examples: + default: + summary: Example removing a team in a branch protection rule + value: + teams: + - justice-league responses: '200': description: Response @@ -18641,826 +18304,672 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/code-scanning-analysis" + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/code-scanning-analysis-items" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/team-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: code-scanning - "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": + enabledForGitHubApps: true + requestBodyParameterName: teams + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users": get: - summary: Get a code scanning analysis for a repository + summary: Get users with access to the protected branch description: |- - Gets a specified code scanning analysis for a repository. - You must use an access token with the `security_events` scope to use this endpoint with private repos, - the `public_repo` scope also grants permission to read security events on public repos only. - GitHub Apps must have the `security_events` read permission to use this endpoint. - - The default JSON response contains fields that describe the analysis. - This includes the Git reference and commit SHA to which the analysis relates, - the datetime of the analysis, the name of the code scanning tool, - and the number of alerts. - - The `rules_count` field in the default response give the number of rules - that were run in the analysis. - For very old analyses this data is not available, - and `0` is returned in this field. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - 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). - operationId: code-scanning/get-analysis + Lists the people who have push access to this branch. tags: - - code-scanning + - repos + operationId: repos/get-users-with-access-to-protected-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-users-with-access-to-the-protected-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: analysis_id - in: path - description: The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` - operation. - required: true - schema: - type: integer + - "$ref": "#/components/parameters/branch" responses: '200': description: Response content: - application/json+sarif: - schema: - type: string application/json: schema: - "$ref": "#/components/schemas/code-scanning-analysis" - examples: - response: - "$ref": "#/components/examples/code-scanning-analysis-default" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" + type: array + items: + "$ref": "#/components/schemas/simple-user" + examples: + default: + "$ref": "#/components/examples/simple-user-items" '404': "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: code-scanning - delete: - summary: Delete a code scanning analysis from a repository + enabledForGitHubApps: true + category: repos + subcategory: branches + post: + summary: Add user access restrictions description: |- - Deletes a specified code scanning analysis from a repository. For - private repositories, you must use an access token with the `repo` scope. For public repositories, - you must use an access token with `public_repo` scope. - GitHub Apps must have the `security_events` write permission to use this endpoint. - - You can delete one analysis at a time. - To delete a series of analyses, start with the most recent analysis and work backwards. - Conceptually, the process is similar to the undo function in a text editor. - - When you list the analyses for a repository, - one or more will be identified as deletable in the response: - - ``` - "deletable": true - ``` - - An analysis is deletable when it's the most recent in a set of analyses. - Typically, a repository will have multiple sets of analyses - for each enabled code scanning tool, - where a set is determined by a unique combination of analysis values: - - * `ref` - * `tool` - * `analysis_key` - * `environment` - - If you attempt to delete an analysis that is not the most recent in a set, - you'll get a 400 response with the message: - - ``` - Analysis specified is not deletable. - ``` - - The response from a successful `DELETE` operation provides you with - two alternative URLs for deleting the next analysis in the set: - `next_analysis_url` and `confirm_delete_url`. - Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis - in a set. This is a useful option if you want to preserve at least one analysis - for the specified tool in your repository. - Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. - When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` - in the 200 response is `null`. - - As an example of the deletion process, - let's imagine that you added a workflow that configured a particular code scanning tool - to analyze the code in a repository. This tool has added 15 analyses: - 10 on the default branch, and another 5 on a topic branch. - You therefore have two separate sets of analyses for this tool. - You've now decided that you want to remove all of the analyses for the tool. - To do this you must make 15 separate deletion requests. - To start, you must find an analysis that's identified as deletable. - Each set of analyses always has one that's identified as deletable. - Having found the deletable analysis for one of the two sets, - delete this analysis and then continue deleting the next analysis in the set until they're all deleted. - Then repeat the process for the second set. - The procedure therefore consists of a nested loop: - - **Outer loop**: - * List the analyses for the repository, filtered by tool. - * Parse this list to find a deletable analysis. If found: + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - **Inner loop**: - * Delete the identified analysis. - * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + Grants the specified people push access for this branch. - The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. - operationId: code-scanning/delete-analysis + | 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. | tags: - - code-scanning + - repos + operationId: repos/add-user-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#add-user-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: analysis_id - in: path - description: The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` - operation. - required: true - schema: - type: integer - - name: confirm_delete - in: query - description: 'Allow deletion if the specified analysis is the last in a set. - If you attempt to delete the final analysis in a set without setting this - parameter to `true`, you''ll get a 400 response with the message: `Analysis - is last of its type and deletion may result in the loss of historical alert - data. Please specify confirm_delete.`' + - "$ref": "#/components/parameters/branch" + requestBody: required: false - schema: - type: string - nullable: true + content: + application/json: + schema: + oneOf: + - type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona + - type: array + items: + type: string + examples: + default: + summary: Example adding a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/code-scanning-analysis-deletion" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: - default-response: - "$ref": "#/components/examples/code-scanning-analysis-deletion" - '400': - "$ref": "#/components/responses/bad_request" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_write" - '404': - "$ref": "#/components/responses/not_found" - '503': - "$ref": "#/components/responses/service_unavailable" + default: + "$ref": "#/components/examples/simple-user-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: code-scanning - "/repos/{owner}/{repo}/code-scanning/sarifs": - post: - summary: Upload an analysis as SARIF data + enabledForGitHubApps: true + requestBodyParameterName: users + category: repos + subcategory: branches + put: + summary: Set user access restrictions description: |- - Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. - - There are two places where you can upload code scanning results. - - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." - - You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: - - ``` - gzip -c analysis-data.sarif | base64 -w0 - ``` + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + 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. - 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)." - operationId: code-scanning/upload-sarif + | 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. | tags: - - code-scanning + - repos + operationId: repos/set-user-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#upload-a-sarif-file + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#set-user-access-restrictions parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" requestBody: - required: true + required: false content: application/json: schema: - type: object - properties: - commit_sha: - "$ref": "#/components/schemas/code-scanning-analysis-commit-sha" - ref: - "$ref": "#/components/schemas/code-scanning-ref" - sarif: - "$ref": "#/components/schemas/code-scanning-analysis-sarif-file" - checkout_uri: - description: |- - The base directory used in the analysis, as it appears in the SARIF file. - This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. - example: file:///github/workspace/ - type: string - format: uri - started_at: - description: 'The time that the analysis run began. This is a timestamp - in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: - `YYYY-MM-DDTHH:MM:SSZ`.' - format: date-time - type: string - tool_name: - description: The name of the tool used to generate the code scanning - analysis. If this parameter is not used, the tool name defaults - to "API". If the uploaded SARIF contains a tool GUID, this will - be available for filtering using the `tool_guid` parameter of - operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. + oneOf: + - type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona + - type: array + items: type: string - required: - - commit_sha - - ref - - sarif - responses: - '202': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/code-scanning-sarifs-receipt" - examples: - default: - "$ref": "#/components/examples/code-scanning-sarif-upload" - '400': - description: Bad Request if the sarif field is invalid - '403': - "$ref": "#/components/responses/code_scanning_forbidden_write" - '404': - "$ref": "#/components/responses/not_found" - '413': - description: Payload Too Large if the sarif field is too large - '503': - "$ref": "#/components/responses/service_unavailable" - x-github: - enabledForGitHubApps: true - githubCloudOnly: false - category: code-scanning - "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": - get: - summary: Get information about a SARIF upload - description: Gets information about a SARIF upload, including the status and - the URL of the analysis that was uploaded so that you can retrieve details - of the analysis. For more information, see "[Get a code scanning analysis - for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." - You must use an access token with the `security_events` scope to use this - endpoint with private repos, the `public_repo` scope also grants permission - to read security events on public repos only. GitHub Apps must have the `security_events` - read permission to use this endpoint. - operationId: code-scanning/get-sarif - tags: - - code-scanning - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: sarif_id - description: The SARIF ID obtained after uploading. - in: path - schema: - type: string - required: true + examples: + default: + summary: Example replacing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/code-scanning-sarifs-status" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/code-scanning-sarif-upload-status" - '403': - "$ref": "#/components/responses/code_scanning_forbidden_read" - '404': - description: Not Found if the sarif id does not match any upload - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/examples/simple-user-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: code-scanning - "/repos/{owner}/{repo}/codespaces": - get: - summary: List codespaces in a repository for the authenticated user + enabledForGitHubApps: true + requestBodyParameterName: users + category: repos + subcategory: branches + delete: + summary: Remove user access restrictions description: |- - Lists the codespaces associated to a specified repository and the authenticated user. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + 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. | tags: - - codespaces - operationId: codespaces/list-in-repository-for-authenticated-user + - repos + operationId: repos/remove-user-access-restrictions externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-codespaces-in-a-repository-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#remove-user-access-restrictions parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + properties: + users: + type: array + description: The username for users + items: + type: string + required: + - users + example: + users: + - mona + - type: array + items: + type: string + examples: + default: + summary: Example removing a user in a branch protection rule + value: + users: + - octocat responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - codespaces - properties: - total_count: - type: integer - codespaces: - type: array - items: - "$ref": "#/components/schemas/codespace" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/codespaces-list-for-repository" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/simple-user-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: + enabledForGitHubApps: true + requestBodyParameterName: users + category: repos + subcategory: branches + "/repos/{owner}/{repo}/branches/{branch}/rename": post: - summary: Create a codespace in a repository + summary: Rename a branch description: |- - Creates a codespace owned by the authenticated user in the specified repository. + 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/enterprise-server@3.6/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. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + To rename the default branch: + + * Users must have admin or owner permissions. + * GitHub Apps must have the `administration:write` repository permission. tags: - - codespaces - operationId: codespaces/create-with-repo-for-authenticated-user + - repos + operationId: repos/rename-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#create-a-codespace-in-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#rename-a-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/branch" requestBody: required: true content: application/json: schema: type: object - required: - - location properties: - ref: - description: Git ref (typically a branch name) for this codespace - type: string - location: - description: Location for this codespace - type: string - machine: - description: Machine type to use for this codespace - type: string - working_directory: - description: Working directory for this codespace + new_name: type: string - idle_timeout_minutes: - description: Time in minutes before codespace stops from inactivity - type: integer - example: - repository_id: 1 - ref: main + description: The new name of the branch. + required: + - new_name + examples: + default: + value: + new_name: my_renamed_branch responses: '201': - description: Response when the codespace was successfully created - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace" - examples: - default: - "$ref": "#/components/examples/codespace" - '202': - description: Response when the codespace creation partially failed but is - being retried in the background - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace" - examples: - default: - "$ref": "#/components/examples/codespace" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/repos/{owner}/{repo}/codespaces/machines": - get: - summary: List available machine types for a repository - description: |- - List the machine types available for a given repository based on its configuration. - - Location is required. - - You must authenticate using an access token with the `codespace` scope to use this endpoint. - tags: - - codespaces - operationId: codespaces/repo-machines-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-available-machine-types-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: location - description: Required. The location to check for available machines. - in: query - required: true - schema: - type: string - example: WestUs2 - responses: - '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - machines - properties: - total_count: - type: integer - machines: - type: array - items: - "$ref": "#/components/schemas/codespace-machine" + "$ref": "#/components/schemas/branch-with-protection" examples: default: - "$ref": "#/components/examples/codespace-machines-list" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/branch-with-protection" '403': "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: machines - "/repos/{owner}/{repo}/collaborators": - get: - summary: List repository collaborators + enabledForGitHubApps: true + category: repos + subcategory: branches + "/repos/{owner}/{repo}/check-runs": + post: + summary: Create a check run description: |- - 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. + **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. - Team members will include the members of child teams. + 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. - You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - endpoint. + 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. tags: - - repos - operationId: repos/list-collaborators + - checks + operationId: checks/create externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-collaborators + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#create-a-check-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: affiliation - description: "Filter collaborators returned by their affiliation. Can be one - of: \n\\* `outside`: All outside collaborators of an organization-owned - repository. \n\\* `direct`: All collaborators with permissions to an organization-owned - repository, regardless of organization membership status. \n\\* `all`: - All collaborators the authenticated user can see." - in: query - required: false - schema: - type: string - enum: - - outside - - direct - - all - default: all - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/collaborator" - examples: - default: - "$ref": "#/components/examples/collaborator-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: collaborators - "/repos/{owner}/{repo}/collaborators/{username}": - get: - summary: Check if a user is a repository collaborator - description: |- - For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. - - Team members will include the members of child teams. - - You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this - endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this - endpoint. - tags: - - repos - operationId: repos/check-collaborator - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#check-if-a-user-is-a-repository-collaborator - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response if user is a collaborator - '404': - description: Not Found if user is not a collaborator - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: collaborators - put: - summary: Add a repository collaborator - description: |- - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - - For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/en/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: - - ``` - Cannot assign {member} permission of {role name} - ``` - - Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs)." - - The invitee will receive a notification that they have been invited to the repository, which they must accept or decline. They may do this via the notifications page, the email they receive, or by using the [repository invitations API endpoints](https://docs.github.com/rest/reference/repos#invitations). - - **Rate limits** - - You are limited to sending 50 invitations to a repository per 24 hour period. Note there is no limit if you are inviting organization members to an organization repository. - tags: - - repos - operationId: repos/add-collaborator - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#add-a-repository-collaborator - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/username" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - permission: + name: + type: string + description: The name of the check. For example, "code-coverage". + head_sha: + type: string + description: The SHA of the commit. + details_url: + type: string + description: The URL of the integrator's site that has the full + details of the check. If the integrator does not provide this, + then the homepage of the GitHub app is used. + external_id: + type: string + description: A reference for the run on the integrator's system. + status: type: string - description: "The permission to grant the collaborator. **Only valid - on organization-owned repositories.** Can be one of: \n\\* `pull` - - can pull, but not push to or administer this repository. \n\\* - `push` - can pull and push, but not administer this repository. - \ \n\\* `admin` - can pull, push and administer this repository. - \ \n\\* `maintain` - Recommended for project managers who need - to manage the repository without access to sensitive or destructive - actions. \n\\* `triage` - Recommended for contributors who need - to proactively manage issues and pull requests without write access. - \ \n\\* custom repository role name - A custom repository role, - if the owning organization has defined any." + description: The current status. enum: - - pull - - push - - admin - - maintain - - triage - default: push - permissions: + - queued + - in_progress + - completed + default: queued + started_at: + type: string + format: date-time + description: 'The time that the check run began. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + `YYYY-MM-DDTHH:MM:SSZ`.' + conclusion: + type: string + description: "**Required if you provide `completed_at` or a `status` + of `completed`**. The final conclusion of the check. \n**Note:** + Providing `conclusion` will automatically set the `status` parameter + to `completed`. You cannot change a check run conclusion to `stale`, + only GitHub can set this." + enum: + - action_required + - cancelled + - failure + - neutral + - success + - skipped + - stale + - timed_out + completed_at: type: string - example: '"push"' + format: date-time + description: 'The time the check completed. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + `YYYY-MM-DDTHH:MM:SSZ`.' + output: + type: object + description: Check runs can accept a variety of data in the `output` + object, including a `title` and `summary` and can optionally provide + descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object) + description. + properties: + title: + type: string + description: The title of the check run. + summary: + type: string + maxLength: 65535 + description: 'The summary of the check run. This parameter supports + Markdown. **Maximum length**: 65535 characters.' + text: + type: string + maxLength: 65535 + description: 'The details of the check run. This parameter supports + Markdown. **Maximum length**: 65535 characters.' + annotations: + type: array + description: Adds information from your analysis to specific + lines of code. Annotations are visible on GitHub in the **Checks** + and **Files changed** tab of the pull request. The Checks + API limits the number of annotations to a maximum of 50 per + API request. To create more than 50 annotations, you have + to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) + endpoint. Each time you update the check run, annotations + are appended to the list of annotations that already exist + for the check run. For details about how you can view annotations + on GitHub, see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". + See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object) + description for details about how to use this parameter. + maxItems: 50 + items: + type: object + properties: + path: + type: string + description: The path of the file to add an annotation + to. For example, `assets/css/main.css`. + start_line: + type: integer + description: The start line of the annotation. + end_line: + type: integer + description: The end line of the annotation. + start_column: + type: integer + description: The start column of the annotation. Annotations + only support `start_column` and `end_column` on the + same line. Omit this parameter if `start_line` and `end_line` + have different values. + end_column: + type: integer + description: The end column of the annotation. Annotations + only support `start_column` and `end_column` on the + same line. Omit this parameter if `start_line` and `end_line` + have different values. + annotation_level: + type: string + description: The level of the annotation. + enum: + - notice + - warning + - failure + message: + type: string + description: A short description of the feedback for these + lines of code. The maximum size is 64 KB. + title: + type: string + description: The title that represents the annotation. + The maximum size is 255 characters. + raw_details: + type: string + description: Details about this annotation. The maximum + size is 64 KB. + required: + - path + - start_line + - end_line + - annotation_level + - message + images: + type: array + description: Adds images to the output displayed in the GitHub + pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#images-object) + description for details. + items: + type: object + properties: + alt: + type: string + description: The alternative text for the image. + image_url: + type: string + description: The full URL of the image. + caption: + type: string + description: A short image description. + required: + - alt + - image_url + required: + - title + - summary + actions: + type: array + description: Displays a button on GitHub that can be clicked to + alert your app to do additional tasks. For example, a code linting + app can display a button that automatically fixes detected errors. + The button created in this object is displayed after the check + run completes. When a user clicks the button, GitHub sends the + [`check_run.requested_action` webhook](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." + maxItems: 3 + items: + type: object + properties: + label: + type: string + maxLength: 20 + description: The text to be displayed on a button in the web + UI. The maximum size is 20 characters. + description: + type: string + maxLength: 40 + description: A short explanation of what this action would + do. The maximum size is 40 characters. + identifier: + type: string + maxLength: 20 + description: A reference for the action on the integrator's + system. The maximum size is 20 characters. + required: + - label + - description + - identifier + required: + - name + - head_sha + oneOf: + - properties: + status: + enum: + - completed + required: + - status + - conclusion + additionalProperties: true + - properties: + status: + enum: + - queued + - in_progress + additionalProperties: true + examples: + example-of-in-progress-conclusion: + summary: Example of an in_progress conclusion + value: + name: mighty_readme + head_sha: ce587453ced02b1526dfb4cb910479d431683101 + status: in_progress + external_id: '42' + started_at: '2018-05-04T01:14:52Z' + output: + title: Mighty Readme report + summary: '' + text: '' + example-of-completed-conclusion: + summary: Example of a completed conclusion + value: + name: mighty_readme + head_sha: ce587453ced02b1526dfb4cb910479d431683101 + status: completed + started_at: '2017-11-30T19:39:10Z' + conclusion: success + completed_at: '2017-11-30T19:49:10Z' + output: + title: Mighty Readme report + summary: There are 0 failures, 2 warnings, and 1 notices. + text: You may have some misspelled words on lines 2 and 4. You + also may want to add a section in your README about how to install + your app. + annotations: + - path: README.md + annotation_level: warning + title: Spell Checker + message: Check your spelling for 'banaas'. + raw_details: Do you mean 'bananas' or 'banana'? + start_line: 2 + end_line: 2 + - path: README.md + annotation_level: warning + title: Spell Checker + message: Check your spelling for 'aples' + raw_details: Do you mean 'apples' or 'Naples' + start_line: 4 + end_line: 4 + images: + - alt: Super bananas + image_url: http://example.com/images/42 + actions: + - label: Fix + identifier: fix_errors + description: Allow us to fix these errors for you responses: '201': - description: Response when a new invitation is created - content: - application/json: - schema: - "$ref": "#/components/schemas/repository-invitation" - examples: - response-when-a-new-invitation-is-created: - "$ref": "#/components/examples/repository-invitation-response-when-a-new-invitation-is-created" - '204': - description: Response when person is already a collaborator - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" - x-github: - triggersNotification: true - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: collaborators - delete: - summary: Remove a repository collaborator - description: '' - tags: - - repos - operationId: repos/remove-collaborator - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#remove-a-repository-collaborator - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/username" - responses: - '204': description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: collaborators - "/repos/{owner}/{repo}/collaborators/{username}/permission": - get: - summary: Get repository permissions for a user - description: Checks the repository permission of a collaborator. The possible - repository permissions are `admin`, `write`, `read`, and `none`. - tags: - - repos - operationId: repos/get-collaborator-permission-level - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-repository-permissions-for-a-user - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: if user has admin permissions content: application/json: schema: - "$ref": "#/components/schemas/repository-collaborator-permission" + "$ref": "#/components/schemas/check-run" examples: - response-if-user-has-admin-permissions: - "$ref": "#/components/examples/repository-collaborator-permission-response-if-user-has-admin-permissions" - '404': - "$ref": "#/components/responses/not_found" + example-of-completed-conclusion: + "$ref": "#/components/examples/check-run-example-of-completed-conclusion" + example-of-in-progress-conclusion: + "$ref": "#/components/examples/check-run-example-of-in-progress-conclusion" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: collaborators - "/repos/{owner}/{repo}/comments": + category: checks + subcategory: runs + "/repos/{owner}/{repo}/check-runs/{check_run_id}": get: - summary: List commit comments for a repository + summary: Get a check run description: |- - 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/). + **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. - Comments are ordered by ascending ID. - tags: - - repos - operationId: repos/list-commit-comments-for-repo - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-commit-comments-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/commit-comment" - examples: - default: - "$ref": "#/components/examples/commit-comment-items" - headers: - Link: - "$ref": "#/components/headers/link" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: comments - "/repos/{owner}/{repo}/comments/{comment_id}": - get: - summary: Get a commit comment - description: '' + 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. tags: - - repos - operationId: repos/get-commit-comment + - checks + operationId: checks/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-commit-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#get-a-check-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/check-run-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/commit-comment" + "$ref": "#/components/schemas/check-run" examples: default: - "$ref": "#/components/examples/commit-comment" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/check-run" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: comments + category: checks + subcategory: runs patch: - summary: Update a commit comment - description: '' + summary: Update a check run + description: |- + **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. tags: - - repos - operationId: repos/update-commit-comment + - checks + operationId: checks/update externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-commit-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/check-run-id" requestBody: required: true content: @@ -19468,83 +18977,265 @@ paths: schema: type: object properties: - body: + name: type: string - description: The contents of the comment - required: - - body - example: - body: Nice change - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/commit-comment" - examples: - default: - "$ref": "#/components/examples/commit-comment-2" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: comments - delete: - summary: Delete a commit comment - description: '' - tags: - - repos - operationId: repos/delete-commit-comment - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-commit-comment - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: comments - "/repos/{owner}/{repo}/comments/{comment_id}/reactions": - get: - summary: List reactions for a commit comment - description: List the reactions to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - tags: - - reactions - operationId: reactions/list-for-commit-comment - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-a-commit-comment - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - name: content - description: 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. - in: query - required: false - schema: - type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: The name of the check. For example, "code-coverage". + details_url: + type: string + description: The URL of the integrator's site that has the full + details of the check. + external_id: + type: string + description: A reference for the run on the integrator's system. + started_at: + type: string + format: date-time + description: 'This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format: `YYYY-MM-DDTHH:MM:SSZ`.' + status: + type: string + description: The current status. + enum: + - queued + - in_progress + - completed + conclusion: + type: string + description: "**Required if you provide `completed_at` or a `status` + of `completed`**. The final conclusion of the check. \n**Note:** + Providing `conclusion` will automatically set the `status` parameter + to `completed`. You cannot change a check run conclusion to `stale`, + only GitHub can set this." + enum: + - action_required + - cancelled + - failure + - neutral + - success + - skipped + - stale + - timed_out + completed_at: + type: string + format: date-time + description: 'The time the check completed. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + `YYYY-MM-DDTHH:MM:SSZ`.' + output: + type: object + description: Check runs can accept a variety of data in the `output` + object, including a `title` and `summary` and can optionally provide + descriptive details about the run. See the [`output` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#output-object-1) + description. + properties: + title: + type: string + description: "**Required**." + summary: + type: string + description: Can contain Markdown. + maxLength: 65535 + text: + type: string + description: Can contain Markdown. + maxLength: 65535 + annotations: + type: array + description: Adds information from your analysis to specific + lines of code. Annotations are visible in GitHub's pull request + UI. Annotations are visible in GitHub's pull request UI. The + Checks API limits the number of annotations to a maximum of + 50 per API request. To create more than 50 annotations, you + have to make multiple requests to the [Update a check run](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-a-check-run) + endpoint. Each time you update the check run, annotations + are appended to the list of annotations that already exist + for the check run. For details about annotations in the UI, + see "[About status checks](https://docs.github.com/articles/about-status-checks#checks)". + See the [`annotations` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) + description for details. + maxItems: 50 + items: + type: object + properties: + path: + type: string + description: The path of the file to add an annotation + to. For example, `assets/css/main.css`. + start_line: + type: integer + description: The start line of the annotation. + end_line: + type: integer + description: The end line of the annotation. + start_column: + type: integer + description: The start column of the annotation. Annotations + only support `start_column` and `end_column` on the + same line. Omit this parameter if `start_line` and `end_line` + have different values. + end_column: + type: integer + description: The end column of the annotation. Annotations + only support `start_column` and `end_column` on the + same line. Omit this parameter if `start_line` and `end_line` + have different values. + annotation_level: + type: string + description: The level of the annotation. + enum: + - notice + - warning + - failure + message: + type: string + description: A short description of the feedback for these + lines of code. The maximum size is 64 KB. + title: + type: string + description: The title that represents the annotation. + The maximum size is 255 characters. + raw_details: + type: string + description: Details about this annotation. The maximum + size is 64 KB. + required: + - path + - start_line + - end_line + - annotation_level + - message + images: + type: array + description: Adds images to the output displayed in the GitHub + pull request UI. See the [`images` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#annotations-object-1) + description for details. + items: + type: object + properties: + alt: + type: string + description: The alternative text for the image. + image_url: + type: string + description: The full URL of the image. + caption: + type: string + description: A short image description. + required: + - alt + - image_url + required: + - summary + actions: + type: array + description: Possible further actions the integrator can perform, + which a user may trigger. Each action includes a `label`, `identifier` + and `description`. A maximum of three actions are accepted. See + the [`actions` object](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#check-runs-and-requested-actions)." + maxItems: 3 + items: + type: object + properties: + label: + type: string + maxLength: 20 + description: The text to be displayed on a button in the web + UI. The maximum size is 20 characters. + description: + type: string + maxLength: 40 + description: A short explanation of what this action would + do. The maximum size is 40 characters. + identifier: + type: string + maxLength: 20 + description: A reference for the action on the integrator's + system. The maximum size is 20 characters. + required: + - label + - description + - identifier + anyOf: + - properties: + status: + enum: + - completed + required: + - conclusion + additionalProperties: true + - properties: + status: + enum: + - queued + - in_progress + additionalProperties: true + examples: + default: + value: + name: mighty_readme + started_at: '2018-05-04T01:14:52Z' + status: completed + conclusion: success + completed_at: '2018-05-04T01:14:52Z' + output: + title: Mighty Readme report + summary: There are 0 failures, 2 warnings, and 1 notices. + text: You may have some misspelled words on lines 2 and 4. You + also may want to add a section in your README about how to install + your app. + annotations: + - path: README.md + annotation_level: warning + title: Spell Checker + message: Check your spelling for 'banaas'. + raw_details: Do you mean 'bananas' or 'banana'? + start_line: 2 + end_line: 2 + - path: README.md + annotation_level: warning + title: Spell Checker + message: Check your spelling for 'aples' + raw_details: Do you mean 'apples' or 'Naples' + start_line: 4 + end_line: 4 + images: + - alt: Super bananas + image_url: http://example.com/images/42 + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/check-run" + examples: + default: + "$ref": "#/components/examples/check-run" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: checks + subcategory: runs + "/repos/{owner}/{repo}/check-runs/{check_run_id}/annotations": + get: + summary: List check run annotations + description: 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. + tags: + - checks + operationId: checks/list-annotations + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#list-check-run-annotations + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/check-run-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -19555,35 +19246,80 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/check-annotation" examples: default: - "$ref": "#/components/examples/reaction-items" + "$ref": "#/components/examples/check-annotation-items" headers: Link: "$ref": "#/components/headers/link" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: checks + subcategory: runs + "/repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest": + post: + summary: Rerequest a check run + description: |- + Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the [`check_run` webhook](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#check_run) event with the action `rerequested`. When a check run is `rerequested`, its `status` is reset to `queued` and the `conclusion` is cleared. + + To rerequest a check run, your GitHub App must have the `checks:read` permission on a private repository or pull access to a public repository. + tags: + - checks + operationId: checks/rerequest-run + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#rerequest-a-check-run + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/check-run-id" + responses: + '201': + description: Response + content: + application/json: + schema: + type: object + properties: {} + additionalProperties: false + '403': + description: Forbidden if the check run is not rerequestable or doesn't + belong to the authenticated GitHub App + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + '422': + description: Validation error if the check run is not rerequestable + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: + category: checks + subcategory: runs + "/repos/{owner}/{repo}/check-suites": post: - summary: Create reaction for a commit comment - description: Create a reaction to a [commit comment](https://docs.github.com/rest/reference/repos#comments). - A response with an HTTP `200` status means that you already added the reaction - type to this commit comment. + summary: Create a check suite + description: |- + **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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/checks#update-repository-preferences-for-check-suites)". Your GitHub App must have the `checks:write` permission to create check suites. tags: - - reactions - operationId: reactions/create-for-commit-comment + - checks + operationId: checks/create-suite externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-a-commit-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#create-a-check-suite parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -19591,227 +19327,168 @@ paths: schema: type: object properties: - content: + head_sha: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the commit comment. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: The sha of the head commit. required: - - content - example: - content: heart + - head_sha + examples: + default: + value: + head_sha: d6fde92930d4715a2b49857d24b940956b26d2d3 responses: '200': - description: Reaction exists + description: Response when the suite already exists content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/check-suite" examples: default: - "$ref": "#/components/examples/reaction" + "$ref": "#/components/examples/check-suite" '201': - description: Reaction created + description: Response when the suite was created content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/check-suite" examples: default: - "$ref": "#/components/examples/reaction" - '415': - "$ref": "#/components/responses/preview_header_missing" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/check-suite" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": - delete: - summary: Delete a commit comment reaction - description: |- - **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). + category: checks + subcategory: suites + "/repos/{owner}/{repo}/check-suites/preferences": + patch: + summary: Update repository preferences for check suites + description: 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/enterprise-server@3.6/rest/reference/checks#create-a-check-suite). + You must have admin permissions in the repository to set preferences for check + suites. tags: - - reactions - operationId: reactions/delete-for-commit-comment + - checks + operationId: checks/set-suites-preferences externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-a-commit-comment-reaction + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#update-repository-preferences-for-check-suites parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - "$ref": "#/components/parameters/reaction-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + auto_trigger_checks: + type: array + description: Enables or disables automatic creation of CheckSuite + events upon pushes to the repository. Enabled by default. See + the [`auto_trigger_checks` object](https://docs.github.com/enterprise-server@3.6/rest/reference/checks#auto_trigger_checks-object) + description for details. + items: + type: object + properties: + app_id: + type: integer + description: The `id` of the GitHub App. + setting: + type: boolean + description: Set to `true` to enable automatic creation of + CheckSuite events upon pushes to the repository, or `false` + to disable them. + default: true + required: + - app_id + - setting + examples: + default: + value: + auto_trigger_checks: + - app_id: 4 + setting: false responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/check-suite-preference" + examples: + default: + "$ref": "#/components/examples/check-suite-preference" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/commits": + category: checks + subcategory: suites + "/repos/{owner}/{repo}/check-suites/{check_suite_id}": get: - summary: List commits + summary: Get a check suite description: |- - **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: + **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`. - | 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. | + 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. tags: - - repos - operationId: repos/list-commits + - checks + operationId: checks/get-suite externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-commits + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#get-a-check-suite parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: sha - description: 'SHA or branch to start listing commits from. Default: the repository’s - default branch (usually `master`).' - in: query - required: false - schema: - type: string - - name: path - description: Only commits containing this file path will be returned. - in: query - required: false - schema: - type: string - - name: author - description: GitHub login or email address by which to filter by commit author. - in: query - required: false - schema: - type: string - - "$ref": "#/components/parameters/since" - - name: until - description: '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`.' - in: query - required: false - schema: - type: string - format: date-time - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/check-suite-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/commit" + "$ref": "#/components/schemas/check-suite" examples: default: - "$ref": "#/components/examples/commit-items" - headers: - Link: - "$ref": "#/components/headers/link" - '500': - "$ref": "#/components/responses/internal_error" - '400': - "$ref": "#/components/responses/bad_request" - '404': - "$ref": "#/components/responses/not_found" - '409': - "$ref": "#/components/responses/conflict" + "$ref": "#/components/examples/check-suite" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: commits - "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": + category: checks + subcategory: suites + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs": get: - summary: List branches for HEAD commit + summary: List check runs in a check suite description: |- - Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + **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. - Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. + 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. tags: - - repos - operationId: repos/list-branches-for-head-commit + - checks + operationId: checks/list-for-suite externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-branches-for-head-commit + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#list-check-runs-in-a-check-suite parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-sha" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/branch-short" - examples: - default: - "$ref": "#/components/examples/branch-short-items" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: commits - "/repos/{owner}/{repo}/commits/{commit_sha}/comments": - get: - summary: List commit comments - description: Use the `:commit_sha` to specify the commit that will have its - comments listed. - tags: - - repos - operationId: repos/list-comments-for-commit - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-commit-comments - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-sha" + - "$ref": "#/components/parameters/check-suite-id" + - "$ref": "#/components/parameters/check-name" + - "$ref": "#/components/parameters/status" + - name: filter + description: Filters check runs by their `completed_at` timestamp. `latest` + returns the most recent check runs. + in: query + required: false + schema: + type: string + enum: + - latest + - all + default: latest - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -19820,111 +19497,105 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/commit-comment" + type: object + required: + - total_count + - check_runs + properties: + total_count: + type: integer + check_runs: + type: array + items: + "$ref": "#/components/schemas/check-run" examples: default: - "$ref": "#/components/examples/commit-comment-items" + "$ref": "#/components/examples/check-run-paginated" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: comments + category: checks + subcategory: runs + "/repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest": post: - summary: Create a commit comment + summary: Rerequest a check suite description: |- - Create a comment for a commit using its `:commit_sha`. + 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/enterprise-server@3.6/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. - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + 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. tags: - - repos - operationId: repos/create-commit-comment + - checks + operationId: checks/rerequest-suite externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-commit-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#rerequest-a-check-suite parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-sha" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - body: - type: string - description: The contents of the comment. - path: - type: string - description: Relative path of the file to comment on. - position: - type: integer - description: Line index in the diff to comment on. - line: - type: integer - description: "**Deprecated**. Use **position** parameter instead. - Line number in the file to comment on." - required: - - body - example: - body: Great stuff - path: file1.txt - position: 4 - line: 1 + - "$ref": "#/components/parameters/check-suite-id" responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/commit-comment" - examples: - default: - "$ref": "#/components/examples/commit-comment" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/comments/1 - schema: - type: string - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" + type: object + properties: {} + additionalProperties: false x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: comments - "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": + category: checks + subcategory: suites + "/repos/{owner}/{repo}/code-scanning/alerts": get: - summary: List pull requests associated with a commit - description: Lists the merged pull request that introduced the commit to the - repository. If the commit is not present in the default branch, additionally - returns open pull requests associated with the commit. The results may include - open and closed pull requests. Additional preview headers may be required - to see certain details for associated pull requests, such as whether a pull - request is in a draft state. For more information about previews that might - affect this endpoint, see the [List pull requests](https://docs.github.com/rest/reference/pulls#list-pull-requests) - endpoint. + summary: List code scanning alerts for a repository + description: |- + Lists code scanning alerts. + + To use this endpoint, you must use an access token with the `security_events` scope or, for alerts from public repositories only, an access token with the `public_repo` scope. + + GitHub Apps must have the `security_events` read + permission to use this endpoint. + + The response includes a `most_recent_instance` object. + This provides details of the most recent instance of this alert + for the default branch (or for the specified Git reference if you used `ref` in the request). tags: - - repos - operationId: repos/list-pull-requests-associated-with-commit + - code-scanning + operationId: code-scanning/list-alerts-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-pull-requests-associated-with-a-commit + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#list-code-scanning-alerts-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-sha" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/tool-name" + - "$ref": "#/components/parameters/tool-guid" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/git-ref" + - "$ref": "#/components/parameters/direction" + - name: sort + description: The property by which to sort the results. + in: query + required: false + schema: + type: string + enum: + - created + - updated + default: created + - name: state + description: If specified, only code scanning alerts with this state will + be returned. + in: query + required: false + schema: + "$ref": "#/components/schemas/code-scanning-alert-state" responses: '200': description: Response @@ -19933,553 +19604,450 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/pull-request-simple" + "$ref": "#/components/schemas/code-scanning-alert-items" examples: default: - "$ref": "#/components/examples/pull-request-simple-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/code-scanning-alert-items" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: commits - "/repos/{owner}/{repo}/commits/{ref}": + category: code-scanning + subcategory: + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}": get: - summary: Get a commit + summary: Get a code scanning alert description: |- - 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: + Gets a single code scanning alert. You must use an access token with the `security_events` scope to use this endpoint with private repos, the `public_repo` scope also grants permission to read security events on public repos only. GitHub Apps must have the `security_events` read permission to use this endpoint. - | 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. | + **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`. tags: - - repos - operationId: repos/get-commit + - code-scanning + operationId: code-scanning/get-alert externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-commit + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#get-a-code-scanning-alert parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - name: ref - description: ref parameter - in: path - required: true - schema: - type: string - x-multi-segment: true + - "$ref": "#/components/parameters/alert-number" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/commit" + "$ref": "#/components/schemas/code-scanning-alert" examples: default: - "$ref": "#/components/examples/commit" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/code-scanning-alert" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" '404': "$ref": "#/components/responses/not_found" - '500': - "$ref": "#/components/responses/internal_error" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: commits - "/repos/{owner}/{repo}/commits/{ref}/check-runs": - get: - summary: List check runs for a Git reference - description: |- - **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. + category: code-scanning + subcategory: + patch: + summary: Update a code scanning alert + description: Updates the status of a single code scanning alert. You must use + an access token with the `security_events` scope to use this endpoint with + private repositories. You can also use tokens with the `public_repo` scope + for public repositories only. GitHub Apps must have the `security_events` + write permission to use this endpoint. + operationId: code-scanning/update-alert tags: - - checks - operationId: checks/list-for-ref + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#list-check-runs-for-a-git-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#update-a-code-scanning-alert parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter - in: path + - "$ref": "#/components/parameters/alert-number" + requestBody: required: true - schema: - type: string - x-multi-segment: true - - "$ref": "#/components/parameters/check-name" - - "$ref": "#/components/parameters/status" - - name: filter - description: Filters check runs by their `completed_at` timestamp. Can be - one of `latest` (returning the most recent check runs) or `all`. - in: query - required: false - schema: - type: string - enum: - - latest - - all - default: latest - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - - name: app_id - in: query - required: false - schema: - type: integer + content: + application/json: + schema: + type: object + properties: + state: + "$ref": "#/components/schemas/code-scanning-alert-set-state" + dismissed_reason: + "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" + dismissed_comment: + "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" + required: + - state + examples: + default: + value: + state: dismissed + dismissed_reason: false positive + dismissed_comment: This alert is not actually correct, because there's + a sanitizer included in the library. responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - check_runs - properties: - total_count: - type: integer - check_runs: - type: array - items: - "$ref": "#/components/schemas/check-run" + "$ref": "#/components/schemas/code-scanning-alert" examples: default: - "$ref": "#/components/examples/check-run-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/code-scanning-alert-dismissed" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_write" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: runs - "/repos/{owner}/{repo}/commits/{ref}/check-suites": + githubCloudOnly: false + category: code-scanning + "/repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances": get: - summary: List check suites for a Git reference + summary: List instances of a code scanning alert description: |- - **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. + Lists all instances of the specified code scanning alert. + You must use an access token with the `security_events` scope to use this endpoint with private repos, + the `public_repo` scope also grants permission to read security events on public repos only. + GitHub Apps must have the `security_events` read permission to use this endpoint. tags: - - checks - operationId: checks/list-suites-for-ref + - code-scanning + operationId: code-scanning/list-alert-instances externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/checks#list-check-suites-for-a-git-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#list-instances-of-a-code-scanning-alert parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter - in: path - required: true - schema: - type: string - x-multi-segment: true - - name: app_id - description: Filters check suites by GitHub App `id`. - in: query - required: false - schema: - type: integer - example: 1 - - "$ref": "#/components/parameters/check-name" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/alert-number" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/git-ref" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - check_suites - properties: - total_count: - type: integer - check_suites: - type: array - items: - "$ref": "#/components/schemas/check-suite" + type: array + items: + "$ref": "#/components/schemas/code-scanning-alert-instance" examples: default: - "$ref": "#/components/examples/check-suite-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/code-scanning-alert-instances" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: checks - subcategory: suites - "/repos/{owner}/{repo}/commits/{ref}/status": + category: code-scanning + subcategory: + "/repos/{owner}/{repo}/code-scanning/analyses": get: - summary: Get the combined status for a specific reference + summary: List code scanning analyses for a repository description: |- - 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. + 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. - Additionally, a combined `state` is returned. The `state` is one of: + You must use an access token with the `security_events` scope to use this endpoint with private repos, + the `public_repo` scope also grants permission to read security events on public repos only. + GitHub Apps must have the `security_events` read permission to use this endpoint. - * **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` + **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. + operationId: code-scanning/list-recent-analyses tags: - - repos - operationId: repos/get-combined-status-for-ref + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-combined-status-for-a-specific-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#list-code-scanning-analyses-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/tool-name" + - "$ref": "#/components/parameters/tool-guid" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" - name: ref - description: ref parameter - in: path - required: true + in: query + description: 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`. + required: false schema: - type: string - x-multi-segment: true - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + "$ref": "#/components/schemas/code-scanning-ref" + - name: sarif_id + in: query + description: Filter analyses belonging to the same SARIF upload. + required: false + schema: + "$ref": "#/components/schemas/code-scanning-analysis-sarif-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/combined-commit-status" + type: array + items: + "$ref": "#/components/schemas/code-scanning-analysis" examples: default: - "$ref": "#/components/examples/combined-commit-status" + "$ref": "#/components/examples/code-scanning-analysis-items" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" '404': "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: statuses - "/repos/{owner}/{repo}/commits/{ref}/statuses": + githubCloudOnly: false + category: code-scanning + "/repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}": get: - summary: List commit statuses for a reference + summary: Get a code scanning analysis for a repository description: |- - 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. + Gets a specified code scanning analysis for a repository. + You must use an access token with the `security_events` scope to use this endpoint with private repos, + the `public_repo` scope also grants permission to read security events on public repos only. + GitHub Apps must have the `security_events` read permission to use this endpoint. - This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. + 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). + operationId: code-scanning/get-analysis tags: - - repos - operationId: repos/list-commit-statuses-for-ref + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-commit-statuses-for-a-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter + - name: analysis_id in: path + description: The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` + operation. required: true schema: - type: string - x-multi-segment: true - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + type: integer responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/code-scanning-analysis" examples: - default: - "$ref": "#/components/examples/status-items" - headers: - Link: - "$ref": "#/components/headers/link" - '301': - "$ref": "#/components/responses/moved_permanently" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: statuses - "/repos/{owner}/{repo}/community/profile": - get: - summary: Get community profile metrics - description: |- - 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. - tags: - - repos - operationId: repos/get-community-profile-metrics - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-community-profile-metrics - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: + response: + "$ref": "#/components/examples/code-scanning-analysis-default" + application/json+sarif: schema: - "$ref": "#/components/schemas/community-profile" + type: object + additionalProperties: true examples: - default: - "$ref": "#/components/examples/community-profile" + response: + "$ref": "#/components/examples/code-scanning-analysis-sarif" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" + '404': + "$ref": "#/components/responses/not_found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: community - "/repos/{owner}/{repo}/compare/{basehead}": - get: - summary: Compare two commits + githubCloudOnly: false + category: code-scanning + delete: + summary: Delete a code scanning analysis from a repository description: |- - The `basehead` param is comprised of two parts: `base` and `head`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + Deletes a specified code scanning analysis from a repository. For + private repositories, you must use an access token with the `repo` scope. For public repositories, + you must use an access token with `public_repo` scope. + GitHub Apps must have the `security_events` write permission to use this endpoint. - 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. + 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. - 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. + When you list the analyses for a repository, + one or more will be identified as deletable in the response: - **Working with large comparisons** + ``` + "deletable": true + ``` - To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + 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: - When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. + * `ref` + * `tool` + * `category` - **Signature verification object** + 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: - 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: + ``` + Analysis specified is not deletable. + ``` - | 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. | + The response from a successful `DELETE` operation provides you with + two alternative URLs for deleting the next analysis in the set: + `next_analysis_url` and `confirm_delete_url`. + Use the `next_analysis_url` URL if you want to avoid accidentally deleting the final analysis + in a set. This is a useful option if you want to preserve at least one analysis + for the specified tool in your repository. + Use the `confirm_delete_url` URL if you are content to remove all analyses for a tool. + When you delete the last analysis in a set, the value of `next_analysis_url` and `confirm_delete_url` + in the 200 response is `null`. - These are the possible values for `reason` in the `verification` object: + As an example of the deletion process, + let's imagine that you added a workflow that configured a particular code scanning tool + to analyze the code in a repository. This tool has added 15 analyses: + 10 on the default branch, and another 5 on a topic branch. + You therefore have two separate sets of analyses for this tool. + You've now decided that you want to remove all of the analyses for the tool. + To do this you must make 15 separate deletion requests. + To start, you must find an analysis that's identified as deletable. + Each set of analyses always has one that's identified as deletable. + Having found the deletable analysis for one of the two sets, + delete this analysis and then continue deleting the next analysis in the set until they're all deleted. + Then repeat the process for the second set. + The procedure therefore consists of a nested loop: - | 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. | - tags: - - repos - operationId: repos/compare-commits - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#compare-two-commits - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - - name: basehead - description: The base branch and head branch to compare. This parameter expects - the format `{base}...{head}`. - in: path - required: true - schema: - type: string - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/commit-comparison" - examples: - default: - "$ref": "#/components/examples/commit-comparison" - '500': - "$ref": "#/components/responses/internal_error" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: commits - "/repos/{owner}/{repo}/contents/{path}": - get: - summary: Get repository content - description: "Gets the contents of a file or directory in a repository. Specify - the file path or directory in `:path`. If you omit\n`:path`, you will receive - the contents of the repository's root directory. See the description below - regarding what the API response includes for directories. \n\nFiles and symlinks - support [a custom media type](https://docs.github.com/rest/reference/repos#custom-media-types) - for\nretrieving the raw content or rendered HTML (when supported). All content - types support [a custom media\ntype](https://docs.github.com/rest/reference/repos#custom-media-types) - to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n* - \ To get a repository's contents recursively, you can [recursively get the - tree](https://docs.github.com/rest/reference/git#trees).\n* This API has - an upper limit of 1,000 files for a directory. If you need to retrieve more - files, use the [Git Trees\nAPI](https://docs.github.com/rest/reference/git#get-a-tree).\n* - \ This API supports files up to 1 megabyte in size.\n\n#### If the content - is a directory\nThe response will be an array of objects, one object for each - item in the directory.\nWhen listing the contents of a directory, submodules - have their \"type\" specified as \"file\". Logically, the value\n_should_ - be \"submodule\". This behavior exists in API v3 [for backwards compatibility - purposes](https://git.io/v1YCW).\nIn the next major version of the API, the - type will be returned as \"submodule\".\n\n#### If the content is a symlink - \nIf the requested `:path` points to a symlink, and the symlink's target is - a normal file in the repository, then the\nAPI responds with the content of - the file (in the format shown in the example. Otherwise, the API responds - with an object \ndescribing the symlink itself.\n\n#### If the content is - a submodule\nThe `submodule_git_url` identifies the location of the submodule - repository, and the `sha` identifies a specific\ncommit within the submodule - repository. Git uses the given URL when cloning the submodule repository, - and checks out\nthe submodule at that specific commit.\n\nIf the submodule - repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) - and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null - values." + **Outer loop**: + * List the analyses for the repository, filtered by tool. + * Parse this list to find a deletable analysis. If found: + + **Inner loop**: + * Delete the identified analysis. + * Parse the response for the value of `confirm_delete_url` and, if found, use this in the next iteration. + + The above process assumes that you want to remove all trace of the tool's analyses from the GitHub user interface, for the specified repository, and it therefore uses the `confirm_delete_url` value. Alternatively, you could use the `next_analysis_url` value, which would leave the last analysis in each set undeleted to avoid removing a tool's analysis entirely. + operationId: code-scanning/delete-analysis tags: - - repos - operationId: repos/get-content + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-repository-content + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#delete-a-code-scanning-analysis-from-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: path - description: path parameter + - name: analysis_id in: path + description: The ID of the analysis, as returned from the `GET /repos/{owner}/{repo}/code-scanning/analyses` + operation. required: true schema: - type: string - x-multi-segment: true - - name: ref - description: 'The name of the commit/branch/tag. Default: the repository’s - default branch (usually `master`)' + type: integer + - name: confirm_delete in: query + description: 'Allow deletion if the specified analysis is the last in a set. + If you attempt to delete the final analysis in a set without setting this + parameter to `true`, you''ll get a 400 response with the message: `Analysis + is last of its type and deletion may result in the loss of historical alert + data. Please specify confirm_delete.`' required: false schema: type: string + nullable: true responses: '200': description: Response content: - application/vnd.github.v3.object: - schema: - "$ref": "#/components/schemas/content-tree" application/json: schema: - oneOf: - - "$ref": "#/components/schemas/content-directory" - - "$ref": "#/components/schemas/content-file" - - "$ref": "#/components/schemas/content-symlink" - - "$ref": "#/components/schemas/content-submodule" + "$ref": "#/components/schemas/code-scanning-analysis-deletion" examples: - response-if-content-is-a-file: - "$ref": "#/components/examples/content-file-response-if-content-is-a-file" - response-if-content-is-a-directory: - "$ref": "#/components/examples/content-file-response-if-content-is-a-directory" - response-if-content-is-a-symlink: - "$ref": "#/components/examples/content-file-response-if-content-is-a-symlink" - response-if-content-is-a-submodule: - "$ref": "#/components/examples/content-file-response-if-content-is-a-submodule" + default-response: + "$ref": "#/components/examples/code-scanning-analysis-deletion" + '400': + "$ref": "#/components/responses/bad_request" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_write" '404': "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '302': - "$ref": "#/components/responses/found" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: contents - put: - summary: Create or update file contents - description: Creates a new file or replaces an existing file in a repository. + githubCloudOnly: false + category: code-scanning + "/repos/{owner}/{repo}/code-scanning/sarifs": + post: + summary: Upload an analysis as SARIF data + description: |- + Uploads SARIF data containing the results of a code scanning analysis to make the results available in a repository. You must use an access token with the `security_events` scope to use this endpoint for private repositories. You can also use tokens with the `public_repo` scope for public repositories only. GitHub Apps must have the `security_events` write permission to use this endpoint. + + There are two places where you can upload code scanning results. + - If you upload to a pull request, for example `--ref refs/pull/42/merge` or `--ref refs/pull/42/head`, then the results appear as alerts in a pull request check. For more information, see "[Triaging code scanning alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." + - If you upload to a branch, for example `--ref refs/heads/my-branch`, then the results appear in the **Security** tab for your repository. For more information, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/managing-code-scanning-alerts-for-your-repository#viewing-the-alerts-for-a-repository)." + + You must compress the SARIF-formatted analysis data that you want to upload, using `gzip`, and then encode it as a Base64 format string. For example: + + ``` + gzip -c analysis-data.sarif | base64 -w0 + ``` + + SARIF upload supports a maximum of 5000 results per analysis run. Any results over this limit are ignored and any SARIF uploads with more than 25,000 results are rejected. Typically, but not necessarily, a SARIF file contains a single run of a single tool. If a code scanning tool generates too many results, you should update the analysis configuration to run only the most important rules or queries. + + The `202 Accepted`, response includes an `id` value. + You can use this ID to check the status of the upload by using this for the `/sarifs/{sarif_id}` endpoint. + For more information, see "[Get information about a SARIF upload](/rest/reference/code-scanning#get-information-about-a-sarif-upload)." + operationId: code-scanning/upload-sarif tags: - - repos - operationId: repos/create-or-update-file-contents + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-or-update-file-contents + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#upload-a-sarif-file parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: path - description: path parameter - in: path - required: true - schema: - type: string - x-multi-segment: true requestBody: required: true content: @@ -20487,270 +20055,205 @@ paths: schema: type: object properties: - message: - type: string - description: The commit message. - content: + commit_sha: + "$ref": "#/components/schemas/code-scanning-analysis-commit-sha" + ref: + "$ref": "#/components/schemas/code-scanning-ref" + sarif: + "$ref": "#/components/schemas/code-scanning-analysis-sarif-file" + checkout_uri: + description: |- + The base directory used in the analysis, as it appears in the SARIF file. + This property is used to convert file paths from absolute to relative, so that alerts can be mapped to their correct location in the repository. + example: file:///github/workspace/ type: string - description: The new file content, using Base64 encoding. - sha: + format: uri + started_at: + description: 'The time that the analysis run began. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + `YYYY-MM-DDTHH:MM:SSZ`.' + format: date-time type: string - description: "**Required if you are updating a file**. The blob - SHA of the file being replaced." - branch: + tool_name: + description: The name of the tool used to generate the code scanning + analysis. If this parameter is not used, the tool name defaults + to "API". If the uploaded SARIF contains a tool GUID, this will + be available for filtering using the `tool_guid` parameter of + operations such as `GET /repos/{owner}/{repo}/code-scanning/alerts`. type: string - description: 'The branch name. Default: the repository’s default - branch (usually `master`)' - committer: - type: object - description: 'The person that committed the file. Default: the authenticated - user.' - properties: - name: - type: string - description: The name of the author or committer of the commit. - You'll receive a `422` status code if `name` is omitted. - email: - type: string - description: The email of the author or committer of the commit. - You'll receive a `422` status code if `email` is omitted. - date: - type: string - example: '"2013-01-05T13:13:22+05:00"' - required: - - name - - email - author: - type: object - description: 'The author of the file. Default: The `committer` or - the authenticated user if you omit `committer`.' - properties: - name: - type: string - description: The name of the author or committer of the commit. - You'll receive a `422` status code if `name` is omitted. - email: - type: string - description: The email of the author or committer of the commit. - You'll receive a `422` status code if `email` is omitted. - date: - type: string - example: '"2013-01-15T17:13:22+05:00"' - required: - - name - - email required: - - message - - content + - commit_sha + - ref + - sarif examples: - example-for-creating-a-file: - summary: Example for creating a file - value: - message: my commit message - committer: - name: Monalisa Octocat - email: octocat@github.com - content: bXkgbmV3IGZpbGUgY29udGVudHM= - example-for-updating-a-file: - summary: Example for updating a file + default: value: - message: a new commit message - committer: - name: Monalisa Octocat - email: octocat@github.com - content: bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz - sha: 95b966ae1c166bd92f8ae7d1c313e738c731dfc3 + commit_sha: 4b6472266afd7b471e86085a6659e8c7f2b119da + ref: refs/heads/master + sarif: H4sICMLGdF4AA2V4YW1wbGUuc2FyaWYAvVjdbts2FL7PUxDCijaA/CM7iRNfLkPXYgHSNstumlzQ0pHFVCI1korjFgH2ONtr7Ul2KFmy/mOn6QIkjsjDw0/nfN85NL8dEGL9pNwAImqRObECrWM1H40kXQ2XTAfJIlEgXcE1cD10RTQSVDE10K4aKSqZP1AxuKOIKg1ydJU60jSfSh8Hk6EzHA/vlOCWbfa7B6kYPpj90rlsWCZcmbHP5Bs+4oAWIjQD2SMOeJLh2vIQDnIaQerqXHjw8YIgxohybxAyDsS4cAPKsp03K4RcUs6+Up2D+JXpd8mibKIQN9fM/aMCdbyBujGSSQgVxJtx5qX2d2qUcIweQhEuDQf3GBO6CKHkogx/N3MVCKl/AeVKFuf4y5ubsMGDTj1ep+5I7sgmLIpxtU38hLtmMRGSuCFVyip5eKzs5ydh+LztVL6f2m6oih1BkYiuyQIIJWodxVpERPj4sEiWBNNH8EWT0DMG8EAjzKVHXCrB4FkPu/F64NMk1OeC+2yZSNoBOoR7CC0EzYWGbm+xFDFIzbI011+cLjfZtyJkmMZfumAh02uL3NpV2y+MZ6RAjxibyKrNxxJcVjANSb4eBGwZ1M0KsuyR2poLr5rMl8vaDSeVn6eTWEO2j2xIEcmhwlTKNOi4GMOI8gfuZYkvJ7b4v5Tiumyz7RnHeodFzpS8ASIZCH/AYdWi2z3sG8JtFxJ6fF9yR9CdifBr9Pd6d5V2+zbJKjjCFGGmsHuYFy2ytJq9tUxcLSRSQecppOGKrpUxYfxefMEFK+wOGa4hudQByBVT0L+EKtyACxnRsABhEx1QjVDs1KNI9MbpnhqfE45B6FJvu3hRu5VRU9MhZLmK7fqkKyQSTHNoyMqUFMqXCV3CwAeqEwmVokraK8IuBaGvHjQ0gMYrKjnjyw7uk9uD8tgmsBbFMPnU1bV2ZhkJNkuolUiWys3UPWzs5aaIUz9TBe8zMb+6+nT+6fLy91dlE3xzeDDT4zYszb0bW6NjJd0Rvn2EnLvWLFSdKPpBzInzfRgu8ETyMcH8nIfMnJCeC2PyfTA+UKngcnGH7Hw2hGkVQs5YlIRCtdWZYQ4/73es2JlxkfViOEIhoWJq5Oo6UBBfiKIqFBWhiE3jJGbFwVoxBHTRSuIS67sMeplei24X20shLjG+8gqbKC/bESiNMC+wd5q5id0yeS7CJEqXzmrTWNq3k05l84P6f4/bEmXFJjI0fIt1BGQssUnUDkBYeVhE5TqPnMH3jqogDcP0zKcTgLPTMSzOjhbjuVOmW23l1fYNStulfo6sXlFsGLhbDy5RECPRYGCTgOj2bd4nUQEivEd0H7KKYxqnEhFohuur3a3UPskbH/+Yg0+M5P2MHRJu3ziHh3Z2NCrWt3XF1rWTw8Ne/pfbWYXnDSE0SNZQQt1i18q7te2vOhu7ehWuvVyeu0wbLZi24mhoo6aOOTltzG/lgdVvVoXQq5V+pewkFIzL8fjEcadT55jOjpzFzHuOTtDNrMkJPMVQDd7F09RID72O/UPZ0tmctqZ7kWX6EmSZnDpP8GU67SXM8XE3YSrxbKsx6UReZ4y6n/FVZfJjs9Z7stma75W5yQtkzjk5eSJxk1lv4o7+j8TlhaJ2lsKWZO6lruDPBLib3x5ZN/KGWzZ+pn///evv7OOf4iIBv3oY9L/l1wiJ9p0Tc+F1zZnOE9NxXWEus6IQhr5pMfoqxi8WPsuu0azsns4UC6WzNzHIzbeEx4P/AJ3SefgcFAAA responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/file-commit" - examples: - example-for-updating-a-file: - "$ref": "#/components/examples/file-commit-example-for-updating-a-file" - '201': + '202': description: Response content: application/json: schema: - "$ref": "#/components/schemas/file-commit" + "$ref": "#/components/schemas/code-scanning-sarifs-receipt" examples: - example-for-creating-a-file: - "$ref": "#/components/examples/file-commit-example-for-creating-a-file" + default: + "$ref": "#/components/examples/code-scanning-sarif-upload" + '400': + description: Bad Request if the sarif field is invalid + '403': + "$ref": "#/components/responses/code_scanning_forbidden_write" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '409': - "$ref": "#/components/responses/conflict" + '413': + description: Payload Too Large if the sarif field is too large + '503': + "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: contents - delete: - summary: Delete a file - description: |- - 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. + githubCloudOnly: false + category: code-scanning + "/repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}": + get: + summary: Get information about a SARIF upload + description: Gets information about a SARIF upload, including the status and + the URL of the analysis that was uploaded so that you can retrieve details + of the analysis. For more information, see "[Get a code scanning analysis + for a repository](/rest/reference/code-scanning#get-a-code-scanning-analysis-for-a-repository)." + You must use an access token with the `security_events` scope to use this + endpoint with private repos, the `public_repo` scope also grants permission + to read security events on public repos only. GitHub Apps must have the `security_events` + read permission to use this endpoint. + operationId: code-scanning/get-sarif tags: - - repos - operationId: repos/delete-file + - code-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-file + url: https://docs.github.com/enterprise-server@3.6/rest/reference/code-scanning#list-recent-code-scanning-analyses-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: path - description: path parameter + - name: sarif_id + description: The SARIF ID obtained after uploading. in: path - required: true schema: type: string - x-multi-segment: true - requestBody: required: true - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: The commit message. - sha: - type: string - description: The blob SHA of the file being replaced. - branch: - type: string - description: 'The branch name. Default: the repository’s default - branch (usually `master`)' - committer: - type: object - description: object containing information about the committer. - properties: - name: - type: string - description: The name of the author (or committer) of the commit - email: - type: string - description: The email of the author (or committer) of the commit - author: - type: object - description: object containing information about the author. - properties: - name: - type: string - description: The name of the author (or committer) of the commit - email: - type: string - description: The email of the author (or committer) of the commit - required: - - message - - sha - example: - message: my commit message - committer: - name: Monalisa Octocat - email: octocat@github.com - sha: 329688480d39049927147c162b9d2deaf885005f responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/file-commit" + "$ref": "#/components/schemas/code-scanning-sarifs-status" examples: default: - "$ref": "#/components/examples/file-commit" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/code-scanning-sarif-upload-status" + '403': + "$ref": "#/components/responses/code_scanning_forbidden_read" '404': - "$ref": "#/components/responses/not_found" - '409': - "$ref": "#/components/responses/conflict" + description: Not Found if the sarif id does not match any upload '503': "$ref": "#/components/responses/service_unavailable" x-github: - githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: contents - "/repos/{owner}/{repo}/contributors": + githubCloudOnly: false + category: code-scanning + "/repos/{owner}/{repo}/codeowners/errors": get: - summary: List repository contributors + summary: List CODEOWNERS errors description: |- - 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. + List any syntax errors that are detected in the CODEOWNERS + file. - 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. + For more information about the correct CODEOWNERS syntax, + see "[About code owners](https://docs.github.com/enterprise-server@3.6/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)." tags: - repos - operationId: repos/list-contributors + operationId: repos/codeowners-errors externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-contributors + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-codeowners-errors parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: anon - description: Set to `1` or `true` to include anonymous contributors in results. + - name: ref + description: 'A branch, tag or commit name used to determine which version + of the CODEOWNERS file to use. Default: the repository''s default branch + (e.g. `main`)' in: query required: false schema: type: string - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': - description: if repository contains content + description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/contributor" + "$ref": "#/components/schemas/codeowners-errors" examples: - response-if-repository-contains-content: - "$ref": "#/components/examples/contributor-items-response-if-repository-contains-content" - headers: - Link: - "$ref": "#/components/headers/link" - '204': - description: Response if repository is empty - '403': - "$ref": "#/components/responses/forbidden" + default: + "$ref": "#/components/examples/codeowners-errors" '404': - "$ref": "#/components/responses/not_found" + description: Resource not found x-github: githubCloudOnly: false enabledForGitHubApps: true + previews: [] category: repos - subcategory: - "/repos/{owner}/{repo}/dependabot/secrets": + subcategory: + "/repos/{owner}/{repo}/collaborators": get: - summary: List repository secrets - description: Lists all secrets available in a repository without revealing their - encrypted values. You must authenticate using an access token with the `repo` - scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` - repository permission to use this endpoint. - tags: - - dependabot - operationId: dependabot/list-repo-secrets + summary: List repository collaborators + description: |- + 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. + Organization members with write, maintain, or admin privileges on the organization-owned repository can use this endpoint. + + Team members will include the members of child teams. + + You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + endpoint. + tags: + - repos + operationId: repos/list-collaborators externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#list-repository-secrets + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/collaborators#list-repository-collaborators parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: affiliation + description: Filter collaborators returned by their affiliation. `outside` + means all outside collaborators of an organization-owned repository. `direct` + means all collaborators with permissions to an organization-owned repository, + regardless of organization membership status. `all` means all collaborators + the authenticated user can see. + in: query + required: false + schema: + type: string + enum: + - outside + - direct + - all + default: all + - name: permission + description: Filter collaborators by the permissions they have on the repository. + If not specified, all collaborators will be returned. + in: query + required: false + schema: + type: string + enum: + - pull + - triage + - push + - maintain + - admin - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -20759,548 +20262,346 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/dependabot-secret" + type: array + items: + "$ref": "#/components/schemas/collaborator" examples: default: - "$ref": "#/components/examples/dependabot-secret-paginated" + "$ref": "#/components/examples/collaborator-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/repos/{owner}/{repo}/dependabot/secrets/public-key": - get: - summary: Get a repository public key - description: Gets your public key, which you need to encrypt secrets. You need - to encrypt a secret before you can create or update secrets. Anyone with read - access to the repository can use this endpoint. If the repository is private - you must use an access token with the `repo` scope. GitHub Apps must have - the `dependabot_secrets` repository permission to use this endpoint. - tags: - - dependabot - operationId: dependabot/get-repo-public-key - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/dependabot-public-key" - examples: - default: - "$ref": "#/components/examples/dependabot-public-key" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": + category: collaborators + "/repos/{owner}/{repo}/collaborators/{username}": get: - summary: Get a repository secret - description: Gets a single repository secret without revealing its encrypted - value. You must authenticate using an access token with the `repo` scope to - use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - permission to use this endpoint. + summary: Check if a user is a repository collaborator + description: |- + For organization-owned repositories, the list of collaborators includes outside collaborators, organization members that are direct collaborators, organization members with access through team memberships, organization members with access through default organization permissions, and organization owners. + + Team members will include the members of child teams. + + You must authenticate using an access token with the `read:org` and `repo` scopes with push access to use this + endpoint. GitHub Apps must have the `members` organization permission and `metadata` repository permission to use this + endpoint. tags: - - dependabot - operationId: dependabot/get-repo-secret + - repos + operationId: repos/check-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#get-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/collaborators#check-if-a-user-is-a-repository-collaborator parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/username" responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/dependabot-secret" - examples: - default: - "$ref": "#/components/examples/dependabot-secret" + '204': + description: Response if user is a collaborator + '404': + description: Not Found if user is not a collaborator x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets + category: collaborators put: - summary: Create or update a repository secret + summary: Add a repository collaborator description: |- - Creates or updates a repository secret with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository - permission to use this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` + This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - #### Example encrypting a secret using C# + Adding an outside collaborator may be restricted by enterprise administrators. For more information, see "[Enforcing repository management policies in your enterprise](https://docs.github.com/enterprise-server@3.6/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-for-inviting-outside-collaborators-to-repositories)." - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + For more information on permission levels, see "[Repository permission levels for an organization](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/repository-permission-levels-for-an-organization#permission-levels-for-repositories-owned-by-an-organization)". There are restrictions on which permissions can be granted to organization members when an organization base role is in place. In this case, the permission being given must be equal to or higher than the org base permission. Otherwise, the request will fail with: ``` - 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)); + Cannot assign {member} permission of {role name} ``` - #### Example encrypting a secret using Ruby + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." - Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + 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/enterprise-server@3.6/rest/reference/repos#invitations). - ```ruby - require "rbnacl" - require "base64" + **Updating an existing collaborator's permission level** - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) + The endpoint can also be used to change the permissions of an existing collaborator without first removing and re-adding the collaborator. To change the permissions, use the same endpoint and pass a different `permission` parameter. The response will be a `204`, with no other indication that the permission level changed. - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") + **Rate limits** - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + 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. tags: - - dependabot - operationId: dependabot/create-or-update-repo-secret + - repos + operationId: repos/add-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#create-or-update-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/collaborators#add-a-repository-collaborator parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/username" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - encrypted_value: - type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get a repository public - key](https://docs.github.com/rest/reference/dependabot#get-a-repository-public-key) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: + permission: type: string - description: ID of the key you used to encrypt the secret. - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' + description: The permission to grant the collaborator. **Only valid + on organization-owned repositories.** + default: push + examples: + new-invitation-is-created: + summary: Add a collaborator with triage permissions + value: + permission: triage responses: '201': - description: Response when creating a secret + description: Response when a new invitation is created content: application/json: schema: - type: object - properties: {} - additionalProperties: false + "$ref": "#/components/schemas/repository-invitation" + examples: + new-invitation-is-created: + "$ref": "#/components/examples/repository-invitation-response-when-a-new-invitation-is-created" '204': - description: Response when updating a secret + description: |- + Response when: + - an existing collaborator is added as a collaborator + - an organization member is added as an individual collaborator + - an existing team member (whose team is also a repository collaborator) is added as an individual collaborator + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets + category: collaborators delete: - summary: Delete a repository secret - description: Deletes a secret in a repository using the secret name. You must - authenticate using an access token with the `repo` scope to use this endpoint. - GitHub Apps must have the `dependabot_secrets` repository permission to use - this endpoint. + summary: Remove a repository collaborator + description: '' tags: - - dependabot - operationId: dependabot/delete-repo-secret + - repos + operationId: repos/remove-collaborator externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/dependabot#delete-a-repository-secret + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/collaborators#remove-a-repository-collaborator parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/username" responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: dependabot - subcategory: secrets - "/repos/{owner}/{repo}/deployments": + category: collaborators + "/repos/{owner}/{repo}/collaborators/{username}/permission": get: - summary: List deployments - description: 'Simple filtering of deployments is available via query parameters:' + summary: Get repository permissions for a user + description: Checks the repository permission of a collaborator. The possible + repository permissions are `admin`, `write`, `read`, and `none`. tags: - repos - operationId: repos/list-deployments + operationId: repos/get-collaborator-permission-level externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-deployments + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/collaborators#get-repository-permissions-for-a-user parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: sha - description: The SHA recorded at creation time. - in: query - required: false - schema: - type: string - default: none - - name: ref - description: The name of the ref. This can be a branch, tag, or SHA. - in: query - required: false - schema: - type: string - default: none - - name: task - description: The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). - in: query - required: false - schema: - type: string - default: none - - name: environment - description: The name of the environment that was deployed to (e.g., `staging` - or `production`). - in: query - required: false - schema: - type: string - default: none - nullable: true - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/username" responses: '200': - description: Response + description: if user has admin permissions content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/deployment" + "$ref": "#/components/schemas/repository-collaborator-permission" examples: - default: - "$ref": "#/components/examples/deployment-items" - headers: - Link: - "$ref": "#/components/headers/link" + response-if-user-has-admin-permissions: + "$ref": "#/components/examples/repository-collaborator-permission-response-if-user-has-admin-permissions" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - post: - summary: Create a deployment + category: collaborators + "/repos/{owner}/{repo}/comments": + get: + summary: List commit comments for a repository description: |- - Deployments offer a few configurable parameters with certain defaults. - - The `ref` parameter can be any named branch, tag, or SHA. At GitHub we often deploy branches and verify them - before we merge a pull request. - - The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have - multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter - makes it easier to track which environments have requested deployments. The default environment is `production`. - - The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If - the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds, - the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will - return a failure response. - - By default, [commit statuses](https://docs.github.com/rest/reference/commits#commit-statuses) for every submitted context must be in a `success` - state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to - specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do - not require any contexts or create any commit statuses, the deployment will always succeed. - - The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text - field that will be passed on when a deployment event is dispatched. - - The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might - be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an - application with debugging enabled. - - Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref. - - #### Merged branch response - You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating - a deployment. This auto-merge happens when: - * Auto-merge option is enabled in the repository - * Topic branch does not include the latest changes on the base branch, which is `master` in the response example - * There are no merge conflicts - - If there are no new commits in the base branch, a new request to create a deployment should give a successful - response. - - #### Merge conflict response - This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't - be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts. + Commit Comments use [these custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types). You can read more about the use of media types in the API [here](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/). - #### 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`. + Comments are ordered by ascending ID. tags: - repos - operationId: repos/create-deployment + operationId: repos/list-commit-comments-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-deployment + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#list-commit-comments-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - ref: - type: string - description: The ref to deploy. This can be a branch, tag, or SHA. - task: - type: string - description: Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). - default: deploy - auto_merge: - type: boolean - description: Attempts to automatically merge the default branch - into the requested ref, if it's behind the default branch. - default: true - required_contexts: - type: array - description: The [status](https://docs.github.com/rest/reference/commits#commit-statuses) - contexts to verify against commit status checks. If you omit this - parameter, GitHub verifies all unique contexts before creating - a deployment. To bypass checking entirely, pass an empty array. - Defaults to all unique contexts. - items: - type: string - payload: - oneOf: - - type: object - additionalProperties: true - - type: string - description: JSON payload with extra information about the deployment. - default: '' - environment: - type: string - description: Name for the target deployment environment (e.g., `production`, - `staging`, `qa`). - default: production - description: - type: string - description: Short description of the deployment. - default: '' - nullable: true - transient_environment: - type: boolean - description: 'Specifies if the given environment is specific to - the deployment and will no longer exist at some point in the future. - Default: `false`' - default: false - production_environment: - type: boolean - description: 'Specifies if the given environment is one that end-users - directly interact with. Default: `true` when `environment` is - `production` and `false` otherwise.' - required: - - ref - examples: - simple-example: - summary: Simple example - value: - ref: topic-branch - payload: '{ "deploy": "migrate" }' - description: Deploy request from hubot - advanced-example: - summary: Advanced example - value: - ref: topic-branch - auto_merge: false - payload: '{ "deploy": "migrate" }' - description: Deploy request from hubot - required_contexts: - - ci/janky - - security/brakeman + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/deployment" - examples: - simple-example: - "$ref": "#/components/examples/deployment-simple-example" - '202': - description: Merged branch response - content: - application/json: - schema: - type: object - properties: - message: - type: string + type: array + items: + "$ref": "#/components/schemas/commit-comment" examples: - merged-branch-response: - value: - message: Auto-merged master into topic-branch on deployment. - '409': - description: Conflict when there is a merge conflict or the commit's status - checks failed - '422': - "$ref": "#/components/responses/validation_failed" + default: + "$ref": "#/components/examples/commit-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - "/repos/{owner}/{repo}/deployments/{deployment_id}": + category: commits + subcategory: comments + "/repos/{owner}/{repo}/comments/{comment_id}": get: - summary: Get a deployment + summary: Get a commit comment description: '' tags: - repos - operationId: repos/get-deployment + operationId: repos/get-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-deployment + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#get-a-commit-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/deployment-id" + - "$ref": "#/components/parameters/comment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/deployment" + "$ref": "#/components/schemas/commit-comment" examples: default: - "$ref": "#/components/examples/deployment" + "$ref": "#/components/examples/commit-comment" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - delete: - summary: Delete a deployment - description: |- - If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. - - To set a deployment as inactive, you must: - - * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. - * Mark the active deployment as inactive by adding any non-successful deployment status. - - For more information, see "[Create a deployment](https://docs.github.com/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/rest/reference/repos#create-a-deployment-status)." + category: commits + subcategory: comments + patch: + summary: Update a commit comment + description: '' tags: - repos - operationId: repos/delete-deployment + operationId: repos/update-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-deployment + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#update-a-commit-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/deployment-id" + - "$ref": "#/components/parameters/comment-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The contents of the comment + required: + - body + examples: + default: + value: + body: Nice change responses: - '204': + '200': description: Response - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + content: + application/json: + schema: + "$ref": "#/components/schemas/commit-comment" + examples: + default: + "$ref": "#/components/examples/commit-comment-2" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": - get: - summary: List deployment statuses - description: 'Users with pull access can view deployment statuses for a deployment:' + category: commits + subcategory: comments + delete: + summary: Delete a commit comment + description: '' tags: - repos - operationId: repos/list-deployment-statuses + operationId: repos/delete-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-deployment-statuses + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#delete-a-commit-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/deployment-id" + - "$ref": "#/components/parameters/comment-id" + responses: + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: commits + subcategory: comments + "/repos/{owner}/{repo}/comments/{comment_id}/reactions": + get: + summary: List reactions for a commit comment + description: List the reactions to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). + tags: + - reactions + operationId: reactions/list-for-commit-comment + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-commit-comment + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/comment-id" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a commit comment. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -21311,10 +20612,10 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/deployment-status" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/deployment-status-items" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" @@ -21323,24 +20624,23 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments + category: reactions + subcategory: post: - summary: Create a deployment status - description: |- - 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. + summary: Create reaction for a commit comment + description: Create a reaction to a [commit comment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#comments). + A response with an HTTP `200` status means that you already added the reaction + type to this commit comment. tags: - - repos - operationId: repos/create-deployment-status + - reactions + operationId: reactions/create-for-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-deployment-status + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-commit-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/deployment-id" + - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -21348,365 +20648,334 @@ paths: schema: type: object properties: - state: - type: string - description: The state of the status. Can be one of `error`, `failure`, - `inactive`, `in_progress`, `queued`, `pending`, or `success`. - When you set a transient deployment to `inactive`, the deployment - will be shown as `destroyed` in GitHub. - enum: - - error - - failure - - inactive - - in_progress - - queued - - pending - - success - target_url: - type: string - description: The target URL to associate with this status. This - URL should contain output to keep the user updated while the task - is running or serve as historical information for what happened - in the deployment. **Note:** It's recommended to use the `log_url` - parameter, which replaces `target_url`. - default: '' - log_url: - type: string - description: 'The full URL of the deployment''s output. This parameter - replaces `target_url`. We will continue to accept `target_url` - to support legacy uses, but we recommend replacing `target_url` - with `log_url`. Setting `log_url` will automatically set `target_url` - to the same value. Default: `""`' - default: '' - description: - type: string - description: A short description of the status. The maximum description - length is 140 characters. - default: '' - environment: + content: type: string - description: Name for the target deployment environment, which can - be changed when setting a deploy status. For example, `production`, - `staging`, or `qa`. + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the commit comment. enum: - - production - - staging - - qa - environment_url: - type: string - description: 'Sets the URL for accessing your environment. Default: - `""`' - default: '' - auto_inactive: - type: boolean - description: 'Adds a new `inactive` status to all prior non-transient, - non-production environment deployments with the same repository - and `environment` name as the created status''s deployment. An - `inactive` status is only added to deployments that had a `success` - state. Default: `true`' + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes required: - - state - example: - environment: production - state: success - log_url: https://example.com/deployment/42/output - description: Deployment finished successfully. + - content + examples: + default: + value: + content: heart responses: - '201': - description: Response + '200': + description: Reaction exists content: application/json: schema: - "$ref": "#/components/schemas/deployment-status" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/deployment-status" - headers: - Location: - example: https://api.github.com/repos/octocat/example/deployments/42/statuses/1 + "$ref": "#/components/examples/reaction" + '201': + description: Reaction created + content: + application/json: schema: - type: string + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": - get: - summary: Get a deployment status - description: 'Users with pull access can view a deployment status for a deployment:' + category: reactions + subcategory: + "/repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}": + delete: + summary: Delete a commit comment reaction + description: |- + **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/enterprise-server@3.6/rest/reference/repos#comments). tags: - - repos - operationId: repos/get-deployment-status + - reactions + operationId: reactions/delete-for-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-deployment-status + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-a-commit-comment-reaction parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/deployment-id" - - name: status_id - in: path - required: true - schema: - type: integer + - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/reaction-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/deployment-status" - examples: - default: - "$ref": "#/components/examples/deployment-status" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: deployments - "/repos/{owner}/{repo}/dispatches": - post: - summary: Create a repository dispatch event + category: reactions + subcategory: + "/repos/{owner}/{repo}/commits": + get: + summary: List commits description: |- - 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)." + **Signature verification object** - 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. + 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: - This endpoint requires write access to the repository by providing either: + | 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. | - - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. - - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + These are the possible values for `reason` in the `verification` object: - This input example shows how you can use the `client_payload` as a test to debug your workflow. + | 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. | tags: - repos - operationId: repos/create-dispatch-event + operationId: repos/list-commits externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-repository-dispatch-event + url: https://docs.github.com/enterprise-server@3.6/rest/commits/commits#list-commits parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - event_type - properties: - event_type: - type: string - description: A custom webhook event name. - minLength: 1 - maxLength: 100 - client_payload: - type: object - description: JSON payload with extra information about the webhook - event that your action or worklow may use. - additionalProperties: true - maxProperties: 10 - example: - event_type: on-demand-test - client_payload: - unit: false - integration: true + - name: sha + description: 'SHA or branch to start listing commits from. Default: the repository’s + default branch (usually `master`).' + in: query + required: false + schema: + type: string + - name: path + description: Only commits containing this file path will be returned. + in: query + required: false + schema: + type: string + - name: author + description: GitHub login or email address by which to filter by commit author. + in: query + required: false + schema: + type: string + - "$ref": "#/components/parameters/since" + - name: until + description: '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`.' + in: query + required: false + schema: + type: string + format: date-time + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response - '422': - "$ref": "#/components/responses/validation_failed" + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/commit" + examples: + default: + "$ref": "#/components/examples/commit-items" + headers: + Link: + "$ref": "#/components/headers/link" + '500': + "$ref": "#/components/responses/internal_error" + '400': + "$ref": "#/components/responses/bad_request" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/environments": + category: commits + "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head": get: - summary: Get all environments + summary: List branches for HEAD commit description: |- - Get all environments for a repository. + Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - 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. + Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch. tags: - repos - operationId: repos/get-all-environments + operationId: repos/list-branches-for-head-commit externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-all-environments + url: https://docs.github.com/enterprise-server@3.6/rest/commits/commits#list-branches-for-head-commit parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/commit-sha" responses: '200': description: Response content: application/json: schema: - type: object - properties: - total_count: - description: The number of environments in this repository - example: 5 - type: integer - environments: - type: array - items: - "$ref": "#/components/schemas/environment" + type: array + items: + "$ref": "#/components/schemas/branch-short" examples: default: - "$ref": "#/components/examples/environments" + "$ref": "#/components/examples/branch-short-items" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: environments - "/repos/{owner}/{repo}/environments/{environment_name}": + category: commits + "/repos/{owner}/{repo}/commits/{commit_sha}/comments": get: - summary: Get an environment - description: 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. + summary: List commit comments + description: Use the `:commit_sha` to specify the commit that will have its + comments listed. tags: - repos - operationId: repos/get-environment + operationId: repos/list-comments-for-commit externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-an-environment + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#list-commit-comments parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/commit-sha" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/environment" + type: array + items: + "$ref": "#/components/schemas/commit-comment" examples: default: - "$ref": "#/components/examples/environment" + "$ref": "#/components/examples/commit-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: environments - put: - summary: Create or update an environment + category: commits + subcategory: comments + post: + summary: Create a commit comment description: |- - 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)." + Create a comment for a commit using its `:commit_sha`. - You must authenticate using an access token with the repo scope to use this endpoint. + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - repos - operationId: repos/create-or-update-environment + operationId: repos/create-commit-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-or-update-an-environment + url: https://docs.github.com/enterprise-server@3.6/rest/commits/comments#create-a-commit-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/commit-sha" requestBody: - required: false + required: true content: application/json: schema: type: object - nullable: true properties: - wait_timer: - "$ref": "#/components/schemas/wait-timer" - reviewers: - type: array - nullable: true - description: The people or teams that may review jobs that reference - the environment. You can list up to six users or teams as reviewers. - The reviewers must have at least read access to the repository. - Only one of the required reviewers needs to approve the job for - it to proceed. - items: - type: object - properties: - type: - "$ref": "#/components/schemas/deployment-reviewer-type" - id: - type: integer - description: The id of the user or team who can review the - deployment - example: 4532992 - deployment_branch_policy: - "$ref": "#/components/schemas/deployment_branch_policy" - additionalProperties: false + body: + type: string + description: The contents of the comment. + path: + type: string + description: Relative path of the file to comment on. + position: + type: integer + description: Line index in the diff to comment on. + line: + type: integer + description: "**Deprecated**. Use **position** parameter instead. + Line number in the file to comment on." + required: + - body + examples: + default: + value: + body: Great stuff + path: file1.txt + position: 4 + line: 1 responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/environment" + "$ref": "#/components/schemas/commit-comment" examples: default: - "$ref": "#/components/examples/environment" - '422': - description: 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 - content: - application/json: + "$ref": "#/components/examples/commit-comment" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/comments/1 schema: - "$ref": "#/components/schemas/basic-error" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: environments - delete: - summary: Delete an environment - description: You must authenticate using an access token with the repo scope - to use this endpoint. - tags: - - repos - operationId: repos/delete-an-environment - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-an-environment - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/environment-name" - responses: - '204': - description: Default response + type: string + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: environments - "/repos/{owner}/{repo}/events": + category: commits + subcategory: comments + "/repos/{owner}/{repo}/commits/{commit_sha}/pulls": get: - summary: List repository events - description: '' + summary: List pull requests associated with a commit + description: Lists the merged pull request that introduced the commit to the + repository. If the commit is not present in the default branch, additionally + returns open pull requests associated with the commit. The results may include + open and closed pull requests. tags: - - activity - operationId: activity/list-repo-events + - repos + operationId: repos/list-pull-requests-associated-with-commit externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repository-events + url: https://docs.github.com/enterprise-server@3.6/rest/commits/commits#list-pull-requests-associated-with-a-commit parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/commit-sha" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -21717,386 +20986,338 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/event" + "$ref": "#/components/schemas/pull-request-simple" + examples: + default: + "$ref": "#/components/examples/pull-request-simple-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: activity - subcategory: events - "/repos/{owner}/{repo}/forks": + category: commits + "/repos/{owner}/{repo}/commits/{ref}": get: - summary: List forks - description: '' - tags: - - repos - operationId: repos/list-forks - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-forks - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: sort - description: The sort order. Can be either `newest`, `oldest`, or `stargazers`. - in: query - required: false + summary: Get a commit + description: |- + 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/enterprise-server@3.6/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/enterprise-server@3.6/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. | + tags: + - repos + operationId: repos/get-commit + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/commits/commits#get-a-commit + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" + - name: ref + description: ref parameter + in: path + required: true schema: type: string - enum: - - newest - - oldest - - stargazers - - watchers - default: newest - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + x-multi-segment: true responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/commit" examples: default: - "$ref": "#/components/examples/minimal-repository-items-2" - headers: - Link: - "$ref": "#/components/headers/link" - '400': - "$ref": "#/components/responses/bad_request" + "$ref": "#/components/examples/commit" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: forks - post: - summary: Create a fork + category: commits + "/repos/{owner}/{repo}/commits/{ref}/check-runs": + get: + summary: List check runs for a Git reference description: |- - Create a fork for the authenticated user. + **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. - **Note**: Forking a Repository happens asynchronously. You may have to wait a short period of time before you can access the git objects. If this takes longer than 5 minutes, be sure to contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api). + 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. tags: - - repos - operationId: repos/create-fork + - checks + operationId: checks/list-for-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-fork + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#list-check-runs-for-a-git-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: + - name: ref + description: ref parameter + in: path + required: true + schema: + type: string + x-multi-segment: true + - "$ref": "#/components/parameters/check-name" + - "$ref": "#/components/parameters/status" + - name: filter + description: Filters check runs by their `completed_at` timestamp. `latest` + returns the most recent check runs. + in: query required: false - content: - application/json: - schema: - type: object - nullable: true - properties: - organization: - type: string - description: Optional parameter to specify the organization name - if forking into an organization. + schema: + type: string + enum: + - latest + - all + default: latest + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - name: app_id + in: query + required: false + schema: + type: integer responses: - '202': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/full-repository" + type: object + required: + - total_count + - check_runs + properties: + total_count: + type: integer + check_runs: + type: array + items: + "$ref": "#/components/schemas/check-run" examples: default: - "$ref": "#/components/examples/full-repository" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/check-run-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: forks - "/repos/{owner}/{repo}/git/blobs": - post: - summary: Create a blob - description: '' + category: checks + subcategory: runs + "/repos/{owner}/{repo}/commits/{ref}/check-suites": + get: + summary: List check suites for a Git reference + description: |- + **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. tags: - - git - operationId: git/create-blob + - checks + operationId: checks/list-suites-for-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#create-a-blob + url: https://docs.github.com/enterprise-server@3.6/rest/reference/checks#list-check-suites-for-a-git-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: + - name: ref + description: ref parameter + in: path required: true - content: - application/json: - schema: - type: object - properties: - content: - type: string - description: The new blob's content. - encoding: - type: string - description: The encoding used for `content`. Currently, `"utf-8"` - and `"base64"` are supported. - default: utf-8 - required: - - content - example: - content: Content of the blob - encoding: utf-8 + schema: + type: string + x-multi-segment: true + - name: app_id + description: Filters check suites by GitHub App `id`. + in: query + required: false + schema: + type: integer + example: 1 + - "$ref": "#/components/parameters/check-name" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/short-blob" + type: object + required: + - total_count + - check_suites + properties: + total_count: + type: integer + check_suites: + type: array + items: + "$ref": "#/components/schemas/check-suite" examples: default: - "$ref": "#/components/examples/short-blob" + "$ref": "#/components/examples/check-suite-paginated" headers: - Location: - example: https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15 - schema: - type: string - '404': - "$ref": "#/components/responses/not_found" - '409': - "$ref": "#/components/responses/conflict" - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: blobs - "/repos/{owner}/{repo}/git/blobs/{file_sha}": + category: checks + subcategory: suites + "/repos/{owner}/{repo}/commits/{ref}/status": get: - summary: Get a blob + summary: Get the combined status for a specific reference description: |- - The `content` in the response will always be Base64 encoded. + 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. - _Note_: This API supports blobs up to 100 megabytes in size. + + 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` tags: - - git - operationId: git/get-blob + - repos + operationId: repos/get-combined-status-for-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#get-a-blob + url: https://docs.github.com/enterprise-server@3.6/rest/commits/statuses#get-the-combined-status-for-a-specific-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: file_sha + - name: ref + description: ref parameter in: path required: true schema: type: string + x-multi-segment: true + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/blob" + "$ref": "#/components/schemas/combined-commit-status" examples: default: - "$ref": "#/components/examples/blob" + "$ref": "#/components/examples/combined-commit-status" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: blobs - "/repos/{owner}/{repo}/git/commits": - post: - summary: Create a commit + category: commits + subcategory: statuses + "/repos/{owner}/{repo}/commits/{ref}/statuses": + get: + summary: List commit statuses for a reference description: |- - 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: + 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. - | 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. | + This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`. tags: - - git - operationId: git/create-commit + - repos + operationId: repos/list-commit-statuses-for-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#create-a-commit + url: https://docs.github.com/enterprise-server@3.6/rest/commits/statuses#list-commit-statuses-for-a-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: + - name: ref + description: ref parameter + in: path required: true - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: The commit message - tree: - type: string - description: The SHA of the tree object this commit points to - parents: - type: array - description: The SHAs of the commits that were the parents of this - commit. If omitted or empty, the commit will be written as a root - commit. For a single parent, an array of one SHA should be provided; - for a merge commit, an array of more than one should be provided. - items: - type: string - author: - type: object - description: Information about the author of the commit. By default, - the `author` will be the authenticated user and the current date. - See the `author` and `committer` object below for details. - properties: - name: - type: string - description: The name of the author (or committer) of the commit - email: - type: string - description: The email of the author (or committer) of the commit - date: - type: string - format: date-time - description: 'Indicates when this commit was authored (or committed). - This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - format: `YYYY-MM-DDTHH:MM:SSZ`.' - required: - - name - - email - committer: - type: object - description: Information about the person who is making the commit. - By default, `committer` will use the information set in `author`. - See the `author` and `committer` object below for details. - properties: - name: - type: string - description: The name of the author (or committer) of the commit - email: - type: string - description: The email of the author (or committer) of the commit - date: - type: string - format: date-time - description: 'Indicates when this commit was authored (or committed). - This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - format: `YYYY-MM-DDTHH:MM:SSZ`.' - signature: - type: string - description: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) - of the commit. GitHub adds the signature to the `gpgsig` header - of the created commit. For a commit signature to be verifiable - by Git or GitHub, it must be an ASCII-armored detached PGP signature - over the string commit as it would be written to the object database. - To pass a `signature` parameter, you need to first manually create - a valid PGP signature, which can be complicated. You may find - it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) - to create signed commits. - required: - - message - - tree - example: - message: my commit message - author: - name: Mona Octocat - email: octocat@github.com - date: '2008-07-09T16:13:30+12:00' - parents: - - 7d1b31e74ee336d15cbd21741bc88a537ed063a0 - tree: 827efc6d56897b048c772eb4087f854f46256132 - signature: | - -----BEGIN PGP SIGNATURE----- - - iQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv - 7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI - DkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n - 2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA - OQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k - nrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU - +NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB - jHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ - 3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+ - UpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr - X11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp - eSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc= - =5Io4 - -----END PGP SIGNATURE----- + schema: + type: string + x-multi-segment: true + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-commit" + type: array + items: + "$ref": "#/components/schemas/status" examples: default: - "$ref": "#/components/examples/git-commit" + "$ref": "#/components/examples/status-items" headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + Link: + "$ref": "#/components/headers/link" + '301': + "$ref": "#/components/responses/moved_permanently" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: commits - "/repos/{owner}/{repo}/git/commits/{commit_sha}": + category: commits + subcategory: statuses + "/repos/{owner}/{repo}/compare/{basehead}": get: - summary: Get a commit + summary: Compare two commits description: |- - Gets a Git [commit object](https://git-scm.com/book/en/v1/Git-Internals-Git-Objects#Commit-Objects). + The `basehead` param is comprised of two parts separated by triple dots: `{base}...{head}`. Both must be branch names in `repo`. To compare branches across other repositories in the same network as `repo`, use the format `:branch`. + + The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + + The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file. + + **Working with large comparisons** + + To process a response with a large number of commits, you can use (`per_page` or `page`) to paginate the results. When using paging, the list of changed files is only returned with page 1, but includes all changed files for the entire comparison. For more information on working with pagination, see "[Traversing with pagination](/rest/guides/traversing-with-pagination)." + + When calling this API without any paging parameters (`per_page` or `page`), the returned list is limited to 250 commits and the last commit in the list is the most recent of the entire comparison. When a paging parameter is specified, the first commit in the returned list of each page is the earliest. **Signature verification object** @@ -22127,136 +21348,164 @@ paths: | `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. | tags: - - git - operationId: git/get-commit + - repos + operationId: repos/compare-commits externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#get-a-commit + url: https://docs.github.com/enterprise-server@3.6/rest/commits/commits#compare-two-commits parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/commit-sha" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" + - name: basehead + description: The base branch and head branch to compare. This parameter expects + the format `{base}...{head}`. + in: path + required: true + x-multi-segment: true + schema: + type: string responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-commit" + "$ref": "#/components/schemas/commit-comparison" examples: default: - "$ref": "#/components/examples/git-commit-2" + "$ref": "#/components/examples/commit-comparison" '404': "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: commits - "/repos/{owner}/{repo}/git/matching-refs/{ref}": + category: commits + "/repos/{owner}/{repo}/contents/{path}": get: - summary: List matching references - description: |- - 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`. + summary: Get repository content + description: "Gets the contents of a file or directory in a repository. Specify + the file path or directory in `:path`. If you omit\n`:path`, you will receive + the contents of the repository's root directory. See the description below + regarding what the API response includes for directories. \n\nFiles and symlinks + support [a custom media type](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) + for\nretrieving the raw content or rendered HTML (when supported). All content + types support [a custom media\ntype](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) + to ensure the content is returned in a consistent\nobject format.\n\n**Notes**:\n* + \ To get a repository's contents recursively, you can [recursively get the + tree](https://docs.github.com/enterprise-server@3.6/rest/reference/git#trees).\n* + \ This API has an upper limit of 1,000 files for a directory. If you need + to retrieve more files, use the [Git Trees\nAPI](https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree).\n + * Download URLs expire and are meant to be used just once. To ensure the + download URL does not expire, please use the contents API to obtain a fresh + download URL for each download.\n#### Size limits\nIf the requested file's + size is:\n* 1 MB or smaller: All features of this endpoint are supported.\n* + Between 1-100 MB: Only the `raw` or `object` [custom media types](https://docs.github.com/enterprise-server@3.6/rest/repos/contents#custom-media-types-for-repository-contents) + are supported. Both will work as normal, except that when using the `object` + media type, the `content` field will be an empty string and the `encoding` + field will be `\"none\"`. To get the contents of these larger files, use the + `raw` media type.\n * Greater than 100 MB: This endpoint is not supported.\n\n#### + If the content is a directory\nThe response will be an array of objects, one + object for each item in the directory.\nWhen listing the contents of a directory, + submodules have their \"type\" specified as \"file\". Logically, the value\n_should_ + be \"submodule\". This behavior exists in API v3 [for backwards compatibility + purposes](https://git.io/v1YCW).\nIn the next major version of the API, the + type will be returned as \"submodule\".\n\n#### If the content is a symlink + \nIf the requested `:path` points to a symlink, and the symlink's target is + a normal file in the repository, then the\nAPI responds with the content of + the file (in the format shown in the example. Otherwise, the API responds + with an object \ndescribing the symlink itself.\n\n#### If the content is + a submodule\nThe `submodule_git_url` identifies the location of the submodule + repository, and the `sha` identifies a specific\ncommit within the submodule + repository. Git uses the given URL when cloning the submodule repository, + and checks out\nthe submodule at that specific commit.\n\nIf the submodule + repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`) + and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null + values." tags: - - git - operationId: git/list-matching-refs + - repos + operationId: repos/get-content externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#list-matching-references + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter + - name: path + description: path parameter in: path required: true schema: type: string x-multi-segment: true - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - name: ref + description: 'The name of the commit/branch/tag. Default: the repository’s + default branch (usually `master`)' + in: query + required: false + schema: + type: string responses: '200': description: Response content: + application/vnd.github.object: + schema: + "$ref": "#/components/schemas/content-tree" application/json: schema: - type: array - items: - "$ref": "#/components/schemas/git-ref" - examples: - default: - "$ref": "#/components/examples/git-ref-items" - headers: - Link: - "$ref": "#/components/headers/link" + oneOf: + - "$ref": "#/components/schemas/content-directory" + - "$ref": "#/components/schemas/content-file" + - "$ref": "#/components/schemas/content-symlink" + - "$ref": "#/components/schemas/content-submodule" + examples: + response-if-content-is-a-file: + "$ref": "#/components/examples/content-file-response-if-content-is-a-file" + response-if-content-is-a-directory: + "$ref": "#/components/examples/content-file-response-if-content-is-a-directory" + response-if-content-is-a-symlink: + "$ref": "#/components/examples/content-file-response-if-content-is-a-symlink" + response-if-content-is-a-submodule: + "$ref": "#/components/examples/content-file-response-if-content-is-a-submodule" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '302': + "$ref": "#/components/responses/found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: refs - "/repos/{owner}/{repo}/git/ref/{ref}": - get: - summary: Get a reference + category: repos + subcategory: contents + put: + summary: Create or update file contents description: |- - 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. + Creates a new file or replaces an existing file in a repository. You must authenticate using an access token with the `workflow` scope to use this endpoint. - **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)". + **Note:** If you use this endpoint and the "[Delete a file](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#delete-file)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. tags: - - git - operationId: git/get-ref + - repos + operationId: repos/create-or-update-file-contents externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#get-a-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-or-update-file-contents parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter + - name: path + description: path parameter in: path required: true schema: type: string x-multi-segment: true - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/git-ref" - examples: - default: - "$ref": "#/components/examples/git-ref" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: git - subcategory: refs - "/repos/{owner}/{repo}/git/refs": - post: - summary: Create a reference - description: 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. - tags: - - git - operationId: git/create-ref - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/git#create-a-reference - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" requestBody: required: true content: @@ -22264,60 +21513,132 @@ paths: schema: type: object properties: - ref: + message: type: string - description: 'The name of the fully qualified reference (ie: `refs/heads/master`). - If it doesn''t start with ''refs'' and have at least two slashes, - it will be rejected.' + description: The commit message. + content: + type: string + description: The new file content, using Base64 encoding. sha: type: string - description: The SHA1 value for this reference. - key: + description: "**Required if you are updating a file**. The blob + SHA of the file being replaced." + branch: type: string - example: '"refs/heads/newbranch"' + description: 'The branch name. Default: the repository’s default + branch (usually `master`)' + committer: + type: object + description: 'The person that committed the file. Default: the authenticated + user.' + properties: + name: + type: string + description: The name of the author or committer of the commit. + You'll receive a `422` status code if `name` is omitted. + email: + type: string + description: The email of the author or committer of the commit. + You'll receive a `422` status code if `email` is omitted. + date: + type: string + example: '"2013-01-05T13:13:22+05:00"' + required: + - name + - email + author: + type: object + description: 'The author of the file. Default: The `committer` or + the authenticated user if you omit `committer`.' + properties: + name: + type: string + description: The name of the author or committer of the commit. + You'll receive a `422` status code if `name` is omitted. + email: + type: string + description: The email of the author or committer of the commit. + You'll receive a `422` status code if `email` is omitted. + date: + type: string + example: '"2013-01-15T17:13:22+05:00"' + required: + - name + - email required: - - ref - - sha - example: - ref: refs/heads/featureA - sha: aa218f56b14c9653891f9e74264a383fa43fefbd + - message + - content + examples: + example-for-creating-a-file: + summary: Example for creating a file + value: + message: my commit message + committer: + name: Monalisa Octocat + email: octocat@github.com + content: bXkgbmV3IGZpbGUgY29udGVudHM= + example-for-updating-a-file: + summary: Example for updating a file + value: + message: a new commit message + committer: + name: Monalisa Octocat + email: octocat@github.com + content: bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz + sha: 95b966ae1c166bd92f8ae7d1c313e738c731dfc3 responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-ref" + "$ref": "#/components/schemas/file-commit" examples: - default: - "$ref": "#/components/examples/git-ref" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA + example-for-updating-a-file: + "$ref": "#/components/examples/file-commit-example-for-updating-a-file" + '201': + description: Response + content: + application/json: schema: - type: string + "$ref": "#/components/schemas/file-commit" + examples: + example-for-creating-a-file: + "$ref": "#/components/examples/file-commit-example-for-creating-a-file" + '404': + "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: refs - "/repos/{owner}/{repo}/git/refs/{ref}": - patch: - summary: Update a reference - description: '' + category: repos + subcategory: contents + delete: + summary: Delete a file + description: |- + 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. + + **Note:** If you use this endpoint and the "[Create or update file contents](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-or-update-file-contents)" endpoint in parallel, the concurrent requests will conflict and you will receive errors. You must use these endpoints serially instead. tags: - - git - operationId: git/update-ref + - repos + operationId: repos/delete-file externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#update-a-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-file parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter + - name: path + description: path parameter in: path required: true schema: @@ -22330,426 +21651,470 @@ paths: schema: type: object properties: + message: + type: string + description: The commit message. sha: type: string - description: The SHA1 value to set this reference to - force: - type: boolean - description: Indicates whether to force the update or to make sure - the update is a fast-forward update. Leaving this out or setting - it to `false` will make sure you're not overwriting work. - default: false + description: The blob SHA of the file being deleted. + branch: + type: string + description: 'The branch name. Default: the repository’s default + branch (usually `master`)' + committer: + type: object + description: object containing information about the committer. + properties: + name: + type: string + description: The name of the author (or committer) of the commit + email: + type: string + description: The email of the author (or committer) of the commit + author: + type: object + description: object containing information about the author. + properties: + name: + type: string + description: The name of the author (or committer) of the commit + email: + type: string + description: The email of the author (or committer) of the commit required: + - message - sha - example: - sha: aa218f56b14c9653891f9e74264a383fa43fefbd - force: true + examples: + default: + value: + message: my commit message + committer: + name: Monalisa Octocat + email: octocat@github.com + sha: 329688480d39049927147c162b9d2deaf885005f responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-ref" + "$ref": "#/components/schemas/file-commit" examples: default: - "$ref": "#/components/examples/git-ref" + "$ref": "#/components/examples/file-commit" '422': "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: refs - delete: - summary: Delete a reference - description: '' + category: repos + subcategory: contents + "/repos/{owner}/{repo}/contributors": + get: + summary: List repository contributors + description: |- + 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. tags: - - git - operationId: git/delete-ref + - repos + operationId: repos/list-contributors externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#delete-a-reference + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-contributors parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: ref parameter - in: path - required: true + - name: anon + description: Set to `1` or `true` to include anonymous contributors in results. + in: query + required: false schema: type: string - x-multi-segment: true + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: + '200': + description: if repository contains content + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/contributor" + examples: + response-if-repository-contains-content: + "$ref": "#/components/examples/contributor-items-response-if-repository-contains-content" + headers: + Link: + "$ref": "#/components/headers/link" '204': - description: Response - '422': - "$ref": "#/components/responses/validation_failed" + description: Response if repository is empty + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: refs - "/repos/{owner}/{repo}/git/tags": - post: - summary: Create a tag object - description: |- - 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. | + category: repos + subcategory: + "/repos/{owner}/{repo}/dependabot/secrets": + get: + summary: List repository secrets + description: Lists all secrets available in a repository without revealing their + encrypted values. You must authenticate using an access token with the `repo` + scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` + repository permission to use this endpoint. tags: - - git - operationId: git/create-tag + - dependabot + operationId: dependabot/list-repo-secrets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#create-a-tag-object + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#list-repository-secrets parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - tag: - type: string - description: The tag's name. This is typically a version (e.g., - "v0.0.1"). - message: - type: string - description: The tag message. - object: - type: string - description: The SHA of the git object this is tagging. - type: - type: string - description: The type of the object we're tagging. Normally this - is a `commit` but it can also be a `tree` or a `blob`. - enum: - - commit - - tree - - blob - tagger: - type: object - description: An object with information about the individual creating - the tag. - properties: - name: - type: string - description: The name of the author of the tag - email: - type: string - description: The email of the author of the tag - date: - type: string - format: date-time - description: 'When this object was tagged. This is a timestamp - in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: - `YYYY-MM-DDTHH:MM:SSZ`.' - required: - - name - - email - required: - - tag - - message - - object - - type - example: - tag: v0.0.1 - message: initial version - object: c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c - type: commit - tagger: - name: Monalisa Octocat - email: octocat@github.com - date: '2011-06-17T14:53:35-07:00' + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-tag" + type: object + required: + - total_count + - secrets + properties: + total_count: + type: integer + secrets: + type: array + items: + "$ref": "#/components/schemas/dependabot-secret" examples: default: - "$ref": "#/components/examples/git-tag" + "$ref": "#/components/examples/dependabot-secret-paginated" headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: tags - "/repos/{owner}/{repo}/git/tags/{tag_sha}": + category: dependabot + subcategory: secrets + "/repos/{owner}/{repo}/dependabot/secrets/public-key": get: - summary: Get a tag - description: |- - **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. | + summary: Get a repository public key + description: Gets your public key, which you need to encrypt secrets. You need + to encrypt a secret before you can create or update secrets. Anyone with read + access to the repository can use this endpoint. If the repository is private + you must use an access token with the `repo` scope. GitHub Apps must have + the `dependabot_secrets` repository permission to use this endpoint. tags: - - git - operationId: git/get-tag + - dependabot + operationId: dependabot/get-repo-public-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#get-a-tag + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: tag_sha - in: path - required: true - schema: - type: string responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-tag" + "$ref": "#/components/schemas/dependabot-public-key" examples: default: - "$ref": "#/components/examples/git-tag" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/dependabot-public-key" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: tags - "/repos/{owner}/{repo}/git/trees": - post: - summary: Create a tree - description: |- - 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)." + category: dependabot + subcategory: secrets + "/repos/{owner}/{repo}/dependabot/secrets/{secret_name}": + get: + summary: Get a repository secret + description: Gets a single repository secret without revealing its encrypted + value. You must authenticate using an access token with the `repo` scope to + use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + permission to use this endpoint. tags: - - git - operationId: git/create-tree + - dependabot + operationId: dependabot/get-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#create-a-tree + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-secret parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - tree: - type: array - description: Objects (of `path`, `mode`, `type`, and `sha`) specifying - a tree structure. - items: - type: object - properties: - path: - type: string - description: The file referenced in the tree. - mode: - type: string - description: The file mode; one of `100644` for file (blob), - `100755` for executable (blob), `040000` for subdirectory - (tree), `160000` for submodule (commit), or `120000` for - a blob that specifies the path of a symlink. - enum: - - '100644' - - '100755' - - '040000' - - '160000' - - '120000' - type: - type: string - description: Either `blob`, `tree`, or `commit`. - enum: - - blob - - tree - - commit - sha: - type: string - description: "The SHA1 checksum ID of the object in the tree. - Also called `tree.sha`. If the value is `null` then the - file will be deleted. \n \n**Note:** Use either `tree.sha` - or `content` to specify the contents of the entry. Using - both `tree.sha` and `content` will return an error." - nullable: true - content: - type: string - description: "The content you want this file to have. GitHub - will write this blob out and use that SHA for this entry. - Use either this, or `tree.sha`. \n \n**Note:** Use either - `tree.sha` or `content` to specify the contents of the entry. - Using both `tree.sha` and `content` will return an error." - base_tree: - type: string - description: | - The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. - If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. - required: - - tree - example: - base_tree: 9fb037999f264ba9a7fc6274d15fa3ae2ab98312 - tree: - - path: file.rb - mode: '100644' - type: blob - sha: 44b4fc6d56897b048c772eb4087f854f46256132 + - "$ref": "#/components/parameters/secret-name" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-tree" + "$ref": "#/components/schemas/dependabot-secret" examples: default: - "$ref": "#/components/examples/git-tree" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/dependabot-secret" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: git - subcategory: trees - "/repos/{owner}/{repo}/git/trees/{tree_sha}": - get: - summary: Get a tree + category: dependabot + subcategory: secrets + put: + summary: Create or update a repository secret description: |- - Returns a single tree using the SHA1 value for that tree. + Creates or updates a repository secret with an encrypted value. Encrypt your secret using + [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + token with the `repo` scope to use this endpoint. GitHub Apps must have the `dependabot_secrets` repository + permission to use this endpoint. - 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. + #### Example encrypting a secret using Node.js + + Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + + ``` + const sodium = require('tweetsodium'); + + const key = "base64-encoded-public-key"; + const value = "plain-text-secret"; + + // Convert the message and key to Uint8Array's (Buffer implements that interface) + const messageBytes = Buffer.from(value); + const keyBytes = Buffer.from(key, 'base64'); + + // Encrypt using LibSodium. + const encryptedBytes = sodium.seal(messageBytes, keyBytes); + + // Base64 the encrypted secret + const encrypted = Buffer.from(encryptedBytes).toString('base64'); + + console.log(encrypted); + ``` + + + #### Example encrypting a secret using Python + + Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + + ``` + from base64 import b64encode + from nacl import encoding, public + + def encrypt(public_key: str, secret_value: str) -> str: + """Encrypt a Unicode string using the public key.""" + public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + sealed_box = public.SealedBox(public_key) + encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + return b64encode(encrypted).decode("utf-8") + ``` + + #### Example encrypting a secret using C# + + Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + + ``` + var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); + + var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + + Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); + ``` + + #### Example encrypting a secret using Ruby + + Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. + + ```ruby + require "rbnacl" + require "base64" + + key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") + public_key = RbNaCl::PublicKey.new(key) + + box = RbNaCl::Boxes::Sealed.from_public_key(public_key) + encrypted_secret = box.encrypt("my_secret") + + # Print the base64 encoded secret + puts Base64.strict_encode64(encrypted_secret) + ``` tags: - - git - operationId: git/get-tree + - dependabot + operationId: dependabot/create-or-update-repo-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/git#get-a-tree + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#create-or-update-a-repository-secret parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: tree_sha + - "$ref": "#/components/parameters/secret-name" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + encrypted_value: + type: string + description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + using the public key retrieved from the [Get a repository public + key](https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#get-a-repository-public-key) + endpoint. + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" + key_id: + type: string + description: ID of the key you used to encrypt the secret. + examples: + default: + value: + encrypted_value: c2VjcmV0 + key_id: '012345678912345678' + responses: + '201': + description: Response when creating a secret + content: + application/json: + schema: + "$ref": "#/components/schemas/empty-object" + examples: + default: + value: + '204': + description: Response when updating a secret + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + delete: + summary: Delete a repository secret + description: Deletes a secret in a repository using the secret name. You must + authenticate using an access token with the `repo` scope to use this endpoint. + GitHub Apps must have the `dependabot_secrets` repository permission to use + this endpoint. + tags: + - dependabot + operationId: dependabot/delete-repo-secret + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependabot#delete-a-repository-secret + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/secret-name" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: dependabot + subcategory: secrets + "/repos/{owner}/{repo}/dependency-graph/compare/{basehead}": + get: + summary: Get a diff of the dependencies between commits + description: Gets the diff of the dependency changes between two commits of + a repository, based on the changes to the dependency manifests made in those + commits. + tags: + - dependency-graph + operationId: dependency-graph/diff-range + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/dependency-graph#get-a-diff-of-the-dependencies-between-commits + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: basehead + description: The base and head Git revisions to compare. The Git revisions + will be resolved to commit SHAs. Named revisions will be resolved to their + corresponding HEAD commits, and an appropriate merge base will be determined. + This parameter expects the format `{base}...{head}`. in: path required: true schema: type: string - x-multi-segment: true - - name: recursive - description: '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.' - in: query - required: false - schema: - type: string + - "$ref": "#/components/parameters/manifest-path" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/git-tree" + "$ref": "#/components/schemas/dependency-graph-diff" examples: - default-response: - "$ref": "#/components/examples/git-tree-default-response" - response-recursively-retrieving-a-tree: - "$ref": "#/components/examples/git-tree-response-recursively-retrieving-a-tree" - '422': - "$ref": "#/components/responses/validation_failed" + default: + "$ref": "#/components/examples/diff-range-response" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: git - subcategory: trees - "/repos/{owner}/{repo}/hooks": + category: dependency-graph + subcategory: dependency-review + "/repos/{owner}/{repo}/deployments": get: - summary: List repository webhooks - description: '' + summary: List deployments + description: 'Simple filtering of deployments is available via query parameters:' tags: - repos - operationId: repos/list-webhooks + operationId: repos/list-deployments externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-webhooks + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-deployments parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: sha + description: The SHA recorded at creation time. + in: query + required: false + schema: + type: string + default: none + - name: ref + description: The name of the ref. This can be a branch, tag, or SHA. + in: query + required: false + schema: + type: string + default: none + - name: task + description: The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`). + in: query + required: false + schema: + type: string + default: none + - name: environment + description: The name of the environment that was deployed to (e.g., `staging` + or `production`). + in: query + required: false + schema: + type: string + default: none + nullable: true - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -22760,1039 +22125,933 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/hook" + "$ref": "#/components/schemas/deployment" examples: default: - "$ref": "#/components/examples/hook-items" + "$ref": "#/components/examples/deployment-items" headers: Link: "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks + subcategory: deployments post: - summary: Create a repository webhook + summary: Create a deployment description: |- - 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. + Deployments offer a few configurable parameters with certain defaults. + + The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server 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/enterprise-server@3.6/rest/commits/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`. tags: - repos - operationId: repos/create-webhook + operationId: repos/create-deployment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-repository-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" requestBody: - required: false + required: true content: application/json: schema: type: object - nullable: true properties: - name: + ref: type: string - description: 'Use `web` to create a webhook. Default: `web`. This - parameter only accepts the value `web`.' - config: - type: object - description: Key/value pairs to provide settings for this webhook. - [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - token: - type: string - example: '"abc"' - digest: - type: string - example: '"sha256"' - events: + description: The ref to deploy. This can be a branch, tag, or SHA. + task: + type: string + description: Specifies a task to execute (e.g., `deploy` or `deploy:migrations`). + default: deploy + auto_merge: + type: boolean + description: Attempts to automatically merge the default branch + into the requested ref, if it's behind the default branch. + default: true + required_contexts: type: array - description: Determines what [events](https://docs.github.com/webhooks/event-payloads) - the hook is triggered for. - default: - - push + description: The [status](https://docs.github.com/enterprise-server@3.6/rest/commits/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. items: type: string - active: + payload: + oneOf: + - type: object + additionalProperties: true + - type: string + description: JSON payload with extra information about the deployment. + default: '' + environment: + type: string + description: Name for the target deployment environment (e.g., `production`, + `staging`, `qa`). + default: production + description: + type: string + description: Short description of the deployment. + default: '' + nullable: true + transient_environment: type: boolean - description: Determines if notifications are sent when the webhook - is triggered. Set to `true` to send notifications. - default: true - additionalProperties: false - example: - name: web - active: true - events: - - push - - pull_request - config: - url: https://example.com/webhook - content_type: json - insecure_ssl: '0' + description: 'Specifies if the given environment is specific to + the deployment and will no longer exist at some point in the future. + Default: `false`' + default: false + production_environment: + type: boolean + description: 'Specifies if the given environment is one that end-users + directly interact with. Default: `true` when `environment` is + `production` and `false` otherwise.' + required: + - ref + examples: + simple-example: + summary: Simple example + value: + ref: topic-branch + payload: '{ "deploy": "migrate" }' + description: Deploy request from hubot + advanced-example: + summary: Advanced example + value: + ref: topic-branch + auto_merge: false + payload: '{ "deploy": "migrate" }' + description: Deploy request from hubot + required_contexts: + - ci/janky + - security/brakeman responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/hook" + "$ref": "#/components/schemas/deployment" examples: - default: - "$ref": "#/components/examples/hook" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/hooks/12345678 + simple-example: + "$ref": "#/components/examples/deployment-simple-example" + '202': + description: Merged branch response + content: + application/json: schema: - type: string - '404': - "$ref": "#/components/responses/not_found" + type: object + properties: + message: + type: string + examples: + merged-branch-response: + value: + message: Auto-merged master into topic-branch on deployment. + '409': + description: Conflict when there is a merge conflict or the commit's status + checks failed '422': "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}": + subcategory: deployments + "/repos/{owner}/{repo}/deployments/{deployment_id}": get: - summary: Get a repository webhook - description: 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)." + summary: Get a deployment + description: '' tags: - repos - operationId: repos/get-webhook + operationId: repos/get-deployment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-repository-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-deployment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/deployment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/hook" + "$ref": "#/components/schemas/deployment" examples: default: - "$ref": "#/components/examples/hook" + "$ref": "#/components/examples/deployment" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - patch: - summary: Update a repository webhook - description: 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)." - tags: - - repos - operationId: repos/update-webhook - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-repository-webhook - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - config: - type: object - description: Key/value pairs to provide settings for this webhook. - [These are defined below](https://docs.github.com/rest/reference/repos#create-hook-config-params). - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - address: - type: string - example: '"bar@example.com"' - room: - type: string - example: '"The Serious Room"' - required: - - url - events: - type: array - description: Determines what [events](https://docs.github.com/webhooks/event-payloads) - the hook is triggered for. This replaces the entire array of events. - default: - - push - items: - type: string - add_events: - type: array - description: Determines a list of events to be added to the list - of events that the Hook triggers for. - items: - type: string - remove_events: - type: array - description: Determines a list of events to be removed from the - list of events that the Hook triggers for. - items: - type: string - active: - type: boolean - description: Determines if notifications are sent when the webhook - is triggered. Set to `true` to send notifications. - default: true - example: - active: true - add_events: - - pull_request - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/hook" - examples: - default: - "$ref": "#/components/examples/hook" - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: webhooks + subcategory: deployments delete: - summary: Delete a repository webhook - description: '' + summary: Delete a deployment + description: |- + If the repository only has one deployment, you can delete the deployment regardless of its status. If the repository has more than one deployment, you can only delete inactive deployments. This ensures that repositories with multiple deployments will always have an active deployment. Anyone with `repo` or `repo_deployment` scopes can delete a deployment. + + To set a deployment as inactive, you must: + + * Create a new deployment that is active so that the system has a record of the current state, then delete the previously active deployment. + * Mark the active deployment as inactive by adding any non-successful deployment status. + + For more information, see "[Create a deployment](https://docs.github.com/enterprise-server@3.6/rest/reference/repos/#create-a-deployment)" and "[Create a deployment status](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status)." tags: - repos - operationId: repos/delete-webhook + operationId: repos/delete-deployment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-repository-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-deployment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/deployment-id" responses: '204': description: Response '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/config": + subcategory: deployments + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses": get: - summary: Get a webhook configuration for a repository - description: |- - 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. + summary: List deployment statuses + description: 'Users with pull access can view deployment statuses for a deployment:' tags: - repos - operationId: repos/get-webhook-config-for-repo + operationId: repos/list-deployment-statuses externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-webhook-configuration-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-deployment-statuses parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/deployment-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/webhook-config" + type: array + items: + "$ref": "#/components/schemas/deployment-status" examples: default: - "$ref": "#/components/examples/webhook-config" + "$ref": "#/components/examples/deployment-status-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - patch: - summary: Update a webhook configuration for a repository + subcategory: deployments + post: + summary: Create a deployment status description: |- - 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)." + Users with `push` access can create deployment statuses for a given deployment. - Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. + 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. tags: - repos - operationId: repos/update-webhook-config-for-repo + operationId: repos/create-deployment-status externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-webhook-configuration-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deployment-status parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/deployment-id" requestBody: - required: false + required: true content: application/json: schema: type: object - additionalProperties: false properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - example: - content_type: json - insecure_ssl: '0' - secret: "********" - url: https://example.com/webhook + state: + type: string + description: The state of the status. When you set a transient deployment + to `inactive`, the deployment will be shown as `destroyed` in + GitHub. + enum: + - error + - failure + - inactive + - in_progress + - queued + - pending + - success + target_url: + type: string + description: The target URL to associate with this status. This + URL should contain output to keep the user updated while the task + is running or serve as historical information for what happened + in the deployment. **Note:** It's recommended to use the `log_url` + parameter, which replaces `target_url`. + default: '' + log_url: + type: string + description: 'The full URL of the deployment''s output. This parameter + replaces `target_url`. We will continue to accept `target_url` + to support legacy uses, but we recommend replacing `target_url` + with `log_url`. Setting `log_url` will automatically set `target_url` + to the same value. Default: `""`' + default: '' + description: + type: string + description: A short description of the status. The maximum description + length is 140 characters. + default: '' + environment: + type: string + description: Name for the target deployment environment, which can + be changed when setting a deploy status. For example, `production`, + `staging`, or `qa`. + enum: + - production + - staging + - qa + environment_url: + type: string + description: 'Sets the URL for accessing your environment. Default: + `""`' + default: '' + auto_inactive: + type: boolean + description: 'Adds a new `inactive` status to all prior non-transient, + non-production environment deployments with the same repository + and `environment` name as the created status''s deployment. An + `inactive` status is only added to deployments that had a `success` + state. Default: `true`' + required: + - state + examples: + default: + value: + environment: production + state: success + log_url: https://example.com/deployment/42/output + description: Deployment finished successfully. responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/webhook-config" + "$ref": "#/components/schemas/deployment-status" examples: default: - "$ref": "#/components/examples/webhook-config" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": - get: - summary: List deliveries for a repository webhook - description: Returns a list of webhook deliveries for a webhook configured in - a repository. - tags: - - repos - operationId: repos/list-webhook-deliveries - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-deliveries-for-a-repository-webhook - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/cursor" - responses: - '200': - description: Response - content: - application/json: + "$ref": "#/components/examples/deployment-status" + headers: + Location: + example: https://api.github.com/repos/octocat/example/deployments/42/statuses/1 schema: - type: array - items: - "$ref": "#/components/schemas/hook-delivery-item" - examples: - default: - "$ref": "#/components/examples/hook-delivery-items" - '400': - "$ref": "#/components/responses/bad_request" + type: string '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": + subcategory: deployments + "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}": get: - summary: Get a delivery for a repository webhook - description: Returns a delivery for a webhook configured in a repository. + summary: Get a deployment status + description: 'Users with pull access can view a deployment status for a deployment:' tags: - repos - operationId: repos/get-webhook-delivery + operationId: repos/get-deployment-status externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-delivery-for-a-repository-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-deployment-status parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/delivery-id" + - "$ref": "#/components/parameters/deployment-id" + - name: status_id + in: path + required: true + schema: + type: integer responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/hook-delivery" + "$ref": "#/components/schemas/deployment-status" examples: default: - "$ref": "#/components/examples/hook-delivery" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": - post: - summary: Redeliver a delivery for a repository webhook - description: Redeliver a webhook delivery for a webhook configured in a repository. - tags: - - repos - operationId: repos/redeliver-webhook-delivery - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#redeliver-a-delivery-for-a-repository-webhook - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" - - "$ref": "#/components/parameters/delivery-id" - responses: - '202': - "$ref": "#/components/responses/accepted" - '400': - "$ref": "#/components/responses/bad_request" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/pings": - post: - summary: Ping a repository webhook - description: This will trigger a [ping event](https://docs.github.com/webhooks/#ping-event) - to be sent to the hook. - tags: - - repos - operationId: repos/ping-webhook - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#ping-a-repository-webhook - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" - responses: - '204': - description: Response + "$ref": "#/components/examples/deployment-status" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/hooks/{hook_id}/tests": + subcategory: deployments + "/repos/{owner}/{repo}/dispatches": post: - summary: Test the push repository webhook + summary: Create a repository dispatch event description: |- - 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. + You can use this endpoint to trigger a webhook event called `repository_dispatch` when you want activity that happens outside of GitHub Enterprise Server 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/enterprise-server@3.6/webhooks/event-payloads/#repository_dispatch)." - **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` + The `client_payload` parameter is available for any extra information that your workflow might need. This parameter is a JSON payload that will be passed on when the webhook event is dispatched. For example, the `client_payload` can include a message that a user would like to send using a GitHub Actions workflow. Or the `client_payload` can be used as a test to debug your workflow. + + This endpoint requires write access to the repository by providing either: + + - Personal access tokens with `repo` scope. For more information, see "[Creating a personal access token for the command line](https://docs.github.com/articles/creating-a-personal-access-token-for-the-command-line)" in the GitHub Help documentation. + - GitHub Apps with both `metadata:read` and `contents:read&write` permissions. + + This input example shows how you can use the `client_payload` as a test to debug your workflow. tags: - repos - operationId: repos/test-push-webhook + operationId: repos/create-dispatch-event externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#test-the-push-repository-webhook + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-dispatch-event parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/hook-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - event_type + properties: + event_type: + type: string + description: A custom webhook event name. Must be 100 characters + or fewer. + minLength: 1 + maxLength: 100 + client_payload: + type: object + description: JSON payload with extra information about the webhook + event that your action or workflow may use. The maximum number + of top-level properties is 10. + additionalProperties: true + maxProperties: 10 + examples: + default: + value: + event_type: on-demand-test + client_payload: + unit: false + integration: true responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: webhooks - "/repos/{owner}/{repo}/import": + subcategory: + "/repos/{owner}/{repo}/environments": get: - summary: Get an import status + summary: List environments description: |- - View the progress of an import. + Lists the environments for a repository. - **Import status** - - This section includes details about the possible values of the `status` field of the Import Progress response. - - An import that does not have errors will progress through these steps: - - * `detecting` - the "detection" step of the import is in progress because the request did not include a `vcs` parameter. The import is identifying the type of source control present at the URL. - * `importing` - the "raw" step of the import is in progress. This is where commit data is fetched from the original repository. The import progress response will include `commit_count` (the total number of raw commits that will be imported) and `percent` (0 - 100, the current progress through the import). - * `mapping` - the "rewrite" step of the import is in progress. This is where SVN branches are converted to Git branches, and where author updates are applied. The import progress response does not include progress information. - * `pushing` - the "push" step of the import is in progress. This is where the importer updates the repository on GitHub. The import progress response will include `push_percent`, which is the percent value reported by `git push` when it is "Writing objects". - * `complete` - the import is complete, and the repository is ready on GitHub. - - If there are problems, you will see one of these in the `status` field: - - * `auth_failed` - the import requires authentication in order to connect to the original repository. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * `error` - the import encountered an error. The import progress response will include the `failed_step` and an error message. Contact [GitHub Support](https://support.github.com/contact?tags=dotcom-rest-api) for more information. - * `detection_needs_auth` - the importer requires authentication for the originating repository to continue detection. To update authentication for the import, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - * `detection_found_nothing` - the importer didn't recognize any source control at the URL. To resolve, [Cancel the import](https://docs.github.com/rest/reference/migrations#cancel-an-import) and [retry](https://docs.github.com/rest/reference/migrations#start-an-import) with the correct URL. - * `detection_found_multiple` - the importer found several projects or repositories at the provided URL. When this is the case, the Import Progress response will also include a `project_choices` field with the possible project choices as values. To update project choice, please see the [Update an import](https://docs.github.com/rest/reference/migrations#update-an-import) section. - - **The project_choices field** - - When multiple projects are found at the provided URL, the response hash will include a `project_choices` field, the value of which is an array of hashes each representing a project choice. The exact key/value pairs of the project hashes will differ depending on the version control type. - - **Git LFS related fields** - - This section includes details about Git LFS related fields that may be present in the Import Progress response. - - * `use_lfs` - describes whether the import has been opted in or out of using Git LFS. The value can be `opt_in`, `opt_out`, or `undecided` if no action has been taken. - * `has_large_files` - the boolean value describing whether files larger than 100MB were found during the `importing` step. - * `large_files_size` - the total size in gigabytes of files larger than 100MB found in the originating repository. - * `large_files_count` - the total number of files larger than 100MB found in the originating repository. To see a list of these files, make a "Get Large Files" request. + 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. tags: - - migrations - operationId: migrations/get-import-status + - repos + operationId: repos/get-all-environments externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#get-an-import-status + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/environments#list-environments parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/import" + type: object + properties: + total_count: + description: The number of environments in this repository + example: 5 + type: integer + environments: + type: array + items: + "$ref": "#/components/schemas/environment" examples: default: - "$ref": "#/components/examples/import" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/environments" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - put: - summary: Start an import - description: Start a source import to a GitHub repository using GitHub Importer. + category: deployments + subcategory: environments + "/repos/{owner}/{repo}/environments/{environment_name}": + get: + summary: Get an environment + description: |- + **Note:** To get information about name patterns that branches must match in order to deploy to this environment, see "[Get a deployment branch policy](/rest/deployments/branch-policies#get-a-deployment-branch-policy)." + + 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. tags: - - migrations - operationId: migrations/start-import + - repos + operationId: repos/get-environment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#start-an-import + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-an-environment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - vcs_url: - type: string - description: The URL of the originating repository. - vcs: - type: string - description: The originating VCS type. Can be one of `subversion`, - `git`, `mercurial`, or `tfvc`. Please be aware that without this - parameter, the import job will take additional time to detect - the VCS type before beginning the import. This detection step - will be reflected in the response. - enum: - - subversion - - git - - mercurial - - tfvc - vcs_username: - type: string - description: If authentication is required, the username to provide - to `vcs_url`. - vcs_password: - type: string - description: If authentication is required, the password to provide - to `vcs_url`. - tfvc_project: - type: string - description: For a tfvc import, the name of the project that is - being imported. - required: - - vcs_url - example: - vcs: subversion - vcs_url: http://svn.mycompany.com/svn/myproject - vcs_username: octocat - vcs_password: secret + - "$ref": "#/components/parameters/environment-name" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/import" + "$ref": "#/components/schemas/environment" examples: default: - "$ref": "#/components/examples/import-2" - headers: - Location: - example: https://api.github.com/repos/spraints/socm/import - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/environment" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - patch: - summary: Update an import + category: repos + subcategory: environments + put: + summary: Create or update an environment description: |- - 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. + 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:** To create or update name patterns that branches must match in order to deploy to this environment, see "[Deployment branch policies](/rest/deployments/branch-policies)." + + **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. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. tags: - - migrations - operationId: migrations/update-import + - repos + operationId: repos/create-or-update-environment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#update-an-import + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-or-update-an-environment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" requestBody: required: false content: application/json: schema: type: object - properties: - vcs_username: - type: string - description: The username to provide to the originating repository. - vcs_password: - type: string - description: The password to provide to the originating repository. - vcs: - type: string - example: '"git"' - tfvc_project: - type: string - example: '"project1"' nullable: true + properties: + wait_timer: + "$ref": "#/components/schemas/wait-timer" + reviewers: + type: array + nullable: true + description: The people or teams that may review jobs that reference + the environment. You can list up to six users or teams as reviewers. + The reviewers must have at least read access to the repository. + Only one of the required reviewers needs to approve the job for + it to proceed. + items: + type: object + properties: + type: + "$ref": "#/components/schemas/deployment-reviewer-type" + id: + type: integer + description: The id of the user or team who can review the + deployment + example: 4532992 + deployment_branch_policy: + "$ref": "#/components/schemas/deployment-branch-policy-settings" + additionalProperties: false examples: - example-1: - summary: Example 1 + default: value: - vcs_username: octocat - vcs_password: secret + wait_timer: 30 + reviewers: + - type: User + id: 1 + - type: Team + id: 1 + deployment_branch_policy: + protected_branches: false + custom_branch_policies: true responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/import" + "$ref": "#/components/schemas/environment" examples: - example-1: - "$ref": "#/components/examples/import-example-1" - example-2: - "$ref": "#/components/examples/import-example-2" - response: - "$ref": "#/components/examples/import-response" + default: + "$ref": "#/components/examples/environment" + '422': + description: 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 + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports + category: repos + subcategory: environments delete: - summary: Cancel an import - description: Stop an import for a repository. + summary: Delete an environment + description: You must authenticate using an access token with the repo scope + to use this endpoint. tags: - - migrations - operationId: migrations/cancel-import + - repos + operationId: repos/delete-an-environment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#cancel-an-import + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-an-environment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" responses: '204': - description: Response + description: Default response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - "/repos/{owner}/{repo}/import/authors": + category: repos + subcategory: environments + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies": get: - summary: Get commit authors + summary: List deployment branch policies description: |- - 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 `. + Lists the deployment branch policies for an environment. - 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. + 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. tags: - - migrations - operationId: migrations/get-commit-authors + - repos + operationId: repos/list-deployment-branch-policies externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#get-commit-authors + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/branch-policies#list-deployment-branch-policies parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/since-user" - responses: + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/porter-author" + type: object + properties: + total_count: + description: The number of deployment branch policies for the + environment. + type: integer + example: 2 + branch_policies: + type: array + items: + "$ref": "#/components/schemas/deployment-branch-policy" + required: + - total_count + - branch_policies examples: default: - "$ref": "#/components/examples/porter-author-items" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/deployment-branch-policies-list" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - "/repos/{owner}/{repo}/import/authors/{author_id}": - patch: - summary: Map a commit author - description: Update an author's identity for the import. Your application can - continue updating authors any time before you push new commits to the repository. + category: deployments + subcategory: branch-policies + post: + summary: Create a deployment branch policy + description: |- + Creates a deployment branch policy for an environment. + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. tags: - - migrations - operationId: migrations/map-commit-author + - repos + operationId: repos/create-deployment-branch-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#map-a-commit-author + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/branch-policies#create-deployment-branch-policy parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: author_id - in: path - required: true - schema: - type: integer + - "$ref": "#/components/parameters/environment-name" requestBody: - required: false + required: true content: application/json: schema: - type: object - properties: - email: - type: string - description: The new Git author email. - name: - type: string - description: The new Git author name. - additionalProperties: false - example: - email: hubot@github.com - name: Hubot the Robot + "$ref": "#/components/schemas/deployment-branch-policy-name-pattern" + examples: + example-wildcard: + summary: Example of a wildcard name pattern + value: + name: release/* + example-single-branch: + summary: Example of a single branch name pattern + value: + name: main responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/porter-author" + "$ref": "#/components/schemas/deployment-branch-policy" examples: - default: - "$ref": "#/components/examples/porter-author" - '422': - "$ref": "#/components/responses/validation_failed" + example-wildcard: + "$ref": "#/components/examples/deployment-branch-policy-wildcard" + example-single-branch: + "$ref": "#/components/examples/deployment-branch-policy-single-branch" '404': - "$ref": "#/components/responses/not_found" + description: Not Found or `deployment_branch_policy.custom_branch_policies` + property for the environment is set to false + '303': + description: Response if the same branch name pattern already exists x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - "/repos/{owner}/{repo}/import/large_files": + category: deployments + subcategory: branch-policies + "/repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}": get: - summary: Get large files - description: List files larger than 100MB found during the import + summary: Get a deployment branch policy + description: |- + Gets a deployment branch policy for an environment. + + 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. tags: - - migrations - operationId: migrations/get-large-files + - repos + operationId: repos/get-deployment-branch-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#get-large-files + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/branch-policies#get-deployment-branch-policy parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/branch-policy-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/porter-large-file" + "$ref": "#/components/schemas/deployment-branch-policy" examples: default: - "$ref": "#/components/examples/porter-large-file-items" + "$ref": "#/components/examples/deployment-branch-policy-wildcard" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - "/repos/{owner}/{repo}/import/lfs": - patch: - summary: Update Git LFS preference - description: You can import repositories from Subversion, Mercurial, and TFS - that include files larger than 100MB. This ability is powered by [Git LFS](https://git-lfs.github.com). - You can learn more about our LFS feature and working with large files [on - our help site](https://docs.github.com/articles/versioning-large-files/). + category: deployments + subcategory: branch-policies + put: + summary: Update a deployment branch policy + description: |- + Updates a deployment branch policy for an environment. + + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. tags: - - migrations - operationId: migrations/set-lfs-preference + - repos + operationId: repos/update-deployment-branch-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#update-git-lfs-preference + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/branch-policies#update-deployment-branch-policy parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/branch-policy-id" requestBody: required: true content: application/json: schema: - type: object - properties: - use_lfs: - type: string - description: Can be one of `opt_in` (large files will be stored - using Git LFS) or `opt_out` (large files will be removed during - the import). - enum: - - opt_in - - opt_out - required: - - use_lfs - example: - use_lfs: opt_in + "$ref": "#/components/schemas/deployment-branch-policy-name-pattern" + examples: + default: + value: + name: release/* responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/import" + "$ref": "#/components/schemas/deployment-branch-policy" examples: default: - "$ref": "#/components/examples/import" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/deployment-branch-policy-wildcard" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: migrations - subcategory: source-imports - "/repos/{owner}/{repo}/installation": - get: - summary: Get a repository installation for the authenticated app + category: deployments + subcategory: branch-policies + delete: + summary: Delete a deployment branch policy description: |- - 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. + Deletes a deployment branch policy for an environment. - 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. - tags: - - apps - operationId: apps/get-repo-installation - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/installation" - examples: - default: - "$ref": "#/components/examples/installation" - '301': - "$ref": "#/components/responses/moved_permanently" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: - "/repos/{owner}/{repo}/interaction-limits": - get: - summary: Get interaction restrictions for a repository - description: 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. + You must authenticate using an access token with the `repo` scope to use this endpoint. GitHub Apps must have the `administration:write` permission for the repository to use this endpoint. tags: - - interactions - operationId: interactions/get-restrictions-for-repo + - repos + operationId: repos/delete-deployment-branch-policy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/deployments/branch-policies#delete-deployment-branch-policy parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/branch-policy-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - anyOf: - - "$ref": "#/components/schemas/interaction-limit-response" - - type: object - properties: {} - additionalProperties: false - examples: - default: - "$ref": "#/components/examples/interaction-limit-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: interactions - subcategory: repos - put: - summary: Set interaction restrictions for a repository - description: 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. + category: deployments + subcategory: branch-policies + "/repos/{owner}/{repo}/events": + get: + summary: List repository events + description: '' tags: - - interactions - operationId: interactions/set-restrictions-for-repo + - activity + operationId: activity/list-repo-events externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repository-events parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - "$ref": "#/components/schemas/interaction-limit" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/interaction-limit-response" + type: array + items: + "$ref": "#/components/schemas/event" examples: - default: - "$ref": "#/components/examples/interaction-limit-2" - '409': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: interactions - subcategory: repos - delete: - summary: Remove interaction restrictions for a repository - description: 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. - tags: - - interactions - operationId: interactions/remove-restrictions-for-repo - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '204': - description: Response - '409': - description: Response + 200-response: + "$ref": "#/components/examples/repo-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: interactions - subcategory: repos - "/repos/{owner}/{repo}/invitations": + category: activity + subcategory: events + "/repos/{owner}/{repo}/forks": get: - summary: List repository invitations - description: When authenticating as a user with admin rights to a repository, - this endpoint will list all currently open repository invitations. + summary: List forks + description: '' tags: - repos - operationId: repos/list-invitations + operationId: repos/list-forks externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-invitations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-forks parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: sort + description: The sort order. `stargazers` will sort by star count. + in: query + required: false + schema: + type: string + enum: + - newest + - oldest + - stargazers + - watchers + default: newest - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -23803,200 +23062,80 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/repository-invitation" + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/repository-invitation-items" + "$ref": "#/components/examples/minimal-repository-items-2" headers: Link: "$ref": "#/components/headers/link" + '400': + "$ref": "#/components/responses/bad_request" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: invitations - "/repos/{owner}/{repo}/invitations/{invitation_id}": - patch: - summary: Update a repository invitation - description: '' + subcategory: forks + post: + summary: Create a fork + description: |- + 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 Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api). tags: - repos - operationId: repos/update-invitation + operationId: repos/create-fork externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-repository-invitation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-fork parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/invitation-id" requestBody: required: false content: application/json: schema: type: object + nullable: true properties: - permissions: + organization: type: string - description: The permissions that the associated user will have - on the repository. Valid values are `read`, `write`, `maintain`, - `triage`, and `admin`. - enum: - - read - - write - - maintain - - triage - - admin - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/repository-invitation" - examples: - default: - "$ref": "#/components/examples/repository-invitation" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: invitations - delete: - summary: Delete a repository invitation - description: '' - tags: - - repos - operationId: repos/delete-invitation - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-repository-invitation - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/invitation-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: invitations - "/repos/{owner}/{repo}/issues": - get: - summary: List repository issues - description: |- - 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. - tags: - - issues - operationId: issues/list-for-repo - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-repository-issues - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: milestone - description: 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. - in: query - required: false - schema: - type: string - - name: state - description: Indicates the state of the issues to return. Can be either `open`, - `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - name: assignee - description: Can be the name of a user. Pass in `none` for issues with no - assigned user, and `*` for issues assigned to any user. - in: query - required: false - schema: - type: string - - name: creator - description: The user that created the issue. - in: query - required: false - schema: - type: string - - name: mentioned - description: A user that's mentioned in the issue. - in: query - required: false - schema: - type: string - - "$ref": "#/components/parameters/labels" - - name: sort - description: What to sort results by. Can be either `created`, `updated`, - `comments`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - comments - default: created - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + description: Optional parameter to specify the organization name + if forking into an organization. responses: - '200': + '202': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/full-repository" examples: default: - "$ref": "#/components/examples/issue-items" - headers: - Link: - "$ref": "#/components/headers/link" - '301': - "$ref": "#/components/responses/moved_permanently" + "$ref": "#/components/examples/full-repository" + '400': + "$ref": "#/components/responses/bad_request" '422': "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: + category: repos + subcategory: forks + "/repos/{owner}/{repo}/git/blobs": post: - summary: Create an issue - description: |- - Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. - - This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + summary: Create a blob + description: '' tags: - - issues - operationId: issues/create + - git + operationId: git/create-blob externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#create-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#create-a-blob parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -24007,312 +23146,423 @@ paths: schema: type: object properties: - title: - oneOf: - - type: string - - type: integer - description: The title of the issue. - body: + content: type: string - description: The contents of the issue. - assignee: + description: The new blob's content. + encoding: type: string - description: 'Login for the user that this issue should be assigned - to. _NOTE: Only users with push access can set the assignee for - new issues. The assignee is silently dropped otherwise. **This - field is deprecated.**_' - nullable: true - milestone: - oneOf: - - type: string - - type: integer - description: 'The `number` of the milestone to associate this - issue with. _NOTE: Only users with push access can set the milestone - for new issues. The milestone is silently dropped otherwise._' - nullable: true - labels: - type: array - description: 'Labels to associate with this issue. _NOTE: Only users - with push access can set labels for new issues. Labels are silently - dropped otherwise._' - items: - oneOf: - - type: string - - type: object - properties: - id: - type: integer - name: - type: string - description: - type: string - nullable: true - color: - type: string - nullable: true - assignees: - type: array - description: 'Logins for Users to assign to this issue. _NOTE: Only - users with push access can set assignees for new issues. Assignees - are silently dropped otherwise._' - items: - type: string + description: The encoding used for `content`. Currently, `"utf-8"` + and `"base64"` are supported. + default: utf-8 required: - - title - example: - title: Found a bug - body: I'm having a problem with this. - assignees: - - octocat - milestone: 1 - labels: - - bug + - content + examples: + default: + value: + content: Content of the blob + encoding: utf-8 responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/short-blob" examples: default: - "$ref": "#/components/examples/issue" + "$ref": "#/components/examples/short-blob" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/issues/1347 + example: https://api.github.com/repos/octocat/example/git/blobs/3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15 schema: type: string + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" '403': "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" - '503': - "$ref": "#/components/responses/service_unavailable" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: - "/repos/{owner}/{repo}/issues/comments": + category: git + subcategory: blobs + "/repos/{owner}/{repo}/git/blobs/{file_sha}": get: - summary: List issue comments for a repository - description: By default, Issue Comments are ordered by ascending ID. + summary: Get a blob + description: |- + The `content` in the response will always be Base64 encoded. + + _Note_: This API supports blobs up to 100 megabytes in size. tags: - - issues - operationId: issues/list-comments-for-repo + - git + operationId: git/get-blob externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-issue-comments-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-blob parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/sort" - - name: direction - description: Either `asc` or `desc`. Ignored without the `sort` parameter. - in: query - required: false + - name: file_sha + in: path + required: true schema: type: string - enum: - - asc - - desc - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/issue-comment" + "$ref": "#/components/schemas/blob" examples: default: - "$ref": "#/components/examples/issue-comment-items" - headers: - Link: - "$ref": "#/components/headers/link" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/blob" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments - "/repos/{owner}/{repo}/issues/comments/{comment_id}": - get: - summary: Get an issue comment - description: '' + category: git + subcategory: blobs + "/repos/{owner}/{repo}/git/commits": + post: + summary: Create a commit + description: |- + 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 the 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. | tags: - - issues - operationId: issues/get-comment - externalDocs: + - git + operationId: git/create-commit + externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#get-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#create-a-commit parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: The commit message + tree: + type: string + description: The SHA of the tree object this commit points to + parents: + type: array + description: The SHAs of the commits that were the parents of this + commit. If omitted or empty, the commit will be written as a root + commit. For a single parent, an array of one SHA should be provided; + for a merge commit, an array of more than one should be provided. + items: + type: string + author: + type: object + description: Information about the author of the commit. By default, + the `author` will be the authenticated user and the current date. + See the `author` and `committer` object below for details. + properties: + name: + type: string + description: The name of the author (or committer) of the commit + email: + type: string + description: The email of the author (or committer) of the commit + date: + type: string + format: date-time + description: 'Indicates when this commit was authored (or committed). + This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format: `YYYY-MM-DDTHH:MM:SSZ`.' + required: + - name + - email + committer: + type: object + description: Information about the person who is making the commit. + By default, `committer` will use the information set in `author`. + See the `author` and `committer` object below for details. + properties: + name: + type: string + description: The name of the author (or committer) of the commit + email: + type: string + description: The email of the author (or committer) of the commit + date: + type: string + format: date-time + description: 'Indicates when this commit was authored (or committed). + This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format: `YYYY-MM-DDTHH:MM:SSZ`.' + signature: + type: string + description: The [PGP signature](https://en.wikipedia.org/wiki/Pretty_Good_Privacy) + of the commit. GitHub adds the signature to the `gpgsig` header + of the created commit. For a commit signature to be verifiable + by Git or GitHub, it must be an ASCII-armored detached PGP signature + over the string commit as it would be written to the object database. + To pass a `signature` parameter, you need to first manually create + a valid PGP signature, which can be complicated. You may find + it easier to [use the command line](https://git-scm.com/book/id/v2/Git-Tools-Signing-Your-Work) + to create signed commits. + required: + - message + - tree + examples: + default: + value: + message: my commit message + author: + name: Mona Octocat + email: octocat@github.com + date: '2008-07-09T16:13:30+12:00' + parents: + - 7d1b31e74ee336d15cbd21741bc88a537ed063a0 + tree: 827efc6d56897b048c772eb4087f854f46256132 + signature: | + -----BEGIN PGP SIGNATURE----- + + iQIzBAABAQAdFiEESn/54jMNIrGSE6Tp6cQjvhfv7nAFAlnT71cACgkQ6cQjvhfv + 7nCWwA//XVqBKWO0zF+bZl6pggvky3Oc2j1pNFuRWZ29LXpNuD5WUGXGG209B0hI + DkmcGk19ZKUTnEUJV2Xd0R7AW01S/YSub7OYcgBkI7qUE13FVHN5ln1KvH2all2n + 2+JCV1HcJLEoTjqIFZSSu/sMdhkLQ9/NsmMAzpf/iIM0nQOyU4YRex9eD1bYj6nA + OQPIDdAuaTQj1gFPHYLzM4zJnCqGdRlg0sOM/zC5apBNzIwlgREatOYQSCfCKV7k + nrU34X8b9BzQaUx48Qa+Dmfn5KQ8dl27RNeWAqlkuWyv3pUauH9UeYW+KyuJeMkU + +NyHgAsWFaCFl23kCHThbLStMZOYEnGagrd0hnm1TPS4GJkV4wfYMwnI4KuSlHKB + jHl3Js9vNzEUQipQJbgCgTiWvRJoK3ENwBTMVkKHaqT4x9U4Jk/XZB6Q8MA09ezJ + 3QgiTjTAGcum9E9QiJqMYdWQPWkaBIRRz5cET6HPB48YNXAAUsfmuYsGrnVLYbG+ + UpC6I97VybYHTy2O9XSGoaLeMI9CsFn38ycAxxbWagk5mhclNTP5mezIq6wKSwmr + X11FW3n1J23fWZn5HJMBsRnUCgzqzX3871IqLYHqRJ/bpZ4h20RhTyPj5c/z7QXp + eSakNQMfbbMcljkha+ZMuVQX1K9aRlVqbmv3ZMWh+OijLYVU2bc= + =5Io4 + -----END PGP SIGNATURE----- responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue-comment" + "$ref": "#/components/schemas/git-commit" examples: default: - "$ref": "#/components/examples/issue-comment" + "$ref": "#/components/examples/git-commit" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments - patch: - summary: Update an issue comment - description: '' + category: git + subcategory: commits + "/repos/{owner}/{repo}/git/commits/{commit_sha}": + get: + summary: Get a commit + description: |- + 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 the 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. | tags: - - issues - operationId: issues/update-comment + - git + operationId: git/get-commit externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#update-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-commit parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - body: - type: string - description: The contents of the comment. - required: - - body - example: - body: Me too + - "$ref": "#/components/parameters/commit-sha" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue-comment" + "$ref": "#/components/schemas/git-commit" examples: default: - "$ref": "#/components/examples/issue-comment" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/git-commit-2" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments - delete: - summary: Delete an issue comment - description: '' + category: git + subcategory: commits + "/repos/{owner}/{repo}/git/matching-refs/{ref}": + get: + summary: List matching references + description: |- + 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/enterprise-server@3.6/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/enterprise-server@3.6/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`. tags: - - issues - operationId: issues/delete-comment + - git + operationId: git/list-matching-refs externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#delete-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#list-matching-references parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" + - name: ref + description: ref parameter + in: path + required: true + schema: + type: string + x-multi-segment: true responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/git-ref" + examples: + default: + "$ref": "#/components/examples/git-ref-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments - "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": + category: git + subcategory: refs + "/repos/{owner}/{repo}/git/ref/{ref}": get: - summary: List reactions for an issue comment - description: List the reactions to an [issue comment](https://docs.github.com/rest/reference/issues#comments). + summary: Get a reference + description: |- + 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". tags: - - reactions - operationId: reactions/list-for-issue-comment + - git + operationId: git/get-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - name: content - description: 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. - in: query - required: false + - name: ref + description: ref parameter + in: path + required: true schema: type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + x-multi-segment: true responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/git-ref" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/git-ref" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: + category: git + subcategory: refs + "/repos/{owner}/{repo}/git/refs": post: - summary: Create reaction for an issue comment - description: Create a reaction to an [issue comment](https://docs.github.com/rest/reference/issues#comments). - A response with an HTTP `200` status means that you already added the reaction - type to this issue comment. + summary: Create a reference + description: 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. tags: - - reactions - operationId: reactions/create-for-issue-comment + - git + operationId: git/create-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#create-a-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -24320,424 +23570,509 @@ paths: schema: type: object properties: - content: + ref: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the issue comment. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: 'The name of the fully qualified reference (ie: `refs/heads/master`). + If it doesn''t start with ''refs'' and have at least two slashes, + it will be rejected.' + sha: + type: string + description: The SHA1 value for this reference. + key: + type: string + example: '"refs/heads/newbranch"' required: - - content - example: - content: heart + - ref + - sha + examples: + default: + value: + ref: refs/heads/featureA + sha: aa218f56b14c9653891f9e74264a383fa43fefbd responses: - '200': - description: Reaction exists - content: - application/json: - schema: - "$ref": "#/components/schemas/reaction" - examples: - default: - "$ref": "#/components/examples/reaction" '201': - description: Reaction created + description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/git-ref" examples: default: - "$ref": "#/components/examples/reaction" + "$ref": "#/components/examples/git-ref" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/git/refs/heads/featureA + schema: + type: string '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": - delete: - summary: Delete an issue comment reaction - description: |- - **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). - tags: - - reactions - operationId: reactions/delete-for-issue-comment - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-an-issue-comment-reaction - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - "$ref": "#/components/parameters/reaction-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/issues/events": - get: - summary: List issue events for a repository + category: git + subcategory: refs + "/repos/{owner}/{repo}/git/refs/{ref}": + patch: + summary: Update a reference description: '' tags: - - issues - operationId: issues/list-events-for-repo + - git + operationId: git/update-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-issue-events-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - name: ref + description: The name of the fully qualified reference to update. For example, + `refs/heads/master`. If the value doesn't start with `refs` and have at + least two slashes, it will be rejected. + in: path + required: true + example: refs/head/master + schema: + type: string + x-multi-segment: true + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + sha: + type: string + description: The SHA1 value to set this reference to + force: + type: boolean + description: Indicates whether to force the update or to make sure + the update is a fast-forward update. Leaving this out or setting + it to `false` will make sure you're not overwriting work. + default: false + required: + - sha + examples: + default: + value: + sha: aa218f56b14c9653891f9e74264a383fa43fefbd + force: true responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/issue-event" + "$ref": "#/components/schemas/git-ref" examples: default: - "$ref": "#/components/examples/issue-event-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/git-ref" '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: events - "/repos/{owner}/{repo}/issues/events/{event_id}": - get: - summary: Get an issue event + category: git + subcategory: refs + delete: + summary: Delete a reference description: '' tags: - - issues - operationId: issues/get-event + - git + operationId: git/delete-ref externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#get-an-issue-event + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#delete-a-reference parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: event_id + - name: ref + description: ref parameter in: path required: true schema: - type: integer + type: string + x-multi-segment: true responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/issue-event" - examples: - default: - "$ref": "#/components/examples/issue-event" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" - '403': - "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: events - "/repos/{owner}/{repo}/issues/{issue_number}": - get: - summary: Get an issue + category: git + subcategory: refs + "/repos/{owner}/{repo}/git/tags": + post: + summary: Create a tag object description: |- - The API returns a [`301 Moved Permanently` status](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was - [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If - the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API - returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read - access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe - to the [`issues`](https://docs.github.com/webhooks/event-payloads/#issues) webhook. + Note 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/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/git#create-a-reference) the tag reference - this call would be unnecessary. - **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. - tags: - - issues - operationId: issues/get - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/issues#get-an-issue - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/issue" - examples: - default: - "$ref": "#/components/examples/issue" - '301': - "$ref": "#/components/responses/moved_permanently" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" - '304': - "$ref": "#/components/responses/not_modified" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: issues - subcategory: - patch: - summary: Update an issue - description: Issue owners and users with push access can edit an issue. + **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. | tags: - - issues - operationId: issues/update + - git + operationId: git/create-tag externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues/#update-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#create-a-tag-object parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - title: - oneOf: - - type: string - - type: integer - description: The title of the issue. - nullable: true - body: + tag: type: string - description: The contents of the issue. - nullable: true - assignee: + description: The tag's name. This is typically a version (e.g., + "v0.0.1"). + message: type: string - nullable: true - description: Login for the user that this issue should be assigned - to. **This field is deprecated.** - state: + description: The tag message. + object: type: string - description: State of the issue. Either `open` or `closed`. + description: The SHA of the git object this is tagging. + type: + type: string + description: The type of the object we're tagging. Normally this + is a `commit` but it can also be a `tree` or a `blob`. enum: - - open - - closed - milestone: - oneOf: - - type: string - - type: integer - description: 'The `number` of the milestone to associate this - issue with or `null` to remove current. _NOTE: Only users with - push access can set the milestone for issues. The milestone - is silently dropped otherwise._' - nullable: true - labels: - type: array - description: 'Labels to associate with this issue. Pass one or more - Labels to _replace_ the set of Labels on this Issue. Send an empty - array (`[]`) to clear all Labels from the Issue. _NOTE: Only users - with push access can set labels for issues. Labels are silently - dropped otherwise._' - items: - oneOf: - - type: string - - type: object - properties: - id: - type: integer - name: - type: string - description: - type: string - nullable: true - color: - type: string - nullable: true - assignees: - type: array - description: 'Logins for Users to assign to this issue. Pass one - or more user logins to _replace_ the set of assignees on this - Issue. Send an empty array (`[]`) to clear all assignees from - the Issue. _NOTE: Only users with push access can set assignees - for new issues. Assignees are silently dropped otherwise._' - items: - type: string - example: - title: Found a bug - body: I'm having a problem with this. - assignees: - - octocat - milestone: 1 - state: open - labels: - - bug + - commit + - tree + - blob + tagger: + type: object + description: An object with information about the individual creating + the tag. + properties: + name: + type: string + description: The name of the author of the tag + email: + type: string + description: The email of the author of the tag + date: + type: string + format: date-time + description: 'When this object was tagged. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: + `YYYY-MM-DDTHH:MM:SSZ`.' + required: + - name + - email + required: + - tag + - message + - object + - type + examples: + default: + value: + tag: v0.0.1 + message: initial version + object: c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c + type: commit + tagger: + name: Monalisa Octocat + email: octocat@github.com + date: '2011-06-17T14:53:35-07:00' responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/git-tag" examples: default: - "$ref": "#/components/examples/issue" + "$ref": "#/components/examples/git-tag" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac + schema: + type: string '422': "$ref": "#/components/responses/validation_failed" - '503': - "$ref": "#/components/responses/service_unavailable" - '403': - "$ref": "#/components/responses/forbidden" - '301': - "$ref": "#/components/responses/moved_permanently" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: git + subcategory: tags + "/repos/{owner}/{repo}/git/tags/{tag_sha}": + get: + summary: Get a tag + description: |- + **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. | + tags: + - git + operationId: git/get-tag + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tag + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: tag_sha + in: path + required: true + schema: + type: string + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/git-tag" + examples: + default: + "$ref": "#/components/examples/git-tag" '404': "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: - "/repos/{owner}/{repo}/issues/{issue_number}/assignees": + category: git + subcategory: tags + "/repos/{owner}/{repo}/git/trees": post: - summary: Add assignees to an issue - description: Adds up to 10 assignees to an issue. Users already assigned to - an issue are not replaced. + summary: Create a tree + description: |- + 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/enterprise-server@3.6/rest/reference/git#create-a-commit)" and "[Update a reference](https://docs.github.com/enterprise-server@3.6/rest/reference/git#update-a-reference)." + + Returns an error if you try to delete a file that does not exist. tags: - - issues - operationId: issues/add-assignees + - git + operationId: git/create-tree externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#add-assignees-to-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#create-a-tree parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - assignees: + tree: type: array - description: 'Usernames of people to assign this issue to. _NOTE: - Only users with push access can add assignees to an issue. Assignees - are silently ignored otherwise._' + description: Objects (of `path`, `mode`, `type`, and `sha`) specifying + a tree structure. items: - type: string - example: - assignees: - - hubot - - other_user + type: object + properties: + path: + type: string + description: The file referenced in the tree. + mode: + type: string + description: The file mode; one of `100644` for file (blob), + `100755` for executable (blob), `040000` for subdirectory + (tree), `160000` for submodule (commit), or `120000` for + a blob that specifies the path of a symlink. + enum: + - '100644' + - '100755' + - '040000' + - '160000' + - '120000' + type: + type: string + description: Either `blob`, `tree`, or `commit`. + enum: + - blob + - tree + - commit + sha: + type: string + description: "The SHA1 checksum ID of the object in the tree. + Also called `tree.sha`. If the value is `null` then the + file will be deleted. \n \n**Note:** Use either `tree.sha` + or `content` to specify the contents of the entry. Using + both `tree.sha` and `content` will return an error." + nullable: true + content: + type: string + description: "The content you want this file to have. GitHub + will write this blob out and use that SHA for this entry. + Use either this, or `tree.sha`. \n \n**Note:** Use either + `tree.sha` or `content` to specify the contents of the entry. + Using both `tree.sha` and `content` will return an error." + base_tree: + type: string + description: | + The SHA1 of an existing Git tree object which will be used as the base for the new tree. If provided, a new Git tree object will be created from entries in the Git tree object pointed to by `base_tree` and entries defined in the `tree` parameter. Entries defined in the `tree` parameter will overwrite items from `base_tree` with the same `path`. If you're creating new changes on a branch, then normally you'd set `base_tree` to the SHA1 of the Git tree object of the current latest commit on the branch you're working on. + If not provided, GitHub will create a new Git tree object from only the entries defined in the `tree` parameter. If you create a new commit pointing to such a tree, then all files which were a part of the parent commit's tree and were not defined in the `tree` parameter will be listed as deleted by the new commit. + required: + - tree + examples: + default: + value: + base_tree: 9fb037999f264ba9a7fc6274d15fa3ae2ab98312 + tree: + - path: file.rb + mode: '100644' + type: blob + sha: 44b4fc6d56897b048c772eb4087f854f46256132 responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/git-tree" examples: default: - "$ref": "#/components/examples/issue" + "$ref": "#/components/examples/git-tree" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7 + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: assignees - delete: - summary: Remove assignees from an issue - description: Removes one or more assignees from an issue. + category: git + subcategory: trees + "/repos/{owner}/{repo}/git/trees/{tree_sha}": + get: + summary: Get a tree + description: |- + 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. + + + **Note**: The limit for the `tree` array is 100,000 entries with a maximum size of 7 MB when using the `recursive` parameter. tags: - - issues - operationId: issues/remove-assignees + - git + operationId: git/get-tree externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#remove-assignees-from-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/reference/git#get-a-tree parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - requestBody: - content: - application/json: - schema: - type: object - properties: - assignees: - type: array - description: 'Usernames of assignees to remove from an issue. _NOTE: - Only users with push access can remove assignees from an issue. - Assignees are silently ignored otherwise._' - items: - type: string - example: - assignees: - - hubot - - other_user + - name: tree_sha + in: path + required: true + schema: + type: string + x-multi-segment: true + - name: recursive + description: '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.' + in: query + required: false + schema: + type: string responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/git-tree" examples: - default: - "$ref": "#/components/examples/issue" + default-response: + "$ref": "#/components/examples/git-tree-default-response" + response-recursively-retrieving-a-tree: + "$ref": "#/components/examples/git-tree-response-recursively-retrieving-a-tree" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: assignees - "/repos/{owner}/{repo}/issues/{issue_number}/comments": + category: git + subcategory: trees + "/repos/{owner}/{repo}/hooks": get: - summary: List issue comments - description: Issue Comments are ordered by ascending ID. + summary: List repository webhooks + description: Lists webhooks for a repository. `last response` may return null + if there have not been any deliveries within 30 days. tags: - - issues - operationId: issues/list-comments + - repos + operationId: repos/list-webhooks externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-issue-comments + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#list-repository-webhooks parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - "$ref": "#/components/parameters/since" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -24748,660 +24083,547 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/issue-comment" + "$ref": "#/components/schemas/hook" examples: default: - "$ref": "#/components/examples/issue-comment-items" + "$ref": "#/components/examples/hook-items" headers: Link: "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments + category: webhooks + subcategory: repos post: - summary: Create an issue comment - description: This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). - Creating content too quickly using this endpoint may result in secondary rate - limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" - and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" - for details. + summary: Create a repository webhook + description: |- + 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. tags: - - issues - operationId: issues/create-comment + - repos + operationId: repos/create-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#create-an-issue-comment + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#create-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" requestBody: - required: true + required: false content: application/json: schema: type: object + nullable: true properties: - body: + name: type: string - description: The contents of the comment. - required: - - body - example: - body: Me too + description: 'Use `web` to create a webhook. Default: `web`. This + parameter only accepts the value `web`.' + config: + type: object + description: Key/value pairs to provide settings for this webhook. + [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-hook-config-params). + properties: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + token: + type: string + example: '"abc"' + digest: + type: string + example: '"sha256"' + events: + type: array + description: Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + the hook is triggered for. + default: + - push + items: + type: string + active: + type: boolean + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. + default: true + additionalProperties: false + examples: + default: + value: + name: web + active: true + events: + - push + - pull_request + config: + url: https://example.com/webhook + content_type: json + insecure_ssl: '0' responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/issue-comment" + "$ref": "#/components/schemas/hook" examples: default: - "$ref": "#/components/examples/issue-comment" + "$ref": "#/components/examples/hook" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1 + example: https://api.github.com/repos/octocat/Hello-World/hooks/12345678 schema: type: string - '403': - "$ref": "#/components/responses/forbidden" - '410': - "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: comments - "/repos/{owner}/{repo}/issues/{issue_number}/events": + category: webhooks + subcategory: repos + "/repos/{owner}/{repo}/hooks/{hook_id}": get: - summary: List issue events - description: '' + summary: Get a repository webhook + description: 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)." tags: - - issues - operationId: issues/list-events + - repos + operationId: repos/get-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-issue-events + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#get-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/issue-event-for-issue" + "$ref": "#/components/schemas/hook" examples: default: - "$ref": "#/components/examples/issue-event-for-issue-items" - headers: - Link: - "$ref": "#/components/headers/link" - '410': - "$ref": "#/components/responses/gone" + "$ref": "#/components/examples/hook" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: events - "/repos/{owner}/{repo}/issues/{issue_number}/labels": - get: - summary: List labels for an issue - description: '' + category: webhooks + subcategory: repos + patch: + summary: Update a repository webhook + description: 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)." tags: - - issues - operationId: issues/list-labels-on-issue + - repos + operationId: repos/update-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-labels-for-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#update-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/label" - examples: - default: - "$ref": "#/components/examples/label-items" - headers: - Link: - "$ref": "#/components/headers/link" - '410': - "$ref": "#/components/responses/gone" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: issues - subcategory: labels - post: - summary: Add labels to an issue - description: '' - tags: - - issues - operationId: issues/add-labels - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/issues#add-labels-to-an-issue - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/hook-id" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - labels: - type: array - minItems: 1 - description: The names of the labels to add to the issue's existing - labels. You can pass an empty array to remove all labels. Alternatively, - you can pass a single label as a `string` or an `array` of labels - directly, but GitHub recommends passing an object with the `labels` - key. You can also replace all of the labels for an issue. For - more information, see "[Set labels for an issue](https://docs.github.com/rest/reference/issues#set-labels-for-an-issue)." - items: - type: string - - type: array - minItems: 1 - items: - type: string - - type: object - properties: - labels: - type: array - minItems: 1 - items: - type: object - properties: - name: - type: string - required: - - name - - type: array - minItems: 1 - items: + type: object + properties: + config: type: object + description: Key/value pairs to provide settings for this webhook. + [These are defined below](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-hook-config-params). properties: - name: - type: string - required: - - name - - type: string - example: - labels: - - bug - - enhancement - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/label" - examples: - default: - "$ref": "#/components/examples/label-items" - '410': - "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: issues - subcategory: labels - put: - summary: Set labels for an issue - description: Removes any previous labels and sets the new labels for an issue. - tags: - - issues - operationId: issues/set-labels - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/issues#set-labels-for-an-issue - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - requestBody: - required: false - content: - application/json: - schema: - oneOf: - - type: object - properties: - labels: - type: array - minItems: 1 - description: The names of the labels to set for the issue. The - labels you set replace any existing labels. You can pass an - empty array to remove all labels. Alternatively, you can pass - a single label as a `string` or an `array` of labels directly, - but GitHub recommends passing an object with the `labels` key. - You can also add labels to the existing labels for an issue. - For more information, see "[Add labels to an issue](https://docs.github.com/rest/reference/issues#add-labels-to-an-issue)." - items: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + address: type: string - - type: array - minItems: 1 - items: - type: string - - type: object - properties: - labels: - type: array - minItems: 1 - items: - type: object - properties: - name: - type: string - required: - - name - - type: array - minItems: 1 - items: - type: object - properties: - name: + example: '"bar@example.com"' + room: type: string + example: '"The Serious Room"' required: - - name - - type: string - example: - labels: - - bug - - enhancement + - url + events: + type: array + description: Determines what [events](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads) + the hook is triggered for. This replaces the entire array of events. + default: + - push + items: + type: string + add_events: + type: array + description: Determines a list of events to be added to the list + of events that the Hook triggers for. + items: + type: string + remove_events: + type: array + description: Determines a list of events to be removed from the + list of events that the Hook triggers for. + items: + type: string + active: + type: boolean + description: Determines if notifications are sent when the webhook + is triggered. Set to `true` to send notifications. + default: true + examples: + default: + value: + active: true + add_events: + - pull_request responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/hook" examples: default: - "$ref": "#/components/examples/label-items" - '410': - "$ref": "#/components/responses/gone" + "$ref": "#/components/examples/hook" '422': "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: labels + category: webhooks + subcategory: repos delete: - summary: Remove all labels from an issue + summary: Delete a repository webhook description: '' tags: - - issues - operationId: issues/remove-all-labels + - repos + operationId: repos/delete-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#remove-all-labels-from-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#delete-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/hook-id" responses: '204': description: Response - '410': - "$ref": "#/components/responses/gone" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: labels - "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": - delete: - summary: Remove a label from an issue - description: 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. + category: webhooks + subcategory: repos + "/repos/{owner}/{repo}/hooks/{hook_id}/config": + get: + summary: Get a webhook configuration for a repository + description: |- + 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. tags: - - issues - operationId: issues/remove-label + - repos + operationId: repos/get-webhook-config-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#remove-a-label-from-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repo-config#get-a-webhook-configuration-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - name: name - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/hook-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/webhook-config" examples: default: - "$ref": "#/components/examples/label-items-2" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" + "$ref": "#/components/examples/webhook-config" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: labels - "/repos/{owner}/{repo}/issues/{issue_number}/lock": - put: - summary: Lock an issue + category: webhooks + subcategory: repo-config + patch: + summary: Update a webhook configuration for a repository description: |- - Users with push access can lock an issue or pull request's conversation. + 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)." - 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)." + Access tokens must have the `write:repo_hook` or `repo` scope, and GitHub Apps must have the `repository_hooks:write` permission. tags: - - issues - operationId: issues/lock + - repos + operationId: repos/update-webhook-config-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#lock-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repo-config#update-a-webhook-configuration-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/hook-id" requestBody: required: false content: application/json: schema: type: object - nullable: true + additionalProperties: false properties: - lock_reason: - type: string - description: "The reason for locking the issue or pull request conversation. - Lock will fail if you don't use one of these reasons: \n\\* `off-topic` - \ \n\\* `too heated` \n\\* `resolved` \n\\* `spam`" - enum: - - off-topic - - too heated - - resolved - - spam + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + example: + content_type: json + insecure_ssl: '0' + secret: "********" + url: https://example.com/webhook responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '410': - "$ref": "#/components/responses/gone" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + content: + application/json: + schema: + "$ref": "#/components/schemas/webhook-config" + examples: + default: + "$ref": "#/components/examples/webhook-config" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: - delete: - summary: Unlock an issue - description: Users with push access can unlock an issue's conversation. + category: webhooks + subcategory: repo-config + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries": + get: + summary: List deliveries for a repository webhook + description: Returns a list of webhook deliveries for a webhook configured in + a repository. tags: - - issues - operationId: issues/unlock + - repos + operationId: repos/list-webhook-deliveries externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#unlock-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repo-deliveries#list-deliveries-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/cursor" responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/hook-delivery-item" + examples: + default: + "$ref": "#/components/examples/hook-delivery-items" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: issues - subcategory: - "/repos/{owner}/{repo}/issues/{issue_number}/reactions": + category: webhooks + subcategory: repo-deliveries + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}": get: - summary: List reactions for an issue - description: List the reactions to an [issue](https://docs.github.com/rest/reference/issues). + summary: Get a delivery for a repository webhook + description: Returns a delivery for a webhook configured in a repository. tags: - - reactions - operationId: reactions/list-for-issue + - repos + operationId: repos/get-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repo-deliveries#get-a-delivery-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - name: content - description: Returns a single [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types). - Omit this parameter to list all reactions to an issue. - in: query - required: false - schema: - type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/delivery-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/hook-delivery" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" + "$ref": "#/components/examples/hook-delivery" + '400': + "$ref": "#/components/responses/bad_request" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: + category: webhooks + subcategory: repo-deliveries + "/repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts": post: - summary: Create reaction for an issue - description: Create a reaction to an [issue](https://docs.github.com/rest/reference/issues/). - A response with an HTTP `200` status means that you already added the reaction - type to this issue. + summary: Redeliver a delivery for a repository webhook + description: Redeliver a webhook delivery for a webhook configured in a repository. tags: - - reactions - operationId: reactions/create-for-issue + - repos + operationId: repos/redeliver-webhook-delivery externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repo-deliveries#redeliver-a-delivery-for-a-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - content: - type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the issue. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - required: - - content - example: - content: heart + - "$ref": "#/components/parameters/hook-id" + - "$ref": "#/components/parameters/delivery-id" responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/reaction" - examples: - default: - "$ref": "#/components/examples/reaction" - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/reaction" - examples: - default: - "$ref": "#/components/examples/reaction" + '202': + "$ref": "#/components/responses/accepted" + '400': + "$ref": "#/components/responses/bad_request" '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: reactions - subcategory: - "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": - delete: - summary: Delete an issue reaction + enabledForGitHubApps: true + category: webhooks + subcategory: repo-deliveries + "/repos/{owner}/{repo}/hooks/{hook_id}/pings": + post: + summary: Ping a repository webhook + description: This will trigger a [ping event](https://docs.github.com/enterprise-server@3.6/webhooks/#ping-event) + to be sent to the hook. + tags: + - repos + operationId: repos/ping-webhook + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#ping-a-repository-webhook + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/hook-id" + responses: + '204': + description: Response + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: webhooks + subcategory: repos + "/repos/{owner}/{repo}/hooks/{hook_id}/tests": + post: + summary: Test the push repository webhook description: |- - **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/issues/:issue_number/reactions/:reaction_id`. + 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. - Delete a reaction to an [issue](https://docs.github.com/rest/reference/issues/). + **Note**: Previously `/repos/:owner/:repo/hooks/:hook_id/test` tags: - - reactions - operationId: reactions/delete-for-issue + - repos + operationId: repos/test-push-webhook externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-an-issue-reaction + url: https://docs.github.com/enterprise-server@3.6/rest/webhooks/repos#test-the-push-repository-webhook parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - "$ref": "#/components/parameters/reaction-id" + - "$ref": "#/components/parameters/hook-id" responses: '204': description: Response + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/issues/{issue_number}/timeline": + category: webhooks + subcategory: repos + "/repos/{owner}/{repo}/installation": get: - summary: List timeline events for an issue - description: '' + summary: Get a repository installation for the authenticated app + description: |- + 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/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - - issues - operationId: issues/list-events-for-timeline + - apps + operationId: apps/get-repo-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-timeline-events-for-an-issue + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-a-repository-installation-for-the-authenticated-app parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/issue-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/timeline-issue-events" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/schemas/installation" + examples: + default: + "$ref": "#/components/examples/installation" + '301': + "$ref": "#/components/responses/moved_permanently" '404': "$ref": "#/components/responses/not_found" - '410': - "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: issues - subcategory: timeline - "/repos/{owner}/{repo}/keys": + enabledForGitHubApps: false + category: apps + subcategory: + "/repos/{owner}/{repo}/invitations": get: - summary: List deploy keys - description: '' + summary: List repository invitations + description: When authenticating as a user with admin rights to a repository, + this endpoint will list all currently open repository invitations. tags: - repos - operationId: repos/list-deploy-keys + operationId: repos/list-invitations externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-deploy-keys + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#list-repository-invitations parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -25415,146 +24637,163 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/deploy-key" + "$ref": "#/components/schemas/repository-invitation" examples: default: - "$ref": "#/components/examples/deploy-key-items" + "$ref": "#/components/examples/repository-invitation-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: keys - post: - summary: Create a deploy key - description: You can create a read-only deploy key. + category: collaborators + subcategory: invitations + "/repos/{owner}/{repo}/invitations/{invitation_id}": + patch: + summary: Update a repository invitation + description: '' tags: - repos - operationId: repos/create-deploy-key + operationId: repos/update-invitation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-deploy-key + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#update-a-repository-invitation parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/invitation-id" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - title: - type: string - description: A name for the key. - key: + permissions: type: string - description: The contents of the key. - read_only: - type: boolean - description: "If `true`, the key will only be able to read repository - contents. Otherwise, the key will be able to read and write. \n - \ \nDeploy keys with write access can perform the same actions - as an organization member with admin access, or a collaborator - on a personal repository. For more information, see \"[Repository - permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)\" - and \"[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/).\"" - required: - - key - example: - title: octocat@octomac - key: ssh-rsa AAA... - read_only: true - responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/deploy-key" - examples: - default: - "$ref": "#/components/examples/deploy-key" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/keys/1 - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: keys - "/repos/{owner}/{repo}/keys/{key_id}": - get: - summary: Get a deploy key - description: '' - tags: - - repos - operationId: repos/get-deploy-key - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-deploy-key - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/key-id" + description: The permissions that the associated user will have + on the repository. Valid values are `read`, `write`, `maintain`, + `triage`, and `admin`. + enum: + - read + - write + - maintain + - triage + - admin + examples: + default: + summary: Example request body + value: + permissions: write responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/deploy-key" + "$ref": "#/components/schemas/repository-invitation" examples: default: - "$ref": "#/components/examples/deploy-key" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/repository-invitation" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: keys + category: collaborators + subcategory: invitations delete: - summary: Delete a deploy key - description: Deploy keys are immutable. If you need to update a key, remove - the key and create a new one instead. + summary: Delete a repository invitation + description: '' tags: - repos - operationId: repos/delete-deploy-key + operationId: repos/delete-invitation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-deploy-key + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#delete-a-repository-invitation parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/key-id" + - "$ref": "#/components/parameters/invitation-id" responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: keys - "/repos/{owner}/{repo}/labels": + category: collaborators + subcategory: invitations + "/repos/{owner}/{repo}/issues": get: - summary: List labels for a repository - description: '' + summary: List repository issues + description: |- + 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. tags: - issues - operationId: issues/list-labels-for-repo + operationId: issues/list-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-labels-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-repository-issues parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: milestone + description: 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. + in: query + required: false + schema: + type: string + - name: state + description: Indicates the state of the issues to return. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - name: assignee + description: Can be the name of a user. Pass in `none` for issues with no + assigned user, and `*` for issues assigned to any user. + in: query + required: false + schema: + type: string + - name: creator + description: The user that created the issue. + in: query + required: false + schema: + type: string + - name: mentioned + description: A user that's mentioned in the issue. + in: query + required: false + schema: + type: string + - "$ref": "#/components/parameters/labels" + - name: sort + description: What to sort results by. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - comments + default: created + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/since" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -25565,29 +24804,36 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/label-items" + "$ref": "#/components/examples/issue-items" headers: Link: "$ref": "#/components/headers/link" + '301': + "$ref": "#/components/responses/moved_permanently" + '422': + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: labels + subcategory: post: - summary: Create a label - description: '' + summary: Create an issue + description: |- + Any user with pull access to a repository can create an issue. If [issues are disabled in the repository](https://docs.github.com/articles/disabling-issues/), the API returns a `410 Gone` status. + + This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - issues - operationId: issues/create-label + operationId: issues/create externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#create-a-label + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#create-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -25598,291 +24844,316 @@ paths: schema: type: object properties: - name: - type: string - description: The name of the label. Emoji can be added to label - names, using either native emoji or colon-style markup. For example, - typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png - ":strawberry:"). For a full list of available emoji and codes, - see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." - color: + title: + oneOf: + - type: string + - type: integer + description: The title of the issue. + body: type: string - description: The [hexadecimal color code](http://www.color-hex.com/) - for the label, without the leading `#`. - description: + description: The contents of the issue. + assignee: type: string - description: A short description of the label. Must be 100 characters - or fewer. + description: 'Login for the user that this issue should be assigned + to. _NOTE: Only users with push access can set the assignee for + new issues. The assignee is silently dropped otherwise. **This + field is deprecated.**_' + nullable: true + milestone: + oneOf: + - type: string + - type: integer + description: 'The `number` of the milestone to associate this + issue with. _NOTE: Only users with push access can set the milestone + for new issues. The milestone is silently dropped otherwise._' + nullable: true + labels: + type: array + description: 'Labels to associate with this issue. _NOTE: Only users + with push access can set labels for new issues. Labels are silently + dropped otherwise._' + items: + oneOf: + - type: string + - type: object + properties: + id: + type: integer + name: + type: string + description: + type: string + nullable: true + color: + type: string + nullable: true + assignees: + type: array + description: 'Logins for Users to assign to this issue. _NOTE: Only + users with push access can set assignees for new issues. Assignees + are silently dropped otherwise._' + items: + type: string required: - - name - example: - name: bug - description: Something isn't working - color: f29513 + - title + examples: + default: + value: + title: Found a bug + body: I'm having a problem with this. + assignees: + - octocat + milestone: 1 + labels: + - bug responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/label" + "$ref": "#/components/examples/issue" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/labels/bug + example: https://api.github.com/repos/octocat/Hello-World/issues/1347 schema: type: string + '403': + "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" + '503': + "$ref": "#/components/responses/service_unavailable" '404': "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: labels - "/repos/{owner}/{repo}/labels/{name}": + subcategory: + "/repos/{owner}/{repo}/issues/comments": get: - summary: Get a label - description: '' + summary: List issue comments for a repository + description: By default, Issue Comments are ordered by ascending ID. tags: - issues - operationId: issues/get-label + operationId: issues/list-comments-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#get-a-label + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-issue-comments-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: name - in: path - required: true + - "$ref": "#/components/parameters/sort" + - name: direction + description: Either `asc` or `desc`. Ignored without the `sort` parameter. + in: query + required: false schema: type: string + enum: + - asc + - desc + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/label" + type: array + items: + "$ref": "#/components/schemas/issue-comment" examples: default: - "$ref": "#/components/examples/label" + "$ref": "#/components/examples/issue-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: labels - patch: - summary: Update a label + subcategory: comments + "/repos/{owner}/{repo}/issues/comments/{comment_id}": + get: + summary: Get an issue comment description: '' tags: - issues - operationId: issues/update-label + operationId: issues/get-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#update-a-label + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#get-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: name - in: path - required: true - schema: - type: string - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - new_name: - type: string - description: The new name of the label. Emoji can be added to label - names, using either native emoji or colon-style markup. For example, - typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png - ":strawberry:"). For a full list of available emoji and codes, - see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." - color: - type: string - description: The [hexadecimal color code](http://www.color-hex.com/) - for the label, without the leading `#`. - description: - type: string - description: A short description of the label. Must be 100 characters - or fewer. - example: - new_name: 'bug :bug:' - description: Small bug fix required - color: b01f26 + - "$ref": "#/components/parameters/comment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/issue-comment" examples: default: - "$ref": "#/components/examples/label-2" + "$ref": "#/components/examples/issue-comment" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: labels - delete: - summary: Delete a label + subcategory: comments + patch: + summary: Update an issue comment description: '' tags: - issues - operationId: issues/delete-label + operationId: issues/update-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#delete-a-label + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#update-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: name - in: path + - "$ref": "#/components/parameters/comment-id" + requestBody: required: true - schema: - type: string - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: issues - subcategory: labels - "/repos/{owner}/{repo}/languages": - get: - summary: List repository languages - description: Lists languages for the specified repository. The value shown for - each language is the number of bytes of code written in that language. - tags: - - repos - operationId: repos/list-languages - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-languages - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The contents of the comment. + required: + - body + examples: + default: + value: + body: Me too responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/language" + "$ref": "#/components/schemas/issue-comment" examples: default: - "$ref": "#/components/examples/language" + "$ref": "#/components/examples/issue-comment" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/lfs": - put: - summary: Enable Git LFS for a repository - description: '' - operationId: repos/enable-lfs-for-repo - tags: - - repos - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#enable-git-lfs-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '202': - "$ref": "#/components/responses/accepted" - '403': - description: |- - We will return a 403 with one of the following messages: - - - Git LFS support not enabled because Git LFS is globally disabled. - - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. - - Git LFS support not enabled because Git LFS is disabled for . - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: repos - subcategory: lfs + category: issues + subcategory: comments delete: - summary: Disable Git LFS for a repository + summary: Delete an issue comment description: '' - operationId: repos/disable-lfs-for-repo tags: - - repos + - issues + operationId: issues/delete-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#disable-git-lfs-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#delete-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/comment-id" responses: '204': description: Response x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: repos - subcategory: lfs - "/repos/{owner}/{repo}/license": + enabledForGitHubApps: true + category: issues + subcategory: comments + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions": get: - summary: Get the license for a repository - description: |- - 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. + summary: List reactions for an issue comment + description: List the reactions to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). tags: - - licenses - operationId: licenses/get-for-repo + - reactions + operationId: reactions/list-for-issue-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/licenses/#get-the-license-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/comment-id" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to an issue comment. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/license-content" + type: array + items: + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/license-content" + "$ref": "#/components/examples/reaction-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: licenses - subcategory: - "/repos/{owner}/{repo}/merge-upstream": + category: reactions + subcategory: post: - summary: Sync a fork branch with the upstream repository - description: Sync a branch of a forked repository to keep it up-to-date with - the upstream repository. + summary: Create reaction for an issue comment + description: Create a reaction to an [issue comment](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#comments). + A response with an HTTP `200` status means that you already added the reaction + type to this issue comment. tags: - - repos - operationId: repos/merge-upstream + - reactions + operationId: reactions/create-for-issue-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -25890,141 +25161,90 @@ paths: schema: type: object properties: - branch: + content: type: string - description: The name of the branch which should be updated to match - upstream. + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the issue comment. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes required: - - branch - example: - branch: main - responses: - '200': - description: The branch has been successfully synced with the upstream repository + - content + examples: + default: + value: + content: heart + responses: + '200': + description: Reaction exists content: application/json: schema: - "$ref": "#/components/schemas/merged-upstream" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/merged-upstream" - '409': - description: The branch could not be synced because of a merge conflict + "$ref": "#/components/examples/reaction" + '201': + description: Reaction created + content: + application/json: + schema: + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" '422': - description: The branch could not be synced for some other reason + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: branches - "/repos/{owner}/{repo}/merges": - post: - summary: Merge a branch - description: '' + category: reactions + subcategory: + "/repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}": + delete: + summary: Delete an issue comment reaction + description: |- + **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/enterprise-server@3.6/rest/reference/issues#comments). tags: - - repos - operationId: repos/merge + - reactions + operationId: reactions/delete-for-issue-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#merge-a-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-an-issue-comment-reaction parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - base: - type: string - description: The name of the base branch that the head will be merged - into. - head: - type: string - description: The head to merge. This can be a branch name or a commit - SHA1. - commit_message: - type: string - description: Commit message to use for the merge commit. If omitted, - a default message will be used. - required: - - base - - head - example: - base: master - head: cool_feature - commit_message: Shipped cool_feature! + - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/reaction-id" responses: - '201': - description: Successful Response (The resulting merge commit) - content: - application/json: - schema: - "$ref": "#/components/schemas/commit" - examples: - default: - "$ref": "#/components/examples/commit" '204': - description: Response when already merged - '404': - description: Not Found when the base or head does not exist - '409': - description: Conflict when there is a merge conflict - '403': - "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" + description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: merging - "/repos/{owner}/{repo}/milestones": + category: reactions + subcategory: + "/repos/{owner}/{repo}/issues/events": get: - summary: List milestones + summary: List issue events for a repository description: '' tags: - issues - operationId: issues/list-milestones + operationId: issues/list-events-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-milestones + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-issue-events-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: state - description: The state of the milestone. Either `open`, `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - name: sort - description: What to sort results by. Either `due_on` or `completeness`. - in: query - required: false - schema: - type: string - enum: - - due_on - - completeness - default: due_on - - name: direction - description: The direction of the sort. Either `asc` or `desc`. - in: query - required: false - schema: - type: string - enum: - - asc - - desc - default: asc - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -26035,132 +25255,120 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/milestone" + "$ref": "#/components/schemas/issue-event" examples: default: - "$ref": "#/components/examples/milestone-items" + "$ref": "#/components/examples/issue-event-items" headers: Link: "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: milestones - post: - summary: Create a milestone + subcategory: events + "/repos/{owner}/{repo}/issues/events/{event_id}": + get: + summary: Get an issue event description: '' tags: - issues - operationId: issues/create-milestone + operationId: issues/get-event externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#create-a-milestone + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#get-an-issue-event parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - requestBody: + - name: event_id + in: path required: true - content: - application/json: - schema: - type: object - properties: - title: - type: string - description: The title of the milestone. - state: - type: string - description: The state of the milestone. Either `open` or `closed`. - enum: - - open - - closed - default: open - description: - type: string - description: A description of the milestone. - due_on: - type: string - format: date-time - description: 'The milestone due date. This is a timestamp in [ISO - 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.' - required: - - title - example: - title: v1.0 - state: open - description: Tracking milestone for version 1.0 - due_on: '2012-10-09T23:39:01Z' + schema: + type: integer responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/milestone" + "$ref": "#/components/schemas/issue-event" examples: default: - "$ref": "#/components/examples/milestone" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/milestones/1 - schema: - type: string + "$ref": "#/components/examples/issue-event" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + '410': + "$ref": "#/components/responses/gone" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: milestones - "/repos/{owner}/{repo}/milestones/{milestone_number}": + subcategory: events + "/repos/{owner}/{repo}/issues/{issue_number}": get: - summary: Get a milestone - description: '' + summary: Get an issue + description: |- + The API returns a [`301 Moved Permanently` status](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-redirects-redirects) if the issue was + [transferred](https://docs.github.com/articles/transferring-an-issue-to-another-repository/) to another repository. If + the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API + returns a `404 Not Found` status. If the issue was deleted from a repository where the authenticated user has read + access, the API returns a `410 Gone` status. To receive webhook events for transferred and deleted issues, subscribe + to the [`issues`](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. tags: - issues - operationId: issues/get-milestone + operationId: issues/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#get-a-milestone + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#get-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/milestone-number" + - "$ref": "#/components/parameters/issue-number" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/milestone" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/milestone" + "$ref": "#/components/examples/issue" + '301': + "$ref": "#/components/responses/moved_permanently" '404': "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: milestones + subcategory: patch: - summary: Update a milestone - description: '' + summary: Update an issue + description: Issue owners and users with push access can edit an issue. tags: - issues - operationId: issues/update-milestone + operationId: issues/update externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#update-a-milestone + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues/#update-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/milestone-number" + - "$ref": "#/components/parameters/issue-number" requestBody: required: false content: @@ -26169,119 +25377,225 @@ paths: type: object properties: title: + oneOf: + - type: string + - type: integer + description: The title of the issue. + nullable: true + body: type: string - description: The title of the milestone. + description: The contents of the issue. + nullable: true + assignee: + type: string + nullable: true + description: Login for the user that this issue should be assigned + to. **This field is deprecated.** state: type: string - description: The state of the milestone. Either `open` or `closed`. + description: State of the issue. Either `open` or `closed`. enum: - open - closed - default: open - description: - type: string - description: A description of the milestone. - due_on: + state_reason: type: string - format: date-time - description: 'The milestone due date. This is a timestamp in [ISO - 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.' - example: - title: v1.0 - state: open - description: Tracking milestone for version 1.0 - due_on: '2012-10-09T23:39:01Z' + enum: + - completed + - not_planned + - reopened + nullable: true + description: The reason for the current state + example: not_planned + milestone: + oneOf: + - type: string + - type: integer + description: 'The `number` of the milestone to associate this + issue with or `null` to remove current. _NOTE: Only users with + push access can set the milestone for issues. The milestone + is silently dropped otherwise._' + nullable: true + labels: + type: array + description: 'Labels to associate with this issue. Pass one or more + Labels to _replace_ the set of Labels on this Issue. Send an empty + array (`[]`) to clear all Labels from the Issue. _NOTE: Only users + with push access can set labels for issues. Labels are silently + dropped otherwise._' + items: + oneOf: + - type: string + - type: object + properties: + id: + type: integer + name: + type: string + description: + type: string + nullable: true + color: + type: string + nullable: true + assignees: + type: array + description: 'Logins for Users to assign to this issue. Pass one + or more user logins to _replace_ the set of assignees on this + Issue. Send an empty array (`[]`) to clear all assignees from + the Issue. _NOTE: Only users with push access can set assignees + for new issues. Assignees are silently dropped otherwise._' + items: + type: string + examples: + default: + value: + title: Found a bug + body: I'm having a problem with this. + assignees: + - octocat + milestone: 1 + state: open + labels: + - bug responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/milestone" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/milestone" + "$ref": "#/components/examples/issue" + '422': + "$ref": "#/components/responses/validation_failed" + '503': + "$ref": "#/components/responses/service_unavailable" + '403': + "$ref": "#/components/responses/forbidden" + '301': + "$ref": "#/components/responses/moved_permanently" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: milestones - delete: - summary: Delete a milestone - description: '' + subcategory: + "/repos/{owner}/{repo}/issues/{issue_number}/assignees": + post: + summary: Add assignees to an issue + description: Adds up to 10 assignees to an issue. Users already assigned to + an issue are not replaced. tags: - issues - operationId: issues/delete-milestone + operationId: issues/add-assignees externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#delete-a-milestone + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-assignees-to-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/milestone-number" + - "$ref": "#/components/parameters/issue-number" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + assignees: + type: array + description: 'Usernames of people to assign this issue to. _NOTE: + Only users with push access can add assignees to an issue. Assignees + are silently ignored otherwise._' + items: + type: string + examples: + default: + value: + assignees: + - hubot + - other_user responses: - '204': + '201': description: Response - '404': - "$ref": "#/components/responses/not_found" + content: + application/json: + schema: + "$ref": "#/components/schemas/issue" + examples: + default: + "$ref": "#/components/examples/issue" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: milestones - "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": - get: - summary: List labels for issues in a milestone - description: '' + subcategory: assignees + delete: + summary: Remove assignees from an issue + description: Removes one or more assignees from an issue. tags: - issues - operationId: issues/list-labels-for-milestone + operationId: issues/remove-assignees externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-labels-for-issues-in-a-milestone + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#remove-assignees-from-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/milestone-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/issue-number" + requestBody: + content: + application/json: + schema: + type: object + properties: + assignees: + type: array + description: 'Usernames of assignees to remove from an issue. _NOTE: + Only users with push access can remove assignees from an issue. + Assignees are silently ignored otherwise._' + items: + type: string + examples: + default: + value: + assignees: + - hubot + - other_user responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/label" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/label-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/issue" x-github: githubCloudOnly: false enabledForGitHubApps: true category: issues - subcategory: labels - "/repos/{owner}/{repo}/notifications": + subcategory: assignees + "/repos/{owner}/{repo}/issues/{issue_number}/comments": get: - summary: List repository notifications for the authenticated user - description: List all notifications for the current user. + summary: List issue comments + description: Issue Comments are ordered by ascending ID. tags: - - activity - operationId: activity/list-repo-notifications-for-authenticated-user + - issues + operationId: issues/list-comments externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repository-notifications-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-issue-comments parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/all" - - "$ref": "#/components/parameters/participating" + - "$ref": "#/components/parameters/issue-number" - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/before" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -26292,302 +25606,391 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/thread" + "$ref": "#/components/schemas/issue-comment" examples: default: - "$ref": "#/components/examples/thread-items" + "$ref": "#/components/examples/issue-comment-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: notifications - put: - summary: Mark repository notifications as read - description: 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`. + enabledForGitHubApps: true + category: issues + subcategory: comments + post: + summary: Create an issue comment + description: This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). + Creating content too quickly using this endpoint may result in secondary rate + limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" + and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" + for details. tags: - - activity - operationId: activity/mark-repo-notifications-as-read + - issues + operationId: issues/create-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#mark-repository-notifications-as-read + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#create-an-issue-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - last_read_at: + body: type: string - format: date-time - description: 'Describes the last point that notifications were checked. - Anything updated since this time will not be marked as read. If - you omit this parameter, all notifications are marked as read. - This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.' + description: The contents of the comment. + required: + - body + examples: + default: + value: + body: Me too responses: - '202': + '201': description: Response content: application/json: schema: - type: object - properties: - message: - type: string - url: - type: string - '205': - description: Reset Content + "$ref": "#/components/schemas/issue-comment" + examples: + default: + "$ref": "#/components/examples/issue-comment" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/issues/comments/1 + schema: + type: string + '403': + "$ref": "#/components/responses/forbidden" + '410': + "$ref": "#/components/responses/gone" + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: notifications - "/repos/{owner}/{repo}/pages": + enabledForGitHubApps: true + category: issues + subcategory: comments + "/repos/{owner}/{repo}/issues/{issue_number}/events": get: - summary: Get a GitHub Pages site + summary: List issue events description: '' tags: - - repos - operationId: repos/get-pages + - issues + operationId: issues/list-events externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-github-pages-site + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-issue-events parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/page" + type: array + items: + "$ref": "#/components/schemas/issue-event-for-issue" examples: default: - "$ref": "#/components/examples/page" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/issue-event-for-issue-items" + headers: + Link: + "$ref": "#/components/headers/link" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages + category: issues + subcategory: events + "/repos/{owner}/{repo}/issues/{issue_number}/labels": + get: + summary: List labels for an issue + description: '' + tags: + - issues + operationId: issues/list-labels-on-issue + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-labels-for-an-issue + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/label" + examples: + default: + "$ref": "#/components/examples/label-items" + headers: + Link: + "$ref": "#/components/headers/link" + '301': + "$ref": "#/components/responses/moved_permanently" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: issues + subcategory: labels post: - summary: Create a GitHub Pages site - description: Configures a GitHub Pages site. For more information, see "[About - GitHub Pages](/github/working-with-github-pages/about-github-pages)." + summary: Add labels to an issue + description: '' tags: - - repos - operationId: repos/create-pages-site + - issues + operationId: issues/add-labels externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-github-pages-site + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" requestBody: - required: true + required: false content: application/json: schema: - type: object - description: The source branch and directory used to publish your Pages - site. - nullable: true - properties: - source: + oneOf: + - type: object + properties: + labels: + type: array + minItems: 1 + description: The names of the labels to add to the issue's existing + labels. You can pass an empty array to remove all labels. Alternatively, + you can pass a single label as a `string` or an `array` of labels + directly, but GitHub recommends passing an object with the `labels` + key. You can also replace all of the labels for an issue. For + more information, see "[Set labels for an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue)." + items: + type: string + - type: array + minItems: 1 + items: + type: string + - type: object + properties: + labels: + type: array + minItems: 1 + items: + type: object + properties: + name: + type: string + required: + - name + - type: array + minItems: 1 + items: type: object - description: The source branch and directory used to publish your - Pages site. properties: - branch: - type: string - description: The repository branch used to publish your site's - source files. - path: + name: type: string - description: 'The repository directory that includes the source - files for the Pages site. Allowed paths are `/` or `/docs`. - Default: `/`' - enum: - - "/" - - "/docs" - default: "/" required: - - branch - required: - - source - example: - source: - branch: main - path: "/docs" + - name + - type: string + examples: + default: + value: + labels: + - bug + - enhancement responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/page" + type: array + items: + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/page" + "$ref": "#/components/examples/label-items" + '301': + "$ref": "#/components/responses/moved_permanently" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" '422': "$ref": "#/components/responses/validation_failed" - '409': - "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages + category: issues + subcategory: labels put: - summary: Update information about a GitHub Pages site - description: Updates information for a GitHub Pages site. For more information, - see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). + summary: Set labels for an issue + description: Removes any previous labels and sets the new labels for an issue. tags: - - repos - operationId: repos/update-information-about-pages-site + - issues + operationId: issues/set-labels externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-information-about-a-github-pages-site + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#set-labels-for-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" requestBody: - required: true + required: false content: application/json: schema: - type: object - properties: - cname: + oneOf: + - type: object + properties: + labels: + type: array + minItems: 1 + description: The names of the labels to set for the issue. The + labels you set replace any existing labels. You can pass an + empty array to remove all labels. Alternatively, you can pass + a single label as a `string` or an `array` of labels directly, + but GitHub recommends passing an object with the `labels` key. + You can also add labels to the existing labels for an issue. + For more information, see "[Add labels to an issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues#add-labels-to-an-issue)." + items: + type: string + - type: array + minItems: 1 + items: type: string - description: Specify a custom domain for the repository. Sending - a `null` value will remove the custom domain. For more about custom - domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." - nullable: true - https_enforced: - type: boolean - description: Specify whether HTTPS should be enforced for the repository. - public: - type: boolean - description: Configures access controls for the GitHub Pages site. - If public is set to `true`, the site is accessible to anyone on - the internet. If set to `false`, the site will only be accessible - to users who have at least `read` access to the repository that - published the site. This includes anyone in your Enterprise if - the repository is set to `internal` visibility. This feature is - only available to repositories in an organization on an Enterprise - plan. - source: - anyOf: - - type: string - description: Update the source for the repository. Must include - the branch name, and may optionally specify the subdirectory - `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master - /docs"`. - enum: - - gh-pages - - master - - master /docs - - type: object - description: Update the source for the repository. Must include - the branch name and path. - properties: - branch: - type: string - description: The repository branch used to publish your site's - source files. - path: - type: string - description: The repository directory that includes the source - files for the Pages site. Allowed paths are `/` or `/docs`. - enum: - - "/" - - "/docs" - required: - - branch - - path - anyOf: - - required: - - source - - required: - - cname - - required: - - public - - required: - - https_enforced - example: - cname: octocatblog.com - source: - branch: main - path: "/" + - type: object + properties: + labels: + type: array + minItems: 1 + items: + type: object + properties: + name: + type: string + required: + - name + - type: array + minItems: 1 + items: + type: object + properties: + name: + type: string + required: + - name + - type: string + examples: + default: + value: + labels: + - bug + - enhancement responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/label" + examples: + default: + "$ref": "#/components/examples/label-items" + '301': + "$ref": "#/components/responses/moved_permanently" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" '422': "$ref": "#/components/responses/validation_failed" - '400': - "$ref": "#/components/responses/bad_request" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages + category: issues + subcategory: labels delete: - summary: Delete a GitHub Pages site + summary: Remove all labels from an issue description: '' tags: - - repos - operationId: repos/delete-pages-site + - issues + operationId: issues/remove-all-labels externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-github-pages-site + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#remove-all-labels-from-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" responses: '204': description: Response - '422': - "$ref": "#/components/responses/validation_failed" + '301': + "$ref": "#/components/responses/moved_permanently" '404': "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages - "/repos/{owner}/{repo}/pages/builds": - get: - summary: List GitHub Pages builds - description: '' + category: issues + subcategory: labels + "/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}": + delete: + summary: Remove a label from an issue + description: 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. tags: - - repos - operationId: repos/list-pages-builds + - issues + operationId: issues/remove-label externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-github-pages-builds + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#remove-a-label-from-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/issue-number" + - name: name + in: path + required: true + schema: + type: string responses: '200': description: Response @@ -26596,182 +25999,132 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/page-build" + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/page-build-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/label-items-2" + '301': + "$ref": "#/components/responses/moved_permanently" + '404': + "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages - post: - summary: Request a GitHub Pages build + category: issues + subcategory: labels + "/repos/{owner}/{repo}/issues/{issue_number}/lock": + put: + summary: Lock an issue description: |- - 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. + Users with push access can lock an issue or pull request's conversation. - 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. - tags: - - repos - operationId: repos/request-pages-build - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#request-a-github-pages-build - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '201': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/page-build-status" - examples: - default: - "$ref": "#/components/examples/page-build-status" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: pages - "/repos/{owner}/{repo}/pages/builds/latest": - get: - summary: Get latest Pages build - description: '' - tags: - - repos - operationId: repos/get-latest-pages-build - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-latest-pages-build - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/page-build" - examples: - default: - "$ref": "#/components/examples/page-build" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: pages - "/repos/{owner}/{repo}/pages/builds/{build_id}": - get: - summary: Get GitHub Pages build - description: '' + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - - repos - operationId: repos/get-pages-build + - issues + operationId: issues/lock externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-github-pages-build + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#lock-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: build_id - in: path - required: true - schema: - type: integer + - "$ref": "#/components/parameters/issue-number" + requestBody: + required: false + content: + application/json: + schema: + type: object + nullable: true + properties: + lock_reason: + type: string + description: "The reason for locking the issue or pull request conversation. + Lock will fail if you don't use one of these reasons: \n\\* `off-topic` + \ \n\\* `too heated` \n\\* `resolved` \n\\* `spam`" + enum: + - off-topic + - too heated + - resolved + - spam + examples: + default: + summary: Example of locking an issue as off-topic + value: + lock_reason: off-topic responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/page-build" - examples: - default: - "$ref": "#/components/examples/page-build" + '403': + "$ref": "#/components/responses/forbidden" + '410': + "$ref": "#/components/responses/gone" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages - "/repos/{owner}/{repo}/pages/health": - get: - summary: Get a DNS health check for GitHub Pages - description: |- - Gets a health check of the DNS settings for the `CNAME` record configured for a repository's GitHub Pages. - - The first request to this endpoint returns a `202 Accepted` status and starts an asynchronous background task to get the results for the domain. After the background task completes, subsequent requests to this endpoint return a `200 OK` status with the health check results in the response. - - Users must have admin or owner permissions. GitHub Apps must have the `pages:write` and `administration:write` permission to use this endpoint. + category: issues + subcategory: + delete: + summary: Unlock an issue + description: Users with push access can unlock an issue's conversation. tags: - - repos - operationId: repos/get-pages-health-check + - issues + operationId: issues/unlock externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-dns-health-check-for-github-pages + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#unlock-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/pages-health-check" - examples: - default: - "$ref": "#/components/examples/pages-health-check" - '202': - description: Empty response - content: - application/json: - schema: - "$ref": "#/components/schemas/empty-object" - '400': - description: Custom domains are not available for GitHub Pages - '422': - description: There isn't a CNAME for this page + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: pages - "/repos/{owner}/{repo}/projects": + category: issues + subcategory: + "/repos/{owner}/{repo}/issues/{issue_number}/reactions": get: - summary: List repository projects - description: 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. + summary: List reactions for an issue + description: List the reactions to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues). tags: - - projects - operationId: projects/list-for-repo + - reactions + operationId: reactions/list-for-issue externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-repository-projects + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: state - description: Indicates the state of the projects to return. Can be either - `open`, `closed`, or `all`. + - "$ref": "#/components/parameters/issue-number" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to an issue. in: query required: false schema: type: string enum: - - open - - closed - - all - default: open + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -26782,43 +26135,37 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-items-2" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" '410': "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: + category: reactions + subcategory: post: - summary: Create a repository project - description: 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. + summary: Create reaction for an issue + description: Create a reaction to an [issue](https://docs.github.com/enterprise-server@3.6/rest/reference/issues/). + A response with an HTTP `200` status means that you already added the reaction + type to this issue. tags: - - projects - operationId: projects/create-for-repo + - reactions + operationId: reactions/create-for-issue externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#create-a-repository-project + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-an-issue parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" requestBody: required: true content: @@ -26826,108 +26173,130 @@ paths: schema: type: object properties: - name: - type: string - description: The name of the project. - body: + content: type: string - description: The description of the project. + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the issue. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes required: - - name - example: - name: Projects Documentation - body: Developer documentation project for the developer site. + - content + examples: + default: + value: + content: heart responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/project-3" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/reaction" + '422': + "$ref": "#/components/responses/validation_failed" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: reactions + subcategory: + "/repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}": + delete: + summary: Delete an issue reaction + description: |- + **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/enterprise-server@3.6/rest/reference/issues/). + tags: + - reactions + operationId: reactions/delete-for-issue + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-an-issue-reaction + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/reaction-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: reactions + subcategory: + "/repos/{owner}/{repo}/issues/{issue_number}/timeline": + get: + summary: List timeline events for an issue + description: '' + tags: + - issues + operationId: issues/list-events-for-timeline + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-timeline-events-for-an-issue + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/issue-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/timeline-issue-events" + examples: + default: + "$ref": "#/components/examples/timeline-issue-events" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" '410': "$ref": "#/components/responses/gone" - '422': - "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: projects - subcategory: - "/repos/{owner}/{repo}/pulls": + category: issues + subcategory: timeline + "/repos/{owner}/{repo}/keys": get: - summary: List pull requests - description: Draft pull requests are available in public repositories with GitHub - Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository - billing plans, and in public and private repositories with GitHub Team and - GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) - in the GitHub Help documentation. + summary: List deploy keys + description: '' tags: - - pulls - operationId: pulls/list + - repos + operationId: repos/list-deploy-keys externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-pull-requests + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-deploy-keys parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: state - description: Either `open`, `closed`, or `all` to filter by state. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - name: head - description: '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`.' - in: query - required: false - schema: - type: string - - name: base - description: 'Filter pulls by base branch name. Example: `gh-pages`.' - in: query - required: false - schema: - type: string - - name: sort - description: 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). - in: query - required: false - schema: - type: string - enum: - - created - - updated - - popularity - - long-running - default: created - - name: direction - description: 'The direction of the sort. Can be either `asc` or `desc`. Default: - `desc` when sort is `created` or sort is not specified, otherwise `asc`.' - in: query - required: false - schema: - type: string - enum: - - asc - - desc - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -26938,38 +26307,27 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/pull-request-simple" + "$ref": "#/components/schemas/deploy-key" examples: default: - "$ref": "#/components/examples/pull-request-simple-items" + "$ref": "#/components/examples/deploy-key-items" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: + category: repos + subcategory: keys post: - summary: Create a pull request - description: |- - Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - - You can create a new pull request. - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. + summary: Create a deploy key + description: You can create a read-only deploy key. tags: - - pulls - operationId: pulls/create + - repos + operationId: repos/create-deploy-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#create-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-deploy-key parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -26982,165 +26340,151 @@ paths: properties: title: type: string - description: The title of the new pull request. - head: - type: string - description: 'The name of the branch where your changes are implemented. - For cross-repository pull requests in the same network, namespace - `head` with a user like this: `username:branch`.' - base: - type: string - description: The name of the branch you want the changes pulled - into. This should be an existing branch on the current repository. - You cannot submit a pull request to one repository that requests - a merge to a base of another repository. - body: + description: A name for the key. + key: type: string - description: The contents of the pull request. - maintainer_can_modify: - type: boolean - description: Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) - the pull request. - draft: + description: The contents of the key. + read_only: type: boolean - description: Indicates whether the pull request is a draft. See - "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" - in the GitHub Help documentation to learn more. - issue: - type: integer - example: 1 + description: "If `true`, the key will only be able to read repository + contents. Otherwise, the key will be able to read and write. \n + \ \nDeploy keys with write access can perform the same actions + as an organization member with admin access, or a collaborator + on a personal repository. For more information, see \"[Repository + permission levels for an organization](https://docs.github.com/articles/repository-permission-levels-for-an-organization/)\" + and \"[Permission levels for a user account repository](https://docs.github.com/articles/permission-levels-for-a-user-account-repository/).\"" required: - - head - - base - example: - title: Amazing new feature - body: Please pull these awesome changes in! - head: octocat:new-feature - base: master + - key + examples: + default: + value: + title: octocat@octomac + key: ssh-rsa AAA... + read_only: true responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request" + "$ref": "#/components/schemas/deploy-key" examples: default: - "$ref": "#/components/examples/pull-request" + "$ref": "#/components/examples/deploy-key" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/pulls/1347 + example: https://api.github.com/repos/octocat/Hello-World/keys/1 schema: type: string - '403': - "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: - "/repos/{owner}/{repo}/pulls/comments": + category: repos + subcategory: keys + "/repos/{owner}/{repo}/keys/{key_id}": get: - summary: List review comments in a repository - description: Lists review comments for all pull requests in a repository. By - default, review comments are in ascending order by ID. + summary: Get a deploy key + description: '' tags: - - pulls - operationId: pulls/list-review-comments-for-repo + - repos + operationId: repos/get-deploy-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-review-comments-in-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-deploy-key parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: sort - in: query - required: false - schema: - type: string - enum: - - created - - updated - - created_at - - name: direction - description: Can be either `asc` or `desc`. Ignored without `sort` parameter. - in: query - required: false - schema: - type: string - enum: - - asc - - desc - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/key-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/pull-request-review-comment" + "$ref": "#/components/schemas/deploy-key" examples: default: - "$ref": "#/components/examples/pull-request-review-comment-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/deploy-key" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: comments - "/repos/{owner}/{repo}/pulls/comments/{comment_id}": + category: repos + subcategory: keys + delete: + summary: Delete a deploy key + description: Deploy keys are immutable. If you need to update a key, remove + the key and create a new one instead. + tags: + - repos + operationId: repos/delete-deploy-key + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-deploy-key + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/key-id" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: keys + "/repos/{owner}/{repo}/labels": get: - summary: Get a review comment for a pull request - description: Provides details for a review comment. + summary: List labels for a repository + description: '' tags: - - pulls - operationId: pulls/get-review-comment + - issues + operationId: issues/list-labels-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#get-a-review-comment-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-labels-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review-comment" + type: array + items: + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/pull-request-review-comment-2" + "$ref": "#/components/examples/label-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: comments - patch: - summary: Update a review comment for a pull request - description: Enables you to edit a review comment. + category: issues + subcategory: labels + post: + summary: Create a label + description: '' tags: - - pulls - operationId: pulls/update-review-comment + - issues + operationId: issues/create-label externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#update-a-review-comment-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#create-a-label parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -27148,406 +26492,433 @@ paths: schema: type: object properties: - body: + name: type: string - description: The text of the reply to the review comment. + description: The name of the label. Emoji can be added to label + names, using either native emoji or colon-style markup. For example, + typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png + ":strawberry:"). For a full list of available emoji and codes, + see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." + color: + type: string + description: The [hexadecimal color code](http://www.color-hex.com/) + for the label, without the leading `#`. + description: + type: string + description: A short description of the label. Must be 100 characters + or fewer. required: - - body - example: - body: I like this too! + - name + examples: + default: + value: + name: bug + description: Something isn't working + color: f29513 responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review-comment" + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/pull-request-review-comment-2" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: comments - delete: - summary: Delete a review comment for a pull request - description: Deletes a review comment. - tags: - - pulls - operationId: pulls/delete-review-comment - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/pulls#delete-a-review-comment-for-a-pull-request - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - responses: - '204': - description: Response + "$ref": "#/components/examples/label" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/labels/bug + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: comments - "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": + category: issues + subcategory: labels + "/repos/{owner}/{repo}/labels/{name}": get: - summary: List reactions for a pull request review comment - description: List the reactions to a [pull request review comment](https://docs.github.com/rest/reference/pulls#review-comments). + summary: Get a label + description: '' tags: - - reactions - operationId: reactions/list-for-pull-request-review-comment + - issues + operationId: issues/get-label externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#get-a-label parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - name: content - description: 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. - in: query - required: false + - name: name + in: path + required: true schema: type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/label" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - post: - summary: Create reaction for a pull request review comment - description: Create a reaction to a [pull request review comment](https://docs.github.com/rest/reference/pulls#comments). - A response with an HTTP `200` status means that you already added the reaction - type to this pull request review comment. + category: issues + subcategory: labels + patch: + summary: Update a label + description: '' tags: - - reactions - operationId: reactions/create-for-pull-request-review-comment + - issues + operationId: issues/update-label externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#update-a-label parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - requestBody: + - name: name + in: path required: true + schema: + type: string + requestBody: + required: false content: application/json: schema: type: object properties: - content: + new_name: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the pull request review comment. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - required: - - content - example: - content: heart + description: The new name of the label. Emoji can be added to label + names, using either native emoji or colon-style markup. For example, + typing `:strawberry:` will render the emoji ![:strawberry:](https://github.githubassets.com/images/icons/emoji/unicode/1f353.png + ":strawberry:"). For a full list of available emoji and codes, + see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)." + color: + type: string + description: The [hexadecimal color code](http://www.color-hex.com/) + for the label, without the leading `#`. + description: + type: string + description: A short description of the label. Must be 100 characters + or fewer. + examples: + default: + value: + new_name: 'bug :bug:' + description: Small bug fix required + color: b01f26 responses: '200': - description: Reaction exists - content: - application/json: - schema: - "$ref": "#/components/schemas/reaction" - examples: - default: - "$ref": "#/components/examples/reaction" - '201': - description: Reaction created + description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/reaction" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/label-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": + category: issues + subcategory: labels delete: - summary: Delete a pull request comment reaction - description: |- - **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). + summary: Delete a label + description: '' tags: - - reactions - operationId: reactions/delete-for-pull-request-comment + - issues + operationId: issues/delete-label externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions#delete-a-pull-request-comment-reaction + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#delete-a-label parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/comment-id" - - "$ref": "#/components/parameters/reaction-id" + - name: name + in: path + required: true + schema: + type: string responses: '204': description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: reactions - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}": + category: issues + subcategory: labels + "/repos/{owner}/{repo}/languages": get: - summary: Get a pull request - description: |- - Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - Lists details of a pull request by providing its number. - - When you get, [create](https://docs.github.com/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/rest/reference/pulls#update-a-pull-request) a pull request, GitHub creates a merge commit to test whether the pull request can be automatically merged into the base branch. This test commit is not added to the base branch or the head branch. You can review the status of the test commit using the `mergeable` key. For more information, see "[Checking mergeability of pull requests](https://docs.github.com/rest/guides/getting-started-with-the-git-database-api#checking-mergeability-of-pull-requests)". - - The value of the `mergeable` attribute can be `true`, `false`, or `null`. If the value is `null`, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. - - The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: - - * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. - * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. - * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. - - Pass the appropriate [media type](https://docs.github.com/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. + summary: List repository languages + description: Lists languages for the specified repository. The value shown for + each language is the number of bytes of code written in that language. tags: - - pulls - operationId: pulls/get + - repos + operationId: repos/list-languages externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#get-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-languages parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" responses: '200': - description: 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. + description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request" + "$ref": "#/components/schemas/language" examples: default: - "$ref": "#/components/examples/pull-request" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/language" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: - patch: - summary: Update a pull request + category: repos + subcategory: + "/repos/{owner}/{repo}/lfs": + put: + summary: Enable Git LFS for a repository + description: '' + operationId: repos/enable-lfs-for-repo + tags: + - repos + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#enable-git-lfs-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '202': + "$ref": "#/components/responses/accepted" + '403': + description: |- + We will return a 403 with one of the following messages: + + - Git LFS support not enabled because Git LFS is globally disabled. + - Git LFS support not enabled because Git LFS is disabled for the root repository in the network. + - Git LFS support not enabled because Git LFS is disabled for . + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: repos + subcategory: lfs + delete: + summary: Disable Git LFS for a repository + description: '' + operationId: repos/disable-lfs-for-repo + tags: + - repos + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#disable-git-lfs-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: repos + subcategory: lfs + "/repos/{owner}/{repo}/license": + get: + summary: Get the license for a repository description: |- - Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + This method returns the contents of the repository's license file, if one is detected. - 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. + Similar to [Get repository content](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-repository-content), this method also supports [custom media types](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) for retrieving the raw license content or rendered license HTML. tags: - - pulls - operationId: pulls/update + - licenses + operationId: licenses/get-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls/#update-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/licenses/#get-the-license-for-a-repository + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/license-content" + examples: + default: + "$ref": "#/components/examples/license-content" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: licenses + subcategory: + "/repos/{owner}/{repo}/merge-upstream": + post: + summary: Sync a fork branch with the upstream repository + description: Sync a branch of a forked repository to keep it up-to-date with + the upstream repository. + tags: + - repos + operationId: repos/merge-upstream + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - title: - type: string - description: The title of the pull request. - body: - type: string - description: The contents of the pull request. - state: - type: string - description: State of this Pull Request. Either `open` or `closed`. - enum: - - open - - closed - base: + branch: type: string - description: The name of the branch you want your changes pulled - into. This should be an existing branch on the current repository. - You cannot update the base branch on a pull request to point to - another repository. - maintainer_can_modify: - type: boolean - description: Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) - the pull request. - example: - title: new title - body: updated body - state: open - base: master + description: The name of the branch which should be updated to match + upstream. + required: + - branch + examples: + default: + value: + branch: main responses: '200': - description: Response + description: The branch has been successfully synced with the upstream repository content: application/json: schema: - "$ref": "#/components/schemas/pull-request" + "$ref": "#/components/schemas/merged-upstream" examples: default: - "$ref": "#/components/examples/pull-request" + "$ref": "#/components/examples/merged-upstream" + '409': + description: The branch could not be synced because of a merge conflict '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" + description: The branch could not be synced for some other reason x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}/codespaces": + category: repos + subcategory: branches + "/repos/{owner}/{repo}/merges": post: - summary: Create a codespace from a pull request - description: |- - Creates a codespace owned by the authenticated user for the specified pull request. - - You must authenticate using an access token with the `codespace` scope to use this endpoint. + summary: Merge a branch + description: '' tags: - - codespaces - operationId: codespaces/create-with-pr-for-authenticated-user + - repos + operationId: repos/merge externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#create-a-codespace-from-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#merge-a-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: required: true content: application/json: schema: type: object - required: - - location properties: - location: - description: Location for this codespace + base: type: string - machine: - description: Machine type to use for this codespace + description: The name of the base branch that the head will be merged + into. + head: type: string - working_directory: - description: Working directory for this codespace + description: The head to merge. This can be a branch name or a commit + SHA1. + commit_message: type: string - idle_timeout_minutes: - description: Time in minutes before codespace stops from inactivity - type: integer - example: - repository_id: 1 - ref: main + description: Commit message to use for the merge commit. If omitted, + a default message will be used. + required: + - base + - head + examples: + default: + value: + base: master + head: cool_feature + commit_message: Shipped cool_feature! responses: '201': - description: Response when the codespace was successfully created - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace" - examples: - default: - "$ref": "#/components/examples/codespace" - '202': - description: Response when the codespace creation partially failed but is - being retried in the background + description: Successful Response (The resulting merge commit) content: application/json: schema: - "$ref": "#/components/schemas/codespace" + "$ref": "#/components/schemas/commit" examples: default: - "$ref": "#/components/examples/codespace" - '401': - "$ref": "#/components/responses/requires_authentication" + "$ref": "#/components/examples/commit" + '204': + description: Response when already merged + '404': + description: Not Found when the base or head does not exist + '409': + description: Conflict when there is a merge conflict '403': "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}/comments": + enabledForGitHubApps: true + category: repos + subcategory: merging + "/repos/{owner}/{repo}/milestones": get: - summary: List review comments on a pull request - description: Lists all review comments for a pull request. By default, review - comments are in ascending order by ID. + summary: List milestones + description: '' tags: - - pulls - operationId: pulls/list-review-comments + - issues + operationId: issues/list-milestones externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-review-comments-on-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-milestones parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/sort" + - name: state + description: The state of the milestone. Either `open`, `closed`, or `all`. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - name: sort + description: What to sort results by. Either `due_on` or `completeness`. + in: query + required: false + schema: + type: string + enum: + - due_on + - completeness + default: due_on - name: direction - description: Can be either `asc` or `desc`. Ignored without `sort` parameter. + description: The direction of the sort. Either `asc` or `desc`. in: query required: false schema: @@ -27555,7 +26926,7 @@ paths: enum: - asc - desc - - "$ref": "#/components/parameters/since" + default: asc - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -27566,39 +26937,32 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/pull-request-review-comment" + "$ref": "#/components/schemas/milestone" examples: default: - "$ref": "#/components/examples/pull-request-review-comment-items" + "$ref": "#/components/examples/milestone-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: comments + category: issues + subcategory: milestones post: - summary: Create a review comment for a pull request - description: |2- - - Creates a review comment in the pull request diff. To add a regular comment to a pull request timeline, see "[Create an issue comment](https://docs.github.com/rest/reference/issues#create-an-issue-comment)." We recommend creating a review comment using `line`, `side`, and optionally `start_line` and `start_side` if your comment applies to more than one line in the pull request diff. - - You can still create a review comment using the `position` parameter. When you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. - - **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + summary: Create a milestone + description: '' tags: - - pulls - operationId: pulls/create-review-comment + - issues + operationId: issues/create-milestone externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#create-a-review-comment-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#create-a-milestone parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: required: true content: @@ -27606,192 +26970,185 @@ paths: schema: type: object properties: - body: - type: string - description: The text of the review comment. - commit_id: - type: string - description: The SHA of the commit needing a comment. Not using - the latest commit SHA may render your comment outdated if a subsequent - commit modifies the line you specify as the `position`. - path: + title: type: string - description: The relative path to the file that necessitates a comment. - position: - type: integer - description: "**Required without `comfort-fade` preview unless using - `in_reply_to`**. The position in the diff where you want to add - a review comment. Note this value is not the same as the line - number in the file. For help finding the position value, read - the note above." - side: + description: The title of the milestone. + state: type: string - description: '**Required with `comfort-fade` preview unless using - `in_reply_to`**. In a split diff view, the side of the diff that - the pull request''s changes appear on. Can be `LEFT` or `RIGHT`. - Use `LEFT` for deletions that appear in red. Use `RIGHT` for additions - that appear in green or unchanged lines that appear in white and - are shown for context. For a multi-line comment, side represents - whether the last line of the comment range is a deletion or addition. - For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" - in the GitHub Help documentation.' + description: The state of the milestone. Either `open` or `closed`. enum: - - LEFT - - RIGHT - line: - type: integer - description: "**Required with `comfort-fade` preview unless using - `in_reply_to`**. The line of the blob in the pull request diff - that the comment applies to. For a multi-line comment, the last - line of the range that your comment applies to." - start_line: - type: integer - description: '**Required when using multi-line comments unless using - `in_reply_to`**. To create multi-line comments, you must use the - `comfort-fade` preview header. The `start_line` is the first line - in the pull request diff that your multi-line comment applies - to. To learn more about multi-line comments, see "[Commenting - on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" - in the GitHub Help documentation.' - start_side: + - open + - closed + default: open + description: type: string - description: '**Required when using multi-line comments unless using - `in_reply_to`**. To create multi-line comments, you must use the - `comfort-fade` preview header. The `start_side` is the starting - side of the diff that the comment applies to. Can be `LEFT` or - `RIGHT`. To learn more about multi-line comments, see "[Commenting - on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" - in the GitHub Help documentation. See `side` in this table for - additional context.' - enum: - - LEFT - - RIGHT - - side - in_reply_to: - type: integer - example: 2 - description: The ID of the review comment to reply to. To find the - ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). - When specified, all parameters other than `body` in the request - body are ignored. + description: A description of the milestone. + due_on: + type: string + format: date-time + description: 'The milestone due date. This is a timestamp in [ISO + 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.' required: - - body + - title examples: - example-for-a-single-line-comment: - summary: Example for a single-line comment - value: - body: Let's add this deleted line back. - commit_id: 6dcb09b5b57875f334f61aebed695e2e4193db5e - path: file1.txt - line: 5 - side: LEFT - example-for-a-multi-line-comment: - summary: Example for a multi-line comment + default: value: - body: Great stuff! - commit_id: 6dcb09b5b57875f334f61aebed695e2e4193db5e - path: file1.txt - start_line: 1 - start_side: RIGHT - line: 2 - side: RIGHT + title: v1.0 + state: open + description: Tracking milestone for version 1.0 + due_on: '2012-10-09T23:39:01Z' responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review-comment" + "$ref": "#/components/schemas/milestone" examples: - example-for-a-multi-line-comment: - "$ref": "#/components/examples/pull-request-review-comment-example-for-a-multi-line-comment" + default: + "$ref": "#/components/examples/milestone" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + example: https://api.github.com/repos/octocat/Hello-World/milestones/1 schema: type: string + '404': + "$ref": "#/components/responses/not_found" '422': "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: comments - "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": - post: - summary: Create a reply for a review comment - description: |- - Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + category: issues + subcategory: milestones + "/repos/{owner}/{repo}/milestones/{milestone_number}": + get: + summary: Get a milestone + description: '' tags: - - pulls - operationId: pulls/create-reply-for-review-comment + - issues + operationId: issues/get-milestone externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#create-a-reply-for-a-review-comment + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#get-a-milestone parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/milestone-number" + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/milestone" + examples: + default: + "$ref": "#/components/examples/milestone" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: issues + subcategory: milestones + patch: + summary: Update a milestone + description: '' + tags: + - issues + operationId: issues/update-milestone + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#update-a-milestone + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/milestone-number" requestBody: - required: true + required: false content: application/json: schema: type: object properties: - body: + title: type: string - description: The text of the review comment. - required: - - body - example: - body: Great stuff! + description: The title of the milestone. + state: + type: string + description: The state of the milestone. Either `open` or `closed`. + enum: + - open + - closed + default: open + description: + type: string + description: A description of the milestone. + due_on: + type: string + format: date-time + description: 'The milestone due date. This is a timestamp in [ISO + 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`.' + examples: + default: + value: + title: v1.0 + state: open + description: Tracking milestone for version 1.0 + due_on: '2012-10-09T23:39:01Z' responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review-comment" + "$ref": "#/components/schemas/milestone" examples: default: - "$ref": "#/components/examples/pull-request-review-comment" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 - schema: - type: string + "$ref": "#/components/examples/milestone" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: issues + subcategory: milestones + delete: + summary: Delete a milestone + description: '' + tags: + - issues + operationId: issues/delete-milestone + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#delete-a-milestone + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/milestone-number" + responses: + '204': + description: Response '404': "$ref": "#/components/responses/not_found" x-github: - triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false - category: pulls - subcategory: comments - "/repos/{owner}/{repo}/pulls/{pull_number}/commits": + enabledForGitHubApps: true + category: issues + subcategory: milestones + "/repos/{owner}/{repo}/milestones/{milestone_number}/labels": get: - summary: List commits on a pull request - description: 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. + summary: List labels for issues in a milestone + description: '' tags: - - pulls - operationId: pulls/list-commits + - issues + operationId: issues/list-labels-for-milestone externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-commits-on-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-labels-for-issues-in-a-milestone parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/milestone-number" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -27802,33 +27159,35 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/commit" + "$ref": "#/components/schemas/label" examples: default: - "$ref": "#/components/examples/commit-items" + "$ref": "#/components/examples/label-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}/files": - get: - summary: List pull requests files - description: "**Note:** Responses include a maximum of 3000 files. The paginated - response returns 30 files per page by default." + category: issues + subcategory: labels + "/repos/{owner}/{repo}/notifications": + get: + summary: List repository notifications for the authenticated user + description: Lists all notifications for the current user in the specified repository. tags: - - pulls - operationId: pulls/list-files + - activity + operationId: activity/list-repo-notifications-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-pull-requests-files + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repository-notifications-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/all" + - "$ref": "#/components/parameters/participating" + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/before" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -27839,116 +27198,54 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/diff-entry" + "$ref": "#/components/schemas/thread" examples: default: - "$ref": "#/components/examples/diff-entry-items" + "$ref": "#/components/examples/thread-items" headers: Link: "$ref": "#/components/headers/link" - '422': - "$ref": "#/components/responses/validation_failed" - '500': - "$ref": "#/components/responses/internal_error" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}/merge": - get: - summary: Check if a pull request has been merged - description: '' - tags: - - pulls - operationId: pulls/check-if-merged - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/pulls#check-if-a-pull-request-has-been-merged - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - responses: - '204': - description: Response if pull request has been merged - '404': - description: Not Found if pull request has not been merged x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: + enabledForGitHubApps: false + category: activity + subcategory: notifications put: - summary: Merge a pull request - description: This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). - Creating content too quickly using this endpoint may result in secondary rate - limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" - and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" - for details. + summary: Mark repository notifications as read + description: Marks all notifications in a repository as "read" for the current + user. If the number of notifications is too large to complete in one request, + you will receive a `202 Accepted` status and GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/activity#list-repository-notifications-for-the-authenticated-user) + endpoint and pass the query parameter `all=false`. tags: - - pulls - operationId: pulls/merge + - activity + operationId: activity/mark-repo-notifications-as-read externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#merge-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#mark-repository-notifications-as-read parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: required: false content: application/json: schema: type: object - nullable: true properties: - commit_title: - type: string - description: Title for the automatic commit message. - commit_message: - type: string - description: Extra detail to append to automatic commit message. - sha: - type: string - description: SHA that pull request head must match to allow merge. - merge_method: + last_read_at: type: string - description: Merge method to use. Possible values are `merge`, `squash` - or `rebase`. Default is `merge`. - enum: - - merge - - squash - - rebase + format: date-time + description: 'Describes the last point that notifications were checked. + Anything updated since this time will not be marked as read. If + you omit this parameter, all notifications are marked as read. + This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + format: `YYYY-MM-DDTHH:MM:SSZ`. Default: The current timestamp.' responses: - '200': - description: if merge was successful - content: - application/json: - schema: - "$ref": "#/components/schemas/pull-request-merge-result" - examples: - response-if-merge-was-successful: - "$ref": "#/components/examples/pull-request-merge-result-response-if-merge-was-successful" - '405': - description: Method Not Allowed if merge cannot be performed - content: - application/json: - schema: - type: object - properties: - message: - type: string - documentation_url: - type: string - examples: - response-if-merge-cannot-be-performed: - value: - message: Pull Request is not mergeable - '409': - description: Conflict if sha was provided and pull request head did not - match + '202': + description: Response content: application/json: schema: @@ -27956,137 +27253,136 @@ paths: properties: message: type: string - documentation_url: + url: type: string - examples: - response-if-sha-was-provided-and-pull-request-head-did-not-match: - value: - message: Head branch was modified. Review and try the merge again. - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + '205': + description: Reset Content x-github: - triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: - "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": + enabledForGitHubApps: false + category: activity + subcategory: notifications + "/repos/{owner}/{repo}/pages": get: - summary: List requested reviewers for a pull request + summary: Get a GitHub Enterprise Server Pages site description: '' tags: - - pulls - operationId: pulls/list-requested-reviewers + - repos + operationId: repos/get-pages externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-requested-reviewers-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#get-a-github-pages-site parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review-request" + "$ref": "#/components/schemas/page" examples: default: - "$ref": "#/components/examples/simple-pull-request-review-request" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/page" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: review-requests + category: pages post: - summary: Request reviewers for a pull request - description: This endpoint triggers [notifications](https://docs.github.com/github/managing-subscriptions-and-notifications-on-github/about-notifications). - Creating content too quickly using this endpoint may result in secondary rate - limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" - and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" - for details. + summary: Create a GitHub Enterprise Server Pages site + description: Configures a GitHub Enterprise Server Pages site. For more information, + see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages)." + You must be an admin of the repository in order to use this operation. tags: - - pulls - operationId: pulls/request-reviewers + - repos + operationId: repos/create-pages-site externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#request-reviewers-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#create-a-github-pages-site parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: - required: false + required: true content: application/json: schema: type: object + description: The source branch and directory used to publish your Pages + site. + nullable: true properties: - reviewers: - type: array - description: An array of user `login`s that will be requested. - items: - type: string - team_reviewers: - type: array - description: An array of team `slug`s that will be requested. - items: - type: string + build_type: + type: string + description: The process in which the Page will be built. Possible + values are `"legacy"` and `"workflow"`. + enum: + - legacy + - workflow + source: + type: object + description: The source branch and directory used to publish your + Pages site. + properties: + branch: + type: string + description: The repository branch used to publish your site's + source files. + path: + type: string + description: 'The repository directory that includes the source + files for the Pages site. Allowed paths are `/` or `/docs`. + Default: `/`' + enum: + - "/" + - "/docs" + default: "/" + required: + - branch anyOf: - required: - - reviewers + - source - required: - - team_reviewers - example: - reviewers: - - octocat - - hubot - - other_user - team_reviewers: - - justice-league + - build_type + examples: + default: + value: + source: + branch: main + path: "/docs" responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-simple" + "$ref": "#/components/schemas/page" examples: default: - "$ref": "#/components/examples/pull-request-review-request" + "$ref": "#/components/examples/page" '422': - description: Unprocessable Entity if user is not a collaborator - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/responses/validation_failed" + '409': + "$ref": "#/components/responses/conflict" x-github: - triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: review-requests - delete: - summary: Remove requested reviewers from a pull request - description: '' + category: pages + put: + summary: Update information about a GitHub Enterprise Server Pages site + description: Updates information for a GitHub Enterprise Server Pages site. + For more information, see "[About GitHub Pages](/github/working-with-github-pages/about-github-pages). tags: - - pulls - operationId: pulls/remove-requested-reviewers + - repos + operationId: repos/update-information-about-pages-site externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#update-information-about-a-github-pages-site parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" requestBody: required: true content: @@ -28094,316 +27390,270 @@ paths: schema: type: object properties: - reviewers: - type: array - description: An array of user `login`s that will be removed. - items: - type: string - team_reviewers: - type: array - description: An array of team `slug`s that will be removed. - items: - type: string - required: - - reviewers - example: - reviewers: - - octocat - - hubot - - other_user - team_reviewers: - - justice-league + cname: + type: string + description: Specify a custom domain for the repository. Sending + a `null` value will remove the custom domain. For more about custom + domains, see "[Using a custom domain with GitHub Pages](https://docs.github.com/articles/using-a-custom-domain-with-github-pages/)." + nullable: true + https_enforced: + type: boolean + description: Specify whether HTTPS should be enforced for the repository. + public: + type: boolean + description: Configures access controls for the GitHub Pages site. + If public is set to `true`, the site is accessible to anyone on + the internet. If set to `false`, the site will only be accessible + to users who have at least `read` access to the repository that + published the site. This includes anyone in your Enterprise if + the repository is set to `internal` visibility. This feature is + only available to repositories in an organization on an Enterprise + plan. + build_type: + type: string + description: The process by which the GitHub Pages site will be + built. `workflow` means that the site is built by a custom GitHub + Actions workflow. `legacy` means that the site is built by GitHub + when changes are pushed to a specific branch. + enum: + - legacy + - workflow + source: + anyOf: + - type: string + description: Update the source for the repository. Must include + the branch name, and may optionally specify the subdirectory + `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master + /docs"`. + enum: + - gh-pages + - master + - master /docs + - type: object + description: Update the source for the repository. Must include + the branch name and path. + properties: + branch: + type: string + description: The repository branch used to publish your site's + source files. + path: + type: string + description: The repository directory that includes the source + files for the Pages site. Allowed paths are `/` or `/docs`. + enum: + - "/" + - "/docs" + required: + - branch + - path + anyOf: + - required: + - build_type + - required: + - source + - required: + - cname + - required: + - public + - required: + - https_enforced + examples: + default: + value: + cname: octocatblog.com + source: + branch: main + path: "/" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/pull-request-simple" '422': "$ref": "#/components/responses/validation_failed" + '400': + "$ref": "#/components/responses/bad_request" + '409': + "$ref": "#/components/responses/conflict" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: review-requests - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": + category: pages + delete: + summary: Delete a GitHub Enterprise Server Pages site + description: Deletes a GitHub Pages site. You must be an admin of the repository + in order to use this operation. + tags: + - repos + operationId: repos/delete-pages-site + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/pages#delete-a-github-pages-site + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + responses: + '204': + description: Response + '422': + "$ref": "#/components/responses/validation_failed" + '404': + "$ref": "#/components/responses/not_found" + '409': + "$ref": "#/components/responses/conflict" + x-github: + githubCloudOnly: false + category: pages + "/repos/{owner}/{repo}/pages/builds": get: - summary: List reviews for a pull request - description: The list of reviews returns in chronological order. + summary: List GitHub Enterprise Server Pages builds + description: '' tags: - - pulls - operationId: pulls/list-reviews + - repos + operationId: repos/list-pages-builds externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-reviews-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#list-github-pages-builds parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: The list of reviews returns in chronological order. + description: Response content: application/json: schema: type: array items: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/page-build" examples: default: - "$ref": "#/components/examples/pull-request-review-items" + "$ref": "#/components/examples/page-build-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews + category: pages post: - summary: Create a review for a pull request + summary: Request a GitHub Enterprise Server Pages build description: |- - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. - - Pull request reviews created in the `PENDING` state do not include the `submitted_at` property in the response. - - **Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API v3 offers the `application/vnd.github.v3.diff` [media type](https://docs.github.com/rest/overview/media-types#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](https://docs.github.com/rest/reference/pulls#get-a-pull-request) endpoint. + 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. - 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. + 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. tags: - - pulls - operationId: pulls/create-review + - repos + operationId: repos/request-pages-build externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#request-a-github-pages-build parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - commit_id: - type: string - description: The SHA of the commit that needs a review. Not using - the latest commit SHA may render your review comment outdated - if a subsequent commit modifies the line you specify as the `position`. - Defaults to the most recent commit in the pull request when you - do not specify a value. - body: - type: string - description: "**Required** when using `REQUEST_CHANGES` or `COMMENT` - for the `event` parameter. The body text of the pull request review." - event: - type: string - description: 'The review action you want to perform. The review - actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By - leaving this blank, you set the review action state to `PENDING`, - which means you will need to [submit the pull request review](https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request) - when you are ready.' - enum: - - APPROVE - - REQUEST_CHANGES - - COMMENT - comments: - type: array - description: Use the following table to specify the location, destination, - and contents of the draft review comment. - items: - type: object - properties: - path: - type: string - description: The relative path to the file that necessitates - a review comment. - position: - type: integer - description: The position in the diff where you want to add - a review comment. Note this value is not the same as the - line number in the file. For help finding the position value, - read the note below. - body: - type: string - description: Text of the review comment. - line: - type: integer - example: 28 - side: - type: string - example: RIGHT - start_line: - type: integer - example: 26 - start_side: - type: string - example: LEFT - required: - - path - - body - example: - commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 - body: This is close to perfect! Please address the suggested inline - change. - event: REQUEST_CHANGES - comments: - - path: file.md - position: 6 - body: Please add more information here, and fix this typo. responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/page-build-status" examples: default: - "$ref": "#/components/examples/pull-request-review" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/page-build-status" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": + category: pages + "/repos/{owner}/{repo}/pages/builds/latest": get: - summary: Get a review for a pull request + summary: Get latest Pages build description: '' tags: - - pulls - operationId: pulls/get-review + - repos + operationId: repos/get-latest-pages-build externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#get-a-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#get-latest-pages-build parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/page-build" examples: default: - "$ref": "#/components/examples/pull-request-review-4" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/page-build" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - put: - summary: Update a review for a pull request - description: Update the review summary comment with new text. + category: pages + "/repos/{owner}/{repo}/pages/builds/{build_id}": + get: + summary: Get GitHub Enterprise Server Pages build + description: '' tags: - - pulls - operationId: pulls/update-review + - repos + operationId: repos/get-pages-build externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#update-a-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/pages#get-github-pages-build parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" - requestBody: + - name: build_id + in: path required: true - content: - application/json: - schema: - type: object - properties: - body: - type: string - description: The body text of the pull request review. - required: - - body - example: - body: This is close to perfect! Please address the suggested inline - change. And add more about this. + schema: + type: integer responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/page-build" examples: default: - "$ref": "#/components/examples/pull-request-review-5" - '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/examples/page-build" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - delete: - summary: Delete a pending review for a pull request - description: '' + category: pages + "/repos/{owner}/{repo}/pre-receive-hooks": + get: + summary: List pre-receive hooks for a repository + description: List all pre-receive hooks that are enabled or testing for this + repository as well as any disabled hooks that are allowed to be enabled at + the repository level. Pre-receive hooks that are disabled at a higher level + and are not configurable will not be listed. + operationId: enterprise-admin/list-pre-receive-hooks-for-repo tags: - - pulls - operationId: pulls/delete-pending-review + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#delete-a-pending-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-pre-receive-hooks-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/pull-request-review" - examples: - default: - "$ref": "#/components/examples/pull-request-review" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: pulls - subcategory: reviews - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": - get: - summary: List comments for a pull request review - description: List comments for a specific pull request review. - tags: - - pulls - operationId: pulls/list-comments-for-review - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/pulls#list-comments-for-a-pull-request-review - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/direction" + - name: sort + in: query + required: false + schema: + type: string + enum: + - created + - updated + - name + default: created responses: '200': description: Response @@ -28412,296 +27662,308 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/review-comment" + "$ref": "#/components/schemas/repository-pre-receive-hook" examples: default: - "$ref": "#/components/examples/review-comment-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/repository-pre-receive-hook-items" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": - put: - summary: Dismiss a review for a pull request - description: "**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." + category: enterprise-admin + subcategory: repo-pre-receive-hooks + "/repos/{owner}/{repo}/pre-receive-hooks/{pre_receive_hook_id}": + get: + summary: Get a pre-receive hook for a repository + description: '' + operationId: enterprise-admin/get-pre-receive-hook-for-repo tags: - - pulls - operationId: pulls/dismiss-review + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#dismiss-a-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-a-pre-receive-hook-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - message: - type: string - description: The message for the pull request review dismissal - event: - type: string - example: '"APPROVE"' - required: - - message + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/repository-pre-receive-hook" examples: default: - "$ref": "#/components/examples/pull-request-review-3" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/examples/repository-pre-receive-hook" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": - post: - summary: Submit a review for a pull request - description: '' + category: enterprise-admin + subcategory: repo-pre-receive-hooks + patch: + summary: Update pre-receive hook enforcement for a repository + description: For pre-receive hooks which are allowed to be configured at the + repo level, you can set `enforcement` + operationId: enterprise-admin/update-pre-receive-hook-enforcement-for-repo tags: - - pulls - operationId: pulls/submit-review + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#submit-a-review-for-a-pull-request + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-pre-receive-hook-enforcement-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - - "$ref": "#/components/parameters/review-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - body: - type: string - description: The body text of the pull request review - event: - type: string - description: 'The review action you want to perform. The review - actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When - you leave this blank, the API returns _HTTP 422 (Unrecognizable - entity)_ and sets the review action state to `PENDING`, which - means you will need to re-submit the pull request review using - a review action.' - enum: - - APPROVE - - REQUEST_CHANGES - - COMMENT - required: - - event + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/pull-request-review" + "$ref": "#/components/schemas/repository-pre-receive-hook" examples: default: - "$ref": "#/components/examples/pull-request-review-4" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed_simple" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/repository-pre-receive-hook-2" + requestBody: + content: + application/json: + schema: + type: object + properties: + enforcement: + description: The state of enforcement for the hook on this repository. + type: string + enum: + - enabled + - disabled + - testing + examples: + default: + value: + enforcement: enabled x-github: githubCloudOnly: false enabledForGitHubApps: true - category: pulls - subcategory: reviews - "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": - put: - summary: Update a pull request branch - description: Updates the pull request branch with the latest upstream changes - by merging HEAD from the base branch into the pull request branch. + category: enterprise-admin + subcategory: repo-pre-receive-hooks + delete: + summary: Remove pre-receive hook enforcement for a repository + description: |- + Deletes any overridden enforcement on this repository for the specified hook. + + Responds with effective values inherited from owner and/or global level. + operationId: enterprise-admin/remove-pre-receive-hook-enforcement-for-repo tags: - - pulls - operationId: pulls/update-branch + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/pulls#update-a-pull-request-branch + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#remove-pre-receive-hook-enforcement-for-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/pull-number" - requestBody: - required: false - content: - application/json: - schema: - type: object - nullable: true - properties: - expected_head_sha: - type: string - description: 'The expected SHA of the pull request''s HEAD ref. - This is the most recent commit on the pull request''s branch. - If the expected SHA does not match the pull request''s HEAD, you - will receive a `422 Unprocessable Entity` status. You can use - the "[List commits](https://docs.github.com/rest/reference/repos#list-commits)" - endpoint to find the most recent commit SHA. Default: SHA of the - pull request''s current HEAD ref.' - example: - expected_head_sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e + - "$ref": "#/components/parameters/pre-receive-hook-id" responses: - '202': - description: Response + '200': + description: Responds with effective values inherited from owner and/or + global level. content: application/json: schema: - type: object - properties: - message: - type: string - url: - type: string - example: - message: Updating pull request branch. - url: https://github.com/repos/octocat/Hello-World/pulls/53 - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/schemas/repository-pre-receive-hook" + examples: + default: + "$ref": "#/components/examples/repository-pre-receive-hook" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: pulls - subcategory: - "/repos/{owner}/{repo}/readme": + enabledForGitHubApps: true + category: enterprise-admin + subcategory: repo-pre-receive-hooks + "/repos/{owner}/{repo}/projects": get: - summary: Get a repository README - description: |- - 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. + summary: List repository projects + description: 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. tags: - - repos - operationId: repos/get-readme + - projects + operationId: projects/list-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-repository-readme + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-repository-projects parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - description: 'The name of the commit/branch/tag. Default: the repository’s - default branch (usually `master`)' + - name: state + description: Indicates the state of the projects to return. in: query required: false schema: type: string + enum: + - open + - closed + - all + default: open + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/content-file" + type: array + items: + "$ref": "#/components/schemas/project" examples: default: - "$ref": "#/components/examples/content-file" + "$ref": "#/components/examples/project-items-2" + headers: + Link: + "$ref": "#/components/headers/link" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: contents - "/repos/{owner}/{repo}/readme/{dir}": - get: - summary: Get a repository README for a directory - description: |- - Gets the README from a repository directory. - - READMEs support [custom media types](https://docs.github.com/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. + category: projects + subcategory: + post: + summary: Create a repository project + description: Creates a repository project board. Returns a `410 Gone` status + if projects are disabled in the repository or if the repository does not have + existing classic projects. If you do not have sufficient privileges to perform + this action, a `401 Unauthorized` or `410 Gone` status is returned. tags: - - repos - operationId: repos/get-readme-in-directory + - projects + operationId: projects/create-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-repository-directory-readme + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#create-a-repository-project parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: dir - description: The alternate path to look for a README file - in: path + requestBody: required: true - schema: - type: string - x-multi-segment: true - - name: ref - description: 'The name of the commit/branch/tag. Default: the repository’s - default branch (usually `master`)' - in: query - required: false - schema: - type: string + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the project. + body: + type: string + description: The description of the project. + required: + - name + examples: + default: + value: + name: Projects Documentation + body: Developer documentation project for the developer site. responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/content-file" + "$ref": "#/components/schemas/project" examples: default: - "$ref": "#/components/examples/content-file" + "$ref": "#/components/examples/project-3" + '401': + "$ref": "#/components/responses/requires_authentication" + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" + '410': + "$ref": "#/components/responses/gone" '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: contents - "/repos/{owner}/{repo}/releases": + category: projects + subcategory: + "/repos/{owner}/{repo}/pulls": get: - summary: List releases - description: |- - 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. + summary: List pull requests + description: Draft pull requests are available in public repositories with GitHub + Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository + billing plans, and in public and private repositories with GitHub Team and + GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) + in the GitHub Help documentation. tags: - - repos - operationId: repos/list-releases + - pulls + operationId: pulls/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-releases + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: state + description: Either `open`, `closed`, or `all` to filter by state. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - name: head + description: '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`.' + in: query + required: false + schema: + type: string + - name: base + description: 'Filter pulls by base branch name. Example: `gh-pages`.' + in: query + required: false + schema: + type: string + - name: sort + description: What to sort results by. `popularity` will sort by the number + of comments. `long-running` will sort by date created and will limit the + results to pull requests that have been open for more than a month and have + had activity within the past month. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - popularity + - long-running + default: created + - name: direction + description: 'The direction of the sort. Default: `desc` when sort is `created` + or sort is not specified, otherwise `asc`.' + in: query + required: false + schema: + type: string + enum: + - asc + - desc - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -28712,32 +27974,36 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/release" + "$ref": "#/components/schemas/pull-request-simple" examples: default: - "$ref": "#/components/examples/release-items" + "$ref": "#/components/examples/pull-request-simple-items" headers: Link: "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases + category: pulls + subcategory: post: - summary: Create a release + summary: Create a pull request description: |- - Users with push access to the repository can create a release. + Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request. - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-rate-limits)" for details. tags: - - repos - operationId: repos/create-release + - pulls + operationId: pulls/create externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-release + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#create-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -28748,479 +28014,258 @@ paths: schema: type: object properties: - tag_name: + title: type: string - description: The name of the tag. - target_commitish: + description: The title of the new pull request. Required unless + `issue` is specified. + head: type: string - description: 'Specifies the commitish value that determines where - the Git tag is created from. Can be any branch or commit SHA. - Unused if the Git tag already exists. Default: the repository''s - default branch (usually `master`).' - name: + description: 'The name of the branch where your changes are implemented. + For cross-repository pull requests in the same network, namespace + `head` with a user like this: `username:branch`.' + base: type: string - description: The name of the release. + description: The name of the branch you want the changes pulled + into. This should be an existing branch on the current repository. + You cannot submit a pull request to one repository that requests + a merge to a base of another repository. body: type: string - description: Text describing the contents of the tag. - draft: - type: boolean - description: "`true` to create a draft (unpublished) release, `false` - to create a published one." - default: false - prerelease: + description: The contents of the pull request. + maintainer_can_modify: type: boolean - description: "`true` to identify the release as a prerelease. `false` - to identify the release as a full release." - default: false - discussion_category_name: - type: string - description: If specified, a discussion of the specified category - is created and linked to the release. The value must be a category - that already exists in the repository. For more information, see - "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." - generate_release_notes: + description: Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) + the pull request. + draft: type: boolean - description: Whether to automatically generate the name and body - for this release. If `name` is specified, the specified name will - be used; otherwise, a name will be automatically generated. If - `body` is specified, the body will be pre-pended to the automatically - generated notes. - default: false + description: Indicates whether the pull request is a draft. See + "[Draft Pull Requests](https://docs.github.com/en/articles/about-pull-requests#draft-pull-requests)" + in the GitHub Help documentation to learn more. + issue: + type: integer + example: 1 + description: An issue in the repository to convert to a pull request. + The issue title, body, and comments will become the title, body, + and comments on the new pull request. Required unless `title` + is specified. required: - - tag_name - example: - tag_name: v1.0.0 - target_commitish: master - name: v1.0.0 - body: Description of the release - draft: false - prerelease: false - generate_release_notes: false + - head + - base + examples: + default: + value: + title: Amazing new feature + body: Please pull these awesome changes in! + head: octocat:new-feature + base: master responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/release" + "$ref": "#/components/schemas/pull-request" examples: default: - "$ref": "#/components/examples/release" + "$ref": "#/components/examples/pull-request" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World/releases/1 + example: https://api.github.com/repos/octocat/Hello-World/pulls/1347 schema: type: string - '404': - description: Not Found if the discussion category name is invalid - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" + '403': + "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" x-github: triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/assets/{asset_id}": + category: pulls + subcategory: + "/repos/{owner}/{repo}/pulls/comments": get: - summary: Get a release asset - description: 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. + summary: List review comments in a repository + description: Lists review comments for all pull requests in a repository. By + default, review comments are in ascending order by ID. tags: - - repos - operationId: repos/get-release-asset + - pulls + operationId: pulls/list-review-comments-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-release-asset + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-review-comments-in-a-repository parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/asset-id" + - name: sort + in: query + required: false + schema: + type: string + enum: + - created + - updated + - created_at + - name: direction + description: The direction to sort results. Ignored without `sort` parameter. + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - description: 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. + description: Response content: application/json: schema: - "$ref": "#/components/schemas/release-asset" + type: array + items: + "$ref": "#/components/schemas/pull-request-review-comment" examples: default: - "$ref": "#/components/examples/release-asset" - '404': - "$ref": "#/components/responses/not_found" - '415': - "$ref": "#/components/responses/preview_header_missing" - '302': - "$ref": "#/components/responses/found" + "$ref": "#/components/examples/pull-request-review-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases - patch: - summary: Update a release asset - description: Users with push access to the repository can edit a release asset. + category: pulls + subcategory: comments + "/repos/{owner}/{repo}/pulls/comments/{comment_id}": + get: + summary: Get a review comment for a pull request + description: Provides details for a review comment. tags: - - repos - operationId: repos/update-release-asset + - pulls + operationId: pulls/get-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-release-asset + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#get-a-review-comment-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/asset-id" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The file name of the asset. - label: - type: string - description: An alternate short description of the asset. Used in - place of the filename. - state: - type: string - example: '"uploaded"' - example: - name: foo-1.0.0-osx.zip - label: Mac binary - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/release-asset" - examples: - default: - "$ref": "#/components/examples/release-asset" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - delete: - summary: Delete a release asset - description: '' - tags: - - repos - operationId: repos/delete-release-asset - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-release-asset - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/asset-id" - responses: - '204': - description: Response - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/generate-notes": - post: - summary: Generate release notes content for a release - description: Generate a name and body describing a [release](https://docs.github.com/rest/reference/repos#releases). - The body content will be markdown formatted and contain information like the - changes since last release and users who contributed. The generated release - notes are not saved anywhere. They are intended to be generated and used when - creating a new release. - tags: - - repos - operationId: repos/generate-release-notes - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#generate-release-notes - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - tag_name: - type: string - description: The tag name for the release. This can be an existing - tag or a new one. - target_commitish: - type: string - description: Specifies the commitish value that will be the target - for the release's tag. Required if the supplied tag_name does - not reference an existing tag. Ignored if the tag_name already - exists. - previous_tag_name: - type: string - description: The name of the previous tag to use as the starting - point for the release notes. Use to manually specify the range - for the set of changes considered as part this release. - configuration_file_path: - type: string - description: Specifies a path to a file in the repository containing - configuration settings used for generating the release notes. - If unspecified, the configuration file located in the repository - at '.github/release.yml' or '.github/release.yaml' will be used. - If that is not present, the default configuration will be used. - required: - - tag_name - example: - tag_name: v1.0.0 - target_commitish: main - previous_tag_name: v0.9.2 - configuration_file_path: ".github/custom_release_config.yml" - responses: - '200': - description: Name and body of generated release notes - content: - application/json: - schema: - "$ref": "#/components/schemas/release-notes-content" - examples: - default: - "$ref": "#/components/examples/release-notes-content" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/latest": - get: - summary: Get the latest release - description: |- - 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. - tags: - - repos - operationId: repos/get-latest-release - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-latest-release - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/release" - examples: - default: - "$ref": "#/components/examples/release" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/tags/{tag}": - get: - summary: Get a release by tag name - description: Get a published release with the specified tag. - tags: - - repos - operationId: repos/get-release-by-tag - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-release-by-tag-name - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: tag - description: tag parameter - in: path - required: true - schema: - type: string - x-multi-segment: true + - "$ref": "#/components/parameters/comment-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/release" - examples: - default: - "$ref": "#/components/examples/release" - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/{release_id}": - get: - summary: Get a release - description: "**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)." - tags: - - repos - operationId: repos/get-release - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-a-release - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" - responses: - '200': - description: "**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)." - content: - application/json: - schema: - "$ref": "#/components/schemas/release" + "$ref": "#/components/schemas/pull-request-review-comment" examples: default: - "$ref": "#/components/examples/release" + "$ref": "#/components/examples/pull-request-review-comment-2" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases + category: pulls + subcategory: comments patch: - summary: Update a release - description: Users with push access to the repository can edit a release. + summary: Update a review comment for a pull request + description: Enables you to edit a review comment. tags: - - repos - operationId: repos/update-release + - pulls + operationId: pulls/update-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#update-a-release + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-review-comment-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/comment-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - tag_name: - type: string - description: The name of the tag. - target_commitish: - type: string - description: 'Specifies the commitish value that determines where - the Git tag is created from. Can be any branch or commit SHA. - Unused if the Git tag already exists. Default: the repository''s - default branch (usually `master`).' - name: - type: string - description: The name of the release. body: type: string - description: Text describing the contents of the tag. - draft: - type: boolean - description: "`true` makes the release a draft, and `false` publishes - the release." - prerelease: - type: boolean - description: "`true` to identify the release as a prerelease, `false` - to identify the release as a full release." - discussion_category_name: - type: string - description: If specified, a discussion of the specified category - is created and linked to the release. The value must be a category - that already exists in the repository. If there is already a discussion - linked to the release, this parameter is ignored. For more information, - see "[Managing categories for discussions in your repository](https://docs.github.com/discussions/managing-discussions-for-your-community/managing-categories-for-discussions-in-your-repository)." - example: - tag_name: v1.0.0 - target_commitish: master - name: v1.0.0 - body: Description of the release - draft: false - prerelease: false + description: The text of the reply to the review comment. + required: + - body + examples: + default: + value: + body: I like this too! responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/release" + "$ref": "#/components/schemas/pull-request-review-comment" examples: default: - "$ref": "#/components/examples/release" - '404': - description: Not Found if the discussion category name is invalid - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" + "$ref": "#/components/examples/pull-request-review-comment-2" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases + category: pulls + subcategory: comments delete: - summary: Delete a release - description: Users with push access to the repository can delete a release. + summary: Delete a review comment for a pull request + description: Deletes a review comment. tags: - - repos - operationId: repos/delete-release + - pulls + operationId: pulls/delete-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#delete-a-release + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#delete-a-review-comment-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/comment-id" responses: '204': description: Response + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/{release_id}/assets": + category: pulls + subcategory: comments + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions": get: - summary: List release assets - description: '' + summary: List reactions for a pull request review comment + description: List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). tags: - - repos - operationId: repos/list-release-assets + - reactions + operationId: reactions/list-for-pull-request-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-release-assets + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-pull-request-review-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/comment-id" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a pull request review comment. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -29231,110 +28276,35 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/release-asset" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/release-asset-items" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: releases - post: - summary: Upload a release asset - description: "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\nthe - response of the [Create a release endpoint](https://docs.github.com/rest/reference/repos#create-a-release) - to upload a release asset.\n\nYou need to use an HTTP client which supports - [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to - this endpoint.\n\nMost 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: \n\n`application/zip`\n\nGitHub 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,\nyou'll still need to pass your authentication - to be able to upload an asset.\n\nWhen 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.\n\n**Notes:**\n* 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)\"\nendpoint - lists the renamed filenames. For more information and help, contact [GitHub - Support](https://support.github.com/contact?tags=dotcom-rest-api).\n* 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." - tags: - - repos - operationId: repos/upload-release-asset - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#upload-a-release-asset - servers: - - url: "{origin}" - variables: - origin: - default: https://uploads.github.com - description: The URL origin (protocol + host name + port) is included - in `upload_url` returned in the response of the "Create a release" endpoint - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" - - name: name - in: query - required: true - schema: - type: string - - name: label - in: query - schema: - type: string - requestBody: - required: false - content: - "*/*": - schema: - type: string - description: The raw file data - responses: - '201': - description: Response for successful upload - content: - application/json: - schema: - "$ref": "#/components/schemas/release-asset" - examples: - response-for-successful-upload: - "$ref": "#/components/examples/release-asset-response-for-successful-upload" - '422': - description: Response if you upload an asset with the same filename as another - uploaded asset - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: releases - "/repos/{owner}/{repo}/releases/{release_id}/reactions": + category: reactions + subcategory: post: - summary: Create reaction for a release - description: 'Create a reaction to a [release](https://docs.github.com/rest/reference/repos#releases). - A response with a `Status: 200 OK` means that you already added the reaction - type to this release.' + summary: Create reaction for a pull request review comment + description: Create a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#comments). + A response with an HTTP `200` status means that you already added the reaction + type to this pull request review comment. tags: - reactions - operationId: reactions/create-for-release + operationId: reactions/create-for-pull-request-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-release + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-pull-request-review-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/comment-id" requestBody: required: true content: @@ -29344,19 +28314,23 @@ paths: properties: content: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the release. + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the pull request review comment. enum: - "+1" + - "-1" - laugh + - confused - heart - hooray - rocket - eyes required: - content - example: - content: heart + examples: + default: + value: + content: heart responses: '200': description: Reaction exists @@ -29382,161 +28356,185 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: reactions - subcategory: - "/repos/{owner}/{repo}/secret-scanning/alerts": - get: - summary: List secret scanning alerts for a repository + subcategory: + "/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}": + delete: + summary: Delete a pull request comment reaction description: |- - Lists secret scanning alerts for a private repository, from newest to oldest. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. + **Note:** You can also specify a repository by `repository_id` using the route `DELETE /repositories/:repository_id/pulls/comments/:comment_id/reactions/:reaction_id.` - GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + Delete a reaction to a [pull request review comment](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#review-comments). tags: - - secret-scanning - operationId: secret-scanning/list-alerts-for-repo + - reactions + operationId: reactions/delete-for-pull-request-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#delete-a-pull-request-comment-reaction parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/secret-scanning-alert-state" - - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" - - "$ref": "#/components/parameters/secret-scanning-alert-resolution" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/comment-id" + - "$ref": "#/components/parameters/reaction-id" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/secret-scanning-alert" - examples: - default: - "$ref": "#/components/examples/secret-scanning-alert-list" - '404': - description: Repository is public or secret scanning is disabled for the - repository - '503': - "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: secret-scanning - subcategory: - "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": + category: reactions + subcategory: + "/repos/{owner}/{repo}/pulls/{pull_number}": get: - summary: Get a secret scanning alert + summary: Get a pull request description: |- - 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. + Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + Lists details of a pull request by providing its number. + + When you get, [create](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#create-a-pull-request), or [edit](https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request) a pull request, GitHub Enterprise Server 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/enterprise-server@3.6/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 Enterprise Server has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-`null` value for the `mergeable` attribute in the response. If `mergeable` is `true`, then `merge_commit_sha` will be the SHA of the _test_ merge commit. + + The value of the `merge_commit_sha` attribute changes depending on the state of the pull request. Before merging a pull request, the `merge_commit_sha` attribute holds the SHA of the _test_ merge commit. After merging a pull request, the `merge_commit_sha` attribute changes depending on how you merged the pull request: + + * If merged as a [merge commit](https://docs.github.com/articles/about-merge-methods-on-github/), `merge_commit_sha` represents the SHA of the merge commit. + * If merged via a [squash](https://docs.github.com/articles/about-merge-methods-on-github/#squashing-your-merge-commits), `merge_commit_sha` represents the SHA of the squashed commit on the base branch. + * If [rebased](https://docs.github.com/articles/about-merge-methods-on-github/#rebasing-and-merging-your-commits), `merge_commit_sha` represents the commit that the base branch was updated to. + + Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats. tags: - - secret-scanning - operationId: secret-scanning/get-alert + - pulls + operationId: pulls/get externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#get-a-secret-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#get-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" + - "$ref": "#/components/parameters/pull-number" responses: '200': - description: Response + description: Pass the appropriate [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/#commits-commit-comparison-and-pull-requests) + to fetch diff and patch formats. content: application/json: schema: - "$ref": "#/components/schemas/secret-scanning-alert" + "$ref": "#/components/schemas/pull-request" examples: default: - "$ref": "#/components/examples/secret-scanning-alert-open" + "$ref": "#/components/examples/pull-request" '304': "$ref": "#/components/responses/not_modified" '404': - description: Repository is public, or secret scanning is disabled for the - repository, or the resource is not found + "$ref": "#/components/responses/not_found" + '500': + "$ref": "#/components/responses/internal_error" '503': "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: secret-scanning - subcategory: + category: pulls + subcategory: patch: - summary: Update a secret scanning alert + summary: Update a pull request description: |- - 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. + Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. - operationId: secret-scanning/update-alert + 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. tags: - - secret-scanning + - pulls + operationId: pulls/update externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#update-a-secret-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls/#update-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" + - "$ref": "#/components/parameters/pull-number" requestBody: - required: true + required: false content: application/json: schema: type: object properties: + title: + type: string + description: The title of the pull request. + body: + type: string + description: The contents of the pull request. state: - "$ref": "#/components/schemas/secret-scanning-alert-state" - resolution: - "$ref": "#/components/schemas/secret-scanning-alert-resolution" - required: - - state - example: - state: resolved - resolution: false_positive + type: string + description: State of this Pull Request. Either `open` or `closed`. + enum: + - open + - closed + base: + type: string + description: The name of the branch you want your changes pulled + into. This should be an existing branch on the current repository. + You cannot update the base branch on a pull request to point to + another repository. + maintainer_can_modify: + type: boolean + description: Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) + the pull request. + examples: + default: + value: + title: new title + body: updated body + state: open + base: master responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/secret-scanning-alert" + "$ref": "#/components/schemas/pull-request" examples: default: - "$ref": "#/components/examples/secret-scanning-alert-resolved" - '404': - description: Repository is public, or secret scanning is disabled for the - repository, or the resource is not found + "$ref": "#/components/examples/pull-request" '422': - description: State does not match the resolution - '503': - "$ref": "#/components/responses/service_unavailable" + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: - enabledForGitHubApps: true githubCloudOnly: false - category: secret-scanning - "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": + enabledForGitHubApps: true + category: pulls + subcategory: + "/repos/{owner}/{repo}/pulls/{pull_number}/comments": get: - summary: List locations for a secret scanning alert - description: |- - Lists all locations for a given secret scanning alert for a private repository. To use this endpoint, you must be an administrator for the repository or organization, and you must use an access token with the `repo` scope or `security_events` scope. - - GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. + summary: List review comments on a pull request + description: Lists all review comments for a pull request. By default, review + comments are in ascending order by ID. tags: - - secret-scanning - operationId: secret-scanning/list-locations-for-alert + - pulls + operationId: pulls/list-review-comments externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-review-comments-on-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/alert-number" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/sort" + - name: direction + description: The direction to sort results. Ignored without `sort` parameter. + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - "$ref": "#/components/parameters/since" - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -29544,121 +28542,229 @@ paths: application/json: schema: type: array - description: List of locations where the secret was detected items: - "$ref": "#/components/schemas/secret-scanning-location" + "$ref": "#/components/schemas/pull-request-review-comment" examples: default: - "$ref": "#/components/examples/secret-scanning-location-list" + "$ref": "#/components/examples/pull-request-review-comment-items" headers: Link: "$ref": "#/components/headers/link" - '404': - description: Repository is public, or secret scanning is disabled for the - repository, or the resource is not found - '503': - "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: secret-scanning - subcategory: - "/repos/{owner}/{repo}/stargazers": - get: - summary: List stargazers - description: |- - Lists the people that have starred the repository. + category: pulls + subcategory: comments + post: + summary: Create a review comment for a pull request + description: |2- + + 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/enterprise-server@3.6/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. + + The `position` parameter is deprecated. If you use `position`, the `line`, `side`, `start_line`, and `start_side` parameters are not required. + + **Note:** The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file. - 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: + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - - activity - operationId: activity/list-stargazers-for-repo + - pulls + operationId: pulls/create-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-stargazers + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#create-a-review-comment-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/pull-number" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The text of the review comment. + commit_id: + type: string + description: The SHA of the commit needing a comment. Not using + the latest commit SHA may render your comment outdated if a subsequent + commit modifies the line you specify as the `position`. + path: + type: string + description: The relative path to the file that necessitates a comment. + position: + type: integer + description: "**This parameter is deprecated. Use `line` instead**. + 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." + deprecated: true + x-github: + deprecationDate: '2022-11-01' + side: + type: string + description: In a split diff view, the side of the diff that the + pull request's changes appear on. Can be `LEFT` or `RIGHT`. Use + `LEFT` for deletions that appear in red. Use `RIGHT` for additions + that appear in green or unchanged lines that appear in white and + are shown for context. For a multi-line comment, side represents + whether the last line of the comment range is a deletion or addition. + For more information, see "[Diff view options](https://docs.github.com/en/articles/about-comparing-branches-in-pull-requests#diff-view-options)" + in the GitHub Help documentation. + enum: + - LEFT + - RIGHT + line: + type: integer + description: 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. + start_line: + type: integer + description: '**Required when using multi-line comments unless using + `in_reply_to`**. The `start_line` is the first line in the pull + request diff that your multi-line comment applies to. To learn + more about multi-line comments, see "[Commenting on a pull request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" + in the GitHub Help documentation.' + start_side: + type: string + description: '**Required when using multi-line comments unless using + `in_reply_to`**. The `start_side` is the starting side of the + diff that the comment applies to. Can be `LEFT` or `RIGHT`. To + learn more about multi-line comments, see "[Commenting on a pull + request](https://docs.github.com/en/articles/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)" + in the GitHub Help documentation. See `side` in this table for + additional context.' + enum: + - LEFT + - RIGHT + - side + in_reply_to: + type: integer + example: 2 + description: The ID of the review comment to reply to. To find the + ID of a review comment with ["List review comments on a pull request"](#list-review-comments-on-a-pull-request). + When specified, all parameters other than `body` in the request + body are ignored. + required: + - body + - commit_id + - path + - line + examples: + example-for-a-multi-line-comment: + summary: Example for a multi-line comment + value: + body: Great stuff! + commit_id: 6dcb09b5b57875f334f61aebed695e2e4193db5e + path: file1.txt + start_line: 1 + start_side: RIGHT + line: 2 + side: RIGHT responses: - '200': + '201': description: Response content: application/json: schema: - anyOf: - - type: array - items: - "$ref": "#/components/schemas/simple-user" - - type: array - items: - "$ref": "#/components/schemas/stargazer" + "$ref": "#/components/schemas/pull-request-review-comment" examples: - default-response: - "$ref": "#/components/examples/simple-user-items-default-response" - alternative-response-with-star-creation-timestamps: - "$ref": "#/components/examples/stargazer-items-alternative-response-with-star-creation-timestamps" + example-for-a-multi-line-comment: + "$ref": "#/components/examples/pull-request-review-comment-example-for-a-multi-line-comment" headers: - Link: - "$ref": "#/components/headers/link" + Location: + example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + schema: + type: string '422': "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: activity - subcategory: starring - "/repos/{owner}/{repo}/stats/code_frequency": - get: - summary: Get the weekly commit activity - description: Returns a weekly aggregate of the number of additions and deletions - pushed to a repository. + category: pulls + subcategory: comments + "/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies": + post: + summary: Create a reply for a review comment + description: |- + Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported. + + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - - repos - operationId: repos/get-code-frequency-stats + - pulls + operationId: pulls/create-reply-for-review-comment externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-weekly-commit-activity + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#create-a-reply-for-a-review-comment parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/comment-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The text of the review comment. + required: + - body + examples: + default: + value: + body: Great stuff! responses: - '200': - description: Returns a weekly aggregate of the number of additions and deletions - pushed to a repository. + '201': + description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/code-frequency-stat" + "$ref": "#/components/schemas/pull-request-review-comment" examples: default: - "$ref": "#/components/examples/code-frequency-stat-items" - '202': - "$ref": "#/components/responses/accepted" - '204': - "$ref": "#/components/responses/no_content" + "$ref": "#/components/examples/pull-request-review-comment" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/pulls/comments/1 + schema: + type: string + '404': + "$ref": "#/components/responses/not_found" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: statistics - "/repos/{owner}/{repo}/stats/commit_activity": + enabledForGitHubApps: false + category: pulls + subcategory: comments + "/repos/{owner}/{repo}/pulls/{pull_number}/commits": get: - summary: Get the last year of commit activity - description: Returns the last year of commit activity grouped by week. The `days` - array is a group of commits per day, starting on `Sunday`. + summary: List commits on a pull request + description: 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/enterprise-server@3.6/rest/reference/repos#list-commits) + endpoint. tags: - - repos - operationId: repos/get-commit-activity-stats + - pulls + operationId: pulls/list-commits externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-last-year-of-commit-activity + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-commits-on-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -29667,302 +28773,233 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/commit-activity" + "$ref": "#/components/schemas/commit" examples: default: - "$ref": "#/components/examples/commit-activity-items" - '202': - "$ref": "#/components/responses/accepted" - '204': - "$ref": "#/components/responses/no_content" + "$ref": "#/components/examples/commit-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: statistics - "/repos/{owner}/{repo}/stats/contributors": + category: pulls + subcategory: + "/repos/{owner}/{repo}/pulls/{pull_number}/files": get: - summary: Get all contributor commit activity - description: |2- - - 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 + summary: List pull requests files + description: "**Note:** Responses include a maximum of 3000 files. The paginated + response returns 30 files per page by default." tags: - - repos - operationId: repos/get-contributors-stats + - pulls + operationId: pulls/list-files externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-all-contributor-commit-activity + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-pull-requests-files parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - description: |- - * `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 + description: Response content: application/json: schema: type: array items: - "$ref": "#/components/schemas/contributor-activity" - examples: - default: - "$ref": "#/components/examples/contributor-activity-items" - '202': - "$ref": "#/components/responses/accepted" - '204': - "$ref": "#/components/responses/no_content" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: statistics - "/repos/{owner}/{repo}/stats/participation": - get: - summary: Get the weekly commit count - description: |- - 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. - tags: - - repos - operationId: repos/get-participation-stats - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-weekly-commit-count - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: The array order is oldest week (index 0) to most recent week. - content: - application/json: - schema: - "$ref": "#/components/schemas/participation-stats" + "$ref": "#/components/schemas/diff-entry" examples: default: - "$ref": "#/components/examples/participation-stats" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/diff-entry-items" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" + '500': + "$ref": "#/components/responses/internal_error" + '503': + "$ref": "#/components/responses/service_unavailable" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: statistics - "/repos/{owner}/{repo}/stats/punch_card": + category: pulls + subcategory: + "/repos/{owner}/{repo}/pulls/{pull_number}/merge": get: - summary: Get the hourly commit count for each day - description: |- - 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. + summary: Check if a pull request has been merged + description: '' tags: - - repos - operationId: repos/get-punch-card-stats + - pulls + operationId: pulls/check-if-merged externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-the-hourly-commit-count-for-each-day + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#check-if-a-pull-request-has-been-merged parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" responses: - '200': - description: 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. - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/code-frequency-stat" - examples: - default: - "$ref": "#/components/examples/code-frequency-stat-items-2" '204': - "$ref": "#/components/responses/no_content" + description: Response if pull request has been merged + '404': + description: Not Found if pull request has not been merged x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: statistics - "/repos/{owner}/{repo}/statuses/{sha}": - post: - summary: Create a commit status - description: |- - 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. + category: pulls + subcategory: + put: + summary: Merge a pull request + description: This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). + Creating content too quickly using this endpoint may result in secondary rate + limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" + and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" + for details. tags: - - repos - operationId: repos/create-commit-status + - pulls + operationId: pulls/merge externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-commit-status + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#merge-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: sha - in: path - required: true - schema: - type: string - x-multi-segment: true + - "$ref": "#/components/parameters/pull-number" requestBody: - required: true + required: false content: application/json: schema: type: object + nullable: true properties: - state: + commit_title: type: string - description: The state of the status. Can be one of `error`, `failure`, - `pending`, or `success`. - enum: - - error - - failure - - pending - - success - target_url: + description: Title for the automatic commit message. + commit_message: type: string - description: "The target URL to associate with this status. This - URL will be linked from the GitHub UI to allow users to easily - see the source of the status. \nFor 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: - \ \n`http://ci.example.com/user/repo/build/sha`" - description: + description: Extra detail to append to automatic commit message. + sha: type: string - description: A short description of the status. - context: + description: SHA that pull request head must match to allow merge. + merge_method: type: string - description: A string label to differentiate this status from the - status of other systems. This field is case-insensitive. - default: default - required: - - state - example: - state: success - target_url: https://example.com/build/status - description: The build succeeded! - context: continuous-integration/jenkins + description: Merge method to use. Possible values are `merge`, `squash` + or `rebase`. Default is `merge`. + enum: + - merge + - squash + - rebase responses: - '201': - description: Response + '200': + description: if merge was successful content: application/json: schema: - "$ref": "#/components/schemas/status" + "$ref": "#/components/schemas/pull-request-merge-result" examples: - default: - "$ref": "#/components/examples/status" - headers: - Location: - example: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + response-if-merge-was-successful: + "$ref": "#/components/examples/pull-request-merge-result-response-if-merge-was-successful" + '405': + description: Method Not Allowed if merge cannot be performed + content: + application/json: schema: - type: string + type: object + properties: + message: + type: string + documentation_url: + type: string + examples: + response-if-merge-cannot-be-performed: + value: + message: Pull Request is not mergeable + '409': + description: Conflict if sha was provided and pull request head did not + match + content: + application/json: + schema: + type: object + properties: + message: + type: string + documentation_url: + type: string + examples: + response-if-sha-was-provided-and-pull-request-head-did-not-match: + value: + message: Head branch was modified. Review and try the merge again. + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: statuses - "/repos/{owner}/{repo}/subscribers": + category: pulls + subcategory: + "/repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers": get: - summary: List watchers - description: Lists the people watching the specified repository. + summary: Get all requested reviewers for a pull request + description: Gets the users or teams whose review is requested for a pull request. + Once a requested reviewer submits a review, they are no longer considered + a requested reviewer. Their review will instead be returned by the [List reviews + for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls/reviews#list-reviews-for-a-pull-request) + operation. tags: - - activity - operationId: activity/list-watchers-for-repo + - pulls + operationId: pulls/list-requested-reviewers externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-watchers + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#get-all-requested-reviewers-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/pull-number" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/pull-request-review-request" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/simple-pull-request-review-request" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: activity - subcategory: watching - "/repos/{owner}/{repo}/subscription": - get: - summary: Get a repository subscription - description: '' + category: pulls + subcategory: review-requests + post: + summary: Request reviewers for a pull request + description: This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.6/github/managing-subscriptions-and-notifications-on-github/about-notifications). + Creating content too quickly using this endpoint may result in secondary rate + limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" + and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" + for details. tags: - - activity - operationId: activity/get-repo-subscription + - pulls + operationId: pulls/request-reviewers externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#get-a-repository-subscription - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '200': - description: if you subscribe to the repository - content: - application/json: - schema: - "$ref": "#/components/schemas/repository-subscription" - examples: - response-if-you-subscribe-to-the-repository: - "$ref": "#/components/examples/repository-subscription-response-if-you-subscribe-to-the-repository" - '404': - description: Not Found if you don't subscribe to the repository - '403': - "$ref": "#/components/responses/forbidden" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: watching - put: - summary: Set a repository subscription - description: 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. - tags: - - activity - operationId: activity/set-repo-subscription - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/activity#set-a-repository-subscription + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#request-reviewers-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" requestBody: required: false content: @@ -29970,200 +29007,305 @@ paths: schema: type: object properties: - subscribed: - type: boolean - description: Determines if notifications should be received from - this repository. - ignored: - type: boolean - description: Determines if all notifications should be blocked from - this repository. + reviewers: + type: array + description: An array of user `login`s that will be requested. + items: + type: string + team_reviewers: + type: array + description: An array of team `slug`s that will be requested. + items: + type: string + anyOf: + - required: + - reviewers + - required: + - team_reviewers + examples: + default: + value: + reviewers: + - octocat + - hubot + - other_user + team_reviewers: + - justice-league responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/repository-subscription" + "$ref": "#/components/schemas/pull-request-simple" examples: default: - "$ref": "#/components/examples/repository-subscription" + "$ref": "#/components/examples/pull-request-review-request" + '422': + description: Unprocessable Entity if user is not a collaborator + '403': + "$ref": "#/components/responses/forbidden" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: watching + enabledForGitHubApps: true + category: pulls + subcategory: review-requests delete: - summary: Delete a repository subscription - description: 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). + summary: Remove requested reviewers from a pull request + description: '' tags: - - activity - operationId: activity/delete-repo-subscription + - pulls + operationId: pulls/remove-requested-reviewers externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#delete-a-repository-subscription + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#remove-requested-reviewers-from-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + reviewers: + type: array + description: An array of user `login`s that will be removed. + items: + type: string + team_reviewers: + type: array + description: An array of team `slug`s that will be removed. + items: + type: string + required: + - reviewers + examples: + default: + value: + reviewers: + - octocat + - hubot + - other_user + team_reviewers: + - justice-league responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/pull-request-simple" + examples: + default: + "$ref": "#/components/examples/pull-request-simple" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: activity - subcategory: watching - "/repos/{owner}/{repo}/tags": + enabledForGitHubApps: true + category: pulls + subcategory: review-requests + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews": get: - summary: List repository tags - description: '' + summary: List reviews for a pull request + description: The list of reviews returns in chronological order. tags: - - repos - operationId: repos/list-tags + - pulls + operationId: pulls/list-reviews externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-tags + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-reviews-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: The list of reviews returns in chronological order. content: application/json: schema: type: array items: - "$ref": "#/components/schemas/tag" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/tag-items" + "$ref": "#/components/examples/pull-request-review-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/tarball/{ref}": - get: - summary: Download a repository archive (tar) + category: pulls + subcategory: reviews + post: + summary: Create a review for a pull request description: |- - 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. - tags: - - repos - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#download-a-repository-archive - operationId: repos/download-tarball-archive - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - - name: ref - in: path - required: true - schema: - type: string - responses: - '302': - description: Response - headers: - Location: - example: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires - schema: - type: string - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: contents - "/repos/{owner}/{repo}/teams": - get: - summary: List repository teams - description: '' + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + + Pull request reviews created in the `PENDING` state are not submitted and therefore do not include the `submitted_at` property in the response. To create a pending review for a pull request, leave the `event` parameter blank. For more information about submitting a `PENDING` review, see "[Submit a review for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request)." + + **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/enterprise-server@3.6/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/enterprise-server@3.6/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. tags: - - repos - operationId: repos/list-teams + - pulls + operationId: pulls/create-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-teams + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#create-a-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/pull-number" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + commit_id: + type: string + description: The SHA of the commit that needs a review. Not using + the latest commit SHA may render your review comment outdated + if a subsequent commit modifies the line you specify as the `position`. + Defaults to the most recent commit in the pull request when you + do not specify a value. + body: + type: string + description: "**Required** when using `REQUEST_CHANGES` or `COMMENT` + for the `event` parameter. The body text of the pull request review." + event: + type: string + description: 'The review action you want to perform. The review + actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. By + leaving this blank, you set the review action state to `PENDING`, + which means you will need to [submit the pull request review](https://docs.github.com/enterprise-server@3.6/rest/pulls#submit-a-review-for-a-pull-request) + when you are ready.' + enum: + - APPROVE + - REQUEST_CHANGES + - COMMENT + comments: + type: array + description: Use the following table to specify the location, destination, + and contents of the draft review comment. + items: + type: object + properties: + path: + type: string + description: The relative path to the file that necessitates + a review comment. + position: + type: integer + description: The position in the diff where you want to add + a review comment. Note this value is not the same as the + line number in the file. For help finding the position value, + read the note below. + body: + type: string + description: Text of the review comment. + line: + type: integer + example: 28 + side: + type: string + example: RIGHT + start_line: + type: integer + example: 26 + start_side: + type: string + example: LEFT + required: + - path + - body + examples: + default: + value: + commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 + body: This is close to perfect! Please address the suggested inline + change. + event: REQUEST_CHANGES + comments: + - path: file.md + position: 6 + body: Please add more information here, and fix this typo. responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/team-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/pull-request-review" + '422': + "$ref": "#/components/responses/validation_failed_simple" + '403': + "$ref": "#/components/responses/forbidden" x-github: + triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/topics": + category: pulls + subcategory: reviews + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}": get: - summary: Get all repository topics + summary: Get a review for a pull request description: '' tags: - - repos - operationId: repos/get-all-topics + - pulls + operationId: pulls/get-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-all-repository-topics + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#get-a-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/topic" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/topic" + "$ref": "#/components/examples/pull-request-review-4" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: + category: pulls + subcategory: reviews put: - summary: Replace all repository topics - description: '' + summary: Update a review for a pull request + description: Update the review summary comment with new text. tags: - - repos - operationId: repos/replace-all-topics + - pulls + operationId: pulls/update-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#replace-all-repository-topics + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" requestBody: required: true content: @@ -30171,87 +29313,83 @@ paths: schema: type: object properties: - names: - type: array - description: An array of topics to add to the repository. Pass one - or more topics to _replace_ the set of existing topics. Send an - empty array (`[]`) to clear all topics from the repository. **Note:** - Topic `names` cannot contain uppercase letters. - items: - type: string + body: + type: string + description: The body text of the pull request review. required: - - names - example: - names: - - octocat - - atom - - electron - - api + - body + examples: + default: + value: + body: This is close to perfect! Please address the suggested inline + change. And add more about this. responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/topic" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/topic" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/pull-request-review-5" '422': "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/traffic/clones": - get: - summary: Get repository clones - description: 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. + category: pulls + subcategory: reviews + delete: + summary: Delete a pending review for a pull request + description: '' tags: - - repos - operationId: repos/get-clones + - pulls + operationId: pulls/delete-pending-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-repository-clones + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#delete-a-pending-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/clone-traffic" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/clone-traffic" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/pull-request-review" + '422': + "$ref": "#/components/responses/validation_failed_simple" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: traffic - "/repos/{owner}/{repo}/traffic/popular/paths": + category: pulls + subcategory: reviews + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments": get: - summary: Get top referral paths - description: Get the top 10 popular contents over the last 14 days. + summary: List comments for a pull request review + description: List comments for a specific pull request review. tags: - - repos - operationId: repos/get-top-paths + - pulls + operationId: pulls/list-comments-for-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-top-referral-paths + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#list-comments-for-a-pull-request-review parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -30260,271 +29398,353 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/content-traffic" + "$ref": "#/components/schemas/review-comment" examples: default: - "$ref": "#/components/examples/content-traffic-items" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/review-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: traffic - "/repos/{owner}/{repo}/traffic/popular/referrers": - get: - summary: Get top referral sources - description: Get the top 10 referrers over the last 14 days. + category: pulls + subcategory: reviews + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals": + put: + summary: Dismiss a review for a pull request + description: "**Note:** To dismiss a pull request review on a [protected branch](https://docs.github.com/enterprise-server@3.6/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." tags: - - repos - operationId: repos/get-top-referrers + - pulls + operationId: pulls/dismiss-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-top-referral-sources + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#dismiss-a-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + message: + type: string + description: The message for the pull request review dismissal + event: + type: string + example: '"DISMISS"' + enum: + - DISMISS + required: + - message + examples: + default: + value: + message: You are dismissed + event: DISMISS responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/referrer-traffic" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/referrer-traffic-items" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/pull-request-review-3" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: traffic - "/repos/{owner}/{repo}/traffic/views": - get: - summary: Get page views - description: 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. + category: pulls + subcategory: reviews + "/repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events": + post: + summary: Submit a review for a pull request + description: Submits a pending review for a pull request. For more information + about creating a pending review for a pull request, see "[Create a review + for a pull request](https://docs.github.com/enterprise-server@3.6/rest/pulls#create-a-review-for-a-pull-request)." tags: - - repos - operationId: repos/get-views + - pulls + operationId: pulls/submit-review externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#get-page-views + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#submit-a-review-for-a-pull-request parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - "$ref": "#/components/parameters/per" + - "$ref": "#/components/parameters/pull-number" + - "$ref": "#/components/parameters/review-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The body text of the pull request review + event: + type: string + description: 'The review action you want to perform. The review + actions include: `APPROVE`, `REQUEST_CHANGES`, or `COMMENT`. When + you leave this blank, the API returns _HTTP 422 (Unrecognizable + entity)_ and sets the review action state to `PENDING`, which + means you will need to re-submit the pull request review using + a review action.' + enum: + - APPROVE + - REQUEST_CHANGES + - COMMENT + required: + - event + examples: + default: + value: + body: Here is the body for the review. + event: REQUEST_CHANGES responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/view-traffic" + "$ref": "#/components/schemas/pull-request-review" examples: default: - "$ref": "#/components/examples/view-traffic" + "$ref": "#/components/examples/pull-request-review-4" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" '403': "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: repos - subcategory: traffic - "/repos/{owner}/{repo}/transfer": - post: - summary: Transfer a repository - description: A transfer request will need to be accepted by the new owner when - transferring a personal repository to another user. The response will contain - the original `owner`, and the transfer will continue asynchronously. For more - details on the requirements to transfer personal and organization-owned repositories, - see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). + category: pulls + subcategory: reviews + "/repos/{owner}/{repo}/pulls/{pull_number}/update-branch": + put: + summary: Update a pull request branch + description: Updates the pull request branch with the latest upstream changes + by merging HEAD from the base branch into the pull request branch. tags: - - repos - operationId: repos/transfer + - pulls + operationId: pulls/update-branch externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#transfer-a-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/pulls#update-a-pull-request-branch parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/pull-number" requestBody: - required: true + required: false content: application/json: schema: type: object + nullable: true properties: - new_owner: + expected_head_sha: type: string - description: The username or organization name the repository will - be transferred to. - team_ids: - type: array - description: ID of the team or teams to add to the repository. Teams - can only be added to organization-owned repositories. - items: - type: integer - required: - - new_owner - example: - new_owner: github - team_ids: - - 12 - - 345 + description: 'The expected SHA of the pull request''s HEAD ref. + This is the most recent commit on the pull request''s branch. + If the expected SHA does not match the pull request''s HEAD, you + will receive a `422 Unprocessable Entity` status. You can use + the "[List commits](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-commits)" + endpoint to find the most recent commit SHA. Default: SHA of the + pull request''s current HEAD ref.' + examples: + default: + value: + expected_head_sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e responses: '202': description: Response content: application/json: schema: - "$ref": "#/components/schemas/minimal-repository" + type: object + properties: + message: + type: string + url: + type: string examples: default: - "$ref": "#/components/examples/minimal-repository" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - category: repos - subcategory: - "/repos/{owner}/{repo}/vulnerability-alerts": - get: - summary: Check if vulnerability alerts are enabled for a repository - description: Shows whether dependency alerts are enabled or disabled for a repository. - The authenticated user must have admin access to the repository. For more - information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". - tags: - - repos - operationId: repos/check-vulnerability-alerts - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/repos#check-if-vulnerability-alerts-are-enabled-for-a-repository - parameters: - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - responses: - '204': - description: Response if repository is enabled with vulnerability alerts - '404': - description: Not Found if repository is not enabled with vulnerability alerts + value: + message: Updating pull request branch. + url: https://github.com/repos/octocat/Hello-World/pulls/53 + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: repos - subcategory: - put: - summary: Enable vulnerability alerts - description: Enables dependency alerts and the dependency graph for a repository. - The authenticated user must have admin access to the repository. For more - information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". + category: pulls + subcategory: + "/repos/{owner}/{repo}/readme": + get: + summary: Get a repository README + description: |- + Gets the preferred README for a repository. + + READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. tags: - repos - operationId: repos/enable-vulnerability-alerts + operationId: repos/get-readme externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#enable-vulnerability-alerts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-repository-readme parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: ref + description: 'The name of the commit/branch/tag. Default: the repository’s + default branch (usually `master`)' + in: query + required: false + schema: + type: string responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/content-file" + examples: + default: + "$ref": "#/components/examples/content-file" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: - delete: - summary: Disable vulnerability alerts - description: Disables dependency alerts and the dependency graph for a repository. - The authenticated user must have admin access to the repository. For more - information, see "[About security alerts for vulnerable dependencies](https://docs.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)". + subcategory: contents + "/repos/{owner}/{repo}/readme/{dir}": + get: + summary: Get a repository README for a directory + description: |- + Gets the README from a repository directory. + + READMEs support [custom media types](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#custom-media-types) for retrieving the raw content or rendered HTML. tags: - repos - operationId: repos/disable-vulnerability-alerts + operationId: repos/get-readme-in-directory externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#disable-vulnerability-alerts + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-repository-directory-readme parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" + - name: dir + description: The alternate path to look for a README file + in: path + required: true + schema: + type: string + x-multi-segment: true + - name: ref + description: 'The name of the commit/branch/tag. Default: the repository’s + default branch (usually `master`)' + in: query + required: false + schema: + type: string responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/content-file" + examples: + default: + "$ref": "#/components/examples/content-file" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: - "/repos/{owner}/{repo}/zipball/{ref}": + subcategory: contents + "/repos/{owner}/{repo}/releases": get: - summary: Download a repository archive (zip) + summary: List releases description: |- - 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. + 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/enterprise-server@3.6/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. tags: - repos + operationId: repos/list-releases externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#download-a-repository-archive - operationId: repos/download-zipball-archive + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-releases parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" - - name: ref - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '302': + '200': description: Response - headers: - Location: - example: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires + content: + application/json: schema: - type: string + type: array + items: + "$ref": "#/components/schemas/release" + examples: + default: + "$ref": "#/components/examples/release-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: contents - "/repos/{template_owner}/{template_repo}/generate": + subcategory: releases post: - summary: Create a repository using a template + summary: Create a release description: |- - 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: + Users with push access to the repository can create a release. - * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. - * `repo` scope to create a private repository + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - repos - operationId: repos/create-using-template + operationId: repos/create-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-repository-using-a-template + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-release parameters: - - name: template_owner - in: path - required: true - schema: - type: string - - name: template_repo - in: path - required: true - schema: - type: string + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" requestBody: required: true content: @@ -30532,515 +29752,619 @@ paths: schema: type: object properties: - owner: + tag_name: type: string - description: The organization or person who will own the new repository. - To create a new repository in an organization, the authenticated - user must be a member of the specified organization. + description: The name of the tag. + target_commitish: + type: string + description: 'Specifies the commitish value that determines where + the Git tag is created from. Can be any branch or commit SHA. + Unused if the Git tag already exists. Default: the repository''s + default branch (usually `master`).' name: type: string - description: The name of the new repository. - description: + description: The name of the release. + body: type: string - description: A short description of the new repository. - include_all_branches: + description: Text describing the contents of the tag. + draft: type: boolean - description: 'Set to `true` to include the directory structure and - files from all branches in the template repository, and not just - the default branch. Default: `false`.' + description: "`true` to create a draft (unpublished) release, `false` + to create a published one." default: false - private: + prerelease: type: boolean - description: Either `true` to create a new private repository or - `false` to create a new public one. + description: "`true` to identify the release as a prerelease. `false` + to identify the release as a full release." + default: false + generate_release_notes: + type: boolean + description: Whether to automatically generate the name and body + for this release. If `name` is specified, the specified name will + be used; otherwise, a name will be automatically generated. If + `body` is specified, the body will be pre-pended to the automatically + generated notes. default: false required: - - name - example: - owner: octocat - name: Hello-World - description: This is your first repository - include_all_branches: false - private: false + - tag_name + examples: + default: + value: + tag_name: v1.0.0 + target_commitish: master + name: v1.0.0 + body: Description of the release + draft: false + prerelease: false + generate_release_notes: false responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/repository" + "$ref": "#/components/schemas/release" examples: default: - "$ref": "#/components/examples/repository-3" + "$ref": "#/components/examples/release" headers: Location: - example: https://api.github.com/repos/octocat/Hello-World + example: https://api.github.com/repos/octocat/Hello-World/releases/1 schema: type: string + '422': + "$ref": "#/components/responses/validation_failed" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false + enabledForGitHubApps: true category: repos - subcategory: - "/repositories": + subcategory: releases + "/repos/{owner}/{repo}/releases/assets/{asset_id}": get: - summary: List public repositories - description: |- - Lists all public repositories in the order that they were created. - - Note: - - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. - - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. + summary: Get a release asset + description: To download the asset's binary content, set the `Accept` header + of the request to [`application/octet-stream`](https://docs.github.com/enterprise-server@3.6/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. tags: - repos - operationId: repos/list-public + operationId: repos/get-release-asset externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-public-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-release-asset parameters: - - "$ref": "#/components/parameters/since-repo" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/asset-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/release-asset" examples: default: - "$ref": "#/components/examples/public-repository-items" - headers: - Link: - example: ; rel="next" - schema: - type: string - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/release-asset" + '404': + "$ref": "#/components/responses/not_found" + '302': + "$ref": "#/components/responses/found" x-github: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: - "/repositories/{repository_id}/environments/{environment_name}/secrets": - get: - summary: List environment secrets - description: 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. + subcategory: releases + patch: + summary: Update a release asset + description: Users with push access to the repository can edit a release asset. tags: - - actions - operationId: actions/list-environment-secrets + - repos + operationId: repos/update-release-asset externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#list-environment-secrets + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#update-a-release-asset parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/asset-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The file name of the asset. + label: + type: string + description: An alternate short description of the asset. Used in + place of the filename. + state: + type: string + example: '"uploaded"' + examples: + default: + value: + name: foo-1.0.0-osx.zip + label: Mac binary responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/actions-secret" + "$ref": "#/components/schemas/release-asset" examples: default: - "$ref": "#/components/examples/actions-secret-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/release-asset" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": - get: - summary: Get an environment public key - description: 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. + category: repos + subcategory: releases + delete: + summary: Delete a release asset + description: '' tags: - - actions - operationId: actions/get-environment-public-key + - repos + operationId: repos/delete-release-asset externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-an-environment-public-key + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-release-asset parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/asset-id" responses: - '200': + '204': description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/generate-notes": + post: + summary: Generate release notes content for a release + description: Generate a name and body describing a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + The body content will be markdown formatted and contain information like the + changes since last release and users who contributed. The generated release + notes are not saved anywhere. They are intended to be generated and used when + creating a new release. + tags: + - repos + operationId: repos/generate-release-notes + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#generate-release-notes + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + tag_name: + type: string + description: The tag name for the release. This can be an existing + tag or a new one. + target_commitish: + type: string + description: Specifies the commitish value that will be the target + for the release's tag. Required if the supplied tag_name does + not reference an existing tag. Ignored if the tag_name already + exists. + previous_tag_name: + type: string + description: The name of the previous tag to use as the starting + point for the release notes. Use to manually specify the range + for the set of changes considered as part this release. + configuration_file_path: + type: string + description: Specifies a path to a file in the repository containing + configuration settings used for generating the release notes. + If unspecified, the configuration file located in the repository + at '.github/release.yml' or '.github/release.yaml' will be used. + If that is not present, the default configuration will be used. + required: + - tag_name + examples: + default: + value: + tag_name: v1.0.0 + target_commitish: main + previous_tag_name: v0.9.2 + configuration_file_path: ".github/custom_release_config.yml" + responses: + '200': + description: Name and body of generated release notes content: application/json: schema: - "$ref": "#/components/schemas/actions-public-key" + "$ref": "#/components/schemas/release-notes-content" examples: default: - "$ref": "#/components/examples/actions-public-key" + "$ref": "#/components/examples/release-notes-content" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/latest": get: - summary: Get an environment secret - description: 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. + summary: Get the latest release + description: |- + 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. tags: - - actions - operationId: actions/get-environment-secret + - repos + operationId: repos/get-latest-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#get-an-environment-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-the-latest-release parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/actions-secret" + "$ref": "#/components/schemas/release" examples: default: - "$ref": "#/components/examples/actions-secret" + "$ref": "#/components/examples/release" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - put: - summary: Create or update an environment secret - description: |- - Creates or updates an environment secret with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access - token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use - this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` - - #### Example encrypting a secret using C# - - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - - ``` - var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - - var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); - - Console.WriteLine(Convert.ToBase64String(sealedPublicKeyBox)); - ``` - - #### Example encrypting a secret using Ruby - - Encrypt your secret using the [rbnacl](https://github.com/RubyCrypto/rbnacl) gem. - - ```ruby - require "rbnacl" - require "base64" - - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) - - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") - - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/tags/{tag}": + get: + summary: Get a release by tag name + description: Get a published release with the specified tag. tags: - - actions - operationId: actions/create-or-update-environment-secret + - repos + operationId: repos/get-release-by-tag externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#create-or-update-an-environment-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-release-by-tag-name parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/secret-name" - requestBody: - required: true - content: - application/json: - schema: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: tag + description: tag parameter + in: path + required: true + schema: + type: string + x-multi-segment: true + responses: + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/release" + examples: + default: + "$ref": "#/components/examples/release" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/{release_id}": + get: + summary: Get a release + description: "**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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia)." + tags: + - repos + operationId: repos/get-release + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-a-release + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + responses: + '200': + description: "**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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#hypermedia)." + content: + application/json: + schema: + "$ref": "#/components/schemas/release" + examples: + default: + "$ref": "#/components/examples/release" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: releases + patch: + summary: Update a release + description: Users with push access to the repository can edit a release. + tags: + - repos + operationId: repos/update-release + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#update-a-release + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + requestBody: + required: false + content: + application/json: + schema: type: object properties: - encrypted_value: + tag_name: type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get an environment public - key](https://docs.github.com/rest/reference/actions#get-an-environment-public-key) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: + description: The name of the tag. + target_commitish: type: string - description: ID of the key you used to encrypt the secret. - required: - - encrypted_value - - key_id - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' + description: 'Specifies the commitish value that determines where + the Git tag is created from. Can be any branch or commit SHA. + Unused if the Git tag already exists. Default: the repository''s + default branch (usually `master`).' + name: + type: string + description: The name of the release. + body: + type: string + description: Text describing the contents of the tag. + draft: + type: boolean + description: "`true` makes the release a draft, and `false` publishes + the release." + prerelease: + type: boolean + description: "`true` to identify the release as a prerelease, `false` + to identify the release as a full release." + examples: + default: + value: + tag_name: v1.0.0 + target_commitish: master + name: v1.0.0 + body: Description of the release + draft: false + prerelease: false responses: - '201': - description: Response when creating a secret + '200': + description: Response content: application/json: schema: - "$ref": "#/components/schemas/empty-object" - '204': - description: Response when updating a secret + "$ref": "#/components/schemas/release" + examples: + default: + "$ref": "#/components/examples/release" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets + category: repos + subcategory: releases delete: - summary: Delete an environment secret - description: 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. + summary: Delete a release + description: Users with push access to the repository can delete a release. tags: - - actions - operationId: actions/delete-environment-secret + - repos + operationId: repos/delete-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/actions#delete-an-environment-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-a-release parameters: - - "$ref": "#/components/parameters/repository-id" - - "$ref": "#/components/parameters/environment-name" - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" responses: '204': - description: Default response + description: Response x-github: githubCloudOnly: false enabledForGitHubApps: true - category: actions - subcategory: secrets - "/scim/v2/enterprises/{enterprise}/Groups": + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/{release_id}/assets": get: - summary: List provisioned SCIM groups for an enterprise - description: "**Note:** The SCIM API endpoints for enterprise accounts are currently - in beta and are subject to change." - operationId: enterprise-admin/list-provisioned-groups-enterprise + summary: List release assets + description: '' tags: - - enterprise-admin + - repos + operationId: repos/list-release-assets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-release-assets parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/start-index" - - "$ref": "#/components/parameters/count" - - name: filter - description: filter results - in: query - required: false - schema: - type: string - - name: excludedAttributes - description: attributes to exclude - in: query - required: false - schema: - type: string + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-group-list-enterprise" + type: array + items: + "$ref": "#/components/schemas/release-asset" examples: default: - "$ref": "#/components/examples/scim-enterprise-group-list" + "$ref": "#/components/examples/release-asset-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim + category: repos + subcategory: releases post: - summary: Provision a SCIM enterprise group and invite users - description: |- - **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. - operationId: enterprise-admin/provision-and-invite-enterprise-group + summary: Upload a release asset + description: "This endpoint makes use of [a Hypermedia relation](https://docs.github.com/enterprise-server@3.6/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\nthe + response of the [Create a release endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-release) + to upload a release asset.\n\nYou need to use an HTTP client which supports + [SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to + this endpoint.\n\nMost 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: \n\n`application/zip`\n\nGitHub Enterprise Server 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,\nyou'll still need + to pass your authentication to be able to upload an asset.\n\nWhen 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.\n\n**Notes:**\n* + \ GitHub Enterprise Server 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/enterprise-server@3.6/rest/reference/repos#list-assets-for-a-release)\"\nendpoint + lists the renamed filenames. For more information and help, contact [GitHub + Enterprise Server Support](https://support.github.com/contact?tags=dotcom-rest-api).\n* + \ 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." tags: - - enterprise-admin + - repos + operationId: repos/upload-release-asset externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#upload-a-release-asset + servers: + - url: https://uploads.github.com + description: The URL origin (protocol + host name + port) is included in `upload_url` + returned in the response of the "Create a release" endpoint parameters: - - "$ref": "#/components/parameters/enterprise" - requestBody: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + - name: name + in: query required: true + schema: + type: string + - name: label + in: query + schema: + type: string + requestBody: + required: false content: - application/json: + "*/*": schema: - type: object - properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - displayName: - type: string - description: The name of the SCIM group. This must match the GitHub - organization that the group maps to. - members: - type: array - items: - type: object - properties: - value: - type: string - description: The SCIM user ID for a user. - required: - - value - required: - - schemas - - displayName - example: - schemas: - - urn:ietf:params:scim:schemas:core:2.0:Group - displayName: octo-org - members: - - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc - - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 + type: string + description: The raw file data responses: '201': - description: Response + description: Response for successful upload content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-group" + "$ref": "#/components/schemas/release-asset" examples: - default: - "$ref": "#/components/examples/scim-enterprise-group" + response-for-successful-upload: + "$ref": "#/components/examples/release-asset-response-for-successful-upload" + '422': + description: Response if you upload an asset with the same filename as another + uploaded asset x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": + category: repos + subcategory: releases + "/repos/{owner}/{repo}/releases/{release_id}/reactions": get: - summary: Get SCIM provisioning information for an enterprise group - description: "**Note:** The SCIM API endpoints for enterprise accounts are currently - in beta and are subject to change." - operationId: enterprise-admin/get-provisioning-information-for-enterprise-group + summary: List reactions for a release + description: List the reactions to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). tags: - - enterprise-admin + - reactions + operationId: reactions/list-for-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-group + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#list-reactions-for-a-release parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-group-id" - - name: excludedAttributes - description: Attributes to exclude. + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a release. in: query required: false schema: type: string + enum: + - "+1" + - laugh + - heart + - hooray + - rocket + - eyes + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-group" + type: array + items: + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/scim-enterprise-group" + "$ref": "#/components/examples/reaction-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - put: - summary: Set SCIM information for a provisioned enterprise group - description: |- - **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. - operationId: enterprise-admin/set-information-for-provisioned-enterprise-group + category: reactions + subcategory: + post: + summary: Create reaction for a release + description: 'Create a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). + A response with a `Status: 200 OK` means that you already added the reaction + type to this release.' tags: - - enterprise-admin + - reactions + operationId: reactions/create-for-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#create-reaction-for-a-release parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-group-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" requestBody: required: true content: @@ -31048,350 +30372,256 @@ paths: schema: type: object properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - displayName: + content: type: string - description: The name of the SCIM group. This must match the GitHub - organization that the group maps to. - members: - type: array - items: - type: object - properties: - value: - type: string - description: The SCIM user ID for a user. - required: - - value + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the release. + enum: + - "+1" + - laugh + - heart + - hooray + - rocket + - eyes required: - - schemas - - displayName - example: - schemas: - - urn:ietf:params:scim:schemas:core:2.0:Group - displayName: octo-org - members: - - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc - - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 + - content + examples: + default: + value: + content: heart responses: '200': - description: Response + description: Reaction exists content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-group" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/scim-enterprise-group" - x-github: - enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - patch: - summary: Update an attribute for a SCIM enterprise group - description: |- - **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). - operationId: enterprise-admin/update-attribute-for-enterprise-group - tags: - - enterprise-admin - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-group - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-group-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - Operations: - type: array - description: Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). - minItems: 1 - items: - type: object - properties: - op: - type: string - enum: - - add - - Add - - remove - - Remove - - replace - - Replace - path: - type: string - value: - description: Can be any value - string, number, array or object. - required: - - op - required: - - schemas - - Operations - example: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - op: remove - path: members - value: - - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 - responses: - '200': - description: Response + "$ref": "#/components/examples/reaction" + '201': + description: Reaction created content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-group" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/scim-enterprise-group-2" + "$ref": "#/components/examples/reaction" + '422': + "$ref": "#/components/responses/validation_failed" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim + category: reactions + subcategory: + "/repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}": delete: - summary: Delete a SCIM group from an enterprise - description: "**Note:** The SCIM API endpoints for enterprise accounts are currently - in beta and are subject to change." - operationId: enterprise-admin/delete-scim-group-from-enterprise + summary: Delete a release reaction + description: |- + **Note:** You can also specify a repository by `repository_id` using the route `DELETE delete /repositories/:repository_id/releases/:release_id/reactions/:reaction_id`. + + Delete a reaction to a [release](https://docs.github.com/enterprise-server@3.6/rest/reference/repos#releases). tags: - - enterprise-admin + - reactions + operationId: reactions/delete-for-release externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#delete-a-release-reaction parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-group-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/release-id" + - "$ref": "#/components/parameters/reaction-id" responses: '204': description: Response x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - "/scim/v2/enterprises/{enterprise}/Users": + category: reactions + subcategory: + "/repos/{owner}/{repo}/replicas/caches": get: - summary: List SCIM provisioned identities for an enterprise - description: |- - **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. - operationId: enterprise-admin/list-provisioned-identities-enterprise + summary: List repository cache replication status + description: Lists the status of each repository cache replica. tags: - - enterprise-admin + - repos + operationId: repos/list-cache-info externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-cache-replication-status parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/start-index" - - "$ref": "#/components/parameters/count" - - name: filter - description: filter results - in: query - required: false - schema: - type: string + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: Status information for cache replicas content: application/json: schema: - "$ref": "#/components/schemas/scim-user-list-enterprise" + type: array + items: + description: Status for a cache replica + type: object + properties: + host: + type: string + location: + type: string + git: + type: object + properties: + sync_status: + type: string + enum: + - offline + - inactive + - in_sync + - not_in_sync + last_sync: + type: string + format: date-time + required: + - sync_status + - last_sync + required: + - host + - location + - git examples: default: - "$ref": "#/components/examples/scim-enterprise-user-list" - x-github: + value: + - host: host-1 + location: berlin + git: + - sync_status: in_sync + - last_sync: '2022-01-10T19:33:52Z' + - host: host-2 + location: chicago + git: + - sync_status: offline + - last_sync: '2022-01-10T19:34:12Z' + headers: + Link: + "$ref": "#/components/headers/link" + '403': + "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - post: - summary: Provision and invite a SCIM enterprise user + category: repos + subcategory: + "/repos/{owner}/{repo}/secret-scanning/alerts": + get: + summary: List secret scanning alerts for a repository description: |- - **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. + Lists secret scanning alerts for an eligible repository, from newest to oldest. + To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + For public repositories, you may instead use the `public_repo` scope. - 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. - operationId: enterprise-admin/provision-and-invite-enterprise-user + GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. tags: - - enterprise-admin + - secret-scanning + operationId: secret-scanning/list-alerts-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#provision-and-invite-a-scim-enterprise-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository parameters: - - "$ref": "#/components/parameters/enterprise" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - userName: - type: string - description: The username for the user. - name: - type: object - properties: - givenName: - type: string - description: The first name of the user. - familyName: - type: string - description: The last name of the user. - required: - - givenName - - familyName - emails: - type: array - description: List of user emails. - items: - type: object - properties: - value: - type: string - description: The email address. - type: - type: string - description: The type of email address. - primary: - type: boolean - description: Whether this email address is the primary address. - required: - - value - - type - - primary - groups: - type: array - description: List of SCIM group IDs the user is a member of. - items: - type: object - properties: - value: - type: string - required: - - schemas - - userName - - name - - emails - example: - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - userName: mona.octocat@okta.example.com - name: - familyName: Octocat - givenName: Mona - emails: - - value: mona.octocat@okta.example.com - type: work - primary: true - groups: - - value: 468dd3fa-a1d6-11ea-9031-15a1f0d7811d + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/secret-scanning-alert-state" + - "$ref": "#/components/parameters/secret-scanning-alert-secret-type" + - "$ref": "#/components/parameters/secret-scanning-alert-resolution" + - "$ref": "#/components/parameters/secret-scanning-alert-sort" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-user" + type: array + items: + "$ref": "#/components/schemas/secret-scanning-alert" examples: default: - "$ref": "#/components/examples/scim-enterprise-user" + "$ref": "#/components/examples/secret-scanning-alert-list" + '404': + description: Repository is public or secret scanning is disabled for the + repository + '503': + "$ref": "#/components/responses/service_unavailable" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": + category: secret-scanning + subcategory: + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}": get: - summary: Get SCIM provisioning information for an enterprise user - description: "**Note:** The SCIM API endpoints for enterprise accounts are currently - in beta and are subject to change." - operationId: enterprise-admin/get-provisioning-information-for-enterprise-user + summary: Get a secret scanning alert + description: |- + Gets a single secret scanning alert detected in an eligible repository. + To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + For public repositories, you may instead use the `public_repo` scope. + + GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. tags: - - enterprise-admin + - secret-scanning + operationId: secret-scanning/get-alert externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#get-a-secret-scanning-alert parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-user-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-user" + "$ref": "#/components/schemas/secret-scanning-alert" examples: default: - "$ref": "#/components/examples/scim-enterprise-user" + "$ref": "#/components/examples/secret-scanning-alert-open" + '304': + "$ref": "#/components/responses/not_modified" + '404': + description: Repository is public, or secret scanning is disabled for the + repository, or the resource is not found + '503': + "$ref": "#/components/responses/service_unavailable" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - put: - summary: Set SCIM information for a provisioned enterprise user + category: secret-scanning + subcategory: + patch: + summary: Update a secret scanning alert description: |- - **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`. + Updates the status of a secret scanning alert in an eligible repository. + To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + For public repositories, you may instead use the `public_repo` scope. - **Warning:** Setting `active: false` removes the user from the enterprise, deletes the external identity, and deletes the associated `{scim_user_id}`. - operationId: enterprise-admin/set-information-for-provisioned-enterprise-user + GitHub Apps must have the `secret_scanning_alerts` write permission to use this endpoint. + operationId: secret-scanning/update-alert tags: - - enterprise-admin + - secret-scanning externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#update-a-secret-scanning-alert parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-user-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" requestBody: required: true content: @@ -31399,871 +30629,414 @@ paths: schema: type: object properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - userName: - type: string - description: The username for the user. - name: - type: object - properties: - givenName: - type: string - description: The first name of the user. - familyName: - type: string - description: The last name of the user. - required: - - givenName - - familyName - emails: - type: array - description: List of user emails. - items: - type: object - properties: - value: - type: string - description: The email address. - type: - type: string - description: The type of email address. - primary: - type: boolean - description: Whether this email address is the primary address. - required: - - value - - type - - primary - groups: - type: array - description: List of SCIM group IDs the user is a member of. - items: - type: object - properties: - value: - type: string + state: + "$ref": "#/components/schemas/secret-scanning-alert-state" + resolution: + "$ref": "#/components/schemas/secret-scanning-alert-resolution" required: - - schemas - - userName - - name - - emails - example: - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - userName: mona.octocat@okta.example.com - name: - familyName: Octocat - givenName: Mona - emails: - - value: mona.octocat@okta.example.com - type: work - primary: true - groups: - - value: 468dd3fa-a1d6-11ea-9031-15a1f0d7811d + - state + examples: + default: + value: + state: resolved + resolution: false_positive responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-user" + "$ref": "#/components/schemas/secret-scanning-alert" examples: default: - "$ref": "#/components/examples/scim-enterprise-user" + "$ref": "#/components/examples/secret-scanning-alert-resolved" + '404': + description: Repository is public, or secret scanning is disabled for the + repository, or the resource is not found + '422': + description: State does not match the resolution + '503': + "$ref": "#/components/responses/service_unavailable" x-github: enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - patch: - summary: Update an attribute for a SCIM enterprise user + githubCloudOnly: false + category: secret-scanning + "/repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations": + get: + summary: List locations for a secret scanning alert description: |- - **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`. + Lists all locations for a given secret scanning alert for an eligible repository. + To use this endpoint, you must be an administrator for the repository or for the organization that owns the repository, and you must use a personal access token with the `repo` scope or `security_events` scope. + For public repositories, you may instead use the `public_repo` scope. - ``` - { - "Operations":[{ - "op":"replace", - "value":{ - "active":false - } - }] - } - ``` - operationId: enterprise-admin/update-attribute-for-enterprise-user + GitHub Apps must have the `secret_scanning_alerts` read permission to use this endpoint. tags: - - enterprise-admin + - secret-scanning + operationId: secret-scanning/list-locations-for-alert externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-user-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - schemas: - type: array - description: The SCIM schema URIs. - items: - type: string - Operations: - type: array - description: Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). - items: - type: object - required: - - schemas - - Operations - example: - schemas: - - urn:ietf:params:scim:api:messages:2.0:PatchOp - Operations: - - op: add - path: emails - value: - - value: monalisa@octocat.github.com - type: home - - op: replace - path: name.givenName - value: Monalisa + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/alert-number" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/scim-enterprise-user" + type: array + description: List of locations where the secret was detected + items: + "$ref": "#/components/schemas/secret-scanning-location" examples: default: - "$ref": "#/components/examples/scim-enterprise-user-2" - x-github: - enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - delete: - summary: Delete a SCIM user from an enterprise - description: "**Note:** The SCIM API endpoints for enterprise accounts are currently - in beta and are subject to change." - operationId: enterprise-admin/delete-user-from-enterprise - tags: - - enterprise-admin - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/enterprise-admin#delete-a-scim-user-from-an-enterprise - parameters: - - "$ref": "#/components/parameters/enterprise" - - "$ref": "#/components/parameters/scim-user-id" - responses: - '204': - description: Response + "$ref": "#/components/examples/secret-scanning-location-list" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + description: Repository is public, or secret scanning is disabled for the + repository, or the resource is not found + '503': + "$ref": "#/components/responses/service_unavailable" x-github: + githubCloudOnly: false enabledForGitHubApps: true - githubCloudOnly: true - category: enterprise-admin - subcategory: scim - "/scim/v2/organizations/{org}/Users": + category: secret-scanning + subcategory: + "/repos/{owner}/{repo}/stargazers": get: - summary: List SCIM provisioned identities + summary: List stargazers description: |- - 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. + Lists the people that have starred the repository. - 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. + You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. tags: - - scim - operationId: scim/list-provisioned-identities + - activity + operationId: activity/list-stargazers-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/scim#list-scim-provisioned-identities + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-stargazers parameters: - - "$ref": "#/components/parameters/org" - - name: startIndex - description: 'Used for pagination: the index of the first result to return.' - in: query - required: false - schema: - type: integer - - name: count - description: 'Used for pagination: the number of results to return.' - in: query - required: false - schema: - type: integer - - name: filter - description: |- - 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\"`. - in: query - required: false - schema: - type: string + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: - application/scim+json: + application/json: schema: - "$ref": "#/components/schemas/scim-user-list" + anyOf: + - type: array + items: + "$ref": "#/components/schemas/simple-user" + - type: array + items: + "$ref": "#/components/schemas/stargazer" examples: - response-with-filter: - "$ref": "#/components/examples/scim-user-list-response-with-filter" - response-without-filter: - "$ref": "#/components/examples/scim-user-list-response-without-filter" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - '400': - "$ref": "#/components/responses/scim_bad_request" + default-response: + "$ref": "#/components/examples/simple-user-items-default-response" + alternative-response-with-star-creation-timestamps: + "$ref": "#/components/examples/stargazer-items-alternative-response-with-star-creation-timestamps" + headers: + Link: + "$ref": "#/components/headers/link" + '422': + "$ref": "#/components/responses/validation_failed" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: scim - subcategory: - post: - summary: Provision and invite a SCIM user - description: Provision organization membership for a user, and send an activation - email to the email address. + category: activity + subcategory: starring + "/repos/{owner}/{repo}/stats/code_frequency": + get: + summary: Get the weekly commit activity + description: Returns a weekly aggregate of the number of additions and deletions + pushed to a repository. tags: - - scim - operationId: scim/provision-and-invite-user + - repos + operationId: repos/get-code-frequency-stats externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/scim#provision-and-invite-a-scim-user + url: https://docs.github.com/enterprise-server@3.6/rest/metrics/statistics#get-the-weekly-commit-activity parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: - '201': - description: Response + '200': + description: Returns a weekly aggregate of the number of additions and deletions + pushed to a repository. content: - application/scim+json: + application/json: schema: - "$ref": "#/components/schemas/scim-user" + type: array + items: + "$ref": "#/components/schemas/code-frequency-stat" examples: default: - "$ref": "#/components/examples/scim-user" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - '500': - "$ref": "#/components/responses/scim_internal_error" - '409': - "$ref": "#/components/responses/scim_conflict" - '400': - "$ref": "#/components/responses/scim_bad_request" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - userName: - description: Configured by the admin. Could be an email, login, - or username - example: someone@example.com - type: string - displayName: - description: The name of the user, suitable for display to end-users - example: Jon Doe - type: string - name: - type: object - properties: - givenName: - type: string - familyName: - type: string - formatted: - type: string - required: - - givenName - - familyName - example: - givenName: Jane - familyName: User - emails: - description: user emails - example: - - value: someone@example.com - primary: true - - value: another@example.com - primary: false - type: array - minItems: 1 - items: - type: object - properties: - value: - type: string - primary: - type: boolean - type: - type: string - required: - - value - schemas: - type: array - items: - type: string - externalId: - type: string - groups: - type: array - items: - type: string - active: - type: boolean - required: - - userName - - name - - emails + "$ref": "#/components/examples/code-frequency-stat-items" + '202': + "$ref": "#/components/responses/accepted" + '204': + "$ref": "#/components/responses/no_content" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: scim - subcategory: - "/scim/v2/organizations/{org}/Users/{scim_user_id}": + category: metrics + subcategory: statistics + "/repos/{owner}/{repo}/stats/commit_activity": get: - summary: Get SCIM provisioning information for a user - description: '' + summary: Get the last year of commit activity + description: Returns the last year of commit activity grouped by week. The `days` + array is a group of commits per day, starting on `Sunday`. tags: - - scim - operationId: scim/get-provisioning-information-for-user + - repos + operationId: repos/get-commit-activity-stats externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/scim#get-scim-provisioning-information-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/metrics/statistics#get-the-last-year-of-commit-activity parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/scim-user-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': description: Response content: - application/scim+json: + application/json: schema: - "$ref": "#/components/schemas/scim-user" + type: array + items: + "$ref": "#/components/schemas/commit-activity" examples: default: - "$ref": "#/components/examples/scim-user" - '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/commit-activity-items" + '202': + "$ref": "#/components/responses/accepted" + '204': + "$ref": "#/components/responses/no_content" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: scim - subcategory: - put: - summary: Update a provisioned organization membership - description: |- - 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. + category: metrics + subcategory: statistics + "/repos/{owner}/{repo}/stats/contributors": + get: + summary: Get all contributor commit activity + description: |2- - You must at least provide the required values for the user: `userName`, `name`, and `emails`. + Returns the `total` number of commits authored by the contributor. In addition, the response includes a Weekly Hash (`weeks` array) with the following information: - **Warning:** Setting `active: false` removes the user from the organization, deletes the external identity, and deletes the associated `{scim_user_id}`. + * `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 tags: - - scim - operationId: scim/set-information-for-provisioned-user + - repos + operationId: repos/get-contributors-stats externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/scim#set-scim-information-for-a-provisioned-user + url: https://docs.github.com/enterprise-server@3.6/rest/metrics/statistics#get-all-contributor-commit-activity parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/scim-user-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': description: Response content: - application/scim+json: + application/json: schema: - "$ref": "#/components/schemas/scim-user" + type: array + items: + "$ref": "#/components/schemas/contributor-activity" examples: default: - "$ref": "#/components/examples/scim-user" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - schemas: - type: array - items: - type: string - displayName: - description: The name of the user, suitable for display to end-users - example: Jon Doe - type: string - externalId: - type: string - groups: - type: array - items: - type: string - active: - type: boolean - userName: - description: Configured by the admin. Could be an email, login, - or username - example: someone@example.com - type: string - name: - type: object - properties: - givenName: - type: string - familyName: - type: string - formatted: - type: string - required: - - givenName - - familyName - example: - givenName: Jane - familyName: User - emails: - description: user emails - example: - - value: someone@example.com - primary: true - - value: another@example.com - primary: false - type: array - minItems: 1 - items: - type: object - properties: - type: - type: string - value: - type: string - primary: - type: boolean - required: - - value - required: - - userName - - name - - emails + "$ref": "#/components/examples/contributor-activity-items" + '202': + "$ref": "#/components/responses/accepted" + '204': + "$ref": "#/components/responses/no_content" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: scim - subcategory: - patch: - summary: Update an attribute for a SCIM user + category: metrics + subcategory: statistics + "/repos/{owner}/{repo}/stats/participation": + get: + summary: Get the weekly commit count description: |- - 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`. + 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`. - ``` - { - "Operations":[{ - "op":"replace", - "value":{ - "active":false - } - }] - } - ``` + The array order is oldest week (index 0) to most recent week. tags: - - scim - operationId: scim/update-attribute-for-user + - repos + operationId: repos/get-participation-stats externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/scim#update-an-attribute-for-a-scim-user + url: https://docs.github.com/enterprise-server@3.6/rest/metrics/statistics#get-the-weekly-commit-count parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/scim-user-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': - description: Response + description: The array order is oldest week (index 0) to most recent week. content: - application/scim+json: + application/json: schema: - "$ref": "#/components/schemas/scim-user" + "$ref": "#/components/schemas/participation-stats" examples: default: - "$ref": "#/components/examples/scim-user" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - '400': - "$ref": "#/components/responses/scim_bad_request" - '429': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - requestBody: - required: true - content: - application/json: - schema: - properties: - schemas: - type: array - items: - type: string - Operations: - description: Set of operations to be performed - example: - - op: replace - value: - active: false - type: array - minItems: 1 - items: - type: object - properties: - op: - type: string - enum: - - add - - remove - - replace - path: - type: string - value: - oneOf: - - type: object - properties: - active: - type: boolean - nullable: true - userName: - type: string - nullable: true - externalId: - type: string - nullable: true - givenName: - type: string - nullable: true - familyName: - type: string - nullable: true - - type: array - items: - type: object - properties: - value: - type: string - primary: - type: boolean - - type: string - required: - - op - required: - - Operations - type: object - x-github: - githubCloudOnly: true - enabledForGitHubApps: true - category: scim - subcategory: - delete: - summary: Delete a SCIM user from an organization - description: '' - tags: - - scim - operationId: scim/delete-user-from-org - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/scim#delete-a-scim-user-from-an-organization - parameters: - - "$ref": "#/components/parameters/org" - - "$ref": "#/components/parameters/scim-user-id" - responses: - '204': - description: Response + "$ref": "#/components/examples/participation-stats" '404': - "$ref": "#/components/responses/scim_not_found" - '403': - "$ref": "#/components/responses/scim_forbidden" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/responses/not_found" x-github: - githubCloudOnly: true + githubCloudOnly: false enabledForGitHubApps: true - category: scim - subcategory: - "/search/code": + category: metrics + subcategory: statistics + "/repos/{owner}/{repo}/stats/punch_card": get: - summary: Search code + summary: Get the hourly commit count for each day description: |- - 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 + Each array contains the day number, hour number, and number of commits: - Due to the complexity of searching code, there are a few restrictions on how searches are performed: + * `0-6`: Sunday - Saturday + * `0-23`: Hour of day + * Number of commits - * 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. + 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. tags: - - search - operationId: search/code + - repos + operationId: repos/get-punch-card-stats externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-code + url: https://docs.github.com/enterprise-server@3.6/rest/statistics/repos#get-the-hourly-commit-count-for-each-day parameters: - - name: q - description: The query contains one or more search keywords and qualifiers. - Qualifiers allow you to limit your search to specific areas of GitHub. The - REST API supports the same qualifiers as GitHub.com. To learn more about - the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). - See "[Searching code](https://docs.github.com/articles/searching-code/)" - for a detailed list of qualifiers. - in: query - required: true - schema: - type: string - - name: sort - description: '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)' - in: query - required: false - schema: - type: string - enum: - - indexed - - "$ref": "#/components/parameters/order" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': - description: Response + description: 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. content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/code-search-result-item" + type: array + items: + "$ref": "#/components/schemas/code-frequency-stat" examples: default: - "$ref": "#/components/examples/code-search-result-item-paginated" - '304': - "$ref": "#/components/responses/not_modified" - '503': - "$ref": "#/components/responses/service_unavailable" - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/code-frequency-stat-items-2" + '204': + "$ref": "#/components/responses/no_content" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: search - subcategory: - "/search/commits": - get: - summary: Search commits + category: metrics + subcategory: statistics + "/repos/{owner}/{repo}/statuses/{sha}": + post: + summary: Create a commit status description: |- - 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: + Users with push access in a repository can create commit statuses for a given SHA. - `q=repo:octocat/Spoon-Knife+css` + 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. tags: - - search - operationId: search/commits + - repos + operationId: repos/create-commit-status externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-commits + url: https://docs.github.com/enterprise-server@3.6/rest/commits/statuses#create-a-commit-status parameters: - - name: q - description: The query contains one or more search keywords and qualifiers. - Qualifiers allow you to limit your search to specific areas of GitHub. The - REST API supports the same qualifiers as GitHub.com. To learn more about - the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). - See "[Searching commits](https://docs.github.com/articles/searching-commits/)" - for a detailed list of qualifiers. - in: query + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: sha + in: path required: true schema: type: string - - name: sort - description: '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)' - in: query - required: false - schema: - type: string - enum: - - author-date - - committer-date - - "$ref": "#/components/parameters/order" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + x-multi-segment: true + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + state: + type: string + description: The state of the status. + enum: + - error + - failure + - pending + - success + target_url: + type: string + nullable: true + description: "The target URL to associate with this status. This + URL will be linked from the GitHub UI to allow users to easily + see the source of the status. \nFor 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: + \ \n`http://ci.example.com/user/repo/build/sha`" + description: + type: string + nullable: true + description: A short description of the status. + context: + type: string + description: A string label to differentiate this status from the + status of other systems. This field is case-insensitive. + default: default + required: + - state + examples: + default: + value: + state: success + target_url: https://example.com/build/status + description: The build succeeded! + context: continuous-integration/jenkins responses: - '200': + '201': description: Response content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/commit-search-result-item" + "$ref": "#/components/schemas/status" examples: default: - "$ref": "#/components/examples/commit-search-result-item-paginated" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/status" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + schema: + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true - category: search - subcategory: - "/search/issues": + category: commits + subcategory: statuses + "/repos/{owner}/{repo}/subscribers": get: - summary: Search issues and pull requests - description: |- - 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)." + summary: List watchers + description: Lists the people watching the specified repository. tags: - - search - operationId: search/issues-and-pull-requests + - activity + operationId: activity/list-watchers-for-repo externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-issues-and-pull-requests + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-watchers parameters: - - name: q - description: The query contains one or more search keywords and qualifiers. - Qualifiers allow you to limit your search to specific areas of GitHub. The - REST API supports the same qualifiers as GitHub.com. To learn more about - the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). - See "[Searching issues and pull requests](https://docs.github.com/articles/searching-issues-and-pull-requests/)" - for a detailed list of qualifiers. - in: query - required: true - schema: - type: string - - name: sort - description: '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)' - in: query - required: false - schema: - type: string - enum: - - comments - - reactions - - reactions-+1 - - reactions--1 - - reactions-smile - - reactions-thinking_face - - reactions-heart - - reactions-tada - - interactions - - created - - updated - - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -32272,304 +31045,133 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/issue-search-result-item" + type: array + items: + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/issue-search-result-item-paginated" - '503': - "$ref": "#/components/responses/service_unavailable" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/simple-user-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: search - subcategory: - "/search/labels": + category: activity + subcategory: watching + "/repos/{owner}/{repo}/subscription": get: - summary: Search labels - description: |- - 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. + summary: Get a repository subscription + description: '' tags: - - search - operationId: search/labels + - activity + operationId: activity/get-repo-subscription externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-labels + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#get-a-repository-subscription parameters: - - name: repository_id - description: The id of the repository. - in: query - required: true - schema: - type: integer - - name: q - description: 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). - in: query - required: true - schema: - type: string - - name: sort - description: '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)' - in: query - required: false - schema: - type: string - enum: - - created - - updated - - "$ref": "#/components/parameters/order" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': - description: Response + description: if you subscribe to the repository content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/label-search-result-item" + "$ref": "#/components/schemas/repository-subscription" examples: - default: - "$ref": "#/components/examples/label-search-result-item-paginated" - '304': - "$ref": "#/components/responses/not_modified" + response-if-you-subscribe-to-the-repository: + "$ref": "#/components/examples/repository-subscription-response-if-you-subscribe-to-the-repository" '404': - "$ref": "#/components/responses/not_found" + description: Not Found if you don't subscribe to the repository '403': "$ref": "#/components/responses/forbidden" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: search - subcategory: - "/search/repositories": - get: - summary: Search repositories - description: |- - 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. + enabledForGitHubApps: false + category: activity + subcategory: watching + put: + summary: Set a repository subscription + description: 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/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription) + completely. tags: - - search - operationId: search/repos + - activity + operationId: activity/set-repo-subscription externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription parameters: - - name: q - description: The query contains one or more search keywords and qualifiers. - Qualifiers allow you to limit your search to specific areas of GitHub. The - REST API supports the same qualifiers as GitHub.com. To learn more about - the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). - See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" - for a detailed list of qualifiers. - in: query - required: true - schema: - type: string - - name: sort - description: '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)' - in: query + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: required: false - schema: - type: string - enum: - - stars - - forks - - help-wanted-issues - - updated - - "$ref": "#/components/parameters/order" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + content: + application/json: + schema: + type: object + properties: + subscribed: + type: boolean + description: Determines if notifications should be received from + this repository. + ignored: + type: boolean + description: Determines if all notifications should be blocked from + this repository. responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/repo-search-result-item" + "$ref": "#/components/schemas/repository-subscription" examples: default: - "$ref": "#/components/examples/repo-search-result-item-paginated" - '503': - "$ref": "#/components/responses/service_unavailable" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/repository-subscription" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: search - subcategory: - "/search/topics": - get: - summary: Search topics - description: |- - Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - - When searching for topics, you can get text match metadata for the topic's **short\_description**, **description**, **name**, or **display\_name** field when you pass the `text-match` media type. For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/rest/reference/search#text-match-metadata). - - For example, if you want to search for topics related to Ruby that are featured on https://github.com/topics. Your query might look like this: - - `q=ruby+is:featured` - - This query searches for topics with the keyword `ruby` and limits the results to find only topics that are featured. The topics that are the best match for the query appear first in the search results. + enabledForGitHubApps: false + category: activity + subcategory: watching + delete: + summary: Delete a repository subscription + description: 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/enterprise-server@3.6/rest/reference/activity#set-a-repository-subscription). tags: - - search - operationId: search/topics + - activity + operationId: activity/delete-repo-subscription externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-topics + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#delete-a-repository-subscription parameters: - - name: q - description: 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). - in: query - required: true - schema: - type: string - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/topic-search-result-item" - examples: - default: - "$ref": "#/components/examples/topic-search-result-item-paginated" - '304': - "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: search - subcategory: - "/search/users": + enabledForGitHubApps: false + category: activity + subcategory: watching + "/repos/{owner}/{repo}/tags": get: - summary: Search users - description: |- - 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. + summary: List repository tags + description: '' tags: - - search - operationId: search/users + - repos + operationId: repos/list-tags externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/search#search-users + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-tags parameters: - - name: q - description: The query contains one or more search keywords and qualifiers. - Qualifiers allow you to limit your search to specific areas of GitHub. The - REST API supports the same qualifiers as GitHub.com. To learn more about - the format of the query, see [Constructing a search query](https://docs.github.com/rest/reference/search#constructing-a-search-query). - See "[Searching users](https://docs.github.com/articles/searching-users/)" - for a detailed list of qualifiers. - in: query - required: true - schema: - type: string - - name: sort - description: '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)' - in: query - required: false - schema: - type: string - enum: - - followers - - repositories - - joined - - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -32578,85 +31180,71 @@ paths: content: application/json: schema: - type: object - required: - - total_count - - incomplete_results - - items - properties: - total_count: - type: integer - incomplete_results: - type: boolean - items: - type: array - items: - "$ref": "#/components/schemas/user-search-result-item" + type: array + items: + "$ref": "#/components/schemas/tag" examples: default: - "$ref": "#/components/examples/user-search-result-item-paginated" - '304': - "$ref": "#/components/responses/not_modified" - '503': - "$ref": "#/components/responses/service_unavailable" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/tag-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - category: search - subcategory: - "/teams/{team_id}": + category: repos + subcategory: + "/repos/{owner}/{repo}/tags/protection": get: - summary: Get a team (Legacy) - description: "**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." + summary: List tag protection states for a repository + description: |- + This returns the tag protection states of a repository. + + This information is only available to repository administrators. tags: - - teams - operationId: teams/get-legacy + - repos + operationId: repos/list-tag-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#get-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-tag-protection-state-of-a-repository parameters: - - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-full" + type: array + items: + "$ref": "#/components/schemas/tag-protection" examples: default: - "$ref": "#/components/examples/team-full" + "$ref": "#/components/examples/tag-protection-items" + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - patch: - summary: Update a team (Legacy) + category: repos + subcategory: tags + post: + summary: Create a tag protection state for a repository description: |- - **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`. + This creates a tag protection state for a repository. + This endpoint is only available to repository administrators. tags: - - teams - operationId: teams/update-legacy + - repos + operationId: repos/create-tag-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#update-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-tag-protection-state-for-a-repository parameters: - - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" requestBody: required: true content: @@ -32664,128 +31252,111 @@ paths: schema: type: object properties: - name: - type: string - description: The name of the team. - description: - type: string - description: The description of the team. - privacy: - type: string - description: "The level of privacy this team should have. Editing - teams without specifying this parameter leaves `privacy` intact. - The options are: \n**For a non-nested team:** \n\\* `secret` - - only visible to organization owners and members of this team. - \ \n\\* `closed` - visible to all members of this organization. - \ \n**For a parent or child team:** \n\\* `closed` - visible - to all members of this organization." - enum: - - secret - - closed - permission: + pattern: type: string - description: "**Deprecated**. The permission that new repositories - will be added to the team with when none is specified. Can be - one of: \n\\* `pull` - team members can pull, but not push to - or administer newly-added repositories. \n\\* `push` - team members - can pull and push, but not administer newly-added repositories. - \ \n\\* `admin` - team members can pull, push and administer newly-added - repositories." - enum: - - pull - - push - - admin - default: pull - parent_team_id: - type: integer - description: The ID of a team to set as the parent team. - nullable: true + description: An optional glob pattern to match against when enforcing + tag protection. required: - - name - example: - name: new team name - description: new team description - privacy: closed + - pattern + examples: + default: + value: + pattern: v1.* responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/team-full" - examples: - default: - "$ref": "#/components/examples/team-full" '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-full" + "$ref": "#/components/schemas/tag-protection" examples: default: - "$ref": "#/components/examples/team-full" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/tag-protection" '403': "$ref": "#/components/responses/forbidden" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true + category: repos + subcategory: tags + "/repos/{owner}/{repo}/tags/protection/{tag_protection_id}": delete: - summary: Delete a team (Legacy) + summary: Delete a tag protection state for a repository description: |- - **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. + This deletes a tag protection state for a repository. + This endpoint is only available to repository administrators. tags: - - teams - operationId: teams/delete-legacy + - repos + operationId: repos/delete-tag-protection externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#delete-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#delete-tag-protection-state-for-a-repository parameters: - - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/tag-protection-id" responses: '204': description: Response + '403': + "$ref": "#/components/responses/forbidden" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/teams/{team_id}/discussions": + category: repos + subcategory: tags + "/repos/{owner}/{repo}/tarball/{ref}": get: - summary: List discussions (Legacy) + summary: Download a repository archive (tar) description: |- - **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/). + 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. tags: - - teams - operationId: teams/list-discussions-legacy + - repos externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-discussions-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#download-a-repository-archive + operationId: repos/download-tarball-archive parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: ref + in: path + required: true + schema: + type: string + responses: + '302': + description: Response + headers: + Location: + example: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires + schema: + type: string + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: repos + subcategory: contents + "/repos/{owner}/{repo}/teams": + get: + summary: List repository teams + description: '' + tags: + - repos + operationId: repos/list-teams + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repository-teams + parameters: + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -32796,249 +31367,229 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/team" examples: default: - "$ref": "#/components/examples/team-discussion-items" + "$ref": "#/components/examples/team-items" headers: Link: "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussions - deprecated: true - post: - summary: Create a discussion (Legacy) - description: |- - **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [`Create a discussion`](https://docs.github.com/rest/reference/teams#create-a-discussion) endpoint. - - Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + category: repos + subcategory: + "/repos/{owner}/{repo}/topics": + get: + summary: Get all repository topics + description: '' tags: - - teams - operationId: teams/create-discussion-legacy + - repos + operationId: repos/get-all-topics externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-a-discussion-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#get-all-repository-topics parameters: - - "$ref": "#/components/parameters/team-id" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - title: - type: string - description: The discussion post's title. - body: - type: string - description: The discussion post's body text. - private: - type: boolean - description: Private posts are only visible to team members, organization - owners, and team maintainers. Public posts are visible to all - members of the organization. Set to `true` to create a private - post. - default: false - required: - - title - - body - example: - title: Our first team post - body: Hi! This is an area for us to collaborate as a team. + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/per-page" responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/topic" examples: default: - "$ref": "#/components/examples/team-discussion" + "$ref": "#/components/examples/topic" + '404': + "$ref": "#/components/responses/not_found" x-github: - triggersNotification: true githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussions - deprecated: true - "/teams/{team_id}/discussions/{discussion_number}": - get: - summary: Get a discussion (Legacy) - description: |- - **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/). + category: repos + subcategory: + put: + summary: Replace all repository topics + description: '' tags: - - teams - operationId: teams/get-discussion-legacy + - repos + operationId: repos/replace-all-topics externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-a-discussion-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#replace-all-repository-topics parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + names: + type: array + description: An array of topics to add to the repository. Pass one + or more topics to _replace_ the set of existing topics. Send an + empty array (`[]`) to clear all topics from the repository. **Note:** + Topic `names` cannot contain uppercase letters. + items: + type: string + required: + - names + examples: + default: + value: + names: + - octocat + - atom + - electron + - api responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/topic" examples: default: - "$ref": "#/components/examples/team-discussion" + "$ref": "#/components/examples/topic" + '404': + "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed_simple" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussions - deprecated: true - patch: - summary: Update a discussion (Legacy) - description: |- - **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/). + category: repos + subcategory: + "/repos/{owner}/{repo}/transfer": + post: + summary: Transfer a repository + description: A transfer request will need to be accepted by the new owner when + transferring a personal repository to another user. The response will contain + the original `owner`, and the transfer will continue asynchronously. For more + details on the requirements to transfer personal and organization-owned repositories, + see [about repository transfers](https://docs.github.com/articles/about-repository-transfers/). tags: - - teams - operationId: teams/update-discussion-legacy + - repos + operationId: repos/transfer externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#update-a-discussion-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#transfer-a-repository parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - title: - type: string - description: The discussion post's title. - body: + new_owner: type: string - description: The discussion post's body text. - example: - title: Welcome to our first team post + description: The username or organization name the repository will + be transferred to. + team_ids: + type: array + description: ID of the team or teams to add to the repository. Teams + can only be added to organization-owned repositories. + items: + type: integer + required: + - new_owner + examples: + default: + value: + new_owner: github + team_ids: + - 12 + - 345 responses: - '200': + '202': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion" + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/team-discussion-2" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussions - deprecated: true - delete: - summary: Delete a discussion (Legacy) - description: |- - **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/). - tags: - - teams - operationId: teams/delete-discussion-legacy - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/teams#delete-a-discussion-legacy - parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - responses: - '204': - description: Response + "$ref": "#/components/examples/minimal-repository" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussions - deprecated: true - "/teams/{team_id}/discussions/{discussion_number}/comments": + category: repos + subcategory: + "/repos/{owner}/{repo}/zipball/{ref}": get: - summary: List discussion comments (Legacy) + summary: Download a repository archive (zip) description: |- - **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. + 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. - 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**: For private repositories, these links are temporary and expire after five minutes. If the repository is empty, you will receive a 404 when you follow the redirect. tags: - - teams - operationId: teams/list-discussion-comments-legacy + - repos externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-discussion-comments-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#download-a-repository-archive + operationId: repos/download-zipball-archive parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" + - name: ref + in: path + required: true + schema: + type: string responses: - '200': + '302': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/team-discussion-comment" - examples: - default: - "$ref": "#/components/examples/team-discussion-comment-items" headers: - Link: - "$ref": "#/components/headers/link" + Location: + example: https://codeload.github.com/me/myprivate/legacy.zip/master?login=me&token=thistokenexpires + schema: + type: string x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussion-comments - deprecated: true + category: repos + subcategory: contents + "/repos/{template_owner}/{template_repo}/generate": post: - summary: Create a discussion comment (Legacy) + summary: Create a repository using a template description: |- - **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 repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. If the repository is not public, 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/enterprise-server@3.6/rest/reference/repos#get-a-repository) endpoint and check that the `is_template` key is `true`. - 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/). + **OAuth scope requirements** + + When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: - This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. + * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. + * `repo` scope to create a private repository tags: - - teams - operationId: teams/create-discussion-comment-legacy + - repos + operationId: repos/create-using-template externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-a-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-using-a-template parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" + - name: template_owner + in: path + required: true + schema: + type: string + - name: template_repo + in: path + required: true + schema: + type: string requestBody: required: true content: @@ -33046,216 +31597,320 @@ paths: schema: type: object properties: - body: + owner: type: string - description: The discussion comment's body text. + description: The organization or person who will own the new repository. + To create a new repository in an organization, the authenticated + user must be a member of the specified organization. + name: + type: string + description: The name of the new repository. + description: + type: string + description: A short description of the new repository. + include_all_branches: + type: boolean + description: 'Set to `true` to include the directory structure and + files from all branches in the template repository, and not just + the default branch. Default: `false`.' + default: false + private: + type: boolean + description: Either `true` to create a new private repository or + `false` to create a new public one. + default: false required: - - body - example: - body: Do you like apples? + - name + examples: + default: + value: + owner: octocat + name: Hello-World + description: This is your first repository + include_all_branches: false + private: false responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + "$ref": "#/components/schemas/repository" examples: default: - "$ref": "#/components/examples/team-discussion-comment" + "$ref": "#/components/examples/repository-3" + headers: + Location: + example: https://api.github.com/repos/octocat/Hello-World + schema: + type: string x-github: - triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussion-comments - deprecated: true - "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": + enabledForGitHubApps: false + category: repos + previews: + - required: true + name: baptiste + note: |- + Creating and using repository templates is currently available for developers to preview. To access this new endpoint during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types) in the `Accept` header: + + ```shell + application/vnd.github.baptiste-preview+json + ``` + "/repositories": get: - summary: Get a discussion comment (Legacy) + summary: List public repositories description: |- - **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. + Lists all public repositories in the order that they were created. - 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: + - For GitHub Enterprise Server, this endpoint will only list repositories available to all users on the enterprise. + - Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of repositories. tags: - - teams - operationId: teams/get-discussion-comment-legacy + - repos + operationId: repos/list-public externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-a-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-public-repositories parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/since-repo" + - name: visibility + description: Specifies the types of repositories to return. This endpoint + will only list repositories available to all users on the enterprise. + in: query + required: false + schema: + type: string + default: public + example: all + enum: + - all + - public responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + type: array + items: + "$ref": "#/components/schemas/minimal-repository" examples: default: - "$ref": "#/components/examples/team-discussion-comment" + "$ref": "#/components/examples/public-repository-items" + headers: + Link: + example: ; rel="next" + schema: + type: string + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussion-comments - deprecated: true - patch: - summary: Update a discussion comment (Legacy) - description: |- - **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/). + category: repos + subcategory: + "/repositories/{repository_id}/environments/{environment_name}/secrets": + get: + summary: List environment secrets + description: 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. tags: - - teams - operationId: teams/update-discussion-comment-legacy + - actions + operationId: actions/list-environment-secrets externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#update-a-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#list-environment-secrets parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - body: - type: string - description: The discussion comment's body text. - required: - - body - example: - body: Do you like pineapples? + - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-discussion-comment" + type: object + required: + - total_count + - secrets + properties: + total_count: + type: integer + secrets: + type: array + items: + "$ref": "#/components/schemas/actions-secret" examples: default: - "$ref": "#/components/examples/team-discussion-comment-2" + "$ref": "#/components/examples/actions-secret-paginated" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussion-comments - deprecated: true - delete: - summary: Delete a discussion comment (Legacy) - description: |- - **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/). + category: actions + subcategory: secrets + "/repositories/{repository_id}/environments/{environment_name}/secrets/public-key": + get: + summary: Get an environment public key + description: 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. tags: - - teams - operationId: teams/delete-discussion-comment-legacy + - actions + operationId: actions/get-environment-public-key externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#delete-a-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/environment-name" responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/actions-public-key" + examples: + default: + "$ref": "#/components/examples/actions-public-key" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: discussion-comments - deprecated: true - "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": + category: actions + subcategory: secrets + "/repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}": get: - summary: List reactions for a team discussion comment (Legacy) - description: |- - **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/). + summary: Get an environment secret + description: 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. tags: - - reactions - operationId: reactions/list-for-team-discussion-comment-legacy + - actions + operationId: actions/get-environment-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-secret parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" - - name: content - description: 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. - in: query - required: false - schema: - type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/secret-name" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/actions-secret" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/actions-secret" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-21' - deprecationDate: '2020-02-26' - category: reactions - subcategory: - deprecated: true - post: - summary: Create reaction for a team discussion comment (Legacy) + category: actions + subcategory: secrets + put: + summary: Create or update an environment secret description: |- - **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. + Creates or updates an environment secret with an encrypted value. Encrypt your secret using + [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access + token with the `repo` scope to use this endpoint. GitHub Apps must have the `secrets` repository permission to use + this endpoint. + + #### Example encrypting a secret using Node.js + + Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. + + ``` + const sodium = require('tweetsodium'); + + const key = "base64-encoded-public-key"; + const value = "plain-text-secret"; + + // Convert the message and key to Uint8Array's (Buffer implements that interface) + const messageBytes = Buffer.from(value); + const keyBytes = Buffer.from(key, 'base64'); + + // Encrypt using LibSodium. + const encryptedBytes = sodium.seal(messageBytes, keyBytes); + + // Base64 the encrypted secret + const encrypted = Buffer.from(encryptedBytes).toString('base64'); + + console.log(encrypted); + ``` + + + #### Example encrypting a secret using Python + + Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. + + ``` + from base64 import b64encode + from nacl import encoding, public + + def encrypt(public_key: str, secret_value: str) -> str: + """Encrypt a Unicode string using the public key.""" + public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) + sealed_box = public.SealedBox(public_key) + encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) + return b64encode(encrypted).decode("utf-8") + ``` + + #### Example encrypting a secret using C# + + Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. + + ``` + var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); + var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - Create a reaction to a [team discussion comment](https://docs.github.com/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. + 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) + ``` tags: - - reactions - operationId: reactions/create-for-team-discussion-comment-legacy + - actions + operationId: actions/create-or-update-environment-secret externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#create-or-update-an-environment-secret parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - "$ref": "#/components/parameters/comment-number" + - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/secret-name" requestBody: required: true content: @@ -33263,113 +31918,120 @@ paths: schema: type: object properties: - content: + encrypted_value: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the team discussion comment. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) + using the public key retrieved from the [Get an environment public + key](https://docs.github.com/enterprise-server@3.6/rest/reference/actions#get-an-environment-public-key) + endpoint. + pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" + key_id: + type: string + description: ID of the key you used to encrypt the secret. required: - - content - example: - content: heart + - encrypted_value + - key_id + examples: + default: + value: + encrypted_value: c2VjcmV0 + key_id: '012345678912345678' responses: '201': - description: Response + description: Response when creating a secret content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/empty-object" examples: default: - "$ref": "#/components/examples/reaction" - x-github: - githubCloudOnly: false + value: + '204': + description: Response when updating a secret + x-github: + githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-21' - deprecationDate: '2020-02-26' - category: reactions - subcategory: - deprecated: true - "/teams/{team_id}/discussions/{discussion_number}/reactions": + category: actions + subcategory: secrets + delete: + summary: Delete an environment secret + description: 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. + tags: + - actions + operationId: actions/delete-environment-secret + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/actions#delete-an-environment-secret + parameters: + - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/environment-name" + - "$ref": "#/components/parameters/secret-name" + responses: + '204': + description: Default response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: actions + subcategory: secrets + "/scim/v2/enterprises/{enterprise}/Groups": get: - summary: List reactions for a team discussion (Legacy) - description: |- - **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/). + summary: List provisioned SCIM groups for an enterprise + description: "**Note:** The SCIM API endpoints for enterprise accounts are currently + in beta and are subject to change." + operationId: enterprise-admin/list-provisioned-groups-enterprise tags: - - reactions - operationId: reactions/list-for-team-discussion-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-provisioned-scim-groups-for-an-enterprise parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" - - name: content - description: 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. + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/start-index" + - "$ref": "#/components/parameters/count" + - name: filter + description: filter results + in: query + required: false + schema: + type: string + - name: excludedAttributes + description: attributes to exclude in: query required: false schema: type: string - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/scim-group-list-enterprise" examples: default: - "$ref": "#/components/examples/reaction-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/scim-enterprise-group-list" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-21' - deprecationDate: '2020-02-26' - category: reactions - subcategory: - deprecated: true + githubCloudOnly: false + category: enterprise-admin + subcategory: scim post: - summary: Create reaction for a team discussion (Legacy) + summary: Provision a SCIM enterprise group and invite users description: |- - **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. + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - Create a reaction to a [team discussion](https://docs.github.com/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + 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. + operationId: enterprise-admin/provision-and-invite-enterprise-group tags: - - reactions - operationId: reactions/create-for-team-discussion-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#provision-a-scim-enterprise-group-and-invite-users parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/enterprise" requestBody: required: true content: @@ -33377,578 +32039,700 @@ paths: schema: type: object properties: - content: + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + displayName: type: string - description: The [reaction type](https://docs.github.com/rest/reference/reactions#reaction-types) - to add to the team discussion. - enum: - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - rocket - - eyes + description: The name of the SCIM group. This must match the GitHub + organization that the group maps to. + members: + type: array + items: + type: object + properties: + value: + type: string + description: The SCIM user ID for a user. + required: + - value required: - - content - example: - content: heart + - schemas + - displayName + examples: + default: + value: + schemas: + - urn:ietf:params:scim:schemas:core:2.0:Group + displayName: octo-org + members: + - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc + - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/reaction" + "$ref": "#/components/schemas/scim-enterprise-group" examples: default: - "$ref": "#/components/examples/reaction" + "$ref": "#/components/examples/scim-enterprise-group" x-github: + enabledForGitHubApps: true githubCloudOnly: false - enabledForGitHubApps: false - removalDate: '2021-02-21' - deprecationDate: '2020-02-26' - category: reactions - subcategory: - deprecated: true - "/teams/{team_id}/invitations": + category: enterprise-admin + subcategory: scim + "/scim/v2/enterprises/{enterprise}/Groups/{scim_group_id}": get: - summary: List pending team invitations (Legacy) - description: |- - **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`. + summary: Get SCIM provisioning information for an enterprise group + description: "**Note:** The SCIM API endpoints for enterprise accounts are currently + in beta and are subject to change." + operationId: enterprise-admin/get-provisioning-information-for-enterprise-group tags: - - teams - operationId: teams/list-pending-invitations-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-pending-team-invitations-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-group parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-group-id" + - name: excludedAttributes + description: Attributes to exclude. + in: query + required: false + schema: + type: string responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/organization-invitation" + "$ref": "#/components/schemas/scim-enterprise-group" examples: default: - "$ref": "#/components/examples/organization-invitation-items" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/scim-enterprise-group" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - "/teams/{team_id}/members": - get: - summary: List team members (Legacy) + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + put: + summary: Set SCIM information for a provisioned enterprise group description: |- - **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. + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - Team members will include the members of child teams. + 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. + operationId: enterprise-admin/set-information-for-provisioned-enterprise-group tags: - - teams - operationId: teams/list-members-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-team-members-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-group parameters: - - "$ref": "#/components/parameters/team-id" - - name: role - description: "Filters members returned by their role in the team. Can be one - of: \n\\* `member` - normal members of the team. \n\\* `maintainer` - - team maintainers. \n\\* `all` - all members of the team." - in: query - required: false - schema: - type: string - enum: - - member - - maintainer - - all - default: all - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-group-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + displayName: + type: string + description: The name of the SCIM group. This must match the GitHub + organization that the group maps to. + members: + type: array + items: + type: object + properties: + value: + type: string + description: The SCIM user ID for a user. + required: + - value + required: + - schemas + - displayName + examples: + default: + value: + schemas: + - urn:ietf:params:scim:schemas:core:2.0:Group + displayName: octo-org + members: + - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc + - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/scim-enterprise-group" examples: default: - "$ref": "#/components/examples/simple-user-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/scim-enterprise-group" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - "/teams/{team_id}/members/{username}": - get: - summary: Get team member (Legacy) - description: |- - 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. - tags: - - teams - operationId: teams/get-member-legacy - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-team-member-legacy - parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: if user is a member - '404': - description: if user is not a member - x-github: githubCloudOnly: false - enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - put: - summary: Add team member (Legacy) + category: enterprise-admin + subcategory: scim + patch: + summary: Update an attribute for a SCIM enterprise group description: |- - The "Add team member" endpoint (described below) is deprecated. - - We recommend using the [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. - - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - 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)." + 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). + operationId: enterprise-admin/update-attribute-for-enterprise-group tags: - - teams - operationId: teams/add-member-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#add-team-member-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-group parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-group-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + Operations: + type: array + description: Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). + minItems: 1 + items: + type: object + properties: + op: + type: string + enum: + - add + - Add + - remove + - Remove + - replace + - Replace + path: + type: string + value: + description: Can be any value - string, number, array or object. + required: + - op + required: + - schemas + - Operations + examples: + default: + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - op: remove + path: members + value: + - value: aaaa8c34-a6b2-11ea-9d70-bbbbbd1c8fd5 responses: - '204': + '200': description: Response - '404': - description: Not Found if team synchronization is set up - '422': - description: Unprocessable Entity if you attempt to add an organization - to a team or you attempt to add a user to a team when they are not a member - of at least one other team in the same organization - '403': - "$ref": "#/components/responses/forbidden" + content: + application/json: + schema: + "$ref": "#/components/schemas/scim-enterprise-group" + examples: + default: + "$ref": "#/components/examples/scim-enterprise-group-2" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true + githubCloudOnly: false + category: enterprise-admin + subcategory: scim delete: - summary: Remove team member (Legacy) - description: |- - The "Remove team member" endpoint (described below) is deprecated. - - We recommend using the [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. - - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + summary: Delete a SCIM group from an enterprise + description: "**Note:** The SCIM API endpoints for enterprise accounts are currently + in beta and are subject to change." + operationId: enterprise-admin/delete-scim-group-from-enterprise tags: - - teams - operationId: teams/remove-member-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#remove-team-member-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-scim-group-from-an-enterprise parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-group-id" responses: '204': description: Response - '404': - description: Not Found if team synchronization is setup x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - "/teams/{team_id}/memberships/{username}": + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + "/scim/v2/enterprises/{enterprise}/Users": get: - summary: Get team membership for a user (Legacy) + summary: List SCIM provisioned identities for an enterprise description: |- - **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. + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - Team members will include the members of child teams. + Retrieves a paginated list of all provisioned enterprise members, including pending invitations. - To get a user's membership with a team, the team must be visible to the authenticated user. + 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 Enterprise Server. 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. - **Note:** - The response contains the `state` of the membership and the member's `role`. + 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 Enterprise Server account after completing SSO: - The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/rest/reference/teams#create-a-team). + 1. The user is granted access by the IdP and is not a member of the GitHub Enterprise Server enterprise. + + 1. The user attempts to access the GitHub Enterprise Server enterprise and initiates the SAML SSO process, and is not currently signed in to their GitHub Enterprise Server 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 Enterprise Server account: + - If the user signs in, their GitHub Enterprise Server 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 Server enterprise, and the external identity `null` entry remains in place. + operationId: enterprise-admin/list-provisioned-identities-enterprise tags: - - teams - operationId: teams/get-membership-for-user-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#get-team-membership-for-a-user-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#list-scim-provisioned-identities-for-an-enterprise parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/start-index" + - "$ref": "#/components/parameters/count" + - name: filter + description: filter results + in: query + required: false + schema: + type: string responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-membership" + "$ref": "#/components/schemas/scim-user-list-enterprise" examples: - response-if-user-is-a-team-maintainer: - "$ref": "#/components/examples/team-membership-response-if-user-is-a-team-maintainer" - '404': - "$ref": "#/components/responses/not_found" + default: + "$ref": "#/components/examples/scim-enterprise-user-list" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - put: - summary: Add or update team membership for a user (Legacy) + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + post: + summary: Provision and invite a SCIM enterprise user description: |- - **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Add or update team membership for a user](https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. - - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - 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. + Provision enterprise membership for a user, and send organization invitation emails to the email address. - 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. + 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. + operationId: enterprise-admin/provision-and-invite-enterprise-user tags: - - teams - operationId: teams/add-or-update-membership-for-user-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#provision-and-invite-a-scim-enterprise-user parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" + - "$ref": "#/components/parameters/enterprise" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - role: + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + userName: type: string - description: "The role that this user should have in the team. Can - be one of: \n\\* `member` - a normal member of the team. \n\\* - `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." - enum: - - member - - maintainer - default: member - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/team-membership" - examples: - response-if-users-membership-with-team-is-now-pending: - "$ref": "#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending" - '403': - description: Forbidden if team synchronization is set up - '422': - description: Unprocessable Entity if you attempt to add an organization - to a team - '404': - "$ref": "#/components/responses/not_found" - x-github: - githubCloudOnly: false - enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - delete: - summary: Remove team membership for a user (Legacy) - description: |- - **Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the new [Remove team membership for a user](https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user) endpoint. - - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. - - To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. - - **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub team membership through your identity provider, which automatically adds and removes team members in an organization. For more information, see "[Synchronizing teams between your identity provider and GitHub](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." - tags: - - teams - operationId: teams/remove-membership-for-user-legacy - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/teams#remove-team-membership-for-a-user-legacy - parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/username" + description: The username for the user. + name: + type: object + properties: + givenName: + type: string + description: The first name of the user. + familyName: + type: string + description: The last name of the user. + required: + - givenName + - familyName + emails: + type: array + description: List of user emails. + items: + type: object + properties: + value: + type: string + description: The email address. + type: + type: string + description: The type of email address. + primary: + type: boolean + description: Whether this email address is the primary address. + required: + - value + - type + - primary + groups: + type: array + description: List of SCIM group IDs the user is a member of. + items: + type: object + properties: + value: + type: string + required: + - schemas + - userName + - name + - emails + examples: + default: + value: + schemas: + - urn:ietf:params:scim:schemas:core:2.0:User + userName: mona.octocat@okta.example.com + name: + familyName: Octocat + givenName: Mona + emails: + - value: mona.octocat@okta.example.com + type: work + primary: true + groups: + - value: 468dd3fa-a1d6-11ea-9031-15a1f0d7811d responses: - '204': + '201': description: Response - '403': - description: if team synchronization is set up + content: + application/json: + schema: + "$ref": "#/components/schemas/scim-enterprise-user" + examples: + default: + "$ref": "#/components/examples/scim-enterprise-user" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: members - deprecated: true - "/teams/{team_id}/projects": + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + "/scim/v2/enterprises/{enterprise}/Users/{scim_user_id}": get: - summary: List team projects (Legacy) - description: |- - **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. + summary: Get SCIM provisioning information for an enterprise user + description: "**Note:** The SCIM API endpoints for enterprise accounts are currently + in beta and are subject to change." + operationId: enterprise-admin/get-provisioning-information-for-enterprise-user tags: - - teams - operationId: teams/list-projects-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#list-team-projects-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-scim-provisioning-information-for-an-enterprise-user parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-user-id" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team-project" + "$ref": "#/components/schemas/scim-enterprise-user" examples: default: - "$ref": "#/components/examples/team-project-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/scim-enterprise-user" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/teams/{team_id}/projects/{project_id}": - get: - summary: Check team permissions for a project (Legacy) + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + put: + summary: Set SCIM information for a provisioned enterprise user description: |- - **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. + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. + 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}`. + operationId: enterprise-admin/set-information-for-provisioned-enterprise-user tags: - - teams - operationId: teams/check-permissions-for-project-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-project-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-scim-information-for-a-provisioned-enterprise-user parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-user-id" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + userName: + type: string + description: The username for the user. + name: + type: object + properties: + givenName: + type: string + description: The first name of the user. + familyName: + type: string + description: The last name of the user. + required: + - givenName + - familyName + emails: + type: array + description: List of user emails. + items: + type: object + properties: + value: + type: string + description: The email address. + type: + type: string + description: The type of email address. + primary: + type: boolean + description: Whether this email address is the primary address. + required: + - value + - type + - primary + groups: + type: array + description: List of SCIM group IDs the user is a member of. + items: + type: object + properties: + value: + type: string + required: + - schemas + - userName + - name + - emails + examples: + default: + value: + schemas: + - urn:ietf:params:scim:schemas:core:2.0:User + userName: mona.octocat@okta.example.com + name: + familyName: Octocat + givenName: Mona + emails: + - value: mona.octocat@okta.example.com + type: work + primary: true + groups: + - value: 468dd3fa-a1d6-11ea-9031-15a1f0d7811d responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-project" + "$ref": "#/components/schemas/scim-enterprise-user" examples: default: - "$ref": "#/components/examples/team-project" - '404': - description: Not Found if project is not managed by this team + "$ref": "#/components/examples/scim-enterprise-user" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - put: - summary: Add or update team project permissions (Legacy) + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + patch: + summary: Update an attribute for a SCIM enterprise user description: |- - **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. + **Note:** The SCIM API endpoints for enterprise accounts are currently in beta and are subject to change. - 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. + 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 + } + }] + } + ``` + operationId: enterprise-admin/update-attribute-for-enterprise-user tags: - - teams - operationId: teams/add-or-update-project-permissions-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#add-or-update-team-project-permissions-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#update-an-attribute-for-a-scim-enterprise-user parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-user-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - permission: - type: string - description: "The permission to grant to the team for this project. - Can be one of: \n\\* `read` - team members can read, but not - write to or administer this project. \n\\* `write` - team members - can read and write, but not administer this project. \n\\* `admin` - - team members can read, write and administer this project. \nDefault: - the team's `permission` attribute will be used to determine what - permission to grant the team on this project. Note that, if you - choose not to pass any parameters, you'll need to set `Content-Length` - to zero when calling out to this endpoint. For more information, - see \"[HTTP verbs](https://docs.github.com/rest/overview/resources-in-the-rest-api#http-verbs).\"" - enum: - - read - - write - - admin + schemas: + type: array + description: The SCIM schema URIs. + items: + type: string + Operations: + type: array + description: Array of [SCIM operations](https://tools.ietf.org/html/rfc7644#section-3.5.2). + items: + type: object + required: + - schemas + - Operations + examples: + default: + value: + schemas: + - urn:ietf:params:scim:api:messages:2.0:PatchOp + Operations: + - op: add + path: emails + value: + - value: monalisa@octocat.github.com + type: home + - op: replace + path: name.givenName + value: Monalisa responses: - '204': + '200': description: Response - '403': - description: Forbidden if the project is not owned by the organization content: application/json: schema: - type: object - properties: - message: - type: string - documentation_url: - type: string + "$ref": "#/components/schemas/scim-enterprise-user" examples: - response-if-the-project-is-not-owned-by-the-organization: - value: - message: Must have admin rights to Repository. - documentation_url: https://docs.github.com/rest/reference/teams#add-or-update-team-project-permissions - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + default: + "$ref": "#/components/examples/scim-enterprise-user-2" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true + githubCloudOnly: false + category: enterprise-admin + subcategory: scim delete: - summary: Remove a project from a team (Legacy) - description: |- - **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. + summary: Delete a SCIM user from an enterprise + description: "**Note:** The SCIM API endpoints for enterprise accounts are currently + in beta and are subject to change." + operationId: enterprise-admin/delete-user-from-enterprise tags: - - teams - operationId: teams/remove-project-legacy + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#remove-a-project-from-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#delete-a-scim-user-from-an-enterprise parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/project-id" + - "$ref": "#/components/parameters/enterprise" + - "$ref": "#/components/parameters/scim-user-id" responses: '204': description: Response - '404': - "$ref": "#/components/responses/not_found" - '415': - "$ref": "#/components/responses/preview_header_missing" - '422': - "$ref": "#/components/responses/validation_failed" x-github: - githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/teams/{team_id}/repos": + githubCloudOnly: false + category: enterprise-admin + subcategory: scim + "/search/code": get: - summary: List team repositories (Legacy) - description: "**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." + summary: Search code + description: |- + Searches for query terms inside of a file. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/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. tags: - - teams - operationId: teams/list-repos-legacy + - search + operationId: search/code externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#list-team-repositories-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-code parameters: - - "$ref": "#/components/parameters/team-id" + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + See "[Searching code](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-code)" + for a detailed list of qualifiers. + in: query + required: true + schema: + type: string + - name: sort + description: 'Sorts the results of your query. Can only be `indexed`, which + indicates how recently a file has been indexed by the GitHub Enterprise + Server search infrastructure. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - indexed + - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -33957,1044 +32741,1059 @@ paths: content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/code-search-result-item" examples: default: - "$ref": "#/components/examples/minimal-repository-items" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/code-search-result-item-paginated" + '304': + "$ref": "#/components/responses/not_modified" + '503': + "$ref": "#/components/responses/service_unavailable" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/teams/{team_id}/repos/{owner}/{repo}": + category: search + subcategory: + "/search/commits": get: - summary: Check team permissions for a repository (Legacy) + summary: Search commits description: |- - **Note**: Repositories inherited through a parent team will also be checked. + Find commits via various criteria on the default branch (usually `master`). This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/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/enterprise-server@3.6/rest/reference/search#text-match-metadata). - **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. + 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: - 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: + `q=repo:octocat/Spoon-Knife+css` tags: - - teams - operationId: teams/check-permissions-for-repo-legacy + - search + operationId: search/commits externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-commits parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + See "[Searching commits](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-commits)" + for a detailed list of qualifiers. + in: query + required: true + schema: + type: string + - name: sort + description: 'Sorts the results of your query by `author-date` or `committer-date`. + Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - author-date + - committer-date + - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': - description: Alternative response with extra repository information + description: Response content: application/json: schema: - "$ref": "#/components/schemas/team-repository" + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/commit-search-result-item" examples: - alternative-response-with-extra-repository-information: - "$ref": "#/components/examples/team-repository-alternative-response-with-extra-repository-information" - '204': - description: Response if repository is managed by this team - '404': - description: Not Found if repository is not managed by this team + default: + "$ref": "#/components/examples/commit-search-result-item-paginated" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - put: - summary: Add or update team repository permissions (Legacy) + category: search + subcategory: + "/search/issues": + get: + summary: Search issues and pull requests description: |- - **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. + Find issues by state and keyword. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). - 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. + 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/enterprise-server@3.6/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 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:** 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)." tags: - - teams - operationId: teams/add-or-update-repo-permissions-legacy + - search + operationId: search/issues-and-pull-requests externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#add-or-update-team-repository-permissions-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-issues-and-pull-requests parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - permission: - type: string - description: "The permission to grant the team on this repository. - Can be one of: \n\\* `pull` - team members can pull, but not - push to or administer this repository. \n\\* `push` - team members - can pull and push, but not administer this repository. \n\\* - `admin` - team members can pull, push and administer this repository. - \ \n \nIf no permission is specified, the team's `permission` - attribute will be used to determine what permission to grant the - team on this repository." - enum: - - pull - - push - - admin + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + See "[Searching issues and pull requests](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-issues-and-pull-requests)" + for a detailed list of qualifiers. + in: query + required: true + schema: + type: string + - name: sort + description: '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/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - comments + - reactions + - reactions-+1 + - reactions--1 + - reactions-smile + - reactions-thinking_face + - reactions-heart + - reactions-tada + - interactions + - created + - updated + - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" + content: + application/json: + schema: + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/issue-search-result-item" + examples: + default: + "$ref": "#/components/examples/issue-search-result-item-paginated" + '503': + "$ref": "#/components/responses/service_unavailable" '422': "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - delete: - summary: Remove a repository from a team (Legacy) + category: search + subcategory: + "/search/labels": + get: + summary: Search labels description: |- - **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. + Find labels in a repository with names or descriptions that match search keywords. Returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). - 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. + 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/enterprise-server@3.6/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. tags: - - teams - operationId: teams/remove-repo-legacy + - search + operationId: search/labels externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#remove-a-repository-from-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-labels parameters: - - "$ref": "#/components/parameters/team-id" - - "$ref": "#/components/parameters/owner" - - "$ref": "#/components/parameters/repo" + - name: repository_id + description: The id of the repository. + in: query + required: true + schema: + type: integer + - name: q + description: 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/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + in: query + required: true + schema: + type: string + - name: sort + description: 'Sorts the results of your query by when the label was `created` + or `updated`. Default: [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - created + - updated + - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/label-search-result-item" + examples: + default: + "$ref": "#/components/examples/label-search-result-item-paginated" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/teams/{team_id}/team-sync/group-mappings": + category: search + subcategory: + "/search/repositories": get: - summary: List IdP groups for a team (Legacy) + summary: Search repositories description: |- - **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. + Find repositories via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + 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/enterprise-server@3.6/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: - List IdP groups connected to a team on GitHub. + `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. tags: - - teams - operationId: teams/list-idp-groups-for-legacy + - search + operationId: search/repos externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-idp-groups-for-a-team-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-repositories parameters: - - "$ref": "#/components/parameters/team-id" + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + See "[Searching for repositories](https://docs.github.com/articles/searching-for-repositories/)" + for a detailed list of qualifiers. + in: query + required: true + schema: + type: string + - name: sort + description: '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/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - stars + - forks + - help-wanted-issues + - updated + - "$ref": "#/components/parameters/order" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/group-mapping" + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/repo-search-result-item" examples: default: - "$ref": "#/components/examples/group-mapping-3" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/repo-search-result-item-paginated" + '503': + "$ref": "#/components/responses/service_unavailable" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" x-github: - githubCloudOnly: true - enabledForGitHubApps: false - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: team-sync - deprecated: true - patch: - summary: Create or update IdP group connections (Legacy) + githubCloudOnly: false + enabledForGitHubApps: true + category: search + subcategory: + "/search/topics": + get: + summary: Search topics description: |- - **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. + Find topics via various criteria. Results are sorted by best match. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). See "[Searching topics](https://docs.github.com/articles/searching-topics/)" for a detailed list of qualifiers. - Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + 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/enterprise-server@3.6/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` - 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. + 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. tags: - - teams - operationId: teams/create-or-update-idp-group-connections-legacy + - search + operationId: search/topics externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#create-or-update-idp-group-connections-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-topics parameters: - - "$ref": "#/components/parameters/team-id" - requestBody: + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + in: query required: true - content: - application/json: - schema: - type: object - properties: - groups: - type: array - description: The IdP groups you want to connect to a GitHub team. - When updating, the new `groups` object will replace the original - one. You must include any existing groups that you don't want - to remove. - items: - type: object - properties: - group_id: - type: string - description: ID of the IdP group. - group_name: - type: string - description: Name of the IdP group. - group_description: - type: string - description: Description of the IdP group. - id: - type: string - example: '"caceab43fc9ffa20081c"' - name: - type: string - example: '"external-team-6c13e7288ef7"' - description: - type: string - example: '"moar cheese pleese"' - required: - - group_id - - group_name - - group_description - synced_at: - type: string - example: '"I am not a timestamp"' - required: - - groups - example: - groups: - - group_id: '123' - group_name: Octocat admins - description: The people who configure your octoworld. - group_description: string + schema: + type: string + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/group-mapping" + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/topic-search-result-item" examples: default: - "$ref": "#/components/examples/group-mapping-2" - '422': - "$ref": "#/components/responses/validation_failed" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/topic-search-result-item-paginated" + '304': + "$ref": "#/components/responses/not_modified" x-github: - githubCloudOnly: true - enabledForGitHubApps: false - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: team-sync - deprecated: true - "/teams/{team_id}/teams": + githubCloudOnly: false + enabledForGitHubApps: true + category: search + subcategory: + "/search/users": get: - summary: List child teams (Legacy) - description: "**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." + summary: Search users + description: |- + Find users via various criteria. This method returns up to 100 results [per page](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#pagination). + + When searching for users, you can get text match metadata for the issue **login**, public **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/enterprise-server@3.6/rest/reference/search#text-match-metadata). For more details about how to receive highlighted search results, see [Text match metadata](https://docs.github.com/enterprise-server@3.6/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. tags: - - teams - operationId: teams/list-child-legacy + - search + operationId: search/users externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams/#list-child-teams-legacy + url: https://docs.github.com/enterprise-server@3.6/rest/reference/search#search-users parameters: - - "$ref": "#/components/parameters/team-id" + - name: q + description: The query contains one or more search keywords and qualifiers. + Qualifiers allow you to limit your search to specific areas of GitHub Enterprise + Server. The REST API supports the same qualifiers as the web interface for + GitHub Enterprise Server. To learn more about the format of the query, see + [Constructing a search query](https://docs.github.com/enterprise-server@3.6/rest/reference/search#constructing-a-search-query). + See "[Searching users](https://docs.github.com/enterprise-server@3.6/search-github/searching-on-github/searching-users)" + for a detailed list of qualifiers. + in: query + required: true + schema: + type: string + - name: sort + description: 'Sorts the results of your query by number of `followers` or + `repositories`, or when the person `joined` GitHub Enterprise Server. Default: + [best match](https://docs.github.com/enterprise-server@3.6/rest/reference/search#ranking-search-results)' + in: query + required: false + schema: + type: string + enum: + - followers + - repositories + - joined + - "$ref": "#/components/parameters/order" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: if child teams exist + description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/team" + type: object + required: + - total_count + - incomplete_results + - items + properties: + total_count: + type: integer + incomplete_results: + type: boolean + items: + type: array + items: + "$ref": "#/components/schemas/user-search-result-item" examples: - response-if-child-teams-exist: - "$ref": "#/components/examples/team-items-response-if-child-teams-exist" - headers: - Link: - "$ref": "#/components/headers/link" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" + default: + "$ref": "#/components/examples/user-search-result-item-paginated" + '304': + "$ref": "#/components/responses/not_modified" + '503': + "$ref": "#/components/responses/service_unavailable" '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: true - removalDate: '2021-02-01' - deprecationDate: '2020-01-21' - category: teams - subcategory: - deprecated: true - "/user": + category: search + subcategory: + "/setup/api/configcheck": get: - summary: Get the authenticated user + summary: Get the configuration status description: |- - If the authenticated user is authenticated through basic authentication or OAuth with the `user` scope, then the response lists public and private profile information. + This endpoint allows you to check the status of the most recent configuration process: - If the authenticated user is authenticated through OAuth without the `user` scope, then the response lists only public profile information. + Note that you may need to wait several seconds after you start a process before you can check its status. + + The different statuses are: + + | Status | Description | + | ------------- | --------------------------------- | + | `PENDING` | The job has not started yet | + | `CONFIGURING` | The job is running | + | `DONE` | The job has finished correctly | + | `FAILED` | The job has finished unexpectedly | + operationId: enterprise-admin/get-configuration-status tags: - - users - operationId: users/get-authenticated + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#get-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-the-configuration-status + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: '200': description: Response content: application/json: schema: - oneOf: - - "$ref": "#/components/schemas/private-user" - - "$ref": "#/components/schemas/public-user" + "$ref": "#/components/schemas/configuration-status" examples: - response-with-public-and-private-profile-information: - "$ref": "#/components/examples/private-user-response-with-public-and-private-profile-information" - response-with-public-profile-information: - "$ref": "#/components/examples/private-user-response-with-public-profile-information" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + default: + "$ref": "#/components/examples/configuration-status" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: - patch: - summary: Update the authenticated user - description: "**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." + category: enterprise-admin + subcategory: management-console + "/setup/api/configure": + post: + summary: Start a configuration process + description: 'This endpoint allows you to start a configuration process at any + time for your updated settings to take effect:' + operationId: enterprise-admin/start-configuration-process tags: - - users - operationId: users/update-authenticated + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users/#update-the-authenticated-user - parameters: [] - requestBody: - required: false - content: - application/json: - schema: - type: object - properties: - name: - description: The new name of the user. - type: string - example: Omar Jahandar - email: - description: The publicly visible email address of the user. - type: string - example: omar@example.com - blog: - description: The new blog URL of the user. - type: string - example: blog.example.com - twitter_username: - description: The new Twitter username of the user. - type: string - example: therealomarj - nullable: true - company: - description: The new company of the user. - type: string - example: Acme corporation - location: - description: The new location of the user. - type: string - example: Berlin, Germany - hireable: - description: The new hiring availability of the user. - type: boolean - bio: - description: The new short biography of the user. - type: string + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: - '200': + '202': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/private-user" - examples: - default: - "$ref": "#/components/examples/private-user" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: - "/user/blocks": + category: enterprise-admin + subcategory: management-console + "/setup/api/maintenance": get: - summary: List users blocked by the authenticated user - description: List the users you've blocked on your personal account. + summary: Get the maintenance status + description: 'Check your installation''s maintenance status:' + operationId: enterprise-admin/get-maintenance-status tags: - - users - operationId: users/list-blocked-by-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-users-blocked-by-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-the-maintenance-status + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/maintenance-status" examples: default: - "$ref": "#/components/examples/simple-user-items" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '415': - "$ref": "#/components/responses/preview_header_missing" + "$ref": "#/components/examples/maintenance-status" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: blocking - "/user/blocks/{username}": - get: - summary: Check if a user is blocked by the authenticated user - description: '' + category: enterprise-admin + subcategory: management-console + post: + summary: Enable or disable maintenance mode + description: "**Note:** The request body for this operation must be submitted + as `application/x-www-form-urlencoded` data. You can submit a parameter value + as a string, or you can use a tool such as `curl` to submit a parameter value + as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode)." + operationId: enterprise-admin/enable-or-disable-maintenance-mode tags: - - users - operationId: users/check-blocked + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#check-if-a-user-is-blocked-by-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/username" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#enable-or-disable-maintenance-mode + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: - '204': - description: 'If the user is blocked:' - '404': - description: 'If the user is not blocked:' + '200': + description: Response content: application/json: schema: - "$ref": "#/components/schemas/basic-error" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: blocking - put: - summary: Block a user - description: '' - tags: - - users - operationId: users/block - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/users#block-a-user - parameters: - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: blocking - delete: - summary: Unblock a user - description: '' - tags: - - users - operationId: users/unblock - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/users#unblock-a-user - parameters: - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/schemas/maintenance-status" + examples: + default: + "$ref": "#/components/examples/maintenance-status" + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + maintenance: + type: string + description: |- + A JSON string with the attributes `enabled` and `when`. + + The possible values for `enabled` are `true` and `false`. When it's `false`, the attribute `when` is ignored and the maintenance mode is turned off. `when` defines the time period when the maintenance was enabled. + + The possible values for `when` are `now` or any date parseable by [mojombo/chronic](https://github.com/mojombo/chronic). + required: + - maintenance + examples: + default: + value: + maintenance: '{"enabled":true, "when":"now"}' x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: blocking - "/user/codespaces": + category: enterprise-admin + subcategory: management-console + "/setup/api/settings": get: - summary: List codespaces for the authenticated user + summary: Get settings description: |- - Lists the authenticated user's codespaces. + Gets the settings for your instance. To change settings, see the [Set settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings). - You must authenticate using an access token with the `codespace` scope to use this endpoint. + **Note:** You cannot retrieve the management console password with the Enterprise administration API. + operationId: enterprise-admin/get-settings tags: - - codespaces - operationId: codespaces/list-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-codespaces-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/repository-id-in-query" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - codespaces - properties: - total_count: - type: integer - codespaces: - type: array - items: - "$ref": "#/components/schemas/codespace" + "$ref": "#/components/schemas/enterprise-settings" examples: default: - "$ref": "#/components/examples/codespaces-list" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/enterprise-settings" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: - post: - summary: Create a codespace for the authenticated user + category: enterprise-admin + subcategory: management-console + put: + summary: Set settings description: |- - Creates a new codespace, owned by the authenticated user. + Applies settings on your instance. For a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). - This endpoint requires either a `repository_id` OR a `pull_request` but not both. + **Notes:** - You must authenticate using an access token with the `codespace` scope to use this endpoint. + - The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + - You cannot set the management console password with the Enterprise administration API. Use the `ghe-set-password` utility to change the management console password. For more information, see "[Command-line utilities](https://docs.github.com/enterprise-server@3.6/admin/configuration/configuring-your-enterprise/command-line-utilities#ghe-set-password)." + operationId: enterprise-admin/set-settings tags: - - codespaces - operationId: codespaces/create-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#create-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#set-settings + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol + responses: + '204': + description: Response requestBody: required: true content: - application/json: + application/x-www-form-urlencoded: schema: - oneOf: - - type: object - required: - - repository_id - - location - properties: - repository_id: - description: Repository id for this codespace - type: integer - ref: - description: Git ref (typically a branch name) for this codespace - type: string - location: - description: Location for this codespace - type: string - machine: - description: Machine type to use for this codespace - type: string - working_directory: - description: Working directory for this codespace - type: string - idle_timeout_minutes: - description: Time in minutes before codespace stops from inactivity - type: integer - - type: object - required: - - pull_request - - location - properties: - pull_request: - required: - - pull_request_number - - repository_id - description: Pull request number for this codespace - type: object - properties: - pull_request_number: - description: Pull request number - type: integer - repository_id: - description: Repository id for this codespace - type: integer - location: - description: Location for this codespace - type: string - machine: - description: Machine type to use for this codespace - type: string - working_directory: - description: Working directory for this codespace - type: string - idle_timeout_minutes: - description: Time in minutes before codespace stops from inactivity - type: integer - example: - repository_id: 1 - ref: main - location: WestUs2 - responses: - '201': - description: Response when the codespace was successfully created - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace" - examples: - default: - "$ref": "#/components/examples/codespace" - '202': - description: Response when the codespace creation partially failed but is - being retried in the background - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace" - examples: - default: - "$ref": "#/components/examples/codespace" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + type: object + properties: + settings: + type: string + description: A JSON string with the new settings. Note that you + only need to pass the specific settings you want to modify. For + a list of the available settings, see the [Get settings endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). + required: + - settings + examples: + '204': + value: + settings: '{ "enterprise": { "public_pages": true }}' x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/codespaces/secrets": + category: enterprise-admin + subcategory: management-console + "/setup/api/settings/authorized-keys": get: - summary: List secrets for the authenticated user - description: |- - Lists all secrets available for a user's Codespaces without revealing their - encrypted values. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + summary: Get all authorized SSH keys + description: '' + operationId: enterprise-admin/get-all-authorized-ssh-keys tags: - - codespaces - operationId: codespaces/list-secrets-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-secrets-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-all-authorized-ssh-keys + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - secrets - properties: - total_count: - type: integer - secrets: - type: array - items: - "$ref": "#/components/schemas/codespaces-secret" + type: array + items: + "$ref": "#/components/schemas/ssh-key" examples: default: - "$ref": "#/components/examples/minimal-repository-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + "$ref": "#/components/examples/ssh-key-items" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: secrets - "/user/codespaces/secrets/public-key": - get: - summary: Get public key for the authenticated user - description: Gets your public key, which you need to encrypt secrets. You need - to encrypt a secret before you can create or update secrets. Anyone with one - of the 'read:user' or 'user' scopes in their personal access token. User must - have Codespaces access to use this endpoint. + category: enterprise-admin + subcategory: management-console + post: + summary: Add an authorized SSH key + description: "**Note:** The request body for this operation must be submitted + as `application/x-www-form-urlencoded` data. You can submit a parameter value + as a string, or you can use a tool such as `curl` to submit a parameter value + as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode)." + operationId: enterprise-admin/add-authorized-ssh-key tags: - - codespaces - operationId: codespaces/get-public-key-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#get-public-key-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#add-an-authorized-ssh-key + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespaces-user-public-key" + type: array + items: + "$ref": "#/components/schemas/ssh-key" examples: default: - "$ref": "#/components/examples/codespaces-user-public-key" + "$ref": "#/components/examples/ssh-key-items" + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + authorized_key: + type: string + description: The public SSH key. + required: + - authorized_key + examples: + default: + value: + authorized_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCssTL/Vtu/ODLTj0VtZoRAbvf7uiv5997GyDq0MoAZUjb5jmA5wYe2/wF6sFuhiZTnZoF1ZtCHunPp0hM/GHrn6VySBhNncx14YO8FPt1CIhEeRMSEjUK9cY3xAbS365oXY8vnUHJsS9+1tr/2bx/+4NJfcUt/Ezf1OR/0LStQXw== x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: secrets - "/user/codespaces/secrets/{secret_name}": - get: - summary: Get a secret for the authenticated user - description: |- - Gets a secret available to a user's codespaces without revealing its encrypted value. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + category: enterprise-admin + subcategory: management-console + delete: + summary: Remove an authorized SSH key + description: "**Note:** The request body for this operation must be submitted + as `application/x-www-form-urlencoded` data. You can submit a parameter value + as a string, or you can use a tool such as `curl` to submit a parameter value + as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode)." + operationId: enterprise-admin/remove-authorized-ssh-key tags: - - codespaces - operationId: codespaces/get-secret-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#get-a-secret-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/secret-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#remove-an-authorized-ssh-key + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespaces-secret" + type: array + items: + "$ref": "#/components/schemas/ssh-key" examples: default: - "$ref": "#/components/examples/user-codespaces-secret" + "$ref": "#/components/examples/ssh-key-items" + requestBody: + required: true + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + authorized_key: + type: string + description: The public SSH key. + required: + - authorized_key + examples: + default: + value: + authorized_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCssTL/Vtu/ODLTj0VtZoRAbvf7uiv5997GyDq0MoAZUjb5jmA5wYe2/wF6sFuhiZTnZoF1ZtCHunPp0hM/GHrn6VySBhNncx14YO8FPt1CIhEeRMSEjUK9cY3xAbS365oXY8vnUHJsS9+1tr/2bx/+4NJfcUt/Ezf1OR/0LStQXw== x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: secrets - put: - summary: Create or update a secret for the authenticated user + category: enterprise-admin + subcategory: management-console + "/setup/api/start": + post: + summary: Create a GitHub license description: |- - Creates or updates a secret for a user's codespace with an encrypted value. Encrypt your secret using - [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). You must authenticate using an access token with the `user` scope to use this endpoint. User must also have Codespaces access to use this endpoint. - - #### Example encrypting a secret using Node.js - - Encrypt your secret using the [tweetsodium](https://github.com/github/tweetsodium) library. - - ``` - const sodium = require('tweetsodium'); - - const key = "base64-encoded-public-key"; - const value = "plain-text-secret"; - - // Convert the message and key to Uint8Array's (Buffer implements that interface) - const messageBytes = Buffer.from(value); - const keyBytes = Buffer.from(key, 'base64'); - - // Encrypt using LibSodium. - const encryptedBytes = sodium.seal(messageBytes, keyBytes); - - // Base64 the encrypted secret - const encrypted = Buffer.from(encryptedBytes).toString('base64'); - - console.log(encrypted); - ``` - - - #### Example encrypting a secret using Python - - Encrypt your secret using [pynacl](https://pynacl.readthedocs.io/en/latest/public/#nacl-public-sealedbox) with Python 3. - - ``` - from base64 import b64encode - from nacl import encoding, public - - def encrypt(public_key: str, secret_value: str) -> str: - """Encrypt a Unicode string using the public key.""" - public_key = public.PublicKey(public_key.encode("utf-8"), encoding.Base64Encoder()) - sealed_box = public.SealedBox(public_key) - encrypted = sealed_box.encrypt(secret_value.encode("utf-8")) - return b64encode(encrypted).decode("utf-8") - ``` - - #### Example encrypting a secret using C# - - Encrypt your secret using the [Sodium.Core](https://www.nuget.org/packages/Sodium.Core/) package. - - ``` - var secretValue = System.Text.Encoding.UTF8.GetBytes("mySecret"); - var publicKey = Convert.FromBase64String("2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvvcCU="); - - var sealedPublicKeyBox = Sodium.SealedPublicKeyBox.Create(secretValue, publicKey); + When you boot a GitHub instance for the first time, you can use the following endpoint to upload a license. - 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" + Note that you need to `POST` to [`/setup/api/configure`](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#start-a-configuration-process) to start the actual configuration process. - key = Base64.decode64("+ZYvJDZMHUfBkJdyq5Zm9SKqeuBQ4sj+6sfjlH4CgG0=") - public_key = RbNaCl::PublicKey.new(key) + When using this endpoint, your GitHub instance must have a password set. This can be accomplished two ways: - box = RbNaCl::Boxes::Sealed.from_public_key(public_key) - encrypted_secret = box.encrypt("my_secret") + 1. If you're working directly with the API before accessing the web interface, you must pass in the password parameter to set your password. + 2. If you set up your instance via the web interface before accessing the API, your calls to this endpoint do not need the password parameter. - # Print the base64 encoded secret - puts Base64.strict_encode64(encrypted_secret) - ``` + **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + operationId: enterprise-admin/create-enterprise-server-license tags: - - codespaces - operationId: codespaces/create-or-update-secret-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#create-or-update-a-secret-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/secret-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#create-a-github-enterprise-server-license + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol + responses: + '202': + description: Response requestBody: required: true content: - application/json: + application/x-www-form-urlencoded: schema: type: object properties: - encrypted_value: + license: type: string - description: Value for your secret, encrypted with [LibSodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages) - using the public key retrieved from the [Get the public key for - the authenticated user](https://docs.github.com/rest/reference/codespaces#get-the-public-key-for-the-authenticated-user) - endpoint. - pattern: "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})$" - key_id: + description: The content of your _.ghl_ license file. + password: type: string - description: ID of the key you used to encrypt the secret. - selected_repository_ids: - type: array - description: An array of repository ids that can access the user - secret. You can manage the list of selected repositories using - the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), - [Set selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret), - and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) - endpoints. - items: - type: string + description: You **must** provide a password _only if_ you are uploading + your license for the first time. If you previously set a password + through the web interface, you don't need this parameter. + settings: + type: string + description: An optional JSON string containing the installation + settings. For a list of the available settings, see the [Get settings + endpoint](https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#get-settings). required: - - encrypted_value - - key_id - example: - encrypted_value: c2VjcmV0 - key_id: '012345678912345678' - selected_repository_ids: - - '1234567' - - '2345678' - responses: - '201': - description: Response after successfully creaing a secret - content: - application/json: - schema: - type: object - properties: {} - additionalProperties: false - '204': - description: Response after successfully updating a secret - '422': - "$ref": "#/components/responses/validation_failed" - '404': - "$ref": "#/components/responses/not_found" + - license x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: secrets - delete: - summary: Delete a secret for the authenticated user - description: Deletes a secret from a user's codespaces using the secret name. - Deleting the secret will remove access from all codespaces that were allowed - to access the secret. You must authenticate using an access token with the - `user` scope to use this endpoint. User must have Codespaces access to use - this endpoint. + category: enterprise-admin + subcategory: management-console + "/setup/api/upgrade": + post: + summary: Upgrade a license + description: |- + This API upgrades your license and also triggers the configuration process. + + **Note:** The request body for this operation must be submitted as `application/x-www-form-urlencoded` data. You can submit a parameter value as a string, or you can use a tool such as `curl` to submit a parameter value as the contents of a text file. For more information, see the [`curl` documentation](https://curl.se/docs/manpage.html#--data-urlencode). + operationId: enterprise-admin/upgrade-license tags: - - codespaces - operationId: codespaces/delete-secret-for-authenticated-user + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#delete-a-secret-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/secret-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#upgrade-a-license + servers: + - url: "{protocol}://{hostname}" + variables: + hostname: + default: HOSTNAME + description: Self-hosted Enterprise Server hostname + protocol: + default: http + description: Self-hosted Enterprise Server protocol responses: - '204': + '202': description: Response + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + license: + type: string + description: The content of your new _.ghl_ license file. x-github: githubCloudOnly: false enabledForGitHubApps: false - category: codespaces - subcategory: secrets - "/user/codespaces/secrets/{secret_name}/repositories": + category: enterprise-admin + subcategory: management-console + "/teams/{team_id}": get: - summary: List selected repositories for a user secret - description: |- - List the repositories that have been granted the ability to use a user's codespace secret. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + summary: Get a team (Legacy) + description: "**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/enterprise-server@3.6/rest/reference/teams#get-a-team-by-name) + endpoint." tags: - - codespaces - operationId: codespaces/list-repositories-for-secret-for-authenticated-user + - teams + operationId: teams/get-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#get-a-team-legacy parameters: - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/team-id" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - repositories - properties: - total_count: - type: integer - repositories: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/team-full" examples: default: - "$ref": "#/components/examples/minimal-repository-paginated" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" + "$ref": "#/components/examples/team-full" '404': "$ref": "#/components/responses/not_found" - '500': - "$ref": "#/components/responses/internal_error" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: secrets - put: - summary: Set selected repositories for a user secret + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + patch: + summary: Update a team (Legacy) description: |- - Select the repositories that will use a user's codespace secret. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + **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/enterprise-server@3.6/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`. tags: - - codespaces - operationId: codespaces/set-repositories-for-secret-for-authenticated-user + - teams + operationId: teams/update-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#set-selected-repositories-for-a-user-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#update-a-team-legacy parameters: - - "$ref": "#/components/parameters/secret-name" + - "$ref": "#/components/parameters/team-id" requestBody: required: true content: @@ -35002,505 +33801,562 @@ paths: schema: type: object properties: - selected_repository_ids: - type: array - description: An array of repository ids for which a codespace can - access the secret. You can manage the list of selected repositories - using the [List selected repositories for a user secret](https://docs.github.com/rest/reference/codespaces#list-selected-repositories-for-a-user-secret), - [Add a selected repository to a user secret](https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret), - and [Remove a selected repository from a user secret](https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret) - endpoints. - items: - type: integer + name: + type: string + description: The name of the team. + description: + type: string + description: The description of the team. + privacy: + type: string + description: "The level of privacy this team should have. Editing + teams without specifying this parameter leaves `privacy` intact. + The options are: \n**For a non-nested team:** \n\\* `secret` + - only visible to organization owners and members of this team. + \ \n\\* `closed` - visible to all members of this organization. + \ \n**For a parent or child team:** \n\\* `closed` - visible + to all members of this organization." + enum: + - secret + - closed + permission: + type: string + description: "**Deprecated**. The permission that new repositories + will be added to the team with when none is specified." + enum: + - pull + - push + - admin + default: pull + parent_team_id: + type: integer + description: The ID of a team to set as the parent team. + nullable: true required: - - selected_repository_ids - example: - selected_repository_ids: - - '1296269' - - '1296280' + - name + examples: + default: + value: + name: new team name + description: new team description + privacy: closed responses: - '204': - description: No Content when repositories were added to the selected list - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" + '200': + description: Response when the updated information already exists + content: + application/json: + schema: + "$ref": "#/components/schemas/team-full" + examples: + default: + "$ref": "#/components/examples/team-full" + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-full" + examples: + default: + "$ref": "#/components/examples/team-full" '404': "$ref": "#/components/responses/not_found" - '500': - "$ref": "#/components/responses/internal_error" + '422': + "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: secrets - "/user/codespaces/secrets/{secret_name}/repositories/{repository_id}": - put: - summary: Add a selected repository to a user secret + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + delete: + summary: Delete a team (Legacy) description: |- - Adds a repository to the selected repositories for a user's codespace secret. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + **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/enterprise-server@3.6/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. tags: - - codespaces - operationId: codespaces/add-repository-for-secret-for-authenticated-user + - teams + operationId: teams/delete-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#add-a-selected-repository-to-a-user-secret + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#delete-a-team-legacy parameters: - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer + - "$ref": "#/components/parameters/team-id" responses: '204': - description: No Content when repository was added to the selected list - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" + description: Response '404': "$ref": "#/components/responses/not_found" - '500': - "$ref": "#/components/responses/internal_error" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: secrets - delete: - summary: Remove a selected repository from a user secret + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/teams/{team_id}/discussions": + get: + summary: List discussions (Legacy) description: |- - Removes a repository from the selected repositories for a user's codespace secret. - You must authenticate using an access token with the `user` or `read:user` scope to use this endpoint. User must have Codespaces access to use this endpoint. + **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/remove-repository-for-secret-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#remove-a-selected-repository-from-a-user-secret - parameters: - - "$ref": "#/components/parameters/secret-name" - - name: repository_id - in: path - required: true - schema: - type: integer - responses: - '204': - description: No Content when repository was removed from the selected list - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '500': - "$ref": "#/components/responses/internal_error" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: secrets - "/user/codespaces/{codespace_name}": - get: - summary: Get a codespace for the authenticated user - description: |- - Gets information about a user's codespace. - - You must authenticate using an access token with the `codespace` scope to use this endpoint. - tags: - - codespaces - operationId: codespaces/get-for-authenticated-user + - teams + operationId: teams/list-discussions-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#get-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-discussions-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespace" + type: array + items: + "$ref": "#/components/schemas/team-discussion" examples: default: - "$ref": "#/components/examples/codespace" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/team-discussion-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - patch: - summary: Update a codespace for the authenticated user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussions + deprecated: true + post: + summary: Create a discussion (Legacy) description: |- - Updates a codespace owned by the authenticated user. Currently only the codespace's machine type and recent folders can be modified using this endpoint. + **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion) endpoint. - If you specify a new machine type it will be applied the next time your codespace is started. + Creates a new discussion post on a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). - You must authenticate using an access token with the `codespace` scope to use this endpoint. + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - - codespaces - operationId: codespaces/update-for-authenticated-user + - teams + operationId: teams/create-discussion-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#update-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" requestBody: - required: false + required: true content: application/json: schema: type: object properties: - machine: - description: A valid machine to transition this codespace to. + title: type: string - recent_folders: - description: Recently opened folders inside the codespace. It is - currently used by the clients to determine the folder path to - load the codespace in. - type: array - items: - type: string - example: - machine: standardLinux + description: The discussion post's title. + body: + type: string + description: The discussion post's body text. + private: + type: boolean + description: Private posts are only visible to team members, organization + owners, and team maintainers. Public posts are visible to all + members of the organization. Set to `true` to create a private + post. + default: false + required: + - title + - body + examples: + default: + value: + title: Our first team post + body: Hi! This is an area for us to collaborate as a team. responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespace" + "$ref": "#/components/schemas/team-discussion" examples: default: - "$ref": "#/components/examples/codespace" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/team-discussion" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - delete: - summary: Delete a codespace for the authenticated user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussions + deprecated: true + "/teams/{team_id}/discussions/{discussion_number}": + get: + summary: Get a discussion (Legacy) description: |- - Deletes a user's codespace. + **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion) endpoint. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + Get a specific discussion on a team's page. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/delete-for-authenticated-user + - teams + operationId: teams/get-discussion-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#delete-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-discussion-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" responses: - '202': - "$ref": "#/components/responses/accepted" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + '200': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/team-discussion" + examples: + default: + "$ref": "#/components/examples/team-discussion" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/codespaces/{codespace_name}/exports": - post: - summary: Export a codespace for the authenticated user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussions + deprecated: true + patch: + summary: Update a discussion (Legacy) description: |- - Triggers an export of the specified codespace and returns a URL and ID where the status of the export can be monitored. + **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/enterprise-server@3.6/rest/reference/teams#update-a-discussion) endpoint. - You must authenticate using a personal access token with the `codespace` scope to use this 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/export-for-authenticated-user + - teams + operationId: teams/update-discussion-legacy + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#update-a-discussion-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + title: + type: string + description: The discussion post's title. + body: + type: string + description: The discussion post's body text. + examples: + default: + value: + title: Welcome to our first team post responses: - '202': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespace-export-details" + "$ref": "#/components/schemas/team-discussion" examples: default: - "$ref": "#/components/examples/user-export-details" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/team-discussion-2" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/codespaces/{codespace_name}/exports/{export_id}": - get: - summary: Get details about a codespace export + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussions + deprecated: true + delete: + summary: Delete a discussion (Legacy) description: |- - Gets information about an export of a codespace. + **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/enterprise-server@3.6/rest/reference/teams#delete-a-discussion) endpoint. - You must authenticate using a personal access token with the `codespace` scope to use this endpoint. + Delete a discussion from a team's page. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/get-export-details-for-authenticated-user + - teams + operationId: teams/delete-discussion-legacy + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#delete-a-discussion-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" - - "$ref": "#/components/parameters/export-id" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/codespace-export-details" - examples: - default: - "$ref": "#/components/examples/user-export-details" - '404': - "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/codespaces/{codespace_name}/machines": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussions + deprecated: true + "/teams/{team_id}/discussions/{discussion_number}/comments": get: - summary: List machine types for a codespace + summary: List discussion comments (Legacy) description: |- - List the machine types a codespace can transition to use. + **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/enterprise-server@3.6/rest/reference/teams#list-discussion-comments) endpoint. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + List all comments on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/codespace-machines-for-authenticated-user + - teams + operationId: teams/list-discussion-comments-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#list-machine-types-for-a-codespace + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-discussion-comments-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - type: object - required: - - total_count - - machines - properties: - total_count: - type: integer - machines: - type: array - items: - "$ref": "#/components/schemas/codespace-machine" + type: array + items: + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/codespace-machines-list" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/team-discussion-comment-items" + headers: + Link: + "$ref": "#/components/headers/link" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: machines - "/user/codespaces/{codespace_name}/start": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussion-comments + deprecated: true post: - summary: Start a codespace for the authenticated user + summary: Create a discussion comment (Legacy) description: |- - Starts a user's codespace. + **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/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment) endpoint. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + Creates a new comment on a team discussion. OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + + This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.6/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details. tags: - - codespaces - operationId: codespaces/start-for-authenticated-user + - teams + operationId: teams/create-discussion-comment-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#start-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-discussion-comment-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + body: + type: string + description: The discussion comment's body text. + required: + - body + examples: + default: + value: + body: Do you like apples? responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespace" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/codespace" - '304': - "$ref": "#/components/responses/not_modified" - '500': - "$ref": "#/components/responses/internal_error" - '400': - "$ref": "#/components/responses/bad_request" - '401': - "$ref": "#/components/responses/requires_authentication" - '402': - description: Payment required - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" - '409': - "$ref": "#/components/responses/conflict" + "$ref": "#/components/examples/team-discussion-comment" x-github: + triggersNotification: true githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/codespaces/{codespace_name}/stop": - post: - summary: Stop a codespace for the authenticated user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussion-comments + deprecated: true + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}": + get: + summary: Get a discussion comment (Legacy) description: |- - Stops a user's codespace. + **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/enterprise-server@3.6/rest/reference/teams#get-a-discussion-comment) endpoint. - You must authenticate using an access token with the `codespace` scope to use this endpoint. + Get a specific comment on a team discussion. OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - codespaces - operationId: codespaces/stop-for-authenticated-user + - teams + operationId: teams/get-discussion-comment-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/codespaces#stop-a-codespace-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-a-discussion-comment-legacy parameters: - - "$ref": "#/components/parameters/codespace-name" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/codespace" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/codespace" - '500': - "$ref": "#/components/responses/internal_error" - '401': - "$ref": "#/components/responses/requires_authentication" - '403': - "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/team-discussion-comment" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: codespaces - subcategory: - "/user/email/visibility": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussion-comments + deprecated: true patch: - summary: Set primary email visibility for the authenticated user - description: Sets the visibility for your primary email addresses. + summary: Update a discussion comment (Legacy) + description: |- + **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - users - operationId: users/set-primary-email-visibility-for-authenticated-user + - teams + operationId: teams/update-discussion-comment-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#update-a-discussion-comment-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" requestBody: required: true content: application/json: schema: + type: object properties: - visibility: - description: Denotes whether an email is publicly visible. + body: type: string - enum: - - public - - private + description: The discussion comment's body text. required: - - visibility - type: object + - body + examples: + default: + value: + body: Do you like pineapples? responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/email" + "$ref": "#/components/schemas/team-discussion-comment" examples: default: - "$ref": "#/components/examples/email-items-3" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/team-discussion-comment-2" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: emails - "/user/emails": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussion-comments + deprecated: true + delete: + summary: Delete a discussion comment (Legacy) + description: |- + **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/enterprise-server@3.6/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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + tags: + - teams + operationId: teams/delete-discussion-comment-legacy + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#delete-a-discussion-comment-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" + responses: + '204': + description: Response + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: discussion-comments + deprecated: true + "/teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions": get: - summary: List email addresses for the authenticated user - description: Lists all of your email addresses, and specifies which one is visible - to the public. This endpoint is accessible with the `user:email` scope. + summary: List reactions for a team discussion comment (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion-comment) endpoint. + + List the reactions to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - users - operationId: users/list-emails-for-authenticated-user + - reactions + operationId: reactions/list-for-team-discussion-comment-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-email-addresses-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#list-reactions-for-a-team-discussion-comment-legacy parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a team discussion comment. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -35511,165 +34367,113 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/email" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/email-items-2" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: emails + enabledForGitHubApps: true + removalDate: '2021-02-21' + deprecationDate: '2020-02-26' + category: reactions + subcategory: + deprecated: true post: - summary: Add an email address for the authenticated user - description: This endpoint is accessible with the `user` scope. + summary: Create reaction for a team discussion comment (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion-comment)" endpoint. + + Create a reaction to a [team discussion comment](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussion-comments). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion comment. tags: - - users - operationId: users/add-email-for-authenticated-user + - reactions + operationId: reactions/create-for-team-discussion-comment-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#add-an-email-address-for-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#create-reaction-for-a-team-discussion-comment-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - "$ref": "#/components/parameters/comment-number" requestBody: - required: false + required: true content: application/json: schema: - oneOf: - - type: object - properties: - emails: - description: Adds one or more email addresses to your GitHub account. - Must contain at least one email address. **Note:** Alternatively, - you can pass a single email address or an `array` of emails - addresses directly, but we recommend that you pass an object - using the `emails` key. - type: array - items: - type: string - example: username@example.com - minItems: 1 - example: [] - required: - - emails - example: - emails: - - octocat@github.com - - mona@github.com - - type: array - items: + type: object + properties: + content: type: string - example: username@example.com - minItems: 1 - - type: string + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the team discussion comment. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + required: + - content + examples: + default: + value: + content: heart responses: '201': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/email" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/email-items" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: emails - delete: - summary: Delete an email address for the authenticated user - description: This endpoint is accessible with the `user` scope. - tags: - - users - operationId: users/delete-email-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/users#delete-an-email-address-for-the-authenticated-user - parameters: [] - requestBody: - content: - application/json: - schema: - oneOf: - - type: object - description: Deletes one or more email addresses from 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. - properties: - emails: - description: Email addresses associated with the GitHub user account. - type: array - items: - type: string - example: username@example.com - minItems: 1 - example: - emails: - - octocat@github.com - - mona@github.com - required: - - emails - - type: array - items: - type: string - example: username@example.com - minItems: 1 - - type: string - responses: - '204': - description: Response - '304': - "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/reaction" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: emails - "/user/followers": + enabledForGitHubApps: true + removalDate: '2021-02-21' + deprecationDate: '2020-02-26' + category: reactions + subcategory: + deprecated: true + "/teams/{team_id}/discussions/{discussion_number}/reactions": get: - summary: List followers of the authenticated user - description: Lists the people following the authenticated user. + summary: List reactions for a team discussion (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/reactions#list-reactions-for-a-team-discussion) endpoint. + + List the reactions to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `read:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - users - operationId: users/list-followers-for-authenticated-user + - reactions + operationId: reactions/list-for-team-discussion-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-followers-of-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#list-reactions-for-a-team-discussion-legacy parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + - name: content + description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types). + Omit this parameter to list all reactions to a team discussion. + in: query + required: false + schema: + type: string + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -35680,35 +34484,106 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/simple-user" + "$ref": "#/components/schemas/reaction" examples: default: - "$ref": "#/components/examples/simple-user-items" + "$ref": "#/components/examples/reaction-items" headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + removalDate: '2021-02-21' + deprecationDate: '2020-02-26' + category: reactions + subcategory: + deprecated: true + post: + summary: Create reaction for a team discussion (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/reactions#create-reaction-for-a-team-discussion) endpoint. + + Create a reaction to a [team discussion](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#discussions). OAuth access tokens require the `write:discussion` [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). A response with an HTTP `200` status means that you already added the reaction type to this team discussion. + tags: + - reactions + operationId: reactions/create-for-team-discussion-legacy + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/reactions/#create-reaction-for-a-team-discussion-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/discussion-number" + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + content: + type: string + description: The [reaction type](https://docs.github.com/enterprise-server@3.6/rest/reference/reactions#reaction-types) + to add to the team discussion. + enum: + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - rocket + - eyes + required: + - content + examples: + default: + value: + content: heart + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/reaction" + examples: + default: + "$ref": "#/components/examples/reaction" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: followers - "/user/following": + removalDate: '2021-02-21' + deprecationDate: '2020-02-26' + category: reactions + subcategory: + deprecated: true + "/teams/{team_id}/members": get: - summary: List the people the authenticated user follows - description: Lists the people who the authenticated user follows. + summary: List team members (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/teams#list-team-members) endpoint. + + Team members will include the members of child teams. tags: - - users - operationId: users/list-followed-by-authenticated-user + - teams + operationId: teams/list-members-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-the-people-the-authenticated-user-follows + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-team-members-legacy parameters: + - "$ref": "#/components/parameters/team-id" + - name: role + description: Filters members returned by their role in the team. + in: query + required: false + schema: + type: string + enum: + - member + - maintainer + - all + default: all - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -35726,645 +34601,674 @@ paths: headers: Link: "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + '404': + "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: followers - "/user/following/{username}": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true + "/teams/{team_id}/members/{username}": get: - summary: Check if a person is followed by the authenticated user - description: '' + summary: Get team member (Legacy) + description: |- + The "Get team member" endpoint (described below) is deprecated. + + We recommend using the [Get team membership for a user](https://docs.github.com/enterprise-server@3.6/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. tags: - - users - operationId: users/check-person-is-followed-by-authenticated + - teams + operationId: teams/get-member-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-member-legacy parameters: + - "$ref": "#/components/parameters/team-id" - "$ref": "#/components/parameters/username" responses: '204': - description: if the person is followed by the authenticated user + description: if user is a member '404': - description: if the person is not followed by the authenticated user - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: if user is not a member x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: followers + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true put: - summary: Follow a user + summary: Add team member (Legacy) description: |- - 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)." + The "Add team member" endpoint (described below) is deprecated. - Following a user requires the user to be logged in and authenticated with basic auth or OAuth with the `user:follow` scope. + We recommend using the [Add or update team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint instead. It allows you to invite new organization members to your teams. + + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + To add someone to a team, the authenticated user must be an organization owner or a team maintainer in the team they're changing. The person being added to the team must be a member of the team's organization. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + + Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - - users - operationId: users/follow + - teams + operationId: teams/add-member-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#follow-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-team-member-legacy parameters: + - "$ref": "#/components/parameters/team-id" - "$ref": "#/components/parameters/username" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" '404': - "$ref": "#/components/responses/not_found" + description: Not Found if team synchronization is set up + '422': + description: Unprocessable Entity if you attempt to add an organization + to a team or you attempt to add a user to a team when they are not a member + of at least one other team in the same organization '403': "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: followers + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true delete: - summary: Unfollow a user - description: Unfollowing a user requires the user to be logged in and authenticated - with basic auth or OAuth with the `user:follow` scope. + summary: Remove team member (Legacy) + description: |- + The "Remove team member" endpoint (described below) is deprecated. + + We recommend using the [Remove team membership for a user](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint instead. It allows you to remove both active and pending memberships. + + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + To remove a team member, the authenticated user must have 'admin' permissions to the team or be an owner of the org that the team is associated with. Removing a team member does not delete the user, it just removes them from the team. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." tags: - - users - operationId: users/unfollow + - teams + operationId: teams/remove-member-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#unfollow-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-member-legacy parameters: + - "$ref": "#/components/parameters/team-id" - "$ref": "#/components/parameters/username" responses: '204': description: Response - '304': - "$ref": "#/components/responses/not_modified" '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: Not Found if team synchronization is setup x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: followers - "/user/gpg_keys": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true + "/teams/{team_id}/memberships/{username}": get: - summary: List GPG keys for the authenticated user - description: 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/). + summary: Get team membership for a user (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user) endpoint. + + Team members will include the members of child teams. + + To get a user's membership with a team, the team must be visible to the authenticated user. + + **Note:** + The response contains the `state` of the membership and the member's `role`. + + The `role` for organization owners is set to `maintainer`. For more information about `maintainer` roles, see [Create a team](https://docs.github.com/enterprise-server@3.6/rest/reference/teams#create-a-team). tags: - - users - operationId: users/list-gpg-keys-for-authenticated-user + - teams + operationId: teams/get-membership-for-user-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-gpg-keys-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#get-team-membership-for-a-user-legacy parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/username" responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/gpg-key" + "$ref": "#/components/schemas/team-membership" examples: - default: - "$ref": "#/components/examples/gpg-key-items" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" + response-if-user-is-a-team-maintainer: + "$ref": "#/components/examples/team-membership-response-if-user-is-a-team-maintainer" '404': "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: gpg-keys - post: - summary: Create a GPG key for the authenticated user - description: 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/). - operationId: users/create-gpg-key-for-authenticated-user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true + put: + summary: Add or update team membership for a user (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user) endpoint. + + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + If the user is already a member of the team's organization, this endpoint will add the user to the team. To add a membership between an organization member and a team, the authenticated user must be an organization owner or a team maintainer. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + + If the user is unaffiliated with the team's organization, this endpoint will send an invitation to the user via email. This newly-created membership will be in the "pending" state until the user accepts the invitation, at which point the membership will transition to the "active" state and the user will be added as a member of the team. To add a membership between an unaffiliated user and a team, the authenticated user must be an organization owner. + + If the user is already a member of the team, this endpoint will update the role of the team member's role. To update the membership of a team member, the authenticated user must be an organization owner or a team maintainer. tags: - - users + - teams + operationId: teams/add-or-update-membership-for-user-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#create-a-gpg-key-for-the-authenticated-user - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-membership-for-a-user-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/username" requestBody: - required: true + required: false content: application/json: schema: + type: object properties: - armored_public_key: - description: A GPG key in ASCII-armored format. + role: type: string - type: object - required: - - armored_public_key + description: The role that this user should have in the team. + enum: + - member + - maintainer + default: member + examples: + default: + summary: Assign the member role for a user in a team + value: + role: member responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gpg-key" + "$ref": "#/components/schemas/team-membership" examples: - default: - "$ref": "#/components/examples/gpg-key" + response-if-users-membership-with-team-is-now-pending: + "$ref": "#/components/examples/team-membership-response-if-users-membership-with-team-is-now-pending" + '403': + description: Forbidden if team synchronization is set up '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" + description: Unprocessable Entity if you attempt to add an organization + to a team '404': "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true + delete: + summary: Remove team membership for a user (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user) endpoint. + + Team synchronization is available for organizations using GitHub Enterprise Cloud. For more information, see [GitHub's products](https://docs.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation. + + To remove a membership between a user and a team, the authenticated user must have 'admin' permissions to the team or be an owner of the organization that the team is associated with. Removing team membership does not delete the user, it just removes their membership from the team. + + **Note:** When you have team synchronization set up for a team with your organization's identity provider (IdP), you will see an error if you attempt to use the API for making changes to the team's membership. If you have access to manage group membership in your IdP, you can manage GitHub Enterprise Server 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 Enterprise Server](https://docs.github.com/articles/synchronizing-teams-between-your-identity-provider-and-github/)." + tags: + - teams + operationId: teams/remove-membership-for-user-legacy + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#remove-team-membership-for-a-user-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" + description: if team synchronization is set up x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: gpg-keys - "/user/gpg_keys/{gpg_key_id}": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: members + deprecated: true + "/teams/{team_id}/projects": get: - summary: Get a GPG key for the authenticated user - description: 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/). + summary: List team projects (Legacy) + description: |- + **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/enterprise-server@3.6/rest/reference/teams#list-team-projects) endpoint. + + Lists the organization projects for a team. tags: - - users - operationId: users/get-gpg-key-for-authenticated-user + - teams + operationId: teams/list-projects-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#get-a-gpg-key-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#list-team-projects-legacy parameters: - - "$ref": "#/components/parameters/gpg-key-id" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/gpg-key" + type: array + items: + "$ref": "#/components/schemas/team-project" examples: default: - "$ref": "#/components/examples/gpg-key" + "$ref": "#/components/examples/team-project-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: gpg-keys - delete: - summary: Delete a GPG key for the authenticated user - description: 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/). - tags: - - users - operationId: users/delete-gpg-key-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/gpg-key-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: users - subcategory: gpg-keys - "/user/installations": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/teams/{team_id}/projects/{project_id}": get: - summary: List app installations accessible to the user access token + summary: Check team permissions for a project (Legacy) description: |- - 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. + **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/enterprise-server@3.6/rest/reference/teams#check-team-permissions-for-a-project) 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. + Checks whether a team has `read`, `write`, or `admin` permissions for an organization project. The response includes projects inherited from a parent team. tags: - - apps - operationId: apps/list-installations-for-authenticated-user + - teams + operationId: teams/check-permissions-for-project-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#check-team-permissions-for-a-project-legacy parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/project-id" responses: '200': - description: You can find the permissions for the installation under the - `permissions` key. + description: Response content: application/json: schema: - type: object - required: - - total_count - - installations - properties: - total_count: - type: integer - installations: - type: array - items: - "$ref": "#/components/schemas/installation" + "$ref": "#/components/schemas/team-project" examples: default: - "$ref": "#/components/examples/base-installation-for-auth-user-paginated" - headers: - Link: - "$ref": "#/components/headers/link" - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '415': - "$ref": "#/components/responses/preview_header_missing" + "$ref": "#/components/examples/team-project" + '404': + description: Not Found if project is not managed by this team x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: installations - "/user/installations/{installation_id}/repositories": - get: - summary: List repositories accessible to the user access token + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + put: + summary: Add or update team project permissions (Legacy) description: |- - 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. + **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/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions) endpoint. - 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. + 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. tags: - - apps - operationId: apps/list-installation-repos-for-authenticated-user + - teams + operationId: teams/add-or-update-project-permissions-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-repositories-accessible-to-the-user-access-token + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#add-or-update-team-project-permissions-legacy parameters: - - "$ref": "#/components/parameters/installation-id" - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/project-id" + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + permission: + type: string + description: 'The permission to grant to the team for 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 this endpoint. For more + information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)."' + enum: + - read + - write + - admin responses: - '200': - description: The access the user has to each repository is included in the - hash under the `permissions` key. + '204': + description: Response + '403': + description: Forbidden if the project is not owned by the organization content: application/json: schema: type: object - required: - - total_count - - repositories properties: - total_count: - type: integer - repository_selection: + message: + type: string + documentation_url: type: string - repositories: - type: array - items: - "$ref": "#/components/schemas/repository" examples: - default: - "$ref": "#/components/examples/repository-paginated" - headers: - Link: - "$ref": "#/components/headers/link" + response-if-the-project-is-not-owned-by-the-organization: + value: + message: Must have admin rights to Repository. + documentation_url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#add-or-update-team-project-permissions '404': "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '304': - "$ref": "#/components/responses/not_modified" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: installations - "/user/installations/{installation_id}/repositories/{repository_id}": - put: - summary: Add a repository to an app installation + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + delete: + summary: Remove a project from a team (Legacy) description: |- - Add a single repository to an installation. The authenticated user must have admin access to the repository. + **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/enterprise-server@3.6/rest/reference/teams#remove-a-project-from-a-team) endpoint. - 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. + 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. tags: - - apps - operationId: apps/add-repo-to-installation-for-authenticated-user + - teams + operationId: teams/remove-project-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#add-a-repository-to-an-app-installation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#remove-a-project-from-a-team-legacy parameters: - - "$ref": "#/components/parameters/installation-id" - - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/project-id" responses: '204': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '304': - "$ref": "#/components/responses/not_modified" '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: installations - delete: - summary: Remove a repository from an app installation - description: |- - 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. + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/teams/{team_id}/repos": + get: + summary: List team repositories (Legacy) + description: "**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/enterprise-server@3.6/rest/reference/teams#list-team-repositories) + endpoint." tags: - - apps - operationId: apps/remove-repo-from-installation-for-authenticated-user + - teams + operationId: teams/list-repos-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#remove-a-repository-from-an-app-installation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#list-team-repositories-legacy parameters: - - "$ref": "#/components/parameters/installation-id" - - "$ref": "#/components/parameters/repository-id" + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': + '200': description: Response - '403': - "$ref": "#/components/responses/forbidden" - '304': - "$ref": "#/components/responses/not_modified" + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" + examples: + default: + "$ref": "#/components/examples/minimal-repository-items" + headers: + Link: + "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: apps - subcategory: installations - "/user/interaction-limits": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/teams/{team_id}/repos/{owner}/{repo}": get: - summary: Get interaction restrictions for your public repositories - description: Shows which type of GitHub user can interact with your public repositories - and when the restriction expires. + summary: Check team permissions for a repository (Legacy) + description: |- + **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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: tags: - - interactions - operationId: interactions/get-restrictions-for-authenticated-user + - teams + operationId: teams/check-permissions-for-repo-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#get-interaction-restrictions-for-your-public-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#check-team-permissions-for-a-repository-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '200': - description: Default response + description: Alternative response with extra repository information content: application/json: schema: - anyOf: - - "$ref": "#/components/schemas/interaction-limit-response" - - type: object - properties: {} - additionalProperties: false + "$ref": "#/components/schemas/team-repository" examples: - default: - "$ref": "#/components/examples/interaction-limit-response" + alternative-response-with-extra-repository-information: + "$ref": "#/components/examples/team-repository-alternative-response-with-extra-repository-information" '204': - description: Response when there are no restrictions + description: Response if repository is managed by this team + '404': + description: Not Found if repository is not managed by this team x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: interactions - subcategory: user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true put: - summary: Set interaction restrictions for your public repositories - description: 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. + summary: Add or update team repository permissions (Legacy) + description: |- + **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/enterprise-server@3.6/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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - - interactions - operationId: interactions/set-restrictions-for-authenticated-user + - teams + operationId: teams/add-or-update-repo-permissions-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#set-interaction-restrictions-for-your-public-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#add-or-update-team-repository-permissions-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" requestBody: - required: true + required: false content: application/json: schema: - "$ref": "#/components/schemas/interaction-limit" + type: object + properties: + permission: + type: string + description: The permission to grant the team on this repository. + If no permission is specified, the team's `permission` attribute + will be used to determine what permission to grant the team on + this repository. + enum: + - pull + - push + - admin responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/interaction-limit-response" - examples: - default: - "$ref": "#/components/examples/interaction-limit-user" + '403': + "$ref": "#/components/responses/forbidden" '422': "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: interactions - subcategory: user + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true delete: - summary: Remove interaction restrictions from your public repositories - description: Removes any interaction restrictions from your public repositories. + summary: Remove a repository from a team (Legacy) + description: |- + **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/enterprise-server@3.6/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. tags: - - interactions - operationId: interactions/remove-restrictions-for-authenticated-user + - teams + operationId: teams/remove-repo-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/interactions#remove-interaction-restrictions-from-your-public-repositories + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#remove-a-repository-from-a-team-legacy + parameters: + - "$ref": "#/components/parameters/team-id" + - "$ref": "#/components/parameters/owner" + - "$ref": "#/components/parameters/repo" responses: '204': description: Response x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: interactions - subcategory: user - "/user/issues": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/teams/{team_id}/teams": get: - summary: List user account issues assigned to the authenticated user - description: |- - 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. + summary: List child teams (Legacy) + description: "**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/enterprise-server@3.6/rest/reference/teams#list-child-teams) + endpoint." tags: - - issues - operationId: issues/list-for-authenticated-user + - teams + operationId: teams/list-child-legacy externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams/#list-child-teams-legacy parameters: - - name: filter - description: "Indicates which sorts of issues to return. Can be one of: \n\\* - `assigned`: Issues assigned to you \n\\* `created`: Issues created by you - \ \n\\* `mentioned`: Issues mentioning you \n\\* `subscribed`: Issues you're - subscribed to updates for \n\\* `all` or `repos`: All issues the authenticated - user can see, regardless of participation or creation" - in: query - required: false - schema: - type: string - enum: - - assigned - - created - - mentioned - - subscribed - - repos - - all - default: assigned - - name: state - description: Indicates the state of the issues to return. Can be either `open`, - `closed`, or `all`. - in: query - required: false - schema: - type: string - enum: - - open - - closed - - all - default: open - - "$ref": "#/components/parameters/labels" - - name: sort - description: What to sort results by. Can be either `created`, `updated`, - `comments`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - comments - default: created - - "$ref": "#/components/parameters/direction" - - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/team-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: if child teams exist content: application/json: schema: type: array items: - "$ref": "#/components/schemas/issue" + "$ref": "#/components/schemas/team" examples: - default: - "$ref": "#/components/examples/issue-with-repo-items" + response-if-child-teams-exist: + "$ref": "#/components/examples/team-items-response-if-child-teams-exist" headers: Link: "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" - '304': - "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: false - category: issues - subcategory: - "/user/keys": + enabledForGitHubApps: true + removalDate: '2021-02-01' + deprecationDate: '2020-01-21' + category: teams + subcategory: + deprecated: true + "/user": get: - summary: List public SSH keys for the authenticated user - description: 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/). + summary: Get the authenticated user + description: |- + 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. tags: - users - operationId: users/list-public-ssh-keys-for-authenticated-user + operationId: users/get-authenticated externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#get-the-authenticated-user + parameters: [] responses: '200': description: Response content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/key" + oneOf: + - "$ref": "#/components/schemas/private-user" + - "$ref": "#/components/schemas/public-user" examples: - default: - "$ref": "#/components/examples/key-items" - headers: - Link: - "$ref": "#/components/headers/link" + response-with-public-and-private-profile-information: + "$ref": "#/components/examples/private-user-response-with-public-and-private-profile-information" + response-with-public-profile-information: + "$ref": "#/components/examples/private-user-response-with-public-profile-information" '304': "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -36373,48 +35277,68 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: users - subcategory: keys - post: - summary: Create a public SSH key for the authenticated user - description: 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/). - operationId: users/create-public-ssh-key-for-authenticated-user + subcategory: + patch: + summary: Update the authenticated user + description: "**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." tags: - users + operationId: users/update-authenticated externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users/#update-the-authenticated-user parameters: [] requestBody: - required: true + required: false content: application/json: schema: + type: object properties: - title: - description: A descriptive name for the new key. + name: + description: The new name of the user. type: string - example: Personal MacBook Air - key: - description: The public SSH key to add to your GitHub account. + example: Omar Jahandar + email: + description: The publicly visible email address of the user. + type: string + example: omar@example.com + blog: + description: The new blog URL of the user. + type: string + example: blog.example.com + twitter_username: + description: The new Twitter username of the user. + type: string + example: therealomarj + nullable: true + company: + description: The new company of the user. + type: string + example: Acme corporation + location: + description: The new location of the user. + type: string + example: Berlin, Germany + hireable: + description: The new hiring availability of the user. + type: boolean + bio: + description: The new short biography of the user. type: string - pattern: "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) " - required: - - key - type: object responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/key" + "$ref": "#/components/schemas/private-user" examples: default: - "$ref": "#/components/examples/key" - '422': - "$ref": "#/components/responses/validation_failed" + "$ref": "#/components/examples/private-user" '304': "$ref": "#/components/responses/not_modified" '404': @@ -36423,39 +35347,46 @@ paths: "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false category: users - subcategory: keys - "/user/keys/{key_id}": + subcategory: + "/user/emails": get: - summary: Get a public SSH key for the authenticated user - description: 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/). + summary: List email addresses for the authenticated user + description: Lists all of your email addresses, and specifies which one is visible + to the public. This endpoint is accessible with the `user:email` scope. tags: - users - operationId: users/get-public-ssh-key-for-authenticated-user + operationId: users/list-emails-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-email-addresses-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/key-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/key" + type: array + items: + "$ref": "#/components/schemas/email" examples: default: - "$ref": "#/components/examples/key" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/email-items-2" + headers: + Link: + "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -36464,23 +35395,71 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: users - subcategory: keys - delete: - summary: Delete a public SSH key for the authenticated user - description: 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/). + subcategory: emails + post: + summary: Add an email address for the authenticated user + description: This endpoint is accessible with the `user` scope. tags: - users - operationId: users/delete-public-ssh-key-for-authenticated-user + operationId: users/add-email-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/key-id" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#add-an-email-address-for-the-authenticated-user + parameters: [] + requestBody: + required: false + content: + application/json: + schema: + oneOf: + - type: object + properties: + emails: + description: Adds one or more email addresses to your GitHub account. + Must contain at least one email address. **Note:** Alternatively, + you can pass a single email address or an `array` of emails + addresses directly, but we recommend that you pass an object + using the `emails` key. + type: array + items: + type: string + example: username@example.com + minItems: 1 + example: [] + required: + - emails + example: + emails: + - octocat@github.com + - mona@github.com + - type: array + items: + type: string + example: username@example.com + minItems: 1 + - type: string + examples: + default: + summary: Example adding multiple email addresses + value: + emails: + - octocat@github.com + - mona@github.com + - octocat@octocat.org responses: - '204': + '201': description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/email" + examples: + default: + "$ref": "#/components/examples/email-items" + '422': + "$ref": "#/components/responses/validation_failed" '304': "$ref": "#/components/responses/not_modified" '404': @@ -36493,62 +35472,83 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: users - subcategory: keys - "/user/marketplace_purchases": - get: - summary: List subscriptions for the authenticated user - description: 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/). + subcategory: emails + delete: + summary: Delete an email address for the authenticated user + description: This endpoint is accessible with the `user` scope. tags: - - apps - operationId: apps/list-subscriptions-for-authenticated-user + - users + operationId: users/delete-email-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#delete-an-email-address-for-the-authenticated-user + parameters: [] + requestBody: + content: + application/json: + schema: + oneOf: + - type: object + description: Deletes one or more email addresses from 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. + properties: + emails: + description: Email addresses associated with the GitHub user account. + type: array + items: + type: string + example: username@example.com + minItems: 1 + example: + emails: + - octocat@github.com + - mona@github.com + required: + - emails + - type: array + items: + type: string + example: username@example.com + minItems: 1 + - type: string + examples: + default: + summary: Example deleting multiple email accounts + value: + emails: + - octocat@github.com + - mona@github.com responses: - '200': + '204': description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/user-marketplace-purchase" - examples: - default: - "$ref": "#/components/examples/user-marketplace-purchase-items" - headers: - Link: - "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" - '401': - "$ref": "#/components/responses/requires_authentication" '404': "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/user/marketplace_purchases/stubbed": + category: users + subcategory: emails + "/user/followers": get: - summary: List subscriptions for the authenticated user (stubbed) - description: 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/). + summary: List followers of the authenticated user + description: Lists the people following the authenticated user. tags: - - apps - operationId: apps/list-subscriptions-for-authenticated-user-stubbed + - users + operationId: users/list-followers-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#list-subscriptions-for-the-authenticated-user-stubbed + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-followers-of-the-authenticated-user parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -36560,44 +35560,35 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/user-marketplace-purchase" + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/user-marketplace-purchase-items" + "$ref": "#/components/examples/simple-user-items" headers: Link: "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: apps - subcategory: marketplace - "/user/memberships/orgs": + category: users + subcategory: followers + "/user/following": get: - summary: List organization memberships for the authenticated user - description: '' + summary: List the people the authenticated user follows + description: Lists the people who the authenticated user follows. tags: - - orgs - operationId: orgs/list-memberships-for-authenticated-user + - users + operationId: users/list-followed-by-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-the-people-the-authenticated-user-follows parameters: - - name: state - description: 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. - in: query - required: false - schema: - type: string - enum: - - active - - pending - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -36608,10 +35599,10 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/org-membership" + "$ref": "#/components/schemas/simple-user" examples: default: - "$ref": "#/components/examples/org-membership-items" + "$ref": "#/components/examples/simple-user-items" headers: Link: "$ref": "#/components/headers/link" @@ -36621,103 +35612,112 @@ paths: "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" - '422': - "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: orgs - subcategory: members - "/user/memberships/orgs/{org}": + category: users + subcategory: followers + "/user/following/{username}": get: - summary: Get an organization membership for the authenticated user + summary: Check if a person is followed by the authenticated user description: '' tags: - - orgs - operationId: orgs/get-membership-for-authenticated-user + - users + operationId: users/check-person-is-followed-by-authenticated externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#check-if-a-person-is-followed-by-the-authenticated-user parameters: - - "$ref": "#/components/parameters/org" + - "$ref": "#/components/parameters/username" responses: - '200': - description: Response + '204': + description: if the person is followed by the authenticated user + '404': + description: if the person is not followed by the authenticated user content: application/json: schema: - "$ref": "#/components/schemas/org-membership" - examples: - default: - "$ref": "#/components/examples/org-membership" + "$ref": "#/components/schemas/basic-error" + '304': + "$ref": "#/components/responses/not_modified" '403': "$ref": "#/components/responses/forbidden" - '404': - "$ref": "#/components/responses/not_found" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: orgs - subcategory: members - patch: - summary: Update an organization membership for the authenticated user - description: '' + category: users + subcategory: followers + put: + summary: Follow a user + description: |- + 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/enterprise-server@3.6/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. tags: - - orgs - operationId: orgs/update-membership-for-authenticated-user + - users + operationId: users/follow externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#follow-a-user parameters: - - "$ref": "#/components/parameters/org" - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - state: - type: string - description: The state that the membership should be in. Only `"active"` - will be accepted. - enum: - - active - required: - - state - example: - state: active + - "$ref": "#/components/parameters/username" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/org-membership" - examples: - default: - "$ref": "#/components/examples/org-membership-2" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: users + subcategory: followers + delete: + summary: Unfollow a user + description: Unfollowing a user requires the user to be logged in and authenticated + with basic auth or OAuth with the `user:follow` scope. + tags: + - users + operationId: users/unfollow + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#unfollow-a-user + parameters: + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + '304': + "$ref": "#/components/responses/not_modified" '404': "$ref": "#/components/responses/not_found" - '422': - "$ref": "#/components/responses/validation_failed" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: orgs - subcategory: members - "/user/migrations": + category: users + subcategory: followers + "/user/gpg_keys": get: - summary: List user migrations - description: Lists all migrations a user has started. + summary: List GPG keys for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - migrations - operationId: migrations/list-for-authenticated-user + - users + operationId: users/list-gpg-keys-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#list-user-migrations + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-gpg-keys-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -36729,15 +35729,17 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/migration" + "$ref": "#/components/schemas/gpg-key" examples: default: - "$ref": "#/components/examples/migration-items" + "$ref": "#/components/examples/gpg-key-items" headers: Link: "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -36745,17 +35747,19 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users + category: users + subcategory: gpg-keys post: - summary: Start a user migration - description: Initiates the generation of a user migration archive. + summary: Create a GPG key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + operationId: users/create-gpg-key-for-authenticated-user tags: - - migrations - operationId: migrations/start-for-authenticated-user + - users externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#start-a-user-migration + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#create-a-gpg-key-for-the-authenticated-user parameters: [] requestBody: required: true @@ -36763,65 +35767,31 @@ paths: application/json: schema: properties: - lock_repositories: - description: Lock the repositories being migrated at the start of - the migration - example: true - readOnly: false - type: boolean - exclude_attachments: - description: Do not include attachments in the migration - example: true - readOnly: false - type: boolean - exclude_releases: - description: Do not include releases in the migration - example: true - readOnly: false - type: boolean - exclude_owner_projects: - description: Indicates whether projects owned by the organization - or users should be excluded. - example: true - readOnly: false - type: boolean - exclude: - description: Exclude attributes from the API response to improve - performance - example: - - repositories - readOnly: false - type: array - items: - description: Allowed values that can be passed to the exclude - param. - enum: - - repositories - example: repositories - type: string - repositories: - type: array - items: - description: Repository path, owner and name - example: acme/widgets - type: string - required: - - repositories + name: + description: A descriptive name for the new key. + type: string + armored_public_key: + description: A GPG key in ASCII-armored format. + type: string type: object + required: + - armored_public_key responses: '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/migration" + "$ref": "#/components/schemas/gpg-key" examples: default: - "$ref": "#/components/examples/migration-2" + "$ref": "#/components/examples/gpg-key" '422': "$ref": "#/components/responses/validation_failed" '304': "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -36829,45 +35799,31 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users - "/user/migrations/{migration_id}": + category: users + subcategory: gpg-keys + "/user/gpg_keys/{gpg_key_id}": get: - summary: Get a user migration status - description: |- - 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). + summary: Get a GPG key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - migrations - operationId: migrations/get-status-for-authenticated-user + - users + operationId: users/get-gpg-key-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#get-a-user-migration-status + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#get-a-gpg-key-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/migration-id" - - name: exclude - in: query - required: false - schema: - type: array - items: - type: string + - "$ref": "#/components/parameters/gpg-key-id" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/migration" + "$ref": "#/components/schemas/gpg-key" examples: default: - "$ref": "#/components/examples/migration" + "$ref": "#/components/examples/gpg-key" '404': "$ref": "#/components/responses/not_found" '304': @@ -36879,75 +35835,28 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users - "/user/migrations/{migration_id}/archive": - get: - summary: Download a user migration archive - description: |- - 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. - tags: - - migrations - operationId: migrations/get-archive-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/migrations#download-a-user-migration-archive - parameters: - - "$ref": "#/components/parameters/migration-id" - responses: - '302': - description: Response - '304': - "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: migrations - subcategory: users + category: users + subcategory: gpg-keys delete: - summary: Delete a user migration archive - description: 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. + summary: Delete a GPG key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - migrations - operationId: migrations/delete-archive-for-authenticated-user + - users + operationId: users/delete-gpg-key-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#delete-a-user-migration-archive + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#delete-a-gpg-key-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/migration-id" + - "$ref": "#/components/parameters/gpg-key-id" responses: '204': description: Response '404': "$ref": "#/components/responses/not_found" + '422': + "$ref": "#/components/responses/validation_failed" '304': "$ref": "#/components/responses/not_modified" '403': @@ -36957,33 +35866,54 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users - "/user/migrations/{migration_id}/repos/{repo_name}/lock": - delete: - summary: Unlock a user repository - description: 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. + category: users + subcategory: gpg-keys + "/user/installations": + get: + summary: List app installations accessible to the user access token + description: |- + 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/enterprise-server@3.6/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. tags: - - migrations - operationId: migrations/unlock-repo-for-authenticated-user + - apps + operationId: apps/list-installations-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#unlock-a-user-repository + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#list-app-installations-accessible-to-the-user-access-token parameters: - - "$ref": "#/components/parameters/migration-id" - - "$ref": "#/components/parameters/repo-name" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: - '204': - description: Response + '200': + description: You can find the permissions for the installation under the + `permissions` key. + content: + application/json: + schema: + type: object + required: + - total_count + - installations + properties: + total_count: + type: integer + installations: + type: array + items: + "$ref": "#/components/schemas/installation" + examples: + default: + "$ref": "#/components/examples/base-installation-for-auth-user-paginated" + headers: + Link: + "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -36991,60 +35921,185 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users - "/user/migrations/{migration_id}/repositories": + category: apps + subcategory: installations + "/user/installations/{installation_id}/repositories": get: - summary: List repositories for a user migration - description: Lists all the repositories for this user migration. - tags: - - migrations - operationId: migrations/list-repos-for-authenticated-user + summary: List repositories accessible to the user access token + description: |- + 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/enterprise-server@3.6/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. + tags: + - apps + operationId: apps/list-installation-repos-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/migrations#list-repositories-for-a-user-migration + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#list-repositories-accessible-to-the-user-access-token parameters: - - "$ref": "#/components/parameters/migration-id" + - "$ref": "#/components/parameters/installation-id" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: '200': - description: Response + description: The access the user has to each repository is included in the + hash under the `permissions` key. content: application/json: schema: - type: array - items: - "$ref": "#/components/schemas/minimal-repository" + type: object + required: + - total_count + - repositories + properties: + total_count: + type: integer + repository_selection: + type: string + repositories: + type: array + items: + "$ref": "#/components/schemas/repository" examples: default: - "$ref": "#/components/examples/minimal-repository-items" + "$ref": "#/components/examples/repository-paginated" headers: Link: "$ref": "#/components/headers/link" '404': "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '304': + "$ref": "#/components/responses/not_modified" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: migrations - subcategory: users - "/user/orgs": - get: - summary: List organizations for the authenticated user + category: apps + subcategory: installations + "/user/installations/{installation_id}/repositories/{repository_id}": + put: + summary: Add a repository to an app installation description: |- - List organizations for the authenticated user. + Add a single repository to an installation. The authenticated user must have admin access to the repository. - **OAuth scope requirements** + You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. + tags: + - apps + operationId: apps/add-repo-to-installation-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#add-a-repository-to-an-app-installation + parameters: + - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/repository-id" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: apps + subcategory: installations + delete: + summary: Remove a repository from an app installation + description: |- + Remove a single repository from an installation. The authenticated user must have admin access to the repository. - 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. + You must use a personal access token (which you can create via the [command line](https://docs.github.com/enterprise-server@3.6/github/authenticating-to-github/creating-a-personal-access-token) or [Basic Authentication](https://docs.github.com/enterprise-server@3.6/rest/overview/other-authentication-methods#basic-authentication)) to access this endpoint. tags: - - orgs - operationId: orgs/list-for-authenticated-user + - apps + operationId: apps/remove-repo-from-installation-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#remove-a-repository-from-an-app-installation + parameters: + - "$ref": "#/components/parameters/installation-id" + - "$ref": "#/components/parameters/repository-id" + responses: + '204': + description: Response + '403': + "$ref": "#/components/responses/forbidden" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: apps + subcategory: installations + "/user/issues": + get: + summary: List user account issues assigned to the authenticated user + description: |- + 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/enterprise-server@3.6/rest/reference/pulls#list-pull-requests)" endpoint. + tags: + - issues + operationId: issues/list-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/issues#list-user-account-issues-assigned-to-the-authenticated-user parameters: + - name: filter + description: Indicates which sorts of issues to return. `assigned` means issues + assigned to you. `created` means issues created by you. `mentioned` means + issues mentioning you. `subscribed` means issues you're subscribed to updates + for. `all` or `repos` means all issues you can see, regardless of participation + or creation. + in: query + required: false + schema: + type: string + enum: + - assigned + - created + - mentioned + - subscribed + - repos + - all + default: assigned + - name: state + description: Indicates the state of the issues to return. + in: query + required: false + schema: + type: string + enum: + - open + - closed + - all + default: open + - "$ref": "#/components/parameters/labels" + - name: sort + description: What to sort results by. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - comments + default: created + - "$ref": "#/components/parameters/direction" + - "$ref": "#/components/parameters/since" - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" responses: @@ -37055,58 +36110,37 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/organization-simple" + "$ref": "#/components/schemas/issue" examples: default: - "$ref": "#/components/examples/organization-simple-items" + "$ref": "#/components/examples/issue-with-repo-items" headers: Link: "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" '304': "$ref": "#/components/responses/not_modified" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: orgs - subcategory: - "/user/packages": + category: issues + subcategory: + "/user/keys": get: - summary: List packages for the authenticated user's namespace - description: |- - Lists packages owned by the authenticated user within the user's namespace. - - To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - If `package_type` is not `container`, your token must also include the `repo` scope. + summary: List public SSH keys for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - packages - operationId: packages/list-packages-for-authenticated-user + - users + operationId: users/list-public-ssh-keys-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#list-packages-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-public-ssh-keys-for-the-authenticated-user parameters: - - name: package_type - description: The type of supported package. Can be one of `npm`, `maven`, - `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle - registry have the type `maven`. Docker images pushed to GitHub's Container - registry (`ghcr.io`) have the type `container`. You can use the type `docker` - to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), - even if these have now been migrated to the Container registry. - in: query - required: true - schema: - type: string - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - - "$ref": "#/components/parameters/package-visibility" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -37115,68 +36149,108 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/package" + "$ref": "#/components/schemas/key" examples: default: - "$ref": "#/components/examples/packages-for-user" + "$ref": "#/components/examples/key-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - "/user/packages/{package_type}/{package_name}": - get: - summary: Get a package for the authenticated user - description: |- - 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. + category: users + subcategory: keys + post: + summary: Create a public SSH key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). + operationId: users/create-public-ssh-key-for-authenticated-user tags: - - packages - operationId: packages/get-package-for-authenticated-user + - users externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#create-a-public-ssh-key-for-the-authenticated-user + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + properties: + title: + description: A descriptive name for the new key. + type: string + example: Personal MacBook Air + key: + description: The public SSH key to add to your GitHub account. + type: string + pattern: "^ssh-(rsa|dss|ed25519) |^ecdsa-sha2-nistp(256|384|521) " + required: + - key + type: object responses: - '200': + '201': description: Response content: application/json: schema: - "$ref": "#/components/schemas/package" + "$ref": "#/components/schemas/key" examples: default: - "$ref": "#/components/examples/package-user" + "$ref": "#/components/examples/key" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete a package for the authenticated user - description: |- - Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. - If `package_type` is not `container`, your token must also include the `repo` scope. + category: users + subcategory: keys + "/user/keys/{key_id}": + get: + summary: Get a public SSH key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - packages - operationId: packages/delete-package-for-authenticated-user + - users + operationId: users/get-public-ssh-key-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#get-a-public-ssh-key-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" + - "$ref": "#/components/parameters/key-id" responses: - '204': + '200': description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/key" + examples: + default: + "$ref": "#/components/examples/key" '404': "$ref": "#/components/responses/not_found" + '304': + "$ref": "#/components/responses/not_modified" '403': "$ref": "#/components/responses/forbidden" '401': @@ -37184,37 +36258,26 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - "/user/packages/{package_type}/{package_name}/restore": - post: - summary: Restore a package for the authenticated user - description: |- - Restores a package owned by the authenticated user. - - You can restore a deleted package under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. + category: users + subcategory: keys + delete: + summary: Delete a public SSH key for the authenticated user + description: 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/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/). tags: - - packages - operationId: packages/restore-package-for-authenticated-user + - users + operationId: users/delete-public-ssh-key-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#delete-a-public-ssh-key-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - name: token - description: package token - schema: - type: string - required: false - in: query + - "$ref": "#/components/parameters/key-id" responses: '204': description: Response + '304': + "$ref": "#/components/responses/not_modified" '404': "$ref": "#/components/responses/not_found" '403': @@ -37224,37 +36287,31 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - "/user/packages/{package_type}/{package_name}/versions": + category: users + subcategory: keys + "/user/memberships/orgs": get: - summary: Get all package versions for a package owned by the authenticated user - description: |- - 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. + summary: List organization memberships for the authenticated user + description: '' tags: - - packages - operationId: packages/get-all-package-versions-for-package-owned-by-authenticated-user + - orgs + operationId: orgs/list-memberships-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organization-memberships-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/per-page" - name: state + description: Indicates the state of the memberships to return. If not specified, + the API returns both active and pending memberships. in: query required: false - description: The state of the package, either active or deleted. schema: type: string enum: - active - - deleted - default: active + - pending + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" responses: '200': description: Response @@ -37263,187 +36320,118 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/package-version" + "$ref": "#/components/schemas/org-membership" examples: default: - "$ref": "#/components/examples/package-versions-for-authenticated-user" - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/org-membership-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" '403': "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - "/user/packages/{package_type}/{package_name}/versions/{package_version_id}": + category: orgs + subcategory: members + "/user/memberships/orgs/{org}": get: - summary: Get a package version for the authenticated user - description: |- - 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. + summary: Get an organization membership for the authenticated user + description: '' tags: - - packages - operationId: packages/get-package-version-for-authenticated-user + - orgs + operationId: orgs/get-membership-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/package-version-id" + - "$ref": "#/components/parameters/org" responses: '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/package-version" + "$ref": "#/components/schemas/org-membership" examples: default: - "$ref": "#/components/examples/package-version-authenticated-user" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete a package version for the authenticated user - description: |- - Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - - To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the `packages:read` and `packages:delete` scopes. - If `package_type` is not `container`, your token must also include the `repo` scope. - tags: - - packages - operationId: packages/delete-package-version-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/package-version-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" + "$ref": "#/components/examples/org-membership" '403': "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": - post: - summary: Restore a package version for the authenticated user - description: |- - Restores a package version owned by the authenticated user. - - You can restore a deleted package version under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. If `package_type` is not `container`, your token must also include the `repo` scope. - tags: - - packages - operationId: packages/restore-package-version-for-authenticated-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/package-version-id" - responses: - '204': - description: Response '404': "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: packages - subcategory: - "/user/projects": - post: - summary: Create a user project + category: orgs + subcategory: members + patch: + summary: Update an organization membership for the authenticated user description: '' tags: - - projects - operationId: projects/create-for-authenticated-user + - orgs + operationId: orgs/update-membership-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#create-a-user-project - parameters: [] + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#update-an-organization-membership-for-the-authenticated-user + parameters: + - "$ref": "#/components/parameters/org" requestBody: required: true content: application/json: schema: + type: object properties: - name: - description: Name of the project - example: Week One Sprint - type: string - body: - description: Body of the project - example: This project represents the sprint of the first week in - January + state: type: string - nullable: true + description: The state that the membership should be in. Only `"active"` + will be accepted. + enum: + - active required: - - name - type: object + - state + examples: + default: + value: + state: active responses: - '201': + '200': description: Response content: application/json: schema: - "$ref": "#/components/schemas/project" + "$ref": "#/components/schemas/org-membership" examples: default: - "$ref": "#/components/examples/project" - '304': - "$ref": "#/components/responses/not_modified" + "$ref": "#/components/examples/org-membership-2" '403': "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - '415': - "$ref": "#/components/responses/preview_header_missing" + '404': + "$ref": "#/components/responses/not_found" '422': - "$ref": "#/components/responses/validation_failed_simple" + "$ref": "#/components/responses/validation_failed" x-github: githubCloudOnly: false - enabledForGitHubApps: true - category: projects - subcategory: - "/user/public_emails": + enabledForGitHubApps: false + category: orgs + subcategory: members + "/user/migrations": get: - summary: List public email addresses for the authenticated user - description: 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. + summary: List user migrations + description: Lists all migrations a user has started. tags: - - users - operationId: users/list-public-emails-for-authenticated-user + - migrations + operationId: migrations/list-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#list-user-migrations parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -37455,17 +36443,15 @@ paths: schema: type: array items: - "$ref": "#/components/schemas/email" + "$ref": "#/components/schemas/migration" examples: default: - "$ref": "#/components/examples/email-items-2" + "$ref": "#/components/examples/migration-items" headers: Link: "$ref": "#/components/headers/link" '304': "$ref": "#/components/responses/not_modified" - '404': - "$ref": "#/components/responses/not_found" '403': "$ref": "#/components/responses/forbidden" '401': @@ -37473,105 +36459,442 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: users - subcategory: emails - "/user/repos": - get: - summary: List repositories for the authenticated user - description: |- - 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. + category: migrations + subcategory: users + post: + summary: Start a user migration + description: Initiates the generation of a user migration archive. tags: - - repos - operationId: repos/list-for-authenticated-user + - migrations + operationId: migrations/start-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repositories-for-the-authenticated-user - parameters: - - name: visibility - description: 'Can be one of `all`, `public`, or `private`. Note: For GitHub - AE, can be one of `all`, `internal`, or `private`.' - in: query - required: false - schema: - type: string - enum: - - all - - public - - private - default: all - - name: affiliation - description: "Comma-separated list of values. Can include: \n\\* `owner`: - Repositories that are owned by the authenticated user. \n\\* `collaborator`: - Repositories that the user has been added to as a collaborator. \n\\* `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." - in: query - required: false - schema: - type: string - default: owner,collaborator,organization_member - - name: type - description: "Can be one of `all`, `owner`, `public`, `private`, `member`. - Note: For GitHub AE, can be one of `all`, `owner`, `internal`, `private`, - `member`. Default: `all` \n \nWill 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**." - in: query - required: false - schema: - type: string - enum: - - all - - owner - - public - - private - - member - default: all - - name: sort - description: Can be one of `created`, `updated`, `pushed`, `full_name`. - in: query - required: false - schema: - type: string - enum: - - created - - updated - - pushed - - full_name - default: full_name - - name: direction - description: 'Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, - otherwise `desc`' - in: query - required: false - schema: - type: string - enum: - - asc - - desc - - "$ref": "#/components/parameters/per-page" - - "$ref": "#/components/parameters/page" - - "$ref": "#/components/parameters/since" - - "$ref": "#/components/parameters/before" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/repository" - examples: - default: - "$ref": "#/components/examples/repository-items-default-response" - '422': - "$ref": "#/components/responses/validation_failed" - '304': - "$ref": "#/components/responses/not_modified" - '403': + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#start-a-user-migration + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + properties: + lock_repositories: + description: Lock the repositories being migrated at the start of + the migration + example: true + readOnly: false + type: boolean + exclude_metadata: + description: Indicates whether metadata should be excluded and only + git source should be included for the migration. + example: true + readOnly: false + type: boolean + exclude_git_data: + description: Indicates whether the repository git data should be + excluded from the migration. + example: true + readOnly: false + type: boolean + exclude_attachments: + description: Do not include attachments in the migration + example: true + readOnly: false + type: boolean + exclude_releases: + description: Do not include releases in the migration + example: true + readOnly: false + type: boolean + exclude_owner_projects: + description: Indicates whether projects owned by the organization + or users should be excluded. + example: true + readOnly: false + type: boolean + org_metadata_only: + type: boolean + example: true + description: Indicates whether this should only include organization + metadata (repositories array should be empty and will ignore other + flags). + default: false + exclude: + description: Exclude attributes from the API response to improve + performance + example: + - repositories + readOnly: false + type: array + items: + description: Allowed values that can be passed to the exclude + param. + enum: + - repositories + example: repositories + type: string + repositories: + type: array + items: + description: Repository path, owner and name + example: acme/widgets + type: string + required: + - repositories + type: object + examples: + default: + value: + repositories: + - octocat/Hello-World + lock_repositories: true + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/migration" + examples: + default: + "$ref": "#/components/examples/migration-2" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: migrations + subcategory: users + "/user/migrations/{migration_id}/archive": + get: + summary: Download a user migration archive + description: |- + 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. + tags: + - migrations + operationId: migrations/get-archive-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#download-a-user-migration-archive + parameters: + - "$ref": "#/components/parameters/migration-id" + responses: + '302': + description: Response + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: migrations + subcategory: users + "/user/migrations/{migration_id}/repositories": + get: + summary: List repositories for a user migration + description: Lists all the repositories for this user migration. + tags: + - migrations + operationId: migrations/list-repos-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/migrations#list-repositories-for-a-user-migration + parameters: + - "$ref": "#/components/parameters/migration-id" + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/minimal-repository" + examples: + default: + "$ref": "#/components/examples/minimal-repository-items" + headers: + Link: + "$ref": "#/components/headers/link" + '404': + "$ref": "#/components/responses/not_found" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: migrations + subcategory: users + "/user/orgs": + get: + summary: List organizations for the authenticated user + description: |- + 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. + tags: + - orgs + operationId: orgs/list-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user + parameters: + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/organization-simple" + examples: + default: + "$ref": "#/components/examples/organization-simple-items" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: orgs + subcategory: + "/user/projects": + post: + summary: Create a user project + description: Creates a user project board. Returns a `410 Gone` status if the + user does not have existing classic projects. If you do not have sufficient + privileges to perform this action, a `401 Unauthorized` or `410 Gone` status + is returned. + tags: + - projects + operationId: projects/create-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#create-a-user-project + parameters: [] + requestBody: + required: true + content: + application/json: + schema: + properties: + name: + description: Name of the project + example: Week One Sprint + type: string + body: + description: Body of the project + example: This project represents the sprint of the first week in + January + type: string + nullable: true + required: + - name + type: object + examples: + default: + summary: Create a new project + value: + name: My Projects + body: A board to manage my personal projects. + responses: + '201': + description: Response + content: + application/json: + schema: + "$ref": "#/components/schemas/project" + examples: + default: + "$ref": "#/components/examples/project" + '304': + "$ref": "#/components/responses/not_modified" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + '422': + "$ref": "#/components/responses/validation_failed_simple" + x-github: + githubCloudOnly: false + enabledForGitHubApps: true + category: projects + subcategory: + "/user/public_emails": + get: + summary: List public email addresses for the authenticated user + description: Lists your publicly visible email address, which you can set with + the [Set primary email visibility for the authenticated user](https://docs.github.com/enterprise-server@3.6/rest/reference/users#set-primary-email-visibility-for-the-authenticated-user) + endpoint. This endpoint is accessible with the `user:email` scope. + tags: + - users + operationId: users/list-public-emails-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-public-email-addresses-for-the-authenticated-user + parameters: + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/email" + examples: + default: + "$ref": "#/components/examples/email-items-2" + headers: + Link: + "$ref": "#/components/headers/link" + '304': + "$ref": "#/components/responses/not_modified" + '404': + "$ref": "#/components/responses/not_found" + '403': + "$ref": "#/components/responses/forbidden" + '401': + "$ref": "#/components/responses/requires_authentication" + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: users + subcategory: emails + "/user/repos": + get: + summary: List repositories for the authenticated user + description: |- + 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. + tags: + - repos + operationId: repos/list-for-authenticated-user + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repositories-for-the-authenticated-user + parameters: + - name: visibility + description: Limit results to repositories with the specified visibility. + in: query + required: false + schema: + type: string + enum: + - all + - public + - private + default: all + - name: affiliation + description: "Comma-separated list of values. Can include: \n\\* `owner`: + Repositories that are owned by the authenticated user. \n\\* `collaborator`: + Repositories that the user has been added to as a collaborator. \n\\* `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." + in: query + required: false + schema: + type: string + default: owner,collaborator,organization_member + - name: type + description: Limit results to repositories of the specified type. Will cause + a `422` error if used in the same request as **visibility** or **affiliation**. + in: query + required: false + schema: + type: string + enum: + - all + - owner + - public + - private + - member + default: all + - name: sort + description: The property to sort the results by. + in: query + required: false + schema: + type: string + enum: + - created + - updated + - pushed + - full_name + default: full_name + - name: direction + description: 'The order to sort by. Default: `asc` when using `full_name`, + otherwise `desc`.' + in: query + required: false + schema: + type: string + enum: + - asc + - desc + - "$ref": "#/components/parameters/per-page" + - "$ref": "#/components/parameters/page" + - "$ref": "#/components/parameters/since" + - "$ref": "#/components/parameters/before" + responses: + '200': + description: Response + content: + application/json: + schema: + type: array + items: + "$ref": "#/components/schemas/repository" + examples: + default: + "$ref": "#/components/examples/repository-items-default-response" + '422': + "$ref": "#/components/responses/validation_failed" + '304': + "$ref": "#/components/responses/not_modified" + '403': "$ref": "#/components/responses/forbidden" '401': "$ref": "#/components/responses/requires_authentication" @@ -37579,7 +36902,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: repos - subcategory: + subcategory: post: summary: Create a repository for the authenticated user description: |- @@ -37587,7 +36910,7 @@ paths: **OAuth scope requirements** - When using [OAuth](https://docs.github.com/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: + When using [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include: * `public_repo` scope or `repo` scope to create a public repository. Note: For GitHub AE, use `repo` scope to create an internal repository. * `repo` scope to create a private repository. @@ -37596,7 +36919,7 @@ paths: operationId: repos/create-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#create-a-repository-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#create-a-repository-for-the-authenticated-user parameters: [] requestBody: required: true @@ -37678,6 +37001,50 @@ paths: default: false type: boolean example: false + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. has_downloads: description: Whether downloads are enabled. default: true @@ -37723,7 +37090,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: repos - subcategory: + subcategory: "/user/repository_invitations": get: summary: List repository invitations for the authenticated user @@ -37734,7 +37101,7 @@ paths: operationId: repos/list-invitations-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repository-invitations-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#list-repository-invitations-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -37764,7 +37131,7 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: repos + category: collaborators subcategory: invitations "/user/repository_invitations/{invitation_id}": patch: @@ -37775,7 +37142,7 @@ paths: operationId: repos/accept-invitation-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#accept-a-repository-invitation + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#accept-a-repository-invitation parameters: - "$ref": "#/components/parameters/invitation-id" responses: @@ -37792,7 +37159,7 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: repos + category: collaborators subcategory: invitations delete: summary: Decline a repository invitation @@ -37802,7 +37169,7 @@ paths: operationId: repos/decline-invitation-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#decline-a-repository-invitation + url: https://docs.github.com/enterprise-server@3.6/rest/collaborators/invitations#decline-a-repository-invitation parameters: - "$ref": "#/components/parameters/invitation-id" responses: @@ -37819,7 +37186,7 @@ paths: x-github: githubCloudOnly: false enabledForGitHubApps: false - category: repos + category: collaborators subcategory: invitations "/user/starred": get: @@ -37827,13 +37194,13 @@ paths: description: |- 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: + You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. tags: - activity operationId: activity/list-repos-starred-by-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repositories-starred-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repositories-starred-by-the-authenticated-user parameters: - "$ref": "#/components/parameters/sort" - "$ref": "#/components/parameters/direction" @@ -37882,7 +37249,7 @@ paths: operationId: activity/check-repo-is-starred-by-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#check-if-a-repository-is-starred-by-the-authenticated-user parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -37909,13 +37276,13 @@ paths: put: summary: Star a repository for the authenticated user description: 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)." + out to this endpoint. For more information, see "[HTTP verbs](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." tags: - activity operationId: activity/star-repo-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#star-a-repository-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#star-a-repository-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -37943,7 +37310,7 @@ paths: operationId: activity/unstar-repo-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#unstar-a-repository-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#unstar-a-repository-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/owner" - "$ref": "#/components/parameters/repo" @@ -37972,7 +37339,7 @@ paths: operationId: activity/list-watched-repos-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repositories-watched-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repositories-watched-by-the-authenticated-user parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -38007,14 +37374,14 @@ paths: summary: List teams for the authenticated user description: 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/). + [scope](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/) + when authenticating via [OAuth](https://docs.github.com/enterprise-server@3.6/apps/building-oauth-apps/). tags: - teams operationId: teams/list-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/teams#list-teams-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/teams#list-teams-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/per-page" - "$ref": "#/components/parameters/page" @@ -38043,20 +37410,20 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: teams - subcategory: + subcategory: "/users": get: summary: List users description: |- - Lists all users, in the order that they signed up on GitHub. This list includes personal user accounts and organization accounts. + Lists all users, in the order that they signed up on GitHub Enterprise Server. 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. + Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header) to get the URL for the next page of users. tags: - users operationId: users/list externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-users + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-users parameters: - "$ref": "#/components/parameters/since-user" - "$ref": "#/components/parameters/per-page" @@ -38083,24 +37450,24 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: users - subcategory: + subcategory: "/users/{username}": get: summary: Get a user description: |- 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" + GitHub Apps with the `Plan` user permission can use this endpoint to retrieve information about a user's GitHub Enterprise Server plan. The GitHub App must be authenticated as a user. See "[Identifying and authorizing users for GitHub Apps](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)" for details about authentication. For an example response, see 'Response with GitHub Enterprise Server 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 `email` key in the following response is the publicly visible email address from your GitHub Enterprise Server [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 Enterprise Server. For more information, see [Authentication](https://docs.github.com/enterprise-server@3.6/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)". + 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/enterprise-server@3.6/rest/reference/users#emails)". tags: - users operationId: users/get-by-username externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#get-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#get-a-user parameters: - "$ref": "#/components/parameters/username" responses: @@ -38123,7 +37490,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: users - subcategory: + subcategory: "/users/{username}/events": get: summary: List events for the authenticated user @@ -38134,7 +37501,7 @@ paths: operationId: activity/list-events-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-events-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-events-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38148,6 +37515,9 @@ paths: type: array items: "$ref": "#/components/schemas/event" + examples: + default: + "$ref": "#/components/examples/user-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -38163,7 +37533,7 @@ paths: operationId: activity/list-org-events-for-authenticated-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-organization-events-for-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-organization-events-for-the-authenticated-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/org" @@ -38178,6 +37548,9 @@ paths: type: array items: "$ref": "#/components/schemas/event" + examples: + default: + "$ref": "#/components/examples/user-org-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: false @@ -38192,7 +37565,7 @@ paths: operationId: activity/list-public-events-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-public-events-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-public-events-for-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38206,6 +37579,9 @@ paths: type: array items: "$ref": "#/components/schemas/event" + examples: + default: + "$ref": "#/components/examples/user-public-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -38220,7 +37596,7 @@ paths: operationId: users/list-followers-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-followers-of-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-followers-of-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38254,7 +37630,7 @@ paths: operationId: users/list-following-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-the-people-a-user-follows + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-the-people-a-user-follows parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38288,7 +37664,7 @@ paths: operationId: users/check-following-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#check-if-a-user-follows-another-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#check-if-a-user-follows-another-user parameters: - "$ref": "#/components/parameters/username" - name: target_user @@ -38315,7 +37691,7 @@ paths: operationId: gists/list-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/gists#list-gists-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/gists#list-gists-for-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/since" @@ -38342,7 +37718,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: gists - subcategory: + subcategory: "/users/{username}/gpg_keys": get: summary: List GPG keys for a user @@ -38353,7 +37729,7 @@ paths: operationId: users/list-gpg-keys-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-gpg-keys-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-gpg-keys-for-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38395,7 +37771,7 @@ paths: operationId: users/get-context-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#get-contextual-information-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#get-contextual-information-for-a-user parameters: - "$ref": "#/components/parameters/username" - name: subject_type @@ -38436,20 +37812,20 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: users - subcategory: + subcategory: "/users/{username}/installation": get: summary: Get a user installation for the authenticated app description: |- 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. + You must use a [JWT](https://docs.github.com/enterprise-server@3.6/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. tags: - apps operationId: apps/get-user-installation externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/apps#get-a-user-installation-for-the-authenticated-app + url: https://docs.github.com/enterprise-server@3.6/rest/reference/apps#get-a-user-installation-for-the-authenticated-app parameters: - "$ref": "#/components/parameters/username" responses: @@ -38466,7 +37842,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: apps - subcategory: + subcategory: "/users/{username}/keys": get: summary: List public keys for a user @@ -38477,7 +37853,7 @@ paths: operationId: users/list-public-keys-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/users#list-public-keys-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/users#list-public-keys-for-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38508,13 +37884,13 @@ paths: description: |- List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user. - This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. + 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/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead. tags: - orgs operationId: orgs/list-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/orgs#list-organizations-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/orgs#list-organizations-for-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38538,317 +37914,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: orgs - subcategory: - "/users/{username}/packages": - get: - summary: List packages for a user - description: |- - Lists all packages in a user's namespace for which the requesting user has access. - - To use this endpoint, you must authenticate using an access token with the `packages:read` scope. - If `package_type` is not `container`, your token must also include the `repo` scope. - tags: - - packages - operationId: packages/list-packages-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#list-packages-for-user - parameters: - - name: package_type - description: The type of supported package. Can be one of `npm`, `maven`, - `rubygems`, `nuget`, `docker`, or `container`. Packages in GitHub's Gradle - registry have the type `maven`. Docker images pushed to GitHub's Container - registry (`ghcr.io`) have the type `container`. You can use the type `docker` - to find images that were pushed to GitHub's Docker registry (`docker.pkg.github.com`), - even if these have now been migrated to the Container registry. - in: query - required: true - schema: - type: string - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - - "$ref": "#/components/parameters/package-visibility" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/package" - examples: - default: - "$ref": "#/components/examples/packages-for-user" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/users/{username}/packages/{package_type}/{package_name}": - get: - summary: Get a package for a user - description: |- - 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. - tags: - - packages - operationId: packages/get-package-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/package" - examples: - default: - "$ref": "#/components/examples/package-user" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete a package for a user - description: |- - Deletes an entire package for a user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - tags: - - packages - operationId: packages/delete-package-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/users/{username}/packages/{package_type}/{package_name}/restore": - post: - summary: Restore a package for a user - description: |- - Restores an entire package for a user. - - You can restore a deleted package under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - tags: - - packages - operationId: packages/restore-package-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - - name: token - description: package token - schema: - type: string - required: false - in: query - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/users/{username}/packages/{package_type}/{package_name}/versions": - get: - summary: Get all package versions for a package owned by a user - description: |- - 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. - tags: - - packages - operationId: packages/get-all-package-versions-for-package-owned-by-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - type: array - items: - "$ref": "#/components/schemas/package-version" - examples: - default: - "$ref": "#/components/examples/package-versions-for-user" - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}": - get: - summary: Get a package version for a user - description: |- - 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. - tags: - - packages - operationId: packages/get-package-version-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/package-version-id" - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/package-version" - examples: - default: - "$ref": "#/components/examples/package-version-user" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - delete: - summary: Delete package version for a user - description: |- - Deletes a specific package version for a user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:delete` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container you want to delete. - tags: - - packages - operationId: packages/delete-package-version-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#delete-a-package-version-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - - "$ref": "#/components/parameters/package-version-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: - "/users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore": - post: - summary: Restore package version for a user - description: |- - Restores a specific package version for a user. - - You can restore a deleted package under the following conditions: - - The package was deleted within the last 30 days. - - The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package's namespace first. - - To use this endpoint, you must authenticate using an access token with the `packages:read` and `packages:write` scopes. In addition: - - If `package_type` is not `container`, your token must also include the `repo` scope. - - If `package_type` is `container`, you must also have admin permissions to the container that you want to restore. - tags: - - packages - operationId: packages/restore-package-version-for-user - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/packages#restore-a-package-version-for-a-user - parameters: - - "$ref": "#/components/parameters/package-type" - - "$ref": "#/components/parameters/package-name" - - "$ref": "#/components/parameters/username" - - "$ref": "#/components/parameters/package-version-id" - responses: - '204': - description: Response - '404': - "$ref": "#/components/responses/not_found" - '403': - "$ref": "#/components/responses/forbidden" - '401': - "$ref": "#/components/responses/requires_authentication" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: packages - subcategory: + subcategory: "/users/{username}/projects": get: summary: List user projects @@ -38858,12 +37924,11 @@ paths: operationId: projects/list-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/projects#list-user-projects + url: https://docs.github.com/enterprise-server@3.6/rest/reference/projects#list-user-projects parameters: - "$ref": "#/components/parameters/username" - name: state - description: Indicates the state of the projects to return. Can be either - `open`, `closed`, or `all`. + description: Indicates the state of the projects to return. in: query required: false schema: @@ -38896,7 +37961,7 @@ paths: githubCloudOnly: false enabledForGitHubApps: false category: projects - subcategory: + subcategory: "/users/{username}/received_events": get: summary: List events received by the authenticated user @@ -38908,7 +37973,7 @@ paths: operationId: activity/list-received-events-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-events-received-by-the-authenticated-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-events-received-by-the-authenticated-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38922,6 +37987,9 @@ paths: type: array items: "$ref": "#/components/schemas/event" + examples: + default: + "$ref": "#/components/examples/user-received-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -38936,7 +38004,7 @@ paths: operationId: activity/list-received-public-events-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-public-events-received-by-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-public-events-received-by-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -38950,6 +38018,9 @@ paths: type: array items: "$ref": "#/components/schemas/event" + examples: + default: + "$ref": "#/components/examples/user-received-public-events-items" x-github: githubCloudOnly: false enabledForGitHubApps: true @@ -38965,11 +38036,11 @@ paths: operationId: repos/list-for-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/repos#list-repositories-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/repos#list-repositories-for-a-user parameters: - "$ref": "#/components/parameters/username" - name: type - description: Can be one of `all`, `owner`, `member`. + description: Limit results to repositories of the specified type. in: query required: false schema: @@ -38980,7 +38051,7 @@ paths: - member default: owner - name: sort - description: Can be one of `created`, `updated`, `pushed`, `full_name`. + description: The property to sort the results by. in: query required: false schema: @@ -38992,8 +38063,8 @@ paths: - full_name default: full_name - name: direction - description: 'Can be one of `asc` or `desc`. Default: `asc` when using `full_name`, - otherwise `desc`' + description: 'The order to sort by. Default: `asc` when using `full_name`, + otherwise `desc`.' in: query required: false schema: @@ -39022,116 +38093,60 @@ paths: githubCloudOnly: false enabledForGitHubApps: true category: repos - subcategory: - "/users/{username}/settings/billing/actions": - get: - summary: Get GitHub Actions billing for a user - description: |- - Gets the summary of the free and paid GitHub Actions minutes used. - - Paid minutes only apply to workflows in private repositories that use GitHub-hosted runners. Minutes used is listed for each GitHub-hosted runner operating system. Any job re-runs are also included in the usage. The usage returned includes any minute multipliers for macOS and Windows runners, and is rounded up to the nearest whole minute. For more information, see "[Managing billing for GitHub Actions](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-actions)". - - Access tokens must have the `user` scope. - operationId: billing/get-github-actions-billing-user - tags: - - billing - externalDocs: - description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-actions-billing-for-a-user - parameters: - - "$ref": "#/components/parameters/username" - responses: - '200': - description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/actions-billing-usage" - examples: - default: - "$ref": "#/components/examples/actions-billing-usage" - x-github: - githubCloudOnly: false - enabledForGitHubApps: false - category: billing - subcategory: - "/users/{username}/settings/billing/packages": - get: - summary: Get GitHub Packages billing for a user - description: |- - Gets the free and paid storage used for GitHub Packages in gigabytes. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - - Access tokens must have the `user` scope. - operationId: billing/get-github-packages-billing-user + subcategory: + "/users/{username}/site_admin": + put: + summary: Promote a user to be a site administrator + description: 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + operationId: enterprise-admin/promote-user-to-be-site-administrator tags: - - billing + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-github-packages-billing-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#promote-a-user-to-be-a-site-administrator parameters: - "$ref": "#/components/parameters/username" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/packages-billing-usage" - examples: - default: - "$ref": "#/components/examples/packages-billing-usage" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: billing - subcategory: - "/users/{username}/settings/billing/shared-storage": - get: - summary: Get shared storage billing for a user - description: |- - Gets the estimated paid and estimated total storage used for GitHub Actions and Github Packages. - - Paid minutes only apply to packages stored for private repositories. For more information, see "[Managing billing for GitHub Packages](https://docs.github.com/github/setting-up-and-managing-billing-and-payments-on-github/managing-billing-for-github-packages)." - - Access tokens must have the `user` scope. - operationId: billing/get-shared-storage-billing-user + category: enterprise-admin + subcategory: users + delete: + summary: Demote a site administrator + description: You can demote any user account except your own. + operationId: enterprise-admin/demote-site-administrator tags: - - billing + - enterprise-admin externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/billing#get-shared-storage-billing-for-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#demote-a-site-administrator parameters: - "$ref": "#/components/parameters/username" responses: - '200': + '204': description: Response - content: - application/json: - schema: - "$ref": "#/components/schemas/combined-billing-usage" - examples: - default: - "$ref": "#/components/examples/combined-billing-usage" x-github: githubCloudOnly: false enabledForGitHubApps: false - category: billing - subcategory: + category: enterprise-admin + subcategory: users "/users/{username}/starred": get: summary: List repositories starred by a user description: |- 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: + You can also find out _when_ stars were created by passing the following custom [media type](https://docs.github.com/enterprise-server@3.6/rest/overview/media-types/) via the `Accept` header: `application/vnd.github.star+json`. tags: - activity operationId: activity/list-repos-starred-by-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repositories-starred-by-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repositories-starred-by-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/sort" @@ -39171,7 +38186,7 @@ paths: operationId: activity/list-repos-watched-by-user externalDocs: description: API method documentation - url: https://docs.github.com/rest/reference/activity#list-repositories-watched-by-a-user + url: https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-repositories-watched-by-a-user parameters: - "$ref": "#/components/parameters/username" - "$ref": "#/components/parameters/per-page" @@ -39196,6 +38211,81 @@ paths: enabledForGitHubApps: true category: activity subcategory: watching + "/users/{username}/suspended": + put: + summary: Suspend a user + description: |- + If your GitHub instance uses [LDAP Sync with Active Directory LDAP servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), Active Directory LDAP-authenticated users cannot be suspended through this API. If you attempt to suspend an Active Directory LDAP-authenticated user through this API, it will return a `403` response. + + You can suspend any user account except your own. + + 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/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#http-verbs)." + operationId: enterprise-admin/suspend-user + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#suspend-a-user + parameters: + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + requestBody: + content: + application/json: + schema: + type: object + nullable: true + properties: + reason: + type: string + description: The reason the user is being suspended. This message + will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). + If you don't provide a `reason`, it will default to "Suspended + via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ + is the person who performed the action. + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users + delete: + summary: Unsuspend a user + description: If your GitHub instance uses [LDAP Sync with Active Directory LDAP + servers](https://docs.github.com/enterprise-server@3.6/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap), + this API is disabled and will return a `403` response. Active Directory LDAP-authenticated + users cannot be unsuspended using the API. + operationId: enterprise-admin/unsuspend-user + tags: + - enterprise-admin + externalDocs: + description: API method documentation + url: https://docs.github.com/enterprise-server@3.6/rest/reference/enterprise-admin#unsuspend-a-user + parameters: + - "$ref": "#/components/parameters/username" + responses: + '204': + description: Response + requestBody: + content: + application/json: + schema: + type: object + nullable: true + properties: + reason: + type: string + description: The reason the user is being unsuspended. This message + will be logged in the [audit log](https://docs.github.com/enterprise-server@3.6/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise). + If you don't provide a `reason`, it will default to "Unsuspended + via API by _SITE\_ADMINISTRATOR_", where _SITE\_ADMINISTRATOR_ + is the person who performed the action. + x-github: + githubCloudOnly: false + enabledForGitHubApps: false + category: enterprise-admin + subcategory: users "/zen": get: summary: Get the Zen of GitHub @@ -39210,22 +38300,288 @@ paths: text/plain: schema: type: string + examples: + default: + summary: Example response + value: Responsive is better than fast x-github: githubCloudOnly: false enabledForGitHubApps: true category: meta components: schemas: - nullable-simple-user: - title: Simple User - description: Simple User + root: + type: object + properties: + current_user_url: + type: string + format: uri-template + current_user_authorizations_html_url: + type: string + format: uri-template + authorizations_url: + type: string + format: uri-template + code_search_url: + type: string + format: uri-template + commit_search_url: + type: string + format: uri-template + emails_url: + type: string + format: uri-template + emojis_url: + type: string + format: uri-template + events_url: + type: string + format: uri-template + feeds_url: + type: string + format: uri-template + followers_url: + type: string + format: uri-template + following_url: + type: string + format: uri-template + gists_url: + type: string + format: uri-template + hub_url: + type: string + format: uri-template + issue_search_url: + type: string + format: uri-template + issues_url: + type: string + format: uri-template + keys_url: + type: string + format: uri-template + label_search_url: + type: string + format: uri-template + notifications_url: + type: string + format: uri-template + organization_url: + type: string + format: uri-template + organization_repositories_url: + type: string + format: uri-template + organization_teams_url: + type: string + format: uri-template + public_gists_url: + type: string + format: uri-template + rate_limit_url: + type: string + format: uri-template + repository_url: + type: string + format: uri-template + repository_search_url: + type: string + format: uri-template + current_user_repositories_url: + type: string + format: uri-template + starred_url: + type: string + format: uri-template + starred_gists_url: + type: string + format: uri-template + topic_search_url: + type: string + format: uri-template + user_url: + type: string + format: uri-template + user_organizations_url: + type: string + format: uri-template + user_repositories_url: + type: string + format: uri-template + user_search_url: + type: string + format: uri-template + required: + - current_user_url + - current_user_authorizations_html_url + - authorizations_url + - code_search_url + - commit_search_url + - emails_url + - emojis_url + - events_url + - feeds_url + - followers_url + - following_url + - gists_url + - hub_url + - issue_search_url + - issues_url + - keys_url + - label_search_url + - notifications_url + - organization_url + - organization_repositories_url + - organization_teams_url + - public_gists_url + - rate_limit_url + - repository_url + - repository_search_url + - current_user_repositories_url + - starred_url + - starred_gists_url + - user_url + - user_organizations_url + - user_repositories_url + - user_search_url + global-hook: + type: object + properties: + type: + type: string + id: + type: integer + name: + type: string + active: + type: boolean + events: + type: array + items: + type: string + config: + type: object + properties: + url: + type: string + content_type: + type: string + insecure_ssl: + type: string + secret: + type: string + updated_at: + type: string + created_at: + type: string + url: + type: string + ping_url: + type: string + global-hook-2: type: object properties: + type: + type: string + id: + type: integer name: + type: string + active: + type: boolean + events: + type: array + items: + type: string + config: + type: object + properties: + url: + type: string + content_type: + type: string + insecure_ssl: + type: string + updated_at: + type: string + created_at: + type: string + url: + type: string + ping_url: + type: string + public-key-full: + type: object + properties: + id: + type: integer + key: + type: string + user_id: nullable: true + type: integer + repository_id: + nullable: true + type: integer + url: type: string - email: + title: + type: string + read_only: + type: boolean + verified: + type: boolean + created_at: + type: string + format: date-time + required: + - id + - key + - url + - title + - verified + - created_at + - read_only + - last_used + - user_id + - repository_id + ldap-mapping-team: + type: object + properties: + ldap_dn: + type: string + id: + type: integer + node_id: + type: string + url: + type: string + html_url: + type: string + name: + type: string + slug: + type: string + description: + type: string + nullable: true + privacy: + type: string + permission: + type: string + members_url: + type: string + repositories_url: + type: string + parent: nullable: true + ldap-mapping-user: + title: Ldap Private User + description: Ldap Private User + type: object + properties: + ldap_dn: type: string login: type: string @@ -39289,459 +38645,322 @@ components: example: User site_admin: type: boolean - starred_at: + name: type: string - example: '"2020-07-09T00:17:55Z"' - required: - - avatar_url - - events_url - - followers_url - - following_url - - gists_url - - gravatar_id - - html_url - - id - - node_id - - login - - organizations_url - - received_events_url - - repos_url - - site_admin - - starred_url - - subscriptions_url - - type - - url - nullable: true - integration: - title: GitHub app - description: GitHub apps are a new way to extend GitHub. They can be installed - directly on organizations and user accounts and granted access to specific - repositories. They come with granular permissions and built-in webhooks. GitHub - apps are first class actors within GitHub. - type: object - properties: - id: - description: Unique identifier of the GitHub app - example: 37 - type: integer - slug: - description: The slug name of the GitHub app - example: probot-owners + example: monalisa octocat + nullable: true + company: type: string - node_id: + example: GitHub + nullable: true + blog: type: string - example: MDExOkludGVncmF0aW9uMQ== - owner: - "$ref": "#/components/schemas/nullable-simple-user" - name: - description: The name of the GitHub app - example: Probot Owners + example: https://github.com/blog + nullable: true + location: type: string - description: + example: San Francisco + nullable: true + email: type: string - example: The description of the app. + format: email + example: octocat@github.com nullable: true - external_url: + hireable: + type: boolean + nullable: true + bio: type: string - format: uri - example: https://example.com - html_url: + example: There once was... + nullable: true + twitter_username: type: string - format: uri - example: https://github.com/apps/super-ci + example: monalisa + nullable: true + public_repos: + type: integer + example: 2 + public_gists: + type: integer + example: 1 + followers: + type: integer + example: 20 + following: + type: integer + example: 0 created_at: type: string format: date-time - example: '2017-07-08T16:18:44-04:00' + example: '2008-01-14T04:33:35Z' updated_at: type: string format: date-time - example: '2017-07-08T16:18:44-04:00' - permissions: - description: The set of permissions for the GitHub app + example: '2008-01-14T04:33:35Z' + private_gists: + type: integer + example: 81 + total_private_repos: + type: integer + example: 100 + owned_private_repos: + type: integer + example: 100 + disk_usage: + type: integer + example: 10000 + collaborators: + type: integer + example: 8 + two_factor_authentication: + type: boolean + example: true + plan: type: object properties: - issues: - type: string - checks: - type: string - metadata: - type: string - contents: - type: string - deployments: + collaborators: + type: integer + name: type: string - additionalProperties: - type: string - example: - issues: read - deployments: write - events: - description: The list of events for the GitHub app - example: - - label - - deployment - type: array - items: - type: string - installations_count: - description: The number of installations associated with the GitHub app - example: 5 - type: integer - client_id: - type: string - example: '"Iv1.25b5d1e65ffc4022"' - client_secret: - type: string - example: '"1d4b2097ac622ba702d19de498f005747a8b21d3"' - webhook_secret: + space: + type: integer + private_repos: + type: integer + required: + - collaborators + - name + - space + - private_repos + suspended_at: type: string - example: '"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' + format: date-time nullable: true - pem: - type: string - example: '"-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END - RSA PRIVATE KEY-----\n"' + business_plus: + type: boolean required: + - avatar_url + - events_url + - followers_url + - following_url + - gists_url + - gravatar_id + - html_url - id - node_id - - owner + - login + - organizations_url + - received_events_url + - repos_url + - site_admin + - starred_url + - subscriptions_url + - type + - url + - bio + - blog + - company + - email + - followers + - following + - hireable + - location - name - - description - - external_url - - html_url + - public_gists + - public_repos - created_at - updated_at - - permissions - - events - basic-error: - title: Basic Error - description: Basic Error + - collaborators + - disk_usage + - owned_private_repos + - private_gists + - total_private_repos + - two_factor_authentication + organization-simple: + title: Organization Simple + description: Organization Simple type: object properties: - message: + login: type: string - documentation_url: + example: github + id: + type: integer + example: 1 + node_id: type: string + example: MDEyOk9yZ2FuaXphdGlvbjE= url: type: string - status: + format: uri + example: https://api.github.com/orgs/github + repos_url: type: string - validation-error-simple: - title: Validation Error Simple - description: Validation Error Simple - type: object - required: - - message - - documentation_url - properties: - message: + format: uri + example: https://api.github.com/orgs/github/repos + events_url: type: string - documentation_url: + format: uri + example: https://api.github.com/orgs/github/events + hooks_url: type: string - errors: - type: array - items: - type: string - webhook-config-url: - type: string - description: The URL to which the payloads will be delivered. - example: https://example.com/webhook - format: uri - webhook-config-content-type: - type: string - description: The media type used to serialize the payloads. Supported values - include `json` and `form`. The default is `form`. - example: '"json"' - webhook-config-secret: - type: string - description: If provided, the `secret` will be used as the `key` to generate - the HMAC hex digest value for [delivery signature headers](https://docs.github.com/webhooks/event-payloads/#delivery-headers). - example: '"********"' - webhook-config-insecure-ssl: - oneOf: - - type: string - description: 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.** - example: '"0"' - - type: number - webhook-config: - title: Webhook Configuration - description: Configuration object of the webhook - type: object - properties: - url: - "$ref": "#/components/schemas/webhook-config-url" - content_type: - "$ref": "#/components/schemas/webhook-config-content-type" - secret: - "$ref": "#/components/schemas/webhook-config-secret" - insecure_ssl: - "$ref": "#/components/schemas/webhook-config-insecure-ssl" - hook-delivery-item: - title: Simple webhook delivery - description: Delivery made by a webhook, without request and response information. + example: https://api.github.com/orgs/github/hooks + issues_url: + type: string + example: https://api.github.com/orgs/github/issues + members_url: + type: string + example: https://api.github.com/orgs/github/members{/member} + public_members_url: + type: string + example: https://api.github.com/orgs/github/public_members{/member} + avatar_url: + type: string + example: https://github.com/images/error/octocat_happy.gif + description: + type: string + example: A great organization + nullable: true + required: + - login + - url + - id + - node_id + - repos_url + - events_url + - hooks_url + - issues_url + - members_url + - public_members_url + - avatar_url + - description + pre-receive-environment: type: object properties: id: - description: Unique identifier of the webhook delivery. type: integer - example: 42 - guid: - description: Unique identifier for the event (shared with all deliveries - for all webhooks that subscribe to this event). + name: type: string - example: 58474f00-b361-11eb-836d-0e4f3503ccbe - delivered_at: - description: Time when the webhook delivery occurred. + image_url: type: string - format: date-time - example: '2021-05-12T20:33:44Z' - redelivery: - description: Whether the webhook delivery is a redelivery. - type: boolean - example: false - duration: - description: Time spent delivering. - type: number - example: 0.03 - status: - description: Describes the response returned after attempting the delivery. + url: type: string - example: failed to connect - status_code: - description: Status code received when delivery was made. - type: integer - example: 502 - event: - description: The event that triggered the delivery. + html_url: type: string - example: issues - action: - description: The type of activity for the event that triggered the delivery. + default_environment: + type: boolean + created_at: type: string - example: opened - nullable: true - installation_id: - description: The id of the GitHub App installation associated with this - event. - type: integer - example: 123 - nullable: true - repository_id: - description: The id of the repository associated with this event. + hooks_count: type: integer - example: 123 - nullable: true - required: - - id - - guid - - delivered_at - - redelivery - - duration - - status - - status_code - - event - - action - - installation_id - - repository_id - scim-error: - title: Scim Error - description: Scim Error + download: + type: object + properties: + url: + type: string + state: + type: string + downloaded_at: + nullable: true + type: string + message: + nullable: true + type: string + pre-receive-environment-download-status: type: object properties: - message: + url: type: string - nullable: true - documentation_url: + state: type: string + downloaded_at: nullable: true - detail: type: string + message: nullable: true - status: - type: integer - scimType: type: string - nullable: true - schemas: - type: array - items: - type: string - validation-error: - title: Validation Error - description: Validation Error + pre-receive-hook: type: object - required: - - message - - documentation_url properties: - message: + id: + type: integer + name: type: string - documentation_url: + enforcement: type: string - errors: - type: array - items: - type: object - required: - - code - properties: - resource: - type: string - field: - type: string - message: - type: string - code: - type: string - index: - type: integer - value: - oneOf: - - type: string - nullable: true - - type: integer + script: + type: string + script_repository: + type: object + properties: + id: + type: integer + full_name: + type: string + url: + type: string + html_url: + type: string + environment: + type: object + properties: + id: + type: integer + name: + type: string + image_url: + type: string + url: + type: string + html_url: + type: string + default_environment: + type: boolean + created_at: + type: string + hooks_count: + type: integer + download: + type: object + properties: + url: + type: string + state: + type: string + downloaded_at: nullable: true - - type: array + type: string + message: nullable: true - items: - type: string - hook-delivery: - title: Webhook delivery - description: Delivery made by a webhook. + type: string + allow_downstream_configuration: + type: boolean + nullable-simple-user: + title: Simple User + description: Simple User type: object properties: - id: - description: Unique identifier of the delivery. - type: integer - example: 42 - guid: - description: Unique identifier for the event (shared with all deliveries - for all webhooks that subscribe to this event). + name: + nullable: true type: string - example: 58474f00-b361-11eb-836d-0e4f3503ccbe - delivered_at: - description: Time when the delivery was delivered. + email: + nullable: true type: string - format: date-time - example: '2021-05-12T20:33:44Z' - redelivery: - description: Whether the delivery is a redelivery. - type: boolean - example: false - duration: - description: Time spent delivering. - type: number - example: 0.03 - status: - description: Description of the status of the attempted delivery + login: type: string - example: failed to connect - status_code: - description: Status code received when delivery was made. + example: octocat + id: type: integer - example: 502 - event: - description: The event that triggered the delivery. + example: 1 + node_id: type: string - example: issues - action: - description: The type of activity for the event that triggered the delivery. + example: MDQ6VXNlcjE= + avatar_url: type: string - example: opened - nullable: true - installation_id: - description: The id of the GitHub App installation associated with this - event. - type: integer - example: 123 - nullable: true - repository_id: - description: The id of the repository associated with this event. - type: integer - example: 123 - nullable: true - url: - description: The URL target of the delivery. - type: string - example: https://www.example.com - request: - type: object - properties: - headers: - description: The request headers sent with the webhook delivery. - type: object - nullable: true - additionalProperties: true - payload: - description: The webhook payload. - type: object - nullable: true - additionalProperties: true - required: - - headers - - payload - response: - type: object - properties: - headers: - description: The response headers received when the delivery was made. - type: object - nullable: true - additionalProperties: true - payload: - description: The response payload received. - type: string - nullable: true - additionalProperties: true - required: - - headers - - payload - required: - - id - - guid - - delivered_at - - redelivery - - duration - - status - - status_code - - event - - action - - installation_id - - repository_id - - request - - response - simple-user: - title: Simple User - description: Simple User - type: object - properties: - name: - nullable: true - type: string - email: - nullable: true - type: string - login: - type: string - example: octocat - id: - type: integer - example: 1 - node_id: - type: string - example: MDQ6VXNlcjE= - avatar_url: - type: string - format: uri - example: https://github.com/images/error/octocat_happy.gif - gravatar_id: - type: string - example: 41d064eb2195891e12d0413f63227ea7 + format: uri + example: https://github.com/images/error/octocat_happy.gif + gravatar_id: + type: string + example: 41d064eb2195891e12d0413f63227ea7 nullable: true url: type: string @@ -39810,61 +39029,7 @@ components: - subscriptions_url - type - url - enterprise: - title: Enterprise - description: An enterprise account - type: object - properties: - description: - description: A short description of the enterprise. - type: string - nullable: true - html_url: - type: string - format: uri - example: https://github.com/enterprises/octo-business - website_url: - description: The enterprise's website URL. - type: string - nullable: true - format: uri - id: - description: Unique identifier of the enterprise - example: 42 - type: integer - node_id: - type: string - example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: - description: The name of the enterprise. - type: string - example: Octo Business - slug: - description: The slug url identifier for the enterprise. - type: string - example: octo-business - created_at: - type: string - nullable: true - format: date-time - example: '2019-01-26T19:01:12Z' - updated_at: - type: string - nullable: true - format: date-time - example: '2019-01-26T19:14:43Z' - avatar_url: - type: string - format: uri - required: - - id - - node_id - - name - - slug - - html_url - - created_at - - updated_at - - avatar_url + nullable: true app-permissions: title: App Permissions type: object @@ -39872,223 +39037,211 @@ components: properties: actions: type: string - description: 'The level of permission to grant the access token for GitHub - Actions workflows, workflow runs, and artifacts. Can be one of: `read` - or `write`.' + description: The level of permission to grant the access token for GitHub + Actions workflows, workflow runs, and artifacts. enum: - read - write administration: type: string - description: 'The level of permission to grant the access token for repository - creation, deletion, settings, teams, and collaborators creation. Can be - one of: `read` or `write`.' + description: The level of permission to grant the access token for repository + creation, deletion, settings, teams, and collaborators creation. enum: - read - write checks: type: string - description: 'The level of permission to grant the access token for checks - on code. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for checks + on code. enum: - read - write contents: type: string - description: 'The level of permission to grant the access token for repository - contents, commits, branches, downloads, releases, and merges. Can be one - of: `read` or `write`.' + description: The level of permission to grant the access token for repository + contents, commits, branches, downloads, releases, and merges. enum: - read - write deployments: type: string - description: 'The level of permission to grant the access token for deployments - and deployment statuses. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for deployments + and deployment statuses. enum: - read - write environments: type: string - description: 'The level of permission to grant the access token for managing - repository environments. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for managing + repository environments. enum: - read - write issues: type: string - description: 'The level of permission to grant the access token for issues - and related comments, assignees, labels, and milestones. Can be one of: - `read` or `write`.' + description: The level of permission to grant the access token for issues + and related comments, assignees, labels, and milestones. enum: - read - write metadata: type: string - description: 'The level of permission to grant the access token to search - repositories, list collaborators, and access repository metadata. Can - be one of: `read` or `write`.' + description: The level of permission to grant the access token to search + repositories, list collaborators, and access repository metadata. enum: - read - write packages: type: string - description: 'The level of permission to grant the access token for packages - published to GitHub Packages. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for packages + published to GitHub Packages. enum: - read - write pages: type: string - description: 'The level of permission to grant the access token to retrieve + description: The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds. - Can be one of: `read` or `write`.' enum: - read - write pull_requests: type: string - description: 'The level of permission to grant the access token for pull + description: The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges. - Can be one of: `read` or `write`.' enum: - read - write repository_hooks: type: string - description: 'The level of permission to grant the access token to manage - the post-receive hooks for a repository. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + the post-receive hooks for a repository. enum: - read - write repository_projects: type: string - description: 'The level of permission to grant the access token to manage - repository projects, columns, and cards. Can be one of: `read`, `write`, - or `admin`.' + description: The level of permission to grant the access token to manage + repository projects, columns, and cards. enum: - read - write - admin secret_scanning_alerts: type: string - description: 'The level of permission to grant the access token to view - and manage secret scanning alerts. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to view and + manage secret scanning alerts. enum: - read - write secrets: type: string - description: 'The level of permission to grant the access token to manage - repository secrets. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + repository secrets. enum: - read - write security_events: type: string - description: 'The level of permission to grant the access token to view - and manage security events like code scanning alerts. Can be one of: `read` - or `write`.' + description: The level of permission to grant the access token to view and + manage security events like code scanning alerts. enum: - read - write single_file: type: string - description: 'The level of permission to grant the access token to manage - just a single file. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + just a single file. enum: - read - write statuses: type: string - description: 'The level of permission to grant the access token for commit - statuses. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for commit + statuses. enum: - read - write vulnerability_alerts: type: string - description: 'The level of permission to grant the access token to manage - Dependabot alerts. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + Dependabot alerts. enum: - read - write workflows: type: string - description: 'The level of permission to grant the access token to update - GitHub Actions workflow files. Can be one of: `write`.' + description: The level of permission to grant the access token to update + GitHub Actions workflow files. enum: - write members: type: string - description: 'The level of permission to grant the access token for organization - teams and members. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for organization + teams and members. enum: - read - write organization_administration: type: string - description: 'The level of permission to grant the access token to manage - access to an organization. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + access to an organization. enum: - read - write organization_hooks: type: string - description: 'The level of permission to grant the access token to manage - the post-receive hooks for an organization. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + the post-receive hooks for an organization. enum: - read - write organization_plan: type: string - description: 'The level of permission to grant the access token for viewing - an organization''s plan. Can be one of: `read`.' + description: The level of permission to grant the access token for viewing + an organization's plan. enum: - read organization_projects: type: string - description: 'The level of permission to grant the access token to manage - organization projects and projects beta (where available). Can be one - of: `read`, `write`, or `admin`.' + description: The level of permission to grant the access token to manage + organization projects and projects beta (where available). enum: - read - write - admin organization_packages: type: string - description: 'The level of permission to grant the access token for organization - packages published to GitHub Packages. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token for organization + packages published to GitHub Packages. enum: - read - write organization_secrets: type: string - description: 'The level of permission to grant the access token to manage - organization secrets. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + organization secrets. enum: - read - write organization_self_hosted_runners: type: string - description: 'The level of permission to grant the access token to view - and manage GitHub Actions self-hosted runners available to an organization. - Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to view and + manage GitHub Actions self-hosted runners available to an organization. enum: - read - write organization_user_blocking: type: string - description: 'The level of permission to grant the access token to view - and manage users blocked by the organization. Can be one of: `read` or - `write`.' + description: The level of permission to grant the access token to view and + manage users blocked by the organization. enum: - read - write team_discussions: type: string - description: 'The level of permission to grant the access token to manage - team discussions and related comments. Can be one of: `read` or `write`.' + description: The level of permission to grant the access token to manage + team discussions and related comments. enum: - read - write @@ -40097,61 +39250,114 @@ components: issues: read deployments: write single_file: read - installation: - title: Installation - description: Installation + simple-user: + title: Simple User + description: Simple User type: object properties: + name: + nullable: true + type: string + email: + nullable: true + type: string + login: + type: string + example: octocat id: - description: The ID of the installation. type: integer example: 1 - account: - nullable: true - anyOf: - - "$ref": "#/components/schemas/simple-user" - - "$ref": "#/components/schemas/enterprise" - repository_selection: - description: Describe whether all repositories have been selected or there's - a selection involved + node_id: type: string - enum: - - all - - selected - access_tokens_url: + example: MDQ6VXNlcjE= + avatar_url: type: string format: uri - example: https://api.github.com/installations/1/access_tokens - repositories_url: + example: https://github.com/images/error/octocat_happy.gif + gravatar_id: + type: string + example: 41d064eb2195891e12d0413f63227ea7 + nullable: true + url: type: string format: uri - example: https://api.github.com/installation/repositories + example: https://api.github.com/users/octocat html_url: type: string format: uri - example: https://github.com/organizations/github/settings/installations/1 - app_id: - type: integer - example: 1 - target_id: - description: The ID of the user or organization this token is being scoped - to. - type: integer - target_type: + example: https://github.com/octocat + followers_url: type: string - example: Organization + format: uri + example: https://api.github.com/users/octocat/followers + following_url: + type: string + example: https://api.github.com/users/octocat/following{/other_user} + gists_url: + type: string + example: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: + type: string + example: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: + type: string + format: uri + example: https://api.github.com/users/octocat/subscriptions + organizations_url: + type: string + format: uri + example: https://api.github.com/users/octocat/orgs + repos_url: + type: string + format: uri + example: https://api.github.com/users/octocat/repos + events_url: + type: string + example: https://api.github.com/users/octocat/events{/privacy} + received_events_url: + type: string + format: uri + example: https://api.github.com/users/octocat/received_events + type: + type: string + example: User + site_admin: + type: boolean + starred_at: + type: string + example: '"2020-07-09T00:17:55Z"' + required: + - avatar_url + - events_url + - followers_url + - following_url + - gists_url + - gravatar_id + - html_url + - id + - node_id + - login + - organizations_url + - received_events_url + - repos_url + - site_admin + - starred_url + - subscriptions_url + - type + - url + nullable-scoped-installation: + title: Scoped Installation + type: object + properties: permissions: "$ref": "#/components/schemas/app-permissions" - events: - type: array - items: - type: string - created_at: - type: string - format: date-time - updated_at: + repository_selection: + description: Describe whether all repositories have been selected or there's + a selection involved type: string - format: date-time + enum: + - all + - selected single_file_name: type: string example: config.yaml @@ -40166,342 +39372,961 @@ components: example: - config.yml - ".github/issue_TEMPLATE.md" - app_slug: - type: string - example: github-actions - suspended_by: - "$ref": "#/components/schemas/nullable-simple-user" - suspended_at: - type: string - format: date-time - nullable: true - contact_email: + repositories_url: type: string - example: '"test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com"' - nullable: true + format: uri + example: https://api.github.com/users/octocat/repos + account: + "$ref": "#/components/schemas/simple-user" required: - - id - - app_id - - app_slug - - target_id - - target_type - - single_file_name + - permissions - repository_selection - - access_tokens_url - - html_url + - single_file_name - repositories_url - - events - account - - permissions - - created_at - - updated_at - - suspended_by - - suspended_at - nullable-license-simple: - title: License Simple - description: License Simple + nullable: true + authorization: + title: Authorization + description: The authorization for an OAuth app, GitHub App, or a Personal Access + Token. type: object properties: - key: + id: + type: integer + url: type: string - example: mit - name: + format: uri + scopes: + description: A list of scopes that this authorization is in. + type: array + items: + type: string + nullable: true + token: type: string - example: MIT License - url: + token_last_eight: type: string nullable: true - format: uri - example: https://api.github.com/licenses/mit - spdx_id: + hashed_token: type: string nullable: true - example: MIT - node_id: + app: + type: object + properties: + client_id: + type: string + name: + type: string + url: + type: string + format: uri + required: + - client_id + - name + - url + note: type: string - example: MDc6TGljZW5zZW1pdA== - html_url: + nullable: true + note_url: type: string format: uri + nullable: true + updated_at: + type: string + format: date-time + created_at: + type: string + format: date-time + fingerprint: + type: string + nullable: true + user: + "$ref": "#/components/schemas/nullable-simple-user" + installation: + "$ref": "#/components/schemas/nullable-scoped-installation" + expires_at: + type: string + format: date-time + nullable: true required: - - key - - name + - app + - id + - note + - note_url + - scopes + - token + - hashed_token + - token_last_eight + - fingerprint - url - - spdx_id - - node_id - nullable: true - repository: - title: Repository - description: A git repository + - created_at + - updated_at + - expires_at + integration: + title: GitHub app + description: GitHub apps are a new way to extend GitHub. They can be installed + directly on organizations and user accounts and granted access to specific + repositories. They come with granular permissions and built-in webhooks. GitHub + apps are first class actors within GitHub. type: object properties: id: - description: Unique identifier of the repository - example: 42 + description: Unique identifier of the GitHub app + example: 37 type: integer - node_id: - type: string - example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: - description: The name of the repository. + slug: + description: The slug name of the GitHub app + example: probot-owners type: string - example: Team Environment - full_name: + node_id: type: string - example: octocat/Hello-World - license: - "$ref": "#/components/schemas/nullable-license-simple" - organization: - "$ref": "#/components/schemas/nullable-simple-user" - forks: - type: integer - permissions: - type: object - properties: - admin: - type: boolean - pull: - type: boolean - triage: - type: boolean - push: - type: boolean - maintain: - type: boolean - required: - - admin - - pull - - push + example: MDExOkludGVncmF0aW9uMQ== owner: - "$ref": "#/components/schemas/simple-user" - private: - description: Whether the repository is private or public. - default: false - type: boolean - html_url: + "$ref": "#/components/schemas/nullable-simple-user" + name: + description: The name of the GitHub app + example: Probot Owners type: string - format: uri - example: https://github.com/octocat/Hello-World description: type: string - example: This your first repo! + example: The description of the app. nullable: true - fork: - type: boolean - url: + external_url: type: string format: uri - example: https://api.github.com/repos/octocat/Hello-World - archive_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: + example: https://example.com + html_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: + format: uri + example: https://github.com/apps/super-ci + created_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: + format: date-time + example: '2017-07-08T16:18:44-04:00' + updated_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: + format: date-time + example: '2017-07-08T16:18:44-04:00' + permissions: + description: The set of permissions for the GitHub app + type: object + properties: + issues: + type: string + checks: + type: string + metadata: + type: string + contents: + type: string + deployments: + type: string + additionalProperties: + type: string + example: + issues: read + deployments: write + events: + description: The list of events for the GitHub app + example: + - label + - deployment + type: array + items: + type: string + installations_count: + description: The number of installations associated with the GitHub app + example: 5 + type: integer + client_id: type: string - example: http://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: + example: '"Iv1.25b5d1e65ffc4022"' + client_secret: type: string - example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: + example: '"1d4b2097ac622ba702d19de498f005747a8b21d3"' + webhook_secret: type: string - example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: + example: '"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' + nullable: true + pem: type: string - example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: + example: '"-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END + RSA PRIVATE KEY-----\n"' + required: + - id + - node_id + - owner + - name + - description + - external_url + - html_url + - created_at + - updated_at + - permissions + - events + basic-error: + title: Basic Error + description: Basic Error + type: object + properties: + message: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: + documentation_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: + url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/downloads - events_url: + status: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/events - forks_url: + validation-error-simple: + title: Validation Error Simple + description: Validation Error Simple + type: object + required: + - message + - documentation_url + properties: + message: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: + documentation_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: + errors: + type: array + items: + type: string + webhook-config-url: + type: string + description: The URL to which the payloads will be delivered. + example: https://example.com/webhook + format: uri + webhook-config-content-type: + type: string + description: The media type used to serialize the payloads. Supported values + include `json` and `form`. The default is `form`. + example: '"json"' + webhook-config-secret: + type: string + description: If provided, the `secret` will be used as the `key` to generate + the HMAC hex digest value for [delivery signature headers](https://docs.github.com/enterprise-server@3.6/webhooks/event-payloads/#delivery-headers). + example: '"********"' + webhook-config-insecure-ssl: + oneOf: + - type: string + description: 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.** + example: '"0"' + - type: number + webhook-config: + title: Webhook Configuration + description: Configuration object of the webhook + type: object + properties: + url: + "$ref": "#/components/schemas/webhook-config-url" + content_type: + "$ref": "#/components/schemas/webhook-config-content-type" + secret: + "$ref": "#/components/schemas/webhook-config-secret" + insecure_ssl: + "$ref": "#/components/schemas/webhook-config-insecure-ssl" + hook-delivery-item: + title: Simple webhook delivery + description: Delivery made by a webhook, without request and response information. + type: object + properties: + id: + description: Unique identifier of the webhook delivery. + type: integer + example: 42 + guid: + description: Unique identifier for the event (shared with all deliveries + for all webhooks that subscribe to this event). type: string - example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: + example: 58474f00-b361-11eb-836d-0e4f3503ccbe + delivered_at: + description: Time when the webhook delivery occurred. type: string - example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: + format: date-time + example: '2021-05-12T20:33:44Z' + redelivery: + description: Whether the webhook delivery is a redelivery. + type: boolean + example: false + duration: + description: Time spent delivering. + type: number + example: 0.03 + status: + description: Describes the response returned after attempting the delivery. type: string - example: git:github.com/octocat/Hello-World.git - issue_comment_url: + example: failed to connect + status_code: + description: Status code received when delivery was made. + type: integer + example: 502 + event: + description: The event that triggered the delivery. type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: + example: issues + action: + description: The type of activity for the event that triggered the delivery. type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: + example: opened + nullable: true + installation_id: + description: The id of the GitHub App installation associated with this + event. + type: integer + example: 123 + nullable: true + repository_id: + description: The id of the repository associated with this event. + type: integer + example: 123 + nullable: true + required: + - id + - guid + - delivered_at + - redelivery + - duration + - status + - status_code + - event + - action + - installation_id + - repository_id + scim-error: + title: Scim Error + description: Scim Error + type: object + properties: + message: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: + nullable: true + documentation_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: + nullable: true + detail: type: string - example: http://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: + nullable: true + status: + type: integer + scimType: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/languages - merges_url: + nullable: true + schemas: + type: array + items: + type: string + validation-error: + title: Validation Error + description: Validation Error + type: object + required: + - message + - documentation_url + properties: + message: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/merges - milestones_url: + documentation_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: + errors: + type: array + items: + type: object + required: + - code + properties: + resource: + type: string + field: + type: string + message: + type: string + code: + type: string + index: + type: integer + value: + oneOf: + - type: string + nullable: true + - type: integer + nullable: true + - type: array + nullable: true + items: + type: string + hook-delivery: + title: Webhook delivery + description: Delivery made by a webhook. + type: object + properties: + id: + description: Unique identifier of the delivery. + type: integer + example: 42 + guid: + description: Unique identifier for the event (shared with all deliveries + for all webhooks that subscribe to this event). type: string - example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: + example: 58474f00-b361-11eb-836d-0e4f3503ccbe + delivered_at: + description: Time when the delivery was delivered. type: string - example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: + format: date-time + example: '2021-05-12T20:33:44Z' + redelivery: + description: Whether the delivery is a redelivery. + type: boolean + example: false + duration: + description: Time spent delivering. + type: number + example: 0.03 + status: + description: Description of the status of the attempted delivery type: string - example: http://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: + example: failed to connect + status_code: + description: Status code received when delivery was made. + type: integer + example: 502 + event: + description: The event that triggered the delivery. type: string - example: git@github.com:octocat/Hello-World.git - stargazers_url: + example: issues + action: + description: The type of activity for the event that triggered the delivery. type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: + example: opened + nullable: true + installation_id: + description: The id of the GitHub App installation associated with this + event. + type: integer + example: 123 + nullable: true + repository_id: + description: The id of the repository associated with this event. + type: integer + example: 123 + nullable: true + url: + description: The URL target of the delivery. type: string - example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: + example: https://www.example.com + request: + type: object + properties: + headers: + description: The request headers sent with the webhook delivery. + type: object + nullable: true + additionalProperties: true + payload: + description: The webhook payload. + type: object + nullable: true + additionalProperties: true + required: + - headers + - payload + response: + type: object + properties: + headers: + description: The response headers received when the delivery was made. + type: object + nullable: true + additionalProperties: true + payload: + description: The response payload received. + type: string + nullable: true + additionalProperties: true + required: + - headers + - payload + required: + - id + - guid + - delivered_at + - redelivery + - duration + - status + - status_code + - event + - action + - installation_id + - repository_id + - request + - response + enterprise: + title: Enterprise + description: An enterprise account + type: object + properties: + description: + description: A short description of the enterprise. type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: + nullable: true + html_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscription - tags_url: + example: https://github.com/enterprises/octo-business + website_url: + description: The enterprise's website URL. type: string + nullable: true format: uri - example: http://api.github.com/repos/octocat/Hello-World/tags - teams_url: + id: + description: Unique identifier of the enterprise + example: 42 + type: integer + node_id: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/teams - trees_url: + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: + description: The name of the enterprise. type: string - example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: + example: Octo Business + slug: + description: The slug url identifier for the enterprise. type: string - example: https://github.com/octocat/Hello-World.git - mirror_url: + example: octo-business + created_at: type: string - format: uri - example: git:git.example.com/octocat/Hello-World nullable: true - hooks_url: + format: date-time + example: '2019-01-26T19:01:12Z' + updated_at: + type: string + nullable: true + format: date-time + example: '2019-01-26T19:14:43Z' + avatar_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/hooks - svn_url: + required: + - id + - node_id + - name + - slug + - html_url + - created_at + - updated_at + - avatar_url + installation: + title: Installation + description: Installation + type: object + properties: + id: + description: The ID of the installation. + type: integer + example: 1 + account: + nullable: true + anyOf: + - "$ref": "#/components/schemas/simple-user" + - "$ref": "#/components/schemas/enterprise" + repository_selection: + description: Describe whether all repositories have been selected or there's + a selection involved + type: string + enum: + - all + - selected + access_tokens_url: type: string format: uri - example: https://svn.github.com/octocat/Hello-World - homepage: + example: https://api.github.com/installations/1/access_tokens + repositories_url: type: string format: uri - example: https://github.com - nullable: true - language: + example: https://api.github.com/installation/repositories + html_url: type: string - nullable: true - forks_count: - type: integer - example: 9 - stargazers_count: - type: integer - example: 80 - watchers_count: + format: uri + example: https://github.com/organizations/github/settings/installations/1 + app_id: type: integer - example: 80 - size: + example: 1 + target_id: + description: The ID of the user or organization this token is being scoped + to. type: integer - example: 108 - default_branch: - description: The default branch of the repository. + target_type: type: string - example: master - open_issues_count: - type: integer - example: 0 - is_template: - description: Whether this repository acts as a template that can be used - to generate new repositories. - default: false - type: boolean - example: true - topics: + example: Organization + permissions: + "$ref": "#/components/schemas/app-permissions" + events: type: array items: type: string - has_issues: - description: Whether issues are enabled. - default: true - type: boolean - example: true - has_projects: - description: Whether projects are enabled. - default: true - type: boolean - example: true - has_wiki: - description: Whether the wiki is enabled. - default: true - type: boolean - example: true - has_pages: - type: boolean - has_downloads: - description: Whether downloads are enabled. - default: true - type: boolean - example: true - archived: - description: Whether the repository is archived. - default: false - type: boolean - disabled: - type: boolean - description: Returns whether or not this repository disabled. - visibility: - description: 'The repository visibility: public, private, or internal.' - default: public + created_at: type: string - pushed_at: + format: date-time + updated_at: + type: string + format: date-time + single_file_name: + type: string + example: config.yaml + nullable: true + has_multiple_single_files: + type: boolean + example: true + single_file_paths: + type: array + items: + type: string + example: + - config.yml + - ".github/issue_TEMPLATE.md" + app_slug: + type: string + example: github-actions + suspended_by: + "$ref": "#/components/schemas/nullable-simple-user" + suspended_at: + type: string + format: date-time + nullable: true + contact_email: + type: string + example: '"test_13f1e99741e3e004@d7e1eb0bc0a1ba12.com"' + nullable: true + required: + - id + - app_id + - app_slug + - target_id + - target_type + - single_file_name + - repository_selection + - access_tokens_url + - html_url + - repositories_url + - events + - account + - permissions + - created_at + - updated_at + - suspended_by + - suspended_at + nullable-license-simple: + title: License Simple + description: License Simple + type: object + properties: + key: + type: string + example: mit + name: + type: string + example: MIT License + url: + type: string + nullable: true + format: uri + example: https://api.github.com/licenses/mit + spdx_id: + type: string + nullable: true + example: MIT + node_id: + type: string + example: MDc6TGljZW5zZW1pdA== + html_url: + type: string + format: uri + required: + - key + - name + - url + - spdx_id + - node_id + nullable: true + repository: + title: Repository + description: A git repository + type: object + properties: + id: + description: Unique identifier of the repository + example: 42 + type: integer + node_id: + type: string + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: + description: The name of the repository. + type: string + example: Team Environment + full_name: + type: string + example: octocat/Hello-World + license: + "$ref": "#/components/schemas/nullable-license-simple" + organization: + "$ref": "#/components/schemas/nullable-simple-user" + forks: + type: integer + permissions: + type: object + properties: + admin: + type: boolean + pull: + type: boolean + triage: + type: boolean + push: + type: boolean + maintain: + type: boolean + required: + - admin + - pull + - push + owner: + "$ref": "#/components/schemas/simple-user" + private: + description: Whether the repository is private or public. + default: false + type: boolean + html_url: + type: string + format: uri + example: https://github.com/octocat/Hello-World + description: + type: string + example: This your first repo! + nullable: true + fork: + type: boolean + url: + type: string + format: uri + example: https://api.github.com/repos/octocat/Hello-World + archive_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/downloads + events_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/events + forks_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: + type: string + example: git:github.com/octocat/Hello-World.git + issue_comment_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/languages + merges_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/merges + milestones_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: + type: string + example: git@github.com:octocat/Hello-World.git + stargazers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscription + tags_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/tags + teams_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/teams + trees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: + type: string + example: https://github.com/octocat/Hello-World.git + mirror_url: + type: string + format: uri + example: git:git.example.com/octocat/Hello-World + nullable: true + hooks_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/hooks + svn_url: + type: string + format: uri + example: https://svn.github.com/octocat/Hello-World + homepage: + type: string + format: uri + example: https://github.com + nullable: true + language: + type: string + nullable: true + forks_count: + type: integer + example: 9 + stargazers_count: + type: integer + example: 80 + watchers_count: + type: integer + example: 80 + size: + description: The size of the repository. Size is calculated hourly. When + a repository is initially created, the size is 0. + type: integer + example: 108 + default_branch: + description: The default branch of the repository. + type: string + example: master + open_issues_count: + type: integer + example: 0 + is_template: + description: Whether this repository acts as a template that can be used + to generate new repositories. + default: false + type: boolean + example: true + topics: + type: array + items: + type: string + has_issues: + description: Whether issues are enabled. + default: true + type: boolean + example: true + has_projects: + description: Whether projects are enabled. + default: true + type: boolean + example: true + has_wiki: + description: Whether the wiki is enabled. + default: true + type: boolean + example: true + has_pages: + type: boolean + has_downloads: + description: Whether downloads are enabled. + default: true + type: boolean + example: true + archived: + description: Whether the repository is archived. + default: false + type: boolean + disabled: + type: boolean + description: Returns whether or not this repository disabled. + visibility: + description: 'The repository visibility: public, private, or internal.' + default: public + type: string + pushed_at: type: string format: date-time example: '2011-01-26T19:06:43Z' @@ -40733,6 +40558,52 @@ components: type: boolean allow_update_branch: type: boolean + use_squash_pr_title_as_default: + type: boolean + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. allow_merge_commit: type: boolean subscribers_count: @@ -40756,6 +40627,64 @@ components: default: false type: boolean example: false + allow_update_branch: + description: Whether or not a pull request head branch that is behind its + base branch can always be updated even if it is not required to be up + to date before merging. + default: false + type: boolean + example: false + use_squash_pr_title_as_default: + type: boolean + description: Whether a squash merge commit can use the pull request title + as default. **This property has been deprecated. Please use `squash_merge_commit_title` + instead. + default: false + deprecated: true + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. allow_merge_commit: description: Whether to allow merge commits for pull requests. default: true @@ -40764,6 +40693,10 @@ components: allow_forking: description: Whether to allow forking this repo type: boolean + web_commit_signoff_required: + description: Whether to require contributors to sign off on web-based commits + default: false + type: boolean subscribers_count: type: integer network_count: @@ -40777,6 +40710,9 @@ components: starred_at: type: string example: '"2020-07-09T00:17:42Z"' + anonymous_access_enabled: + type: boolean + description: Whether anonymous git access is enabled for this repository required: - archive_url - assignees_url @@ -40936,123 +40872,6 @@ components: - url - created_at - updated_at - nullable-scoped-installation: - title: Scoped Installation - type: object - properties: - permissions: - "$ref": "#/components/schemas/app-permissions" - repository_selection: - description: Describe whether all repositories have been selected or there's - a selection involved - type: string - enum: - - all - - selected - single_file_name: - type: string - example: config.yaml - nullable: true - has_multiple_single_files: - type: boolean - example: true - single_file_paths: - type: array - items: - type: string - example: - - config.yml - - ".github/issue_TEMPLATE.md" - repositories_url: - type: string - format: uri - example: https://api.github.com/users/octocat/repos - account: - "$ref": "#/components/schemas/simple-user" - required: - - permissions - - repository_selection - - single_file_name - - repositories_url - - account - nullable: true - authorization: - title: Authorization - description: The authorization for an OAuth app, GitHub App, or a Personal Access - Token. - type: object - properties: - id: - type: integer - url: - type: string - format: uri - scopes: - description: A list of scopes that this authorization is in. - type: array - items: - type: string - nullable: true - token: - type: string - token_last_eight: - type: string - nullable: true - hashed_token: - type: string - nullable: true - app: - type: object - properties: - client_id: - type: string - name: - type: string - url: - type: string - format: uri - required: - - client_id - - name - - url - note: - type: string - nullable: true - note_url: - type: string - format: uri - nullable: true - updated_at: - type: string - format: date-time - created_at: - type: string - format: date-time - fingerprint: - type: string - nullable: true - user: - "$ref": "#/components/schemas/nullable-simple-user" - installation: - "$ref": "#/components/schemas/nullable-scoped-installation" - expires_at: - type: string - format: date-time - nullable: true - required: - - app - - id - - note - - note_url - - scopes - - token - - hashed_token - - token_last_eight - - fingerprint - - url - - created_at - - updated_at - - expires_at code-of-conduct: title: Code Of Conduct description: Code Of Conduct @@ -41128,20 +40947,268 @@ components: - html_url - key - name - enabled-organizations: + announcement-message: type: string - description: 'The policy that controls the organizations in the enterprise that - are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`.' - enum: - - all - - none - - selected - allowed-actions: + description: The announcement text in GitHub Flavored Markdown. For more information + about GitHub Flavored Markdown, see "[Basic writing and formatting syntax](https://docs.github.com/enterprise-server@3.6/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax)." + example: Very **important** announcement about _nothing_. + announcement-expiration: type: string - description: 'The permissions policy that controls the actions that are allowed - to run. Can be one of: `all`, `local_only`, or `selected`.' - enum: - - all + format: date-time + description: 'The time at which the announcement expires. This is a timestamp + in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. + To set an announcement that never expires, omit this parameter, set it to + `null`, or set it to an empty string.' + example: '"2021-01-01T00:00:00.000-07:00"' + nullable: true + announcement: + title: Enterprise Announcement + description: Enterprise global announcement + type: object + properties: + announcement: + "$ref": "#/components/schemas/announcement-message" + expires_at: + "$ref": "#/components/schemas/announcement-expiration" + required: + - announcement + license-info: + type: object + properties: + seats: + oneOf: + - type: string + - type: integer + seats_used: + type: integer + seats_available: + oneOf: + - type: string + - type: integer + kind: + type: string + days_until_expiration: + type: integer + expire_at: + type: string + enterprise-repository-overview: + title: Repository Enterprise Stats + type: object + properties: + total_repos: + type: integer + root_repos: + type: integer + fork_repos: + type: integer + org_repos: + type: integer + total_pushes: + type: integer + total_wikis: + type: integer + required: + - total_repos + - root_repos + - fork_repos + - org_repos + - total_pushes + - total_wikis + enterprise-hook-overview: + title: Hooks Enterprise Stats + type: object + properties: + total_hooks: + type: integer + active_hooks: + type: integer + inactive_hooks: + type: integer + required: + - total_hooks + - active_hooks + - inactive_hooks + enterprise-page-overview: + title: Enterprise Pages Stats + type: object + properties: + total_pages: + type: integer + required: + - total_pages + enterprise-organization-overview: + title: Enterprise Organization Stats + type: object + properties: + total_orgs: + type: integer + disabled_orgs: + type: integer + total_teams: + type: integer + total_team_members: + type: integer + required: + - total_orgs + - disabled_orgs + - total_teams + - total_team_members + enterprise-user-overview: + title: Enterprise User Stats + type: object + properties: + total_users: + type: integer + admin_users: + type: integer + suspended_users: + type: integer + required: + - total_users + - admin_users + - suspended_users + enterprise-pull-request-overview: + title: Enterprise Pull Request Stats + type: object + properties: + total_pulls: + type: integer + merged_pulls: + type: integer + mergeable_pulls: + type: integer + unmergeable_pulls: + type: integer + required: + - total_pulls + - merged_pulls + - mergeable_pulls + - unmergeable_pulls + enterprise-issue-overview: + title: Enterprise Issue Stats + type: object + properties: + total_issues: + type: integer + open_issues: + type: integer + closed_issues: + type: integer + required: + - total_issues + - open_issues + - closed_issues + enterprise-milestone-overview: + title: Enterprise Milestone Stats + type: object + properties: + total_milestones: + type: integer + open_milestones: + type: integer + closed_milestones: + type: integer + required: + - total_milestones + - open_milestones + - closed_milestones + enterprise-gist-overview: + title: Enterprise Gist Stats + type: object + properties: + total_gists: + type: integer + private_gists: + type: integer + public_gists: + type: integer + required: + - total_gists + - private_gists + - public_gists + enterprise-comment-overview: + title: Enterprise Comment Stats + type: object + properties: + total_commit_comments: + type: integer + total_gist_comments: + type: integer + total_issue_comments: + type: integer + total_pull_request_comments: + type: integer + required: + - total_commit_comments + - total_gist_comments + - total_issue_comments + - total_pull_request_comments + enterprise-overview: + type: object + properties: + repos: + "$ref": "#/components/schemas/enterprise-repository-overview" + hooks: + "$ref": "#/components/schemas/enterprise-hook-overview" + pages: + "$ref": "#/components/schemas/enterprise-page-overview" + orgs: + "$ref": "#/components/schemas/enterprise-organization-overview" + users: + "$ref": "#/components/schemas/enterprise-user-overview" + pulls: + "$ref": "#/components/schemas/enterprise-pull-request-overview" + issues: + "$ref": "#/components/schemas/enterprise-issue-overview" + milestones: + "$ref": "#/components/schemas/enterprise-milestone-overview" + gists: + "$ref": "#/components/schemas/enterprise-gist-overview" + comments: + "$ref": "#/components/schemas/enterprise-comment-overview" + actions-cache-usage-org-enterprise: + type: object + properties: + total_active_caches_count: + type: integer + description: The count of active caches across all repositories of an enterprise + or an organization. + total_active_caches_size_in_bytes: + type: integer + description: The total size in bytes of all active cache items across all + repositories of an enterprise or an organization. + required: + - total_active_caches_count + - total_active_caches_size_in_bytes + actions-cache-usage-policy-enterprise: + title: Actions cache usage policy for an enterprise + description: GitHub Actions cache usage policy for an enterprise. + type: object + properties: + repo_cache_size_limit_in_gb: + description: For repositories in an enterprise, the default size limit for + the sum of all caches in a repository, in gigabytes. + type: integer + example: 10 + max_repo_cache_size_limit_in_gb: + description: For repositories in an enterprise, the maximum value that can + be set as the limit for the sum of all caches in a repository, in gigabytes. + type: integer + example: 15 + enabled-organizations: + type: string + description: The policy that controls the organizations in the enterprise that + are allowed to run GitHub Actions. + enum: + - all + - none + - selected + allowed-actions: + type: string + description: The permissions policy that controls the actions that are allowed + to run. + enum: + - all - local_only - selected selected-actions-url: @@ -41164,64 +41231,6 @@ components: "$ref": "#/components/schemas/selected-actions-url" required: - enabled_organizations - organization-simple: - title: Organization Simple - description: Organization Simple - type: object - properties: - login: - type: string - example: github - id: - type: integer - example: 1 - node_id: - type: string - example: MDEyOk9yZ2FuaXphdGlvbjE= - url: - type: string - format: uri - example: https://api.github.com/orgs/github - repos_url: - type: string - format: uri - example: https://api.github.com/orgs/github/repos - events_url: - type: string - format: uri - example: https://api.github.com/orgs/github/events - hooks_url: - type: string - example: https://api.github.com/orgs/github/hooks - issues_url: - type: string - example: https://api.github.com/orgs/github/issues - members_url: - type: string - example: https://api.github.com/orgs/github/members{/member} - public_members_url: - type: string - example: https://api.github.com/orgs/github/public_members{/member} - avatar_url: - type: string - example: https://github.com/images/error/octocat_happy.gif - description: - type: string - example: A great organization - nullable: true - required: - - login - - url - - id - - node_id - - repos_url - - events_url - - hooks_url - - issues_url - - members_url - - public_members_url - - avatar_url - - description selected-actions: type: object properties: @@ -41229,11 +41238,6 @@ components: type: boolean description: Whether GitHub-owned actions are allowed. For example, this includes the actions in the `actions` organization. - verified_allowed: - type: boolean - description: Whether actions in GitHub Marketplace from verified creators - are allowed. Set to `true` to allow all GitHub Marketplace actions by - verified creators. patterns_allowed: type: array description: Specifies a list of string-matching patterns to allow specific @@ -41241,6 +41245,37 @@ components: `monalisa/octocat@v2`, `monalisa/*`." items: type: string + required: + - github_owned_allowed + - patterns_allowed + actions-default-workflow-permissions: + type: string + description: The default workflow permissions granted to the GITHUB_TOKEN when + running workflows. + enum: + - read + - write + actions-can-approve-pull-request-reviews: + type: boolean + description: Whether GitHub Actions can approve pull requests. Enabling this + can be a security risk. + actions-get-default-workflow-permissions: + type: object + properties: + default_workflow_permissions: + "$ref": "#/components/schemas/actions-default-workflow-permissions" + can_approve_pull_request_reviews: + "$ref": "#/components/schemas/actions-can-approve-pull-request-reviews" + required: + - default_workflow_permissions + - can_approve_pull_request_reviews + actions-set-default-workflow-permissions: + type: object + properties: + default_workflow_permissions: + "$ref": "#/components/schemas/actions-default-workflow-permissions" + can_approve_pull_request_reviews: + "$ref": "#/components/schemas/actions-can-approve-pull-request-reviews" runner-groups-enterprise: type: object properties: @@ -41258,6 +41293,26 @@ components: type: string allows_public_repositories: type: boolean + workflow_restrictions_read_only: + description: If `true`, the `restricted_to_workflows` and `selected_workflows` + fields cannot be modified. + type: boolean + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running only + the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed to run. + This setting will be ignored unless `restricted_to_workflows` is set to + `true`. + type: array + items: + type: string + description: Name of workflow the runner group should be allowed to run. + Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main required: - id - name @@ -41502,6 +41557,12 @@ components: description: 'The time that the alert was created in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' format: date-time readOnly: true + nullable-alert-updated-at: + type: string + description: 'The time that the alert was last updated in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' + format: date-time + readOnly: true + nullable: true alert-url: type: string description: The REST API URL of the alert resource. @@ -41513,8 +41574,8 @@ components: format: uri readOnly: true secret-scanning-alert-state: - description: Sets the state of the secret scanning alert. Can be either `open` - or `resolved`. You must provide `resolution` when you set the state to `resolved`. + description: Sets the state of the secret scanning alert. You must provide `resolution` + when you set the state to `resolved`. type: string enum: - open @@ -41522,1765 +41583,1438 @@ components: secret-scanning-alert-resolution: type: string description: "**Required when the `state` is `resolved`.** The reason for resolving - the alert. Can be one of `false_positive`, `wont_fix`, `revoked`, or `used_in_tests`." + the alert." nullable: true enum: - - + - - false_positive - wont_fix - revoked - used_in_tests - nullable-repository: - title: Repository - description: A git repository + simple-repository: + title: Simple Repository + description: Simple Repository type: object properties: id: - description: Unique identifier of the repository - example: 42 type: integer + example: 1296269 + description: A unique identifier of the repository. node_id: type: string example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + description: The GraphQL identifier of the repository. name: - description: The name of the repository. type: string - example: Team Environment + example: Hello-World + description: The name of the repository. full_name: type: string example: octocat/Hello-World - license: - "$ref": "#/components/schemas/nullable-license-simple" - organization: - "$ref": "#/components/schemas/nullable-simple-user" - forks: - type: integer - permissions: - type: object - properties: - admin: - type: boolean - pull: - type: boolean - triage: - type: boolean - push: - type: boolean - maintain: - type: boolean - required: - - admin - - pull - - push + description: The full, globally unique, name of the repository. owner: "$ref": "#/components/schemas/simple-user" private: - description: Whether the repository is private or public. - default: false type: boolean + description: Whether the repository is private. html_url: type: string format: uri example: https://github.com/octocat/Hello-World + description: The URL to view the repository on GitHub.com. description: type: string example: This your first repo! nullable: true + description: The repository description. fork: type: boolean + description: Whether the repository is a fork. url: type: string format: uri example: https://api.github.com/repos/octocat/Hello-World + description: The URL to get more information about the repository from the + GitHub API. archive_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + example: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + description: A template for the API URL to download the repository as an + archive. assignees_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + example: https://api.github.com/repos/octocat/Hello-World/assignees{/user} + description: A template for the API URL to list the available assignees + for issues in the repository. blobs_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + example: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + description: A template for the API URL to create or retrieve a raw Git + blob in the repository. branches_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + example: https://api.github.com/repos/octocat/Hello-World/branches{/branch} + description: A template for the API URL to get information about branches + in the repository. collaborators_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + example: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + description: A template for the API URL to get information about collaborators + of the repository. comments_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + example: https://api.github.com/repos/octocat/Hello-World/comments{/number} + description: A template for the API URL to get information about comments + on the repository. commits_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + example: https://api.github.com/repos/octocat/Hello-World/commits{/sha} + description: A template for the API URL to get information about commits + on the repository. compare_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + example: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + description: A template for the API URL to compare two commits or refs. contents_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} + example: https://api.github.com/repos/octocat/Hello-World/contents/{+path} + description: A template for the API URL to get the contents of the repository. contributors_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/contributors + example: https://api.github.com/repos/octocat/Hello-World/contributors + description: A template for the API URL to list the contributors to the + repository. deployments_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/deployments + example: https://api.github.com/repos/octocat/Hello-World/deployments + description: The API URL to list the deployments of the repository. downloads_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/downloads + example: https://api.github.com/repos/octocat/Hello-World/downloads + description: The API URL to list the downloads on the repository. events_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/events + example: https://api.github.com/repos/octocat/Hello-World/events + description: The API URL to list the events of the repository. forks_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/forks + example: https://api.github.com/repos/octocat/Hello-World/forks + description: The API URL to list the forks of the repository. git_commits_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + example: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + description: A template for the API URL to get information about Git commits + of the repository. git_refs_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + example: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + description: A template for the API URL to get information about Git refs + of the repository. git_tags_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: - type: string - example: git:github.com/octocat/Hello-World.git + example: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + description: A template for the API URL to get information about Git tags + of the repository. issue_comment_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + example: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + description: A template for the API URL to get information about issue comments + on the repository. issue_events_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + example: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + description: A template for the API URL to get information about issue events + on the repository. issues_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues{/number} + example: https://api.github.com/repos/octocat/Hello-World/issues{/number} + description: A template for the API URL to get information about issues + on the repository. keys_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} + example: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + description: A template for the API URL to get information about deploy + keys on the repository. labels_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/labels{/name} + example: https://api.github.com/repos/octocat/Hello-World/labels{/name} + description: A template for the API URL to get information about labels + of the repository. languages_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/languages + example: https://api.github.com/repos/octocat/Hello-World/languages + description: The API URL to get information about the languages of the repository. merges_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/merges + example: https://api.github.com/repos/octocat/Hello-World/merges + description: The API URL to merge branches in the repository. milestones_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + example: https://api.github.com/repos/octocat/Hello-World/milestones{/number} + description: A template for the API URL to get information about milestones + of the repository. notifications_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + example: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + description: A template for the API URL to get information about notifications + on the repository. pulls_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} + example: https://api.github.com/repos/octocat/Hello-World/pulls{/number} + description: A template for the API URL to get information about pull requests + on the repository. releases_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: - type: string - example: git@github.com:octocat/Hello-World.git + example: https://api.github.com/repos/octocat/Hello-World/releases{/id} + description: A template for the API URL to get information about releases + on the repository. stargazers_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/stargazers + example: https://api.github.com/repos/octocat/Hello-World/stargazers + description: The API URL to list the stargazers on the repository. statuses_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} + example: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + description: A template for the API URL to get information about statuses + of a commit. subscribers_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscribers + example: https://api.github.com/repos/octocat/Hello-World/subscribers + description: The API URL to list the subscribers on the repository. subscription_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscription + example: https://api.github.com/repos/octocat/Hello-World/subscription + description: The API URL to subscribe to notifications for this repository. tags_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/tags + example: https://api.github.com/repos/octocat/Hello-World/tags + description: The API URL to get information about tags on the repository. teams_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/teams + example: https://api.github.com/repos/octocat/Hello-World/teams + description: The API URL to list the teams on the repository. trees_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: + example: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + description: A template for the API URL to create or retrieve a raw Git + tree of the repository. + hooks_url: type: string - example: https://github.com/octocat/Hello-World.git - mirror_url: + format: uri + example: https://api.github.com/repos/octocat/Hello-World/hooks + description: The API URL to list the hooks on the repository. + required: + - archive_url + - assignees_url + - blobs_url + - branches_url + - collaborators_url + - comments_url + - commits_url + - compare_url + - contents_url + - contributors_url + - deployments_url + - description + - downloads_url + - events_url + - fork + - forks_url + - full_name + - git_commits_url + - git_refs_url + - git_tags_url + - hooks_url + - html_url + - id + - node_id + - issue_comment_url + - issue_events_url + - issues_url + - keys_url + - labels_url + - languages_url + - merges_url + - milestones_url + - name + - notifications_url + - owner + - private + - pulls_url + - releases_url + - stargazers_url + - statuses_url + - subscribers_url + - subscription_url + - tags_url + - teams_url + - trees_url + - url + organization-secret-scanning-alert: + type: object + properties: + number: + "$ref": "#/components/schemas/alert-number" + created_at: + "$ref": "#/components/schemas/alert-created-at" + updated_at: + "$ref": "#/components/schemas/nullable-alert-updated-at" + url: + "$ref": "#/components/schemas/alert-url" + html_url: + "$ref": "#/components/schemas/alert-html-url" + locations_url: type: string format: uri - example: git:git.example.com/octocat/Hello-World + description: The REST API URL of the code locations for this alert. + state: + "$ref": "#/components/schemas/secret-scanning-alert-state" + resolution: + "$ref": "#/components/schemas/secret-scanning-alert-resolution" + resolved_at: + type: string + format: date-time + description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' nullable: true - hooks_url: + resolved_by: + "$ref": "#/components/schemas/nullable-simple-user" + secret_type: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/hooks - svn_url: + description: The type of secret that secret scanning detected. + secret_type_display_name: type: string - format: uri - example: https://svn.github.com/octocat/Hello-World - homepage: + description: |- + User-friendly name for the detected secret, matching the `secret_type`. + For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." + secret: type: string - format: uri - example: https://github.com + description: The secret that was detected. + repository: + "$ref": "#/components/schemas/simple-repository" + push_protection_bypassed: + type: boolean + description: Whether push protection was bypassed for the detected secret. nullable: true - language: + push_protection_bypassed_by: + "$ref": "#/components/schemas/nullable-simple-user" + push_protection_bypassed_at: type: string + format: date-time + description: 'The time that push protection was bypassed in ISO 8601 format: + `YYYY-MM-DDTHH:MM:SSZ`.' nullable: true - forks_count: - type: integer - example: 9 - stargazers_count: - type: integer - example: 80 - watchers_count: + advanced-security-active-committers-user: + type: object + properties: + user_login: + type: string + last_pushed_date: + type: string + example: '2021-11-03' + required: + - user_login + - last_pushed_date + advanced-security-active-committers-repository: + type: object + properties: + name: + type: string + example: octocat/Hello-World + advanced_security_committers: type: integer - example: 80 - size: + example: 25 + advanced_security_committers_breakdown: + type: array + items: + "$ref": "#/components/schemas/advanced-security-active-committers-user" + required: + - name + - advanced_security_committers + - advanced_security_committers_breakdown + advanced-security-active-committers: + type: object + properties: + total_advanced_security_committers: type: integer - example: 108 - default_branch: - description: The default branch of the repository. - type: string - example: master - open_issues_count: + example: 25 + total_count: type: integer - example: 0 - is_template: - description: Whether this repository acts as a template that can be used - to generate new repositories. - default: false - type: boolean - example: true - topics: + example: 2 + repositories: type: array items: - type: string - has_issues: - description: Whether issues are enabled. - default: true - type: boolean - example: true - has_projects: - description: Whether projects are enabled. - default: true - type: boolean - example: true - has_wiki: - description: Whether the wiki is enabled. - default: true - type: boolean - example: true - has_pages: - type: boolean - has_downloads: - description: Whether downloads are enabled. - default: true - type: boolean - example: true - archived: - description: Whether the repository is archived. - default: false - type: boolean - disabled: - type: boolean - description: Returns whether or not this repository disabled. - visibility: - description: 'The repository visibility: public, private, or internal.' - default: public + "$ref": "#/components/schemas/advanced-security-active-committers-repository" + required: + - repositories + actor: + title: Actor + description: Actor + type: object + properties: + id: + type: integer + login: type: string - pushed_at: + display_login: type: string - format: date-time - example: '2011-01-26T19:06:43Z' - nullable: true - created_at: + gravatar_id: type: string - format: date-time - example: '2011-01-26T19:01:12Z' nullable: true - updated_at: + url: type: string - format: date-time - example: '2011-01-26T19:14:43Z' - nullable: true - allow_rebase_merge: - description: Whether to allow rebase merges for pull requests. - default: true - type: boolean - example: true - template_repository: - nullable: true - type: object - properties: - id: - type: integer - node_id: - type: string - name: - type: string - full_name: - type: string - owner: - type: object - properties: - login: - type: string - id: - type: integer - node_id: - type: string - avatar_url: - type: string - gravatar_id: - type: string - url: - type: string - html_url: - type: string - followers_url: - type: string - following_url: - type: string - gists_url: - type: string - starred_url: - type: string - subscriptions_url: - type: string - organizations_url: - type: string - repos_url: - type: string - events_url: - type: string - received_events_url: - type: string - type: - type: string - site_admin: - type: boolean - private: - type: boolean - html_url: - type: string - description: - type: string - fork: - type: boolean - url: - type: string - archive_url: - type: string - assignees_url: - type: string - blobs_url: - type: string - branches_url: - type: string - collaborators_url: - type: string - comments_url: - type: string - commits_url: - type: string - compare_url: - type: string - contents_url: - type: string - contributors_url: - type: string - deployments_url: - type: string - downloads_url: - type: string - events_url: - type: string - forks_url: - type: string - git_commits_url: - type: string - git_refs_url: - type: string - git_tags_url: - type: string - git_url: - type: string - issue_comment_url: - type: string - issue_events_url: - type: string - issues_url: - type: string - keys_url: - type: string - labels_url: - type: string - languages_url: - type: string - merges_url: - type: string - milestones_url: - type: string - notifications_url: - type: string - pulls_url: - type: string - releases_url: - type: string - ssh_url: - type: string - stargazers_url: - type: string - statuses_url: - type: string - subscribers_url: - type: string - subscription_url: - type: string - tags_url: - type: string - teams_url: - type: string - trees_url: - type: string - clone_url: - type: string - mirror_url: - type: string - hooks_url: - type: string - svn_url: - type: string - homepage: - type: string - language: - type: string - forks_count: - type: integer - stargazers_count: - type: integer - watchers_count: - type: integer - size: - type: integer - default_branch: - type: string - open_issues_count: - type: integer - is_template: - type: boolean - topics: - type: array - items: - type: string - has_issues: - type: boolean - has_projects: - type: boolean - has_wiki: - type: boolean - has_pages: - type: boolean - has_downloads: - type: boolean - archived: - type: boolean - disabled: - type: boolean - visibility: - type: string - pushed_at: - type: string - created_at: - type: string - updated_at: - type: string - permissions: - type: object - properties: - admin: - type: boolean - maintain: - type: boolean - push: - type: boolean - triage: - type: boolean - pull: - type: boolean - allow_rebase_merge: - type: boolean - temp_clone_token: - type: string - allow_squash_merge: - type: boolean - allow_auto_merge: - type: boolean - delete_branch_on_merge: - type: boolean - allow_update_branch: - type: boolean - allow_merge_commit: - type: boolean - subscribers_count: - type: integer - network_count: - type: integer - temp_clone_token: + format: uri + avatar_url: type: string - allow_squash_merge: - description: Whether to allow squash merges for pull requests. - default: true - type: boolean - example: true - allow_auto_merge: - description: Whether to allow Auto-merge to be used on pull requests. - default: false - type: boolean - example: false - delete_branch_on_merge: - description: Whether to delete head branches when pull requests are merged - default: false - type: boolean - example: false - allow_merge_commit: - description: Whether to allow merge commits for pull requests. - default: true - type: boolean - example: true - allow_forking: - description: Whether to allow forking this repo - type: boolean - subscribers_count: + format: uri + required: + - id + - login + - gravatar_id + - url + - avatar_url + nullable-milestone: + title: Milestone + description: A collection of related issues and pull requests. + type: object + properties: + url: + type: string + format: uri + example: https://api.github.com/repos/octocat/Hello-World/milestones/1 + html_url: + type: string + format: uri + example: https://github.com/octocat/Hello-World/milestones/v1.0 + labels_url: + type: string + format: uri + example: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + id: type: integer - network_count: + example: 1002604 + node_id: + type: string + example: MDk6TWlsZXN0b25lMTAwMjYwNA== + number: + description: The number of the milestone. type: integer + example: 42 + state: + description: The state of the milestone. + example: open + type: string + enum: + - open + - closed + default: open + title: + description: The title of the milestone. + example: v1.0 + type: string + description: + type: string + example: Tracking milestone for version 1.0 + nullable: true + creator: + "$ref": "#/components/schemas/nullable-simple-user" open_issues: type: integer - watchers: + example: 4 + closed_issues: type: integer - master_branch: + example: 8 + created_at: type: string - starred_at: + format: date-time + example: '2011-04-10T20:09:31Z' + updated_at: type: string - example: '"2020-07-09T00:17:42Z"' + format: date-time + example: '2014-03-03T18:58:10Z' + closed_at: + type: string + format: date-time + example: '2013-02-12T13:22:01Z' + nullable: true + due_on: + type: string + format: date-time + example: '2012-10-09T23:39:01Z' + nullable: true required: - - archive_url - - assignees_url - - blobs_url - - branches_url - - collaborators_url - - comments_url - - commits_url - - compare_url - - contents_url - - contributors_url - - deployments_url + - closed_issues + - creator - description - - downloads_url - - events_url - - fork - - forks_url - - full_name - - git_commits_url - - git_refs_url - - git_tags_url - - hooks_url - - html_url + - due_on + - closed_at - id - node_id - - issue_comment_url - - issue_events_url - - issues_url - - keys_url - labels_url - - languages_url - - merges_url - - milestones_url - - name - - notifications_url - - owner - - private - - pulls_url - - releases_url - - stargazers_url - - statuses_url - - subscribers_url - - subscription_url - - tags_url - - teams_url - - trees_url - - url - - clone_url - - default_branch - - forks - - forks_count - - git_url - - has_downloads - - has_issues - - has_projects - - has_wiki - - has_pages - - homepage - - language - - archived - - disabled - - mirror_url + - html_url + - number - open_issues - - open_issues_count - - license - - pushed_at - - size - - ssh_url - - stargazers_count - - svn_url - - watchers - - watchers_count + - state + - title + - url - created_at - updated_at nullable: true - minimal-repository: - title: Minimal Repository - description: Minimal Repository + nullable-integration: + title: GitHub app + description: GitHub apps are a new way to extend GitHub. They can be installed + directly on organizations and user accounts and granted access to specific + repositories. They come with granular permissions and built-in webhooks. GitHub + apps are first class actors within GitHub. type: object properties: id: + description: Unique identifier of the GitHub app + example: 37 type: integer - example: 1296269 - node_id: - type: string - example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: + slug: + description: The slug name of the GitHub app + example: probot-owners type: string - example: Hello-World - full_name: + node_id: type: string - example: octocat/Hello-World + example: MDExOkludGVncmF0aW9uMQ== owner: - "$ref": "#/components/schemas/simple-user" - private: - type: boolean - html_url: + "$ref": "#/components/schemas/nullable-simple-user" + name: + description: The name of the GitHub app + example: Probot Owners type: string - format: uri - example: https://github.com/octocat/Hello-World description: type: string - example: This your first repo! + example: The description of the app. nullable: true - fork: - type: boolean - url: + external_url: type: string format: uri - example: https://api.github.com/repos/octocat/Hello-World - archive_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: + example: https://example.com + html_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: + format: uri + example: https://github.com/apps/super-ci + created_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: + format: date-time + example: '2017-07-08T16:18:44-04:00' + updated_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: + format: date-time + example: '2017-07-08T16:18:44-04:00' + permissions: + description: The set of permissions for the GitHub app + type: object + properties: + issues: + type: string + checks: + type: string + metadata: + type: string + contents: + type: string + deployments: + type: string + additionalProperties: + type: string + example: + issues: read + deployments: write + events: + description: The list of events for the GitHub app + example: + - label + - deployment + type: array + items: + type: string + installations_count: + description: The number of installations associated with the GitHub app + example: 5 + type: integer + client_id: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: + example: '"Iv1.25b5d1e65ffc4022"' + client_secret: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: + example: '"1d4b2097ac622ba702d19de498f005747a8b21d3"' + webhook_secret: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/downloads - events_url: + example: '"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' + nullable: true + pem: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/events - forks_url: + example: '"-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END + RSA PRIVATE KEY-----\n"' + required: + - id + - node_id + - owner + - name + - description + - external_url + - html_url + - created_at + - updated_at + - permissions + - events + nullable: true + author-association: + title: author_association + type: string + example: OWNER + description: How the author is associated with the repository. + enum: + - COLLABORATOR + - CONTRIBUTOR + - FIRST_TIMER + - FIRST_TIME_CONTRIBUTOR + - MANNEQUIN + - MEMBER + - NONE + - OWNER + reaction-rollup: + title: Reaction Rollup + type: object + properties: + url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: - type: string - issue_comment_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: + total_count: + type: integer + "+1": + type: integer + "-1": + type: integer + laugh: + type: integer + confused: + type: integer + heart: + type: integer + hooray: + type: integer + eyes: + type: integer + rocket: + type: integer + required: + - url + - total_count + - "+1" + - "-1" + - laugh + - confused + - heart + - hooray + - eyes + - rocket + issue: + title: Issue + description: Issues are a great way to keep track of tasks, enhancements, and + bugs for your projects. + type: object + properties: + id: + type: integer + node_id: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/languages - merges_url: + url: + description: URL for the issue + example: https://api.github.com/repositories/42/issues/1 type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/merges - milestones_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: - type: string - stargazers_url: + repository_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: + labels_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: + comments_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscription - tags_url: + events_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/tags - teams_url: + html_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/teams - trees_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: + number: + description: Number uniquely identifying the issue within its repository + example: 42 + type: integer + state: + description: State of the issue; either 'open' or 'closed' + example: open type: string - mirror_url: + state_reason: + description: The reason for the current state + example: not_planned type: string nullable: true - hooks_url: - type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/hooks - svn_url: - type: string - homepage: + enum: + - completed + - reopened + - not_planned + title: + description: Title of the issue + example: Widget creation fails in Safari on OS X 10.8 type: string - nullable: true - language: + body: + description: Contents of the issue + example: It looks like the new widget form is broken on Safari. When I try + and create the widget, Safari crashes. This is reproducible on 10.8, but + not 10.9. Maybe a browser bug? type: string nullable: true - forks_count: - type: integer - stargazers_count: - type: integer - watchers_count: - type: integer - size: - type: integer - default_branch: - type: string - open_issues_count: - type: integer - is_template: - type: boolean - topics: + user: + "$ref": "#/components/schemas/nullable-simple-user" + labels: + description: Labels to associate with this issue; pass one or more label + names to replace the set of labels on this issue; send an empty array + to clear all labels from the issue; note that the labels are silently + dropped for users without push access to the repository + example: + - bug + - registration type: array items: - type: string - has_issues: - type: boolean - has_projects: - type: boolean - has_wiki: - type: boolean - has_pages: - type: boolean - has_downloads: - type: boolean - archived: - type: boolean - disabled: - type: boolean - visibility: - type: string - pushed_at: - type: string - format: date-time - example: '2011-01-26T19:06:43Z' - nullable: true - created_at: - type: string - format: date-time - example: '2011-01-26T19:01:12Z' + oneOf: + - type: string + - type: object + properties: + id: + type: integer + format: int64 + node_id: + type: string + url: + type: string + format: uri + name: + type: string + description: + type: string + nullable: true + color: + type: string + nullable: true + default: + type: boolean + assignee: + "$ref": "#/components/schemas/nullable-simple-user" + assignees: + type: array + items: + "$ref": "#/components/schemas/simple-user" nullable: true - updated_at: + milestone: + "$ref": "#/components/schemas/nullable-milestone" + locked: + type: boolean + active_lock_reason: type: string - format: date-time - example: '2011-01-26T19:14:43Z' nullable: true - permissions: - type: object - properties: - admin: - type: boolean - maintain: - type: boolean - push: - type: boolean - triage: - type: boolean - pull: - type: boolean - role_name: - type: string - example: admin - template_repository: - "$ref": "#/components/schemas/nullable-repository" - temp_clone_token: - type: string - delete_branch_on_merge: - type: boolean - subscribers_count: - type: integer - network_count: + comments: type: integer - code_of_conduct: - "$ref": "#/components/schemas/code-of-conduct" - license: + pull_request: type: object properties: - key: + merged_at: type: string - name: + format: date-time + nullable: true + diff_url: type: string - spdx_id: + format: uri + nullable: true + html_url: type: string - url: + format: uri + nullable: true + patch_url: type: string - node_id: + format: uri + nullable: true + url: type: string + format: uri + nullable: true + required: + - diff_url + - html_url + - patch_url + - url + closed_at: + type: string + format: date-time nullable: true - forks: - type: integer - example: 0 - open_issues: - type: integer - example: 0 - watchers: - type: integer - example: 0 - allow_forking: + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + draft: type: boolean + closed_by: + "$ref": "#/components/schemas/nullable-simple-user" + body_html: + type: string + body_text: + type: string + timeline_url: + type: string + format: uri + repository: + "$ref": "#/components/schemas/repository" + performed_via_github_app: + "$ref": "#/components/schemas/nullable-integration" + author_association: + "$ref": "#/components/schemas/author-association" + reactions: + "$ref": "#/components/schemas/reaction-rollup" required: - - archive_url - - assignees_url - - blobs_url - - branches_url - - collaborators_url + - assignee + - closed_at + - comments - comments_url - - commits_url - - compare_url - - contents_url - - contributors_url - - deployments_url - - description - - downloads_url - events_url - - fork - - forks_url - - full_name - - git_commits_url - - git_refs_url - - git_tags_url - - hooks_url - html_url - id - node_id - - issue_comment_url - - issue_events_url - - issues_url - - keys_url + - labels - labels_url - - languages_url - - merges_url - - milestones_url - - name - - notifications_url - - owner - - private - - pulls_url - - releases_url - - stargazers_url - - statuses_url - - subscribers_url - - subscription_url - - tags_url - - teams_url - - trees_url + - milestone + - number + - repository_url + - state + - locked + - title - url - organization-secret-scanning-alert: + - user + - author_association + - created_at + - updated_at + issue-comment: + title: Issue Comment + description: Comments provide a way for people to collaborate on an issue. type: object properties: - number: - "$ref": "#/components/schemas/alert-number" - created_at: - "$ref": "#/components/schemas/alert-created-at" + id: + description: Unique identifier of the issue comment + example: 42 + type: integer + node_id: + type: string url: - "$ref": "#/components/schemas/alert-url" + description: URL for the issue comment + example: https://api.github.com/repositories/42/issues/comments/1 + type: string + format: uri + body: + description: Contents of the issue comment + example: What version of Safari were you using when you observed this bug? + type: string + body_text: + type: string + body_html: + type: string html_url: - "$ref": "#/components/schemas/alert-html-url" - locations_url: type: string format: uri - description: The REST API URL of the code locations for this alert. - state: - "$ref": "#/components/schemas/secret-scanning-alert-state" - resolution: - "$ref": "#/components/schemas/secret-scanning-alert-resolution" - resolved_at: + user: + "$ref": "#/components/schemas/nullable-simple-user" + created_at: type: string format: date-time - description: 'The time that the alert was resolved in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' - nullable: true - resolved_by: - "$ref": "#/components/schemas/nullable-simple-user" - secret_type: + example: '2011-04-14T16:00:49Z' + updated_at: type: string - description: The type of secret that secret scanning detected. - secret: + format: date-time + example: '2011-04-14T16:00:49Z' + issue_url: type: string - description: The secret that was detected. - repository: - "$ref": "#/components/schemas/minimal-repository" - actions-billing-usage: - type: object - properties: - total_minutes_used: - type: integer - description: The sum of the free and paid GitHub Actions minutes used. - total_paid_minutes_used: - type: integer - description: The total paid GitHub Actions minutes used. - included_minutes: - type: integer - description: The amount of free GitHub Actions minutes available. - minutes_used_breakdown: - type: object - properties: - UBUNTU: - type: integer - description: Total minutes used on Ubuntu runner machines. - MACOS: - type: integer - description: Total minutes used on macOS runner machines. - WINDOWS: - type: integer - description: Total minutes used on Windows runner machines. + format: uri + author_association: + "$ref": "#/components/schemas/author-association" + performed_via_github_app: + "$ref": "#/components/schemas/nullable-integration" + reactions: + "$ref": "#/components/schemas/reaction-rollup" required: - - total_minutes_used - - total_paid_minutes_used - - included_minutes - - minutes_used_breakdown - advanced-security-active-committers-user: + - id + - node_id + - html_url + - issue_url + - author_association + - user + - url + - created_at + - updated_at + event: + title: Event + description: Event type: object properties: - user_login: - type: string - last_pushed_date: + id: type: string - example: '2021-11-03' - required: - - user_login - - last_pushed_date - advanced-security-active-committers-repository: - type: object - properties: - name: + type: type: string - example: octocat/Hello-World - advanced_security_committers: - type: integer - example: 25 - advanced_security_committers_breakdown: - type: array - items: - "$ref": "#/components/schemas/advanced-security-active-committers-user" - required: - - name - - advanced_security_committers - - advanced_security_committers_breakdown - advanced-security-active-committers: - type: object - properties: - total_advanced_security_committers: - type: integer - example: 25 - repositories: - type: array - items: - "$ref": "#/components/schemas/advanced-security-active-committers-repository" - required: - - repositories - packages-billing-usage: - type: object - properties: - total_gigabytes_bandwidth_used: - type: integer - description: Sum of the free and paid storage space (GB) for GitHuub Packages. - total_paid_gigabytes_bandwidth_used: - type: integer - description: Total paid storage space (GB) for GitHuub Packages. - included_gigabytes_bandwidth: - type: integer - description: Free storage space (GB) for GitHub Packages. + nullable: true + actor: + "$ref": "#/components/schemas/actor" + repo: + type: object + properties: + id: + type: integer + name: + type: string + url: + type: string + format: uri + required: + - id + - name + - url + org: + "$ref": "#/components/schemas/actor" + payload: + type: object + properties: + action: + type: string + issue: + "$ref": "#/components/schemas/issue" + comment: + "$ref": "#/components/schemas/issue-comment" + pages: + type: array + items: + type: object + properties: + page_name: + type: string + title: + type: string + summary: + type: string + nullable: true + action: + type: string + sha: + type: string + html_url: + type: string + public: + type: boolean + created_at: + type: string + format: date-time + nullable: true required: - - total_gigabytes_bandwidth_used - - total_paid_gigabytes_bandwidth_used - - included_gigabytes_bandwidth - combined-billing-usage: + - id + - type + - actor + - repo + - payload + - public + - created_at + link-with-type: + title: Link With Type + description: Hypermedia Link with Type type: object properties: - days_left_in_billing_cycle: - type: integer - description: Numbers of days left in billing cycle. - estimated_paid_storage_for_month: - type: integer - description: Estimated storage space (GB) used in billing cycle. - estimated_storage_for_month: - type: integer - description: Estimated sum of free and paid storage space (GB) used in billing - cycle. + href: + type: string + type: + type: string required: - - days_left_in_billing_cycle - - estimated_paid_storage_for_month - - estimated_storage_for_month - actor: - title: Actor - description: Actor + - href + - type + feed: + title: Feed + description: Feed type: object properties: - id: - type: integer - login: + timeline_url: type: string - display_login: + example: https://github.com/timeline + user_url: type: string - gravatar_id: + example: https://github.com/{user} + current_user_public_url: type: string - nullable: true - url: + example: https://github.com/octocat + current_user_url: type: string - format: uri - avatar_url: + example: https://github.com/octocat.private?token=abc123 + current_user_actor_url: type: string - format: uri + example: https://github.com/octocat.private.actor?token=abc123 + current_user_organization_url: + type: string + example: https://github.com/octocat-org + current_user_organization_urls: + type: array + example: + - https://github.com/organizations/github/octocat.private.atom?token=abc123 + items: + type: string + format: uri + security_advisories_url: + type: string + example: https://github.com/security-advisories + _links: + type: object + properties: + timeline: + "$ref": "#/components/schemas/link-with-type" + user: + "$ref": "#/components/schemas/link-with-type" + security_advisories: + "$ref": "#/components/schemas/link-with-type" + current_user: + "$ref": "#/components/schemas/link-with-type" + current_user_public: + "$ref": "#/components/schemas/link-with-type" + current_user_actor: + "$ref": "#/components/schemas/link-with-type" + current_user_organization: + "$ref": "#/components/schemas/link-with-type" + current_user_organizations: + type: array + items: + "$ref": "#/components/schemas/link-with-type" + required: + - timeline + - user required: - - id - - login - - gravatar_id - - url - - avatar_url - nullable-milestone: - title: Milestone - description: A collection of related issues and pull requests. + - _links + - timeline_url + - user_url + base-gist: + title: Base Gist + description: Base Gist type: object properties: url: type: string format: uri - example: https://api.github.com/repos/octocat/Hello-World/milestones/1 - html_url: + forks_url: type: string format: uri - example: https://github.com/octocat/Hello-World/milestones/v1.0 - labels_url: + commits_url: type: string format: uri - example: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels id: - type: integer - example: 1002604 + type: string node_id: type: string - example: MDk6TWlsZXN0b25lMTAwMjYwNA== - number: - description: The number of the milestone. - type: integer - example: 42 - state: - description: The state of the milestone. - example: open + git_pull_url: type: string - enum: - - open - - closed - default: open - title: - description: The title of the milestone. - example: v1.0 + format: uri + git_push_url: type: string - description: + format: uri + html_url: type: string - example: Tracking milestone for version 1.0 - nullable: true - creator: - "$ref": "#/components/schemas/nullable-simple-user" - open_issues: - type: integer - example: 4 - closed_issues: - type: integer - example: 8 + format: uri + files: + type: object + additionalProperties: + type: object + properties: + filename: + type: string + type: + type: string + language: + type: string + raw_url: + type: string + size: + type: integer + public: + type: boolean created_at: type: string format: date-time - example: '2011-04-10T20:09:31Z' updated_at: type: string format: date-time - example: '2014-03-03T18:58:10Z' - closed_at: + description: type: string - format: date-time - example: '2013-02-12T13:22:01Z' nullable: true - due_on: + comments: + type: integer + user: + "$ref": "#/components/schemas/nullable-simple-user" + comments_url: type: string - format: date-time - example: '2012-10-09T23:39:01Z' - nullable: true + format: uri + owner: + "$ref": "#/components/schemas/simple-user" + truncated: + type: boolean + forks: + type: array + items: {} + history: + type: array + items: {} required: - - closed_issues - - creator - - description - - due_on - - closed_at - id - node_id - - labels_url - - html_url - - number - - open_issues - - state - - title - url + - forks_url + - commits_url + - git_pull_url + - git_push_url + - html_url + - comments_url + - public + - description + - comments + - user + - files - created_at - updated_at - nullable: true - nullable-integration: - title: GitHub app - description: GitHub apps are a new way to extend GitHub. They can be installed - directly on organizations and user accounts and granted access to specific - repositories. They come with granular permissions and built-in webhooks. GitHub - apps are first class actors within GitHub. + public-user: + title: Public User + description: Public User type: object properties: + login: + type: string id: - description: Unique identifier of the GitHub app - example: 37 type: integer - slug: - description: The slug name of the GitHub app - example: probot-owners - type: string node_id: type: string - example: MDExOkludGVncmF0aW9uMQ== - owner: - "$ref": "#/components/schemas/nullable-simple-user" - name: - description: The name of the GitHub app - example: Probot Owners + avatar_url: type: string - description: + format: uri + gravatar_id: type: string - example: The description of the app. nullable: true - external_url: + url: type: string format: uri - example: https://example.com html_url: type: string format: uri - example: https://github.com/apps/super-ci + followers_url: + type: string + format: uri + following_url: + type: string + gists_url: + type: string + starred_url: + type: string + subscriptions_url: + type: string + format: uri + organizations_url: + type: string + format: uri + repos_url: + type: string + format: uri + events_url: + type: string + received_events_url: + type: string + format: uri + type: + type: string + site_admin: + type: boolean + name: + type: string + nullable: true + company: + type: string + nullable: true + blog: + type: string + nullable: true + location: + type: string + nullable: true + email: + type: string + format: email + nullable: true + hireable: + type: boolean + nullable: true + bio: + type: string + nullable: true + twitter_username: + type: string + nullable: true + public_repos: + type: integer + public_gists: + type: integer + followers: + type: integer + following: + type: integer created_at: type: string format: date-time - example: '2017-07-08T16:18:44-04:00' updated_at: type: string format: date-time - example: '2017-07-08T16:18:44-04:00' - permissions: - description: The set of permissions for the GitHub app + plan: type: object properties: - issues: - type: string - checks: - type: string - metadata: - type: string - contents: - type: string - deployments: + collaborators: + type: integer + name: type: string - additionalProperties: - type: string - example: - issues: read - deployments: write - events: - description: The list of events for the GitHub app - example: - - label - - deployment - type: array - items: - type: string - installations_count: - description: The number of installations associated with the GitHub app - example: 5 - type: integer - client_id: - type: string - example: '"Iv1.25b5d1e65ffc4022"' - client_secret: - type: string - example: '"1d4b2097ac622ba702d19de498f005747a8b21d3"' - webhook_secret: + space: + type: integer + private_repos: + type: integer + required: + - collaborators + - name + - space + - private_repos + suspended_at: type: string - example: '"6fba8f2fc8a7e8f2cca5577eddd82ca7586b3b6b"' + format: date-time nullable: true - pem: - type: string - example: '"-----BEGIN RSA PRIVATE KEY-----\nMIIEogIBAAKCAQEArYxrNYD/iT5CZVpRJu4rBKmmze3PVmT/gCo2ATUvDvZTPTey\nxcGJ3vvrJXazKk06pN05TN29o98jrYz4cengG3YGsXPNEpKsIrEl8NhbnxapEnM9\nJCMRe0P5JcPsfZlX6hmiT7136GRWiGOUba2X9+HKh8QJVLG5rM007TBER9/z9mWm\nrJuNh+m5l320oBQY/Qq3A7wzdEfZw8qm/mIN0FCeoXH1L6B8xXWaAYBwhTEh6SSn\nZHlO1Xu1JWDmAvBCi0RO5aRSKM8q9QEkvvHP4yweAtK3N8+aAbZ7ovaDhyGz8r6r\nzhU1b8Uo0Z2ysf503WqzQgIajr7Fry7/kUwpgQIDAQABAoIBADwJp80Ko1xHPZDy\nfcCKBDfIuPvkmSW6KumbsLMaQv1aGdHDwwTGv3t0ixSay8CGlxMRtRDyZPib6SvQ\n6OH/lpfpbMdW2ErkksgtoIKBVrDilfrcAvrNZu7NxRNbhCSvN8q0s4ICecjbbVQh\nnueSdlA6vGXbW58BHMq68uRbHkP+k+mM9U0mDJ1HMch67wlg5GbayVRt63H7R2+r\nVxcna7B80J/lCEjIYZznawgiTvp3MSanTglqAYi+m1EcSsP14bJIB9vgaxS79kTu\noiSo93leJbBvuGo8QEiUqTwMw4tDksmkLsoqNKQ1q9P7LZ9DGcujtPy4EZsamSJT\ny8OJt0ECgYEA2lxOxJsQk2kI325JgKFjo92mQeUObIvPfSNWUIZQDTjniOI6Gv63\nGLWVFrZcvQBWjMEQraJA9xjPbblV8PtfO87MiJGLWCHFxmPz2dzoedN+2Coxom8m\nV95CLz8QUShuao6u/RYcvUaZEoYs5bHcTmy5sBK80JyEmafJPtCQVxMCgYEAy3ar\nZr3yv4xRPEPMat4rseswmuMooSaK3SKub19WFI5IAtB/e7qR1Rj9JhOGcZz+OQrl\nT78O2OFYlgOIkJPvRMrPpK5V9lslc7tz1FSh3BZMRGq5jSyD7ETSOQ0c8T2O/s7v\nbeEPbVbDe4mwvM24XByH0GnWveVxaDl51ABD65sCgYB3ZAspUkOA5egVCh8kNpnd\nSd6SnuQBE3ySRlT2WEnCwP9Ph6oPgn+oAfiPX4xbRqkL8q/k0BdHQ4h+zNwhk7+h\nWtPYRAP1Xxnc/F+jGjb+DVaIaKGU18MWPg7f+FI6nampl3Q0KvfxwX0GdNhtio8T\nTj1E+SnFwh56SRQuxSh2gwKBgHKjlIO5NtNSflsUYFM+hyQiPiqnHzddfhSG+/3o\nm5nNaSmczJesUYreH5San7/YEy2UxAugvP7aSY2MxB+iGsiJ9WD2kZzTUlDZJ7RV\nUzWsoqBR+eZfVJ2FUWWvy8TpSG6trh4dFxImNtKejCR1TREpSiTV3Zb1dmahK9GV\nrK9NAoGAbBxRLoC01xfxCTgt5BDiBcFVh4fp5yYKwavJPLzHSpuDOrrI9jDn1oKN\nonq5sDU1i391zfQvdrbX4Ova48BN+B7p63FocP/MK5tyyBoT8zQEk2+vWDOw7H/Z\nu5dTCPxTIsoIwUw1I+7yIxqJzLPFgR2gVBwY1ra/8iAqCj+zeBw=\n-----END - RSA PRIVATE KEY-----\n"' + private_gists: + type: integer + example: 1 + total_private_repos: + type: integer + example: 2 + owned_private_repos: + type: integer + example: 2 + disk_usage: + type: integer + example: 1 + collaborators: + type: integer + example: 3 required: + - avatar_url + - events_url + - followers_url + - following_url + - gists_url + - gravatar_id + - html_url - id - node_id - - owner + - login + - organizations_url + - received_events_url + - repos_url + - site_admin + - starred_url + - subscriptions_url + - type + - url + - bio + - blog + - company + - email + - followers + - following + - hireable + - location - name - - description - - external_url - - html_url + - public_gists + - public_repos - created_at - updated_at - - permissions - - events - nullable: true - author_association: - title: author_association - type: string - example: OWNER - description: How the author is associated with the repository. - enum: - - COLLABORATOR - - CONTRIBUTOR - - FIRST_TIMER - - FIRST_TIME_CONTRIBUTOR - - MANNEQUIN - - MEMBER - - NONE - - OWNER - reaction-rollup: - title: Reaction Rollup + additionalProperties: false + gist-history: + title: Gist History + description: Gist History type: object properties: + user: + "$ref": "#/components/schemas/nullable-simple-user" + version: + type: string + committed_at: + type: string + format: date-time + change_status: + type: object + properties: + total: + type: integer + additions: + type: integer + deletions: + type: integer url: type: string format: uri - total_count: - type: integer - "+1": - type: integer - "-1": - type: integer - laugh: - type: integer - confused: - type: integer - heart: - type: integer - hooray: - type: integer - eyes: - type: integer - rocket: - type: integer - required: - - url - - total_count - - "+1" - - "-1" - - laugh - - confused - - heart - - hooray - - eyes - - rocket - issue: - title: Issue - description: Issues are a great way to keep track of tasks, enhancements, and - bugs for your projects. + gist-simple: + title: Gist Simple + description: Gist Simple type: object properties: - id: - type: integer - node_id: - type: string - url: - description: URL for the issue - example: https://api.github.com/repositories/42/issues/1 - type: string - format: uri - repository_url: - type: string - format: uri - labels_url: - type: string - comments_url: - type: string - format: uri - events_url: - type: string - format: uri - html_url: - type: string - format: uri - number: - description: Number uniquely identifying the issue within its repository - example: 42 - type: integer - state: - description: State of the issue; either 'open' or 'closed' - example: open - type: string - title: - description: Title of the issue - example: Widget creation fails in Safari on OS X 10.8 - type: string - body: - description: Contents of the issue - example: It looks like the new widget form is broken on Safari. When I try - and create the widget, Safari crashes. This is reproducible on 10.8, but - not 10.9. Maybe a browser bug? - type: string + forks: + deprecated: true nullable: true - user: - "$ref": "#/components/schemas/nullable-simple-user" - labels: - description: Labels to associate with this issue; pass one or more label - names to replace the set of labels on this issue; send an empty array - to clear all labels from the issue; note that the labels are silently - dropped for users without push access to the repository - example: - - bug - - registration type: array items: - oneOf: - - type: string - - type: object - properties: - id: - type: integer - format: int64 - node_id: - type: string - url: - type: string - format: uri - name: - type: string - description: - type: string - nullable: true - color: - type: string - nullable: true - default: - type: boolean - assignee: - "$ref": "#/components/schemas/nullable-simple-user" - assignees: + type: object + properties: + id: + type: string + url: + type: string + format: uri + user: + "$ref": "#/components/schemas/public-user" + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + history: + deprecated: true + nullable: true type: array items: - "$ref": "#/components/schemas/simple-user" - nullable: true - milestone: - "$ref": "#/components/schemas/nullable-milestone" - locked: - type: boolean - active_lock_reason: - type: string + "$ref": "#/components/schemas/gist-history" + fork_of: nullable: true - comments: - type: integer - pull_request: + title: Gist + description: Gist type: object properties: - merged_at: - type: string - format: date-time - nullable: true - diff_url: - type: string - format: uri - nullable: true - html_url: + url: type: string format: uri - nullable: true - patch_url: + forks_url: type: string format: uri - nullable: true - url: + commits_url: type: string format: uri - nullable: true - required: - - diff_url - - html_url - - patch_url - - url - closed_at: - type: string - format: date-time - nullable: true - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - draft: - type: boolean - closed_by: - "$ref": "#/components/schemas/nullable-simple-user" - body_html: - type: string - body_text: - type: string - timeline_url: - type: string - format: uri - repository: - "$ref": "#/components/schemas/repository" - performed_via_github_app: - "$ref": "#/components/schemas/nullable-integration" - author_association: - "$ref": "#/components/schemas/author_association" - reactions: - "$ref": "#/components/schemas/reaction-rollup" - required: - - assignee - - closed_at - - comments - - comments_url - - events_url - - html_url - - id - - node_id - - labels - - labels_url - - milestone - - number - - repository_url - - state - - locked - - title - - url - - user - - author_association - - created_at - - updated_at - issue-comment: - title: Issue Comment - description: Comments provide a way for people to collaborate on an issue. - type: object - properties: - id: - description: Unique identifier of the issue comment - example: 42 - type: integer - node_id: - type: string - url: - description: URL for the issue comment - example: https://api.github.com/repositories/42/issues/comments/1 - type: string - format: uri - body: - description: Contents of the issue comment - example: What version of Safari were you using when you observed this bug? - type: string - body_text: - type: string - body_html: - type: string - html_url: - type: string - format: uri - user: - "$ref": "#/components/schemas/nullable-simple-user" - created_at: - type: string - format: date-time - example: '2011-04-14T16:00:49Z' - updated_at: - type: string - format: date-time - example: '2011-04-14T16:00:49Z' - issue_url: - type: string - format: uri - author_association: - "$ref": "#/components/schemas/author_association" - performed_via_github_app: - "$ref": "#/components/schemas/nullable-integration" - reactions: - "$ref": "#/components/schemas/reaction-rollup" - required: - - id - - node_id - - html_url - - issue_url - - author_association - - user - - url - - created_at - - updated_at - event: - title: Event - description: Event - type: object - properties: - id: - type: string - type: - type: string - nullable: true - actor: - "$ref": "#/components/schemas/actor" - repo: - type: object - properties: id: - type: integer - name: type: string - url: + node_id: + type: string + git_pull_url: type: string format: uri - required: - - id - - name - - url - org: - "$ref": "#/components/schemas/actor" - payload: - type: object - properties: - action: + git_push_url: type: string - issue: - "$ref": "#/components/schemas/issue" - comment: - "$ref": "#/components/schemas/issue-comment" - pages: - type: array - items: + format: uri + html_url: + type: string + format: uri + files: + type: object + additionalProperties: type: object properties: - page_name: - type: string - title: - type: string - summary: + filename: type: string - nullable: true - action: + type: type: string - sha: + language: type: string - html_url: + raw_url: type: string - public: - type: boolean - created_at: - type: string - format: date-time - nullable: true - required: - - id - - type - - actor - - repo - - payload - - public - - created_at - link-with-type: - title: Link With Type - description: Hypermedia Link with Type - type: object - properties: - href: - type: string - type: - type: string - required: - - href - - type - feed: - title: Feed - description: Feed - type: object - properties: - timeline_url: - type: string - example: https://github.com/timeline - user_url: - type: string - example: https://github.com/{user} - current_user_public_url: - type: string - example: https://github.com/octocat - current_user_url: - type: string - example: https://github.com/octocat.private?token=abc123 - current_user_actor_url: - type: string - example: https://github.com/octocat.private.actor?token=abc123 - current_user_organization_url: - type: string - example: https://github.com/octocat-org - current_user_organization_urls: - type: array - example: - - https://github.com/organizations/github/octocat.private.atom?token=abc123 - items: - type: string - format: uri - security_advisories_url: - type: string - example: https://github.com/security-advisories - _links: - type: object - properties: - timeline: - "$ref": "#/components/schemas/link-with-type" + size: + type: integer + public: + type: boolean + created_at: + type: string + format: date-time + updated_at: + type: string + format: date-time + description: + type: string + nullable: true + comments: + type: integer user: - "$ref": "#/components/schemas/link-with-type" - security_advisories: - "$ref": "#/components/schemas/link-with-type" - current_user: - "$ref": "#/components/schemas/link-with-type" - current_user_public: - "$ref": "#/components/schemas/link-with-type" - current_user_actor: - "$ref": "#/components/schemas/link-with-type" - current_user_organization: - "$ref": "#/components/schemas/link-with-type" - current_user_organizations: + "$ref": "#/components/schemas/nullable-simple-user" + comments_url: + type: string + format: uri + owner: + "$ref": "#/components/schemas/nullable-simple-user" + truncated: + type: boolean + forks: type: array - items: - "$ref": "#/components/schemas/link-with-type" + items: {} + history: + type: array + items: {} required: - - timeline + - id + - node_id + - url + - forks_url + - commits_url + - git_pull_url + - git_push_url + - html_url + - comments_url + - public + - description + - comments - user - required: - - _links - - timeline_url - - user_url - base-gist: - title: Base Gist - description: Base Gist - type: object - properties: + - files + - created_at + - updated_at url: type: string - format: uri forks_url: type: string - format: uri commits_url: type: string - format: uri id: type: string node_id: type: string git_pull_url: type: string - format: uri git_push_url: type: string - format: uri html_url: type: string - format: uri files: type: object additionalProperties: + nullable: true type: object properties: filename: @@ -43293,418 +43027,41 @@ components: type: string size: type: integer + truncated: + type: boolean + content: + type: string public: type: boolean created_at: type: string - format: date-time updated_at: type: string - format: date-time description: type: string nullable: true comments: type: integer user: - "$ref": "#/components/schemas/nullable-simple-user" + type: string + nullable: true comments_url: type: string - format: uri owner: "$ref": "#/components/schemas/simple-user" truncated: type: boolean - forks: - type: array - items: {} - history: - type: array - items: {} - required: - - id - - node_id - - url - - forks_url - - commits_url - - git_pull_url - - git_push_url - - html_url - - comments_url - - public - - description - - comments - - user - - files - - created_at - - updated_at - public-user: - title: Public User - description: Public User + gist-comment: + title: Gist Comment + description: A comment made to a gist. type: object properties: - login: - type: string id: type: integer + example: 1 node_id: type: string - avatar_url: - type: string - format: uri - gravatar_id: - type: string - nullable: true - url: - type: string - format: uri - html_url: - type: string - format: uri - followers_url: - type: string - format: uri - following_url: - type: string - gists_url: - type: string - starred_url: - type: string - subscriptions_url: - type: string - format: uri - organizations_url: - type: string - format: uri - repos_url: - type: string - format: uri - events_url: - type: string - received_events_url: - type: string - format: uri - type: - type: string - site_admin: - type: boolean - name: - type: string - nullable: true - company: - type: string - nullable: true - blog: - type: string - nullable: true - location: - type: string - nullable: true - email: - type: string - format: email - nullable: true - hireable: - type: boolean - nullable: true - bio: - type: string - nullable: true - twitter_username: - type: string - nullable: true - public_repos: - type: integer - public_gists: - type: integer - followers: - type: integer - following: - type: integer - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - plan: - type: object - properties: - collaborators: - type: integer - name: - type: string - space: - type: integer - private_repos: - type: integer - required: - - collaborators - - name - - space - - private_repos - suspended_at: - type: string - format: date-time - nullable: true - private_gists: - type: integer - example: 1 - total_private_repos: - type: integer - example: 2 - owned_private_repos: - type: integer - example: 2 - disk_usage: - type: integer - example: 1 - collaborators: - type: integer - example: 3 - required: - - avatar_url - - events_url - - followers_url - - following_url - - gists_url - - gravatar_id - - html_url - - id - - node_id - - login - - organizations_url - - received_events_url - - repos_url - - site_admin - - starred_url - - subscriptions_url - - type - - url - - bio - - blog - - company - - email - - followers - - following - - hireable - - location - - name - - public_gists - - public_repos - - created_at - - updated_at - additionalProperties: false - gist-history: - title: Gist History - description: Gist History - type: object - properties: - user: - "$ref": "#/components/schemas/nullable-simple-user" - version: - type: string - committed_at: - type: string - format: date-time - change_status: - type: object - properties: - total: - type: integer - additions: - type: integer - deletions: - type: integer - url: - type: string - format: uri - gist-simple: - title: Gist Simple - description: Gist Simple - type: object - properties: - forks: - deprecated: true - nullable: true - type: array - items: - type: object - properties: - id: - type: string - url: - type: string - format: uri - user: - "$ref": "#/components/schemas/public-user" - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - history: - deprecated: true - nullable: true - type: array - items: - "$ref": "#/components/schemas/gist-history" - fork_of: - nullable: true - title: Gist - description: Gist - type: object - properties: - url: - type: string - format: uri - forks_url: - type: string - format: uri - commits_url: - type: string - format: uri - id: - type: string - node_id: - type: string - git_pull_url: - type: string - format: uri - git_push_url: - type: string - format: uri - html_url: - type: string - format: uri - files: - type: object - additionalProperties: - type: object - properties: - filename: - type: string - type: - type: string - language: - type: string - raw_url: - type: string - size: - type: integer - public: - type: boolean - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - description: - type: string - nullable: true - comments: - type: integer - user: - "$ref": "#/components/schemas/nullable-simple-user" - comments_url: - type: string - format: uri - owner: - "$ref": "#/components/schemas/nullable-simple-user" - truncated: - type: boolean - forks: - type: array - items: {} - history: - type: array - items: {} - required: - - id - - node_id - - url - - forks_url - - commits_url - - git_pull_url - - git_push_url - - html_url - - comments_url - - public - - description - - comments - - user - - files - - created_at - - updated_at - url: - type: string - forks_url: - type: string - commits_url: - type: string - id: - type: string - node_id: - type: string - git_pull_url: - type: string - git_push_url: - type: string - html_url: - type: string - files: - type: object - additionalProperties: - nullable: true - type: object - properties: - filename: - type: string - type: - type: string - language: - type: string - raw_url: - type: string - size: - type: integer - truncated: - type: boolean - content: - type: string - public: - type: boolean - created_at: - type: string - updated_at: - type: string - description: - type: string - nullable: true - comments: - type: integer - user: - type: string - nullable: true - comments_url: - type: string - owner: - "$ref": "#/components/schemas/simple-user" - truncated: - type: boolean - gist-comment: - title: Gist Comment - description: A comment made to a gist. - type: object - properties: - id: - type: integer - example: 1 - node_id: - type: string - example: MDExOkdpc3RDb21tZW50MQ== + example: MDExOkdpc3RDb21tZW50MQ== url: type: string format: uri @@ -43725,7 +43082,7 @@ components: format: date-time example: '2011-04-18T23:23:56Z' author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" required: - url - id @@ -43933,131 +43290,6 @@ components: - limitations - body - featured - marketplace-listing-plan: - title: Marketplace Listing Plan - description: Marketplace Listing Plan - type: object - properties: - url: - type: string - format: uri - example: https://api.github.com/marketplace_listing/plans/1313 - accounts_url: - type: string - format: uri - example: https://api.github.com/marketplace_listing/plans/1313/accounts - id: - type: integer - example: 1313 - number: - type: integer - example: 3 - name: - type: string - example: Pro - description: - type: string - example: A professional-grade CI solution - monthly_price_in_cents: - type: integer - example: 1099 - yearly_price_in_cents: - type: integer - example: 11870 - price_model: - type: string - example: flat-rate - has_free_trial: - type: boolean - example: true - unit_name: - type: string - nullable: true - state: - type: string - example: published - bullets: - type: array - items: - type: string - example: - - Up to 25 private repositories - - 11 concurrent builds - required: - - url - - accounts_url - - id - - number - - name - - description - - has_free_trial - - price_model - - unit_name - - monthly_price_in_cents - - state - - yearly_price_in_cents - - bullets - marketplace-purchase: - title: Marketplace Purchase - description: Marketplace Purchase - type: object - properties: - url: - type: string - type: - type: string - id: - type: integer - login: - type: string - organization_billing_email: - type: string - email: - type: string - nullable: true - marketplace_pending_change: - type: object - properties: - is_installed: - type: boolean - effective_date: - type: string - unit_count: - type: integer - nullable: true - id: - type: integer - plan: - "$ref": "#/components/schemas/marketplace-listing-plan" - nullable: true - marketplace_purchase: - type: object - properties: - billing_cycle: - type: string - next_billing_date: - type: string - nullable: true - is_installed: - type: boolean - unit_count: - type: integer - nullable: true - on_free_trial: - type: boolean - free_trial_ends_on: - type: string - nullable: true - updated_at: - type: string - plan: - "$ref": "#/components/schemas/marketplace-listing-plan" - required: - - url - - id - - type - - login - - marketplace_purchase api-overview: title: Api Overview description: Api Overview @@ -44066,47 +43298,6 @@ components: verifiable_password_authentication: type: boolean example: true - ssh_key_fingerprints: - type: object - properties: - SHA256_RSA: - type: string - SHA256_DSA: - type: string - SHA256_ECDSA: - type: string - SHA256_ED25519: - type: string - ssh_keys: - type: array - items: - type: string - example: - - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl - hooks: - type: array - items: - type: string - example: - - 127.0.0.1/32 - web: - type: array - items: - type: string - example: - - 127.0.0.1/32 - api: - type: array - items: - type: string - example: - - 127.0.0.1/32 - git: - type: array - items: - type: string - example: - - 127.0.0.1/32 packages: type: array items: @@ -44115,27 +43306,6 @@ components: - 13.65.0.0/16 - 157.55.204.33/32 - 2a01:111:f403:f90c::/62 - pages: - type: array - items: - type: string - example: - - 192.30.252.153/32 - - 192.30.252.154/32 - importer: - type: array - items: - type: string - example: - - 54.158.161.132 - - 54.226.70.38 - actions: - type: array - items: - type: string - example: - - 13.64.0.0/16 - - 13.65.0.0/16 dependabot: type: array items: @@ -44143,40 +43313,368 @@ components: example: - 192.168.7.15/32 - 192.168.7.16/32 + installed_version: + type: string + example: 3.6.0 required: - verifiable_password_authentication - thread: - title: Thread - description: Thread + minimal-repository: + title: Minimal Repository + description: Minimal Repository type: object properties: id: + type: integer + example: 1296269 + node_id: type: string - repository: - "$ref": "#/components/schemas/minimal-repository" - subject: - type: object - properties: - title: - type: string - url: - type: string - latest_comment_url: - type: string - type: - type: string - required: - - title - - url - - latest_comment_url - - type - reason: + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: type: string - unread: - type: boolean - updated_at: + example: Hello-World + full_name: type: string - last_read_at: + example: octocat/Hello-World + owner: + "$ref": "#/components/schemas/simple-user" + private: + type: boolean + html_url: + type: string + format: uri + example: https://github.com/octocat/Hello-World + description: + type: string + example: This your first repo! + nullable: true + fork: + type: boolean + url: + type: string + format: uri + example: https://api.github.com/repos/octocat/Hello-World + archive_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/downloads + events_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/events + forks_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: + type: string + issue_comment_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/languages + merges_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/merges + milestones_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: + type: string + stargazers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscription + tags_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/tags + teams_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/teams + trees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: + type: string + mirror_url: + type: string + nullable: true + hooks_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/hooks + svn_url: + type: string + homepage: + type: string + nullable: true + language: + type: string + nullable: true + forks_count: + type: integer + stargazers_count: + type: integer + watchers_count: + type: integer + size: + description: The size of the repository. Size is calculated hourly. When + a repository is initially created, the size is 0. + type: integer + default_branch: + type: string + open_issues_count: + type: integer + is_template: + type: boolean + topics: + type: array + items: + type: string + has_issues: + type: boolean + has_projects: + type: boolean + has_wiki: + type: boolean + has_pages: + type: boolean + has_downloads: + type: boolean + archived: + type: boolean + disabled: + type: boolean + visibility: + type: string + pushed_at: + type: string + format: date-time + example: '2011-01-26T19:06:43Z' + nullable: true + created_at: + type: string + format: date-time + example: '2011-01-26T19:01:12Z' + nullable: true + updated_at: + type: string + format: date-time + example: '2011-01-26T19:14:43Z' + nullable: true + permissions: + type: object + properties: + admin: + type: boolean + maintain: + type: boolean + push: + type: boolean + triage: + type: boolean + pull: + type: boolean + role_name: + type: string + example: admin + temp_clone_token: + type: string + delete_branch_on_merge: + type: boolean + subscribers_count: + type: integer + network_count: + type: integer + code_of_conduct: + "$ref": "#/components/schemas/code-of-conduct" + license: + type: object + properties: + key: + type: string + name: + type: string + spdx_id: + type: string + url: + type: string + node_id: + type: string + nullable: true + forks: + type: integer + example: 0 + open_issues: + type: integer + example: 0 + watchers: + type: integer + example: 0 + allow_forking: + type: boolean + web_commit_signoff_required: + type: boolean + example: false + required: + - archive_url + - assignees_url + - blobs_url + - branches_url + - collaborators_url + - comments_url + - commits_url + - compare_url + - contents_url + - contributors_url + - deployments_url + - description + - downloads_url + - events_url + - fork + - forks_url + - full_name + - git_commits_url + - git_refs_url + - git_tags_url + - hooks_url + - html_url + - id + - node_id + - issue_comment_url + - issue_events_url + - issues_url + - keys_url + - labels_url + - languages_url + - merges_url + - milestones_url + - name + - notifications_url + - owner + - private + - pulls_url + - releases_url + - stargazers_url + - statuses_url + - subscribers_url + - subscription_url + - tags_url + - teams_url + - trees_url + - url + thread: + title: Thread + description: Thread + type: object + properties: + id: + type: string + repository: + "$ref": "#/components/schemas/minimal-repository" + subject: + type: object + properties: + title: + type: string + url: + type: string + latest_comment_url: + type: string + type: + type: string + required: + - title + - url + - latest_comment_url + - type + reason: + type: string + unread: + type: boolean + updated_at: + type: string + last_read_at: type: string nullable: true url: @@ -44236,46 +43734,14 @@ components: type: object properties: id: + description: The unique identifier of the custom role. type: integer name: + description: The name of the custom role. type: string required: - id - name - external-groups: - title: ExternalGroups - description: A list of external groups available to be connected to a team - type: object - properties: - groups: - description: An array of external groups available to be mapped to a team - example: - - group_id: 1 - group_name: group-azuread-test - updated_at: 2021-01-03 22:27:15:000 -700 - - group_id: 2 - group_name: group-azuread-test2 - updated_at: 2021-06-03 22:27:15:000 -700 - type: array - items: - type: object - required: - - group_id - - group_name - - updated_at - properties: - group_id: - description: The internal ID of the group - example: 1 - type: integer - group_name: - description: The display name of the group - example: group-azuread-test - type: string - updated_at: - description: The time of the last update for this group - example: 2019-06-03 22:27:15:000 -700 - type: string organization-full: title: Organization Full description: Organization Full @@ -44450,6 +43916,9 @@ components: type: boolean example: false nullable: true + web_commit_signoff_required: + type: boolean + example: false updated_at: type: string format: date-time @@ -44476,10 +43945,32 @@ components: - type - created_at - updated_at + actions-cache-usage-by-repository: + title: Actions Cache Usage by repository + description: GitHub Actions Cache Usage by repository. + type: object + properties: + full_name: + description: The repository owner and name for the cache usage being shown. + type: string + example: octo-org/Hello-World + active_caches_size_in_bytes: + description: The sum of the size in bytes of all the active cache items + in the repository. + type: integer + example: 2322142 + active_caches_count: + description: The number of active caches in the repository. + type: integer + example: 3 + required: + - full_name + - active_caches_size_in_bytes + - active_caches_count enabled-repositories: type: string - description: 'The policy that controls the repositories in the organization - that are allowed to run GitHub Actions. Can be one of: `all`, `none`, or `selected`.' + description: The policy that controls the repositories in the organization that + are allowed to run GitHub Actions. enum: - all - none @@ -44500,33 +43991,6 @@ components: "$ref": "#/components/schemas/selected-actions-url" required: - enabled_repositories - actions-default-workflow-permissions: - type: string - description: The default workflow permissions granted to the GITHUB_TOKEN when - running workflows in an organization. - enum: - - read - - write - actions-can-approve-pull-request-reviews: - type: boolean - description: Whether GitHub Actions can submit approving pull request reviews. - actions-get-default-workflow-permissions: - type: object - properties: - default_workflow_permissions: - "$ref": "#/components/schemas/actions-default-workflow-permissions" - can_approve_pull_request_reviews: - "$ref": "#/components/schemas/actions-can-approve-pull-request-reviews" - required: - - default_workflow_permissions - - can_approve_pull_request_reviews - actions-set-default-workflow-permissions: - type: object - properties: - default_workflow_permissions: - "$ref": "#/components/schemas/actions-default-workflow-permissions" - can_approve_pull_request_reviews: - "$ref": "#/components/schemas/actions-can-approve-pull-request-reviews" runner-groups-org: type: object properties: @@ -44550,6 +44014,26 @@ components: type: boolean allows_public_repositories: type: boolean + workflow_restrictions_read_only: + description: If `true`, the `restricted_to_workflows` and `selected_workflows` + fields cannot be modified. + type: boolean + default: false + restricted_to_workflows: + description: If `true`, the runner group will be restricted to running only + the workflows specified in the `selected_workflows` array. + type: boolean + default: false + selected_workflows: + description: List of workflows the runner group should be allowed to run. + This setting will be ignored unless `restricted_to_workflows` is set to + `true`. + type: array + items: + type: string + description: Name of workflow the runner group should be allowed to run. + Note that a ref, tag, or long SHA is required. + example: octo-org/octo-repo/.github/workflows/deploy.yaml@main required: - id - name @@ -44623,6 +44107,14 @@ components: type: object properties: {} additionalProperties: false + code-scanning-analysis-tool-name: + type: string + description: The name of the tool used to generate the code scanning analysis. + code-scanning-analysis-tool-guid: + nullable: true + type: string + description: The GUID of the tool used to generate the code scanning analysis, + if provided in the uploaded SARIF data. code-scanning-alert-state: type: string description: State of a code scanning alert. @@ -44641,14 +44133,14 @@ components: description: The REST API URL for fetching the list of instances for an alert. format: uri readOnly: true - code-scanning-alert-fixed-at: + alert-fixed-at: type: string description: 'The time that the alert was no longer detected and was considered fixed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' format: date-time readOnly: true nullable: true - code-scanning-alert-dismissed-at: + alert-dismissed-at: type: string description: 'The time that the alert was dismissed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`.' format: date-time @@ -44657,14 +44149,18 @@ components: code-scanning-alert-dismissed-reason: type: string description: "**Required when the state is dismissed.** The reason for dismissing - or closing the alert. Can be one of: `false positive`, `won't fix`, and `used - in tests`." + or closing the alert." nullable: true enum: - - + - - false positive - won't fix - used in tests + code-scanning-alert-dismissed-comment: + type: string + description: The dismissal comment associated with the dismissal of the alert. + nullable: true + maxLength: 280 code-scanning-alert-rule: type: object properties: @@ -44709,18 +44205,15 @@ components: nullable: true type: string description: Detailed documentation for the rule as GitHub Flavored Markdown. - code-scanning-analysis-tool-name: - type: string - description: The name of the tool used to generate the code scanning analysis. + help_uri: + nullable: true + type: string + description: A link to the documentation for the rule used to detect the + alert. code-scanning-analysis-tool-version: nullable: true type: string description: The version of the tool used to generate the code scanning analysis. - code-scanning-analysis-tool-guid: - nullable: true - type: string - description: The GUID of the tool used to generate the code scanning analysis, - if provided in the uploaded SARIF data. code-scanning-analysis-tool: type: object properties: @@ -44822,13 +44315,15 @@ components: state: "$ref": "#/components/schemas/code-scanning-alert-state" fixed_at: - "$ref": "#/components/schemas/code-scanning-alert-fixed-at" + "$ref": "#/components/schemas/alert-fixed-at" dismissed_by: "$ref": "#/components/schemas/nullable-simple-user" dismissed_at: - "$ref": "#/components/schemas/code-scanning-alert-dismissed-at" + "$ref": "#/components/schemas/alert-dismissed-at" dismissed_reason: "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" + dismissed_comment: + "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" rule: "$ref": "#/components/schemas/code-scanning-alert-rule" tool: @@ -44836,7 +44331,7 @@ components: most_recent_instance: "$ref": "#/components/schemas/code-scanning-alert-instance" repository: - "$ref": "#/components/schemas/minimal-repository" + "$ref": "#/components/schemas/simple-repository" required: - number - created_at @@ -44851,82 +44346,6 @@ components: - tool - most_recent_instance - repository - credential-authorization: - title: Credential Authorization - description: Credential Authorization - type: object - properties: - login: - type: string - example: monalisa - description: User login that owns the underlying credential. - credential_id: - type: integer - example: 1 - description: Unique identifier for the credential. - credential_type: - type: string - example: SSH Key - description: Human-readable description of the credential type. - token_last_eight: - type: string - example: '12345678' - description: Last eight characters of the credential. Only included in responses - with credential_type of personal access token. - credential_authorized_at: - type: string - format: date-time - example: '2011-01-26T19:06:43Z' - description: Date when the credential was authorized for use. - scopes: - type: array - example: - - user - - repo - description: List of oauth scopes the token has been granted. - items: - type: string - fingerprint: - type: string - example: jklmnop12345678 - description: Unique string to distinguish the credential. Only included - in responses with credential_type of SSH Key. - credential_accessed_at: - type: string - format: date-time - example: '2011-01-26T19:06:43Z' - description: Date when the credential was last accessed. May be null if - it was never accessed - nullable: true - authorized_credential_id: - type: integer - nullable: true - example: 12345678 - authorized_credential_title: - type: string - nullable: true - example: my ssh key - description: The title given to the ssh key. This will only be present when - the credential is an ssh key. - authorized_credential_note: - type: string - nullable: true - example: my token - description: The note given to the token. This will only be present when - the credential is a token. - authorized_credential_expires_at: - type: string - format: date-time - nullable: true - description: The expiry for the token. This will only be present when the - credential is a token. - required: - - login - - credential_id - - credential_type - - credential_authorized_at - - credential_accessed_at - - authorized_credential_id organization-dependabot-secret: title: Dependabot Secret for an Organization description: Secrets for GitHub Dependabot for an organization. @@ -45054,62 +44473,53 @@ components: description: An email attached to a user example: mona_lisa@github.com type: string - organization-invitation: - title: Organization Invitation - description: Organization Invitation + external-groups: + title: ExternalGroups + description: A list of external groups available to be connected to a team + type: object + properties: + groups: + description: An array of external groups available to be mapped to a team + example: + - group_id: 1 + group_name: group-azuread-test + updated_at: 2021-01-03 22:27:15:000 -700 + - group_id: 2 + group_name: group-azuread-test2 + updated_at: 2021-06-03 22:27:15:000 -700 + type: array + items: + type: object + required: + - group_id + - group_name + - updated_at + properties: + group_id: + description: The internal ID of the group + example: 1 + type: integer + group_name: + description: The display name of the group + example: group-azuread-test + type: string + updated_at: + description: The time of the last update for this group + example: 2019-06-03 22:27:15:000 -700 + type: string + org-hook: + title: Org Hook + description: Org Hook type: object properties: id: type: integer - login: + example: 1 + url: type: string - nullable: true - email: - type: string - nullable: true - role: - type: string - created_at: - type: string - failed_at: - type: string - nullable: true - failed_reason: - type: string - nullable: true - inviter: - "$ref": "#/components/schemas/simple-user" - team_count: - type: integer - node_id: - type: string - example: '"MDIyOk9yZ2FuaXphdGlvbkludml0YXRpb24x"' - invitation_teams_url: - type: string - example: '"https://api.github.com/organizations/16/invitations/1/teams"' - required: - - id - - login - - email - - role - - created_at - - inviter - - team_count - - invitation_teams_url - - node_id - org-hook: - title: Org Hook - description: Org Hook - type: object - properties: - id: - type: integer - example: 1 - url: - type: string - format: uri - example: https://api.github.com/orgs/octocat/hooks/1 - ping_url: + format: uri + example: https://api.github.com/orgs/octocat/hooks/1 + ping_url: type: string format: uri example: https://api.github.com/orgs/octocat/hooks/1/pings @@ -45166,187 +44576,6 @@ components: - ping_url - created_at - updated_at - interaction-group: - type: string - description: 'The type of GitHub user that can comment, open issues, or create - pull requests while the interaction limit is in effect. Can be one of: `existing_users`, - `contributors_only`, `collaborators_only`.' - example: collaborators_only - enum: - - existing_users - - contributors_only - - collaborators_only - interaction-limit-response: - title: Interaction Limits - description: Interaction limit settings. - type: object - properties: - limit: - "$ref": "#/components/schemas/interaction-group" - origin: - type: string - example: repository - expires_at: - type: string - format: date-time - example: '2018-08-17T04:18:39Z' - required: - - limit - - origin - - expires_at - interaction-expiry: - type: string - description: 'The duration of the interaction restriction. Can be one of: `one_day`, - `three_days`, `one_week`, `one_month`, `six_months`. Default: `one_day`.' - example: one_month - enum: - - one_day - - three_days - - one_week - - one_month - - six_months - interaction-limit: - title: Interaction Restrictions - description: Limit interactions to a specific type of user for a specified duration - type: object - properties: - limit: - "$ref": "#/components/schemas/interaction-group" - expiry: - "$ref": "#/components/schemas/interaction-expiry" - required: - - limit - nullable-team-simple: - title: Team Simple - description: Groups of organization members that gives permissions on specified - repositories. - type: object - properties: - id: - description: Unique identifier of the team - type: integer - example: 1 - node_id: - type: string - example: MDQ6VGVhbTE= - url: - description: URL for the team - type: string - format: uri - example: https://api.github.com/organizations/1/team/1 - members_url: - type: string - example: https://api.github.com/organizations/1/team/1/members{/member} - name: - description: Name of the team - type: string - example: Justice League - description: - description: Description of the team - type: string - nullable: true - example: A great team. - permission: - description: Permission that the team will have for its repositories - type: string - example: admin - privacy: - description: The level of privacy this team should have - type: string - example: closed - html_url: - type: string - format: uri - example: https://github.com/orgs/rails/teams/core - repositories_url: - type: string - format: uri - example: https://api.github.com/organizations/1/team/1/repos - slug: - type: string - example: justice-league - ldap_dn: - description: Distinguished Name (DN) that team maps to within LDAP environment - example: uid=example,ou=users,dc=github,dc=com - type: string - required: - - id - - node_id - - url - - members_url - - name - - description - - permission - - html_url - - repositories_url - - slug - nullable: true - team: - title: Team - description: Groups of organization members that gives permissions on specified - repositories. - type: object - properties: - id: - type: integer - node_id: - type: string - name: - type: string - slug: - type: string - description: - type: string - nullable: true - privacy: - type: string - permission: - type: string - permissions: - type: object - properties: - pull: - type: boolean - triage: - type: boolean - push: - type: boolean - maintain: - type: boolean - admin: - type: boolean - required: - - pull - - triage - - push - - maintain - - admin - url: - type: string - format: uri - html_url: - type: string - format: uri - example: https://github.com/orgs/rails/teams/core - members_url: - type: string - repositories_url: - type: string - format: uri - parent: - "$ref": "#/components/schemas/nullable-team-simple" - required: - - id - - node_id - - url - - members_url - - name - - description - - permission - - html_url - - repositories_url - - slug - - parent org-membership: title: Org Membership description: Org Membership @@ -45423,6 +44652,8 @@ components: type: boolean exclude_owner_projects: type: boolean + org_metadata_only: + type: boolean repositories: type: array items: @@ -45459,598 +44690,438 @@ components: - exclude_attachments - exclude_releases - exclude_owner_projects + - org_metadata_only - repositories - url - created_at - updated_at - nullable-minimal-repository: - title: Minimal Repository - description: Minimal Repository + org-pre-receive-hook: type: object properties: id: type: integer - example: 1296269 - node_id: - type: string - example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 name: type: string - example: Hello-World - full_name: + enforcement: type: string - example: octocat/Hello-World - owner: - "$ref": "#/components/schemas/simple-user" - private: + configuration_url: + type: string + allow_downstream_configuration: type: boolean - html_url: + project: + title: Project + description: Projects are a way to organize columns and cards of work. + type: object + properties: + owner_url: type: string format: uri - example: https://github.com/octocat/Hello-World - description: - type: string - example: This your first repo! - nullable: true - fork: - type: boolean + example: https://api.github.com/repos/api-playground/projects-test url: type: string format: uri - example: https://api.github.com/repos/octocat/Hello-World - archive_url: + example: https://api.github.com/projects/1002604 + html_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: + format: uri + example: https://github.com/api-playground/projects-test/projects/12 + columns_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: + format: uri + example: https://api.github.com/projects/1002604/columns + id: + type: integer + example: 1002604 + node_id: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: + example: MDc6UHJvamVjdDEwMDI2MDQ= + name: + description: Name of the project + example: Week One Sprint type: string - example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: + body: + description: Body of the project + example: This project represents the sprint of the first week in January type: string - example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: + nullable: true + number: + type: integer + example: 1 + state: + description: State of the project; either 'open' or 'closed' + example: open type: string - example: http://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: + creator: + "$ref": "#/components/schemas/nullable-simple-user" + created_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: + format: date-time + example: '2011-04-10T20:09:31Z' + updated_at: type: string - example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: + format: date-time + example: '2014-03-03T18:58:10Z' + organization_permission: + description: The baseline permission that all organization members have + on this project. Only present if owner is an organization. type: string - example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: + enum: + - read + - write + - admin + - none + private: + description: Whether or not this project can be seen by everyone. Only present + if owner is an organization. + type: boolean + required: + - id + - node_id + - number + - name + - body + - state + - url + - html_url + - owner_url + - creator + - columns_url + - created_at + - updated_at + nullable-team-simple: + title: Team Simple + description: Groups of organization members that gives permissions on specified + repositories. + type: object + properties: + id: + description: Unique identifier of the team + type: integer + example: 1 + node_id: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: + example: MDQ6VGVhbTE= + url: + description: URL for the team type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: + example: https://api.github.com/organizations/1/team/1 + members_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/downloads - events_url: + example: https://api.github.com/organizations/1/team/1/members{/member} + name: + description: Name of the team type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/events - forks_url: + example: Justice League + description: + description: Description of the team + type: string + nullable: true + example: A great team. + permission: + description: Permission that the team will have for its repositories + type: string + example: admin + privacy: + description: The level of privacy this team should have + type: string + example: closed + html_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: + example: https://github.com/orgs/rails/teams/core + repositories_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: + format: uri + example: https://api.github.com/organizations/1/team/1/repos + slug: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: + example: justice-league + ldap_dn: + description: Distinguished Name (DN) that team maps to within LDAP environment + example: uid=example,ou=users,dc=github,dc=com type: string - example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: + required: + - id + - node_id + - url + - members_url + - name + - description + - permission + - html_url + - repositories_url + - slug + nullable: true + team: + title: Team + description: Groups of organization members that gives permissions on specified + repositories. + type: object + properties: + id: + type: integer + node_id: type: string - issue_comment_url: + name: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: + slug: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: + description: type: string - example: http://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: + nullable: true + privacy: type: string - example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: + permission: type: string - example: http://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: + permissions: + type: object + properties: + pull: + type: boolean + triage: + type: boolean + push: + type: boolean + maintain: + type: boolean + admin: + type: boolean + required: + - pull + - triage + - push + - maintain + - admin + url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/languages - merges_url: + html_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/merges - milestones_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: + example: https://github.com/orgs/rails/teams/core + members_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: + repositories_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: + format: uri + parent: + "$ref": "#/components/schemas/nullable-team-simple" + required: + - id + - node_id + - url + - members_url + - name + - description + - permission + - html_url + - repositories_url + - slug + - parent + team-organization: + title: Team Organization + description: Team Organization + type: object + properties: + login: type: string - example: http://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: + example: github + id: + type: integer + example: 1 + node_id: type: string - stargazers_url: + example: MDEyOk9yZ2FuaXphdGlvbjE= + url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: - type: string - example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: + example: https://api.github.com/orgs/github + repos_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: + example: https://api.github.com/orgs/github/repos + events_url: type: string format: uri - example: http://api.github.com/repos/octocat/Hello-World/subscription - tags_url: + example: https://api.github.com/orgs/github/events + hooks_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/tags - teams_url: + example: https://api.github.com/orgs/github/hooks + issues_url: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/teams - trees_url: + example: https://api.github.com/orgs/github/issues + members_url: type: string - example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: + example: https://api.github.com/orgs/github/members{/member} + public_members_url: type: string - mirror_url: + example: https://api.github.com/orgs/github/public_members{/member} + avatar_url: + type: string + example: https://github.com/images/error/octocat_happy.gif + description: type: string + example: A great organization nullable: true - hooks_url: + name: type: string - format: uri - example: http://api.github.com/repos/octocat/Hello-World/hooks - svn_url: + example: github + company: type: string - homepage: + example: GitHub + blog: type: string - nullable: true - language: + format: uri + example: https://github.com/blog + location: type: string - nullable: true - forks_count: - type: integer - stargazers_count: - type: integer - watchers_count: - type: integer - size: - type: integer - default_branch: - type: string - open_issues_count: - type: integer - is_template: - type: boolean - topics: - type: array - items: - type: string - has_issues: - type: boolean - has_projects: - type: boolean - has_wiki: - type: boolean - has_pages: - type: boolean - has_downloads: - type: boolean - archived: - type: boolean - disabled: - type: boolean - visibility: - type: string - pushed_at: - type: string - format: date-time - example: '2011-01-26T19:06:43Z' - nullable: true - created_at: + example: San Francisco + email: type: string - format: date-time - example: '2011-01-26T19:01:12Z' - nullable: true - updated_at: + format: email + example: octocat@github.com + twitter_username: type: string - format: date-time - example: '2011-01-26T19:14:43Z' + example: github nullable: true - permissions: - type: object - properties: - admin: - type: boolean - maintain: - type: boolean - push: - type: boolean - triage: - type: boolean - pull: - type: boolean - role_name: - type: string - example: admin - template_repository: - "$ref": "#/components/schemas/nullable-repository" - temp_clone_token: - type: string - delete_branch_on_merge: + is_verified: type: boolean - subscribers_count: - type: integer - network_count: + example: true + has_organization_projects: + type: boolean + example: true + has_repository_projects: + type: boolean + example: true + public_repos: type: integer - code_of_conduct: - "$ref": "#/components/schemas/code-of-conduct" - license: - type: object - properties: - key: - type: string - name: - type: string - spdx_id: - type: string - url: - type: string - node_id: - type: string - nullable: true - forks: + example: 2 + public_gists: type: integer - example: 0 - open_issues: + example: 1 + followers: type: integer - example: 0 - watchers: + example: 20 + following: type: integer example: 0 - allow_forking: - type: boolean - required: - - archive_url - - assignees_url - - blobs_url - - branches_url - - collaborators_url - - comments_url - - commits_url - - compare_url - - contents_url - - contributors_url - - deployments_url - - description - - downloads_url - - events_url - - fork - - forks_url - - full_name - - git_commits_url - - git_refs_url - - git_tags_url - - hooks_url - - html_url - - id - - node_id - - issue_comment_url - - issue_events_url - - issues_url - - keys_url - - labels_url - - languages_url - - merges_url - - milestones_url - - name - - notifications_url - - owner - - private - - pulls_url - - releases_url - - stargazers_url - - statuses_url - - subscribers_url - - subscription_url - - tags_url - - teams_url - - trees_url - - url - nullable: true - package: - title: Package - description: A software package - type: object - properties: - id: - description: Unique identifier of the package. - type: integer - example: 1 - name: - description: The name of the package. - type: string - example: super-linter - package_type: - type: string - example: docker - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - url: - type: string - example: https://api.github.com/orgs/github/packages/container/super-linter html_url: type: string - example: https://github.com/orgs/github/packages/container/package/super-linter - version_count: - description: The number of versions of the package. - type: integer - example: 1 - visibility: - type: string - example: private - enum: - - private - - public - owner: - "$ref": "#/components/schemas/nullable-simple-user" - repository: - "$ref": "#/components/schemas/nullable-minimal-repository" + format: uri + example: https://github.com/octocat created_at: type: string format: date-time - updated_at: + example: '2008-01-14T04:33:35Z' + type: type: string - format: date-time - required: - - id - - name - - package_type - - visibility - - url - - html_url - - version_count - - created_at - - updated_at - package-version: - title: Package Version - description: A version of a software package - type: object - properties: - id: - description: Unique identifier of the package version. + example: Organization + total_private_repos: type: integer - example: 1 - name: - description: The name of the package version. - type: string - example: latest - url: - type: string - example: https://api.github.com/orgs/github/packages/container/super-linter/versions/786068 - package_html_url: - type: string - example: https://github.com/orgs/github/packages/container/package/super-linter - html_url: - type: string - example: https://github.com/orgs/github/packages/container/super-linter/786068 - license: - type: string - example: MIT - description: - type: string - created_at: - type: string - format: date-time - example: '2011-04-10T20:09:31Z' - updated_at: - type: string - format: date-time - example: '2014-03-03T18:58:10Z' - deleted_at: + example: 100 + owned_private_repos: + type: integer + example: 100 + private_gists: + type: integer + example: 81 + nullable: true + disk_usage: + type: integer + example: 10000 + nullable: true + collaborators: + type: integer + example: 8 + nullable: true + billing_email: type: string - format: date-time - example: '2014-03-03T18:58:10Z' - metadata: + format: email + example: org@example.com + nullable: true + plan: type: object - title: Package Version Metadata properties: - package_type: + name: type: string - example: docker - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - container: - type: object - title: Container Metadata - properties: - tags: - type: array - items: - type: string - required: - - tags - docker: - type: object - title: Docker Metadata - properties: - tag: - type: array - items: - type: string - required: - - tags + space: + type: integer + private_repos: + type: integer + filled_seats: + type: integer + seats: + type: integer required: - - package_type - required: - - id - - name - - url - - package_html_url - - created_at - - updated_at - project: - title: Project - description: Projects are a way to organize columns and cards of work. - type: object - properties: - owner_url: - type: string - format: uri - example: https://api.github.com/repos/api-playground/projects-test - url: - type: string - format: uri - example: https://api.github.com/projects/1002604 - html_url: - type: string - format: uri - example: https://github.com/api-playground/projects-test/projects/12 - columns_url: - type: string - format: uri - example: https://api.github.com/projects/1002604/columns - id: - type: integer - example: 1002604 - node_id: - type: string - example: MDc6UHJvamVjdDEwMDI2MDQ= - name: - description: Name of the project - example: Week One Sprint - type: string - body: - description: Body of the project - example: This project represents the sprint of the first week in January + - name + - space + - private_repos + default_repository_permission: type: string nullable: true - number: - type: integer - example: 1 - state: - description: State of the project; either 'open' or 'closed' - example: open - type: string - creator: - "$ref": "#/components/schemas/nullable-simple-user" - created_at: + members_can_create_repositories: + type: boolean + example: true + nullable: true + two_factor_requirement_enabled: + type: boolean + example: true + nullable: true + members_allowed_repository_creation_type: type: string - format: date-time - example: '2011-04-10T20:09:31Z' + example: all + members_can_create_public_repositories: + type: boolean + example: true + members_can_create_private_repositories: + type: boolean + example: true + members_can_create_internal_repositories: + type: boolean + example: true + members_can_create_pages: + type: boolean + example: true + members_can_create_public_pages: + type: boolean + example: true + members_can_create_private_pages: + type: boolean + example: true + members_can_fork_private_repositories: + type: boolean + example: false + nullable: true + web_commit_signoff_required: + type: boolean + example: false updated_at: type: string format: date-time - example: '2014-03-03T18:58:10Z' - organization_permission: - description: The baseline permission that all organization members have - on this project. Only present if owner is an organization. - type: string - enum: - - read - - write - - admin - - none - private: - description: Whether or not this project can be seen by everyone. Only present - if owner is an organization. - type: boolean required: + - login + - url - id - node_id - - number - - name - - body - - state - - url + - repos_url + - events_url + - hooks_url + - issues_url + - members_url + - public_members_url + - avatar_url + - description - html_url - - owner_url - - creator - - columns_url + - has_organization_projects + - has_repository_projects + - public_repos + - public_gists + - followers + - following + - type - created_at - updated_at - group-mapping: - title: GroupMapping - description: External Groups to be mapped to a team for membership - type: object - properties: - groups: - description: Array of groups to be mapped to this team - example: - - group_id: 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - group_name: saml-azuread-test - group_description: A group of Developers working on AzureAD SAML SSO - - group_id: 2bb2bb2b-bb22-22bb-2bb2-bb2bbb2bb2b2 - group_name: saml-azuread-test2 - group_description: Another group of Developers working on AzureAD SAML - SSO - type: array - items: - type: object - required: - - group_id - - group_name - - group_description - properties: - group_id: - description: The ID of the group - example: 111a1a11-aaa1-1aaa-11a1-a1a1a1a1a1aa - type: string - group_name: - description: The name of the group - example: saml-azuread-test - type: string - group_description: - description: a description of the group - example: A group of Developers working on AzureAD SAML SSO - type: string - status: - description: synchronization status for this group mapping - example: unsynced - type: string - synced_at: - description: the time of the last sync for this group-mapping - example: 2019-06-03 22:27:15:000 -700 - type: string - nullable: true team-full: title: Full Team description: Groups of organization members that gives permissions on specified @@ -46119,7 +45190,7 @@ components: format: date-time example: '2017-08-17T12:37:15Z' organization: - "$ref": "#/components/schemas/organization-full" + "$ref": "#/components/schemas/team-organization" ldap_dn: description: Distinguished Name (DN) that team maps to within LDAP environment example: uid=example,ou=users,dc=github,dc=com @@ -46429,9 +45500,9 @@ components: - created_at - updated_at - permissions - team-repository: - title: Team Repository - description: A team's access to a repository. + nullable-repository: + title: Repository + description: A git repository type: object properties: id: @@ -46450,6 +45521,8 @@ components: example: octocat/Hello-World license: "$ref": "#/components/schemas/nullable-license-simple" + organization: + "$ref": "#/components/schemas/nullable-simple-user" forks: type: integer permissions: @@ -46469,11 +45542,8 @@ components: - admin - pull - push - role_name: - type: string - example: admin owner: - "$ref": "#/components/schemas/nullable-simple-user" + "$ref": "#/components/schemas/simple-user" private: description: Whether the repository is private or public. default: false @@ -46649,6 +45719,8 @@ components: type: integer example: 80 size: + description: The size of the repository. Size is calculated hourly. When + a repository is initially created, the size is 0. type: integer example: 108 default_branch: @@ -46722,86 +45794,414 @@ components: type: boolean example: true template_repository: - "$ref": "#/components/schemas/nullable-repository" - temp_clone_token: - type: string - allow_squash_merge: - description: Whether to allow squash merges for pull requests. - default: true - type: boolean - example: true - allow_auto_merge: - description: Whether to allow Auto-merge to be used on pull requests. - default: false - type: boolean - example: false - delete_branch_on_merge: - description: Whether to delete head branches when pull requests are merged - default: false - type: boolean - example: false - allow_merge_commit: - description: Whether to allow merge commits for pull requests. - default: true - type: boolean - example: true - allow_forking: - description: Whether to allow forking this repo - default: false - type: boolean - example: false - subscribers_count: - type: integer - network_count: - type: integer - open_issues: - type: integer - watchers: - type: integer - master_branch: - type: string - required: - - archive_url - - assignees_url - - blobs_url - - branches_url - - collaborators_url - - comments_url - - commits_url - - compare_url - - contents_url - - contributors_url - - deployments_url - - description - - downloads_url - - events_url - - fork - - forks_url - - full_name - - git_commits_url - - git_refs_url - - git_tags_url - - hooks_url - - html_url - - id - - node_id - - issue_comment_url - - issue_events_url - - issues_url - - keys_url - - labels_url - - languages_url - - merges_url - - milestones_url - - name - - notifications_url - - owner - - private - - pulls_url - - releases_url - - stargazers_url - - statuses_url - - subscribers_url + nullable: true + type: object + properties: + id: + type: integer + node_id: + type: string + name: + type: string + full_name: + type: string + owner: + type: object + properties: + login: + type: string + id: + type: integer + node_id: + type: string + avatar_url: + type: string + gravatar_id: + type: string + url: + type: string + html_url: + type: string + followers_url: + type: string + following_url: + type: string + gists_url: + type: string + starred_url: + type: string + subscriptions_url: + type: string + organizations_url: + type: string + repos_url: + type: string + events_url: + type: string + received_events_url: + type: string + type: + type: string + site_admin: + type: boolean + private: + type: boolean + html_url: + type: string + description: + type: string + fork: + type: boolean + url: + type: string + archive_url: + type: string + assignees_url: + type: string + blobs_url: + type: string + branches_url: + type: string + collaborators_url: + type: string + comments_url: + type: string + commits_url: + type: string + compare_url: + type: string + contents_url: + type: string + contributors_url: + type: string + deployments_url: + type: string + downloads_url: + type: string + events_url: + type: string + forks_url: + type: string + git_commits_url: + type: string + git_refs_url: + type: string + git_tags_url: + type: string + git_url: + type: string + issue_comment_url: + type: string + issue_events_url: + type: string + issues_url: + type: string + keys_url: + type: string + labels_url: + type: string + languages_url: + type: string + merges_url: + type: string + milestones_url: + type: string + notifications_url: + type: string + pulls_url: + type: string + releases_url: + type: string + ssh_url: + type: string + stargazers_url: + type: string + statuses_url: + type: string + subscribers_url: + type: string + subscription_url: + type: string + tags_url: + type: string + teams_url: + type: string + trees_url: + type: string + clone_url: + type: string + mirror_url: + type: string + hooks_url: + type: string + svn_url: + type: string + homepage: + type: string + language: + type: string + forks_count: + type: integer + stargazers_count: + type: integer + watchers_count: + type: integer + size: + type: integer + default_branch: + type: string + open_issues_count: + type: integer + is_template: + type: boolean + topics: + type: array + items: + type: string + has_issues: + type: boolean + has_projects: + type: boolean + has_wiki: + type: boolean + has_pages: + type: boolean + has_downloads: + type: boolean + archived: + type: boolean + disabled: + type: boolean + visibility: + type: string + pushed_at: + type: string + created_at: + type: string + updated_at: + type: string + permissions: + type: object + properties: + admin: + type: boolean + maintain: + type: boolean + push: + type: boolean + triage: + type: boolean + pull: + type: boolean + allow_rebase_merge: + type: boolean + temp_clone_token: + type: string + allow_squash_merge: + type: boolean + allow_auto_merge: + type: boolean + delete_branch_on_merge: + type: boolean + allow_update_branch: + type: boolean + use_squash_pr_title_as_default: + type: boolean + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. + allow_merge_commit: + type: boolean + subscribers_count: + type: integer + network_count: + type: integer + temp_clone_token: + type: string + allow_squash_merge: + description: Whether to allow squash merges for pull requests. + default: true + type: boolean + example: true + allow_auto_merge: + description: Whether to allow Auto-merge to be used on pull requests. + default: false + type: boolean + example: false + delete_branch_on_merge: + description: Whether to delete head branches when pull requests are merged + default: false + type: boolean + example: false + allow_update_branch: + description: Whether or not a pull request head branch that is behind its + base branch can always be updated even if it is not required to be up + to date before merging. + default: false + type: boolean + example: false + use_squash_pr_title_as_default: + type: boolean + description: Whether a squash merge commit can use the pull request title + as default. **This property has been deprecated. Please use `squash_merge_commit_title` + instead. + default: false + deprecated: true + squash_merge_commit_title: + type: string + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. + allow_merge_commit: + description: Whether to allow merge commits for pull requests. + default: true + type: boolean + example: true + allow_forking: + description: Whether to allow forking this repo + type: boolean + web_commit_signoff_required: + description: Whether to require contributors to sign off on web-based commits + default: false + type: boolean + subscribers_count: + type: integer + network_count: + type: integer + open_issues: + type: integer + watchers: + type: integer + master_branch: + type: string + starred_at: + type: string + example: '"2020-07-09T00:17:42Z"' + anonymous_access_enabled: + type: boolean + description: Whether anonymous git access is enabled for this repository + required: + - archive_url + - assignees_url + - blobs_url + - branches_url + - collaborators_url + - comments_url + - commits_url + - compare_url + - contents_url + - contributors_url + - deployments_url + - description + - downloads_url + - events_url + - fork + - forks_url + - full_name + - git_commits_url + - git_refs_url + - git_tags_url + - hooks_url + - html_url + - id + - node_id + - issue_comment_url + - issue_events_url + - issues_url + - keys_url + - labels_url + - languages_url + - merges_url + - milestones_url + - name + - notifications_url + - owner + - private + - pulls_url + - releases_url + - stargazers_url + - statuses_url + - subscribers_url - subscription_url - tags_url - teams_url @@ -46834,121 +46234,532 @@ components: - watchers_count - created_at - updated_at - project-card: - title: Project Card - description: Project cards represent a scope of work. + nullable: true + team-repository: + title: Team Repository + description: A team's access to a repository. type: object properties: - url: - type: string - format: uri - example: https://api.github.com/projects/columns/cards/1478 id: - description: The project card's ID + description: Unique identifier of the repository example: 42 type: integer node_id: type: string - example: MDExOlByb2plY3RDYXJkMTQ3OA== - note: + example: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: + description: The name of the repository. type: string - example: Add payload for delete Project column - nullable: true - creator: - "$ref": "#/components/schemas/nullable-simple-user" - created_at: + example: Team Environment + full_name: type: string - format: date-time - example: '2016-09-05T14:21:06Z' - updated_at: + example: octocat/Hello-World + license: + "$ref": "#/components/schemas/nullable-license-simple" + forks: + type: integer + permissions: + type: object + properties: + admin: + type: boolean + pull: + type: boolean + triage: + type: boolean + push: + type: boolean + maintain: + type: boolean + required: + - admin + - pull + - push + role_name: type: string - format: date-time - example: '2016-09-05T14:20:22Z' - archived: - description: Whether or not the card is archived - example: false + example: admin + owner: + "$ref": "#/components/schemas/nullable-simple-user" + private: + description: Whether the repository is private or public. + default: false type: boolean - column_name: + html_url: type: string - project_id: + format: uri + example: https://github.com/octocat/Hello-World + description: type: string - column_url: + example: This your first repo! + nullable: true + fork: + type: boolean + url: type: string format: uri - example: https://api.github.com/projects/columns/367 - content_url: + example: https://api.github.com/repos/octocat/Hello-World + archive_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: type: string format: uri - example: https://api.github.com/repos/api-playground/projects-test/issues/3 - project_url: + example: http://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: type: string format: uri - example: https://api.github.com/projects/120 - required: - - id - - node_id - - note - - url - - column_url - - project_url - - creator - - created_at - - updated_at - project-column: - title: Project Column - description: Project columns contain cards of work. - type: object - properties: - url: + example: http://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: type: string format: uri - example: https://api.github.com/projects/columns/367 - project_url: + example: http://api.github.com/repos/octocat/Hello-World/downloads + events_url: type: string format: uri - example: https://api.github.com/projects/120 - cards_url: + example: http://api.github.com/repos/octocat/Hello-World/events + forks_url: type: string format: uri - example: https://api.github.com/projects/columns/367/cards - id: - description: The unique identifier of the project column - example: 42 - type: integer - node_id: + example: http://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: type: string - example: MDEzOlByb2plY3RDb2x1bW4zNjc= - name: - description: Name of the project column - example: Remaining tasks + example: http://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: type: string - created_at: + example: http://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: type: string - format: date-time - example: '2016-09-05T14:18:44Z' - updated_at: + example: http://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: type: string - format: date-time - example: '2016-09-05T14:22:28Z' - required: - - id - - node_id - - url - - project_url - - cards_url - - name - - created_at - - updated_at - project-collaborator-permission: - title: Project Collaborator Permission - description: Project Collaborator Permission - type: object - properties: - permission: + example: git:github.com/octocat/Hello-World.git + issue_comment_url: type: string - user: - "$ref": "#/components/schemas/nullable-simple-user" - required: + example: http://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/languages + merges_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/merges + milestones_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: + type: string + example: git@github.com:octocat/Hello-World.git + stargazers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/subscription + tags_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/tags + teams_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/teams + trees_url: + type: string + example: http://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: + type: string + example: https://github.com/octocat/Hello-World.git + mirror_url: + type: string + format: uri + example: git:git.example.com/octocat/Hello-World + nullable: true + hooks_url: + type: string + format: uri + example: http://api.github.com/repos/octocat/Hello-World/hooks + svn_url: + type: string + format: uri + example: https://svn.github.com/octocat/Hello-World + homepage: + type: string + format: uri + example: https://github.com + nullable: true + language: + type: string + nullable: true + forks_count: + type: integer + example: 9 + stargazers_count: + type: integer + example: 80 + watchers_count: + type: integer + example: 80 + size: + type: integer + example: 108 + default_branch: + description: The default branch of the repository. + type: string + example: master + open_issues_count: + type: integer + example: 0 + is_template: + description: Whether this repository acts as a template that can be used + to generate new repositories. + default: false + type: boolean + example: true + topics: + type: array + items: + type: string + has_issues: + description: Whether issues are enabled. + default: true + type: boolean + example: true + has_projects: + description: Whether projects are enabled. + default: true + type: boolean + example: true + has_wiki: + description: Whether the wiki is enabled. + default: true + type: boolean + example: true + has_pages: + type: boolean + has_downloads: + description: Whether downloads are enabled. + default: true + type: boolean + example: true + archived: + description: Whether the repository is archived. + default: false + type: boolean + disabled: + type: boolean + description: Returns whether or not this repository disabled. + visibility: + description: 'The repository visibility: public, private, or internal.' + default: public + type: string + pushed_at: + type: string + format: date-time + example: '2011-01-26T19:06:43Z' + nullable: true + created_at: + type: string + format: date-time + example: '2011-01-26T19:01:12Z' + nullable: true + updated_at: + type: string + format: date-time + example: '2011-01-26T19:14:43Z' + nullable: true + allow_rebase_merge: + description: Whether to allow rebase merges for pull requests. + default: true + type: boolean + example: true + template_repository: + "$ref": "#/components/schemas/nullable-repository" + temp_clone_token: + type: string + allow_squash_merge: + description: Whether to allow squash merges for pull requests. + default: true + type: boolean + example: true + allow_auto_merge: + description: Whether to allow Auto-merge to be used on pull requests. + default: false + type: boolean + example: false + delete_branch_on_merge: + description: Whether to delete head branches when pull requests are merged + default: false + type: boolean + example: false + allow_merge_commit: + description: Whether to allow merge commits for pull requests. + default: true + type: boolean + example: true + allow_forking: + description: Whether to allow forking this repo + default: false + type: boolean + example: false + web_commit_signoff_required: + description: Whether to require contributors to sign off on web-based commits + default: false + type: boolean + example: false + subscribers_count: + type: integer + network_count: + type: integer + open_issues: + type: integer + watchers: + type: integer + master_branch: + type: string + required: + - archive_url + - assignees_url + - blobs_url + - branches_url + - collaborators_url + - comments_url + - commits_url + - compare_url + - contents_url + - contributors_url + - deployments_url + - description + - downloads_url + - events_url + - fork + - forks_url + - full_name + - git_commits_url + - git_refs_url + - git_tags_url + - hooks_url + - html_url + - id + - node_id + - issue_comment_url + - issue_events_url + - issues_url + - keys_url + - labels_url + - languages_url + - merges_url + - milestones_url + - name + - notifications_url + - owner + - private + - pulls_url + - releases_url + - stargazers_url + - statuses_url + - subscribers_url + - subscription_url + - tags_url + - teams_url + - trees_url + - url + - clone_url + - default_branch + - forks + - forks_count + - git_url + - has_downloads + - has_issues + - has_projects + - has_wiki + - has_pages + - homepage + - language + - archived + - disabled + - mirror_url + - open_issues + - open_issues_count + - license + - pushed_at + - size + - ssh_url + - stargazers_count + - svn_url + - watchers + - watchers_count + - created_at + - updated_at + project-card: + title: Project Card + description: Project cards represent a scope of work. + type: object + properties: + url: + type: string + format: uri + example: https://api.github.com/projects/columns/cards/1478 + id: + description: The project card's ID + example: 42 + type: integer + node_id: + type: string + example: MDExOlByb2plY3RDYXJkMTQ3OA== + note: + type: string + example: Add payload for delete Project column + nullable: true + creator: + "$ref": "#/components/schemas/nullable-simple-user" + created_at: + type: string + format: date-time + example: '2016-09-05T14:21:06Z' + updated_at: + type: string + format: date-time + example: '2016-09-05T14:20:22Z' + archived: + description: Whether or not the card is archived + example: false + type: boolean + column_name: + type: string + project_id: + type: string + column_url: + type: string + format: uri + example: https://api.github.com/projects/columns/367 + content_url: + type: string + format: uri + example: https://api.github.com/repos/api-playground/projects-test/issues/3 + project_url: + type: string + format: uri + example: https://api.github.com/projects/120 + required: + - id + - node_id + - note + - url + - column_url + - project_url + - creator + - created_at + - updated_at + project-column: + title: Project Column + description: Project columns contain cards of work. + type: object + properties: + url: + type: string + format: uri + example: https://api.github.com/projects/columns/367 + project_url: + type: string + format: uri + example: https://api.github.com/projects/120 + cards_url: + type: string + format: uri + example: https://api.github.com/projects/columns/367/cards + id: + description: The unique identifier of the project column + example: 42 + type: integer + node_id: + type: string + example: MDEzOlByb2plY3RDb2x1bW4zNjc= + name: + description: Name of the project column + example: Remaining tasks + type: string + created_at: + type: string + format: date-time + example: '2016-09-05T14:18:44Z' + updated_at: + type: string + format: date-time + example: '2016-09-05T14:22:28Z' + required: + - id + - node_id + - url + - project_url + - cards_url + - name + - created_at + - updated_at + project-collaborator-permission: + title: Project Collaborator Permission + description: Project Collaborator Permission + type: object + properties: + permission: + type: string + user: + "$ref": "#/components/schemas/nullable-simple-user" + required: - permission - user rate-limit: @@ -47025,6 +46836,34 @@ components: - key - name - html_url + security-and-analysis: + nullable: true + type: object + properties: + advanced_security: + type: object + properties: + status: + type: string + enum: + - enabled + - disabled + secret_scanning: + type: object + properties: + status: + type: string + enum: + - enabled + - disabled + secret_scanning_push_protection: + type: object + properties: + status: + type: string + enum: + - enabled + - disabled full-repository: title: Full Repository description: Full Repository @@ -47217,6 +47056,8 @@ components: type: integer example: 80 size: + description: The size of the repository. Size is calculated hourly. When + a repository is initially created, the size is 0. type: integer example: 108 default_branch: @@ -47309,9 +47150,66 @@ components: allow_merge_commit: type: boolean example: true + allow_update_branch: + type: boolean + example: true + use_squash_pr_title_as_default: + type: boolean + example: false + squash_merge_commit_title: + type: string + example: PR_TITLE + enum: + - PR_TITLE + - COMMIT_OR_PR_TITLE + description: |- + The default value for a squash merge commit title: + + - `PR_TITLE` - default to the pull request's title. + - `COMMIT_OR_PR_TITLE` - default to the commit's title (if only one commit) or the pull request's title (when more than one commit). + squash_merge_commit_message: + type: string + example: PR_BODY + enum: + - PR_BODY + - COMMIT_MESSAGES + - BLANK + description: |- + The default value for a squash merge commit message: + + - `PR_BODY` - default to the pull request's body. + - `COMMIT_MESSAGES` - default to the branch's commit messages. + - `BLANK` - default to a blank commit message. + merge_commit_title: + type: string + example: PR_TITLE + enum: + - PR_TITLE + - MERGE_MESSAGE + description: |- + The default value for a merge commit title. + + - `PR_TITLE` - default to the pull request's title. + - `MERGE_MESSAGE` - default to the classic title for a merge message (e.g., Merge pull request #123 from branch-name). + merge_commit_message: + type: string + example: PR_BODY + enum: + - PR_BODY + - PR_TITLE + - BLANK + description: |- + The default value for a merge commit message. + + - `PR_TITLE` - default to the pull request's title. + - `PR_BODY` - default to the pull request's body. + - `BLANK` - default to a blank commit message. allow_forking: type: boolean example: true + web_commit_signoff_required: + type: boolean + example: false subscribers_count: type: integer example: 42 @@ -47341,25 +47239,7 @@ components: code_of_conduct: "$ref": "#/components/schemas/code-of-conduct-simple" security_and_analysis: - nullable: true - type: object - properties: - advanced_security: - type: object - properties: - status: - type: string - enum: - - enabled - - disabled - secret_scanning: - type: object - properties: - status: - type: string - enum: - - enabled - - disabled + "$ref": "#/components/schemas/security-and-analysis" required: - archive_url - assignees_url @@ -47476,6 +47356,25 @@ components: type: string format: date-time nullable: true + workflow_run: + type: object + nullable: true + properties: + id: + example: 10 + type: integer + repository_id: + example: 42 + type: integer + head_repository_id: + example: 42 + type: integer + head_branch: + example: main + type: string + head_sha: + example: '009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d' + type: string required: - id - node_id @@ -47487,6 +47386,17 @@ components: - created_at - expires_at - updated_at + actions-cache-usage-policy-for-repository: + title: Actions cache usage policy for repository + description: GitHub Actions cache usage policy for repository. + type: object + properties: + repo_cache_size_limit_in_gb: + description: The size limit for the sum of all caches, in gigabytes. + type: integer + example: 14 + required: + - repo_cache_size_limit_in_gb job: title: Job description: Information of a job execution in a workflow run @@ -47535,6 +47445,14 @@ components: example: success type: string nullable: true + enum: + - success + - failure + - neutral + - cancelled + - skipped + - timed_out + - action_required started_at: description: The time that the job started, in ISO 8601 format. example: '2019-08-08T08:00:00-07:00' @@ -47664,6 +47582,34 @@ components: "$ref": "#/components/schemas/selected-actions-url" required: - enabled + actions-workflow-access-to-repository: + type: object + properties: + access_level: + type: string + description: |- + Defines the level of access that workflows outside of the repository have to actions and reusable workflows within the + repository. `none` means access is only possible from workflows in this repository. + enum: + - none + - organization + - enterprise + required: + - access_level + referenced-workflow: + title: Referenced workflow + description: A workflow referenced/reused by the initial caller workflow + type: object + properties: + path: + type: string + sha: + type: string + ref: + type: string + required: + - path + - sha pull-request-minimal: title: Pull Request Minimal type: object @@ -47803,9 +47749,13 @@ components: example: master head_sha: description: The SHA of the head commit that points to the version of the - worflow being run. + workflow being run. example: '009b8a3a9ccbb128af87f9b1c0f4c62e8a304f6d' type: string + path: + description: The full path of the workflow + example: octocat/octo-repo/.github/workflows/ci.yml@main + type: string run_number: type: integer description: The auto incrementing run number for the workflow run. @@ -47815,6 +47765,11 @@ components: description: Attempt number of the run, 1 for first attempt and higher if the workflow was re-run. example: 1 + referenced_workflows: + type: array + nullable: true + items: + "$ref": "#/components/schemas/referenced-workflow" event: type: string example: push @@ -47848,6 +47803,10 @@ components: updated_at: type: string format: date-time + actor: + "$ref": "#/components/schemas/simple-user" + triggering_actor: + "$ref": "#/components/schemas/simple-user" run_started_at: type: string format: date-time @@ -47900,10 +47859,12 @@ components: - node_id - head_branch - run_number + - display_title - event - status - conclusion - head_sha + - path - workflow_id - url - html_url @@ -47980,7 +47941,7 @@ components: - comment deployment-reviewer-type: type: string - description: 'The type of reviewer. Must be one of: `User` or `Team`' + description: The type of reviewer. enum: - User - Team @@ -48134,84 +48095,6 @@ components: - url - created_at - updated_at - workflow-run-usage: - title: Workflow Run Usage - description: Workflow Run Usage - type: object - properties: - billable: - type: object - properties: - UBUNTU: - type: object - required: - - total_ms - - jobs - properties: - total_ms: - type: integer - jobs: - type: integer - job_runs: - type: array - items: - type: object - required: - - job_id - - duration_ms - properties: - job_id: - type: integer - duration_ms: - type: integer - MACOS: - type: object - required: - - total_ms - - jobs - properties: - total_ms: - type: integer - jobs: - type: integer - job_runs: - type: array - items: - type: object - required: - - job_id - - duration_ms - properties: - job_id: - type: integer - duration_ms: - type: integer - WINDOWS: - type: object - required: - - total_ms - - jobs - properties: - total_ms: - type: integer - jobs: - type: integer - job_runs: - type: array - items: - type: object - required: - - job_id - - duration_ms - properties: - job_id: - type: integer - duration_ms: - type: integer - run_duration_ms: - type: integer - required: - - billable actions-secret: title: Actions Secret description: Set secrets for GitHub Actions. @@ -48289,31 +48172,6 @@ components: - badge_url - created_at - updated_at - workflow-usage: - title: Workflow Usage - description: Workflow Usage - type: object - properties: - billable: - type: object - properties: - UBUNTU: - type: object - properties: - total_ms: - type: integer - MACOS: - type: object - properties: - total_ms: - type: integer - WINDOWS: - type: object - properties: - total_ms: - type: integer - required: - - billable autolink: title: Autolink reference description: An autolink reference. @@ -48405,6 +48263,11 @@ components: type: array items: "$ref": "#/components/schemas/team" + apps: + description: The list of apps with review dismissal access. + type: array + items: + "$ref": "#/components/schemas/integration" url: type: string example: '"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions"' @@ -48416,9 +48279,8 @@ components: example: '"https://api.github.com/repos/the-org/an-org-repo/branches/master/protection/dismissal_restrictions/teams"' bypass_pull_request_allowances: type: object - description: Allow specific users or teams to bypass pull request requirements. - Set to `null` to disable. - nullable: true + description: Allow specific users, teams, or apps to bypass pull request + requirements. properties: users: description: The list of users allowed to bypass pull request requirements. @@ -48430,6 +48292,11 @@ components: type: array items: "$ref": "#/components/schemas/team" + apps: + description: The list of apps allowed to bypass pull request requirements. + type: array + items: + "$ref": "#/components/schemas/integration" dismiss_stale_reviews: type: boolean example: true @@ -48671,6 +48538,11 @@ components: properties: enabled: type: boolean + block_creations: + type: object + properties: + enabled: + type: boolean required_conversation_resolution: type: object properties: @@ -49049,6 +48921,10 @@ components: type: array items: "$ref": "#/components/schemas/team" + apps: + type: array + items: + "$ref": "#/components/schemas/integration" required: - url - users_url @@ -49066,6 +48942,10 @@ components: type: array items: "$ref": "#/components/schemas/team" + apps: + type: array + items: + "$ref": "#/components/schemas/integration" required: - users - teams @@ -49128,6 +49008,14 @@ components: enabled: type: boolean additionalProperties: false + block_creations: + type: object + properties: + enabled: + type: boolean + additionalProperties: false + required: + - enabled required: - url deployment-simple: @@ -49583,13 +49471,15 @@ components: state: "$ref": "#/components/schemas/code-scanning-alert-state" fixed_at: - "$ref": "#/components/schemas/code-scanning-alert-fixed-at" + "$ref": "#/components/schemas/alert-fixed-at" dismissed_by: "$ref": "#/components/schemas/nullable-simple-user" dismissed_at: - "$ref": "#/components/schemas/code-scanning-alert-dismissed-at" + "$ref": "#/components/schemas/alert-dismissed-at" dismissed_reason: "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" + dismissed_comment: + "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" rule: "$ref": "#/components/schemas/code-scanning-alert-rule-summary" tool: @@ -49627,13 +49517,15 @@ components: state: "$ref": "#/components/schemas/code-scanning-alert-state" fixed_at: - "$ref": "#/components/schemas/code-scanning-alert-fixed-at" + "$ref": "#/components/schemas/alert-fixed-at" dismissed_by: "$ref": "#/components/schemas/nullable-simple-user" dismissed_at: - "$ref": "#/components/schemas/code-scanning-alert-dismissed-at" + "$ref": "#/components/schemas/alert-dismissed-at" dismissed_reason: "$ref": "#/components/schemas/code-scanning-alert-dismissed-reason" + dismissed_comment: + "$ref": "#/components/schemas/code-scanning-alert-dismissed-comment" rule: "$ref": "#/components/schemas/code-scanning-alert-rule" tool: @@ -49654,9 +49546,8 @@ components: - tool - most_recent_instance code-scanning-alert-set-state: - description: Sets the state of the code scanning alert. Can be one of `open` - or `dismissed`. You must provide `dismissed_reason` when you set the state - to `dismissed`. + description: Sets the state of the code scanning alert. You must provide `dismissed_reason` + when you set the state to `dismissed`. type: string enum: - open @@ -49765,7 +49656,7 @@ components: description: A Base64 string representing the SARIF file to upload. You must first compress your SARIF file using [`gzip`](http://www.gnu.org/software/gzip/manual/gzip.html) and then translate the contents of the file into a Base64 encoding string. - For more information, see "[SARIF support for code scanning](https://docs.github.com/code-security/secure-coding/sarif-support-for-code-scanning)." + For more information, see "[SARIF support for code scanning](https://docs.github.com/enterprise-server@3.6/code-security/secure-coding/sarif-support-for-code-scanning)." type: string code-scanning-sarifs-receipt: type: object @@ -49803,278 +49694,61 @@ components: description: Any errors that ocurred during processing of the delivery. readOnly: true nullable: true - nullable-codespace-machine: - type: object - title: Codespace machine - description: A description of the machine powering a codespace. - properties: - name: - type: string - description: The name of the machine. - example: standardLinux - display_name: - type: string - description: The display name of the machine includes cores, memory, and - storage. - example: 4 cores, 8 GB RAM, 64 GB storage - operating_system: - type: string - description: The operating system of the machine. - example: linux - storage_in_bytes: - type: integer - description: How much storage is available to the codespace. - example: 68719476736 - memory_in_bytes: - type: integer - description: How much memory is available to the codespace. - example: 8589934592 - cpus: - type: integer - description: How many cores are available to the codespace. - example: 4 - prebuild_availability: - type: string - description: Whether a prebuild is currently available when creating a codespace - for this machine and repository. If a branch was not specified as a ref, - the default branch will be assumed. Value will be "null" if prebuilds - are not supported or prebuild availability could not be determined. Value - is the type of prebuild available, or "none" if none are available. - example: blob - enum: - - none - - blob - - pool - nullable: true - required: - - name - - display_name - - operating_system - - storage_in_bytes - - memory_in_bytes - - cpus - - prebuild_availability - nullable: true - codespace: + codeowners-errors: + title: CODEOWNERS errors + description: A list of errors found in a repo's CODEOWNERS file type: object - title: Codespace - description: A codespace. properties: - id: - type: integer - example: 1 - name: - description: Automatically generated name of this codespace. - type: string - example: monalisa-octocat-hello-world-g4wpq6h95q - environment_id: - description: UUID identifying this codespace's environment. - type: string - example: 26a7c758-7299-4a73-b978-5a92a7ae98a0 - nullable: true - owner: - "$ref": "#/components/schemas/simple-user" - billable_owner: - "$ref": "#/components/schemas/simple-user" - repository: - "$ref": "#/components/schemas/minimal-repository" - machine: - "$ref": "#/components/schemas/nullable-codespace-machine" - prebuild: - description: Whether the codespace was created from a prebuild. - type: boolean - example: false - nullable: true - created_at: - type: string - format: date-time - example: '2011-01-26T19:01:12Z' - updated_at: - type: string - format: date-time - example: '2011-01-26T19:01:12Z' - last_used_at: - description: Last known time this codespace was started. - type: string - format: date-time - example: '2011-01-26T19:01:12Z' - state: - description: State of this codespace. - enum: - - Unknown - - Created - - Queued - - Provisioning - - Available - - Awaiting - - Unavailable - - Deleted - - Moved - - Shutdown - - Archived - - Starting - - ShuttingDown - - Failed - - Exporting - - Updating - - Rebuilding - example: Available - type: string - url: - description: API URL for this codespace. - type: string - format: uri - git_status: - description: Details about the codespace's git repository. - type: object - properties: - ahead: - description: The number of commits the local repository is ahead of - the remote. - type: integer - example: 0 - behind: - description: The number of commits the local repository is behind the - remote. - type: integer - example: 0 - has_unpushed_changes: - description: Whether the local repository has unpushed changes. - type: boolean - has_uncommitted_changes: - description: Whether the local repository has uncommitted changes. - type: boolean - ref: - description: The current branch (or SHA if in detached HEAD state) of - the local repository. - type: string - example: main - location: - description: The Azure region where this codespace is located. - enum: - - EastUs - - SouthEastAsia - - WestEurope - - WestUs2 - example: WestUs2 - type: string - idle_timeout_minutes: - description: The number of minutes of inactivity after which this codespace - will be automatically stopped. - type: integer - example: 60 - nullable: true - web_url: - description: URL to access this codespace on the web. - type: string - format: uri - machines_url: - description: API URL to access available alternate machine types for this - codespace. - type: string - format: uri - start_url: - description: API URL to start this codespace. - type: string - format: uri - stop_url: - description: API URL to stop this codespace. - type: string - format: uri - pulls_url: - description: API URL for the Pull Request associated with this codespace, - if any. - type: string - format: uri - nullable: true - recent_folders: + errors: type: array items: - type: string - runtime_constraints: - type: object - properties: - allowed_port_privacy_settings: - description: The privacy settings a user can select from when forwarding - a port. - type: array - items: + type: object + properties: + line: + description: The line number where this errors occurs. + type: integer + example: 7 + column: + description: The column number where this errors occurs. + type: integer + example: 3 + source: + description: The contents of the line where the error occurs. type: string - nullable: true - required: - - id - - name - - environment_id - - owner - - billable_owner - - repository - - machine - - prebuild - - created_at - - updated_at - - last_used_at - - state - - url - - git_status - - location - - idle_timeout_minutes - - web_url - - machines_url - - start_url - - stop_url - - pulls_url - - recent_folders - codespace-machine: - type: object - title: Codespace machine - description: A description of the machine powering a codespace. - properties: - name: - type: string - description: The name of the machine. - example: standardLinux - display_name: - type: string - description: The display name of the machine includes cores, memory, and - storage. - example: 4 cores, 8 GB RAM, 64 GB storage - operating_system: - type: string - description: The operating system of the machine. - example: linux - storage_in_bytes: - type: integer - description: How much storage is available to the codespace. - example: 68719476736 - memory_in_bytes: - type: integer - description: How much memory is available to the codespace. - example: 8589934592 - cpus: - type: integer - description: How many cores are available to the codespace. - example: 4 - prebuild_availability: - type: string - description: Whether a prebuild is currently available when creating a codespace - for this machine and repository. If a branch was not specified as a ref, - the default branch will be assumed. Value will be "null" if prebuilds - are not supported or prebuild availability could not be determined. Value - is the type of prebuild available, or "none" if none are available. - example: blob - enum: - - none - - blob - - pool - nullable: true + example: "* user" + kind: + description: The type of error. + type: string + example: Invalid owner + suggestion: + description: Suggested action to fix the error. This will usually + be `null`, but is provided for some common errors. + type: string + nullable: true + example: The pattern `/` will never match anything, did you mean `*` + instead? + message: + description: A human-readable description of the error, combining + information from multiple fields, laid out for display in a monospaced + typeface (for example, a command-line setting). + type: string + example: |- + Invalid owner on line 7: + + * user + ^ + path: + description: The path of the file where the error occured. + type: string + example: ".github/CODEOWNERS" + required: + - line + - column + - kind + - message + - path required: - - name - - display_name - - operating_system - - storage_in_bytes - - memory_in_bytes - - cpus - - prebuild_availability + - errors collaborator: title: Collaborator description: Collaborator @@ -50187,7 +49861,6 @@ components: - subscriptions_url - type - url - - role_name repository-invitation: title: Repository Invitation description: Repository invitations let you manage who you collaborate with. @@ -50351,7 +50024,6 @@ components: - subscriptions_url - type - url - - role_name nullable: true repository-collaborator-permission: title: Repository Collaborator Permission @@ -50406,7 +50078,7 @@ components: type: string format: date-time author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" reactions: "$ref": "#/components/schemas/reaction-rollup" required: @@ -50455,7 +50127,7 @@ components: type: string required: - href - auto_merge: + auto-merge: title: Auto merge description: The status of auto merging a pull request. type: object @@ -50689,9 +50361,9 @@ components: - review_comment - self author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" auto_merge: - "$ref": "#/components/schemas/auto_merge" + "$ref": "#/components/schemas/auto-merge" draft: description: Indicates whether or not the pull request is a draft. example: false @@ -50746,6 +50418,7 @@ components: target_url: type: string format: uri + nullable: true required: type: boolean nullable: true @@ -50822,8 +50495,10 @@ components: type: string description: type: string + nullable: true target_url: type: string + nullable: true context: type: string created_at: @@ -50844,101 +50519,6 @@ components: - created_at - updated_at - creator - nullable-code-of-conduct-simple: - title: Code Of Conduct Simple - description: Code of Conduct Simple - type: object - properties: - url: - type: string - format: uri - example: https://api.github.com/repos/github/docs/community/code_of_conduct - key: - type: string - example: citizen_code_of_conduct - name: - type: string - example: Citizen Code of Conduct - html_url: - type: string - nullable: true - format: uri - example: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md - required: - - url - - key - - name - - html_url - nullable: true - nullable-community-health-file: - title: Community Health File - type: object - properties: - url: - type: string - format: uri - html_url: - type: string - format: uri - required: - - url - - html_url - nullable: true - community-profile: - title: Community Profile - description: Community Profile - type: object - properties: - health_percentage: - type: integer - example: 100 - description: - type: string - example: My first repository on GitHub! - nullable: true - documentation: - type: string - example: example.com - nullable: true - files: - type: object - properties: - code_of_conduct: - "$ref": "#/components/schemas/nullable-code-of-conduct-simple" - code_of_conduct_file: - "$ref": "#/components/schemas/nullable-community-health-file" - license: - "$ref": "#/components/schemas/nullable-license-simple" - contributing: - "$ref": "#/components/schemas/nullable-community-health-file" - readme: - "$ref": "#/components/schemas/nullable-community-health-file" - issue_template: - "$ref": "#/components/schemas/nullable-community-health-file" - pull_request_template: - "$ref": "#/components/schemas/nullable-community-health-file" - required: - - code_of_conduct - - code_of_conduct_file - - license - - contributing - - readme - - issue_template - - pull_request_template - updated_at: - type: string - format: date-time - example: '2017-02-28T19:09:29Z' - nullable: true - content_reports_enabled: - type: boolean - example: true - required: - - health_percentage - - description - - documentation - - files - - updated_at commit-comparison: title: Commit Comparison description: Commit Comparison @@ -51137,6 +50717,11 @@ components: properties: type: type: string + enum: + - dir + - file + - submodule + - symlink size: type: integer name: @@ -51198,6 +50783,8 @@ components: properties: type: type: string + enum: + - file encoding: type: string size: @@ -51269,6 +50856,8 @@ components: properties: type: type: string + enum: + - symlink target: type: string size: @@ -51325,12 +50914,14 @@ components: - url - target content-submodule: - title: Symlink Content - description: An object describing a symlink + title: Submodule Content + description: An object describing a submodule type: object properties: type: type: string + enum: + - submodule submodule_git_url: type: string format: uri @@ -51566,6 +51157,74 @@ components: - name - created_at - updated_at + dependency-graph-diff: + title: Dependency Graph Diff + description: A diff of the dependencies between two commits. + type: array + items: + type: object + properties: + change_type: + type: string + enum: + - added + - removed + manifest: + type: string + example: path/to/package-lock.json + ecosystem: + type: string + example: npm + name: + type: string + example: "@actions/core" + version: + type: string + example: 1.0.0 + package_url: + type: string + nullable: true + example: pkg:/npm/%40actions/core@1.1.0 + license: + type: string + nullable: true + example: MIT + source_repository_url: + type: string + nullable: true + example: https://github.com/github/actions + vulnerabilities: + type: array + items: + type: object + properties: + severity: + type: string + example: critical + advisory_ghsa_id: + type: string + example: GHSA-rf4j-j272-fj86 + advisory_summary: + type: string + example: A summary of the advisory. + advisory_url: + type: string + example: https://github.com/advisories/GHSA-rf4j-j272-fj86 + required: + - severity + - advisory_ghsa_id + - advisory_summary + - advisory_url + required: + - change_type + - manifest + - ecosystem + - name + - version + - package_url + - license + - source_repository_url + - vulnerabilities deployment-status: title: Deployment Status description: The status of a deployment. @@ -51659,7 +51318,7 @@ components: example: 30 description: The amount of time to delay a job after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). - deployment_branch_policy: + deployment-branch-policy-settings: type: object description: The type of deployment branch policy for this environment. To allow all branches to deploy, set to `null`. @@ -51781,7 +51440,7 @@ components: - node_id - type deployment_branch_policy: - "$ref": "#/components/schemas/deployment_branch_policy" + "$ref": "#/components/schemas/deployment-branch-policy-settings" required: - id - node_id @@ -51790,6 +51449,37 @@ components: - html_url - created_at - updated_at + deployment-branch-policy: + title: Deployment branch policy + description: Details of a deployment branch policy. + type: object + properties: + id: + description: The unique identifier of the branch policy. + type: integer + example: 361471 + node_id: + type: string + example: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= + name: + description: The name pattern that branches must match in order to deploy + to the environment. + type: string + example: release/* + deployment-branch-policy-name-pattern: + title: Deployment branch policy name pattern + type: object + properties: + name: + description: |- + The name pattern that branches must match in order to deploy to the environment. + + Wildcard characters will not match `/`. For example, to match branches that begin with `release/` and contain an additional single slash, use `release/*/*`. + For more information about pattern matching syntax, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). + type: string + example: release/* + required: + - name short-blob: title: Short Blob description: Short Blob @@ -52231,151 +51921,6 @@ components: - updated_at - last_response - test_url - import: - title: Import - description: A repository import from an external source. - type: object - properties: - vcs: - type: string - nullable: true - use_lfs: - type: boolean - vcs_url: - description: The URL of the originating repository. - type: string - svc_root: - type: string - tfvc_project: - type: string - status: - type: string - enum: - - 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: - type: string - nullable: true - failed_step: - type: string - nullable: true - error_message: - type: string - nullable: true - import_percent: - type: integer - nullable: true - commit_count: - type: integer - nullable: true - push_percent: - type: integer - nullable: true - has_large_files: - type: boolean - large_files_size: - type: integer - large_files_count: - type: integer - project_choices: - type: array - items: - type: object - properties: - vcs: - type: string - tfvc_project: - type: string - human_name: - type: string - message: - type: string - authors_count: - type: integer - nullable: true - url: - type: string - format: uri - html_url: - type: string - format: uri - authors_url: - type: string - format: uri - repository_url: - type: string - format: uri - svn_root: - type: string - required: - - vcs - - vcs_url - - status - - url - - repository_url - - html_url - - authors_url - porter-author: - title: Porter Author - description: Porter Author - type: object - properties: - id: - type: integer - remote_id: - type: string - remote_name: - type: string - email: - type: string - name: - type: string - url: - type: string - format: uri - import_url: - type: string - format: uri - required: - - id - - remote_id - - remote_name - - email - - name - - url - - import_url - porter-large-file: - title: Porter Large File - description: Porter Large File - type: object - properties: - ref_name: - type: string - path: - type: string - oid: - type: string - size: - type: integer - required: - - oid - - path - - ref_name - - size nullable-issue: title: Issue description: Issues are a great way to keep track of tasks, enhancements, and @@ -52413,6 +51958,15 @@ components: description: State of the issue; either 'open' or 'closed' example: open type: string + state_reason: + description: The reason for the current state + example: not_planned + type: string + nullable: true + enum: + - completed + - reopened + - not_planned title: description: Title of the issue example: Widget creation fails in Safari on OS X 10.8 @@ -52528,7 +52082,7 @@ components: performed_via_github_app: "$ref": "#/components/schemas/nullable-integration" author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" reactions: "$ref": "#/components/schemas/reaction-rollup" required: @@ -52687,7 +52241,7 @@ components: rename: "$ref": "#/components/schemas/issue-event-rename" author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" lock_reason: type: string nullable: true @@ -53522,7 +53076,7 @@ components: type: string format: uri author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" performed_via_github_app: "$ref": "#/components/schemas/nullable-integration" reactions: @@ -53756,7 +53310,7 @@ components: body_text: type: string author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" required: - event - id @@ -53801,12 +53355,13 @@ components: example: config/database.yaml type: string position: - description: The line index in the diff to which the comment applies. + description: The line index in the diff to which the comment applies. This + field is deprecated; use `line` instead. example: 1 type: integer original_position: description: The index of the original line in the diff to which the comment - applies. + applies. This field is deprecated; use `original_line` instead. example: 4 type: integer commit_id: @@ -53846,7 +53401,7 @@ components: format: uri example: https://api.github.com/repos/octocat/Hello-World/pulls/1 author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" _links: type: object properties: @@ -54048,6 +53603,44 @@ components: - created_at - performed_via_github_app - assignee + state-change-issue-event: + title: State Change Issue Event + description: State Change Issue Event + type: object + properties: + id: + type: integer + node_id: + type: string + url: + type: string + actor: + "$ref": "#/components/schemas/simple-user" + event: + type: string + commit_id: + type: string + nullable: true + commit_url: + type: string + nullable: true + created_at: + type: string + performed_via_github_app: + "$ref": "#/components/schemas/nullable-integration" + state_reason: + type: string + nullable: true + required: + - id + - node_id + - url + - actor + - event + - commit_id + - commit_url + - created_at + - performed_via_github_app timeline-issue-events: title: Timeline Event description: Timeline Event @@ -54074,6 +53667,7 @@ components: - "$ref": "#/components/schemas/timeline-commit-commented-event" - "$ref": "#/components/schemas/timeline-assigned-issue-event" - "$ref": "#/components/schemas/timeline-unassigned-issue-event" + - "$ref": "#/components/schemas/state-change-issue-event" deploy-key: title: Deploy Key description: An SSH key granting access to a single repository. @@ -54373,6 +53967,14 @@ components: description: The web address the Page can be accessed from. format: uri example: https://example.com + build_type: + type: string + description: The process in which the Page will be built. + example: legacy + nullable: true + enum: + - legacy + - workflow source: "$ref": "#/components/schemas/pages-source-hash" public: @@ -54448,166 +54050,17 @@ components: required: - url - status - pages-health-check: - title: Pages Health Check Status - description: Pages Health Check Status + repository-pre-receive-hook: type: object properties: - domain: - type: object - properties: - host: - type: string - uri: - type: string - nameservers: - type: string - dns_resolves: - type: boolean - is_proxied: - type: boolean - nullable: true - is_cloudflare_ip: - type: boolean - nullable: true - is_fastly_ip: - type: boolean - nullable: true - is_old_ip_address: - type: boolean - nullable: true - is_a_record: - type: boolean - nullable: true - has_cname_record: - type: boolean - nullable: true - has_mx_records_present: - type: boolean - nullable: true - is_valid_domain: - type: boolean - is_apex_domain: - type: boolean - should_be_a_record: - type: boolean - nullable: true - is_cname_to_github_user_domain: - type: boolean - nullable: true - is_cname_to_pages_dot_github_dot_com: - type: boolean - nullable: true - is_cname_to_fastly: - type: boolean - nullable: true - is_pointed_to_github_pages_ip: - type: boolean - nullable: true - is_non_github_pages_ip_present: - type: boolean - nullable: true - is_pages_domain: - type: boolean - is_served_by_pages: - type: boolean - nullable: true - is_valid: - type: boolean - reason: - type: string - nullable: true - responds_to_https: - type: boolean - enforces_https: - type: boolean - https_error: - type: string - nullable: true - is_https_eligible: - type: boolean - nullable: true - caa_error: - type: string - nullable: true - alt_domain: - type: object - nullable: true - properties: - host: - type: string - uri: - type: string - nameservers: - type: string - dns_resolves: - type: boolean - is_proxied: - type: boolean - nullable: true - is_cloudflare_ip: - type: boolean - nullable: true - is_fastly_ip: - type: boolean - nullable: true - is_old_ip_address: - type: boolean - nullable: true - is_a_record: - type: boolean - nullable: true - has_cname_record: - type: boolean - nullable: true - has_mx_records_present: - type: boolean - nullable: true - is_valid_domain: - type: boolean - is_apex_domain: - type: boolean - should_be_a_record: - type: boolean - nullable: true - is_cname_to_github_user_domain: - type: boolean - nullable: true - is_cname_to_pages_dot_github_dot_com: - type: boolean - nullable: true - is_cname_to_fastly: - type: boolean - nullable: true - is_pointed_to_github_pages_ip: - type: boolean - nullable: true - is_non_github_pages_ip_present: - type: boolean - nullable: true - is_pages_domain: - type: boolean - is_served_by_pages: - type: boolean - nullable: true - is_valid: - type: boolean - reason: - type: string - nullable: true - responds_to_https: - type: boolean - enforces_https: - type: boolean - https_error: - type: string - nullable: true - is_https_eligible: - type: boolean - nullable: true - caa_error: - type: string - nullable: true + id: + type: integer + name: + type: string + enforcement: + type: string + configuration_url: + type: string team-simple: title: Team Simple description: Groups of organization members that gives permissions on specified @@ -55129,6 +54582,8 @@ components: type: boolean is_template: type: boolean + web_commit_signoff_required: + type: boolean required: - archive_url - assignees_url @@ -55562,6 +55017,8 @@ components: format: date-time allow_forking: type: boolean + web_commit_signoff_required: + type: boolean required: - archive_url - assignees_url @@ -55740,9 +55197,9 @@ components: - review_comment - self author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" auto_merge: - "$ref": "#/components/schemas/auto_merge" + "$ref": "#/components/schemas/auto-merge" draft: description: Indicates whether or not the pull request is a draft. example: false @@ -55919,7 +55376,7 @@ components: body_text: type: string author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" required: - id - node_id @@ -55994,7 +55451,7 @@ components: format: uri example: https://api.github.com/repos/octocat/Hello-World/pulls/1 author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" _links: type: object properties: @@ -56195,10 +55652,6 @@ components: type: string mentions_count: type: integer - discussion_url: - description: The URL of the release discussion. - type: string - format: uri reactions: "$ref": "#/components/schemas/reaction-rollup" required: @@ -56242,6 +55695,8 @@ components: "$ref": "#/components/schemas/alert-number" created_at: "$ref": "#/components/schemas/alert-created-at" + updated_at: + "$ref": "#/components/schemas/alert-updated-at" url: "$ref": "#/components/schemas/alert-url" html_url: @@ -56264,9 +55719,26 @@ components: secret_type: type: string description: The type of secret that secret scanning detected. + secret_type_display_name: + type: string + description: |- + User-friendly name for the detected secret, matching the `secret_type`. + For a list of built-in patterns, see "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)." secret: type: string description: The secret that was detected. + push_protection_bypassed: + type: boolean + description: Whether push protection was bypassed for the detected secret. + nullable: true + push_protection_bypassed_by: + "$ref": "#/components/schemas/nullable-simple-user" + push_protection_bypassed_at: + type: string + format: date-time + description: 'The time that push protection was bypassed in ISO 8601 format: + `YYYY-MM-DDTHH:MM:SSZ`.' + nullable: true secret-scanning-location-commit: description: Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository. @@ -56494,110 +55966,39 @@ components: - commit - zipball_url - tarball_url - topic: - title: Topic - description: A topic aggregates entities that are related to a subject. - type: object - properties: - names: - type: array - items: - type: string - required: - - names - traffic: - title: Traffic + tag-protection: + title: Tag protection + description: Tag protection type: object properties: - timestamp: - type: string - format: date-time - uniques: - type: integer - count: - type: integer - required: - - timestamp - - uniques - - count - clone-traffic: - title: Clone Traffic - description: Clone Traffic - type: object - properties: - count: - type: integer - example: 173 - uniques: + id: type: integer - example: 128 - clones: - type: array - items: - "$ref": "#/components/schemas/traffic" - required: - - uniques - - count - - clones - content-traffic: - title: Content Traffic - description: Content Traffic - type: object - properties: - path: + example: 2 + created_at: type: string - example: "/github/hubot" - title: + example: '2011-01-26T19:01:12Z' + updated_at: type: string - example: 'github/hubot: A customizable life embetterment robot.' - count: - type: integer - example: 3542 - uniques: - type: integer - example: 2225 - required: - - path - - title - - uniques - - count - referrer-traffic: - title: Referrer Traffic - description: Referrer Traffic - type: object - properties: - referrer: + example: '2011-01-26T19:01:12Z' + enabled: + type: boolean + example: true + pattern: type: string - example: Google - count: - type: integer - example: 4 - uniques: - type: integer - example: 3 + example: v1.* required: - - referrer - - uniques - - count - view-traffic: - title: View Traffic - description: View Traffic + - pattern + topic: + title: Topic + description: A topic aggregates entities that are related to a subject. type: object properties: - count: - type: integer - example: 14850 - uniques: - type: integer - example: 3782 - views: + names: type: array items: - "$ref": "#/components/schemas/traffic" + type: string required: - - uniques - - count - - views + - names scim-group-list-enterprise: type: object properties: @@ -56826,174 +56227,6 @@ components: required: - schemas - id - scim-user: - title: SCIM /Users - description: SCIM /Users provisioning endpoints - type: object - properties: - schemas: - description: SCIM schema used. - type: array - minItems: 1 - items: - type: string - example: urn:ietf:params:scim:schemas:core:2.0:User - id: - description: Unique identifier of an external identity - example: 1b78eada-9baa-11e6-9eb6-a431576d590e - type: string - externalId: - description: The ID of the User. - type: string - example: a7b0f98395 - nullable: true - userName: - description: Configured by the admin. Could be an email, login, or username - example: someone@example.com - type: string - nullable: true - displayName: - description: The name of the user, suitable for display to end-users - example: Jon Doe - type: string - nullable: true - name: - type: object - properties: - givenName: - type: string - nullable: true - familyName: - type: string - nullable: true - formatted: - type: string - nullable: true - required: - - givenName - - familyName - example: - givenName: Jane - familyName: User - emails: - description: user emails - example: - - value: someone@example.com - primary: true - - value: another@example.com - primary: false - type: array - minItems: 1 - items: - type: object - properties: - value: - type: string - primary: - type: boolean - required: - - value - active: - description: The active status of the User. - type: boolean - example: true - meta: - type: object - properties: - resourceType: - type: string - example: User - created: - type: string - format: date-time - example: '2019-01-24T22:45:36.000Z' - lastModified: - type: string - format: date-time - example: '2019-01-24T22:45:36.000Z' - location: - type: string - format: uri - example: https://api.github.com/scim/v2/organizations/myorg-123abc55141bfd8f/Users/c42772b5-2029-11e9-8543-9264a97dec8d - organization_id: - description: The ID of the organization. - type: integer - operations: - description: Set of operations to be performed - example: - - op: replace - value: - active: false - type: array - minItems: 1 - items: - properties: - op: - type: string - enum: - - add - - remove - - replace - path: - type: string - value: - oneOf: - - type: string - - type: object - - type: array - items: {} - required: - - op - type: object - groups: - description: associated groups - type: array - items: - properties: - value: - type: string - display: - type: string - required: - - id - - schemas - - externalId - - userName - - name - - emails - - active - - meta - scim-user-list: - title: SCIM User List - description: SCIM User List - type: object - properties: - schemas: - description: SCIM schema used. - type: array - minItems: 1 - items: - type: string - example: urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: - type: integer - example: 3 - itemsPerPage: - type: integer - example: 10 - startIndex: - type: integer - example: 1 - Resources: - type: array - items: - "$ref": "#/components/schemas/scim-user" - required: - - schemas - - totalResults - - itemsPerPage - - startIndex - - Resources search-result-text-matches: title: Search Result Text Matches type: array @@ -57232,6 +56465,9 @@ components: nullable: true state: type: string + state_reason: + type: string + nullable: true assignee: "$ref": "#/components/schemas/nullable-simple-user" milestone: @@ -57283,7 +56519,7 @@ components: score: type: number author_association: - "$ref": "#/components/schemas/author_association" + "$ref": "#/components/schemas/author-association" draft: type: boolean repository: @@ -57579,6 +56815,9 @@ components: type: boolean is_template: type: boolean + web_commit_signoff_required: + type: boolean + example: false required: - archive_url - assignees_url @@ -57857,6 +57096,339 @@ components: - type - url - score + configuration-status: + type: object + properties: + status: + type: string + progress: + type: array + items: + type: object + properties: + status: + type: string + key: + type: string + required: + - status + - key + maintenance-status: + type: object + properties: + status: + type: string + scheduled_time: + type: string + connection_services: + type: array + items: + type: object + properties: + name: + type: string + number: + type: integer + required: + - name + - number + enterprise-settings: + type: object + properties: + enterprise: + type: object + properties: + private_mode: + type: boolean + public_pages: + type: boolean + subdomain_isolation: + type: boolean + signup_enabled: + type: boolean + github_hostname: + type: string + identicons_host: + type: string + http_proxy: + nullable: true + type: string + auth_mode: + type: string + expire_sessions: + type: boolean + admin_password: + nullable: true + type: string + configuration_id: + type: integer + configuration_run_count: + type: integer + avatar: + type: object + properties: + enabled: + type: boolean + uri: + type: string + customer: + type: object + properties: + name: + type: string + email: + type: string + uuid: + type: string + secret_key_data: + type: string + public_key_data: + type: string + license: + type: object + properties: + seats: + type: integer + evaluation: + type: boolean + perpetual: + type: boolean + unlimited_seating: + type: boolean + support_key: + type: string + ssh_allowed: + type: boolean + cluster_support: + type: boolean + expire_at: + type: string + github_ssl: + type: object + properties: + enabled: + type: boolean + cert: + nullable: true + type: string + key: + nullable: true + type: string + ldap: + type: object + properties: + host: + nullable: true + type: string + port: + type: integer + base: + type: array + items: {} + uid: + nullable: true + type: string + bind_dn: + nullable: true + type: string + password: + nullable: true + type: string + method: + type: string + search_strategy: + type: string + user_groups: + type: array + items: {} + admin_group: + nullable: true + type: string + virtual_attribute_enabled: + type: boolean + recursive_group_search: + type: boolean + posix_support: + type: boolean + user_sync_emails: + type: boolean + user_sync_keys: + type: boolean + user_sync_interval: + type: integer + team_sync_interval: + type: integer + sync_enabled: + type: boolean + reconciliation: + type: object + properties: + user: + nullable: true + type: string + org: + nullable: true + type: string + profile: + type: object + properties: + uid: + type: string + name: + nullable: true + type: string + mail: + nullable: true + type: string + key: + nullable: true + type: string + cas: + type: object + properties: + url: + nullable: true + type: string + saml: + type: object + properties: + sso_url: + nullable: true + type: string + certificate: + nullable: true + type: string + certificate_path: + nullable: true + type: string + issuer: + nullable: true + type: string + idp_initiated_sso: + type: boolean + disable_admin_demote: + type: boolean + github_oauth: + type: object + properties: + client_id: + type: string + client_secret: + type: string + organization_name: + type: string + organization_team: + type: string + smtp: + type: object + properties: + enabled: + type: boolean + address: + type: string + authentication: + type: string + port: + type: string + domain: + type: string + username: + type: string + user_name: + type: string + enable_starttls_auto: + type: boolean + password: + type: string + discard-to-noreply-address: + type: boolean + support_address: + type: string + support_address_type: + type: string + noreply_address: + type: string + ntp: + type: object + properties: + primary_server: + type: string + secondary_server: + type: string + timezone: + nullable: true + type: string + snmp: + type: object + properties: + enabled: + type: boolean + community: + type: string + syslog: + type: object + properties: + enabled: + type: boolean + server: + nullable: true + type: string + protocol_name: + type: string + assets: + nullable: true + type: string + pages: + type: object + properties: + enabled: + type: boolean + collectd: + type: object + properties: + enabled: + type: boolean + server: + nullable: true + type: string + port: + type: integer + encryption: + nullable: true + type: string + username: + nullable: true + type: string + password: + nullable: true + type: string + mapping: + type: object + properties: + enabled: + type: boolean + tileserver: + nullable: true + type: string + basemap: + type: string + token: + nullable: true + type: string + load_balancer: + nullable: true + type: string + run_list: + type: array + items: + type: string + ssh-key: + type: object + properties: + key: + type: string + pretty-print: + type: string private-user: title: Private User description: Private User @@ -58056,89 +57628,6 @@ components: - private_gists - total_private_repos - two_factor_authentication - codespaces-secret: - title: Codespaces Secret - description: Secrets for a GitHub Codespace. - type: object - properties: - name: - description: The name of the secret. - example: SECRET_NAME - type: string - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - visibility: - description: Visibility of a secret - enum: - - all - - private - - selected - type: string - selected_repositories_url: - type: string - format: uri - example: https://api.github.com/user/secrets/SECRET_NAME/repositories - required: - - name - - created_at - - updated_at - - visibility - - selected_repositories_url - codespaces-user-public-key: - title: CodespacesUserPublicKey - description: The public key used for setting user Codespaces' Secrets. - type: object - properties: - key_id: - description: The identifier for the key. - type: string - example: '1234567' - key: - description: The Base64 encoded public key. - type: string - example: hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs= - required: - - key_id - - key - codespace-export-details: - type: object - title: Fetches information about an export of a codespace. - description: An export of a codespace. Also, latest export details for a codespace - can be fetched with id = latest - properties: - state: - type: string - description: State of the latest export - nullable: true - example: succeeded | failed | in_progress - completed_at: - description: Completion time of the last export operation - type: string - format: date-time - nullable: true - example: '2021-01-01T19:01:12Z' - branch: - type: string - description: Name of the exported branch - nullable: true - example: codespace-monalisa-octocat-hello-world-g4wpq6h95q - sha: - type: string - description: Git commit SHA of the exported branch - nullable: true - example: fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - id: - type: string - description: Id for the export details - example: latest - export_url: - type: string - description: Url for fetching export details - example: https://api.github.com/user/codespaces/:name/exports/latest email: title: Email description: Email @@ -58171,6 +57660,10 @@ components: id: type: integer example: 3 + name: + type: string + example: Octocat's GPG Key + nullable: true primary_key_id: type: integer nullable: true @@ -58183,7 +57676,7 @@ components: emails: type: array example: - - email: mastahyeti@users.noreply.github.com + - email: octocat@users.noreply.github.com verified: true items: type: object @@ -58206,7 +57699,8 @@ components: can_encrypt_storage: true can_certify: false created_at: '2016-03-24T11:31:04-06:00' - expires_at: + expires_at: + revoked: false items: type: object properties: @@ -58240,6 +57734,8 @@ components: raw_key: type: string nullable: true + revoked: + type: boolean can_sign: type: boolean example: true @@ -58258,6 +57754,9 @@ components: type: string format: date-time nullable: true + revoked: + type: boolean + example: true raw_key: type: string nullable: true @@ -58275,6 +57774,7 @@ components: - can_certify - emails - subkeys + - revoked key: title: Key description: Key @@ -58303,76 +57803,6 @@ components: - created_at - verified - read_only - marketplace-account: - title: Marketplace Account - type: object - properties: - url: - type: string - format: uri - id: - type: integer - type: - type: string - node_id: - type: string - login: - type: string - email: - type: string - nullable: true - format: email - organization_billing_email: - type: string - nullable: true - format: email - required: - - url - - id - - type - - login - user-marketplace-purchase: - title: User Marketplace Purchase - description: User Marketplace Purchase - type: object - properties: - billing_cycle: - type: string - example: monthly - next_billing_date: - type: string - format: date-time - example: '2017-11-11T00:00:00Z' - nullable: true - unit_count: - type: integer - nullable: true - on_free_trial: - type: boolean - example: true - free_trial_ends_on: - type: string - format: date-time - example: '2017-11-11T00:00:00Z' - nullable: true - updated_at: - type: string - format: date-time - example: '2017-11-02T01:12:12Z' - nullable: true - account: - "$ref": "#/components/schemas/marketplace-account" - plan: - "$ref": "#/components/schemas/marketplace-listing-plan" - required: - - billing_cycle - - next_billing_date - - unit_count - - updated_at - - on_free_trial - - free_trial_ends_on - - account - - plan starred-repository: title: Starred Repository description: Starred Repository @@ -58418,6 +57848,407 @@ components: - key - id examples: + root: + value: + current_user_url: https://api.github.com/user + current_user_authorizations_html_url: https://github.com/settings/connections/applications{/client_id} + authorizations_url: https://api.github.com/authorizations + code_search_url: https://api.github.com/search/code?q={query}{&page,per_page,sort,order} + commit_search_url: https://api.github.com/search/commits?q={query}{&page,per_page,sort,order} + emails_url: https://api.github.com/user/emails + emojis_url: https://api.github.com/emojis + events_url: https://api.github.com/events + feeds_url: https://api.github.com/feeds + followers_url: https://api.github.com/user/followers + following_url: https://api.github.com/user/following{/target} + gists_url: https://api.github.com/gists{/gist_id} + hub_url: https://api.github.com/hub + issue_search_url: https://api.github.com/search/issues?q={query}{&page,per_page,sort,order} + issues_url: https://api.github.com/issues + keys_url: https://api.github.com/user/keys + label_search_url: https://api.github.com/search/labels?q={query}&repository_id={repository_id}{&page,per_page} + notifications_url: https://api.github.com/notifications + organization_url: https://api.github.com/orgs/{org} + organization_repositories_url: https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort} + organization_teams_url: https://api.github.com/orgs/{org}/teams + public_gists_url: https://api.github.com/gists/public + rate_limit_url: https://api.github.com/rate_limit + repository_url: https://api.github.com/repos/{owner}/{repo} + repository_search_url: https://api.github.com/search/repositories?q={query}{&page,per_page,sort,order} + current_user_repositories_url: https://api.github.com/user/repos{?type,page,per_page,sort} + starred_url: https://api.github.com/user/starred{/owner}{/repo} + starred_gists_url: https://api.github.com/gists/starred + topic_search_url: https://api.github.com/search/topics?q={query}{&page,per_page} + user_url: https://api.github.com/users/{user} + user_organizations_url: https://api.github.com/user/orgs + user_repositories_url: https://api.github.com/users/{user}/repos{?type,page,per_page,sort} + user_search_url: https://api.github.com/search/users?q={query}{&page,per_page,sort,order} + global-hook-items: + value: + - type: Global + id: 1 + name: web + active: true + events: + - organization + - user + config: + url: https://example.com + content_type: json + insecure_ssl: '0' + secret: "********" + updated_at: '2017-12-07T00:14:59Z' + created_at: '2017-12-07T00:14:59Z' + url: https://api.github.com/admin/hooks/1 + ping_url: https://api.github.com/admin/hooks/1/pings + global-hook: + value: + type: Global + id: 1 + name: web + active: true + events: + - organization + - user + config: + url: https://example.com + content_type: json + insecure_ssl: '0' + secret: "********" + updated_at: '2017-12-07T00:14:59Z' + created_at: '2017-12-07T00:14:59Z' + url: https://api.github.com/admin/hooks/1 + ping_url: https://api.github.com/admin/hooks/1/pings + global-hook-2: + value: + type: Global + id: 1 + name: web + active: true + events: + - organization + config: + url: https://example.com + content_type: form + insecure_ssl: '0' + updated_at: '2017-12-07T00:14:59Z' + created_at: '2017-12-07T00:14:59Z' + url: https://api.github.com/admin/hooks/1 + ping_url: https://api.github.com/admin/hooks/1/pings + enterprise-public-key-items: + value: + - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234 + id: 2 + url: https://api.github.com/user/keys/2 + title: ssh-rsa AAAAB3NzaC1yc2EAAA + created_at: '2020-06-11T21:31:57Z' + verified: false + read_only: false + last_used: '2020-06-11T22:31:57Z' + user_id: 1 + repository_id: 2 + - key: 9Og8iYjAyymI9LvABpJerYrMxURPc8r+dB7TJyvv1234 + id: 3 + url: https://api.github.com/user/keys/2 + title: ssh-rsa AAAAB3NzaC1yc2EAAA + created_at: '2020-06-11T21:31:57Z' + verified: false + read_only: false + last_used: '2020-06-11T22:31:57Z' + user_id: 1 + repository_id: 2 + ldap-mapping-team: + value: + ldap_dn: cn=Enterprise Ops,ou=teams,dc=github,dc=com + id: 1 + node_id: MDQ6VGVhbTE= + url: https://api.github.com/teams/1 + html_url: https://github.com/orgs/github/teams/justice-league + name: Justice League + slug: justice-league + description: A great team. + privacy: closed + permission: admin + members_url: https://api.github.com/teams/1/members{/member} + repositories_url: https://api.github.com/teams/1/repos + parent: + ldap-mapping-user: + value: + ldap_dn: uid=asdf,ou=users,dc=github,dc=com + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + name: monalisa octocat + company: GitHub + blog: https://github.com/blog + location: San Francisco + email: octocat@github.com + hireable: false + bio: There once was... + twitter_username: monatheoctocat + public_repos: 2 + public_gists: 1 + followers: 20 + following: 0 + created_at: '2008-01-14T04:33:35Z' + updated_at: '2008-01-14T04:33:35Z' + private_gists: 81 + total_private_repos: 100 + owned_private_repos: 100 + disk_usage: 10000 + collaborators: 8 + two_factor_authentication: true + plan: + name: Medium + space: 400 + private_repos: 20 + collaborators: 0 + organization-simple: + value: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + hooks_url: https://api.github.com/orgs/github/hooks + issues_url: https://api.github.com/orgs/github/issues + members_url: https://api.github.com/orgs/github/members{/member} + public_members_url: https://api.github.com/orgs/github/public_members{/member} + avatar_url: https://github.com/images/error/octocat_happy.gif + description: A great organization + pre-receive-environment-items: + value: + - id: 1 + name: Default + image_url: githubenterprise://internal + url: https://github.example.com/api/v3/admin/pre-receive-environments/1 + html_url: https://github.example.com/admin/pre-receive-environments/1 + default_environment: true + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 14 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest + state: not_started + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + - id: 2 + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz + url: https://github.example.com/api/v3/admin/pre-receive-environments/2 + html_url: https://github.example.com/admin/pre-receive-environments/2 + default_environment: false + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + pre-receive-environment: + value: + id: 2 + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz + url: https://github.example.com/api/v3/admin/pre-receive-environments/2 + html_url: https://github.example.com/admin/pre-receive-environments/2 + default_environment: false + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest + state: not_started + downloaded_at: + message: + pre-receive-environment-default-response: + value: + id: 2 + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz + url: https://github.example.com/api/v3/admin/pre-receive-environments/2 + html_url: https://github.example.com/admin/pre-receive-environments/2 + default_environment: false + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + pre-receive-environment-download-status-default-response: + value: + url: https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest + state: not_started + downloaded_at: + message: + pre-receive-environment-download-status: + value: + url: https://github.example.com/api/v3/admin/pre-receive-environments/3/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + pre-receive-hook-items: + value: + - id: 1 + name: Check Commits + enforcement: disabled + script: scripts/commmit_check.sh + script_repository: + id: 595 + full_name: DevIT/hooks + url: https://github.example.com/api/v3/repos/DevIT/hooks + html_url: https://github.example.com/DevIT/hooks + environment: + id: 2 + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz + url: https://github.example.com/api/v3/admin/pre-receive-environments/2 + html_url: https://github.example.com/admin/pre-receive-environments/2 + default_environment: false + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + allow_downstream_configuration: false + pre-receive-hook: + value: + id: 1 + name: Check Commits + enforcement: disabled + script: scripts/commmit_check.sh + script_repository: + id: 595 + full_name: DevIT/hooks + url: https://github.example.com/api/v3/repos/DevIT/hooks + html_url: https://github.example.com/DevIT/hooks + environment: + id: 2 + name: DevTools Hook Env + image_url: https://my_file_server/path/to/devtools_env.tar.gz + url: https://github.example.com/api/v3/admin/pre-receive-environments/2 + html_url: https://github.example.com/admin/pre-receive-environments/2 + default_environment: false + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/2/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + allow_downstream_configuration: false + pre-receive-hook-2: + value: + id: 1 + name: Check Commits + enforcement: disabled + script: scripts/commmit_check.sh + script_repository: + id: 595 + full_name: DevIT/hooks + url: https://github.example.com/api/v3/repos/DevIT/hooks + html_url: https://github.example.com/DevIT/hooks + environment: + id: 1 + name: Default + image_url: githubenterprise://internal + url: https://github.example.com/api/v3/admin/pre-receive-environments/1 + html_url: https://github.example.com/admin/pre-receive-environments/1 + default_environment: true + created_at: '2016-05-20T11:35:45-05:00' + hooks_count: 1 + download: + url: https://github.example.com/api/v3/admin/pre-receive-environments/1/downloads/latest + state: success + downloaded_at: '2016-05-26T07:42:53-05:00' + message: + allow_downstream_configuration: true + authorization-items: + value: + - id: 2 + url: https://enterprise.octocat.com/api/v3/authorizations/2 + app: + name: My personal access token + url: https://docs.github.com/enterprise/rest/reference/enterprise-admin#list-personal-access-tokens + client_id: '00000000000000000000' + token: ghp_16C7e42F292c6912E7710c838347Ae178B4a + hashed_token: 23cffb2fab1b0a62747863eba88cb9327e561f2f7a0c8661c0d9b83146cb8d45 + token_last_eight: Ae178B4a + note: My personal access token + note_url: + created_at: '2019-04-24T21:49:02Z' + updated_at: '2019-04-24T21:49:02Z' + scopes: + - admin:business + - admin:gpg_key + - admin:org + - admin:org_hook + - admin:pre_receive_hook + - admin:public_key + - admin:repo_hook + - delete_repo + - gist + - notifications + - repo + - user + - write:discussion + fingerprint: + simple-user: + value: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + authorization: + value: + id: 1 + url: https://api.github.com/authorizations/1 + scopes: + - public_repo + token: ghu_16C7e42F292c6912E7710c838347Ae178B4a + token_last_eight: Ae178B4a + hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 + app: + url: http://my-github-app.com + name: my github app + client_id: abcde12345fghij67890 + note: optional note + note_url: http://optional/note/url + updated_at: '2011-09-06T20:39:23Z' + created_at: '2011-09-06T17:26:27Z' + expires_at: '2011-10-06T17:26:27Z' + fingerprint: jklmnop12345678 integration: value: id: 1 @@ -58635,8 +58466,8 @@ components: created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' app_slug: github-actions - suspended_at: - suspended_by: + suspended_at: + suspended_by: base-installation: value: id: 1 @@ -58681,8 +58512,8 @@ components: created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' app_slug: github-actions - suspended_at: - suspended_by: + suspended_at: + suspended_by: installation-token: value: token: ghs_16C7e42F292c6912E7710c838347Ae178B4a @@ -58762,7 +58593,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -58791,7 +58622,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -58846,7 +58677,7 @@ components: app: url: http://my-github-app.com name: my github app - client_id: abcde12345fghij67890 + client_id: Iv1.8a61f9b3a7aba766 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' @@ -58883,7 +58714,7 @@ components: app: url: http://my-github-app.com name: my github app - client_id: abcde12345fghij67890 + client_id: Iv1.8a61f9b3a7aba766 note: optional note note_url: http://optional/note/url updated_at: '2011-09-06T20:39:23Z' @@ -58938,44 +58769,6 @@ components: site_admin: false has_multiple_single_files: false single_file_paths: [] - authorization-items: - value: - - id: 1 - url: https://api.github.com/authorizations/1 - scopes: - - public_repo - token: ghu_16C7e42F292c6912E7710c838347Ae178B4a - token_last_eight: Ae178B4a - hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 - app: - url: http://my-github-app.com - name: my github app - client_id: abcde12345fghij67890 - note: optional note - note_url: http://optional/note/url - updated_at: '2011-09-06T20:39:23Z' - created_at: '2011-09-06T17:26:27Z' - expires_at: '2011-09-08T17:26:27Z' - fingerprint: jklmnop12345678 - authorization: - value: - id: 1 - url: https://api.github.com/authorizations/1 - scopes: - - public_repo - token: ghu_16C7e42F292c6912E7710c838347Ae178B4a - token_last_eight: Ae178B4a - hashed_token: 25f94a2a5c7fbaf499c665bc73d67c1c87e496da8985131633ee0a95819db2e8 - app: - url: http://my-github-app.com - name: my github app - client_id: abcde12345fghij67890 - note: optional note - note_url: http://optional/note/url - updated_at: '2011-09-06T20:39:23Z' - created_at: '2011-09-06T17:26:27Z' - expires_at: '2011-10-06T17:26:27Z' - fingerprint: '' authorization-response-if-returning-an-existing-token-2: value: id: 1 @@ -59117,6 +58910,1947 @@ components: [homepage]: http://contributor-covenant.org [version]: http://contributor-covenant.org/version/1/4/ html_url: http://contributor-covenant.org/version/1/4/ + emojis-get: + value: + "+1": https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8 + "-1": https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8 + '100': https://github.githubassets.com/images/icons/emoji/unicode/1f4af.png?v8 + '1234': https://github.githubassets.com/images/icons/emoji/unicode/1f522.png?v8 + 1st_place_medal: https://github.githubassets.com/images/icons/emoji/unicode/1f947.png?v8 + 2nd_place_medal: https://github.githubassets.com/images/icons/emoji/unicode/1f948.png?v8 + 3rd_place_medal: https://github.githubassets.com/images/icons/emoji/unicode/1f949.png?v8 + 8ball: https://github.githubassets.com/images/icons/emoji/unicode/1f3b1.png?v8 + a: https://github.githubassets.com/images/icons/emoji/unicode/1f170.png?v8 + ab: https://github.githubassets.com/images/icons/emoji/unicode/1f18e.png?v8 + abacus: https://github.githubassets.com/images/icons/emoji/unicode/1f9ee.png?v8 + abc: https://github.githubassets.com/images/icons/emoji/unicode/1f524.png?v8 + abcd: https://github.githubassets.com/images/icons/emoji/unicode/1f521.png?v8 + accept: https://github.githubassets.com/images/icons/emoji/unicode/1f251.png?v8 + accordion: https://github.githubassets.com/images/icons/emoji/unicode/1fa97.png?v8 + adhesive_bandage: https://github.githubassets.com/images/icons/emoji/unicode/1fa79.png?v8 + adult: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1.png?v8 + aerial_tramway: https://github.githubassets.com/images/icons/emoji/unicode/1f6a1.png?v8 + afghanistan: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1eb.png?v8 + airplane: https://github.githubassets.com/images/icons/emoji/unicode/2708.png?v8 + aland_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1fd.png?v8 + alarm_clock: https://github.githubassets.com/images/icons/emoji/unicode/23f0.png?v8 + albania: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f1.png?v8 + alembic: https://github.githubassets.com/images/icons/emoji/unicode/2697.png?v8 + algeria: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ff.png?v8 + alien: https://github.githubassets.com/images/icons/emoji/unicode/1f47d.png?v8 + ambulance: https://github.githubassets.com/images/icons/emoji/unicode/1f691.png?v8 + american_samoa: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f8.png?v8 + amphora: https://github.githubassets.com/images/icons/emoji/unicode/1f3fa.png?v8 + anatomical_heart: https://github.githubassets.com/images/icons/emoji/unicode/1fac0.png?v8 + anchor: https://github.githubassets.com/images/icons/emoji/unicode/2693.png?v8 + andorra: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1e9.png?v8 + angel: https://github.githubassets.com/images/icons/emoji/unicode/1f47c.png?v8 + anger: https://github.githubassets.com/images/icons/emoji/unicode/1f4a2.png?v8 + angola: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f4.png?v8 + angry: https://github.githubassets.com/images/icons/emoji/unicode/1f620.png?v8 + anguilla: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ee.png?v8 + anguished: https://github.githubassets.com/images/icons/emoji/unicode/1f627.png?v8 + ant: https://github.githubassets.com/images/icons/emoji/unicode/1f41c.png?v8 + antarctica: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f6.png?v8 + antigua_barbuda: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ec.png?v8 + apple: https://github.githubassets.com/images/icons/emoji/unicode/1f34e.png?v8 + aquarius: https://github.githubassets.com/images/icons/emoji/unicode/2652.png?v8 + argentina: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f7.png?v8 + aries: https://github.githubassets.com/images/icons/emoji/unicode/2648.png?v8 + armenia: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f2.png?v8 + arrow_backward: https://github.githubassets.com/images/icons/emoji/unicode/25c0.png?v8 + arrow_double_down: https://github.githubassets.com/images/icons/emoji/unicode/23ec.png?v8 + arrow_double_up: https://github.githubassets.com/images/icons/emoji/unicode/23eb.png?v8 + arrow_down: https://github.githubassets.com/images/icons/emoji/unicode/2b07.png?v8 + arrow_down_small: https://github.githubassets.com/images/icons/emoji/unicode/1f53d.png?v8 + arrow_forward: https://github.githubassets.com/images/icons/emoji/unicode/25b6.png?v8 + arrow_heading_down: https://github.githubassets.com/images/icons/emoji/unicode/2935.png?v8 + arrow_heading_up: https://github.githubassets.com/images/icons/emoji/unicode/2934.png?v8 + arrow_left: https://github.githubassets.com/images/icons/emoji/unicode/2b05.png?v8 + arrow_lower_left: https://github.githubassets.com/images/icons/emoji/unicode/2199.png?v8 + arrow_lower_right: https://github.githubassets.com/images/icons/emoji/unicode/2198.png?v8 + arrow_right: https://github.githubassets.com/images/icons/emoji/unicode/27a1.png?v8 + arrow_right_hook: https://github.githubassets.com/images/icons/emoji/unicode/21aa.png?v8 + arrow_up: https://github.githubassets.com/images/icons/emoji/unicode/2b06.png?v8 + arrow_up_down: https://github.githubassets.com/images/icons/emoji/unicode/2195.png?v8 + arrow_up_small: https://github.githubassets.com/images/icons/emoji/unicode/1f53c.png?v8 + arrow_upper_left: https://github.githubassets.com/images/icons/emoji/unicode/2196.png?v8 + arrow_upper_right: https://github.githubassets.com/images/icons/emoji/unicode/2197.png?v8 + arrows_clockwise: https://github.githubassets.com/images/icons/emoji/unicode/1f503.png?v8 + arrows_counterclockwise: https://github.githubassets.com/images/icons/emoji/unicode/1f504.png?v8 + art: https://github.githubassets.com/images/icons/emoji/unicode/1f3a8.png?v8 + articulated_lorry: https://github.githubassets.com/images/icons/emoji/unicode/1f69b.png?v8 + artificial_satellite: https://github.githubassets.com/images/icons/emoji/unicode/1f6f0.png?v8 + artist: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f3a8.png?v8 + aruba: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1fc.png?v8 + ascension_island: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1e8.png?v8 + asterisk: https://github.githubassets.com/images/icons/emoji/unicode/002a-20e3.png?v8 + astonished: https://github.githubassets.com/images/icons/emoji/unicode/1f632.png?v8 + astronaut: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f680.png?v8 + athletic_shoe: https://github.githubassets.com/images/icons/emoji/unicode/1f45f.png?v8 + atm: https://github.githubassets.com/images/icons/emoji/unicode/1f3e7.png?v8 + atom: https://github.githubassets.com/images/icons/emoji/atom.png?v8 + atom_symbol: https://github.githubassets.com/images/icons/emoji/unicode/269b.png?v8 + australia: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1fa.png?v8 + austria: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1f9.png?v8 + auto_rickshaw: https://github.githubassets.com/images/icons/emoji/unicode/1f6fa.png?v8 + avocado: https://github.githubassets.com/images/icons/emoji/unicode/1f951.png?v8 + axe: https://github.githubassets.com/images/icons/emoji/unicode/1fa93.png?v8 + azerbaijan: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ff.png?v8 + b: https://github.githubassets.com/images/icons/emoji/unicode/1f171.png?v8 + baby: https://github.githubassets.com/images/icons/emoji/unicode/1f476.png?v8 + baby_bottle: https://github.githubassets.com/images/icons/emoji/unicode/1f37c.png?v8 + baby_chick: https://github.githubassets.com/images/icons/emoji/unicode/1f424.png?v8 + baby_symbol: https://github.githubassets.com/images/icons/emoji/unicode/1f6bc.png?v8 + back: https://github.githubassets.com/images/icons/emoji/unicode/1f519.png?v8 + bacon: https://github.githubassets.com/images/icons/emoji/unicode/1f953.png?v8 + badger: https://github.githubassets.com/images/icons/emoji/unicode/1f9a1.png?v8 + badminton: https://github.githubassets.com/images/icons/emoji/unicode/1f3f8.png?v8 + bagel: https://github.githubassets.com/images/icons/emoji/unicode/1f96f.png?v8 + baggage_claim: https://github.githubassets.com/images/icons/emoji/unicode/1f6c4.png?v8 + baguette_bread: https://github.githubassets.com/images/icons/emoji/unicode/1f956.png?v8 + bahamas: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f8.png?v8 + bahrain: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ed.png?v8 + balance_scale: https://github.githubassets.com/images/icons/emoji/unicode/2696.png?v8 + bald_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9b2.png?v8 + bald_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9b2.png?v8 + ballet_shoes: https://github.githubassets.com/images/icons/emoji/unicode/1fa70.png?v8 + balloon: https://github.githubassets.com/images/icons/emoji/unicode/1f388.png?v8 + ballot_box: https://github.githubassets.com/images/icons/emoji/unicode/1f5f3.png?v8 + ballot_box_with_check: https://github.githubassets.com/images/icons/emoji/unicode/2611.png?v8 + bamboo: https://github.githubassets.com/images/icons/emoji/unicode/1f38d.png?v8 + banana: https://github.githubassets.com/images/icons/emoji/unicode/1f34c.png?v8 + bangbang: https://github.githubassets.com/images/icons/emoji/unicode/203c.png?v8 + bangladesh: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1e9.png?v8 + banjo: https://github.githubassets.com/images/icons/emoji/unicode/1fa95.png?v8 + bank: https://github.githubassets.com/images/icons/emoji/unicode/1f3e6.png?v8 + bar_chart: https://github.githubassets.com/images/icons/emoji/unicode/1f4ca.png?v8 + barbados: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1e7.png?v8 + barber: https://github.githubassets.com/images/icons/emoji/unicode/1f488.png?v8 + baseball: https://github.githubassets.com/images/icons/emoji/unicode/26be.png?v8 + basecamp: https://github.githubassets.com/images/icons/emoji/basecamp.png?v8 + basecampy: https://github.githubassets.com/images/icons/emoji/basecampy.png?v8 + basket: https://github.githubassets.com/images/icons/emoji/unicode/1f9fa.png?v8 + basketball: https://github.githubassets.com/images/icons/emoji/unicode/1f3c0.png?v8 + basketball_man: https://github.githubassets.com/images/icons/emoji/unicode/26f9-2642.png?v8 + basketball_woman: https://github.githubassets.com/images/icons/emoji/unicode/26f9-2640.png?v8 + bat: https://github.githubassets.com/images/icons/emoji/unicode/1f987.png?v8 + bath: https://github.githubassets.com/images/icons/emoji/unicode/1f6c0.png?v8 + bathtub: https://github.githubassets.com/images/icons/emoji/unicode/1f6c1.png?v8 + battery: https://github.githubassets.com/images/icons/emoji/unicode/1f50b.png?v8 + beach_umbrella: https://github.githubassets.com/images/icons/emoji/unicode/1f3d6.png?v8 + bear: https://github.githubassets.com/images/icons/emoji/unicode/1f43b.png?v8 + bearded_person: https://github.githubassets.com/images/icons/emoji/unicode/1f9d4.png?v8 + beaver: https://github.githubassets.com/images/icons/emoji/unicode/1f9ab.png?v8 + bed: https://github.githubassets.com/images/icons/emoji/unicode/1f6cf.png?v8 + bee: https://github.githubassets.com/images/icons/emoji/unicode/1f41d.png?v8 + beer: https://github.githubassets.com/images/icons/emoji/unicode/1f37a.png?v8 + beers: https://github.githubassets.com/images/icons/emoji/unicode/1f37b.png?v8 + beetle: https://github.githubassets.com/images/icons/emoji/unicode/1fab2.png?v8 + beginner: https://github.githubassets.com/images/icons/emoji/unicode/1f530.png?v8 + belarus: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1fe.png?v8 + belgium: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ea.png?v8 + belize: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ff.png?v8 + bell: https://github.githubassets.com/images/icons/emoji/unicode/1f514.png?v8 + bell_pepper: https://github.githubassets.com/images/icons/emoji/unicode/1fad1.png?v8 + bellhop_bell: https://github.githubassets.com/images/icons/emoji/unicode/1f6ce.png?v8 + benin: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ef.png?v8 + bento: https://github.githubassets.com/images/icons/emoji/unicode/1f371.png?v8 + bermuda: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f2.png?v8 + beverage_box: https://github.githubassets.com/images/icons/emoji/unicode/1f9c3.png?v8 + bhutan: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f9.png?v8 + bicyclist: https://github.githubassets.com/images/icons/emoji/unicode/1f6b4.png?v8 + bike: https://github.githubassets.com/images/icons/emoji/unicode/1f6b2.png?v8 + biking_man: https://github.githubassets.com/images/icons/emoji/unicode/1f6b4-2642.png?v8 + biking_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f6b4-2640.png?v8 + bikini: https://github.githubassets.com/images/icons/emoji/unicode/1f459.png?v8 + billed_cap: https://github.githubassets.com/images/icons/emoji/unicode/1f9e2.png?v8 + biohazard: https://github.githubassets.com/images/icons/emoji/unicode/2623.png?v8 + bird: https://github.githubassets.com/images/icons/emoji/unicode/1f426.png?v8 + birthday: https://github.githubassets.com/images/icons/emoji/unicode/1f382.png?v8 + bison: https://github.githubassets.com/images/icons/emoji/unicode/1f9ac.png?v8 + black_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f408-2b1b.png?v8 + black_circle: https://github.githubassets.com/images/icons/emoji/unicode/26ab.png?v8 + black_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3f4.png?v8 + black_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f5a4.png?v8 + black_joker: https://github.githubassets.com/images/icons/emoji/unicode/1f0cf.png?v8 + black_large_square: https://github.githubassets.com/images/icons/emoji/unicode/2b1b.png?v8 + black_medium_small_square: https://github.githubassets.com/images/icons/emoji/unicode/25fe.png?v8 + black_medium_square: https://github.githubassets.com/images/icons/emoji/unicode/25fc.png?v8 + black_nib: https://github.githubassets.com/images/icons/emoji/unicode/2712.png?v8 + black_small_square: https://github.githubassets.com/images/icons/emoji/unicode/25aa.png?v8 + black_square_button: https://github.githubassets.com/images/icons/emoji/unicode/1f532.png?v8 + blond_haired_man: https://github.githubassets.com/images/icons/emoji/unicode/1f471-2642.png?v8 + blond_haired_person: https://github.githubassets.com/images/icons/emoji/unicode/1f471.png?v8 + blond_haired_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f471-2640.png?v8 + blonde_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f471-2640.png?v8 + blossom: https://github.githubassets.com/images/icons/emoji/unicode/1f33c.png?v8 + blowfish: https://github.githubassets.com/images/icons/emoji/unicode/1f421.png?v8 + blue_book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d8.png?v8 + blue_car: https://github.githubassets.com/images/icons/emoji/unicode/1f699.png?v8 + blue_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f499.png?v8 + blue_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7e6.png?v8 + blueberries: https://github.githubassets.com/images/icons/emoji/unicode/1fad0.png?v8 + blush: https://github.githubassets.com/images/icons/emoji/unicode/1f60a.png?v8 + boar: https://github.githubassets.com/images/icons/emoji/unicode/1f417.png?v8 + boat: https://github.githubassets.com/images/icons/emoji/unicode/26f5.png?v8 + bolivia: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f4.png?v8 + bomb: https://github.githubassets.com/images/icons/emoji/unicode/1f4a3.png?v8 + bone: https://github.githubassets.com/images/icons/emoji/unicode/1f9b4.png?v8 + book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d6.png?v8 + bookmark: https://github.githubassets.com/images/icons/emoji/unicode/1f516.png?v8 + bookmark_tabs: https://github.githubassets.com/images/icons/emoji/unicode/1f4d1.png?v8 + books: https://github.githubassets.com/images/icons/emoji/unicode/1f4da.png?v8 + boom: https://github.githubassets.com/images/icons/emoji/unicode/1f4a5.png?v8 + boomerang: https://github.githubassets.com/images/icons/emoji/unicode/1fa83.png?v8 + boot: https://github.githubassets.com/images/icons/emoji/unicode/1f462.png?v8 + bosnia_herzegovina: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1e6.png?v8 + botswana: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1fc.png?v8 + bouncing_ball_man: https://github.githubassets.com/images/icons/emoji/unicode/26f9-2642.png?v8 + bouncing_ball_person: https://github.githubassets.com/images/icons/emoji/unicode/26f9.png?v8 + bouncing_ball_woman: https://github.githubassets.com/images/icons/emoji/unicode/26f9-2640.png?v8 + bouquet: https://github.githubassets.com/images/icons/emoji/unicode/1f490.png?v8 + bouvet_island: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1fb.png?v8 + bow: https://github.githubassets.com/images/icons/emoji/unicode/1f647.png?v8 + bow_and_arrow: https://github.githubassets.com/images/icons/emoji/unicode/1f3f9.png?v8 + bowing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f647-2642.png?v8 + bowing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f647-2640.png?v8 + bowl_with_spoon: https://github.githubassets.com/images/icons/emoji/unicode/1f963.png?v8 + bowling: https://github.githubassets.com/images/icons/emoji/unicode/1f3b3.png?v8 + bowtie: https://github.githubassets.com/images/icons/emoji/bowtie.png?v8 + boxing_glove: https://github.githubassets.com/images/icons/emoji/unicode/1f94a.png?v8 + boy: https://github.githubassets.com/images/icons/emoji/unicode/1f466.png?v8 + brain: https://github.githubassets.com/images/icons/emoji/unicode/1f9e0.png?v8 + brazil: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f7.png?v8 + bread: https://github.githubassets.com/images/icons/emoji/unicode/1f35e.png?v8 + breast_feeding: https://github.githubassets.com/images/icons/emoji/unicode/1f931.png?v8 + bricks: https://github.githubassets.com/images/icons/emoji/unicode/1f9f1.png?v8 + bride_with_veil: https://github.githubassets.com/images/icons/emoji/unicode/1f470-2640.png?v8 + bridge_at_night: https://github.githubassets.com/images/icons/emoji/unicode/1f309.png?v8 + briefcase: https://github.githubassets.com/images/icons/emoji/unicode/1f4bc.png?v8 + british_indian_ocean_territory: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f4.png?v8 + british_virgin_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1ec.png?v8 + broccoli: https://github.githubassets.com/images/icons/emoji/unicode/1f966.png?v8 + broken_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f494.png?v8 + broom: https://github.githubassets.com/images/icons/emoji/unicode/1f9f9.png?v8 + brown_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f7e4.png?v8 + brown_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f90e.png?v8 + brown_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7eb.png?v8 + brunei: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f3.png?v8 + bubble_tea: https://github.githubassets.com/images/icons/emoji/unicode/1f9cb.png?v8 + bucket: https://github.githubassets.com/images/icons/emoji/unicode/1faa3.png?v8 + bug: https://github.githubassets.com/images/icons/emoji/unicode/1f41b.png?v8 + building_construction: https://github.githubassets.com/images/icons/emoji/unicode/1f3d7.png?v8 + bulb: https://github.githubassets.com/images/icons/emoji/unicode/1f4a1.png?v8 + bulgaria: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ec.png?v8 + bullettrain_front: https://github.githubassets.com/images/icons/emoji/unicode/1f685.png?v8 + bullettrain_side: https://github.githubassets.com/images/icons/emoji/unicode/1f684.png?v8 + burkina_faso: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1eb.png?v8 + burrito: https://github.githubassets.com/images/icons/emoji/unicode/1f32f.png?v8 + burundi: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1ee.png?v8 + bus: https://github.githubassets.com/images/icons/emoji/unicode/1f68c.png?v8 + business_suit_levitating: https://github.githubassets.com/images/icons/emoji/unicode/1f574.png?v8 + busstop: https://github.githubassets.com/images/icons/emoji/unicode/1f68f.png?v8 + bust_in_silhouette: https://github.githubassets.com/images/icons/emoji/unicode/1f464.png?v8 + busts_in_silhouette: https://github.githubassets.com/images/icons/emoji/unicode/1f465.png?v8 + butter: https://github.githubassets.com/images/icons/emoji/unicode/1f9c8.png?v8 + butterfly: https://github.githubassets.com/images/icons/emoji/unicode/1f98b.png?v8 + cactus: https://github.githubassets.com/images/icons/emoji/unicode/1f335.png?v8 + cake: https://github.githubassets.com/images/icons/emoji/unicode/1f370.png?v8 + calendar: https://github.githubassets.com/images/icons/emoji/unicode/1f4c6.png?v8 + call_me_hand: https://github.githubassets.com/images/icons/emoji/unicode/1f919.png?v8 + calling: https://github.githubassets.com/images/icons/emoji/unicode/1f4f2.png?v8 + cambodia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ed.png?v8 + camel: https://github.githubassets.com/images/icons/emoji/unicode/1f42b.png?v8 + camera: https://github.githubassets.com/images/icons/emoji/unicode/1f4f7.png?v8 + camera_flash: https://github.githubassets.com/images/icons/emoji/unicode/1f4f8.png?v8 + cameroon: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f2.png?v8 + camping: https://github.githubassets.com/images/icons/emoji/unicode/1f3d5.png?v8 + canada: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1e6.png?v8 + canary_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1e8.png?v8 + cancer: https://github.githubassets.com/images/icons/emoji/unicode/264b.png?v8 + candle: https://github.githubassets.com/images/icons/emoji/unicode/1f56f.png?v8 + candy: https://github.githubassets.com/images/icons/emoji/unicode/1f36c.png?v8 + canned_food: https://github.githubassets.com/images/icons/emoji/unicode/1f96b.png?v8 + canoe: https://github.githubassets.com/images/icons/emoji/unicode/1f6f6.png?v8 + cape_verde: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1fb.png?v8 + capital_abcd: https://github.githubassets.com/images/icons/emoji/unicode/1f520.png?v8 + capricorn: https://github.githubassets.com/images/icons/emoji/unicode/2651.png?v8 + car: https://github.githubassets.com/images/icons/emoji/unicode/1f697.png?v8 + card_file_box: https://github.githubassets.com/images/icons/emoji/unicode/1f5c3.png?v8 + card_index: https://github.githubassets.com/images/icons/emoji/unicode/1f4c7.png?v8 + card_index_dividers: https://github.githubassets.com/images/icons/emoji/unicode/1f5c2.png?v8 + caribbean_netherlands: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f6.png?v8 + carousel_horse: https://github.githubassets.com/images/icons/emoji/unicode/1f3a0.png?v8 + carpentry_saw: https://github.githubassets.com/images/icons/emoji/unicode/1fa9a.png?v8 + carrot: https://github.githubassets.com/images/icons/emoji/unicode/1f955.png?v8 + cartwheeling: https://github.githubassets.com/images/icons/emoji/unicode/1f938.png?v8 + cat: https://github.githubassets.com/images/icons/emoji/unicode/1f431.png?v8 + cat2: https://github.githubassets.com/images/icons/emoji/unicode/1f408.png?v8 + cayman_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1fe.png?v8 + cd: https://github.githubassets.com/images/icons/emoji/unicode/1f4bf.png?v8 + central_african_republic: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1eb.png?v8 + ceuta_melilla: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1e6.png?v8 + chad: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1e9.png?v8 + chains: https://github.githubassets.com/images/icons/emoji/unicode/26d3.png?v8 + chair: https://github.githubassets.com/images/icons/emoji/unicode/1fa91.png?v8 + champagne: https://github.githubassets.com/images/icons/emoji/unicode/1f37e.png?v8 + chart: https://github.githubassets.com/images/icons/emoji/unicode/1f4b9.png?v8 + chart_with_downwards_trend: https://github.githubassets.com/images/icons/emoji/unicode/1f4c9.png?v8 + chart_with_upwards_trend: https://github.githubassets.com/images/icons/emoji/unicode/1f4c8.png?v8 + checkered_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3c1.png?v8 + cheese: https://github.githubassets.com/images/icons/emoji/unicode/1f9c0.png?v8 + cherries: https://github.githubassets.com/images/icons/emoji/unicode/1f352.png?v8 + cherry_blossom: https://github.githubassets.com/images/icons/emoji/unicode/1f338.png?v8 + chess_pawn: https://github.githubassets.com/images/icons/emoji/unicode/265f.png?v8 + chestnut: https://github.githubassets.com/images/icons/emoji/unicode/1f330.png?v8 + chicken: https://github.githubassets.com/images/icons/emoji/unicode/1f414.png?v8 + child: https://github.githubassets.com/images/icons/emoji/unicode/1f9d2.png?v8 + children_crossing: https://github.githubassets.com/images/icons/emoji/unicode/1f6b8.png?v8 + chile: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f1.png?v8 + chipmunk: https://github.githubassets.com/images/icons/emoji/unicode/1f43f.png?v8 + chocolate_bar: https://github.githubassets.com/images/icons/emoji/unicode/1f36b.png?v8 + chopsticks: https://github.githubassets.com/images/icons/emoji/unicode/1f962.png?v8 + christmas_island: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1fd.png?v8 + christmas_tree: https://github.githubassets.com/images/icons/emoji/unicode/1f384.png?v8 + church: https://github.githubassets.com/images/icons/emoji/unicode/26ea.png?v8 + cinema: https://github.githubassets.com/images/icons/emoji/unicode/1f3a6.png?v8 + circus_tent: https://github.githubassets.com/images/icons/emoji/unicode/1f3aa.png?v8 + city_sunrise: https://github.githubassets.com/images/icons/emoji/unicode/1f307.png?v8 + city_sunset: https://github.githubassets.com/images/icons/emoji/unicode/1f306.png?v8 + cityscape: https://github.githubassets.com/images/icons/emoji/unicode/1f3d9.png?v8 + cl: https://github.githubassets.com/images/icons/emoji/unicode/1f191.png?v8 + clamp: https://github.githubassets.com/images/icons/emoji/unicode/1f5dc.png?v8 + clap: https://github.githubassets.com/images/icons/emoji/unicode/1f44f.png?v8 + clapper: https://github.githubassets.com/images/icons/emoji/unicode/1f3ac.png?v8 + classical_building: https://github.githubassets.com/images/icons/emoji/unicode/1f3db.png?v8 + climbing: https://github.githubassets.com/images/icons/emoji/unicode/1f9d7.png?v8 + climbing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9d7-2642.png?v8 + climbing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9d7-2640.png?v8 + clinking_glasses: https://github.githubassets.com/images/icons/emoji/unicode/1f942.png?v8 + clipboard: https://github.githubassets.com/images/icons/emoji/unicode/1f4cb.png?v8 + clipperton_island: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f5.png?v8 + clock1: https://github.githubassets.com/images/icons/emoji/unicode/1f550.png?v8 + clock10: https://github.githubassets.com/images/icons/emoji/unicode/1f559.png?v8 + clock1030: https://github.githubassets.com/images/icons/emoji/unicode/1f565.png?v8 + clock11: https://github.githubassets.com/images/icons/emoji/unicode/1f55a.png?v8 + clock1130: https://github.githubassets.com/images/icons/emoji/unicode/1f566.png?v8 + clock12: https://github.githubassets.com/images/icons/emoji/unicode/1f55b.png?v8 + clock1230: https://github.githubassets.com/images/icons/emoji/unicode/1f567.png?v8 + clock130: https://github.githubassets.com/images/icons/emoji/unicode/1f55c.png?v8 + clock2: https://github.githubassets.com/images/icons/emoji/unicode/1f551.png?v8 + clock230: https://github.githubassets.com/images/icons/emoji/unicode/1f55d.png?v8 + clock3: https://github.githubassets.com/images/icons/emoji/unicode/1f552.png?v8 + clock330: https://github.githubassets.com/images/icons/emoji/unicode/1f55e.png?v8 + clock4: https://github.githubassets.com/images/icons/emoji/unicode/1f553.png?v8 + clock430: https://github.githubassets.com/images/icons/emoji/unicode/1f55f.png?v8 + clock5: https://github.githubassets.com/images/icons/emoji/unicode/1f554.png?v8 + clock530: https://github.githubassets.com/images/icons/emoji/unicode/1f560.png?v8 + clock6: https://github.githubassets.com/images/icons/emoji/unicode/1f555.png?v8 + clock630: https://github.githubassets.com/images/icons/emoji/unicode/1f561.png?v8 + clock7: https://github.githubassets.com/images/icons/emoji/unicode/1f556.png?v8 + clock730: https://github.githubassets.com/images/icons/emoji/unicode/1f562.png?v8 + clock8: https://github.githubassets.com/images/icons/emoji/unicode/1f557.png?v8 + clock830: https://github.githubassets.com/images/icons/emoji/unicode/1f563.png?v8 + clock9: https://github.githubassets.com/images/icons/emoji/unicode/1f558.png?v8 + clock930: https://github.githubassets.com/images/icons/emoji/unicode/1f564.png?v8 + closed_book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d5.png?v8 + closed_lock_with_key: https://github.githubassets.com/images/icons/emoji/unicode/1f510.png?v8 + closed_umbrella: https://github.githubassets.com/images/icons/emoji/unicode/1f302.png?v8 + cloud: https://github.githubassets.com/images/icons/emoji/unicode/2601.png?v8 + cloud_with_lightning: https://github.githubassets.com/images/icons/emoji/unicode/1f329.png?v8 + cloud_with_lightning_and_rain: https://github.githubassets.com/images/icons/emoji/unicode/26c8.png?v8 + cloud_with_rain: https://github.githubassets.com/images/icons/emoji/unicode/1f327.png?v8 + cloud_with_snow: https://github.githubassets.com/images/icons/emoji/unicode/1f328.png?v8 + clown_face: https://github.githubassets.com/images/icons/emoji/unicode/1f921.png?v8 + clubs: https://github.githubassets.com/images/icons/emoji/unicode/2663.png?v8 + cn: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f3.png?v8 + coat: https://github.githubassets.com/images/icons/emoji/unicode/1f9e5.png?v8 + cockroach: https://github.githubassets.com/images/icons/emoji/unicode/1fab3.png?v8 + cocktail: https://github.githubassets.com/images/icons/emoji/unicode/1f378.png?v8 + coconut: https://github.githubassets.com/images/icons/emoji/unicode/1f965.png?v8 + cocos_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1e8.png?v8 + coffee: https://github.githubassets.com/images/icons/emoji/unicode/2615.png?v8 + coffin: https://github.githubassets.com/images/icons/emoji/unicode/26b0.png?v8 + coin: https://github.githubassets.com/images/icons/emoji/unicode/1fa99.png?v8 + cold_face: https://github.githubassets.com/images/icons/emoji/unicode/1f976.png?v8 + cold_sweat: https://github.githubassets.com/images/icons/emoji/unicode/1f630.png?v8 + collision: https://github.githubassets.com/images/icons/emoji/unicode/1f4a5.png?v8 + colombia: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f4.png?v8 + comet: https://github.githubassets.com/images/icons/emoji/unicode/2604.png?v8 + comoros: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1f2.png?v8 + compass: https://github.githubassets.com/images/icons/emoji/unicode/1f9ed.png?v8 + computer: https://github.githubassets.com/images/icons/emoji/unicode/1f4bb.png?v8 + computer_mouse: https://github.githubassets.com/images/icons/emoji/unicode/1f5b1.png?v8 + confetti_ball: https://github.githubassets.com/images/icons/emoji/unicode/1f38a.png?v8 + confounded: https://github.githubassets.com/images/icons/emoji/unicode/1f616.png?v8 + confused: https://github.githubassets.com/images/icons/emoji/unicode/1f615.png?v8 + congo_brazzaville: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1ec.png?v8 + congo_kinshasa: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1e9.png?v8 + congratulations: https://github.githubassets.com/images/icons/emoji/unicode/3297.png?v8 + construction: https://github.githubassets.com/images/icons/emoji/unicode/1f6a7.png?v8 + construction_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f477.png?v8 + construction_worker_man: https://github.githubassets.com/images/icons/emoji/unicode/1f477-2642.png?v8 + construction_worker_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f477-2640.png?v8 + control_knobs: https://github.githubassets.com/images/icons/emoji/unicode/1f39b.png?v8 + convenience_store: https://github.githubassets.com/images/icons/emoji/unicode/1f3ea.png?v8 + cook: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f373.png?v8 + cook_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f0.png?v8 + cookie: https://github.githubassets.com/images/icons/emoji/unicode/1f36a.png?v8 + cool: https://github.githubassets.com/images/icons/emoji/unicode/1f192.png?v8 + cop: https://github.githubassets.com/images/icons/emoji/unicode/1f46e.png?v8 + copyright: https://github.githubassets.com/images/icons/emoji/unicode/00a9.png?v8 + corn: https://github.githubassets.com/images/icons/emoji/unicode/1f33d.png?v8 + costa_rica: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1f7.png?v8 + cote_divoire: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1ee.png?v8 + couch_and_lamp: https://github.githubassets.com/images/icons/emoji/unicode/1f6cb.png?v8 + couple: https://github.githubassets.com/images/icons/emoji/unicode/1f46b.png?v8 + couple_with_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f491.png?v8 + couple_with_heart_man_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-2764-1f468.png?v8 + couple_with_heart_woman_man: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2764-1f468.png?v8 + couple_with_heart_woman_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2764-1f469.png?v8 + couplekiss: https://github.githubassets.com/images/icons/emoji/unicode/1f48f.png?v8 + couplekiss_man_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-2764-1f48b-1f468.png?v8 + couplekiss_man_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2764-1f48b-1f468.png?v8 + couplekiss_woman_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2764-1f48b-1f469.png?v8 + cow: https://github.githubassets.com/images/icons/emoji/unicode/1f42e.png?v8 + cow2: https://github.githubassets.com/images/icons/emoji/unicode/1f404.png?v8 + cowboy_hat_face: https://github.githubassets.com/images/icons/emoji/unicode/1f920.png?v8 + crab: https://github.githubassets.com/images/icons/emoji/unicode/1f980.png?v8 + crayon: https://github.githubassets.com/images/icons/emoji/unicode/1f58d.png?v8 + credit_card: https://github.githubassets.com/images/icons/emoji/unicode/1f4b3.png?v8 + crescent_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f319.png?v8 + cricket: https://github.githubassets.com/images/icons/emoji/unicode/1f997.png?v8 + cricket_game: https://github.githubassets.com/images/icons/emoji/unicode/1f3cf.png?v8 + croatia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1f7.png?v8 + crocodile: https://github.githubassets.com/images/icons/emoji/unicode/1f40a.png?v8 + croissant: https://github.githubassets.com/images/icons/emoji/unicode/1f950.png?v8 + crossed_fingers: https://github.githubassets.com/images/icons/emoji/unicode/1f91e.png?v8 + crossed_flags: https://github.githubassets.com/images/icons/emoji/unicode/1f38c.png?v8 + crossed_swords: https://github.githubassets.com/images/icons/emoji/unicode/2694.png?v8 + crown: https://github.githubassets.com/images/icons/emoji/unicode/1f451.png?v8 + cry: https://github.githubassets.com/images/icons/emoji/unicode/1f622.png?v8 + crying_cat_face: https://github.githubassets.com/images/icons/emoji/unicode/1f63f.png?v8 + crystal_ball: https://github.githubassets.com/images/icons/emoji/unicode/1f52e.png?v8 + cuba: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1fa.png?v8 + cucumber: https://github.githubassets.com/images/icons/emoji/unicode/1f952.png?v8 + cup_with_straw: https://github.githubassets.com/images/icons/emoji/unicode/1f964.png?v8 + cupcake: https://github.githubassets.com/images/icons/emoji/unicode/1f9c1.png?v8 + cupid: https://github.githubassets.com/images/icons/emoji/unicode/1f498.png?v8 + curacao: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1fc.png?v8 + curling_stone: https://github.githubassets.com/images/icons/emoji/unicode/1f94c.png?v8 + curly_haired_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9b1.png?v8 + curly_haired_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9b1.png?v8 + curly_loop: https://github.githubassets.com/images/icons/emoji/unicode/27b0.png?v8 + currency_exchange: https://github.githubassets.com/images/icons/emoji/unicode/1f4b1.png?v8 + curry: https://github.githubassets.com/images/icons/emoji/unicode/1f35b.png?v8 + cursing_face: https://github.githubassets.com/images/icons/emoji/unicode/1f92c.png?v8 + custard: https://github.githubassets.com/images/icons/emoji/unicode/1f36e.png?v8 + customs: https://github.githubassets.com/images/icons/emoji/unicode/1f6c3.png?v8 + cut_of_meat: https://github.githubassets.com/images/icons/emoji/unicode/1f969.png?v8 + cyclone: https://github.githubassets.com/images/icons/emoji/unicode/1f300.png?v8 + cyprus: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1fe.png?v8 + czech_republic: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1ff.png?v8 + dagger: https://github.githubassets.com/images/icons/emoji/unicode/1f5e1.png?v8 + dancer: https://github.githubassets.com/images/icons/emoji/unicode/1f483.png?v8 + dancers: https://github.githubassets.com/images/icons/emoji/unicode/1f46f.png?v8 + dancing_men: https://github.githubassets.com/images/icons/emoji/unicode/1f46f-2642.png?v8 + dancing_women: https://github.githubassets.com/images/icons/emoji/unicode/1f46f-2640.png?v8 + dango: https://github.githubassets.com/images/icons/emoji/unicode/1f361.png?v8 + dark_sunglasses: https://github.githubassets.com/images/icons/emoji/unicode/1f576.png?v8 + dart: https://github.githubassets.com/images/icons/emoji/unicode/1f3af.png?v8 + dash: https://github.githubassets.com/images/icons/emoji/unicode/1f4a8.png?v8 + date: https://github.githubassets.com/images/icons/emoji/unicode/1f4c5.png?v8 + de: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ea.png?v8 + deaf_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9cf-2642.png?v8 + deaf_person: https://github.githubassets.com/images/icons/emoji/unicode/1f9cf.png?v8 + deaf_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9cf-2640.png?v8 + deciduous_tree: https://github.githubassets.com/images/icons/emoji/unicode/1f333.png?v8 + deer: https://github.githubassets.com/images/icons/emoji/unicode/1f98c.png?v8 + denmark: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1f0.png?v8 + department_store: https://github.githubassets.com/images/icons/emoji/unicode/1f3ec.png?v8 + derelict_house: https://github.githubassets.com/images/icons/emoji/unicode/1f3da.png?v8 + desert: https://github.githubassets.com/images/icons/emoji/unicode/1f3dc.png?v8 + desert_island: https://github.githubassets.com/images/icons/emoji/unicode/1f3dd.png?v8 + desktop_computer: https://github.githubassets.com/images/icons/emoji/unicode/1f5a5.png?v8 + detective: https://github.githubassets.com/images/icons/emoji/unicode/1f575.png?v8 + diamond_shape_with_a_dot_inside: https://github.githubassets.com/images/icons/emoji/unicode/1f4a0.png?v8 + diamonds: https://github.githubassets.com/images/icons/emoji/unicode/2666.png?v8 + diego_garcia: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ec.png?v8 + disappointed: https://github.githubassets.com/images/icons/emoji/unicode/1f61e.png?v8 + disappointed_relieved: https://github.githubassets.com/images/icons/emoji/unicode/1f625.png?v8 + disguised_face: https://github.githubassets.com/images/icons/emoji/unicode/1f978.png?v8 + diving_mask: https://github.githubassets.com/images/icons/emoji/unicode/1f93f.png?v8 + diya_lamp: https://github.githubassets.com/images/icons/emoji/unicode/1fa94.png?v8 + dizzy: https://github.githubassets.com/images/icons/emoji/unicode/1f4ab.png?v8 + dizzy_face: https://github.githubassets.com/images/icons/emoji/unicode/1f635.png?v8 + djibouti: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1ef.png?v8 + dna: https://github.githubassets.com/images/icons/emoji/unicode/1f9ec.png?v8 + do_not_litter: https://github.githubassets.com/images/icons/emoji/unicode/1f6af.png?v8 + dodo: https://github.githubassets.com/images/icons/emoji/unicode/1f9a4.png?v8 + dog: https://github.githubassets.com/images/icons/emoji/unicode/1f436.png?v8 + dog2: https://github.githubassets.com/images/icons/emoji/unicode/1f415.png?v8 + dollar: https://github.githubassets.com/images/icons/emoji/unicode/1f4b5.png?v8 + dolls: https://github.githubassets.com/images/icons/emoji/unicode/1f38e.png?v8 + dolphin: https://github.githubassets.com/images/icons/emoji/unicode/1f42c.png?v8 + dominica: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1f2.png?v8 + dominican_republic: https://github.githubassets.com/images/icons/emoji/unicode/1f1e9-1f1f4.png?v8 + door: https://github.githubassets.com/images/icons/emoji/unicode/1f6aa.png?v8 + doughnut: https://github.githubassets.com/images/icons/emoji/unicode/1f369.png?v8 + dove: https://github.githubassets.com/images/icons/emoji/unicode/1f54a.png?v8 + dragon: https://github.githubassets.com/images/icons/emoji/unicode/1f409.png?v8 + dragon_face: https://github.githubassets.com/images/icons/emoji/unicode/1f432.png?v8 + dress: https://github.githubassets.com/images/icons/emoji/unicode/1f457.png?v8 + dromedary_camel: https://github.githubassets.com/images/icons/emoji/unicode/1f42a.png?v8 + drooling_face: https://github.githubassets.com/images/icons/emoji/unicode/1f924.png?v8 + drop_of_blood: https://github.githubassets.com/images/icons/emoji/unicode/1fa78.png?v8 + droplet: https://github.githubassets.com/images/icons/emoji/unicode/1f4a7.png?v8 + drum: https://github.githubassets.com/images/icons/emoji/unicode/1f941.png?v8 + duck: https://github.githubassets.com/images/icons/emoji/unicode/1f986.png?v8 + dumpling: https://github.githubassets.com/images/icons/emoji/unicode/1f95f.png?v8 + dvd: https://github.githubassets.com/images/icons/emoji/unicode/1f4c0.png?v8 + e-mail: https://github.githubassets.com/images/icons/emoji/unicode/1f4e7.png?v8 + eagle: https://github.githubassets.com/images/icons/emoji/unicode/1f985.png?v8 + ear: https://github.githubassets.com/images/icons/emoji/unicode/1f442.png?v8 + ear_of_rice: https://github.githubassets.com/images/icons/emoji/unicode/1f33e.png?v8 + ear_with_hearing_aid: https://github.githubassets.com/images/icons/emoji/unicode/1f9bb.png?v8 + earth_africa: https://github.githubassets.com/images/icons/emoji/unicode/1f30d.png?v8 + earth_americas: https://github.githubassets.com/images/icons/emoji/unicode/1f30e.png?v8 + earth_asia: https://github.githubassets.com/images/icons/emoji/unicode/1f30f.png?v8 + ecuador: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1e8.png?v8 + egg: https://github.githubassets.com/images/icons/emoji/unicode/1f95a.png?v8 + eggplant: https://github.githubassets.com/images/icons/emoji/unicode/1f346.png?v8 + egypt: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1ec.png?v8 + eight: https://github.githubassets.com/images/icons/emoji/unicode/0038-20e3.png?v8 + eight_pointed_black_star: https://github.githubassets.com/images/icons/emoji/unicode/2734.png?v8 + eight_spoked_asterisk: https://github.githubassets.com/images/icons/emoji/unicode/2733.png?v8 + eject_button: https://github.githubassets.com/images/icons/emoji/unicode/23cf.png?v8 + el_salvador: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1fb.png?v8 + electric_plug: https://github.githubassets.com/images/icons/emoji/unicode/1f50c.png?v8 + electron: https://github.githubassets.com/images/icons/emoji/electron.png?v8 + elephant: https://github.githubassets.com/images/icons/emoji/unicode/1f418.png?v8 + elevator: https://github.githubassets.com/images/icons/emoji/unicode/1f6d7.png?v8 + elf: https://github.githubassets.com/images/icons/emoji/unicode/1f9dd.png?v8 + elf_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9dd-2642.png?v8 + elf_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9dd-2640.png?v8 + email: https://github.githubassets.com/images/icons/emoji/unicode/1f4e7.png?v8 + end: https://github.githubassets.com/images/icons/emoji/unicode/1f51a.png?v8 + england: https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-e0067-e0062-e0065-e006e-e0067-e007f.png?v8 + envelope: https://github.githubassets.com/images/icons/emoji/unicode/2709.png?v8 + envelope_with_arrow: https://github.githubassets.com/images/icons/emoji/unicode/1f4e9.png?v8 + equatorial_guinea: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f6.png?v8 + eritrea: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1f7.png?v8 + es: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1f8.png?v8 + estonia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1ea.png?v8 + ethiopia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1f9.png?v8 + eu: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1fa.png?v8 + euro: https://github.githubassets.com/images/icons/emoji/unicode/1f4b6.png?v8 + european_castle: https://github.githubassets.com/images/icons/emoji/unicode/1f3f0.png?v8 + european_post_office: https://github.githubassets.com/images/icons/emoji/unicode/1f3e4.png?v8 + european_union: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1fa.png?v8 + evergreen_tree: https://github.githubassets.com/images/icons/emoji/unicode/1f332.png?v8 + exclamation: https://github.githubassets.com/images/icons/emoji/unicode/2757.png?v8 + exploding_head: https://github.githubassets.com/images/icons/emoji/unicode/1f92f.png?v8 + expressionless: https://github.githubassets.com/images/icons/emoji/unicode/1f611.png?v8 + eye: https://github.githubassets.com/images/icons/emoji/unicode/1f441.png?v8 + eye_speech_bubble: https://github.githubassets.com/images/icons/emoji/unicode/1f441-1f5e8.png?v8 + eyeglasses: https://github.githubassets.com/images/icons/emoji/unicode/1f453.png?v8 + eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f440.png?v8 + face_exhaling: https://github.githubassets.com/images/icons/emoji/unicode/1f62e-1f4a8.png?v8 + face_in_clouds: https://github.githubassets.com/images/icons/emoji/unicode/1f636-1f32b.png?v8 + face_with_head_bandage: https://github.githubassets.com/images/icons/emoji/unicode/1f915.png?v8 + face_with_spiral_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f635-1f4ab.png?v8 + face_with_thermometer: https://github.githubassets.com/images/icons/emoji/unicode/1f912.png?v8 + facepalm: https://github.githubassets.com/images/icons/emoji/unicode/1f926.png?v8 + facepunch: https://github.githubassets.com/images/icons/emoji/unicode/1f44a.png?v8 + factory: https://github.githubassets.com/images/icons/emoji/unicode/1f3ed.png?v8 + factory_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f3ed.png?v8 + fairy: https://github.githubassets.com/images/icons/emoji/unicode/1f9da.png?v8 + fairy_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9da-2642.png?v8 + fairy_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9da-2640.png?v8 + falafel: https://github.githubassets.com/images/icons/emoji/unicode/1f9c6.png?v8 + falkland_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1f0.png?v8 + fallen_leaf: https://github.githubassets.com/images/icons/emoji/unicode/1f342.png?v8 + family: https://github.githubassets.com/images/icons/emoji/unicode/1f46a.png?v8 + family_man_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f466.png?v8 + family_man_boy_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f466-1f466.png?v8 + family_man_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f467.png?v8 + family_man_girl_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f467-1f466.png?v8 + family_man_girl_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f467-1f467.png?v8 + family_man_man_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f468-1f466.png?v8 + family_man_man_boy_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f468-1f466-1f466.png?v8 + family_man_man_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f468-1f467.png?v8 + family_man_man_girl_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f468-1f467-1f466.png?v8 + family_man_man_girl_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f468-1f467-1f467.png?v8 + family_man_woman_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f469-1f466.png?v8 + family_man_woman_boy_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f469-1f466-1f466.png?v8 + family_man_woman_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f469-1f467.png?v8 + family_man_woman_girl_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f469-1f467-1f466.png?v8 + family_man_woman_girl_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f469-1f467-1f467.png?v8 + family_woman_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f466.png?v8 + family_woman_boy_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f466-1f466.png?v8 + family_woman_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f467.png?v8 + family_woman_girl_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f467-1f466.png?v8 + family_woman_girl_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f467-1f467.png?v8 + family_woman_woman_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f469-1f466.png?v8 + family_woman_woman_boy_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f469-1f466-1f466.png?v8 + family_woman_woman_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f469-1f467.png?v8 + family_woman_woman_girl_boy: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f469-1f467-1f466.png?v8 + family_woman_woman_girl_girl: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f469-1f467-1f467.png?v8 + farmer: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f33e.png?v8 + faroe_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1f4.png?v8 + fast_forward: https://github.githubassets.com/images/icons/emoji/unicode/23e9.png?v8 + fax: https://github.githubassets.com/images/icons/emoji/unicode/1f4e0.png?v8 + fearful: https://github.githubassets.com/images/icons/emoji/unicode/1f628.png?v8 + feather: https://github.githubassets.com/images/icons/emoji/unicode/1fab6.png?v8 + feelsgood: https://github.githubassets.com/images/icons/emoji/feelsgood.png?v8 + feet: https://github.githubassets.com/images/icons/emoji/unicode/1f43e.png?v8 + female_detective: https://github.githubassets.com/images/icons/emoji/unicode/1f575-2640.png?v8 + female_sign: https://github.githubassets.com/images/icons/emoji/unicode/2640.png?v8 + ferris_wheel: https://github.githubassets.com/images/icons/emoji/unicode/1f3a1.png?v8 + ferry: https://github.githubassets.com/images/icons/emoji/unicode/26f4.png?v8 + field_hockey: https://github.githubassets.com/images/icons/emoji/unicode/1f3d1.png?v8 + fiji: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1ef.png?v8 + file_cabinet: https://github.githubassets.com/images/icons/emoji/unicode/1f5c4.png?v8 + file_folder: https://github.githubassets.com/images/icons/emoji/unicode/1f4c1.png?v8 + film_projector: https://github.githubassets.com/images/icons/emoji/unicode/1f4fd.png?v8 + film_strip: https://github.githubassets.com/images/icons/emoji/unicode/1f39e.png?v8 + finland: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1ee.png?v8 + finnadie: https://github.githubassets.com/images/icons/emoji/finnadie.png?v8 + fire: https://github.githubassets.com/images/icons/emoji/unicode/1f525.png?v8 + fire_engine: https://github.githubassets.com/images/icons/emoji/unicode/1f692.png?v8 + fire_extinguisher: https://github.githubassets.com/images/icons/emoji/unicode/1f9ef.png?v8 + firecracker: https://github.githubassets.com/images/icons/emoji/unicode/1f9e8.png?v8 + firefighter: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f692.png?v8 + fireworks: https://github.githubassets.com/images/icons/emoji/unicode/1f386.png?v8 + first_quarter_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f313.png?v8 + first_quarter_moon_with_face: https://github.githubassets.com/images/icons/emoji/unicode/1f31b.png?v8 + fish: https://github.githubassets.com/images/icons/emoji/unicode/1f41f.png?v8 + fish_cake: https://github.githubassets.com/images/icons/emoji/unicode/1f365.png?v8 + fishing_pole_and_fish: https://github.githubassets.com/images/icons/emoji/unicode/1f3a3.png?v8 + fist: https://github.githubassets.com/images/icons/emoji/unicode/270a.png?v8 + fist_left: https://github.githubassets.com/images/icons/emoji/unicode/1f91b.png?v8 + fist_oncoming: https://github.githubassets.com/images/icons/emoji/unicode/1f44a.png?v8 + fist_raised: https://github.githubassets.com/images/icons/emoji/unicode/270a.png?v8 + fist_right: https://github.githubassets.com/images/icons/emoji/unicode/1f91c.png?v8 + five: https://github.githubassets.com/images/icons/emoji/unicode/0035-20e3.png?v8 + flags: https://github.githubassets.com/images/icons/emoji/unicode/1f38f.png?v8 + flamingo: https://github.githubassets.com/images/icons/emoji/unicode/1f9a9.png?v8 + flashlight: https://github.githubassets.com/images/icons/emoji/unicode/1f526.png?v8 + flat_shoe: https://github.githubassets.com/images/icons/emoji/unicode/1f97f.png?v8 + flatbread: https://github.githubassets.com/images/icons/emoji/unicode/1fad3.png?v8 + fleur_de_lis: https://github.githubassets.com/images/icons/emoji/unicode/269c.png?v8 + flight_arrival: https://github.githubassets.com/images/icons/emoji/unicode/1f6ec.png?v8 + flight_departure: https://github.githubassets.com/images/icons/emoji/unicode/1f6eb.png?v8 + flipper: https://github.githubassets.com/images/icons/emoji/unicode/1f42c.png?v8 + floppy_disk: https://github.githubassets.com/images/icons/emoji/unicode/1f4be.png?v8 + flower_playing_cards: https://github.githubassets.com/images/icons/emoji/unicode/1f3b4.png?v8 + flushed: https://github.githubassets.com/images/icons/emoji/unicode/1f633.png?v8 + fly: https://github.githubassets.com/images/icons/emoji/unicode/1fab0.png?v8 + flying_disc: https://github.githubassets.com/images/icons/emoji/unicode/1f94f.png?v8 + flying_saucer: https://github.githubassets.com/images/icons/emoji/unicode/1f6f8.png?v8 + fog: https://github.githubassets.com/images/icons/emoji/unicode/1f32b.png?v8 + foggy: https://github.githubassets.com/images/icons/emoji/unicode/1f301.png?v8 + fondue: https://github.githubassets.com/images/icons/emoji/unicode/1fad5.png?v8 + foot: https://github.githubassets.com/images/icons/emoji/unicode/1f9b6.png?v8 + football: https://github.githubassets.com/images/icons/emoji/unicode/1f3c8.png?v8 + footprints: https://github.githubassets.com/images/icons/emoji/unicode/1f463.png?v8 + fork_and_knife: https://github.githubassets.com/images/icons/emoji/unicode/1f374.png?v8 + fortune_cookie: https://github.githubassets.com/images/icons/emoji/unicode/1f960.png?v8 + fountain: https://github.githubassets.com/images/icons/emoji/unicode/26f2.png?v8 + fountain_pen: https://github.githubassets.com/images/icons/emoji/unicode/1f58b.png?v8 + four: https://github.githubassets.com/images/icons/emoji/unicode/0034-20e3.png?v8 + four_leaf_clover: https://github.githubassets.com/images/icons/emoji/unicode/1f340.png?v8 + fox_face: https://github.githubassets.com/images/icons/emoji/unicode/1f98a.png?v8 + fr: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1f7.png?v8 + framed_picture: https://github.githubassets.com/images/icons/emoji/unicode/1f5bc.png?v8 + free: https://github.githubassets.com/images/icons/emoji/unicode/1f193.png?v8 + french_guiana: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1eb.png?v8 + french_polynesia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1eb.png?v8 + french_southern_territories: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1eb.png?v8 + fried_egg: https://github.githubassets.com/images/icons/emoji/unicode/1f373.png?v8 + fried_shrimp: https://github.githubassets.com/images/icons/emoji/unicode/1f364.png?v8 + fries: https://github.githubassets.com/images/icons/emoji/unicode/1f35f.png?v8 + frog: https://github.githubassets.com/images/icons/emoji/unicode/1f438.png?v8 + frowning: https://github.githubassets.com/images/icons/emoji/unicode/1f626.png?v8 + frowning_face: https://github.githubassets.com/images/icons/emoji/unicode/2639.png?v8 + frowning_man: https://github.githubassets.com/images/icons/emoji/unicode/1f64d-2642.png?v8 + frowning_person: https://github.githubassets.com/images/icons/emoji/unicode/1f64d.png?v8 + frowning_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f64d-2640.png?v8 + fu: https://github.githubassets.com/images/icons/emoji/unicode/1f595.png?v8 + fuelpump: https://github.githubassets.com/images/icons/emoji/unicode/26fd.png?v8 + full_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f315.png?v8 + full_moon_with_face: https://github.githubassets.com/images/icons/emoji/unicode/1f31d.png?v8 + funeral_urn: https://github.githubassets.com/images/icons/emoji/unicode/26b1.png?v8 + gabon: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1e6.png?v8 + gambia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f2.png?v8 + game_die: https://github.githubassets.com/images/icons/emoji/unicode/1f3b2.png?v8 + garlic: https://github.githubassets.com/images/icons/emoji/unicode/1f9c4.png?v8 + gb: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1e7.png?v8 + gear: https://github.githubassets.com/images/icons/emoji/unicode/2699.png?v8 + gem: https://github.githubassets.com/images/icons/emoji/unicode/1f48e.png?v8 + gemini: https://github.githubassets.com/images/icons/emoji/unicode/264a.png?v8 + genie: https://github.githubassets.com/images/icons/emoji/unicode/1f9de.png?v8 + genie_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9de-2642.png?v8 + genie_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9de-2640.png?v8 + georgia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1ea.png?v8 + ghana: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1ed.png?v8 + ghost: https://github.githubassets.com/images/icons/emoji/unicode/1f47b.png?v8 + gibraltar: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1ee.png?v8 + gift: https://github.githubassets.com/images/icons/emoji/unicode/1f381.png?v8 + gift_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f49d.png?v8 + giraffe: https://github.githubassets.com/images/icons/emoji/unicode/1f992.png?v8 + girl: https://github.githubassets.com/images/icons/emoji/unicode/1f467.png?v8 + globe_with_meridians: https://github.githubassets.com/images/icons/emoji/unicode/1f310.png?v8 + gloves: https://github.githubassets.com/images/icons/emoji/unicode/1f9e4.png?v8 + goal_net: https://github.githubassets.com/images/icons/emoji/unicode/1f945.png?v8 + goat: https://github.githubassets.com/images/icons/emoji/unicode/1f410.png?v8 + goberserk: https://github.githubassets.com/images/icons/emoji/goberserk.png?v8 + godmode: https://github.githubassets.com/images/icons/emoji/godmode.png?v8 + goggles: https://github.githubassets.com/images/icons/emoji/unicode/1f97d.png?v8 + golf: https://github.githubassets.com/images/icons/emoji/unicode/26f3.png?v8 + golfing: https://github.githubassets.com/images/icons/emoji/unicode/1f3cc.png?v8 + golfing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f3cc-2642.png?v8 + golfing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f3cc-2640.png?v8 + gorilla: https://github.githubassets.com/images/icons/emoji/unicode/1f98d.png?v8 + grapes: https://github.githubassets.com/images/icons/emoji/unicode/1f347.png?v8 + greece: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f7.png?v8 + green_apple: https://github.githubassets.com/images/icons/emoji/unicode/1f34f.png?v8 + green_book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d7.png?v8 + green_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f7e2.png?v8 + green_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f49a.png?v8 + green_salad: https://github.githubassets.com/images/icons/emoji/unicode/1f957.png?v8 + green_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7e9.png?v8 + greenland: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f1.png?v8 + grenada: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1e9.png?v8 + grey_exclamation: https://github.githubassets.com/images/icons/emoji/unicode/2755.png?v8 + grey_question: https://github.githubassets.com/images/icons/emoji/unicode/2754.png?v8 + grimacing: https://github.githubassets.com/images/icons/emoji/unicode/1f62c.png?v8 + grin: https://github.githubassets.com/images/icons/emoji/unicode/1f601.png?v8 + grinning: https://github.githubassets.com/images/icons/emoji/unicode/1f600.png?v8 + guadeloupe: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f5.png?v8 + guam: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1fa.png?v8 + guard: https://github.githubassets.com/images/icons/emoji/unicode/1f482.png?v8 + guardsman: https://github.githubassets.com/images/icons/emoji/unicode/1f482-2642.png?v8 + guardswoman: https://github.githubassets.com/images/icons/emoji/unicode/1f482-2640.png?v8 + guatemala: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f9.png?v8 + guernsey: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1ec.png?v8 + guide_dog: https://github.githubassets.com/images/icons/emoji/unicode/1f9ae.png?v8 + guinea: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f3.png?v8 + guinea_bissau: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1fc.png?v8 + guitar: https://github.githubassets.com/images/icons/emoji/unicode/1f3b8.png?v8 + gun: https://github.githubassets.com/images/icons/emoji/unicode/1f52b.png?v8 + guyana: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1fe.png?v8 + haircut: https://github.githubassets.com/images/icons/emoji/unicode/1f487.png?v8 + haircut_man: https://github.githubassets.com/images/icons/emoji/unicode/1f487-2642.png?v8 + haircut_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f487-2640.png?v8 + haiti: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1f9.png?v8 + hamburger: https://github.githubassets.com/images/icons/emoji/unicode/1f354.png?v8 + hammer: https://github.githubassets.com/images/icons/emoji/unicode/1f528.png?v8 + hammer_and_pick: https://github.githubassets.com/images/icons/emoji/unicode/2692.png?v8 + hammer_and_wrench: https://github.githubassets.com/images/icons/emoji/unicode/1f6e0.png?v8 + hamster: https://github.githubassets.com/images/icons/emoji/unicode/1f439.png?v8 + hand: https://github.githubassets.com/images/icons/emoji/unicode/270b.png?v8 + hand_over_mouth: https://github.githubassets.com/images/icons/emoji/unicode/1f92d.png?v8 + handbag: https://github.githubassets.com/images/icons/emoji/unicode/1f45c.png?v8 + handball_person: https://github.githubassets.com/images/icons/emoji/unicode/1f93e.png?v8 + handshake: https://github.githubassets.com/images/icons/emoji/unicode/1f91d.png?v8 + hankey: https://github.githubassets.com/images/icons/emoji/unicode/1f4a9.png?v8 + hash: https://github.githubassets.com/images/icons/emoji/unicode/0023-20e3.png?v8 + hatched_chick: https://github.githubassets.com/images/icons/emoji/unicode/1f425.png?v8 + hatching_chick: https://github.githubassets.com/images/icons/emoji/unicode/1f423.png?v8 + headphones: https://github.githubassets.com/images/icons/emoji/unicode/1f3a7.png?v8 + headstone: https://github.githubassets.com/images/icons/emoji/unicode/1faa6.png?v8 + health_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-2695.png?v8 + hear_no_evil: https://github.githubassets.com/images/icons/emoji/unicode/1f649.png?v8 + heard_mcdonald_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1f2.png?v8 + heart: https://github.githubassets.com/images/icons/emoji/unicode/2764.png?v8 + heart_decoration: https://github.githubassets.com/images/icons/emoji/unicode/1f49f.png?v8 + heart_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f60d.png?v8 + heart_eyes_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f63b.png?v8 + heart_on_fire: https://github.githubassets.com/images/icons/emoji/unicode/2764-1f525.png?v8 + heartbeat: https://github.githubassets.com/images/icons/emoji/unicode/1f493.png?v8 + heartpulse: https://github.githubassets.com/images/icons/emoji/unicode/1f497.png?v8 + hearts: https://github.githubassets.com/images/icons/emoji/unicode/2665.png?v8 + heavy_check_mark: https://github.githubassets.com/images/icons/emoji/unicode/2714.png?v8 + heavy_division_sign: https://github.githubassets.com/images/icons/emoji/unicode/2797.png?v8 + heavy_dollar_sign: https://github.githubassets.com/images/icons/emoji/unicode/1f4b2.png?v8 + heavy_exclamation_mark: https://github.githubassets.com/images/icons/emoji/unicode/2757.png?v8 + heavy_heart_exclamation: https://github.githubassets.com/images/icons/emoji/unicode/2763.png?v8 + heavy_minus_sign: https://github.githubassets.com/images/icons/emoji/unicode/2796.png?v8 + heavy_multiplication_x: https://github.githubassets.com/images/icons/emoji/unicode/2716.png?v8 + heavy_plus_sign: https://github.githubassets.com/images/icons/emoji/unicode/2795.png?v8 + hedgehog: https://github.githubassets.com/images/icons/emoji/unicode/1f994.png?v8 + helicopter: https://github.githubassets.com/images/icons/emoji/unicode/1f681.png?v8 + herb: https://github.githubassets.com/images/icons/emoji/unicode/1f33f.png?v8 + hibiscus: https://github.githubassets.com/images/icons/emoji/unicode/1f33a.png?v8 + high_brightness: https://github.githubassets.com/images/icons/emoji/unicode/1f506.png?v8 + high_heel: https://github.githubassets.com/images/icons/emoji/unicode/1f460.png?v8 + hiking_boot: https://github.githubassets.com/images/icons/emoji/unicode/1f97e.png?v8 + hindu_temple: https://github.githubassets.com/images/icons/emoji/unicode/1f6d5.png?v8 + hippopotamus: https://github.githubassets.com/images/icons/emoji/unicode/1f99b.png?v8 + hocho: https://github.githubassets.com/images/icons/emoji/unicode/1f52a.png?v8 + hole: https://github.githubassets.com/images/icons/emoji/unicode/1f573.png?v8 + honduras: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1f3.png?v8 + honey_pot: https://github.githubassets.com/images/icons/emoji/unicode/1f36f.png?v8 + honeybee: https://github.githubassets.com/images/icons/emoji/unicode/1f41d.png?v8 + hong_kong: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1f0.png?v8 + hook: https://github.githubassets.com/images/icons/emoji/unicode/1fa9d.png?v8 + horse: https://github.githubassets.com/images/icons/emoji/unicode/1f434.png?v8 + horse_racing: https://github.githubassets.com/images/icons/emoji/unicode/1f3c7.png?v8 + hospital: https://github.githubassets.com/images/icons/emoji/unicode/1f3e5.png?v8 + hot_face: https://github.githubassets.com/images/icons/emoji/unicode/1f975.png?v8 + hot_pepper: https://github.githubassets.com/images/icons/emoji/unicode/1f336.png?v8 + hotdog: https://github.githubassets.com/images/icons/emoji/unicode/1f32d.png?v8 + hotel: https://github.githubassets.com/images/icons/emoji/unicode/1f3e8.png?v8 + hotsprings: https://github.githubassets.com/images/icons/emoji/unicode/2668.png?v8 + hourglass: https://github.githubassets.com/images/icons/emoji/unicode/231b.png?v8 + hourglass_flowing_sand: https://github.githubassets.com/images/icons/emoji/unicode/23f3.png?v8 + house: https://github.githubassets.com/images/icons/emoji/unicode/1f3e0.png?v8 + house_with_garden: https://github.githubassets.com/images/icons/emoji/unicode/1f3e1.png?v8 + houses: https://github.githubassets.com/images/icons/emoji/unicode/1f3d8.png?v8 + hugs: https://github.githubassets.com/images/icons/emoji/unicode/1f917.png?v8 + hungary: https://github.githubassets.com/images/icons/emoji/unicode/1f1ed-1f1fa.png?v8 + hurtrealbad: https://github.githubassets.com/images/icons/emoji/hurtrealbad.png?v8 + hushed: https://github.githubassets.com/images/icons/emoji/unicode/1f62f.png?v8 + hut: https://github.githubassets.com/images/icons/emoji/unicode/1f6d6.png?v8 + ice_cream: https://github.githubassets.com/images/icons/emoji/unicode/1f368.png?v8 + ice_cube: https://github.githubassets.com/images/icons/emoji/unicode/1f9ca.png?v8 + ice_hockey: https://github.githubassets.com/images/icons/emoji/unicode/1f3d2.png?v8 + ice_skate: https://github.githubassets.com/images/icons/emoji/unicode/26f8.png?v8 + icecream: https://github.githubassets.com/images/icons/emoji/unicode/1f366.png?v8 + iceland: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f8.png?v8 + id: https://github.githubassets.com/images/icons/emoji/unicode/1f194.png?v8 + ideograph_advantage: https://github.githubassets.com/images/icons/emoji/unicode/1f250.png?v8 + imp: https://github.githubassets.com/images/icons/emoji/unicode/1f47f.png?v8 + inbox_tray: https://github.githubassets.com/images/icons/emoji/unicode/1f4e5.png?v8 + incoming_envelope: https://github.githubassets.com/images/icons/emoji/unicode/1f4e8.png?v8 + india: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f3.png?v8 + indonesia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1e9.png?v8 + infinity: https://github.githubassets.com/images/icons/emoji/unicode/267e.png?v8 + information_desk_person: https://github.githubassets.com/images/icons/emoji/unicode/1f481.png?v8 + information_source: https://github.githubassets.com/images/icons/emoji/unicode/2139.png?v8 + innocent: https://github.githubassets.com/images/icons/emoji/unicode/1f607.png?v8 + interrobang: https://github.githubassets.com/images/icons/emoji/unicode/2049.png?v8 + iphone: https://github.githubassets.com/images/icons/emoji/unicode/1f4f1.png?v8 + iran: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f7.png?v8 + iraq: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f6.png?v8 + ireland: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1ea.png?v8 + isle_of_man: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f2.png?v8 + israel: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f1.png?v8 + it: https://github.githubassets.com/images/icons/emoji/unicode/1f1ee-1f1f9.png?v8 + izakaya_lantern: https://github.githubassets.com/images/icons/emoji/unicode/1f3ee.png?v8 + jack_o_lantern: https://github.githubassets.com/images/icons/emoji/unicode/1f383.png?v8 + jamaica: https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1f2.png?v8 + japan: https://github.githubassets.com/images/icons/emoji/unicode/1f5fe.png?v8 + japanese_castle: https://github.githubassets.com/images/icons/emoji/unicode/1f3ef.png?v8 + japanese_goblin: https://github.githubassets.com/images/icons/emoji/unicode/1f47a.png?v8 + japanese_ogre: https://github.githubassets.com/images/icons/emoji/unicode/1f479.png?v8 + jeans: https://github.githubassets.com/images/icons/emoji/unicode/1f456.png?v8 + jersey: https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1ea.png?v8 + jigsaw: https://github.githubassets.com/images/icons/emoji/unicode/1f9e9.png?v8 + jordan: https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1f4.png?v8 + joy: https://github.githubassets.com/images/icons/emoji/unicode/1f602.png?v8 + joy_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f639.png?v8 + joystick: https://github.githubassets.com/images/icons/emoji/unicode/1f579.png?v8 + jp: https://github.githubassets.com/images/icons/emoji/unicode/1f1ef-1f1f5.png?v8 + judge: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-2696.png?v8 + juggling_person: https://github.githubassets.com/images/icons/emoji/unicode/1f939.png?v8 + kangaroo: https://github.githubassets.com/images/icons/emoji/unicode/1f998.png?v8 + kazakhstan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ff.png?v8 + kenya: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ea.png?v8 + key: https://github.githubassets.com/images/icons/emoji/unicode/1f511.png?v8 + keyboard: https://github.githubassets.com/images/icons/emoji/unicode/2328.png?v8 + keycap_ten: https://github.githubassets.com/images/icons/emoji/unicode/1f51f.png?v8 + kick_scooter: https://github.githubassets.com/images/icons/emoji/unicode/1f6f4.png?v8 + kimono: https://github.githubassets.com/images/icons/emoji/unicode/1f458.png?v8 + kiribati: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ee.png?v8 + kiss: https://github.githubassets.com/images/icons/emoji/unicode/1f48b.png?v8 + kissing: https://github.githubassets.com/images/icons/emoji/unicode/1f617.png?v8 + kissing_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f63d.png?v8 + kissing_closed_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f61a.png?v8 + kissing_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f618.png?v8 + kissing_smiling_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f619.png?v8 + kite: https://github.githubassets.com/images/icons/emoji/unicode/1fa81.png?v8 + kiwi_fruit: https://github.githubassets.com/images/icons/emoji/unicode/1f95d.png?v8 + kneeling_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9ce-2642.png?v8 + kneeling_person: https://github.githubassets.com/images/icons/emoji/unicode/1f9ce.png?v8 + kneeling_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9ce-2640.png?v8 + knife: https://github.githubassets.com/images/icons/emoji/unicode/1f52a.png?v8 + knot: https://github.githubassets.com/images/icons/emoji/unicode/1faa2.png?v8 + koala: https://github.githubassets.com/images/icons/emoji/unicode/1f428.png?v8 + koko: https://github.githubassets.com/images/icons/emoji/unicode/1f201.png?v8 + kosovo: https://github.githubassets.com/images/icons/emoji/unicode/1f1fd-1f1f0.png?v8 + kr: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1f7.png?v8 + kuwait: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1fc.png?v8 + kyrgyzstan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1ec.png?v8 + lab_coat: https://github.githubassets.com/images/icons/emoji/unicode/1f97c.png?v8 + label: https://github.githubassets.com/images/icons/emoji/unicode/1f3f7.png?v8 + lacrosse: https://github.githubassets.com/images/icons/emoji/unicode/1f94d.png?v8 + ladder: https://github.githubassets.com/images/icons/emoji/unicode/1fa9c.png?v8 + lady_beetle: https://github.githubassets.com/images/icons/emoji/unicode/1f41e.png?v8 + lantern: https://github.githubassets.com/images/icons/emoji/unicode/1f3ee.png?v8 + laos: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1e6.png?v8 + large_blue_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f535.png?v8 + large_blue_diamond: https://github.githubassets.com/images/icons/emoji/unicode/1f537.png?v8 + large_orange_diamond: https://github.githubassets.com/images/icons/emoji/unicode/1f536.png?v8 + last_quarter_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f317.png?v8 + last_quarter_moon_with_face: https://github.githubassets.com/images/icons/emoji/unicode/1f31c.png?v8 + latin_cross: https://github.githubassets.com/images/icons/emoji/unicode/271d.png?v8 + latvia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1fb.png?v8 + laughing: https://github.githubassets.com/images/icons/emoji/unicode/1f606.png?v8 + leafy_green: https://github.githubassets.com/images/icons/emoji/unicode/1f96c.png?v8 + leaves: https://github.githubassets.com/images/icons/emoji/unicode/1f343.png?v8 + lebanon: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1e7.png?v8 + ledger: https://github.githubassets.com/images/icons/emoji/unicode/1f4d2.png?v8 + left_luggage: https://github.githubassets.com/images/icons/emoji/unicode/1f6c5.png?v8 + left_right_arrow: https://github.githubassets.com/images/icons/emoji/unicode/2194.png?v8 + left_speech_bubble: https://github.githubassets.com/images/icons/emoji/unicode/1f5e8.png?v8 + leftwards_arrow_with_hook: https://github.githubassets.com/images/icons/emoji/unicode/21a9.png?v8 + leg: https://github.githubassets.com/images/icons/emoji/unicode/1f9b5.png?v8 + lemon: https://github.githubassets.com/images/icons/emoji/unicode/1f34b.png?v8 + leo: https://github.githubassets.com/images/icons/emoji/unicode/264c.png?v8 + leopard: https://github.githubassets.com/images/icons/emoji/unicode/1f406.png?v8 + lesotho: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1f8.png?v8 + level_slider: https://github.githubassets.com/images/icons/emoji/unicode/1f39a.png?v8 + liberia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1f7.png?v8 + libra: https://github.githubassets.com/images/icons/emoji/unicode/264e.png?v8 + libya: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1fe.png?v8 + liechtenstein: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1ee.png?v8 + light_rail: https://github.githubassets.com/images/icons/emoji/unicode/1f688.png?v8 + link: https://github.githubassets.com/images/icons/emoji/unicode/1f517.png?v8 + lion: https://github.githubassets.com/images/icons/emoji/unicode/1f981.png?v8 + lips: https://github.githubassets.com/images/icons/emoji/unicode/1f444.png?v8 + lipstick: https://github.githubassets.com/images/icons/emoji/unicode/1f484.png?v8 + lithuania: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1f9.png?v8 + lizard: https://github.githubassets.com/images/icons/emoji/unicode/1f98e.png?v8 + llama: https://github.githubassets.com/images/icons/emoji/unicode/1f999.png?v8 + lobster: https://github.githubassets.com/images/icons/emoji/unicode/1f99e.png?v8 + lock: https://github.githubassets.com/images/icons/emoji/unicode/1f512.png?v8 + lock_with_ink_pen: https://github.githubassets.com/images/icons/emoji/unicode/1f50f.png?v8 + lollipop: https://github.githubassets.com/images/icons/emoji/unicode/1f36d.png?v8 + long_drum: https://github.githubassets.com/images/icons/emoji/unicode/1fa98.png?v8 + loop: https://github.githubassets.com/images/icons/emoji/unicode/27bf.png?v8 + lotion_bottle: https://github.githubassets.com/images/icons/emoji/unicode/1f9f4.png?v8 + lotus_position: https://github.githubassets.com/images/icons/emoji/unicode/1f9d8.png?v8 + lotus_position_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9d8-2642.png?v8 + lotus_position_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9d8-2640.png?v8 + loud_sound: https://github.githubassets.com/images/icons/emoji/unicode/1f50a.png?v8 + loudspeaker: https://github.githubassets.com/images/icons/emoji/unicode/1f4e2.png?v8 + love_hotel: https://github.githubassets.com/images/icons/emoji/unicode/1f3e9.png?v8 + love_letter: https://github.githubassets.com/images/icons/emoji/unicode/1f48c.png?v8 + love_you_gesture: https://github.githubassets.com/images/icons/emoji/unicode/1f91f.png?v8 + low_brightness: https://github.githubassets.com/images/icons/emoji/unicode/1f505.png?v8 + luggage: https://github.githubassets.com/images/icons/emoji/unicode/1f9f3.png?v8 + lungs: https://github.githubassets.com/images/icons/emoji/unicode/1fac1.png?v8 + luxembourg: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1fa.png?v8 + lying_face: https://github.githubassets.com/images/icons/emoji/unicode/1f925.png?v8 + m: https://github.githubassets.com/images/icons/emoji/unicode/24c2.png?v8 + macau: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f4.png?v8 + macedonia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f0.png?v8 + madagascar: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1ec.png?v8 + mag: https://github.githubassets.com/images/icons/emoji/unicode/1f50d.png?v8 + mag_right: https://github.githubassets.com/images/icons/emoji/unicode/1f50e.png?v8 + mage: https://github.githubassets.com/images/icons/emoji/unicode/1f9d9.png?v8 + mage_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9d9-2642.png?v8 + mage_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9d9-2640.png?v8 + magic_wand: https://github.githubassets.com/images/icons/emoji/unicode/1fa84.png?v8 + magnet: https://github.githubassets.com/images/icons/emoji/unicode/1f9f2.png?v8 + mahjong: https://github.githubassets.com/images/icons/emoji/unicode/1f004.png?v8 + mailbox: https://github.githubassets.com/images/icons/emoji/unicode/1f4eb.png?v8 + mailbox_closed: https://github.githubassets.com/images/icons/emoji/unicode/1f4ea.png?v8 + mailbox_with_mail: https://github.githubassets.com/images/icons/emoji/unicode/1f4ec.png?v8 + mailbox_with_no_mail: https://github.githubassets.com/images/icons/emoji/unicode/1f4ed.png?v8 + malawi: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1fc.png?v8 + malaysia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1fe.png?v8 + maldives: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1fb.png?v8 + male_detective: https://github.githubassets.com/images/icons/emoji/unicode/1f575-2642.png?v8 + male_sign: https://github.githubassets.com/images/icons/emoji/unicode/2642.png?v8 + mali: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f1.png?v8 + malta: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f9.png?v8 + mammoth: https://github.githubassets.com/images/icons/emoji/unicode/1f9a3.png?v8 + man: https://github.githubassets.com/images/icons/emoji/unicode/1f468.png?v8 + man_artist: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f3a8.png?v8 + man_astronaut: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f680.png?v8 + man_beard: https://github.githubassets.com/images/icons/emoji/unicode/1f9d4-2642.png?v8 + man_cartwheeling: https://github.githubassets.com/images/icons/emoji/unicode/1f938-2642.png?v8 + man_cook: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f373.png?v8 + man_dancing: https://github.githubassets.com/images/icons/emoji/unicode/1f57a.png?v8 + man_facepalming: https://github.githubassets.com/images/icons/emoji/unicode/1f926-2642.png?v8 + man_factory_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f3ed.png?v8 + man_farmer: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f33e.png?v8 + man_feeding_baby: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f37c.png?v8 + man_firefighter: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f692.png?v8 + man_health_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f468-2695.png?v8 + man_in_manual_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9bd.png?v8 + man_in_motorized_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9bc.png?v8 + man_in_tuxedo: https://github.githubassets.com/images/icons/emoji/unicode/1f935-2642.png?v8 + man_judge: https://github.githubassets.com/images/icons/emoji/unicode/1f468-2696.png?v8 + man_juggling: https://github.githubassets.com/images/icons/emoji/unicode/1f939-2642.png?v8 + man_mechanic: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f527.png?v8 + man_office_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f4bc.png?v8 + man_pilot: https://github.githubassets.com/images/icons/emoji/unicode/1f468-2708.png?v8 + man_playing_handball: https://github.githubassets.com/images/icons/emoji/unicode/1f93e-2642.png?v8 + man_playing_water_polo: https://github.githubassets.com/images/icons/emoji/unicode/1f93d-2642.png?v8 + man_scientist: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f52c.png?v8 + man_shrugging: https://github.githubassets.com/images/icons/emoji/unicode/1f937-2642.png?v8 + man_singer: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f3a4.png?v8 + man_student: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f393.png?v8 + man_teacher: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f3eb.png?v8 + man_technologist: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f4bb.png?v8 + man_with_gua_pi_mao: https://github.githubassets.com/images/icons/emoji/unicode/1f472.png?v8 + man_with_probing_cane: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9af.png?v8 + man_with_turban: https://github.githubassets.com/images/icons/emoji/unicode/1f473-2642.png?v8 + man_with_veil: https://github.githubassets.com/images/icons/emoji/unicode/1f470-2642.png?v8 + mandarin: https://github.githubassets.com/images/icons/emoji/unicode/1f34a.png?v8 + mango: https://github.githubassets.com/images/icons/emoji/unicode/1f96d.png?v8 + mans_shoe: https://github.githubassets.com/images/icons/emoji/unicode/1f45e.png?v8 + mantelpiece_clock: https://github.githubassets.com/images/icons/emoji/unicode/1f570.png?v8 + manual_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f9bd.png?v8 + maple_leaf: https://github.githubassets.com/images/icons/emoji/unicode/1f341.png?v8 + marshall_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1ed.png?v8 + martial_arts_uniform: https://github.githubassets.com/images/icons/emoji/unicode/1f94b.png?v8 + martinique: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f6.png?v8 + mask: https://github.githubassets.com/images/icons/emoji/unicode/1f637.png?v8 + massage: https://github.githubassets.com/images/icons/emoji/unicode/1f486.png?v8 + massage_man: https://github.githubassets.com/images/icons/emoji/unicode/1f486-2642.png?v8 + massage_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f486-2640.png?v8 + mate: https://github.githubassets.com/images/icons/emoji/unicode/1f9c9.png?v8 + mauritania: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f7.png?v8 + mauritius: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1fa.png?v8 + mayotte: https://github.githubassets.com/images/icons/emoji/unicode/1f1fe-1f1f9.png?v8 + meat_on_bone: https://github.githubassets.com/images/icons/emoji/unicode/1f356.png?v8 + mechanic: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f527.png?v8 + mechanical_arm: https://github.githubassets.com/images/icons/emoji/unicode/1f9be.png?v8 + mechanical_leg: https://github.githubassets.com/images/icons/emoji/unicode/1f9bf.png?v8 + medal_military: https://github.githubassets.com/images/icons/emoji/unicode/1f396.png?v8 + medal_sports: https://github.githubassets.com/images/icons/emoji/unicode/1f3c5.png?v8 + medical_symbol: https://github.githubassets.com/images/icons/emoji/unicode/2695.png?v8 + mega: https://github.githubassets.com/images/icons/emoji/unicode/1f4e3.png?v8 + melon: https://github.githubassets.com/images/icons/emoji/unicode/1f348.png?v8 + memo: https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png?v8 + men_wrestling: https://github.githubassets.com/images/icons/emoji/unicode/1f93c-2642.png?v8 + mending_heart: https://github.githubassets.com/images/icons/emoji/unicode/2764-1fa79.png?v8 + menorah: https://github.githubassets.com/images/icons/emoji/unicode/1f54e.png?v8 + mens: https://github.githubassets.com/images/icons/emoji/unicode/1f6b9.png?v8 + mermaid: https://github.githubassets.com/images/icons/emoji/unicode/1f9dc-2640.png?v8 + merman: https://github.githubassets.com/images/icons/emoji/unicode/1f9dc-2642.png?v8 + merperson: https://github.githubassets.com/images/icons/emoji/unicode/1f9dc.png?v8 + metal: https://github.githubassets.com/images/icons/emoji/unicode/1f918.png?v8 + metro: https://github.githubassets.com/images/icons/emoji/unicode/1f687.png?v8 + mexico: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1fd.png?v8 + microbe: https://github.githubassets.com/images/icons/emoji/unicode/1f9a0.png?v8 + micronesia: https://github.githubassets.com/images/icons/emoji/unicode/1f1eb-1f1f2.png?v8 + microphone: https://github.githubassets.com/images/icons/emoji/unicode/1f3a4.png?v8 + microscope: https://github.githubassets.com/images/icons/emoji/unicode/1f52c.png?v8 + middle_finger: https://github.githubassets.com/images/icons/emoji/unicode/1f595.png?v8 + military_helmet: https://github.githubassets.com/images/icons/emoji/unicode/1fa96.png?v8 + milk_glass: https://github.githubassets.com/images/icons/emoji/unicode/1f95b.png?v8 + milky_way: https://github.githubassets.com/images/icons/emoji/unicode/1f30c.png?v8 + minibus: https://github.githubassets.com/images/icons/emoji/unicode/1f690.png?v8 + minidisc: https://github.githubassets.com/images/icons/emoji/unicode/1f4bd.png?v8 + mirror: https://github.githubassets.com/images/icons/emoji/unicode/1fa9e.png?v8 + mobile_phone_off: https://github.githubassets.com/images/icons/emoji/unicode/1f4f4.png?v8 + moldova: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e9.png?v8 + monaco: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e8.png?v8 + money_mouth_face: https://github.githubassets.com/images/icons/emoji/unicode/1f911.png?v8 + money_with_wings: https://github.githubassets.com/images/icons/emoji/unicode/1f4b8.png?v8 + moneybag: https://github.githubassets.com/images/icons/emoji/unicode/1f4b0.png?v8 + mongolia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f3.png?v8 + monkey: https://github.githubassets.com/images/icons/emoji/unicode/1f412.png?v8 + monkey_face: https://github.githubassets.com/images/icons/emoji/unicode/1f435.png?v8 + monocle_face: https://github.githubassets.com/images/icons/emoji/unicode/1f9d0.png?v8 + monorail: https://github.githubassets.com/images/icons/emoji/unicode/1f69d.png?v8 + montenegro: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1ea.png?v8 + montserrat: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f8.png?v8 + moon: https://github.githubassets.com/images/icons/emoji/unicode/1f314.png?v8 + moon_cake: https://github.githubassets.com/images/icons/emoji/unicode/1f96e.png?v8 + morocco: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1e6.png?v8 + mortar_board: https://github.githubassets.com/images/icons/emoji/unicode/1f393.png?v8 + mosque: https://github.githubassets.com/images/icons/emoji/unicode/1f54c.png?v8 + mosquito: https://github.githubassets.com/images/icons/emoji/unicode/1f99f.png?v8 + motor_boat: https://github.githubassets.com/images/icons/emoji/unicode/1f6e5.png?v8 + motor_scooter: https://github.githubassets.com/images/icons/emoji/unicode/1f6f5.png?v8 + motorcycle: https://github.githubassets.com/images/icons/emoji/unicode/1f3cd.png?v8 + motorized_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f9bc.png?v8 + motorway: https://github.githubassets.com/images/icons/emoji/unicode/1f6e3.png?v8 + mount_fuji: https://github.githubassets.com/images/icons/emoji/unicode/1f5fb.png?v8 + mountain: https://github.githubassets.com/images/icons/emoji/unicode/26f0.png?v8 + mountain_bicyclist: https://github.githubassets.com/images/icons/emoji/unicode/1f6b5.png?v8 + mountain_biking_man: https://github.githubassets.com/images/icons/emoji/unicode/1f6b5-2642.png?v8 + mountain_biking_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f6b5-2640.png?v8 + mountain_cableway: https://github.githubassets.com/images/icons/emoji/unicode/1f6a0.png?v8 + mountain_railway: https://github.githubassets.com/images/icons/emoji/unicode/1f69e.png?v8 + mountain_snow: https://github.githubassets.com/images/icons/emoji/unicode/1f3d4.png?v8 + mouse: https://github.githubassets.com/images/icons/emoji/unicode/1f42d.png?v8 + mouse2: https://github.githubassets.com/images/icons/emoji/unicode/1f401.png?v8 + mouse_trap: https://github.githubassets.com/images/icons/emoji/unicode/1faa4.png?v8 + movie_camera: https://github.githubassets.com/images/icons/emoji/unicode/1f3a5.png?v8 + moyai: https://github.githubassets.com/images/icons/emoji/unicode/1f5ff.png?v8 + mozambique: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1ff.png?v8 + mrs_claus: https://github.githubassets.com/images/icons/emoji/unicode/1f936.png?v8 + muscle: https://github.githubassets.com/images/icons/emoji/unicode/1f4aa.png?v8 + mushroom: https://github.githubassets.com/images/icons/emoji/unicode/1f344.png?v8 + musical_keyboard: https://github.githubassets.com/images/icons/emoji/unicode/1f3b9.png?v8 + musical_note: https://github.githubassets.com/images/icons/emoji/unicode/1f3b5.png?v8 + musical_score: https://github.githubassets.com/images/icons/emoji/unicode/1f3bc.png?v8 + mute: https://github.githubassets.com/images/icons/emoji/unicode/1f507.png?v8 + mx_claus: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f384.png?v8 + myanmar: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f2.png?v8 + nail_care: https://github.githubassets.com/images/icons/emoji/unicode/1f485.png?v8 + name_badge: https://github.githubassets.com/images/icons/emoji/unicode/1f4db.png?v8 + namibia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1e6.png?v8 + national_park: https://github.githubassets.com/images/icons/emoji/unicode/1f3de.png?v8 + nauru: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f7.png?v8 + nauseated_face: https://github.githubassets.com/images/icons/emoji/unicode/1f922.png?v8 + nazar_amulet: https://github.githubassets.com/images/icons/emoji/unicode/1f9ff.png?v8 + neckbeard: https://github.githubassets.com/images/icons/emoji/neckbeard.png?v8 + necktie: https://github.githubassets.com/images/icons/emoji/unicode/1f454.png?v8 + negative_squared_cross_mark: https://github.githubassets.com/images/icons/emoji/unicode/274e.png?v8 + nepal: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f5.png?v8 + nerd_face: https://github.githubassets.com/images/icons/emoji/unicode/1f913.png?v8 + nesting_dolls: https://github.githubassets.com/images/icons/emoji/unicode/1fa86.png?v8 + netherlands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f1.png?v8 + neutral_face: https://github.githubassets.com/images/icons/emoji/unicode/1f610.png?v8 + new: https://github.githubassets.com/images/icons/emoji/unicode/1f195.png?v8 + new_caledonia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1e8.png?v8 + new_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f311.png?v8 + new_moon_with_face: https://github.githubassets.com/images/icons/emoji/unicode/1f31a.png?v8 + new_zealand: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1ff.png?v8 + newspaper: https://github.githubassets.com/images/icons/emoji/unicode/1f4f0.png?v8 + newspaper_roll: https://github.githubassets.com/images/icons/emoji/unicode/1f5de.png?v8 + next_track_button: https://github.githubassets.com/images/icons/emoji/unicode/23ed.png?v8 + ng: https://github.githubassets.com/images/icons/emoji/unicode/1f196.png?v8 + ng_man: https://github.githubassets.com/images/icons/emoji/unicode/1f645-2642.png?v8 + ng_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f645-2640.png?v8 + nicaragua: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1ee.png?v8 + niger: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1ea.png?v8 + nigeria: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1ec.png?v8 + night_with_stars: https://github.githubassets.com/images/icons/emoji/unicode/1f303.png?v8 + nine: https://github.githubassets.com/images/icons/emoji/unicode/0039-20e3.png?v8 + ninja: https://github.githubassets.com/images/icons/emoji/unicode/1f977.png?v8 + niue: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1fa.png?v8 + no_bell: https://github.githubassets.com/images/icons/emoji/unicode/1f515.png?v8 + no_bicycles: https://github.githubassets.com/images/icons/emoji/unicode/1f6b3.png?v8 + no_entry: https://github.githubassets.com/images/icons/emoji/unicode/26d4.png?v8 + no_entry_sign: https://github.githubassets.com/images/icons/emoji/unicode/1f6ab.png?v8 + no_good: https://github.githubassets.com/images/icons/emoji/unicode/1f645.png?v8 + no_good_man: https://github.githubassets.com/images/icons/emoji/unicode/1f645-2642.png?v8 + no_good_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f645-2640.png?v8 + no_mobile_phones: https://github.githubassets.com/images/icons/emoji/unicode/1f4f5.png?v8 + no_mouth: https://github.githubassets.com/images/icons/emoji/unicode/1f636.png?v8 + no_pedestrians: https://github.githubassets.com/images/icons/emoji/unicode/1f6b7.png?v8 + no_smoking: https://github.githubassets.com/images/icons/emoji/unicode/1f6ad.png?v8 + non-potable_water: https://github.githubassets.com/images/icons/emoji/unicode/1f6b1.png?v8 + norfolk_island: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1eb.png?v8 + north_korea: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1f5.png?v8 + northern_mariana_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1f5.png?v8 + norway: https://github.githubassets.com/images/icons/emoji/unicode/1f1f3-1f1f4.png?v8 + nose: https://github.githubassets.com/images/icons/emoji/unicode/1f443.png?v8 + notebook: https://github.githubassets.com/images/icons/emoji/unicode/1f4d3.png?v8 + notebook_with_decorative_cover: https://github.githubassets.com/images/icons/emoji/unicode/1f4d4.png?v8 + notes: https://github.githubassets.com/images/icons/emoji/unicode/1f3b6.png?v8 + nut_and_bolt: https://github.githubassets.com/images/icons/emoji/unicode/1f529.png?v8 + o: https://github.githubassets.com/images/icons/emoji/unicode/2b55.png?v8 + o2: https://github.githubassets.com/images/icons/emoji/unicode/1f17e.png?v8 + ocean: https://github.githubassets.com/images/icons/emoji/unicode/1f30a.png?v8 + octocat: https://github.githubassets.com/images/icons/emoji/octocat.png?v8 + octopus: https://github.githubassets.com/images/icons/emoji/unicode/1f419.png?v8 + oden: https://github.githubassets.com/images/icons/emoji/unicode/1f362.png?v8 + office: https://github.githubassets.com/images/icons/emoji/unicode/1f3e2.png?v8 + office_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f4bc.png?v8 + oil_drum: https://github.githubassets.com/images/icons/emoji/unicode/1f6e2.png?v8 + ok: https://github.githubassets.com/images/icons/emoji/unicode/1f197.png?v8 + ok_hand: https://github.githubassets.com/images/icons/emoji/unicode/1f44c.png?v8 + ok_man: https://github.githubassets.com/images/icons/emoji/unicode/1f646-2642.png?v8 + ok_person: https://github.githubassets.com/images/icons/emoji/unicode/1f646.png?v8 + ok_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f646-2640.png?v8 + old_key: https://github.githubassets.com/images/icons/emoji/unicode/1f5dd.png?v8 + older_adult: https://github.githubassets.com/images/icons/emoji/unicode/1f9d3.png?v8 + older_man: https://github.githubassets.com/images/icons/emoji/unicode/1f474.png?v8 + older_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f475.png?v8 + olive: https://github.githubassets.com/images/icons/emoji/unicode/1fad2.png?v8 + om: https://github.githubassets.com/images/icons/emoji/unicode/1f549.png?v8 + oman: https://github.githubassets.com/images/icons/emoji/unicode/1f1f4-1f1f2.png?v8 + 'on': https://github.githubassets.com/images/icons/emoji/unicode/1f51b.png?v8 + oncoming_automobile: https://github.githubassets.com/images/icons/emoji/unicode/1f698.png?v8 + oncoming_bus: https://github.githubassets.com/images/icons/emoji/unicode/1f68d.png?v8 + oncoming_police_car: https://github.githubassets.com/images/icons/emoji/unicode/1f694.png?v8 + oncoming_taxi: https://github.githubassets.com/images/icons/emoji/unicode/1f696.png?v8 + one: https://github.githubassets.com/images/icons/emoji/unicode/0031-20e3.png?v8 + one_piece_swimsuit: https://github.githubassets.com/images/icons/emoji/unicode/1fa71.png?v8 + onion: https://github.githubassets.com/images/icons/emoji/unicode/1f9c5.png?v8 + open_book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d6.png?v8 + open_file_folder: https://github.githubassets.com/images/icons/emoji/unicode/1f4c2.png?v8 + open_hands: https://github.githubassets.com/images/icons/emoji/unicode/1f450.png?v8 + open_mouth: https://github.githubassets.com/images/icons/emoji/unicode/1f62e.png?v8 + open_umbrella: https://github.githubassets.com/images/icons/emoji/unicode/2602.png?v8 + ophiuchus: https://github.githubassets.com/images/icons/emoji/unicode/26ce.png?v8 + orange: https://github.githubassets.com/images/icons/emoji/unicode/1f34a.png?v8 + orange_book: https://github.githubassets.com/images/icons/emoji/unicode/1f4d9.png?v8 + orange_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f7e0.png?v8 + orange_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f9e1.png?v8 + orange_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7e7.png?v8 + orangutan: https://github.githubassets.com/images/icons/emoji/unicode/1f9a7.png?v8 + orthodox_cross: https://github.githubassets.com/images/icons/emoji/unicode/2626.png?v8 + otter: https://github.githubassets.com/images/icons/emoji/unicode/1f9a6.png?v8 + outbox_tray: https://github.githubassets.com/images/icons/emoji/unicode/1f4e4.png?v8 + owl: https://github.githubassets.com/images/icons/emoji/unicode/1f989.png?v8 + ox: https://github.githubassets.com/images/icons/emoji/unicode/1f402.png?v8 + oyster: https://github.githubassets.com/images/icons/emoji/unicode/1f9aa.png?v8 + package: https://github.githubassets.com/images/icons/emoji/unicode/1f4e6.png?v8 + page_facing_up: https://github.githubassets.com/images/icons/emoji/unicode/1f4c4.png?v8 + page_with_curl: https://github.githubassets.com/images/icons/emoji/unicode/1f4c3.png?v8 + pager: https://github.githubassets.com/images/icons/emoji/unicode/1f4df.png?v8 + paintbrush: https://github.githubassets.com/images/icons/emoji/unicode/1f58c.png?v8 + pakistan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f0.png?v8 + palau: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1fc.png?v8 + palestinian_territories: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f8.png?v8 + palm_tree: https://github.githubassets.com/images/icons/emoji/unicode/1f334.png?v8 + palms_up_together: https://github.githubassets.com/images/icons/emoji/unicode/1f932.png?v8 + panama: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1e6.png?v8 + pancakes: https://github.githubassets.com/images/icons/emoji/unicode/1f95e.png?v8 + panda_face: https://github.githubassets.com/images/icons/emoji/unicode/1f43c.png?v8 + paperclip: https://github.githubassets.com/images/icons/emoji/unicode/1f4ce.png?v8 + paperclips: https://github.githubassets.com/images/icons/emoji/unicode/1f587.png?v8 + papua_new_guinea: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1ec.png?v8 + parachute: https://github.githubassets.com/images/icons/emoji/unicode/1fa82.png?v8 + paraguay: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1fe.png?v8 + parasol_on_ground: https://github.githubassets.com/images/icons/emoji/unicode/26f1.png?v8 + parking: https://github.githubassets.com/images/icons/emoji/unicode/1f17f.png?v8 + parrot: https://github.githubassets.com/images/icons/emoji/unicode/1f99c.png?v8 + part_alternation_mark: https://github.githubassets.com/images/icons/emoji/unicode/303d.png?v8 + partly_sunny: https://github.githubassets.com/images/icons/emoji/unicode/26c5.png?v8 + partying_face: https://github.githubassets.com/images/icons/emoji/unicode/1f973.png?v8 + passenger_ship: https://github.githubassets.com/images/icons/emoji/unicode/1f6f3.png?v8 + passport_control: https://github.githubassets.com/images/icons/emoji/unicode/1f6c2.png?v8 + pause_button: https://github.githubassets.com/images/icons/emoji/unicode/23f8.png?v8 + paw_prints: https://github.githubassets.com/images/icons/emoji/unicode/1f43e.png?v8 + peace_symbol: https://github.githubassets.com/images/icons/emoji/unicode/262e.png?v8 + peach: https://github.githubassets.com/images/icons/emoji/unicode/1f351.png?v8 + peacock: https://github.githubassets.com/images/icons/emoji/unicode/1f99a.png?v8 + peanuts: https://github.githubassets.com/images/icons/emoji/unicode/1f95c.png?v8 + pear: https://github.githubassets.com/images/icons/emoji/unicode/1f350.png?v8 + pen: https://github.githubassets.com/images/icons/emoji/unicode/1f58a.png?v8 + pencil: https://github.githubassets.com/images/icons/emoji/unicode/1f4dd.png?v8 + pencil2: https://github.githubassets.com/images/icons/emoji/unicode/270f.png?v8 + penguin: https://github.githubassets.com/images/icons/emoji/unicode/1f427.png?v8 + pensive: https://github.githubassets.com/images/icons/emoji/unicode/1f614.png?v8 + people_holding_hands: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f91d-1f9d1.png?v8 + people_hugging: https://github.githubassets.com/images/icons/emoji/unicode/1fac2.png?v8 + performing_arts: https://github.githubassets.com/images/icons/emoji/unicode/1f3ad.png?v8 + persevere: https://github.githubassets.com/images/icons/emoji/unicode/1f623.png?v8 + person_bald: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b2.png?v8 + person_curly_hair: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b1.png?v8 + person_feeding_baby: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f37c.png?v8 + person_fencing: https://github.githubassets.com/images/icons/emoji/unicode/1f93a.png?v8 + person_in_manual_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9bd.png?v8 + person_in_motorized_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9bc.png?v8 + person_in_tuxedo: https://github.githubassets.com/images/icons/emoji/unicode/1f935.png?v8 + person_red_hair: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b0.png?v8 + person_white_hair: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9b3.png?v8 + person_with_probing_cane: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f9af.png?v8 + person_with_turban: https://github.githubassets.com/images/icons/emoji/unicode/1f473.png?v8 + person_with_veil: https://github.githubassets.com/images/icons/emoji/unicode/1f470.png?v8 + peru: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1ea.png?v8 + petri_dish: https://github.githubassets.com/images/icons/emoji/unicode/1f9eb.png?v8 + philippines: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1ed.png?v8 + phone: https://github.githubassets.com/images/icons/emoji/unicode/260e.png?v8 + pick: https://github.githubassets.com/images/icons/emoji/unicode/26cf.png?v8 + pickup_truck: https://github.githubassets.com/images/icons/emoji/unicode/1f6fb.png?v8 + pie: https://github.githubassets.com/images/icons/emoji/unicode/1f967.png?v8 + pig: https://github.githubassets.com/images/icons/emoji/unicode/1f437.png?v8 + pig2: https://github.githubassets.com/images/icons/emoji/unicode/1f416.png?v8 + pig_nose: https://github.githubassets.com/images/icons/emoji/unicode/1f43d.png?v8 + pill: https://github.githubassets.com/images/icons/emoji/unicode/1f48a.png?v8 + pilot: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-2708.png?v8 + pinata: https://github.githubassets.com/images/icons/emoji/unicode/1fa85.png?v8 + pinched_fingers: https://github.githubassets.com/images/icons/emoji/unicode/1f90c.png?v8 + pinching_hand: https://github.githubassets.com/images/icons/emoji/unicode/1f90f.png?v8 + pineapple: https://github.githubassets.com/images/icons/emoji/unicode/1f34d.png?v8 + ping_pong: https://github.githubassets.com/images/icons/emoji/unicode/1f3d3.png?v8 + pirate_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-2620.png?v8 + pisces: https://github.githubassets.com/images/icons/emoji/unicode/2653.png?v8 + pitcairn_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f3.png?v8 + pizza: https://github.githubassets.com/images/icons/emoji/unicode/1f355.png?v8 + placard: https://github.githubassets.com/images/icons/emoji/unicode/1faa7.png?v8 + place_of_worship: https://github.githubassets.com/images/icons/emoji/unicode/1f6d0.png?v8 + plate_with_cutlery: https://github.githubassets.com/images/icons/emoji/unicode/1f37d.png?v8 + play_or_pause_button: https://github.githubassets.com/images/icons/emoji/unicode/23ef.png?v8 + pleading_face: https://github.githubassets.com/images/icons/emoji/unicode/1f97a.png?v8 + plunger: https://github.githubassets.com/images/icons/emoji/unicode/1faa0.png?v8 + point_down: https://github.githubassets.com/images/icons/emoji/unicode/1f447.png?v8 + point_left: https://github.githubassets.com/images/icons/emoji/unicode/1f448.png?v8 + point_right: https://github.githubassets.com/images/icons/emoji/unicode/1f449.png?v8 + point_up: https://github.githubassets.com/images/icons/emoji/unicode/261d.png?v8 + point_up_2: https://github.githubassets.com/images/icons/emoji/unicode/1f446.png?v8 + poland: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f1.png?v8 + polar_bear: https://github.githubassets.com/images/icons/emoji/unicode/1f43b-2744.png?v8 + police_car: https://github.githubassets.com/images/icons/emoji/unicode/1f693.png?v8 + police_officer: https://github.githubassets.com/images/icons/emoji/unicode/1f46e.png?v8 + policeman: https://github.githubassets.com/images/icons/emoji/unicode/1f46e-2642.png?v8 + policewoman: https://github.githubassets.com/images/icons/emoji/unicode/1f46e-2640.png?v8 + poodle: https://github.githubassets.com/images/icons/emoji/unicode/1f429.png?v8 + poop: https://github.githubassets.com/images/icons/emoji/unicode/1f4a9.png?v8 + popcorn: https://github.githubassets.com/images/icons/emoji/unicode/1f37f.png?v8 + portugal: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f9.png?v8 + post_office: https://github.githubassets.com/images/icons/emoji/unicode/1f3e3.png?v8 + postal_horn: https://github.githubassets.com/images/icons/emoji/unicode/1f4ef.png?v8 + postbox: https://github.githubassets.com/images/icons/emoji/unicode/1f4ee.png?v8 + potable_water: https://github.githubassets.com/images/icons/emoji/unicode/1f6b0.png?v8 + potato: https://github.githubassets.com/images/icons/emoji/unicode/1f954.png?v8 + potted_plant: https://github.githubassets.com/images/icons/emoji/unicode/1fab4.png?v8 + pouch: https://github.githubassets.com/images/icons/emoji/unicode/1f45d.png?v8 + poultry_leg: https://github.githubassets.com/images/icons/emoji/unicode/1f357.png?v8 + pound: https://github.githubassets.com/images/icons/emoji/unicode/1f4b7.png?v8 + pout: https://github.githubassets.com/images/icons/emoji/unicode/1f621.png?v8 + pouting_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f63e.png?v8 + pouting_face: https://github.githubassets.com/images/icons/emoji/unicode/1f64e.png?v8 + pouting_man: https://github.githubassets.com/images/icons/emoji/unicode/1f64e-2642.png?v8 + pouting_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f64e-2640.png?v8 + pray: https://github.githubassets.com/images/icons/emoji/unicode/1f64f.png?v8 + prayer_beads: https://github.githubassets.com/images/icons/emoji/unicode/1f4ff.png?v8 + pregnant_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f930.png?v8 + pretzel: https://github.githubassets.com/images/icons/emoji/unicode/1f968.png?v8 + previous_track_button: https://github.githubassets.com/images/icons/emoji/unicode/23ee.png?v8 + prince: https://github.githubassets.com/images/icons/emoji/unicode/1f934.png?v8 + princess: https://github.githubassets.com/images/icons/emoji/unicode/1f478.png?v8 + printer: https://github.githubassets.com/images/icons/emoji/unicode/1f5a8.png?v8 + probing_cane: https://github.githubassets.com/images/icons/emoji/unicode/1f9af.png?v8 + puerto_rico: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f7.png?v8 + punch: https://github.githubassets.com/images/icons/emoji/unicode/1f44a.png?v8 + purple_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f7e3.png?v8 + purple_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f49c.png?v8 + purple_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7ea.png?v8 + purse: https://github.githubassets.com/images/icons/emoji/unicode/1f45b.png?v8 + pushpin: https://github.githubassets.com/images/icons/emoji/unicode/1f4cc.png?v8 + put_litter_in_its_place: https://github.githubassets.com/images/icons/emoji/unicode/1f6ae.png?v8 + qatar: https://github.githubassets.com/images/icons/emoji/unicode/1f1f6-1f1e6.png?v8 + question: https://github.githubassets.com/images/icons/emoji/unicode/2753.png?v8 + rabbit: https://github.githubassets.com/images/icons/emoji/unicode/1f430.png?v8 + rabbit2: https://github.githubassets.com/images/icons/emoji/unicode/1f407.png?v8 + raccoon: https://github.githubassets.com/images/icons/emoji/unicode/1f99d.png?v8 + racehorse: https://github.githubassets.com/images/icons/emoji/unicode/1f40e.png?v8 + racing_car: https://github.githubassets.com/images/icons/emoji/unicode/1f3ce.png?v8 + radio: https://github.githubassets.com/images/icons/emoji/unicode/1f4fb.png?v8 + radio_button: https://github.githubassets.com/images/icons/emoji/unicode/1f518.png?v8 + radioactive: https://github.githubassets.com/images/icons/emoji/unicode/2622.png?v8 + rage: https://github.githubassets.com/images/icons/emoji/unicode/1f621.png?v8 + rage1: https://github.githubassets.com/images/icons/emoji/rage1.png?v8 + rage2: https://github.githubassets.com/images/icons/emoji/rage2.png?v8 + rage3: https://github.githubassets.com/images/icons/emoji/rage3.png?v8 + rage4: https://github.githubassets.com/images/icons/emoji/rage4.png?v8 + railway_car: https://github.githubassets.com/images/icons/emoji/unicode/1f683.png?v8 + railway_track: https://github.githubassets.com/images/icons/emoji/unicode/1f6e4.png?v8 + rainbow: https://github.githubassets.com/images/icons/emoji/unicode/1f308.png?v8 + rainbow_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3f3-1f308.png?v8 + raised_back_of_hand: https://github.githubassets.com/images/icons/emoji/unicode/1f91a.png?v8 + raised_eyebrow: https://github.githubassets.com/images/icons/emoji/unicode/1f928.png?v8 + raised_hand: https://github.githubassets.com/images/icons/emoji/unicode/270b.png?v8 + raised_hand_with_fingers_splayed: https://github.githubassets.com/images/icons/emoji/unicode/1f590.png?v8 + raised_hands: https://github.githubassets.com/images/icons/emoji/unicode/1f64c.png?v8 + raising_hand: https://github.githubassets.com/images/icons/emoji/unicode/1f64b.png?v8 + raising_hand_man: https://github.githubassets.com/images/icons/emoji/unicode/1f64b-2642.png?v8 + raising_hand_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f64b-2640.png?v8 + ram: https://github.githubassets.com/images/icons/emoji/unicode/1f40f.png?v8 + ramen: https://github.githubassets.com/images/icons/emoji/unicode/1f35c.png?v8 + rat: https://github.githubassets.com/images/icons/emoji/unicode/1f400.png?v8 + razor: https://github.githubassets.com/images/icons/emoji/unicode/1fa92.png?v8 + receipt: https://github.githubassets.com/images/icons/emoji/unicode/1f9fe.png?v8 + record_button: https://github.githubassets.com/images/icons/emoji/unicode/23fa.png?v8 + recycle: https://github.githubassets.com/images/icons/emoji/unicode/267b.png?v8 + red_car: https://github.githubassets.com/images/icons/emoji/unicode/1f697.png?v8 + red_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f534.png?v8 + red_envelope: https://github.githubassets.com/images/icons/emoji/unicode/1f9e7.png?v8 + red_haired_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9b0.png?v8 + red_haired_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9b0.png?v8 + red_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7e5.png?v8 + registered: https://github.githubassets.com/images/icons/emoji/unicode/00ae.png?v8 + relaxed: https://github.githubassets.com/images/icons/emoji/unicode/263a.png?v8 + relieved: https://github.githubassets.com/images/icons/emoji/unicode/1f60c.png?v8 + reminder_ribbon: https://github.githubassets.com/images/icons/emoji/unicode/1f397.png?v8 + repeat: https://github.githubassets.com/images/icons/emoji/unicode/1f501.png?v8 + repeat_one: https://github.githubassets.com/images/icons/emoji/unicode/1f502.png?v8 + rescue_worker_helmet: https://github.githubassets.com/images/icons/emoji/unicode/26d1.png?v8 + restroom: https://github.githubassets.com/images/icons/emoji/unicode/1f6bb.png?v8 + reunion: https://github.githubassets.com/images/icons/emoji/unicode/1f1f7-1f1ea.png?v8 + revolving_hearts: https://github.githubassets.com/images/icons/emoji/unicode/1f49e.png?v8 + rewind: https://github.githubassets.com/images/icons/emoji/unicode/23ea.png?v8 + rhinoceros: https://github.githubassets.com/images/icons/emoji/unicode/1f98f.png?v8 + ribbon: https://github.githubassets.com/images/icons/emoji/unicode/1f380.png?v8 + rice: https://github.githubassets.com/images/icons/emoji/unicode/1f35a.png?v8 + rice_ball: https://github.githubassets.com/images/icons/emoji/unicode/1f359.png?v8 + rice_cracker: https://github.githubassets.com/images/icons/emoji/unicode/1f358.png?v8 + rice_scene: https://github.githubassets.com/images/icons/emoji/unicode/1f391.png?v8 + right_anger_bubble: https://github.githubassets.com/images/icons/emoji/unicode/1f5ef.png?v8 + ring: https://github.githubassets.com/images/icons/emoji/unicode/1f48d.png?v8 + ringed_planet: https://github.githubassets.com/images/icons/emoji/unicode/1fa90.png?v8 + robot: https://github.githubassets.com/images/icons/emoji/unicode/1f916.png?v8 + rock: https://github.githubassets.com/images/icons/emoji/unicode/1faa8.png?v8 + rocket: https://github.githubassets.com/images/icons/emoji/unicode/1f680.png?v8 + rofl: https://github.githubassets.com/images/icons/emoji/unicode/1f923.png?v8 + roll_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f644.png?v8 + roll_of_paper: https://github.githubassets.com/images/icons/emoji/unicode/1f9fb.png?v8 + roller_coaster: https://github.githubassets.com/images/icons/emoji/unicode/1f3a2.png?v8 + roller_skate: https://github.githubassets.com/images/icons/emoji/unicode/1f6fc.png?v8 + romania: https://github.githubassets.com/images/icons/emoji/unicode/1f1f7-1f1f4.png?v8 + rooster: https://github.githubassets.com/images/icons/emoji/unicode/1f413.png?v8 + rose: https://github.githubassets.com/images/icons/emoji/unicode/1f339.png?v8 + rosette: https://github.githubassets.com/images/icons/emoji/unicode/1f3f5.png?v8 + rotating_light: https://github.githubassets.com/images/icons/emoji/unicode/1f6a8.png?v8 + round_pushpin: https://github.githubassets.com/images/icons/emoji/unicode/1f4cd.png?v8 + rowboat: https://github.githubassets.com/images/icons/emoji/unicode/1f6a3.png?v8 + rowing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f6a3-2642.png?v8 + rowing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f6a3-2640.png?v8 + ru: https://github.githubassets.com/images/icons/emoji/unicode/1f1f7-1f1fa.png?v8 + rugby_football: https://github.githubassets.com/images/icons/emoji/unicode/1f3c9.png?v8 + runner: https://github.githubassets.com/images/icons/emoji/unicode/1f3c3.png?v8 + running: https://github.githubassets.com/images/icons/emoji/unicode/1f3c3.png?v8 + running_man: https://github.githubassets.com/images/icons/emoji/unicode/1f3c3-2642.png?v8 + running_shirt_with_sash: https://github.githubassets.com/images/icons/emoji/unicode/1f3bd.png?v8 + running_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f3c3-2640.png?v8 + rwanda: https://github.githubassets.com/images/icons/emoji/unicode/1f1f7-1f1fc.png?v8 + sa: https://github.githubassets.com/images/icons/emoji/unicode/1f202.png?v8 + safety_pin: https://github.githubassets.com/images/icons/emoji/unicode/1f9f7.png?v8 + safety_vest: https://github.githubassets.com/images/icons/emoji/unicode/1f9ba.png?v8 + sagittarius: https://github.githubassets.com/images/icons/emoji/unicode/2650.png?v8 + sailboat: https://github.githubassets.com/images/icons/emoji/unicode/26f5.png?v8 + sake: https://github.githubassets.com/images/icons/emoji/unicode/1f376.png?v8 + salt: https://github.githubassets.com/images/icons/emoji/unicode/1f9c2.png?v8 + samoa: https://github.githubassets.com/images/icons/emoji/unicode/1f1fc-1f1f8.png?v8 + san_marino: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f2.png?v8 + sandal: https://github.githubassets.com/images/icons/emoji/unicode/1f461.png?v8 + sandwich: https://github.githubassets.com/images/icons/emoji/unicode/1f96a.png?v8 + santa: https://github.githubassets.com/images/icons/emoji/unicode/1f385.png?v8 + sao_tome_principe: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f9.png?v8 + sari: https://github.githubassets.com/images/icons/emoji/unicode/1f97b.png?v8 + sassy_man: https://github.githubassets.com/images/icons/emoji/unicode/1f481-2642.png?v8 + sassy_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f481-2640.png?v8 + satellite: https://github.githubassets.com/images/icons/emoji/unicode/1f4e1.png?v8 + satisfied: https://github.githubassets.com/images/icons/emoji/unicode/1f606.png?v8 + saudi_arabia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1e6.png?v8 + sauna_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9d6-2642.png?v8 + sauna_person: https://github.githubassets.com/images/icons/emoji/unicode/1f9d6.png?v8 + sauna_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9d6-2640.png?v8 + sauropod: https://github.githubassets.com/images/icons/emoji/unicode/1f995.png?v8 + saxophone: https://github.githubassets.com/images/icons/emoji/unicode/1f3b7.png?v8 + scarf: https://github.githubassets.com/images/icons/emoji/unicode/1f9e3.png?v8 + school: https://github.githubassets.com/images/icons/emoji/unicode/1f3eb.png?v8 + school_satchel: https://github.githubassets.com/images/icons/emoji/unicode/1f392.png?v8 + scientist: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f52c.png?v8 + scissors: https://github.githubassets.com/images/icons/emoji/unicode/2702.png?v8 + scorpion: https://github.githubassets.com/images/icons/emoji/unicode/1f982.png?v8 + scorpius: https://github.githubassets.com/images/icons/emoji/unicode/264f.png?v8 + scotland: https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-e0067-e0062-e0073-e0063-e0074-e007f.png?v8 + scream: https://github.githubassets.com/images/icons/emoji/unicode/1f631.png?v8 + scream_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f640.png?v8 + screwdriver: https://github.githubassets.com/images/icons/emoji/unicode/1fa9b.png?v8 + scroll: https://github.githubassets.com/images/icons/emoji/unicode/1f4dc.png?v8 + seal: https://github.githubassets.com/images/icons/emoji/unicode/1f9ad.png?v8 + seat: https://github.githubassets.com/images/icons/emoji/unicode/1f4ba.png?v8 + secret: https://github.githubassets.com/images/icons/emoji/unicode/3299.png?v8 + see_no_evil: https://github.githubassets.com/images/icons/emoji/unicode/1f648.png?v8 + seedling: https://github.githubassets.com/images/icons/emoji/unicode/1f331.png?v8 + selfie: https://github.githubassets.com/images/icons/emoji/unicode/1f933.png?v8 + senegal: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f3.png?v8 + serbia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f7-1f1f8.png?v8 + service_dog: https://github.githubassets.com/images/icons/emoji/unicode/1f415-1f9ba.png?v8 + seven: https://github.githubassets.com/images/icons/emoji/unicode/0037-20e3.png?v8 + sewing_needle: https://github.githubassets.com/images/icons/emoji/unicode/1faa1.png?v8 + seychelles: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1e8.png?v8 + shallow_pan_of_food: https://github.githubassets.com/images/icons/emoji/unicode/1f958.png?v8 + shamrock: https://github.githubassets.com/images/icons/emoji/unicode/2618.png?v8 + shark: https://github.githubassets.com/images/icons/emoji/unicode/1f988.png?v8 + shaved_ice: https://github.githubassets.com/images/icons/emoji/unicode/1f367.png?v8 + sheep: https://github.githubassets.com/images/icons/emoji/unicode/1f411.png?v8 + shell: https://github.githubassets.com/images/icons/emoji/unicode/1f41a.png?v8 + shield: https://github.githubassets.com/images/icons/emoji/unicode/1f6e1.png?v8 + shinto_shrine: https://github.githubassets.com/images/icons/emoji/unicode/26e9.png?v8 + ship: https://github.githubassets.com/images/icons/emoji/unicode/1f6a2.png?v8 + shipit: https://github.githubassets.com/images/icons/emoji/shipit.png?v8 + shirt: https://github.githubassets.com/images/icons/emoji/unicode/1f455.png?v8 + shoe: https://github.githubassets.com/images/icons/emoji/unicode/1f45e.png?v8 + shopping: https://github.githubassets.com/images/icons/emoji/unicode/1f6cd.png?v8 + shopping_cart: https://github.githubassets.com/images/icons/emoji/unicode/1f6d2.png?v8 + shorts: https://github.githubassets.com/images/icons/emoji/unicode/1fa73.png?v8 + shower: https://github.githubassets.com/images/icons/emoji/unicode/1f6bf.png?v8 + shrimp: https://github.githubassets.com/images/icons/emoji/unicode/1f990.png?v8 + shrug: https://github.githubassets.com/images/icons/emoji/unicode/1f937.png?v8 + shushing_face: https://github.githubassets.com/images/icons/emoji/unicode/1f92b.png?v8 + sierra_leone: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f1.png?v8 + signal_strength: https://github.githubassets.com/images/icons/emoji/unicode/1f4f6.png?v8 + singapore: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ec.png?v8 + singer: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f3a4.png?v8 + sint_maarten: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1fd.png?v8 + six: https://github.githubassets.com/images/icons/emoji/unicode/0036-20e3.png?v8 + six_pointed_star: https://github.githubassets.com/images/icons/emoji/unicode/1f52f.png?v8 + skateboard: https://github.githubassets.com/images/icons/emoji/unicode/1f6f9.png?v8 + ski: https://github.githubassets.com/images/icons/emoji/unicode/1f3bf.png?v8 + skier: https://github.githubassets.com/images/icons/emoji/unicode/26f7.png?v8 + skull: https://github.githubassets.com/images/icons/emoji/unicode/1f480.png?v8 + skull_and_crossbones: https://github.githubassets.com/images/icons/emoji/unicode/2620.png?v8 + skunk: https://github.githubassets.com/images/icons/emoji/unicode/1f9a8.png?v8 + sled: https://github.githubassets.com/images/icons/emoji/unicode/1f6f7.png?v8 + sleeping: https://github.githubassets.com/images/icons/emoji/unicode/1f634.png?v8 + sleeping_bed: https://github.githubassets.com/images/icons/emoji/unicode/1f6cc.png?v8 + sleepy: https://github.githubassets.com/images/icons/emoji/unicode/1f62a.png?v8 + slightly_frowning_face: https://github.githubassets.com/images/icons/emoji/unicode/1f641.png?v8 + slightly_smiling_face: https://github.githubassets.com/images/icons/emoji/unicode/1f642.png?v8 + slot_machine: https://github.githubassets.com/images/icons/emoji/unicode/1f3b0.png?v8 + sloth: https://github.githubassets.com/images/icons/emoji/unicode/1f9a5.png?v8 + slovakia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f0.png?v8 + slovenia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ee.png?v8 + small_airplane: https://github.githubassets.com/images/icons/emoji/unicode/1f6e9.png?v8 + small_blue_diamond: https://github.githubassets.com/images/icons/emoji/unicode/1f539.png?v8 + small_orange_diamond: https://github.githubassets.com/images/icons/emoji/unicode/1f538.png?v8 + small_red_triangle: https://github.githubassets.com/images/icons/emoji/unicode/1f53a.png?v8 + small_red_triangle_down: https://github.githubassets.com/images/icons/emoji/unicode/1f53b.png?v8 + smile: https://github.githubassets.com/images/icons/emoji/unicode/1f604.png?v8 + smile_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f638.png?v8 + smiley: https://github.githubassets.com/images/icons/emoji/unicode/1f603.png?v8 + smiley_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f63a.png?v8 + smiling_face_with_tear: https://github.githubassets.com/images/icons/emoji/unicode/1f972.png?v8 + smiling_face_with_three_hearts: https://github.githubassets.com/images/icons/emoji/unicode/1f970.png?v8 + smiling_imp: https://github.githubassets.com/images/icons/emoji/unicode/1f608.png?v8 + smirk: https://github.githubassets.com/images/icons/emoji/unicode/1f60f.png?v8 + smirk_cat: https://github.githubassets.com/images/icons/emoji/unicode/1f63c.png?v8 + smoking: https://github.githubassets.com/images/icons/emoji/unicode/1f6ac.png?v8 + snail: https://github.githubassets.com/images/icons/emoji/unicode/1f40c.png?v8 + snake: https://github.githubassets.com/images/icons/emoji/unicode/1f40d.png?v8 + sneezing_face: https://github.githubassets.com/images/icons/emoji/unicode/1f927.png?v8 + snowboarder: https://github.githubassets.com/images/icons/emoji/unicode/1f3c2.png?v8 + snowflake: https://github.githubassets.com/images/icons/emoji/unicode/2744.png?v8 + snowman: https://github.githubassets.com/images/icons/emoji/unicode/26c4.png?v8 + snowman_with_snow: https://github.githubassets.com/images/icons/emoji/unicode/2603.png?v8 + soap: https://github.githubassets.com/images/icons/emoji/unicode/1f9fc.png?v8 + sob: https://github.githubassets.com/images/icons/emoji/unicode/1f62d.png?v8 + soccer: https://github.githubassets.com/images/icons/emoji/unicode/26bd.png?v8 + socks: https://github.githubassets.com/images/icons/emoji/unicode/1f9e6.png?v8 + softball: https://github.githubassets.com/images/icons/emoji/unicode/1f94e.png?v8 + solomon_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1e7.png?v8 + somalia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f4.png?v8 + soon: https://github.githubassets.com/images/icons/emoji/unicode/1f51c.png?v8 + sos: https://github.githubassets.com/images/icons/emoji/unicode/1f198.png?v8 + sound: https://github.githubassets.com/images/icons/emoji/unicode/1f509.png?v8 + south_africa: https://github.githubassets.com/images/icons/emoji/unicode/1f1ff-1f1e6.png?v8 + south_georgia_south_sandwich_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1f8.png?v8 + south_sudan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f8.png?v8 + space_invader: https://github.githubassets.com/images/icons/emoji/unicode/1f47e.png?v8 + spades: https://github.githubassets.com/images/icons/emoji/unicode/2660.png?v8 + spaghetti: https://github.githubassets.com/images/icons/emoji/unicode/1f35d.png?v8 + sparkle: https://github.githubassets.com/images/icons/emoji/unicode/2747.png?v8 + sparkler: https://github.githubassets.com/images/icons/emoji/unicode/1f387.png?v8 + sparkles: https://github.githubassets.com/images/icons/emoji/unicode/2728.png?v8 + sparkling_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f496.png?v8 + speak_no_evil: https://github.githubassets.com/images/icons/emoji/unicode/1f64a.png?v8 + speaker: https://github.githubassets.com/images/icons/emoji/unicode/1f508.png?v8 + speaking_head: https://github.githubassets.com/images/icons/emoji/unicode/1f5e3.png?v8 + speech_balloon: https://github.githubassets.com/images/icons/emoji/unicode/1f4ac.png?v8 + speedboat: https://github.githubassets.com/images/icons/emoji/unicode/1f6a4.png?v8 + spider: https://github.githubassets.com/images/icons/emoji/unicode/1f577.png?v8 + spider_web: https://github.githubassets.com/images/icons/emoji/unicode/1f578.png?v8 + spiral_calendar: https://github.githubassets.com/images/icons/emoji/unicode/1f5d3.png?v8 + spiral_notepad: https://github.githubassets.com/images/icons/emoji/unicode/1f5d2.png?v8 + sponge: https://github.githubassets.com/images/icons/emoji/unicode/1f9fd.png?v8 + spoon: https://github.githubassets.com/images/icons/emoji/unicode/1f944.png?v8 + squid: https://github.githubassets.com/images/icons/emoji/unicode/1f991.png?v8 + sri_lanka: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1f0.png?v8 + st_barthelemy: https://github.githubassets.com/images/icons/emoji/unicode/1f1e7-1f1f1.png?v8 + st_helena: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ed.png?v8 + st_kitts_nevis: https://github.githubassets.com/images/icons/emoji/unicode/1f1f0-1f1f3.png?v8 + st_lucia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f1-1f1e8.png?v8 + st_martin: https://github.githubassets.com/images/icons/emoji/unicode/1f1f2-1f1eb.png?v8 + st_pierre_miquelon: https://github.githubassets.com/images/icons/emoji/unicode/1f1f5-1f1f2.png?v8 + st_vincent_grenadines: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1e8.png?v8 + stadium: https://github.githubassets.com/images/icons/emoji/unicode/1f3df.png?v8 + standing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9cd-2642.png?v8 + standing_person: https://github.githubassets.com/images/icons/emoji/unicode/1f9cd.png?v8 + standing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9cd-2640.png?v8 + star: https://github.githubassets.com/images/icons/emoji/unicode/2b50.png?v8 + star2: https://github.githubassets.com/images/icons/emoji/unicode/1f31f.png?v8 + star_and_crescent: https://github.githubassets.com/images/icons/emoji/unicode/262a.png?v8 + star_of_david: https://github.githubassets.com/images/icons/emoji/unicode/2721.png?v8 + star_struck: https://github.githubassets.com/images/icons/emoji/unicode/1f929.png?v8 + stars: https://github.githubassets.com/images/icons/emoji/unicode/1f320.png?v8 + station: https://github.githubassets.com/images/icons/emoji/unicode/1f689.png?v8 + statue_of_liberty: https://github.githubassets.com/images/icons/emoji/unicode/1f5fd.png?v8 + steam_locomotive: https://github.githubassets.com/images/icons/emoji/unicode/1f682.png?v8 + stethoscope: https://github.githubassets.com/images/icons/emoji/unicode/1fa7a.png?v8 + stew: https://github.githubassets.com/images/icons/emoji/unicode/1f372.png?v8 + stop_button: https://github.githubassets.com/images/icons/emoji/unicode/23f9.png?v8 + stop_sign: https://github.githubassets.com/images/icons/emoji/unicode/1f6d1.png?v8 + stopwatch: https://github.githubassets.com/images/icons/emoji/unicode/23f1.png?v8 + straight_ruler: https://github.githubassets.com/images/icons/emoji/unicode/1f4cf.png?v8 + strawberry: https://github.githubassets.com/images/icons/emoji/unicode/1f353.png?v8 + stuck_out_tongue: https://github.githubassets.com/images/icons/emoji/unicode/1f61b.png?v8 + stuck_out_tongue_closed_eyes: https://github.githubassets.com/images/icons/emoji/unicode/1f61d.png?v8 + stuck_out_tongue_winking_eye: https://github.githubassets.com/images/icons/emoji/unicode/1f61c.png?v8 + student: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f393.png?v8 + studio_microphone: https://github.githubassets.com/images/icons/emoji/unicode/1f399.png?v8 + stuffed_flatbread: https://github.githubassets.com/images/icons/emoji/unicode/1f959.png?v8 + sudan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1e9.png?v8 + sun_behind_large_cloud: https://github.githubassets.com/images/icons/emoji/unicode/1f325.png?v8 + sun_behind_rain_cloud: https://github.githubassets.com/images/icons/emoji/unicode/1f326.png?v8 + sun_behind_small_cloud: https://github.githubassets.com/images/icons/emoji/unicode/1f324.png?v8 + sun_with_face: https://github.githubassets.com/images/icons/emoji/unicode/1f31e.png?v8 + sunflower: https://github.githubassets.com/images/icons/emoji/unicode/1f33b.png?v8 + sunglasses: https://github.githubassets.com/images/icons/emoji/unicode/1f60e.png?v8 + sunny: https://github.githubassets.com/images/icons/emoji/unicode/2600.png?v8 + sunrise: https://github.githubassets.com/images/icons/emoji/unicode/1f305.png?v8 + sunrise_over_mountains: https://github.githubassets.com/images/icons/emoji/unicode/1f304.png?v8 + superhero: https://github.githubassets.com/images/icons/emoji/unicode/1f9b8.png?v8 + superhero_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9b8-2642.png?v8 + superhero_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9b8-2640.png?v8 + supervillain: https://github.githubassets.com/images/icons/emoji/unicode/1f9b9.png?v8 + supervillain_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9b9-2642.png?v8 + supervillain_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9b9-2640.png?v8 + surfer: https://github.githubassets.com/images/icons/emoji/unicode/1f3c4.png?v8 + surfing_man: https://github.githubassets.com/images/icons/emoji/unicode/1f3c4-2642.png?v8 + surfing_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f3c4-2640.png?v8 + suriname: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1f7.png?v8 + sushi: https://github.githubassets.com/images/icons/emoji/unicode/1f363.png?v8 + suspect: https://github.githubassets.com/images/icons/emoji/suspect.png?v8 + suspension_railway: https://github.githubassets.com/images/icons/emoji/unicode/1f69f.png?v8 + svalbard_jan_mayen: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ef.png?v8 + swan: https://github.githubassets.com/images/icons/emoji/unicode/1f9a2.png?v8 + swaziland: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ff.png?v8 + sweat: https://github.githubassets.com/images/icons/emoji/unicode/1f613.png?v8 + sweat_drops: https://github.githubassets.com/images/icons/emoji/unicode/1f4a6.png?v8 + sweat_smile: https://github.githubassets.com/images/icons/emoji/unicode/1f605.png?v8 + sweden: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1ea.png?v8 + sweet_potato: https://github.githubassets.com/images/icons/emoji/unicode/1f360.png?v8 + swim_brief: https://github.githubassets.com/images/icons/emoji/unicode/1fa72.png?v8 + swimmer: https://github.githubassets.com/images/icons/emoji/unicode/1f3ca.png?v8 + swimming_man: https://github.githubassets.com/images/icons/emoji/unicode/1f3ca-2642.png?v8 + swimming_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f3ca-2640.png?v8 + switzerland: https://github.githubassets.com/images/icons/emoji/unicode/1f1e8-1f1ed.png?v8 + symbols: https://github.githubassets.com/images/icons/emoji/unicode/1f523.png?v8 + synagogue: https://github.githubassets.com/images/icons/emoji/unicode/1f54d.png?v8 + syria: https://github.githubassets.com/images/icons/emoji/unicode/1f1f8-1f1fe.png?v8 + syringe: https://github.githubassets.com/images/icons/emoji/unicode/1f489.png?v8 + t-rex: https://github.githubassets.com/images/icons/emoji/unicode/1f996.png?v8 + taco: https://github.githubassets.com/images/icons/emoji/unicode/1f32e.png?v8 + tada: https://github.githubassets.com/images/icons/emoji/unicode/1f389.png?v8 + taiwan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1fc.png?v8 + tajikistan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1ef.png?v8 + takeout_box: https://github.githubassets.com/images/icons/emoji/unicode/1f961.png?v8 + tamale: https://github.githubassets.com/images/icons/emoji/unicode/1fad4.png?v8 + tanabata_tree: https://github.githubassets.com/images/icons/emoji/unicode/1f38b.png?v8 + tangerine: https://github.githubassets.com/images/icons/emoji/unicode/1f34a.png?v8 + tanzania: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1ff.png?v8 + taurus: https://github.githubassets.com/images/icons/emoji/unicode/2649.png?v8 + taxi: https://github.githubassets.com/images/icons/emoji/unicode/1f695.png?v8 + tea: https://github.githubassets.com/images/icons/emoji/unicode/1f375.png?v8 + teacher: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f3eb.png?v8 + teapot: https://github.githubassets.com/images/icons/emoji/unicode/1fad6.png?v8 + technologist: https://github.githubassets.com/images/icons/emoji/unicode/1f9d1-1f4bb.png?v8 + teddy_bear: https://github.githubassets.com/images/icons/emoji/unicode/1f9f8.png?v8 + telephone: https://github.githubassets.com/images/icons/emoji/unicode/260e.png?v8 + telephone_receiver: https://github.githubassets.com/images/icons/emoji/unicode/1f4de.png?v8 + telescope: https://github.githubassets.com/images/icons/emoji/unicode/1f52d.png?v8 + tennis: https://github.githubassets.com/images/icons/emoji/unicode/1f3be.png?v8 + tent: https://github.githubassets.com/images/icons/emoji/unicode/26fa.png?v8 + test_tube: https://github.githubassets.com/images/icons/emoji/unicode/1f9ea.png?v8 + thailand: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1ed.png?v8 + thermometer: https://github.githubassets.com/images/icons/emoji/unicode/1f321.png?v8 + thinking: https://github.githubassets.com/images/icons/emoji/unicode/1f914.png?v8 + thong_sandal: https://github.githubassets.com/images/icons/emoji/unicode/1fa74.png?v8 + thought_balloon: https://github.githubassets.com/images/icons/emoji/unicode/1f4ad.png?v8 + thread: https://github.githubassets.com/images/icons/emoji/unicode/1f9f5.png?v8 + three: https://github.githubassets.com/images/icons/emoji/unicode/0033-20e3.png?v8 + thumbsdown: https://github.githubassets.com/images/icons/emoji/unicode/1f44e.png?v8 + thumbsup: https://github.githubassets.com/images/icons/emoji/unicode/1f44d.png?v8 + ticket: https://github.githubassets.com/images/icons/emoji/unicode/1f3ab.png?v8 + tickets: https://github.githubassets.com/images/icons/emoji/unicode/1f39f.png?v8 + tiger: https://github.githubassets.com/images/icons/emoji/unicode/1f42f.png?v8 + tiger2: https://github.githubassets.com/images/icons/emoji/unicode/1f405.png?v8 + timer_clock: https://github.githubassets.com/images/icons/emoji/unicode/23f2.png?v8 + timor_leste: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f1.png?v8 + tipping_hand_man: https://github.githubassets.com/images/icons/emoji/unicode/1f481-2642.png?v8 + tipping_hand_person: https://github.githubassets.com/images/icons/emoji/unicode/1f481.png?v8 + tipping_hand_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f481-2640.png?v8 + tired_face: https://github.githubassets.com/images/icons/emoji/unicode/1f62b.png?v8 + tm: https://github.githubassets.com/images/icons/emoji/unicode/2122.png?v8 + togo: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1ec.png?v8 + toilet: https://github.githubassets.com/images/icons/emoji/unicode/1f6bd.png?v8 + tokelau: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f0.png?v8 + tokyo_tower: https://github.githubassets.com/images/icons/emoji/unicode/1f5fc.png?v8 + tomato: https://github.githubassets.com/images/icons/emoji/unicode/1f345.png?v8 + tonga: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f4.png?v8 + tongue: https://github.githubassets.com/images/icons/emoji/unicode/1f445.png?v8 + toolbox: https://github.githubassets.com/images/icons/emoji/unicode/1f9f0.png?v8 + tooth: https://github.githubassets.com/images/icons/emoji/unicode/1f9b7.png?v8 + toothbrush: https://github.githubassets.com/images/icons/emoji/unicode/1faa5.png?v8 + top: https://github.githubassets.com/images/icons/emoji/unicode/1f51d.png?v8 + tophat: https://github.githubassets.com/images/icons/emoji/unicode/1f3a9.png?v8 + tornado: https://github.githubassets.com/images/icons/emoji/unicode/1f32a.png?v8 + tr: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f7.png?v8 + trackball: https://github.githubassets.com/images/icons/emoji/unicode/1f5b2.png?v8 + tractor: https://github.githubassets.com/images/icons/emoji/unicode/1f69c.png?v8 + traffic_light: https://github.githubassets.com/images/icons/emoji/unicode/1f6a5.png?v8 + train: https://github.githubassets.com/images/icons/emoji/unicode/1f68b.png?v8 + train2: https://github.githubassets.com/images/icons/emoji/unicode/1f686.png?v8 + tram: https://github.githubassets.com/images/icons/emoji/unicode/1f68a.png?v8 + transgender_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3f3-26a7.png?v8 + transgender_symbol: https://github.githubassets.com/images/icons/emoji/unicode/26a7.png?v8 + triangular_flag_on_post: https://github.githubassets.com/images/icons/emoji/unicode/1f6a9.png?v8 + triangular_ruler: https://github.githubassets.com/images/icons/emoji/unicode/1f4d0.png?v8 + trident: https://github.githubassets.com/images/icons/emoji/unicode/1f531.png?v8 + trinidad_tobago: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f9.png?v8 + tristan_da_cunha: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1e6.png?v8 + triumph: https://github.githubassets.com/images/icons/emoji/unicode/1f624.png?v8 + trolleybus: https://github.githubassets.com/images/icons/emoji/unicode/1f68e.png?v8 + trollface: https://github.githubassets.com/images/icons/emoji/trollface.png?v8 + trophy: https://github.githubassets.com/images/icons/emoji/unicode/1f3c6.png?v8 + tropical_drink: https://github.githubassets.com/images/icons/emoji/unicode/1f379.png?v8 + tropical_fish: https://github.githubassets.com/images/icons/emoji/unicode/1f420.png?v8 + truck: https://github.githubassets.com/images/icons/emoji/unicode/1f69a.png?v8 + trumpet: https://github.githubassets.com/images/icons/emoji/unicode/1f3ba.png?v8 + tshirt: https://github.githubassets.com/images/icons/emoji/unicode/1f455.png?v8 + tulip: https://github.githubassets.com/images/icons/emoji/unicode/1f337.png?v8 + tumbler_glass: https://github.githubassets.com/images/icons/emoji/unicode/1f943.png?v8 + tunisia: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f3.png?v8 + turkey: https://github.githubassets.com/images/icons/emoji/unicode/1f983.png?v8 + turkmenistan: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1f2.png?v8 + turks_caicos_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1e8.png?v8 + turtle: https://github.githubassets.com/images/icons/emoji/unicode/1f422.png?v8 + tuvalu: https://github.githubassets.com/images/icons/emoji/unicode/1f1f9-1f1fb.png?v8 + tv: https://github.githubassets.com/images/icons/emoji/unicode/1f4fa.png?v8 + twisted_rightwards_arrows: https://github.githubassets.com/images/icons/emoji/unicode/1f500.png?v8 + two: https://github.githubassets.com/images/icons/emoji/unicode/0032-20e3.png?v8 + two_hearts: https://github.githubassets.com/images/icons/emoji/unicode/1f495.png?v8 + two_men_holding_hands: https://github.githubassets.com/images/icons/emoji/unicode/1f46c.png?v8 + two_women_holding_hands: https://github.githubassets.com/images/icons/emoji/unicode/1f46d.png?v8 + u5272: https://github.githubassets.com/images/icons/emoji/unicode/1f239.png?v8 + u5408: https://github.githubassets.com/images/icons/emoji/unicode/1f234.png?v8 + u55b6: https://github.githubassets.com/images/icons/emoji/unicode/1f23a.png?v8 + u6307: https://github.githubassets.com/images/icons/emoji/unicode/1f22f.png?v8 + u6708: https://github.githubassets.com/images/icons/emoji/unicode/1f237.png?v8 + u6709: https://github.githubassets.com/images/icons/emoji/unicode/1f236.png?v8 + u6e80: https://github.githubassets.com/images/icons/emoji/unicode/1f235.png?v8 + u7121: https://github.githubassets.com/images/icons/emoji/unicode/1f21a.png?v8 + u7533: https://github.githubassets.com/images/icons/emoji/unicode/1f238.png?v8 + u7981: https://github.githubassets.com/images/icons/emoji/unicode/1f232.png?v8 + u7a7a: https://github.githubassets.com/images/icons/emoji/unicode/1f233.png?v8 + uganda: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1ec.png?v8 + uk: https://github.githubassets.com/images/icons/emoji/unicode/1f1ec-1f1e7.png?v8 + ukraine: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1e6.png?v8 + umbrella: https://github.githubassets.com/images/icons/emoji/unicode/2614.png?v8 + unamused: https://github.githubassets.com/images/icons/emoji/unicode/1f612.png?v8 + underage: https://github.githubassets.com/images/icons/emoji/unicode/1f51e.png?v8 + unicorn: https://github.githubassets.com/images/icons/emoji/unicode/1f984.png?v8 + united_arab_emirates: https://github.githubassets.com/images/icons/emoji/unicode/1f1e6-1f1ea.png?v8 + united_nations: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1f3.png?v8 + unlock: https://github.githubassets.com/images/icons/emoji/unicode/1f513.png?v8 + up: https://github.githubassets.com/images/icons/emoji/unicode/1f199.png?v8 + upside_down_face: https://github.githubassets.com/images/icons/emoji/unicode/1f643.png?v8 + uruguay: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1fe.png?v8 + us: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1f8.png?v8 + us_outlying_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1f2.png?v8 + us_virgin_islands: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1ee.png?v8 + uzbekistan: https://github.githubassets.com/images/icons/emoji/unicode/1f1fa-1f1ff.png?v8 + v: https://github.githubassets.com/images/icons/emoji/unicode/270c.png?v8 + vampire: https://github.githubassets.com/images/icons/emoji/unicode/1f9db.png?v8 + vampire_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9db-2642.png?v8 + vampire_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9db-2640.png?v8 + vanuatu: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1fa.png?v8 + vatican_city: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1e6.png?v8 + venezuela: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1ea.png?v8 + vertical_traffic_light: https://github.githubassets.com/images/icons/emoji/unicode/1f6a6.png?v8 + vhs: https://github.githubassets.com/images/icons/emoji/unicode/1f4fc.png?v8 + vibration_mode: https://github.githubassets.com/images/icons/emoji/unicode/1f4f3.png?v8 + video_camera: https://github.githubassets.com/images/icons/emoji/unicode/1f4f9.png?v8 + video_game: https://github.githubassets.com/images/icons/emoji/unicode/1f3ae.png?v8 + vietnam: https://github.githubassets.com/images/icons/emoji/unicode/1f1fb-1f1f3.png?v8 + violin: https://github.githubassets.com/images/icons/emoji/unicode/1f3bb.png?v8 + virgo: https://github.githubassets.com/images/icons/emoji/unicode/264d.png?v8 + volcano: https://github.githubassets.com/images/icons/emoji/unicode/1f30b.png?v8 + volleyball: https://github.githubassets.com/images/icons/emoji/unicode/1f3d0.png?v8 + vomiting_face: https://github.githubassets.com/images/icons/emoji/unicode/1f92e.png?v8 + vs: https://github.githubassets.com/images/icons/emoji/unicode/1f19a.png?v8 + vulcan_salute: https://github.githubassets.com/images/icons/emoji/unicode/1f596.png?v8 + waffle: https://github.githubassets.com/images/icons/emoji/unicode/1f9c7.png?v8 + wales: https://github.githubassets.com/images/icons/emoji/unicode/1f3f4-e0067-e0062-e0077-e006c-e0073-e007f.png?v8 + walking: https://github.githubassets.com/images/icons/emoji/unicode/1f6b6.png?v8 + walking_man: https://github.githubassets.com/images/icons/emoji/unicode/1f6b6-2642.png?v8 + walking_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f6b6-2640.png?v8 + wallis_futuna: https://github.githubassets.com/images/icons/emoji/unicode/1f1fc-1f1eb.png?v8 + waning_crescent_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f318.png?v8 + waning_gibbous_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f316.png?v8 + warning: https://github.githubassets.com/images/icons/emoji/unicode/26a0.png?v8 + wastebasket: https://github.githubassets.com/images/icons/emoji/unicode/1f5d1.png?v8 + watch: https://github.githubassets.com/images/icons/emoji/unicode/231a.png?v8 + water_buffalo: https://github.githubassets.com/images/icons/emoji/unicode/1f403.png?v8 + water_polo: https://github.githubassets.com/images/icons/emoji/unicode/1f93d.png?v8 + watermelon: https://github.githubassets.com/images/icons/emoji/unicode/1f349.png?v8 + wave: https://github.githubassets.com/images/icons/emoji/unicode/1f44b.png?v8 + wavy_dash: https://github.githubassets.com/images/icons/emoji/unicode/3030.png?v8 + waxing_crescent_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f312.png?v8 + waxing_gibbous_moon: https://github.githubassets.com/images/icons/emoji/unicode/1f314.png?v8 + wc: https://github.githubassets.com/images/icons/emoji/unicode/1f6be.png?v8 + weary: https://github.githubassets.com/images/icons/emoji/unicode/1f629.png?v8 + wedding: https://github.githubassets.com/images/icons/emoji/unicode/1f492.png?v8 + weight_lifting: https://github.githubassets.com/images/icons/emoji/unicode/1f3cb.png?v8 + weight_lifting_man: https://github.githubassets.com/images/icons/emoji/unicode/1f3cb-2642.png?v8 + weight_lifting_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f3cb-2640.png?v8 + western_sahara: https://github.githubassets.com/images/icons/emoji/unicode/1f1ea-1f1ed.png?v8 + whale: https://github.githubassets.com/images/icons/emoji/unicode/1f433.png?v8 + whale2: https://github.githubassets.com/images/icons/emoji/unicode/1f40b.png?v8 + wheel_of_dharma: https://github.githubassets.com/images/icons/emoji/unicode/2638.png?v8 + wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/267f.png?v8 + white_check_mark: https://github.githubassets.com/images/icons/emoji/unicode/2705.png?v8 + white_circle: https://github.githubassets.com/images/icons/emoji/unicode/26aa.png?v8 + white_flag: https://github.githubassets.com/images/icons/emoji/unicode/1f3f3.png?v8 + white_flower: https://github.githubassets.com/images/icons/emoji/unicode/1f4ae.png?v8 + white_haired_man: https://github.githubassets.com/images/icons/emoji/unicode/1f468-1f9b3.png?v8 + white_haired_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9b3.png?v8 + white_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f90d.png?v8 + white_large_square: https://github.githubassets.com/images/icons/emoji/unicode/2b1c.png?v8 + white_medium_small_square: https://github.githubassets.com/images/icons/emoji/unicode/25fd.png?v8 + white_medium_square: https://github.githubassets.com/images/icons/emoji/unicode/25fb.png?v8 + white_small_square: https://github.githubassets.com/images/icons/emoji/unicode/25ab.png?v8 + white_square_button: https://github.githubassets.com/images/icons/emoji/unicode/1f533.png?v8 + wilted_flower: https://github.githubassets.com/images/icons/emoji/unicode/1f940.png?v8 + wind_chime: https://github.githubassets.com/images/icons/emoji/unicode/1f390.png?v8 + wind_face: https://github.githubassets.com/images/icons/emoji/unicode/1f32c.png?v8 + window: https://github.githubassets.com/images/icons/emoji/unicode/1fa9f.png?v8 + wine_glass: https://github.githubassets.com/images/icons/emoji/unicode/1f377.png?v8 + wink: https://github.githubassets.com/images/icons/emoji/unicode/1f609.png?v8 + wolf: https://github.githubassets.com/images/icons/emoji/unicode/1f43a.png?v8 + woman: https://github.githubassets.com/images/icons/emoji/unicode/1f469.png?v8 + woman_artist: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f3a8.png?v8 + woman_astronaut: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f680.png?v8 + woman_beard: https://github.githubassets.com/images/icons/emoji/unicode/1f9d4-2640.png?v8 + woman_cartwheeling: https://github.githubassets.com/images/icons/emoji/unicode/1f938-2640.png?v8 + woman_cook: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f373.png?v8 + woman_dancing: https://github.githubassets.com/images/icons/emoji/unicode/1f483.png?v8 + woman_facepalming: https://github.githubassets.com/images/icons/emoji/unicode/1f926-2640.png?v8 + woman_factory_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f3ed.png?v8 + woman_farmer: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f33e.png?v8 + woman_feeding_baby: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f37c.png?v8 + woman_firefighter: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f692.png?v8 + woman_health_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2695.png?v8 + woman_in_manual_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9bd.png?v8 + woman_in_motorized_wheelchair: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9bc.png?v8 + woman_in_tuxedo: https://github.githubassets.com/images/icons/emoji/unicode/1f935-2640.png?v8 + woman_judge: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2696.png?v8 + woman_juggling: https://github.githubassets.com/images/icons/emoji/unicode/1f939-2640.png?v8 + woman_mechanic: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f527.png?v8 + woman_office_worker: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f4bc.png?v8 + woman_pilot: https://github.githubassets.com/images/icons/emoji/unicode/1f469-2708.png?v8 + woman_playing_handball: https://github.githubassets.com/images/icons/emoji/unicode/1f93e-2640.png?v8 + woman_playing_water_polo: https://github.githubassets.com/images/icons/emoji/unicode/1f93d-2640.png?v8 + woman_scientist: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f52c.png?v8 + woman_shrugging: https://github.githubassets.com/images/icons/emoji/unicode/1f937-2640.png?v8 + woman_singer: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f3a4.png?v8 + woman_student: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f393.png?v8 + woman_teacher: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f3eb.png?v8 + woman_technologist: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f4bb.png?v8 + woman_with_headscarf: https://github.githubassets.com/images/icons/emoji/unicode/1f9d5.png?v8 + woman_with_probing_cane: https://github.githubassets.com/images/icons/emoji/unicode/1f469-1f9af.png?v8 + woman_with_turban: https://github.githubassets.com/images/icons/emoji/unicode/1f473-2640.png?v8 + woman_with_veil: https://github.githubassets.com/images/icons/emoji/unicode/1f470-2640.png?v8 + womans_clothes: https://github.githubassets.com/images/icons/emoji/unicode/1f45a.png?v8 + womans_hat: https://github.githubassets.com/images/icons/emoji/unicode/1f452.png?v8 + women_wrestling: https://github.githubassets.com/images/icons/emoji/unicode/1f93c-2640.png?v8 + womens: https://github.githubassets.com/images/icons/emoji/unicode/1f6ba.png?v8 + wood: https://github.githubassets.com/images/icons/emoji/unicode/1fab5.png?v8 + woozy_face: https://github.githubassets.com/images/icons/emoji/unicode/1f974.png?v8 + world_map: https://github.githubassets.com/images/icons/emoji/unicode/1f5fa.png?v8 + worm: https://github.githubassets.com/images/icons/emoji/unicode/1fab1.png?v8 + worried: https://github.githubassets.com/images/icons/emoji/unicode/1f61f.png?v8 + wrench: https://github.githubassets.com/images/icons/emoji/unicode/1f527.png?v8 + wrestling: https://github.githubassets.com/images/icons/emoji/unicode/1f93c.png?v8 + writing_hand: https://github.githubassets.com/images/icons/emoji/unicode/270d.png?v8 + x: https://github.githubassets.com/images/icons/emoji/unicode/274c.png?v8 + yarn: https://github.githubassets.com/images/icons/emoji/unicode/1f9f6.png?v8 + yawning_face: https://github.githubassets.com/images/icons/emoji/unicode/1f971.png?v8 + yellow_circle: https://github.githubassets.com/images/icons/emoji/unicode/1f7e1.png?v8 + yellow_heart: https://github.githubassets.com/images/icons/emoji/unicode/1f49b.png?v8 + yellow_square: https://github.githubassets.com/images/icons/emoji/unicode/1f7e8.png?v8 + yemen: https://github.githubassets.com/images/icons/emoji/unicode/1f1fe-1f1ea.png?v8 + yen: https://github.githubassets.com/images/icons/emoji/unicode/1f4b4.png?v8 + yin_yang: https://github.githubassets.com/images/icons/emoji/unicode/262f.png?v8 + yo_yo: https://github.githubassets.com/images/icons/emoji/unicode/1fa80.png?v8 + yum: https://github.githubassets.com/images/icons/emoji/unicode/1f60b.png?v8 + zambia: https://github.githubassets.com/images/icons/emoji/unicode/1f1ff-1f1f2.png?v8 + zany_face: https://github.githubassets.com/images/icons/emoji/unicode/1f92a.png?v8 + zap: https://github.githubassets.com/images/icons/emoji/unicode/26a1.png?v8 + zebra: https://github.githubassets.com/images/icons/emoji/unicode/1f993.png?v8 + zero: https://github.githubassets.com/images/icons/emoji/unicode/0030-20e3.png?v8 + zimbabwe: https://github.githubassets.com/images/icons/emoji/unicode/1f1ff-1f1fc.png?v8 + zipper_mouth_face: https://github.githubassets.com/images/icons/emoji/unicode/1f910.png?v8 + zombie: https://github.githubassets.com/images/icons/emoji/unicode/1f9df.png?v8 + zombie_man: https://github.githubassets.com/images/icons/emoji/unicode/1f9df-2642.png?v8 + zombie_woman: https://github.githubassets.com/images/icons/emoji/unicode/1f9df-2640.png?v8 + zzz: https://github.githubassets.com/images/icons/emoji/unicode/1f4a4.png?v8 + announcement: + summary: Default response + value: + announcement: Very **important** announcement about _nothing_. + expires_at: '2021-01-01T00:00:00.000+00:00' + license-info: + value: + seats: 1400 + seats_used: 1316 + seats_available: 84 + kind: standard + days_until_expiration: 365 + expire_at: 2016/02/06 12:41:52 -0600 + enterprise-overview: + value: + repos: + total_repos: 212 + root_repos: 194 + fork_repos: 18 + org_repos: 51 + total_pushes: 3082 + total_wikis: 15 + hooks: + total_hooks: 27 + active_hooks: 23 + inactive_hooks: 4 + pages: + total_pages: 36 + orgs: + total_orgs: 33 + disabled_orgs: 0 + total_teams: 60 + total_team_members: 314 + users: + total_users: 254 + admin_users: 45 + suspended_users: 21 + pulls: + total_pulls: 86 + merged_pulls: 60 + mergeable_pulls: 21 + unmergeable_pulls: 3 + issues: + total_issues: 179 + open_issues: 83 + closed_issues: 96 + milestones: + total_milestones: 7 + open_milestones: 6 + closed_milestones: 1 + gists: + total_gists: 178 + private_gists: 151 + public_gists: 25 + comments: + total_commit_comments: 6 + total_gist_comments: 28 + total_issue_comments: 366 + total_pull_request_comments: 30 + actions-cache-usage-org-enterprise: + value: + total_active_caches_size_in_bytes: 3344284 + total_active_caches_count: 5 + actions-cache-usage-policy-enterprise: + value: + repo_cache_size_limit_in_gb: 10 + max_repo_cache_size_limit_in_gb: 15 actions-enterprise-permissions: value: enabled_organizations: all @@ -59145,6 +60879,11 @@ components: patterns_allowed: - monalisa/octocat@* - docker/* + actions-default-workflow-permissions: + summary: Give read-only permission, and allow approving PRs. + value: + default_workflow_permissions: read + can_approve_pull_request_reviews: true runner-groups-enterprise: value: total_count: 3 @@ -59155,6 +60894,9 @@ components: default: true runners_url: https://api.github.com/enterprises/octo-corp/actions/runner_groups/1/runners allows_public_repositories: false + restricted_to_workflows: false + selected_workflows: [] + workflow_restrictions_read_only: false - id: 2 name: octo-runner-group visibility: selected @@ -59162,12 +60904,20 @@ components: selected_organizations_url: https://api.github.com/enterprises/octo-corp/actions/runner_groups/2/organizations runners_url: https://api.github.com/enterprises/octo-corp/actions/runner_groups/2/runners allows_public_repositories: true + restricted_to_workflows: true + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false - id: 3 name: expensive-hardware visibility: private default: false runners_url: https://api.github.com/enterprises/octo-corp/actions/runner_groups/3/runners allows_public_repositories: true + restricted_to_workflows: false + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false runner-group-enterprise: value: id: 2 @@ -59177,6 +60927,10 @@ components: selected_organizations_url: https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations runners_url: https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners allows_public_repositories: false + restricted_to_workflows: true + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false runner-group-update-enterprise: value: id: 2 @@ -59186,6 +60940,10 @@ components: selected_organizations_url: https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/organizations runners_url: https://api.github.com/enterprises/octo-corp/actions/runner-groups/2/runners allows_public_repositories: true + restricted_to_workflows: false + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false runner-paginated: value: total_count: 2 @@ -59223,28 +60981,38 @@ components: - id: 21 name: no-gpu type: custom - runner-application-items: + runner-application-items-airgap: value: - os: osx architecture: x64 - download_url: https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-osx-x64-2.164.0.tar.gz - filename: actions-runner-osx-x64-2.164.0.tar.gz + download_url: https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-osx-x64-2.277.1.tar.gz + filename: actions-runner-osx-x64-2.277.1.tar.gz + temp_download_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA + sha256_checksum: f1fa173889dc9036cd529417e652e1729e5a3f4d35ec0151806d7480fda6b89b - os: linux architecture: x64 - download_url: https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-x64-2.164.0.tar.gz - filename: actions-runner-linux-x64-2.164.0.tar.gz + download_url: https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-x64-2.277.1.tar.gz + filename: actions-runner-linux-x64-2.277.1.tar.gz + temp_download_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA + sha256_checksum: 02d710fc9e0008e641274bb7da7fde61f7c9aa1cbb541a2990d3450cc88f4e98 - os: linux architecture: arm - download_url: https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm-2.164.0.tar.gz - filename: actions-runner-linux-arm-2.164.0.tar.gz + download_url: https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm-2.277.1.tar.gz + filename: actions-runner-linux-arm-2.277.1.tar.gz + temp_download_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIyYTEzZDRmZC01ZDhkLTRjNzgtYjg2MS0zYTMxZGQ3MmYzNjQiLCJzaWQiOiI0MzZiNTg3YS04ODMyLTRiMTMtOWM2Ny05OWRkMjA2ZTQzNmMiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MzE1NzEsImV4cCI6MTYxNzkzNTc3MX0.PMhU7-MOnZRDj5k5a4ieeFlQCmKPl2pQvpVRhGZq-9ByKF5s9G0rsnGBxDcolTYlbvEAmSSkeAEwF486F7P0kMVEb-GI14WbErqqMSyaPL81c3W7UHxMJLaSBnDs9ftHMv_IkJmRzaROS8q1ObzUW-ErlltxCdj2zF_5ruK9G2RR566AOAtiA3AHV6k7-FCY5--sDYJN_YXPgpwI0fPN1TM92fdPm93hJnoXuCJNpBYp1vl5W4gwGtU_Pa07ESdqqFN1YJJHUloedNhiIOczGfGVSapRc8vyGm9P_VCM_yKD8JI-MkOXl8JI5fCfhmjmKsw-vSAh9NW67RGvmehmpw + sha256_checksum: 2f2bda21e2fd8fed6938b33182a293f6b1f74e4c5d09acd6d9a0fe3f979f5c85 - os: win architecture: x64 - download_url: https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-win-x64-2.164.0.zip - filename: actions-runner-win-x64-2.164.0.zip + download_url: https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-win-x64-2.277.1.zip + filename: actions-runner-win-x64-2.277.1.zip + temp_download_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA + sha256_checksum: 7215c75a462eeb6a839fa8ed298d79f620617d44d47d37c583114fc3f3b27b30 - os: linux architecture: arm64 - download_url: https://github.com/actions/runner/releases/download/v2.164.0/actions-runner-linux-arm64-2.164.0.tar.gz - filename: actions-runner-linux-arm64-2.164.0.tar.gz + download_url: https://github.com/actions/runner/releases/download/v2.277.1/actions-runner-linux-arm64-2.277.1.tar.gz + filename: actions-runner-linux-arm64-2.277.1.tar.gz + temp_download_token: eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6IkJmSjdCUXpLdXhjWDc4WnJ5NUxnUW53ZFRrMCJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zUnVudGltZS5QYWNrYWdlRG93bmxvYWQiLCJJZGVudGl0eVR5cGVDbGFpbSI6IlN5c3RlbTpTZXJ2aWNlSWRlbnRpdHkiLCJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9zaWQiOiJERERERERERC1ERERELUREREQtRERERC1EREREREREREREREQiLCJodHRwOi8vc2NoZW1hcy5taWNyb3NvZnQuY29tL3dzLzIwMDgvMDYvaWRlbnRpdHkvY2xhaW1zL3ByaW1hcnlzaWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJhdWkiOiIwZTZkODAxYi02NzVlLTQ1YzAtOWM4NC1jYTkzNjdlZjc1NjciLCJzaWQiOiI4ZTE5MDliZC1kYzU1LTQ2MWYtOTk2Mi1hZTI0OTEzNzU4OWIiLCJpc3MiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJhdWQiOiJ2c3Rva2VuLmNvZGVkZXYubXMiLCJuYmYiOjE2MTc5MDQxNzUsImV4cCI6MTYxNzkwODM3NX0.YNsRXL9pBuIfLVndnyVQOpru77Br8hgYIX7LPsOaMfKk4K88YG89a2VIXUWPyHRiOaC-4J0lIPei8ujezEtnMfNZCwHdWq0Niiy-2-ywcfGPmcz-RHz_ZglkPFbzKaiZWJcFKCGHCP0Ta3kdXumJQqiVJEIyppxIY-caR_Wsw2L4BZHOefJq-odsJ0guPgm9fVuU9FxVRkucho1UH_bzt0tAMl1gEWOLBLZ88U9LKCzHWaxheFeBV4DTt1lAcSm213gKP1eMbgAGn5heWhR4RMRBzZc2HO3Lf1syu4E8fW8a-esRAxEYPfqPHwN9LNj2jaU3D3nPwa8lHQLLtA1PNA + sha256_checksum: a6aa6dd0ba217118ef2b4ea24e9e0a85b02b13c38052a5de0776d6ced3a79c64 authentication-token: value: token: LLBF3JGZDX3P5PMEXLND6TS6FCWO6 @@ -59304,28 +61072,124 @@ components: type: read-only audit-log: value: - - "@timestamp": 1606929874512 - action: team.add_member - actor: octocat - created_at: 1606929874512 - _document_id: xJJFlFOhQ6b-5vaAFy9Rjw - org: octo-corp - team: octo-corp/example-team - user: monalisa - - "@timestamp": 1606507117008 - action: org.create - actor: octocat - created_at: 1606507117008 - _document_id: Vqvg6kZ4MYqwWRKFDzlMoQ - org: octocat-test-org - - "@timestamp": 1605719148837 - action: repo.destroy - actor: monalisa - created_at: 1605719148837 - _document_id: LwW2vpJZCDS-WUmo9Z-ifw - org: mona-org - repo: mona-org/mona-test-repo - visibility: private + - actor_ip: 88.123.45.123 + from: pull_requests#merge + device_cookie: + actor: mona-admin + actor_id: 7 + repo: octo-org/octo-repo + repo_id: 17 + business: github + business_id: 1 + org: octo-org + org_id: 8 + action: pull_request.merge + "@timestamp": 1635940599755 + created_at: 1635940599755 + operation_type: modify + actor_location: + country_code: GB + country_name: United Kingdom + region: ENG + region_name: England + city: Louth + postal_code: LN11 + location: + lat: 53.4457 + lon: 0.141 + data: + user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ... + method: POST + request_id: e4dabc4d-ba16-4bca-1234-649be7ae1188 + server_id: 5d17aab5-fd9f-abcd-a820-16bed246441b + request_category: other + controller_action: merge + url: https://example.com/octo-org/octo-repo/pull/1/merge + client_id: 322299977.1635936 + referrer: https://example.com/octo-org/octo-repo/pull/1 + actor_session: 1 + pull_request_id: 1 + category_type: Resource Management + - actor_ip: 88.123.45.123 + from: pull_request_review_events#create + device_cookie: + actor: mona-admin + actor_id: 7 + business_id: 1 + org_id: 8 + action: pull_request_review.submit + "@timestamp": 1635940593079 + created_at: 1635940593079 + operation_type: modify + actor_location: + country_code: GB + country_name: United Kingdom + region: ENG + region_name: England + city: Louth + postal_code: LN11 + location: + lat: 53.4457 + lon: 0.141 + data: + user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ... + method: PUT + request_id: c0f63bb7-17b6-4796-940c-12345c5a581b + server_id: 2abc1234-f651-43e3-9696-e942ad5f8c89 + request_category: other + controller_action: create + url: https://example.com/octo-org/octo-repo/pull/1/reviews + client_id: 322299977.1635936 + referrer: https://example.com/octo-org/octo-repo/pull/1/files + actor_session: 1 + spammy: false + pull_request_id: 1 + body: + allowed: true + id: 1 + state: 40 + issue_id: 1 + review_id: 1 + category_type: Resource Management + - actor_ip: 88.123.45.123 + from: pull_requests#create + device_cookie: + actor: mona + actor_id: 9 + user_id: 9 + repo: octo-org/octo-repo + repo_id: 17 + business: github + business_id: 1 + org: octo-org + org_id: 8 + action: pull_request.create + "@timestamp": 1635940554161 + created_at: 1635940554161 + operation_type: create + actor_location: + country_code: GB + country_name: United Kingdom + region: ENG + region_name: England + city: Louth + postal_code: LN11 + location: + lat: 53.4457 + lon: 0.141 + data: + user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ... + method: POST + request_id: 2773abeb-477f-4ebf-a017-f8e8a206c305 + server_id: 796e3115-4ce8-4606-8fd0-99ea57a2e12b + request_category: other + controller_action: create + url: https://example.com/octo-org/octo-repo/pull/create?base=octo-org%3Amain&head=mona%3Apatch-1 + client_id: 386351111.163594 + referrer: https://example.com/octo-org/octo-repo/compare/main...mona:patch-1 + actor_session: 2 + pull_request_id: 1 + category_type: Resource Management organization-secret-scanning-alert-list: value: - number: 2 @@ -59356,6 +61220,7 @@ components: type: User site_admin: true secret_type: adafruit_io_key + secret_type_display_name: Adafruit IO Key secret: aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX repository: id: 1296269 @@ -59403,7 +61268,6 @@ components: git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} @@ -59415,7 +61279,6 @@ components: notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers @@ -59423,166 +61286,39 @@ components: tags_url: https://api.github.com/repos/octocat/Hello-World/tags teams_url: https://api.github.com/repos/octocat/Hello-World/teams trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - template_repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World-Template - full_name: octocat/Hello-World-Template - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World-Template - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World-Template - archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads - events_url: https://api.github.com/repos/octocat/Hello-World-Template/events - forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World-Template.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages - merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} - ssh_url: git@github.com:octocat/Hello-World-Template.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags - teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams - trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World-Template.git - mirror_url: git:git.example.com/octocat/Hello-World-Template - hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks - svn_url: https://svn.github.com/octocat/Hello-World-Template - homepage: https://github.com - language: - forks: 9 - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues: 0 - open_issues_count: 0 - is_template: true - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - allow_rebase_merge: true - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 + push_protection_bypassed_by: + login: monalisa + id: 2 + node_id: MDQ6VXNlcjI= + avatar_url: https://alambic.github.com/avatars/u/2? + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + push_protection_bypassed: true + push_protection_bypassed_at: '2020-11-06T21:48:51Z' - number: 1 created_at: '2020-11-06T18:18:30Z' url: https://api.github.com/repos/owner/repo/secret-scanning/alerts/1 html_url: https://github.com/owner/repo/security/secret-scanning/1 locations_url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/1/locations state: open - resolution: - resolved_at: - resolved_by: + resolution: + resolved_at: + resolved_by: secret_type: mailchimp_api_key + secret_type_display_name: Mailchimp API Key secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2 repository: id: 1296269 @@ -59630,7 +61366,6 @@ components: git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} @@ -59642,7 +61377,6 @@ components: notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers @@ -59650,168 +61384,14 @@ components: tags_url: https://api.github.com/repos/octocat/Hello-World/tags teams_url: https://api.github.com/repos/octocat/Hello-World/teams trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - template_repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World-Template - full_name: octocat/Hello-World-Template - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World-Template - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World-Template - archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads - events_url: https://api.github.com/repos/octocat/Hello-World-Template/events - forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World-Template.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages - merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} - ssh_url: git@github.com:octocat/Hello-World-Template.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags - teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams - trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World-Template.git - mirror_url: git:git.example.com/octocat/Hello-World-Template - hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks - svn_url: https://svn.github.com/octocat/Hello-World-Template - homepage: https://github.com - language: - forks: 9 - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues: 0 - open_issues_count: 0 - is_template: true - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - allow_rebase_merge: true - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - actions-billing-usage: - value: - total_minutes_used: 305 - total_paid_minutes_used: 0 - included_minutes: 3000 - minutes_used_breakdown: - UBUNTU: 205 - MACOS: 10 - WINDOWS: 90 + push_protection_bypassed_by: + push_protection_bypassed: false + push_protection_bypassed_at: advanced-security-active-committers: value: total_advanced_security_committers: 2 + total_count: 2 repositories: - name: octocat-org/Hello-World advanced_security_committers: 2 @@ -59825,16 +61405,55 @@ components: advanced_security_committers_breakdown: - user_login: octokitten last_pushed_date: '2021-10-26' - packages-billing-usage: - value: - total_gigabytes_bandwidth_used: 50 - total_paid_gigabytes_bandwidth_used: 40 - included_gigabytes_bandwidth: 10 - combined-billing-usage: + public-events-items: value: - days_left_in_billing_cycle: 20 - estimated_paid_storage_for_month: 15 - estimated_storage_for_month: 40 + - id: '22249084947' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + action: started + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-07T07:50:26Z' feed: value: timeline_url: https://github.com/timeline @@ -59868,9 +61487,6 @@ components: current_user_organizations: - href: https://github.com/organizations/github/octocat.private.atom?token=abc123 type: application/atom+xml - security_advisories: - href: https://github.com/security-advisories - type: application/atom+xml base-gist-items: value: - url: https://api.github.com/gists/aa5a315d61ae9438b18d @@ -59893,7 +61509,7 @@ components: updated_at: '2011-06-20T11:34:15Z' description: Hello World Examples comments: 0 - user: + user: comments_url: https://api.github.com/gists/aa5a315d61ae9438b18d/comments/ owner: login: octocat @@ -59917,19 +61533,218 @@ components: truncated: false gist: value: - url: https://api.github.com/gists/aa5a315d61ae9438b18d - forks_url: https://api.github.com/gists/aa5a315d61ae9438b18d/forks - commits_url: https://api.github.com/gists/aa5a315d61ae9438b18d/commits - id: aa5a315d61ae9438b18d - node_id: MDQ6R2lzdGFhNWEzMTVkNjFhZTk0MzhiMThk - git_pull_url: https://gist.github.com/aa5a315d61ae9438b18d.git - git_push_url: https://gist.github.com/aa5a315d61ae9438b18d.git - html_url: https://gist.github.com/aa5a315d61ae9438b18d - created_at: '2010-04-14T02:15:15Z' - updated_at: '2011-06-20T11:34:15Z' - description: Hello World Examples + url: https://api.github.com/gists/2decf6c462d9b4418f2 + forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks + commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits + id: 2decf6c462d9b4418f2 + node_id: G_kwDOBhHyLdZDliNDQxOGYy + git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git + git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git + html_url: https://gist.github.com/2decf6c462d9b4418f2 + files: + README.md: + filename: README.md + type: text/markdown + language: Markdown + raw_url: https://gist.githubusercontent.com/monalisa/2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/README.md + size: 23 + truncated: false + content: Hello world from GitHub + public: true + created_at: '2022-09-20T12:11:58Z' + updated_at: '2022-09-21T10:28:06Z' + description: An updated gist description. comments: 0 - comments_url: https://api.github.com/gists/aa5a315d61ae9438b18d/comments/ + user: + comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments + owner: + login: monalisa + id: 104456405 + node_id: U_kgDOBhHyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + forks: [] + history: + - user: + login: monalisa + id: 104456405 + node_id: U_kgyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + version: 468aac8caed5f0c3b859b8286968 + committed_at: '2022-09-21T10:28:06Z' + change_status: + total: 2 + additions: 1 + deletions: 1 + url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968 + truncated: false + delete-gist-file: + value: + url: https://api.github.com/gists/2decf6c462d9b4418f2 + forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks + commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits + id: 2decf6c462d9b4418f2 + node_id: G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy + git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git + git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git + html_url: https://gist.github.com/2decf6c462d9b4418f2 + files: + public: true + created_at: '2022-09-20T12:11:58Z' + updated_at: '2022-09-21T10:28:06Z' + description: A gist description. + comments: 0 + user: + comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments + owner: + login: monalisa + id: 104456405 + node_id: U_kgDOBhHyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + forks: [] + history: + - user: + login: monalisa + id: 104456405 + node_id: U_kgyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + version: 9cc352a89178a6d4 + committed_at: '2022-09-21T10:28:06Z' + change_status: + total: 1 + additions: 0 + deletions: 1 + url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968 + truncated: false + rename-gist-file: + value: + url: https://api.github.com/gists/2decf6c462d9b4418f2 + forks_url: https://api.github.com/gists/2decf6c462d9b4418f2/forks + commits_url: https://api.github.com/gists/2decf6c462d9b4418f2/commits + id: 2decf6c462d9b4418f2 + node_id: G_kwDOBhHyLdoAIDg0ODFZDliNDQxOGYy + git_pull_url: https://gist.github.com/2decf6c462d9b4418f2.git + git_push_url: https://gist.github.com/2decf6c462d9b4418f2.git + html_url: https://gist.github.com/2decf6c462d9b4418f2 + files: + goodbye.py: + filename: goodbye.py + type: application/x-python + language: Python + raw_url: https://gist.githubusercontent.com/monalisa/8481a81af6b7a2decf6c462d9b4418f2/raw/ac3e6daf176fafe73609fd000cd188e4472010fb/goodbye.py + size: 4 + truncated: false + content: "# Hello world" + public: true + created_at: '2022-09-20T12:11:58Z' + updated_at: '2022-09-21T10:28:06Z' + description: A gist description. + comments: 0 + user: + comments_url: https://api.github.com/gists/2decf6c462d9b4418f2/comments + owner: + login: monalisa + id: 104456405 + node_id: U_kgDOBhHyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + forks: [] + history: + - user: + login: monalisa + id: 104456405 + node_id: U_kgyLQ + avatar_url: https://avatars.githubusercontent.com/u/104456405?v=4 + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + version: 468aac8caed5f0c3b859b8286968 + committed_at: '2022-09-21T10:28:06Z' + change_status: + total: 0 + additions: 0 + deletions: 0 + url: https://api.github.com/gists/8481a81af6b7a2d418f2/468aac8caed5f0c3b859b8286968 + truncated: false gist-comment-items: value: - id: 1 @@ -60036,7 +61851,7 @@ components: updated_at: '2011-06-20T11:34:15Z' description: Hello World Examples comments: 1 - user: + user: comments_url: https://api.github.com/gists/aa5a315d61ae9438b18d/comments/ owner: login: octocat @@ -60079,7 +61894,7 @@ components: updated_at: '2011-06-20T11:34:15Z' description: Hello World Examples comments: 0 - user: + user: comments_url: https://api.github.com/gists/aa5a315d61ae9438b18d/comments/ owner: login: octocat @@ -60196,7 +62011,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -60221,7 +62036,7 @@ components: created_at: '2011-01-26T19:01:12Z' updated_at: '2011-01-26T19:14:43Z' allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -60361,7 +62176,7 @@ components: html_url: https://github.com/octocat/Hello-World/pull/1347 diff_url: https://github.com/octocat/Hello-World/pull/1347.diff patch_url: https://github.com/octocat/Hello-World/pull/1347.patch - closed_at: + closed_at: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' repository: @@ -60435,7 +62250,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -60464,7 +62279,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -60569,159 +62384,63 @@ components: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. featured: true - marketplace-purchase: - value: - url: https://api.github.com/orgs/github - type: Organization - id: 4 - login: github - organization_billing_email: billing@github.com - email: billing@github.com - marketplace_pending_change: - effective_date: '2017-11-11T00:00:00Z' - unit_count: - id: 77 - plan: - url: https://api.github.com/marketplace_listing/plans/1111 - accounts_url: https://api.github.com/marketplace_listing/plans/1111/accounts - id: 1111 - number: 2 - name: Startup - description: A professional-grade CI solution - monthly_price_in_cents: 699 - yearly_price_in_cents: 7870 - price_model: flat-rate - has_free_trial: true - state: published - unit_name: - bullets: - - Up to 10 private repositories - - 3 concurrent builds - marketplace_purchase: - billing_cycle: monthly - next_billing_date: '2017-11-11T00:00:00Z' - unit_count: - on_free_trial: true - free_trial_ends_on: '2017-11-11T00:00:00Z' - updated_at: '2017-11-02T01:12:12Z' - plan: - url: https://api.github.com/marketplace_listing/plans/1313 - accounts_url: https://api.github.com/marketplace_listing/plans/1313/accounts - id: 1313 - number: 3 - name: Pro - description: A professional-grade CI solution - monthly_price_in_cents: 1099 - yearly_price_in_cents: 11870 - price_model: flat-rate - has_free_trial: true - unit_name: - state: published - bullets: - - Up to 25 private repositories - - 11 concurrent builds - marketplace-listing-plan-items: - value: - - url: https://api.github.com/marketplace_listing/plans/1313 - accounts_url: https://api.github.com/marketplace_listing/plans/1313/accounts - id: 1313 - number: 3 - name: Pro - description: A professional-grade CI solution - monthly_price_in_cents: 1099 - yearly_price_in_cents: 11870 - price_model: flat-rate - has_free_trial: true - unit_name: - state: published - bullets: - - Up to 25 private repositories - - 11 concurrent builds - marketplace-purchase-items: - value: - - url: https://api.github.com/orgs/github - type: Organization - id: 4 - login: github - organization_billing_email: billing@github.com - marketplace_pending_change: - effective_date: '2017-11-11T00:00:00Z' - unit_count: - id: 77 - plan: - url: https://api.github.com/marketplace_listing/plans/1111 - accounts_url: https://api.github.com/marketplace_listing/plans/1111/accounts - id: 1111 - number: 2 - name: Startup - description: A professional-grade CI solution - monthly_price_in_cents: 699 - yearly_price_in_cents: 7870 - price_model: flat-rate - has_free_trial: true - state: published - unit_name: - bullets: - - Up to 10 private repositories - - 3 concurrent builds - marketplace_purchase: - billing_cycle: monthly - next_billing_date: '2017-11-11T00:00:00Z' - unit_count: - on_free_trial: true - free_trial_ends_on: '2017-11-11T00:00:00Z' - updated_at: '2017-11-02T01:12:12Z' - plan: - url: https://api.github.com/marketplace_listing/plans/1313 - accounts_url: https://api.github.com/marketplace_listing/plans/1313/accounts - id: 1313 - number: 3 - name: Pro - description: A professional-grade CI solution - monthly_price_in_cents: 1099 - yearly_price_in_cents: 11870 - price_model: flat-rate - has_free_trial: true - unit_name: - state: published - bullets: - - Up to 25 private repositories - - 11 concurrent builds api-overview: value: verifiable_password_authentication: true - ssh_key_fingerprints: - SHA256_RSA: nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 - SHA256_DSA: br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ - SHA256_ECDSA: p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM - SHA256_ED25519: "+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU" - ssh_keys: - - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl - - ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= - - ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ== - hooks: - - 192.30.252.0/22 - web: - - 192.30.252.0/22 - - 185.199.108.0/22 - api: - - 192.30.252.0/22 - - 185.199.108.0/22 - git: - - 192.30.252.0/22 packages: - 192.30.252.0/22 - pages: - - 192.30.252.153/32 - - 192.30.252.154/32 - importer: - - 54.158.161.132 - - 54.226.70.38 - actions: - - 13.64.0.0/16 - - 13.65.0.0/16 dependabot: - 54.158.161.132 + installed_version: 3.6.0 + public-repo-events-items: + value: + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22237752260' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/rrubenich + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + action: started + public: true + created_at: '2022-06-08T23:29:25Z' thread-items: value: - id: '1' @@ -60803,6 +62522,10 @@ components: last_read_at: '2014-11-07T22:01:45Z' url: https://api.github.com/notifications/threads/1 subscription_url: https://api.github.com/notifications/threads/1/subscription + notifications-mark-read: + value: + message: Unread notifications couldn't be marked in a single request. Notifications + are being marked as read in the background. thread: value: id: '1' @@ -60888,10 +62611,33 @@ components: value: subscribed: true ignored: false - reason: + reason: created_at: '2012-10-06T21:34:12Z' url: https://api.github.com/notifications/threads/1/subscription thread_url: https://api.github.com/notifications/threads/1 + octocat: + value: |2 + MMM. .MMM + MMMMMMMMMMMMMMMMMMM + MMMMMMMMMMMMMMMMMMM ___________________________________ + MMMMMMMMMMMMMMMMMMMMM | | + MMMMMMMMMMMMMMMMMMMMMMM | Avoid administrative distraction. | + MMMMMMMMMMMMMMMMMMMMMMMM |_ _______________________________| + MMMM::- -:::::::- -::MMMM |/ + MM~:~ 00~:::::~ 00~:~MM + .. MMMMM::.00:::+:::.00::MMMMM .. + .MM::::: ._. :::::MM. + MMMM;:::::;MMMM + -MM MMMMMMM + ^ M+ MMMMMMMMM + MMMMMMM MM MM MM + MM MM MM MM + MM MM MM MM + .~~MM~MM~MM~MM~~. + ~~~~MM:~MM~~~MM~:MM~~~~ + ~~~~~~==~==~~~==~==~~~~~~ + ~~~~~~==~==~==~==~~~~~~ + :~==~==~==~==~~ organization-simple-items: value: - login: github @@ -60914,15 +62660,6 @@ components: name: Developer - id: 8031 name: Designer - external-groups: - value: - groups: - - group_id: '123' - group_name: Octocat admins - updated_at: '2021-01-24T11:31:04-06:00' - - group_id: '456' - group_name: Octocat docs members - updated_at: '2021-03-24T11:31:04-06:00' organization-full-default-response: summary: Default response value: @@ -61027,7 +62764,18 @@ components: members_can_create_public_pages: true members_can_create_private_pages: true members_can_fork_private_repositories: false + web_commit_signoff_required: false updated_at: '2014-03-03T18:58:10Z' + org-actions-cache-usage-by-repo: + value: + total_count: 2 + repository_cache_usages: + - full_name: octo-org/Hello-World + active_caches_size_in_bytes: 2322142 + active_caches_count: 3 + - full_name: octo-org/server + active_caches_size_in_bytes: 1022142 + active_caches_count: 2 actions-organization-permissions: value: enabled_repositories: all @@ -61107,7 +62855,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -61136,7 +62884,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -61154,10 +62902,6 @@ components: forks: 1 open_issues: 1 watchers: 1 - actions-default-workflow-permissions: - value: - default_workflow_permissions: read - can_approve_pull_request_reviews: true runner-groups-org: value: total_count: 3 @@ -61169,6 +62913,9 @@ components: runners_url: https://api.github.com/orgs/octo-org/actions/runner_groups/1/runners inherited: false allows_public_repositories: true + restricted_to_workflows: false + selected_workflows: [] + workflow_restrictions_read_only: false - id: 2 name: octo-runner-group visibility: selected @@ -61177,6 +62924,10 @@ components: runners_url: https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners inherited: true allows_public_repositories: true + restricted_to_workflows: true + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: true - id: 3 name: expensive-hardware visibility: private @@ -61184,6 +62935,10 @@ components: runners_url: https://api.github.com/orgs/octo-org/actions/runner_groups/3/runners inherited: false allows_public_repositories: true + restricted_to_workflows: false + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false runner-group: value: id: 2 @@ -61194,6 +62949,10 @@ components: runners_url: https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners inherited: false allows_public_repositories: true + restricted_to_workflows: true + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false runner-group-item: value: id: 2 @@ -61204,6 +62963,10 @@ components: runners_url: https://api.github.com/orgs/octo-org/actions/runner_groups/2/runners inherited: false allows_public_repositories: true + restricted_to_workflows: true + selected_workflows: + - octo-org/octo-repo/.github/workflows/deploy.yaml@refs/heads/main + workflow_restrictions_read_only: false minimal-repository-paginated: value: total_count: 1 @@ -61278,7 +63041,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -61377,8 +63140,8 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - organization: - language: + organization: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -61417,7 +63180,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -61536,26 +63299,6 @@ components: teams_url: https://api.github.com/repos/octocat/Hello-World/teams trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - simple-user-items: - value: - - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false code-scanning-organization-alert-items: value: - number: 4 @@ -61563,9 +63306,10 @@ components: url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/4 html_url: https://github.com/octocat/hello-world/code-scanning/4 state: open - dismissed_by: - dismissed_at: - dismissed_reason: + dismissed_by: + dismissed_at: + dismissed_reason: + dismissed_comment: rule: id: js/zipslip severity: error @@ -61576,7 +63320,7 @@ components: name: js/zipslip tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -61641,7 +63385,6 @@ components: git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} @@ -61653,7 +63396,6 @@ components: notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers @@ -61661,156 +63403,7 @@ components: tags_url: https://api.github.com/repos/octocat/Hello-World/tags teams_url: https://api.github.com/repos/octocat/Hello-World/teams trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - template_repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World-Template - full_name: octocat/Hello-World-Template - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World-Template - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World-Template - archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads - events_url: https://api.github.com/repos/octocat/Hello-World-Template/events - forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World-Template.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages - merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} - ssh_url: git@github.com:octocat/Hello-World-Template.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags - teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams - trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World-Template.git - mirror_url: git:git.example.com/octocat/Hello-World-Template - hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks - svn_url: https://svn.github.com/octocat/Hello-World-Template - homepage: https://github.com - language: - forks: 9 - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues: 0 - open_issues_count: 0 - is_template: true - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - allow_rebase_merge: true - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - number: 3 created_at: '2020-02-13T12:29:18Z' url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/3 @@ -61837,6 +63430,8 @@ components: site_admin: false dismissed_at: '2020-02-14T12:29:18Z' dismissed_reason: false positive + dismissed_comment: This alert is not actually correct, because there's a sanitizer + included in the library. rule: id: js/zipslip severity: error @@ -61847,7 +63442,7 @@ components: name: js/zipslip tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -61911,7 +63506,6 @@ components: git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} @@ -61923,7 +63517,6 @@ components: notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers @@ -61931,175 +63524,7 @@ components: tags_url: https://api.github.com/repos/octocat/Hello-World/tags teams_url: https://api.github.com/repos/octocat/Hello-World/teams trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - template_repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World-Template - full_name: octocat/Hello-World-Template - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World-Template - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World-Template - archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads - events_url: https://api.github.com/repos/octocat/Hello-World-Template/events - forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World-Template.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages - merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} - ssh_url: git@github.com:octocat/Hello-World-Template.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags - teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams - trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World-Template.git - mirror_url: git:git.example.com/octocat/Hello-World-Template - hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks - svn_url: https://svn.github.com/octocat/Hello-World-Template - homepage: https://github.com - language: - forks: 9 - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues: 0 - open_issues_count: 0 - is_template: true - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - allow_rebase_merge: true - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - credential-authorization-items: - value: - - login: octocat - credential_id: 161195 - credential_type: personal access token - token_last_eight: 71c3fc11 - credential_authorized_at: '2011-01-26T19:06:43Z' - authorized_credential_expires_at: '2011-02-25T19:06:43Z' - scopes: - - user - - repo - - login: hubot - credential_id: 161196 - credential_type: personal access token - token_last_eight: Ae178B4a - credential_authorized_at: '2019-03-29T19:06:43Z' - authorized_credential_expires_at: '2019-04-28T19:06:43Z' - scopes: - - repo organization-dependabot-secret-paginated: value: total_count: 3 @@ -62128,6 +63553,55 @@ components: updated_at: '2020-01-10T14:59:22Z' visibility: selected selected_repositories_url: https://api.github.com/orgs/octo-org/dependabot/secrets/NPM_TOKEN/repositories + public-org-events-items: + value: + - id: '22237752260' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octo-org/octo-repo + url: https://api.github.com/repos/octo-org/octo-repo + payload: + action: started + public: true + created_at: '2022-06-08T23:29:25Z' + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octo-org/octo-repo + url: https://api.github.com/repos/octo-org/oct-repo + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octo-org/oct-repo/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-09T12:47:28Z' external-group: value: group_id: '123' @@ -62147,37 +63621,15 @@ components: member_login: octo-lisa_eocsaxrs member_name: Octo Lisa member_email: octo_lisa@github.com - organization-invitation-items: + external-groups: value: - - id: 1 - login: monalisa - node_id: MDQ6VXNlcjE= - email: octocat@github.com - role: direct_member - created_at: '2016-11-30T06:46:10-08:00' - failed_at: '' - failed_reason: '' - inviter: - login: other_user - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/other_user_happy.gif - gravatar_id: '' - url: https://api.github.com/users/other_user - html_url: https://github.com/other_user - followers_url: https://api.github.com/users/other_user/followers - following_url: https://api.github.com/users/other_user/following{/other_user} - gists_url: https://api.github.com/users/other_user/gists{/gist_id} - starred_url: https://api.github.com/users/other_user/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/other_user/subscriptions - organizations_url: https://api.github.com/users/other_user/orgs - repos_url: https://api.github.com/users/other_user/repos - events_url: https://api.github.com/users/other_user/events{/privacy} - received_events_url: https://api.github.com/users/other_user/received_events - type: User - site_admin: false - team_count: 2 - invitation_teams_url: https://api.github.com/organizations/2/invitations/1/teams + groups: + - group_id: '123' + group_name: Octocat admins + updated_at: '2021-01-24T11:31:04-06:00' + - group_id: '456' + group_name: Octocat docs members + updated_at: '2021-03-24T11:31:04-06:00' org-hook-items: value: - id: 1 @@ -62272,8 +63724,8 @@ components: - config.yml - ".github/issue_TEMPLATE.md" app_slug: github-actions - suspended_at: - suspended_by: + suspended_at: + suspended_by: installation-paginated: value: total_count: 1 @@ -62321,56 +63773,28 @@ components: - config.yml - ".github/issue_TEMPLATE.md" app_slug: github-actions - suspended_at: - suspended_by: - interaction-limit-response: - value: - limit: collaborators_only - origin: organization - expires_at: '2018-08-17T04:18:39Z' - organization-invitation: + suspended_at: + suspended_by: + simple-user-items: value: + - login: octocat id: 1 - login: monalisa node_id: MDQ6VXNlcjE= - email: octocat@github.com - role: direct_member - created_at: '2016-11-30T06:46:10-08:00' - inviter: - login: other_user - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/other_user_happy.gif - gravatar_id: '' - url: https://api.github.com/users/other_user - html_url: https://github.com/other_user - followers_url: https://api.github.com/users/other_user/followers - following_url: https://api.github.com/users/other_user/following{/other_user} - gists_url: https://api.github.com/users/other_user/gists{/gist_id} - starred_url: https://api.github.com/users/other_user/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/other_user/subscriptions - organizations_url: https://api.github.com/users/other_user/orgs - repos_url: https://api.github.com/users/other_user/repos - events_url: https://api.github.com/users/other_user/events{/privacy} - received_events_url: https://api.github.com/users/other_user/received_events - type: User - site_admin: false - team_count: 2 - invitation_teams_url: https://api.github.com/organizations/2/invitations/1/teams - team-items: - value: - - id: 1 - node_id: MDQ6VGVhbTE= - url: https://api.github.com/teams/1 - html_url: https://github.com/orgs/github/teams/justice-league - name: Justice League - slug: justice-league - description: A great team. - privacy: closed - permission: admin - members_url: https://api.github.com/teams/1/members{/member} - repositories_url: https://api.github.com/teams/1/repos - parent: + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false org-membership-response-if-user-has-an-active-admin-membership-with-organization: summary: Response if user has an active admin membership with organization value: @@ -62509,7 +63933,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -62538,7 +63962,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -62660,7 +64084,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -62689,7 +64113,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -62810,7 +64234,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -62839,7 +64263,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -62860,229 +64284,27 @@ components: url: https://api.github.com/orgs/octo-org/migrations/79 created_at: '2015-07-06T15:33:38-07:00' updated_at: '2015-07-06T15:33:38-07:00' - minimal-repository-items: - value: - - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World - hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: false - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - template_repository: - packages-for-org: - value: - - id: 197 - name: hello_docker - package_type: container - owner: - login: github - id: 9919 - node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= - avatar_url: https://avatars.githubusercontent.com/u/9919?v=4 - gravatar_id: '' - url: https://api.github.com/users/github - html_url: https://github.com/github - followers_url: https://api.github.com/users/github/followers - following_url: https://api.github.com/users/github/following{/other_user} - gists_url: https://api.github.com/users/github/gists{/gist_id} - starred_url: https://api.github.com/users/github/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/github/subscriptions - organizations_url: https://api.github.com/users/github/orgs - repos_url: https://api.github.com/users/github/repos - events_url: https://api.github.com/users/github/events{/privacy} - received_events_url: https://api.github.com/users/github/received_events - type: Organization - site_admin: false - version_count: 1 - visibility: private - url: https://api.github.com/orgs/github/packages/container/hello_docker - created_at: '2020-05-19T22:19:11Z' - updated_at: '2020-05-19T22:19:11Z' - html_url: https://github.com/orgs/github/packages/container/package/hello_docker - - id: 198 - name: goodbye_docker - package_type: container - owner: - login: github - id: 9919 - node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= - avatar_url: https://avatars.githubusercontent.com/u/9919?v=4 - gravatar_id: '' - url: https://api.github.com/users/github - html_url: https://github.com/github - followers_url: https://api.github.com/users/github/followers - following_url: https://api.github.com/users/github/following{/other_user} - gists_url: https://api.github.com/users/github/gists{/gist_id} - starred_url: https://api.github.com/users/github/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/github/subscriptions - organizations_url: https://api.github.com/users/github/orgs - repos_url: https://api.github.com/users/github/repos - events_url: https://api.github.com/users/github/events{/privacy} - received_events_url: https://api.github.com/users/github/received_events - type: Organization - site_admin: false - version_count: 2 - visibility: private - url: https://api.github.com/orgs/github/packages/container/goodbye_docker - created_at: '2020-05-20T22:19:11Z' - updated_at: '2020-05-20T22:19:11Z' - html_url: https://github.com/orgs/github/packages/container/package/goodbye_docker - package-org: + org-pre-receive-hook-items: value: - id: 197 - name: hello_docker - package_type: container - owner: - login: github - id: 9919 - node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= - avatar_url: https://avatars.githubusercontent.com/u/9919?v=4 - gravatar_id: '' - url: https://api.github.com/users/github - html_url: https://github.com/github - followers_url: https://api.github.com/users/github/followers - following_url: https://api.github.com/users/github/following{/other_user} - gists_url: https://api.github.com/users/github/gists{/gist_id} - starred_url: https://api.github.com/users/github/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/github/subscriptions - organizations_url: https://api.github.com/users/github/orgs - repos_url: https://api.github.com/users/github/repos - events_url: https://api.github.com/users/github/events{/privacy} - received_events_url: https://api.github.com/users/github/received_events - type: Organization - site_admin: false - version_count: 1 - visibility: private - url: https://api.github.com/orgs/github/packages/container/hello_docker - created_at: '2020-05-19T22:19:11Z' - updated_at: '2020-05-19T22:19:11Z' - html_url: https://github.com/orgs/github/packages/container/package/hello_docker - package-versions-for-org: + - id: 42 + name: Check Commits + enforcement: disabled + configuration_url: https://github.example.com/api/v3/admin/pre-receive-hooks/42 + allow_downstream_configuration: true + org-pre-receive-hook: value: - - id: 245301 - name: 1.0.4 - url: https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/245301 - package_html_url: https://github.com/octo-org/hello-world-npm/packages/43752 - created_at: '2019-11-05T22:49:04Z' - updated_at: '2019-11-05T22:49:04Z' - html_url: https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.4 - metadata: - package_type: npm - - id: 209672 - name: 1.0.3 - url: https://api.github.com/orgs/octo-org/packages/npm/hello-world-npm/versions/209672 - package_html_url: https://github.com/octo-org/hello-world-npm/packages/43752 - created_at: '2019-10-29T15:42:11Z' - updated_at: '2019-10-29T15:42:12Z' - html_url: https://github.com/octo-org/hello-world-npm/packages/43752?version=1.0.3 - metadata: - package_type: npm - package-version-org: + id: 42 + name: Check Commits + enforcement: disabled + configuration_url: https://github.example.com/api/v3/admin/pre-receive-hooks/42 + allow_downstream_configuration: true + org-pre-receive-hook-2: value: - id: 836 - name: sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344 - url: https://api.github.com/orgs/github/packages/container/hello_docker/versions/836 - package_html_url: https://github.com/orgs/github/packages/container/package/hello_docker - created_at: '2020-05-19T22:19:11Z' - updated_at: '2020-05-19T22:19:11Z' - html_url: https://github.com/orgs/github/packages/container/hello_docker/836 - metadata: - package_type: container - container: - tags: - - latest + id: 42 + name: Check Commits + enforcement: enabled + configuration_url: https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42 + allow_downstream_configuration: false project-items: value: - owner_url: https://api.github.com/orgs/octocat @@ -63149,6 +64371,106 @@ components: site_admin: false created_at: '2011-04-11T20:09:31Z' updated_at: '2014-03-04T18:58:10Z' + minimal-repository-items: + value: + - id: 1296269 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: Hello-World + full_name: octocat/Hello-World + owner: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + private: false + html_url: https://github.com/octocat/Hello-World + description: This your first repo! + fork: false + url: https://api.github.com/repos/octocat/Hello-World + archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads + events_url: https://api.github.com/repos/octocat/Hello-World/events + forks_url: https://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: git:github.com/octocat/Hello-World.git + issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: https://api.github.com/repos/octocat/Hello-World/languages + merges_url: https://api.github.com/repos/octocat/Hello-World/merges + milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: git@github.com:octocat/Hello-World.git + stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription + tags_url: https://api.github.com/repos/octocat/Hello-World/tags + teams_url: https://api.github.com/repos/octocat/Hello-World/teams + trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: https://github.com/octocat/Hello-World.git + mirror_url: git:git.example.com/octocat/Hello-World + hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks + svn_url: https://svn.github.com/octocat/Hello-World + homepage: https://github.com + language: + forks_count: 9 + stargazers_count: 80 + watchers_count: 80 + size: 108 + default_branch: master + open_issues_count: 0 + is_template: false + topics: + - octocat + - atom + - electron + - api + has_issues: true + has_projects: true + has_wiki: true + has_pages: false + has_downloads: true + archived: false + disabled: false + visibility: public + pushed_at: '2011-01-26T19:06:43Z' + created_at: '2011-01-26T19:01:12Z' + updated_at: '2011-01-26T19:14:43Z' + permissions: + admin: false + push: false + pull: true repository: value: id: 1296269 @@ -63221,8 +64543,8 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - organization: - language: + organization: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -63261,7 +64583,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -63269,15 +64591,20 @@ components: allow_merge_commit: true subscribers_count: 42 network_count: 0 - group-mapping-3: + team-items: value: - groups: - - group_id: '123' - group_name: Octocat admins - group_description: The people who configure your octoworld. - - group_id: '456' - group_name: Octocat docs members - group_description: The people who make your octoworld come to life. + - id: 1 + node_id: MDQ6VGVhbTE= + url: https://api.github.com/teams/1 + html_url: https://github.com/orgs/github/teams/justice-league + name: Justice League + slug: justice-league + description: A great team. + privacy: closed + permission: admin + members_url: https://api.github.com/teams/1/members{/member} + repositories_url: https://api.github.com/teams/1/repos + parent: team-full: value: id: 1 @@ -63291,7 +64618,6 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: members_count: 3 repos_count: 10 created_at: '2017-07-14T16:53:42Z' @@ -63314,7 +64640,6 @@ components: blog: https://github.com/blog location: San Francisco email: octocat@github.com - is_verified: true has_organization_projects: true has_repository_projects: true public_repos: 2 @@ -63325,6 +64650,7 @@ components: created_at: '2008-01-14T04:33:35Z' updated_at: '2017-08-17T12:37:15Z' type: Organization + ldap_dn: uid=asdf,ou=users,dc=github,dc=com team-discussion-items: value: - author: @@ -63352,7 +64678,7 @@ components: comments_count: 0 comments_url: https://api.github.com/teams/2343027/discussions/1/comments created_at: '2018-01-25T18:56:31Z' - last_edited_at: + last_edited_at: html_url: https://github.com/orgs/github/teams/justice-league/discussions/1 node_id: MDE0OlRlYW1EaXNjdXNzaW9uMQ== number: 1 @@ -63400,7 +64726,7 @@ components: comments_count: 0 comments_url: https://api.github.com/teams/2343027/discussions/1/comments created_at: '2018-01-25T18:56:31Z' - last_edited_at: + last_edited_at: html_url: https://github.com/orgs/github/teams/justice-league/discussions/1 node_id: MDE0OlRlYW1EaXNjdXNzaW9uMQ== number: 1 @@ -63494,7 +64820,7 @@ components: body_html: "

Do you like apples?

" body_version: 5eb32b219cdc6a5a9b29ba5d6caa9c51 created_at: '2018-01-15T23:53:58Z' - last_edited_at: + last_edited_at: discussion_url: https://api.github.com/teams/2403582/discussions/1 html_url: https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 node_id: MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= @@ -63537,7 +64863,7 @@ components: body_html: "

Do you like apples?

" body_version: 5eb32b219cdc6a5a9b29ba5d6caa9c51 created_at: '2018-01-15T23:53:58Z' - last_edited_at: + last_edited_at: discussion_url: https://api.github.com/teams/2403582/discussions/1 html_url: https://github.com/orgs/github/teams/justice-league/discussions/1/comments/1 node_id: MDIxOlRlYW1EaXNjdXNzaW9uQ29tbWVudDE= @@ -63810,7 +65136,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -63913,7 +65239,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -63978,15 +65304,6 @@ components: forks: 1 open_issues: 1 watchers: 1 - group-mapping: - value: - groups: - - group_id: '123' - group_name: Octocat admins - group_description: The people who configure your octoworld. - - group_id: '456' - group_name: Octocat docs members - group_description: The people who make your octoworld come to life. team-items-response-if-child-teams-exist: value: - id: 2 @@ -64255,7 +65572,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 forks: 9 stargazers_count: 80 @@ -64358,7 +65675,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -64507,7 +65824,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -64624,7 +65941,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -64749,7 +66066,7 @@ components: spdx_id: MIT node_id: MDc6TGljZW5zZW1pdA== html_url: https://github.com/licenses/mit - language: + language: forks_count: 9 forks: 9 stargazers_count: 80 @@ -64852,7 +66169,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -64904,6 +66221,7 @@ components: delete_branch_on_merge: true allow_merge_commit: true allow_forking: true + web_commit_signoff_required: false subscribers_count: 42 network_count: 0 organization: @@ -64996,7 +66314,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -65113,7 +66431,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -65173,9 +66491,15 @@ components: created_at: '2020-01-10T14:59:22Z' expires_at: '2020-03-21T14:59:22Z' updated_at: '2020-02-21T14:59:22Z' + workflow_run: + id: 2332938 + repository_id: 1296269 + head_repository_id: 1296269 + head_branch: main + head_sha: 328faa0536e6fef19753d9d91dc96a9931694ce3 - id: 13 node_id: MDg6QXJ0aWZhY3QxMw== - name: '' + name: Test output size_in_bytes: 453 url: https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13 archive_download_url: https://api.github.com/repos/octo-org/octo-docs/actions/artifacts/13/zip @@ -65183,6 +66507,12 @@ components: created_at: '2020-01-10T14:59:22Z' expires_at: '2020-03-21T14:59:22Z' updated_at: '2020-02-21T14:59:22Z' + workflow_run: + id: 2332942 + repository_id: 1296269 + head_repository_id: 1296269 + head_branch: main + head_sha: 178f4f6090b3fccad4a65b3e83d076a622d59652 artifact: value: id: 11 @@ -65195,6 +66525,20 @@ components: created_at: '2020-01-10T14:59:22Z' expires_at: '2020-01-21T14:59:22Z' updated_at: '2020-01-21T14:59:22Z' + workflow_run: + id: 2332938 + repository_id: 1296269 + head_repository_id: 1296269 + head_branch: main + head_sha: 328faa0536e6fef19753d9d91dc96a9931694ce3 + actions-cache-usage: + value: + full_name: octo-org/Hello-World + active_caches_size_in_bytes: 2322142 + active_caches_count: 3 + actions-cache-usage-policy: + value: + repo_cache_size_limit_in_gb: 14 job: value: id: 399444496 @@ -65228,7 +66572,7 @@ components: number: 3 started_at: '2020-01-20T09:42:45.000-08:00' completed_at: '2020-01-20T09:42:45.000-08:00' - - name: Run actions/cache@v2 + - name: Run actions/cache@v3 status: completed conclusion: success number: 4 @@ -65258,7 +66602,7 @@ components: number: 8 started_at: '2020-01-20T09:42:59.000-08:00' completed_at: '2020-01-20T09:44:39.000-08:00' - - name: Post actions/cache@v2 + - name: Post actions/cache@v3 status: completed conclusion: success number: 16 @@ -65284,6 +66628,9 @@ components: enabled: true allowed_actions: selected selected_actions_url: https://api.github.com/repositories/42/actions/permissions/selected-actions + actions-workflow-access-to-repository: + value: + access_level: organization workflow-run-paginated: value: total_count: 1 @@ -65291,18 +66638,60 @@ components: - id: 30433642 name: Build node_id: MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ== + check_suite_id: 42 + check_suite_node_id: MDEwOkNoZWNrU3VpdGU0Mg== head_branch: master head_sha: acb5820ced9479c074f688cc328bf03f341a511d run_number: 562 event: push status: queued - conclusion: + conclusion: workflow_id: 159038 url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642 html_url: https://github.com/octo-org/octo-repo/actions/runs/30433642 pull_requests: [] created_at: '2020-01-22T19:33:08Z' updated_at: '2020-01-22T19:33:08Z' + actor: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + run_attempt: 1 + run_started_at: '2020-01-22T19:33:08Z' + triggering_actor: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false jobs_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs logs_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs check_suite_url: https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374 @@ -65414,7 +66803,7 @@ components: type: User site_admin: false html_url: https://github.com/octo-org/octo-repo - description: + description: fork: false url: https://api.github.com/repos/octo-org/octo-repo forks_url: https://api.github.com/repos/octo-org/octo-repo/forks @@ -65460,24 +66849,74 @@ components: node_id: MDEyOldvcmtmbG93IFJ1bjI2OTI4OQ== check_suite_id: 42 check_suite_node_id: MDEwOkNoZWNrU3VpdGU0Mg== - head_branch: master + head_branch: main head_sha: acb5820ced9479c074f688cc328bf03f341a511d + path: ".github/workflows/build.yml@main" run_number: 562 event: push status: queued - conclusion: workflow_id: 159038 url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642 html_url: https://github.com/octo-org/octo-repo/actions/runs/30433642 pull_requests: [] created_at: '2020-01-22T19:33:08Z' updated_at: '2020-01-22T19:33:08Z' + actor: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + run_attempt: 1 + referenced_workflows: + - path: octocat/Hello-World/.github/workflows/deploy.yml@main + sha: 86e8bc9ecf7d38b1ed2d2cfb8eb87ba9b35b01db + ref: refs/heads/main + - path: octo-org/octo-repo/.github/workflows/report.yml@v2 + sha: 79e9790903e1c3373b1a3e3a941d57405478a232 + ref: refs/tags/v2 + - path: octo-org/octo-repo/.github/workflows/secure.yml@1595d4b6de6a9e9751fb270a41019ce507d4099e + sha: 1595d4b6de6a9e9751fb270a41019ce507d4099e + run_started_at: '2020-01-22T19:33:08Z' + triggering_actor: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false jobs_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/jobs logs_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/logs check_suite_url: https://api.github.com/repos/octo-org/octo-repo/check-suites/414944374 artifacts_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/artifacts cancel_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/cancel rerun_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/rerun + previous_attempt_url: https://api.github.com/repos/octo-org/octo-repo/actions/runs/30433642/attempts/1 workflow_url: https://api.github.com/repos/octo-org/octo-repo/actions/workflows/159038 head_commit: id: acb5820ced9479c074f688cc328bf03f341a511d @@ -65583,7 +67022,7 @@ components: type: User site_admin: false html_url: https://github.com/octo-org/octo-repo - description: + description: fork: false url: https://api.github.com/repos/octo-org/octo-repo forks_url: https://api.github.com/repos/octo-org/octo-repo/forks @@ -65688,7 +67127,7 @@ components: number: 3 started_at: '2020-01-20T09:42:45.000-08:00' completed_at: '2020-01-20T09:42:45.000-08:00' - - name: Run actions/cache@v2 + - name: Run actions/cache@v3 status: completed conclusion: success number: 4 @@ -65718,7 +67157,7 @@ components: number: 8 started_at: '2020-01-20T09:42:59.000-08:00' completed_at: '2020-01-20T09:44:39.000-08:00' - - name: Post actions/cache@v2 + - name: Post actions/cache@v3 status: completed conclusion: success number: 16 @@ -65784,7 +67223,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: deployment-items: value: - url: https://api.github.com/repos/octocat/example/deployments/1 @@ -65822,36 +67261,6 @@ components: repository_url: https://api.github.com/repos/octocat/example transient_environment: false production_environment: true - workflow-run-usage: - value: - billable: - UBUNTU: - total_ms: 180000 - jobs: 1 - job_runs: - - job_id: 1 - duration_ms: 180000 - MACOS: - total_ms: 240000 - jobs: 4 - job_runs: - - job_id: 2 - duration_ms: 60000 - - job_id: 3 - duration_ms: 60000 - - job_id: 4 - duration_ms: 60000 - - job_id: 5 - duration_ms: 60000 - WINDOWS: - total_ms: 300000 - jobs: 2 - job_runs: - - job_id: 6 - duration_ms: 150000 - - job_id: 7 - duration_ms: 150000 - run_duration_ms: 500000 actions-secret-paginated: value: total_count: 2 @@ -65903,15 +67312,6 @@ components: url: https://api.github.com/repos/octo-org/octo-repo/actions/workflows/161335 html_url: https://github.com/octo-org/octo-repo/blob/master/.github/workflows/161335 badge_url: https://github.com/octo-org/octo-repo/workflows/CI/badge.svg - workflow-usage: - value: - billable: - UBUNTU: - total_ms: 180000 - MACOS: - total_ms: 240000 - WINDOWS: - total_ms: 300000 autolink-items: value: - id: 1 @@ -65936,6 +67336,94 @@ components: - ci-test - linter protection_url: https://api.github.com/repos/octocat/hello-world/branches/master/protection + branch-get: + value: + name: main + commit: + sha: 7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + node_id: MDY6Q29tbWl0MTI5NjI2OTo3ZmQxYTYwYjAxZjkxYjMxNGY1OTk1NWE0ZTRkNGU4MGQ4ZWRmMTFk + commit: + author: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + committer: + name: The Octocat + email: octocat@nowhere.com + date: '2012-03-06T23:06:50Z' + message: |- + Merge pull request #6 from Spaceghost/patch-1 + + New line at end of file. + tree: + sha: b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/trees/b4eecafa9be2f2006ce1b709d6857b07069b4608 + url: https://api.github.com/repos/octocat/Hello-World/git/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comment_count: 77 + verification: + verified: false + reason: unsigned + signature: + payload: + url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + html_url: https://github.com/octocat/Hello-World/commit/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d + comments_url: https://api.github.com/repos/octocat/Hello-World/commits/7fd1a60b01f91b314f59955a4e4d4e80d8edf11d/comments + author: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + committer: + login: octocat + id: 583231 + node_id: MDQ6VXNlcjU4MzIzMQ== + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + parents: + - sha: 553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + url: https://api.github.com/repos/octocat/Hello-World/commits/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + html_url: https://github.com/octocat/Hello-World/commit/553c2077f0edc3d5dc5d17262f6aa498e69d6f8e + - sha: 762941318ee16e59dabbacb1b4049eec22f0d303 + url: https://api.github.com/repos/octocat/Hello-World/commits/762941318ee16e59dabbacb1b4049eec22f0d303 + html_url: https://github.com/octocat/Hello-World/commit/762941318ee16e59dabbacb1b4049eec22f0d303 + _links: + self: https://api.github.com/repos/octocat/Hello-World/branches/main + html: https://github.com/octocat/Hello-World/tree/main + protected: false + protection: + enabled: false + required_status_checks: + enforcement_level: 'off' + contexts: [] + checks: [] + protection_url: https://api.github.com/repos/octocat/Hello-World/branches/main/protection branch-protection: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection @@ -65985,7 +67473,38 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: + apps: + - id: 1 + slug: octoapp + node_id: MDExOkludGVncmF0aW9uMQ== + owner: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + hooks_url: https://api.github.com/orgs/github/hooks + issues_url: https://api.github.com/orgs/github/issues + members_url: https://api.github.com/orgs/github/members{/member} + public_members_url: https://api.github.com/orgs/github/public_members{/member} + avatar_url: https://github.com/images/error/octocat_happy.gif + description: A great organization + name: Octocat App + description: '' + external_url: https://example.com + html_url: https://github.com/apps/octoapp + created_at: '2017-07-08T16:18:44-04:00' + updated_at: '2017-07-08T16:18:44-04:00' + permissions: + metadata: read + contents: read + issues: write + single_file: write + events: + - push + - pull_request dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 @@ -65993,7 +67512,7 @@ components: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions users_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users teams_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams - apps_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/apps users: - login: octocat id: 1 @@ -66025,7 +67544,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: apps: - id: 1 slug: octoapp @@ -66065,6 +67584,54 @@ components: enabled: true required_conversation_resolution: enabled: true + branch-protection-update: + value: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection + required_status_checks: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks + strict: true + contexts: + - continuous-integration/travis-ci + contexts_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_status_checks/contexts + checks: + - context: continuous-integration/travis-ci + app_id: + restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/restrictions/apps + users: [] + teams: [] + apps: [] + required_pull_request_reviews: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_pull_request_reviews + dismiss_stale_reviews: true + require_code_owner_reviews: true + required_approving_review_count: 2 + dismissal_restrictions: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions + users_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/users + teams_url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/dismissal_restrictions/teams + users: [] + teams: [] + apps: [] + required_signatures: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/required_signatures + enabled: false + enforce_admins: + url: https://api.github.com/repos/octocat/hello-world/branches/main/protection/enforce_admins + enabled: true + required_linear_history: + enabled: true + allow_force_pushes: + enabled: true + allow_deletions: + enabled: true + block_creations: + enabled: true + required_conversation_resolution: + enabled: true protected-branch-admin-enforced-2: value: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/enforce_admins @@ -66107,7 +67674,38 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: + apps: + - id: 1 + slug: octoapp + node_id: MDExOkludGVncmF0aW9uMQ== + owner: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + hooks_url: https://api.github.com/orgs/github/hooks + issues_url: https://api.github.com/orgs/github/issues + members_url: https://api.github.com/orgs/github/members{/member} + public_members_url: https://api.github.com/orgs/github/public_members{/member} + avatar_url: https://github.com/images/error/octocat_happy.gif + description: A great organization + name: Octocat App + description: '' + external_url: https://example.com + html_url: https://github.com/apps/octoapp + created_at: '2017-07-08T16:18:44-04:00' + updated_at: '2017-07-08T16:18:44-04:00' + permissions: + metadata: read + contents: read + issues: write + single_file: write + events: + - push + - pull_request dismiss_stale_reviews: true require_code_owner_reviews: true required_approving_review_count: 2 @@ -66127,7 +67725,7 @@ components: url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions users_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/users teams_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams - apps_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/teams + apps_url: https://api.github.com/repos/octocat/Hello-World/branches/master/protection/restrictions/apps users: - login: octocat id: 1 @@ -66159,7 +67757,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: apps: - id: 1 slug: octoapp @@ -66255,8 +67853,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: comment_count: 0 author: gravatar_id: '' @@ -66321,7 +67919,7 @@ components: id: 4 head_sha: ce587453ced02b1526dfb4cb910479d431683101 node_id: MDg6Q2hlY2tSdW40 - external_id: '' + external_id: '42' url: https://api.github.com/repos/github/hello-world/check-runs/4 html_url: https://github.com/github/hello-world/runs/4 details_url: https://example.com @@ -66394,6 +67992,85 @@ components: id: 526 url: https://api.github.com/repos/github/hello-world name: hello-world + check-run-example-of-in-progress-conclusion: + summary: Response for in_progress conclusion + value: + id: 4 + head_sha: ce587453ced02b1526dfb4cb910479d431683101 + node_id: MDg6Q2hlY2tSdW40 + external_id: '42' + url: https://api.github.com/repos/github/hello-world/check-runs/4 + html_url: https://github.com/github/hello-world/runs/4 + details_url: https://example.com + status: in_progress + conclusion: + started_at: '2018-05-04T01:14:52Z' + completed_at: + output: + title: Mighty Readme report + summary: There are 0 failures, 2 warnings, and 1 notice. + text: You may have some misspelled words on lines 2 and 4. You also may + want to add a section in your README about how to install your app. + annotations_count: 2 + annotations_url: https://api.github.com/repos/github/hello-world/check-runs/4/annotations + name: mighty_readme + check_suite: + id: 5 + app: + id: 1 + slug: octoapp + node_id: MDExOkludGVncmF0aW9uMQ== + owner: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: true + name: Octocat App + description: '' + external_url: https://example.com + html_url: https://github.com/apps/octoapp + created_at: '2017-07-08T16:18:44-04:00' + updated_at: '2017-07-08T16:18:44-04:00' + permissions: + metadata: read + contents: read + issues: write + single_file: write + events: + - push + - pull_request + pull_requests: + - url: https://api.github.com/repos/github/hello-world/pulls/1 + id: 1934 + number: 3956 + head: + ref: say-hello + sha: 3dca65fa3e8d4b3da3f3d056c59aee1c50f41390 + repo: + id: 526 + url: https://api.github.com/repos/github/hello-world + name: hello-world + base: + ref: master + sha: e7fdf7640066d71ad16a86fbcbb9c6a10a18af4f + repo: + id: 526 + url: https://api.github.com/repos/github/hello-world + name: hello-world check-run: value: id: 4 @@ -66611,7 +68288,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -66723,7 +68400,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -66850,7 +68527,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -66949,7 +68626,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -67082,10 +68759,11 @@ components: url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/4 html_url: https://github.com/octocat/hello-world/code-scanning/4 state: open - fixed_at: - dismissed_by: - dismissed_at: - dismissed_reason: + fixed_at: + dismissed_by: + dismissed_at: + dismissed_reason: + dismissed_comment: rule: id: js/zipslip severity: error @@ -67096,7 +68774,7 @@ components: name: js/zipslip tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -67120,7 +68798,7 @@ components: url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/3 html_url: https://github.com/octocat/hello-world/code-scanning/3 state: dismissed - fixed_at: + fixed_at: dismissed_by: login: octocat id: 1 @@ -67142,6 +68820,8 @@ components: site_admin: false dismissed_at: '2020-02-14T12:29:18Z' dismissed_reason: false positive + dismissed_comment: This alert is not actually correct, because there's a sanitizer + included in the library. rule: id: js/zipslip severity: error @@ -67152,7 +68832,7 @@ components: name: js/zipslip tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -67177,7 +68857,7 @@ components: url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42 html_url: https://github.com/octocat/hello-world/code-scanning/42 state: dismissed - fixed_at: + fixed_at: dismissed_by: login: octocat id: 54933897 @@ -67199,6 +68879,8 @@ components: site_admin: false dismissed_at: '2020-02-14T12:29:18Z' dismissed_reason: false positive + dismissed_comment: This alert is not actually correct, because there's a sanitizer + included in the library. rule: id: js/zipslip severity: error @@ -67215,9 +68897,10 @@ components: files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...' + help_uri: https://codeql.github.com/ tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -67243,7 +68926,7 @@ components: url: https://api.github.com/repos/octocat/hello-world/code-scanning/alerts/42 html_url: https://github.com/octocat/hello-world/code-scanning/42 state: dismissed - fixed_at: + fixed_at: dismissed_by: login: octocat id: 1 @@ -67265,6 +68948,8 @@ components: site_admin: false dismissed_at: '2020-09-02T22:34:56Z' dismissed_reason: false positive + dismissed_comment: This alert is not actually correct, because there's a sanitizer + included in the library. rule: id: js/zipslip severity: error @@ -67281,9 +68966,10 @@ components: files from a malicious zip archive without validating that the destination file path is within the destination directory can cause files outside the destination directory to be overwritten ...' + help_uri: https://codeql.github.com/ tool: name: CodeQL - guid: + guid: version: 2.4.0 most_recent_instance: ref: refs/heads/main @@ -67307,8 +68993,9 @@ components: - ref: refs/heads/main analysis_key: ".github/workflows/codeql-analysis.yml:CodeQL-Build" environment: '' + category: ".github/workflows/codeql-analysis.yml:CodeQL-Build" state: open - fixed_at: + fixed_at: commit_sha: 39406e42cb832f683daa691dd652a8dc36ee8930 message: text: This path depends on a user-provided value. @@ -67354,7 +69041,7 @@ components: sarif_id: 6c81cd8e-b078-4ac3-a3be-1dad7dbd0b53 tool: name: CodeQL - guid: + guid: version: 2.4.0 deletable: true warning: '' @@ -67372,12 +69059,12 @@ components: sarif_id: 8981cd8e-b078-4ac3-a3be-1dad7dbd0b582 tool: name: Python Security Analysis - guid: + guid: version: 1.2.0 deletable: true warning: '' code-scanning-analysis-default: - summary: Default response + summary: application/json response value: ref: refs/heads/main commit_sha: c18c69115654ff0166991962832dc2bd7756e655 @@ -67393,10 +69080,36 @@ components: sarif_id: 47177e22-5596-11eb-80a1-c1e54ef945c6 tool: name: CodeQL - guid: + guid: version: 2.4.0 deletable: true warning: '' + code-scanning-analysis-sarif: + summary: application/json+sarif response + value: + runs: + - tool: + driver: + name: CodeQL + organization: GitHub + semanticVersion: 1.0.0 + rules: + - id: js/unused-local-variable + name: js/unused-local-variable + results: + - guid: 326aa09f-9af8-13cf-9851-3d0e5183ec38 + message: + text: Unused variable foo. + locations: + - physicalLocation: + artifactLocation: + uri: file1.js + region: + startLine: 1 + ruleId: js/unused-local-variable + properties: + - github/alertNumber: 2 + - github/alertUrl: https://api.github.com/repos/monalisa/monalisa/code-scanning/alerts/2 code-scanning-analysis-deletion: summary: Default response value: @@ -67412,465 +69125,62 @@ components: value: processing_status: complete analyses_url: https://api.github.com/repos/octocat/hello-world/code-scanning/analyses?sarif_id=47177e22-5596-11eb-80a1-c1e54ef945c6 - codespaces-list-for-repository: + codeowners-errors: value: - total_count: 2 - codespaces: - - id: 1 - name: monalisa-octocat-hello-world-g4wpq6h95q - environment_id: 26a7c758-7299-4a73-b978-5a92a7ae98a0 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer/devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-g4wpq6h95q.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/stop - recent_folders: [] - - id: 2 - name: monalisa-octocat-hello-world-3f89ada1j3 - environment_id: 526ce4d7-46da-494f-a4f9-cfd25b818719 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer/devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3 - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-3f89ada1j3.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/stop - recent_folders: [] - codespace: + errors: + - line: 3 + column: 1 + kind: Invalid pattern + source: "***/*.rb @monalisa" + suggestion: Did you mean `**/*.rb`? + message: |- + Invalid pattern on line 3: Did you mean `**/*.rb`? + + ***/*.rb @monalisa + ^ + path: ".github/CODEOWNERS" + - line: 7 + column: 7 + kind: Invalid owner + source: "*.txt docs@" + suggestion: + message: |- + Invalid owner on line 7: + + *.txt docs@ + ^ + path: ".github/CODEOWNERS" + collaborator-items: value: + - login: octocat id: 1 - name: monalisa-octocat-hello-world-g4wpq6h95q - environment_id: 26a7c758-7299-4a73-b978-5a92a7ae98a0 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer/devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-g4wpq6h95q.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/stop - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls/1 - recent_folders: [] - codespace-machines-list: - value: - total_count: 2 - machines: - - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - - name: premiumLinux - display_name: 8 cores, 16 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 17179869184 - cpus: 8 - collaborator-items: - value: - - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - permissions: - pull: true - triage: true - push: true - maintain: false - admin: false - role_name: write - repository-invitation-response-when-a-new-invitation-is-created: - value: - id: 1 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + permissions: + pull: true + triage: true + push: true + maintain: false + admin: false + role_name: write + repository-invitation-response-when-a-new-invitation-is-created: + value: + id: 1 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 repository: id: 1296269 node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 @@ -68127,8 +69437,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: author: login: octocat id: 1 @@ -68351,7 +69661,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: head: label: octocat:new-topic ref: new-topic @@ -68446,7 +69756,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -68475,7 +69785,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -68587,7 +69897,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -68616,7 +69926,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -68652,7 +69962,7 @@ components: statuses: href: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e author_association: OWNER - auto_merge: + auto_merge: draft: false commit: value: @@ -68679,8 +69989,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: author: login: octocat id: 1 @@ -68859,7 +70169,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -69035,41 +70345,6 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false - community-profile: - value: - health_percentage: 100 - description: My first repository on GitHub! - documentation: - files: - code_of_conduct: - name: Contributor Covenant - key: contributor_covenant - url: https://api.github.com/codes_of_conduct/contributor_covenant - html_url: https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md - code_of_conduct_file: - url: https://api.github.com/repos/octocat/Hello-World/contents/CODE_OF_CONDUCT.md - html_url: https://github.com/octocat/Hello-World/blob/master/CODE_OF_CONDUCT.md - contributing: - url: https://api.github.com/repos/octocat/Hello-World/contents/CONTRIBUTING - html_url: https://github.com/octocat/Hello-World/blob/master/CONTRIBUTING - issue_template: - url: https://api.github.com/repos/octocat/Hello-World/contents/ISSUE_TEMPLATE - html_url: https://github.com/octocat/Hello-World/blob/master/ISSUE_TEMPLATE - pull_request_template: - url: https://api.github.com/repos/octocat/Hello-World/contents/PULL_REQUEST_TEMPLATE - html_url: https://github.com/octocat/Hello-World/blob/master/PULL_REQUEST_TEMPLATE - license: - name: MIT License - key: mit - spdx_id: MIT - url: https://api.github.com/licenses/mit - html_url: https://github.com/octocat/Hello-World/blob/master/LICENSE - node_id: MDc6TGljZW5zZW1pdA== - readme: - url: https://api.github.com/repos/octocat/Hello-World/contents/README.md - html_url: https://github.com/octocat/Hello-World/blob/master/README.md - updated_at: '2017-02-28T19:09:29Z' - content_reports_enabled: true commit-comparison: value: url: https://api.github.com/repos/octocat/Hello-World/compare/master...topic @@ -69101,8 +70376,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: author: login: octocat id: 1 @@ -69168,8 +70443,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: author: login: octocat id: 1 @@ -69239,8 +70514,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: author: login: octocat id: 1 @@ -69335,7 +70610,7 @@ components: url: https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit git_url: https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d html_url: https://github.com/octokit/octokit.rb/tree/master/lib/octokit - download_url: + download_url: _links: self: https://api.github.com/repos/octokit/octokit.rb/contents/lib/octokit git: https://api.github.com/repos/octokit/octokit.rb/git/trees/a84d88e7554fc1fa21bcbc4efae3c782a70d2b9d @@ -69369,7 +70644,7 @@ components: url: https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master git_url: https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9 html_url: https://github.com/jquery/qunit/tree/6ca3721222109997540bd6d9ccd396902e0ad2f9 - download_url: + download_url: _links: git: https://api.github.com/repos/jquery/qunit/git/trees/6ca3721222109997540bd6d9ccd396902e0ad2f9 self: https://api.github.com/repos/jquery/jquery/contents/test/qunit?ref=master @@ -69414,8 +70689,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: file-commit-example-for-creating-a-file: value: content: @@ -69456,11 +70731,11 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: file-commit: value: - content: + content: commit: sha: 7638417db6d59f3c431d3e1f261cc637155684cd node_id: MDY6Q29tbWl0NzYzODQxN2RiNmQ1OWYzYzQzMWQzZTFmMjYxY2M2MzcxNTU2ODRjZA== @@ -69485,8 +70760,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: contributor-items-response-if-repository-contains-content: value: - login: octocat @@ -69523,6 +70798,39 @@ components: name: MY_ARTIFACTORY_PASSWORD created_at: '2019-08-10T14:59:22Z' updated_at: '2020-01-10T14:59:22Z' + diff-range-response: + value: + - change_type: removed + manifest: package.json + ecosystem: npm + name: helmet + version: 4.6.0 + package_url: pkg:npm/helmet@4.6.0 + license: MIT + source_repository_url: https://github.com/helmetjs/helmet + vulnerabilities: [] + - change_type: added + manifest: package.json + ecosystem: npm + name: helmet + version: 5.0.0 + package_url: pkg:npm/helmet@5.0.0 + license: MIT + source_repository_url: https://github.com/helmetjs/helmet + vulnerabilities: [] + - change_type: added + manifest: Gemfile + ecosystem: rubygems + name: ruby-openid + version: 2.7.0 + package_url: pkg:gem/ruby-openid@2.7.0 + license: + source_repository_url: https://github.com/openid/ruby-openid + vulnerabilities: + - severity: critical + advisory_ghsa_id: GHSA-fqfj-cmh6-hj49 + advisory_summary: Ruby OpenID + advisory_url: https://github.com/advisories/GHSA-fqfj-cmh6-hj49 deployment-simple-example: summary: Simple example value: @@ -69719,7 +71027,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: - id: 3756 node_id: MDQ6R2F0ZTM3NTY= type: branch_policy @@ -69777,13 +71085,82 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: - id: 3756 node_id: MDQ6R2F0ZTM3NTY= type: branch_policy deployment_branch_policy: protected_branches: false custom_branch_policies: true + deployment-branch-policies-list: + value: + total_count: 2 + branch_policies: + - id: 361471 + node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzE= + name: release/* + - id: 361472 + node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjE0NzI= + name: main + deployment-branch-policy-wildcard: + value: + id: 364662 + node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjQ2NjI= + name: release/* + deployment-branch-policy-single-branch: + value: + id: 364663 + node_id: MDE2OkdhdGVCcmFuY2hQb2xpY3kzNjQ2NjM= + name: main + repo-events-items: + value: + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22237752260' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + action: started + public: true + created_at: '2022-06-08T23:29:25Z' minimal-repository-items-2: value: - id: 1296269 @@ -69856,7 +71233,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -69930,8 +71307,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: html_url: https://github.com/octocat/Hello-World/commit/7638417db6d59f3c431d3e1f261cc637155684cd git-commit-2: value: @@ -69958,8 +71335,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: git-ref-items: value: - ref: refs/heads/feature-a @@ -70003,8 +71380,8 @@ components: verification: verified: false reason: unsigned - signature: - payload: + signature: + payload: git-tree: value: sha: cd8274d15fa3ae2ab983129fb037999f264ba9a7 @@ -70074,9 +71451,9 @@ components: ping_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings deliveries_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries last_response: - code: + code: status: unused - message: + message: hook: value: type: Repository @@ -70097,137 +71474,9 @@ components: ping_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/pings deliveries_url: https://api.github.com/repos/octocat/Hello-World/hooks/12345678/deliveries last_response: - code: + code: status: unused - message: - import: - value: - vcs: subversion - use_lfs: true - vcs_url: http://svn.mycompany.com/svn/myproject - status: complete - status_text: Done - has_large_files: true - large_files_size: 132331036 - large_files_count: 1 - authors_count: 4 - url: https://api.github.com/repos/octocat/socm/import - html_url: https://import.github.com/octocat/socm/import - authors_url: https://api.github.com/repos/octocat/socm/import/authors - repository_url: https://api.github.com/repos/octocat/socm - import-2: - value: - vcs: subversion - use_lfs: true - vcs_url: http://svn.mycompany.com/svn/myproject - status: importing - status_text: Importing... - has_large_files: false - large_files_size: 0 - large_files_count: 0 - authors_count: 0 - commit_count: 1042 - url: https://api.github.com/repos/octocat/socm/import - html_url: https://import.github.com/octocat/socm/import - authors_url: https://api.github.com/repos/octocat/socm/import/authors - repository_url: https://api.github.com/repos/octocat/socm - import-example-1: - summary: Example 1 - value: - vcs: subversion - use_lfs: true - vcs_url: http://svn.mycompany.com/svn/myproject - status: detecting - url: https://api.github.com/repos/octocat/socm/import - html_url: https://import.github.com/octocat/socm/import - authors_url: https://api.github.com/repos/octocat/socm/import/authors - repository_url: https://api.github.com/repos/octocat/socm - import-example-2: - summary: Example 2 - value: - vcs: tfvc - use_lfs: true - vcs_url: http://tfs.mycompany.com/tfs/myproject - tfvc_project: project1 - status: importing - status_text: Importing... - has_large_files: false - large_files_size: 0 - large_files_count: 0 - authors_count: 0 - commit_count: 1042 - url: https://api.github.com/repos/octocat/socm/import - html_url: https://import.github.com/octocat/socm/import - authors_url: https://api.github.com/repos/octocat/socm/import/authors - repository_url: https://api.github.com/repos/octocat/socm - import-response: - summary: Response - value: - vcs: subversion - use_lfs: true - vcs_url: http://svn.mycompany.com/svn/myproject - status: importing - status_text: Importing... - has_large_files: false - large_files_size: 0 - large_files_count: 0 - authors_count: 0 - commit_count: 1042 - url: https://api.github.com/repos/octocat/socm/import - html_url: https://import.github.com/octocat/socm/import - authors_url: https://api.github.com/repos/octocat/socm/import/authors - repository_url: https://api.github.com/repos/octocat/socm - porter-author-items: - value: - - id: 2268557 - remote_id: nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef - remote_name: nobody - email: hubot@github.com - name: Hubot - url: https://api.github.com/repos/octocat/socm/import/authors/2268557 - import_url: https://api.github.com/repos/octocat/socm/import - - id: 2268558 - remote_id: svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef - remote_name: svner - email: svner@fc7da526-431c-80fe-3c8c-c148ff18d7ef - name: svner - url: https://api.github.com/repos/octocat/socm/import/authors/2268558 - import_url: https://api.github.com/repos/octocat/socm/import - - id: 2268559 - remote_id: svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef - remote_name: svner@example.com - email: svner@example.com@fc7da526-431c-80fe-3c8c-c148ff18d7ef - name: svner@example.com - url: https://api.github.com/repos/octocat/socm/import/authors/2268559 - import_url: https://api.github.com/repos/octocat/socm/import - porter-author: - value: - id: 2268557 - remote_id: nobody@fc7da526-431c-80fe-3c8c-c148ff18d7ef - remote_name: nobody - email: hubot@github.com - name: Hubot - url: https://api.github.com/repos/octocat/socm/import/authors/2268557 - import_url: https://api.github.com/repos/octocat/socm/import - porter-large-file-items: - value: - - ref_name: refs/heads/master - path: foo/bar/1 - oid: d3d9446802a44259755d38e6d163e820 - size: 10485760 - - ref_name: refs/heads/master - path: foo/bar/2 - oid: 6512bd43d9caa6e02c990b0a82652dca - size: 11534336 - - ref_name: refs/heads/master - path: foo/bar/3 - oid: c20ad4d76fe97759aa27a0c99bff6710 - size: 12582912 - interaction-limit-2: - value: - limit: collaborators_only - origin: repository - expires_at: '2018-08-17T04:18:39Z' + message: repository-invitation-items: value: - id: 1 @@ -70577,7 +71826,7 @@ components: html_url: https://github.com/octocat/Hello-World/pull/1347 diff_url: https://github.com/octocat/Hello-World/pull/1347.diff patch_url: https://github.com/octocat/Hello-World/pull/1347.patch - closed_at: + closed_at: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' closed_by: @@ -70600,6 +71849,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue: value: id: 1 @@ -70722,7 +71972,7 @@ components: html_url: https://github.com/octocat/Hello-World/pull/1347 diff_url: https://github.com/octocat/Hello-World/pull/1347.diff patch_url: https://github.com/octocat/Hello-World/pull/1347.patch - closed_at: + closed_at: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' closed_by: @@ -70745,6 +71995,7 @@ components: type: User site_admin: false author_association: COLLABORATOR + state_reason: completed issue-comment-items: value: - id: 1 @@ -70954,10 +72205,11 @@ components: html_url: https://github.com/octocat/Hello-World/pull/1347 diff_url: https://github.com/octocat/Hello-World/pull/1347.diff patch_url: https://github.com/octocat/Hello-World/pull/1347.patch - closed_at: + closed_at: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event: value: id: 1 @@ -71143,10 +72395,11 @@ components: html_url: https://github.com/octocat/Hello-World/pull/1347 diff_url: https://github.com/octocat/Hello-World/pull/1347.diff patch_url: https://github.com/octocat/Hello-World/pull/1347.patch - closed_at: + closed_at: created_at: '2011-04-22T13:33:48Z' updated_at: '2011-04-22T13:33:48Z' author_association: COLLABORATOR + state_reason: completed issue-event-for-issue-items: value: - id: 1 @@ -71175,7 +72428,7 @@ components: commit_id: 6dcb09b5b57875f334f61aebed695e2e4193db5e commit_url: https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e created_at: '2011-04-14T16:00:49Z' - performed_via_github_app: + performed_via_github_app: label: name: label color: red @@ -71204,15 +72457,158 @@ components: description: Something isn't working color: f29513 default: true - deploy-key-items: + timeline-issue-events: value: - - id: 1 - key: ssh-rsa AAA... - url: https://api.github.com/repos/octocat/Hello-World/keys/1 - title: octocat@octomac - verified: true - created_at: '2014-12-10T15:53:42Z' - read_only: true + - id: 6430295168 + node_id: LOE_lADODwFebM5HwC0kzwAAAAF_RoSA + url: https://api.github.com/repos/github/roadmap/issues/events/6430295168 + actor: + login: github + id: 9919 + node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= + avatar_url: https://avatars.githubusercontent.com/u/9919?v=4 + gravatar_id: '' + url: https://api.github.com/users/github + html_url: https://github.com/github + followers_url: https://api.github.com/users/github/followers + following_url: https://api.github.com/users/github/following{/other_user} + gists_url: https://api.github.com/users/github/gists{/gist_id} + starred_url: https://api.github.com/users/github/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/github/subscriptions + organizations_url: https://api.github.com/users/github/orgs + repos_url: https://api.github.com/users/github/repos + events_url: https://api.github.com/users/github/events{/privacy} + received_events_url: https://api.github.com/users/github/received_events + type: Organization + site_admin: false + event: locked + commit_id: + commit_url: + created_at: '2022-04-13T20:49:13Z' + lock_reason: + performed_via_github_app: + - id: 6430296748 + node_id: LE_lADODwFebM5HwC0kzwAAAAF_Roqs + url: https://api.github.com/repos/github/roadmap/issues/events/6430296748 + actor: + login: github-product-roadmap + id: 67656570 + node_id: MDQ6VXNlcjY3NjU2NTcw + avatar_url: https://avatars.githubusercontent.com/u/67656570?v=4 + gravatar_id: '' + url: https://api.github.com/users/github-product-roadmap + html_url: https://github.com/github-product-roadmap + followers_url: https://api.github.com/users/github-product-roadmap/followers + following_url: https://api.github.com/users/github-product-roadmap/following{/other_user} + gists_url: https://api.github.com/users/github-product-roadmap/gists{/gist_id} + starred_url: https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/github-product-roadmap/subscriptions + organizations_url: https://api.github.com/users/github-product-roadmap/orgs + repos_url: https://api.github.com/users/github-product-roadmap/repos + events_url: https://api.github.com/users/github-product-roadmap/events{/privacy} + received_events_url: https://api.github.com/users/github-product-roadmap/received_events + type: User + site_admin: false + event: labeled + commit_id: + commit_url: + created_at: '2022-04-13T20:49:34Z' + label: + name: beta + color: 99dd88 + performed_via_github_app: + - id: 6635165802 + node_id: RTE_lADODwFebM5HwC0kzwAAAAGLfJhq + url: https://api.github.com/repos/github/roadmap/issues/events/6635165802 + actor: + login: github-product-roadmap + id: 67656570 + node_id: MDQ6VXNlcjY3NjU2NTcw + avatar_url: https://avatars.githubusercontent.com/u/67656570?v=4 + gravatar_id: '' + url: https://api.github.com/users/github-product-roadmap + html_url: https://github.com/github-product-roadmap + followers_url: https://api.github.com/users/github-product-roadmap/followers + following_url: https://api.github.com/users/github-product-roadmap/following{/other_user} + gists_url: https://api.github.com/users/github-product-roadmap/gists{/gist_id} + starred_url: https://api.github.com/users/github-product-roadmap/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/github-product-roadmap/subscriptions + organizations_url: https://api.github.com/users/github-product-roadmap/orgs + repos_url: https://api.github.com/users/github-product-roadmap/repos + events_url: https://api.github.com/users/github-product-roadmap/events{/privacy} + received_events_url: https://api.github.com/users/github-product-roadmap/received_events + type: User + site_admin: false + event: renamed + commit_id: + commit_url: + created_at: '2022-05-18T19:29:01Z' + rename: + from: 'Secret scanning: dry-runs for enterprise-level custom patterns (cloud)' + to: 'Secret scanning: dry-runs for enterprise-level custom patterns' + performed_via_github_app: + - url: https://api.github.com/repos/github/roadmap/issues/comments/1130876857 + html_url: https://github.com/github/roadmap/issues/493#issuecomment-1130876857 + issue_url: https://api.github.com/repos/github/roadmap/issues/493 + id: 1130876857 + node_id: IC_kwDODwFebM5DZ8-5 + user: + login: octocat + id: 94867353 + node_id: U_kgDOBaePmQ + avatar_url: https://avatars.githubusercontent.com/u/94867353?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: true + created_at: '2022-05-19T00:52:15Z' + updated_at: '2022-05-19T00:52:15Z' + author_association: COLLABORATOR + body: "\U0001F6A2 Shipped to the cloud: https://github.blog/changelog/2022-05-12-secret-scanning-dry-runs-for-enterprise-level-custom-patterns/" + reactions: + url: https://api.github.com/repos/github/roadmap/issues/comments/1130876857/reactions + total_count: 0 + "+1": 0 + "-1": 0 + laugh: 0 + hooray: 0 + confused: 0 + heart: 0 + rocket: 0 + eyes: 0 + performed_via_github_app: + event: commented + actor: + login: octocat + id: 94867353 + node_id: U_kgDOBaePmQ + avatar_url: https://avatars.githubusercontent.com/u/94867353?v=4 + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: true + deploy-key-items: + value: {} deploy-key: value: id: 1 @@ -71391,7 +72787,7 @@ components: - url: https://api.github.com/repos/github/developer.github.com/pages/builds/5472601 status: built error: - message: + message: pusher: login: octocat id: 1 @@ -71424,7 +72820,7 @@ components: url: https://api.github.com/repos/github/developer.github.com/pages/builds/5472601 status: built error: - message: + message: pusher: login: octocat id: 1 @@ -71448,66 +72844,24 @@ components: duration: 2104 created_at: '2014-02-10T19:00:49Z' updated_at: '2014-02-10T19:00:51Z' - pages-health-check: + repository-pre-receive-hook-items: + value: + - id: 42 + name: Check Commits + enforcement: disabled + configuration_url: https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42 + repository-pre-receive-hook: + value: + id: 42 + name: Check Commits + enforcement: disabled + configuration_url: https://github.example.com/api/v3/orgs/octocat/pre-receive-hooks/42 + repository-pre-receive-hook-2: value: - domain: - host: example.com - uri: http://example.com/ - nameservers: default - dns_resolves: true - is_proxied: false - is_cloudflare_ip: false - is_fastly_ip: false - is_old_ip_address: false - is_a_record: true - has_cname_record: false - has_mx_records_present: false - is_valid_domain: true - is_apex_domain: true - should_be_a_record: true - is_cname_to_github_user_domain: false - is_cname_to_pages_dot_github_dot_com: false - is_cname_to_fastly: false - is_pointed_to_github_pages_ip: true - is_non_github_pages_ip_present: false - is_pages_domain: false - is_served_by_pages: true - is_valid: true - reason: - responds_to_https: true - enforces_https: true - https_error: - is_https_eligible: true - caa_error: - alt_domain: - host: www.example.com - uri: http://www.example.com/ - nameservers: default - dns_resolves: true - is_proxied: false - is_cloudflare_ip: false - is_fastly_ip: false - is_old_ip_address: false - is_a_record: true - has_cname_record: false - has_mx_records_present: false - is_valid_domain: true - is_apex_domain: true - should_be_a_record: true - is_cname_to_github_user_domain: false - is_cname_to_pages_dot_github_dot_com: false - is_cname_to_fastly: false - is_pointed_to_github_pages_ip: true - is_non_github_pages_ip_present: false - is_pages_domain: false - is_served_by_pages: true - is_valid: true - reason: - responds_to_https: true - enforces_https: true - https_error: - is_https_eligible: true - caa_error: + id: 42 + name: Check Commits + enforcement: enabled + configuration_url: https://github.example.com/api/v3/repos/octocat/hello-world/pre-receive-hooks/42 project-items-2: value: - owner_url: https://api.github.com/repos/api-playground/projects-test @@ -71809,7 +73163,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -71943,7 +73297,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -72000,7 +73354,7 @@ components: statuses: href: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e author_association: OWNER - auto_merge: + auto_merge: draft: false merged: false mergeable: true @@ -72286,7 +73640,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: pull-request-review-request: value: url: https://api.github.com/repos/octocat/Hello-World/pulls/1347 @@ -72497,7 +73851,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: head: label: octocat:new-topic ref: new-topic @@ -72592,7 +73946,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -72621,7 +73975,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -72733,7 +74087,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -72762,7 +74116,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -72798,12 +74152,26 @@ components: statuses: href: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e author_association: OWNER - auto_merge: + auto_merge: draft: false - pull-request-review-items: + pull-request-simple: value: - - id: 80 - node_id: MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= + url: https://api.github.com/repos/octocat/Hello-World/pulls/1347 + id: 1 + node_id: MDExOlB1bGxSZXF1ZXN0MQ== + html_url: https://github.com/octocat/Hello-World/pull/1347 + diff_url: https://github.com/octocat/Hello-World/pull/1347.diff + patch_url: https://github.com/octocat/Hello-World/pull/1347.patch + issue_url: https://api.github.com/repos/octocat/Hello-World/issues/1347 + commits_url: https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + review_comments_url: https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + review_comment_url: https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} + comments_url: https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + number: 1347 + state: open + locked: true + title: Amazing new feature user: login: octocat id: 1 @@ -72823,23 +74191,57 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false - body: Here is the body for the review. - state: APPROVED - html_url: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - pull_request_url: https://api.github.com/repos/octocat/Hello-World/pulls/12 - _links: - html: - href: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - pull_request: - href: https://api.github.com/repos/octocat/Hello-World/pulls/12 - submitted_at: '2019-11-17T17:43:43Z' - commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 - author_association: COLLABORATOR - pull-request-review: - value: - id: 80 - node_id: MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= - user: + body: Please pull these awesome changes in! + labels: + - id: 208045946 + node_id: MDU6TGFiZWwyMDgwNDU5NDY= + url: https://api.github.com/repos/octocat/Hello-World/labels/bug + name: bug + description: Something isn't working + color: f29513 + default: true + milestone: + url: https://api.github.com/repos/octocat/Hello-World/milestones/1 + html_url: https://github.com/octocat/Hello-World/milestones/v1.0 + labels_url: https://api.github.com/repos/octocat/Hello-World/milestones/1/labels + id: 1002604 + node_id: MDk6TWlsZXN0b25lMTAwMjYwNA== + number: 1 + state: open + title: v1.0 + description: Tracking milestone for version 1.0 + creator: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + open_issues: 4 + closed_issues: 8 + created_at: '2011-04-10T20:09:31Z' + updated_at: '2014-03-03T18:58:10Z' + closed_at: '2013-02-12T13:22:01Z' + due_on: '2012-10-09T23:39:01Z' + active_lock_reason: too heated + created_at: '2011-01-26T19:01:12Z' + updated_at: '2011-01-26T19:01:12Z' + closed_at: '2011-01-26T19:01:12Z' + merged_at: '2011-01-26T19:01:12Z' + merge_commit_sha: e5bd3914e2e596debea16f433f57875b5b90bcd6 + assignee: login: octocat id: 1 node_id: MDQ6VXNlcjE= @@ -72858,21 +74260,450 @@ components: received_events_url: https://api.github.com/users/octocat/received_events type: User site_admin: false - body: This is close to perfect! Please address the suggested inline change. - state: CHANGES_REQUESTED - html_url: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - pull_request_url: https://api.github.com/repos/octocat/Hello-World/pulls/12 + assignees: + - login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + - login: hubot + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/hubot_happy.gif + gravatar_id: '' + url: https://api.github.com/users/hubot + html_url: https://github.com/hubot + followers_url: https://api.github.com/users/hubot/followers + following_url: https://api.github.com/users/hubot/following{/other_user} + gists_url: https://api.github.com/users/hubot/gists{/gist_id} + starred_url: https://api.github.com/users/hubot/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/hubot/subscriptions + organizations_url: https://api.github.com/users/hubot/orgs + repos_url: https://api.github.com/users/hubot/repos + events_url: https://api.github.com/users/hubot/events{/privacy} + received_events_url: https://api.github.com/users/hubot/received_events + type: User + site_admin: true + requested_reviewers: + - login: other_user + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/other_user_happy.gif + gravatar_id: '' + url: https://api.github.com/users/other_user + html_url: https://github.com/other_user + followers_url: https://api.github.com/users/other_user/followers + following_url: https://api.github.com/users/other_user/following{/other_user} + gists_url: https://api.github.com/users/other_user/gists{/gist_id} + starred_url: https://api.github.com/users/other_user/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/other_user/subscriptions + organizations_url: https://api.github.com/users/other_user/orgs + repos_url: https://api.github.com/users/other_user/repos + events_url: https://api.github.com/users/other_user/events{/privacy} + received_events_url: https://api.github.com/users/other_user/received_events + type: User + site_admin: false + requested_teams: + - id: 1 + node_id: MDQ6VGVhbTE= + url: https://api.github.com/teams/1 + html_url: https://github.com/orgs/github/teams/justice-league + name: Justice League + slug: justice-league + description: A great team. + privacy: closed + permission: admin + members_url: https://api.github.com/teams/1/members{/member} + repositories_url: https://api.github.com/teams/1/repos + parent: + head: + label: octocat:new-topic + ref: new-topic + sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + repo: + id: 1296269 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: Hello-World + full_name: octocat/Hello-World + owner: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + private: false + html_url: https://github.com/octocat/Hello-World + description: This your first repo! + fork: false + url: https://api.github.com/repos/octocat/Hello-World + archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads + events_url: https://api.github.com/repos/octocat/Hello-World/events + forks_url: https://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: git:github.com/octocat/Hello-World.git + issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: https://api.github.com/repos/octocat/Hello-World/languages + merges_url: https://api.github.com/repos/octocat/Hello-World/merges + milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: git@github.com:octocat/Hello-World.git + stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription + tags_url: https://api.github.com/repos/octocat/Hello-World/tags + teams_url: https://api.github.com/repos/octocat/Hello-World/teams + trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: https://github.com/octocat/Hello-World.git + mirror_url: git:git.example.com/octocat/Hello-World + hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks + svn_url: https://svn.github.com/octocat/Hello-World + homepage: https://github.com + language: + forks_count: 9 + stargazers_count: 80 + watchers_count: 80 + size: 108 + default_branch: master + open_issues_count: 0 + is_template: true + topics: + - octocat + - atom + - electron + - api + has_issues: true + has_projects: true + has_wiki: true + has_pages: false + has_downloads: true + archived: false + disabled: false + visibility: public + pushed_at: '2011-01-26T19:06:43Z' + created_at: '2011-01-26T19:01:12Z' + updated_at: '2011-01-26T19:14:43Z' + permissions: + admin: false + push: false + pull: true + allow_rebase_merge: true + template_repository: + temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O + allow_squash_merge: true + allow_auto_merge: false + delete_branch_on_merge: true + allow_merge_commit: true + subscribers_count: 42 + network_count: 0 + license: + key: mit + name: MIT License + url: https://api.github.com/licenses/mit + spdx_id: MIT + node_id: MDc6TGljZW5zZW1pdA== + html_url: https://github.com/licenses/mit + forks: 1 + open_issues: 1 + watchers: 1 + base: + label: octocat:master + ref: master + sha: 6dcb09b5b57875f334f61aebed695e2e4193db5e + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + repo: + id: 1296269 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: Hello-World + full_name: octocat/Hello-World + owner: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + private: false + html_url: https://github.com/octocat/Hello-World + description: This your first repo! + fork: false + url: https://api.github.com/repos/octocat/Hello-World + archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} + blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} + branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} + collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} + commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} + compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} + contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} + contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors + deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments + downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads + events_url: https://api.github.com/repos/octocat/Hello-World/events + forks_url: https://api.github.com/repos/octocat/Hello-World/forks + git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} + git_url: git:github.com/octocat/Hello-World.git + issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} + issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} + keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} + labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} + languages_url: https://api.github.com/repos/octocat/Hello-World/languages + merges_url: https://api.github.com/repos/octocat/Hello-World/merges + milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} + notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} + releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} + ssh_url: git@github.com:octocat/Hello-World.git + stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers + statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} + subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers + subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription + tags_url: https://api.github.com/repos/octocat/Hello-World/tags + teams_url: https://api.github.com/repos/octocat/Hello-World/teams + trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} + clone_url: https://github.com/octocat/Hello-World.git + mirror_url: git:git.example.com/octocat/Hello-World + hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks + svn_url: https://svn.github.com/octocat/Hello-World + homepage: https://github.com + language: + forks_count: 9 + stargazers_count: 80 + watchers_count: 80 + size: 108 + default_branch: master + open_issues_count: 0 + is_template: true + topics: + - octocat + - atom + - electron + - api + has_issues: true + has_projects: true + has_wiki: true + has_pages: false + has_downloads: true + archived: false + disabled: false + visibility: public + pushed_at: '2011-01-26T19:06:43Z' + created_at: '2011-01-26T19:01:12Z' + updated_at: '2011-01-26T19:14:43Z' + permissions: + admin: false + push: false + pull: true + allow_rebase_merge: true + template_repository: + temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O + allow_squash_merge: true + allow_auto_merge: false + delete_branch_on_merge: true + allow_merge_commit: true + subscribers_count: 42 + network_count: 0 + license: + key: mit + name: MIT License + url: https://api.github.com/licenses/mit + spdx_id: MIT + node_id: MDc6TGljZW5zZW1pdA== + html_url: https://github.com/licenses/mit + forks: 1 + open_issues: 1 + watchers: 1 _links: + self: + href: https://api.github.com/repos/octocat/Hello-World/pulls/1347 html: - href: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 - pull_request: - href: https://api.github.com/repos/octocat/Hello-World/pulls/12 - submitted_at: '2019-11-17T17:43:43Z' - commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 - author_association: COLLABORATOR - pull-request-review-4: + href: https://github.com/octocat/Hello-World/pull/1347 + issue: + href: https://api.github.com/repos/octocat/Hello-World/issues/1347 + comments: + href: https://api.github.com/repos/octocat/Hello-World/issues/1347/comments + review_comments: + href: https://api.github.com/repos/octocat/Hello-World/pulls/1347/comments + review_comment: + href: https://api.github.com/repos/octocat/Hello-World/pulls/comments{/number} + commits: + href: https://api.github.com/repos/octocat/Hello-World/pulls/1347/commits + statuses: + href: https://api.github.com/repos/octocat/Hello-World/statuses/6dcb09b5b57875f334f61aebed695e2e4193db5e + author_association: OWNER + auto_merge: + draft: false + pull-request-review-items: value: - id: 80 + - id: 80 + node_id: MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + body: Here is the body for the review. + state: APPROVED + html_url: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + pull_request_url: https://api.github.com/repos/octocat/Hello-World/pulls/12 + _links: + html: + href: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + pull_request: + href: https://api.github.com/repos/octocat/Hello-World/pulls/12 + submitted_at: '2019-11-17T17:43:43Z' + commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 + author_association: COLLABORATOR + pull-request-review: + value: + id: 80 + node_id: MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + body: This is close to perfect! Please address the suggested inline change. + state: CHANGES_REQUESTED + html_url: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + pull_request_url: https://api.github.com/repos/octocat/Hello-World/pulls/12 + _links: + html: + href: https://github.com/octocat/Hello-World/pull/12#pullrequestreview-80 + pull_request: + href: https://api.github.com/repos/octocat/Hello-World/pulls/12 + submitted_at: '2019-11-17T17:43:43Z' + commit_id: ecdd80bb57125d7ba9641ffaa4d7d2c19d3f3091 + author_association: COLLABORATOR + pull-request-review-4: + value: + id: 80 node_id: MDE3OlB1bGxSZXF1ZXN0UmV2aWV3ODA= user: login: octocat @@ -73310,18 +75141,44 @@ components: type: User site_admin: true secret_type: adafruit_io_key + secret_type_display_name: Adafruit IO Key secret: aio_XXXXXXXXXXXXXXXXXXXXXXXXXXXX + push_protection_bypassed_by: + login: monalisa + id: 2 + node_id: MDQ6VXNlcjI= + avatar_url: https://alambic.github.com/avatars/u/2? + gravatar_id: '' + url: https://api.github.com/users/monalisa + html_url: https://github.com/monalisa + followers_url: https://api.github.com/users/monalisa/followers + following_url: https://api.github.com/users/monalisa/following{/other_user} + gists_url: https://api.github.com/users/monalisa/gists{/gist_id} + starred_url: https://api.github.com/users/monalisa/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/monalisa/subscriptions + organizations_url: https://api.github.com/users/monalisa/orgs + repos_url: https://api.github.com/users/monalisa/repos + events_url: https://api.github.com/users/monalisa/events{/privacy} + received_events_url: https://api.github.com/users/monalisa/received_events + type: User + site_admin: true + push_protection_bypassed: true + push_protection_bypassed_at: '2020-11-06T21:48:51Z' - number: 1 created_at: '2020-11-06T18:18:30Z' url: https://api.github.com/repos/owner/repo/secret-scanning/alerts/1 html_url: https://github.com/owner/repo/security/secret-scanning/1 locations_url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/1/locations state: open - resolution: - resolved_at: - resolved_by: + resolution: + resolved_at: + resolved_by: secret_type: mailchimp_api_key + secret_type_display_name: Mailchimp API Key secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2 + push_protection_bypassed_by: + push_protection_bypassed: false + push_protection_bypassed_at: secret-scanning-alert-open: value: number: 42 @@ -73330,11 +75187,10 @@ components: html_url: https://github.com/owner/private-repo/security/secret-scanning/42 locations_url: https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations state: open - resolution: - resolved_at: - resolved_by: secret_type: mailchimp_api_key + secret_type_display_name: Mailchimp API Key secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2 + push_protection_bypassed: false secret-scanning-alert-resolved: value: number: 42 @@ -73365,7 +75221,9 @@ components: type: User site_admin: true secret_type: mailchimp_api_key + secret_type_display_name: Mailchimp API Key secret: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2 + push_protection_bypassed: false secret-scanning-location-list: value: - type: commit @@ -73643,7 +75501,7 @@ components: value: subscribed: true ignored: false - reason: + reason: created_at: '2012-10-06T21:34:12Z' url: https://api.github.com/repos/octocat/example/subscription repository_url: https://api.github.com/repos/octocat/example @@ -73651,7 +75509,7 @@ components: value: subscribed: true ignored: false - reason: + reason: created_at: '2012-10-06T21:34:12Z' url: https://api.github.com/repos/octocat/example/subscription repository_url: https://api.github.com/repos/octocat/example @@ -73664,6 +75522,13 @@ components: zipball_url: https://github.com/octocat/Hello-World/zipball/v0.1 tarball_url: https://github.com/octocat/Hello-World/tarball/v0.1 node_id: MDQ6VXNlcjE= + tag-protection-items: + value: + - id: 2 + pattern: v1.* + tag-protection: + value: + enabled: true topic: value: names: @@ -73671,162 +75536,6 @@ components: - atom - electron - api - clone-traffic: - value: - count: 173 - uniques: 128 - clones: - - timestamp: '2016-10-10T00:00:00Z' - count: 2 - uniques: 1 - - timestamp: '2016-10-11T00:00:00Z' - count: 17 - uniques: 16 - - timestamp: '2016-10-12T00:00:00Z' - count: 21 - uniques: 15 - - timestamp: '2016-10-13T00:00:00Z' - count: 8 - uniques: 7 - - timestamp: '2016-10-14T00:00:00Z' - count: 5 - uniques: 5 - - timestamp: '2016-10-15T00:00:00Z' - count: 2 - uniques: 2 - - timestamp: '2016-10-16T00:00:00Z' - count: 8 - uniques: 7 - - timestamp: '2016-10-17T00:00:00Z' - count: 26 - uniques: 15 - - timestamp: '2016-10-18T00:00:00Z' - count: 19 - uniques: 17 - - timestamp: '2016-10-19T00:00:00Z' - count: 19 - uniques: 14 - - timestamp: '2016-10-20T00:00:00Z' - count: 19 - uniques: 15 - - timestamp: '2016-10-21T00:00:00Z' - count: 9 - uniques: 7 - - timestamp: '2016-10-22T00:00:00Z' - count: 5 - uniques: 5 - - timestamp: '2016-10-23T00:00:00Z' - count: 6 - uniques: 5 - - timestamp: '2016-10-24T00:00:00Z' - count: 7 - uniques: 5 - content-traffic-items: - value: - - path: "/github/hubot" - title: 'github/hubot: A customizable life embetterment robot.' - count: 3542 - uniques: 2225 - - path: "/github/hubot/blob/master/docs/scripting.md" - title: hubot/scripting.md at master · github/hubot · GitHub - count: 1707 - uniques: 804 - - path: "/github/hubot/tree/master/docs" - title: hubot/docs at master · github/hubot · GitHub - count: 685 - uniques: 435 - - path: "/github/hubot/tree/master/src" - title: hubot/src at master · github/hubot · GitHub - count: 577 - uniques: 347 - - path: "/github/hubot/blob/master/docs/index.md" - title: hubot/index.md at master · github/hubot · GitHub - count: 379 - uniques: 259 - - path: "/github/hubot/blob/master/docs/adapters.md" - title: hubot/adapters.md at master · github/hubot · GitHub - count: 354 - uniques: 201 - - path: "/github/hubot/tree/master/examples" - title: hubot/examples at master · github/hubot · GitHub - count: 340 - uniques: 260 - - path: "/github/hubot/blob/master/docs/deploying/heroku.md" - title: hubot/heroku.md at master · github/hubot · GitHub - count: 324 - uniques: 217 - - path: "/github/hubot/blob/master/src/robot.coffee" - title: hubot/robot.coffee at master · github/hubot · GitHub - count: 293 - uniques: 191 - - path: "/github/hubot/blob/master/LICENSE.md" - title: hubot/LICENSE.md at master · github/hubot · GitHub - count: 281 - uniques: 222 - referrer-traffic-items: - value: - - referrer: Google - count: 4 - uniques: 3 - - referrer: stackoverflow.com - count: 2 - uniques: 2 - - referrer: eggsonbread.com - count: 1 - uniques: 1 - - referrer: yandex.ru - count: 1 - uniques: 1 - view-traffic: - value: - count: 14850 - uniques: 3782 - views: - - timestamp: '2016-10-10T00:00:00Z' - count: 440 - uniques: 143 - - timestamp: '2016-10-11T00:00:00Z' - count: 1308 - uniques: 414 - - timestamp: '2016-10-12T00:00:00Z' - count: 1486 - uniques: 452 - - timestamp: '2016-10-13T00:00:00Z' - count: 1170 - uniques: 401 - - timestamp: '2016-10-14T00:00:00Z' - count: 868 - uniques: 266 - - timestamp: '2016-10-15T00:00:00Z' - count: 495 - uniques: 157 - - timestamp: '2016-10-16T00:00:00Z' - count: 524 - uniques: 175 - - timestamp: '2016-10-17T00:00:00Z' - count: 1263 - uniques: 412 - - timestamp: '2016-10-18T00:00:00Z' - count: 1402 - uniques: 417 - - timestamp: '2016-10-19T00:00:00Z' - count: 1394 - uniques: 424 - - timestamp: '2016-10-20T00:00:00Z' - count: 1492 - uniques: 448 - - timestamp: '2016-10-21T00:00:00Z' - count: 1153 - uniques: 332 - - timestamp: '2016-10-22T00:00:00Z' - count: 566 - uniques: 168 - - timestamp: '2016-10-23T00:00:00Z' - count: 675 - uniques: 184 - - timestamp: '2016-10-24T00:00:00Z' - count: 614 - uniques: 237 minimal-repository: value: id: 1296269 @@ -73899,7 +75608,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -73998,7 +75707,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks svn_url: https://svn.github.com/octocat/Hello-World-Template homepage: https://github.com - language: + language: forks: 9 forks_count: 9 stargazers_count: 80 @@ -74117,7 +75826,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 forks: 9 stargazers_count: 80 @@ -74236,7 +75945,7 @@ components: - schemas: - urn:ietf:params:scim:schemas:core:2.0:Group id: abcd27f8-a9aa-11ea-8221-f59b2be9cccc - externalId: + externalId: displayName: octo-org members: - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc @@ -74253,7 +75962,7 @@ components: - schemas: - urn:ietf:params:scim:schemas:core:2.0:Group id: 5e75bbbb-aa1a-11ea-8644-75ff655cdddd - externalId: + externalId: displayName: octo-docs-org members: - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc @@ -74269,7 +75978,7 @@ components: schemas: - urn:ietf:params:scim:schemas:core:2.0:Group id: abcd27f8-a9aa-11ea-8221-f59b2be9cccc - externalId: + externalId: displayName: octo-org members: - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc @@ -74288,7 +75997,7 @@ components: schemas: - urn:ietf:params:scim:schemas:core:2.0:Group id: abcd27f8-a9aa-11ea-8221-f59b2be9cccc - externalId: + externalId: displayName: octo-org members: - value: 92b58aaa-a1d6-11ea-8227-b9ce9e023ccc @@ -74392,103 +76101,6 @@ components: created: '2017-03-09T16:11:13-05:00' lastModified: '2017-03-09T16:11:13-05:00' location: https://api.github.com/scim/v2/enterprises/octo-corp/Users/92b58aaa-a1d6-11ea-8227-b9ce9e023ccc - scim-user-list-response-with-filter: - summary: Response with filter - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: 1 - itemsPerPage: 1 - startIndex: 1 - Resources: - - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - id: 5fc0c238-1112-11e8-8e45-920c87bdbd75 - externalId: 00u1dhhb1fkIGP7RL1d8 - userName: octocat@github.com - displayName: Mona Octocat - name: - givenName: Mona - familyName: Octocat - formatted: Mona Octocat - emails: - - value: octocat@github.com - primary: true - active: true - meta: - resourceType: User - created: '2018-02-13T15:05:24.000-08:00' - lastModified: '2018-02-13T15:05:55.000-08:00' - location: https://api.github.com/scim/v2/organizations/octo-org/Users/5fc0c238-1112-11e8-8e45-920c87bdbd75 - scim-user-list-response-without-filter: - summary: Response without filter - value: - schemas: - - urn:ietf:params:scim:api:messages:2.0:ListResponse - totalResults: 2 - itemsPerPage: 2 - startIndex: 1 - Resources: - - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - id: edefdfedf-050c-11e7-8d32 - externalId: a7d0f98382 - userName: mona.octocat@okta.example.com - displayName: Mona Octocat - name: - givenName: Mona - familyName: Octocat - formatted: Mona Octocat - emails: - - value: mona.octocat@okta.example.com - primary: true - active: true - meta: - resourceType: User - created: '2017-03-09T16:11:13-05:00' - lastModified: '2017-03-09T16:11:13-05:00' - location: https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32 - - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - id: 77563764-eb6-24-0598234-958243 - externalId: sdfoiausdofiua - userName: hubot@example.com - displayName: hu bot - name: - givenName: hu - familyName: bot - formatted: hu bot - emails: - - value: hubot@example.com - primary: true - active: true - meta: - resourceType: User - created: '2017-03-09T16:11:13-05:00' - lastModified: '2017-03-09T16:11:13-05:00' - location: https://api.github.com/scim/v2/organizations/octo-org/Users/77563764-eb6-24-0598234-958243 - scim-user: - value: - schemas: - - urn:ietf:params:scim:schemas:core:2.0:User - id: edefdfedf-050c-11e7-8d32 - externalId: a7d0f98382 - userName: mona.octocat@okta.example.com - displayName: Monalisa Octocat - name: - givenName: Monalisa - familyName: Octocat - formatted: Monalisa Octocat - emails: - - value: mona.octocat@okta.example.com - primary: true - - value: monalisa@octocat.github.com - active: true - meta: - resourceType: User - created: '2017-03-09T16:11:13-05:00' - lastModified: '2017-03-09T16:11:13-05:00' - location: https://api.github.com/scim/v2/organizations/octo-org/Users/edefdfedf-050c-11e7-8d32 code-search-result-item-paginated: value: total_count: 7 @@ -74722,7 +76334,7 @@ components: name: bug color: ff0000 state: open - assignee: + assignee: milestone: url: https://api.github.com/repos/octocat/Hello-World/milestones/1 html_url: https://github.com/octocat/Hello-World/milestones/v1.0 @@ -74761,7 +76373,7 @@ components: comments: 15 created_at: '2009-07-12T20:10:41Z' updated_at: '2009-07-19T09:23:43Z' - closed_at: + closed_at: pull_request: url: https://api/github.com/repos/octocat/Hello-World/pull/1347 html_url: https://github.com/octocat/Hello-World/pull/1347 @@ -74771,6 +76383,7 @@ components: score: 1 locked: true author_association: COLLABORATOR + state_reason: completed label-search-result-item-paginated: value: total_count: 2 @@ -75009,6 +76622,172 @@ components: starred_url: https://api.github.com/users/mojombo/starred{/owner}{/repo} events_url: https://api.github.com/users/mojombo/events{/privacy} site_admin: true + configuration-status: + value: + status: running + progress: + - status: DONE + key: Appliance core components + - status: DONE + key: GitHub utilities + - status: DONE + key: GitHub applications + - status: CONFIGURING + key: GitHub services + - status: PENDING + key: Reloading appliance services + maintenance-status: + value: + status: scheduled + scheduled_time: Tuesday, January 22 at 15:34 -0800 + connection_services: + - name: git operations + number: 0 + - name: mysql queries + number: 233 + - name: aqueduct jobs + number: 34 + - name: resque jobs + number: 54 + enterprise-settings: + value: + enterprise: + private_mode: false + public_pages: false + subdomain_isolation: true + signup_enabled: false + github_hostname: ghe.local + identicons_host: dotcom + http_proxy: + auth_mode: default + expire_sessions: false + admin_password: + configuration_id: 1401777404 + configuration_run_count: 4 + avatar: + enabled: false + uri: '' + customer: + name: GitHub + email: stannis@themannis.biz + uuid: af6cac80-e4e1-012e-d822-1231380e52e9 + secret_key_data: | + -----BEGIN PGP PRIVATE KEY BLOCK----- + Version: GnuPG v1.4.10 (GNU/Linux) + + lQcYBE5TCgsBEACk4yHpUcapplebaumBMXYMiLF+nCQ0lxpx... + -----END PGP PRIVATE KEY BLOCK----- + public_key_data: | + -----BEGIN PGP PUBLIC KEY BLOCK----- + Version: GnuPG v1.4.10 (GNU/Linux) + + mI0ETqzZYgEEALSe6snowdenXyqvLfSQ34HWD6C7.... + -----END PGP PUBLIC KEY BLOCK----- + license: + seats: 0 + evaluation: false + perpetual: false + unlimited_seating: true + support_key: ssh-rsa AAAAB3N.... + ssh_allowed: true + cluster_support: false + expire_at: '2016-04-27T00:00:00-07:00' + github_ssl: + enabled: false + cert: + key: + ldap: + host: + port: 0 + base: [] + uid: + bind_dn: + password: + method: Plain + search_strategy: detect + user_groups: [] + admin_group: + virtual_attribute_enabled: false + recursive_group_search: false + posix_support: true + user_sync_emails: false + user_sync_keys: false + user_sync_interval: 4 + team_sync_interval: 4 + sync_enabled: false + reconciliation: + user: + org: + profile: + uid: uid + name: + mail: + key: + cas: + url: + saml: + sso_url: + certificate: + certificate_path: + issuer: + idp_initiated_sso: false + disable_admin_demote: false + github_oauth: + client_id: '12313412' + client_secret: kj123131132 + organization_name: Homestar Runners + organization_team: homestarrunners/characters + smtp: + enabled: true + address: smtp.example.com + authentication: plain + port: '1234' + domain: blah + username: foo + user_name: mr_foo + enable_starttls_auto: true + password: bar + discard-to-noreply-address: true + support_address: enterprise@github.com + support_address_type: email + noreply_address: noreply@github.com + ntp: + primary_server: 0.pool.ntp.org + secondary_server: 1.pool.ntp.org + timezone: + snmp: + enabled: false + community: '' + syslog: + enabled: false + server: + protocol_name: udp + assets: + pages: + enabled: true + collectd: + enabled: false + server: + port: 0 + encryption: + username: + password: + mapping: + enabled: true + tileserver: + basemap: company.map-qsz2zrvs + token: + load_balancer: + run_list: + - recipe[enterprise-configure] + ssh-key-items: + value: + - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB... + pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64 + - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB... + pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64 + - key: ssh-rsa AAAAB3NzaC1yc2EAAAAB... + pretty-print: ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64 team-repository-alternative-response-with-extra-repository-information: value: id: 1296269 @@ -75081,7 +76860,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -75111,710 +76890,267 @@ components: push: false triage: false pull: true - role_name: read - allow_rebase_merge: true - template_repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World-Template - full_name: octocat/Hello-World-Template - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World-Template - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World-Template - archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads - events_url: https://api.github.com/repos/octocat/Hello-World-Template/events - forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World-Template.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages - merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} - ssh_url: git@github.com:octocat/Hello-World-Template.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags - teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams - trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World-Template.git - mirror_url: git:git.example.com/octocat/Hello-World-Template - hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks - svn_url: https://svn.github.com/octocat/Hello-World-Template - homepage: https://github.com - language: - forks: 9 - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - watchers: 80 - size: 108 - default_branch: master - open_issues: 0 - open_issues_count: 0 - is_template: true - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - pull: true - triage: false - push: false - maintain: false - admin: false - allow_rebase_merge: true - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - forks: 1 - open_issues: 1 - watchers: 1 - group-mapping-2: - value: - groups: - - group_id: '123' - group_name: Octocat admins - group_description: The people who configure your octoworld. - private-user-response-with-public-and-private-profile-information: - summary: Response with public and private profile information - value: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - name: monalisa octocat - company: GitHub - blog: https://github.com/blog - location: San Francisco - email: octocat@github.com - hireable: false - bio: There once was... - twitter_username: monatheoctocat - public_repos: 2 - public_gists: 1 - followers: 20 - following: 0 - created_at: '2008-01-14T04:33:35Z' - updated_at: '2008-01-14T04:33:35Z' - private_gists: 81 - total_private_repos: 100 - owned_private_repos: 100 - disk_usage: 10000 - collaborators: 8 - two_factor_authentication: true - plan: - name: Medium - space: 400 - private_repos: 20 - collaborators: 0 - private-user-response-with-public-profile-information: - summary: Response with public profile information - value: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - name: monalisa octocat - company: GitHub - blog: https://github.com/blog - location: San Francisco - email: octocat@github.com - hireable: false - bio: There once was... - twitter_username: monatheoctocat - public_repos: 2 - public_gists: 1 - followers: 20 - following: 0 - created_at: '2008-01-14T04:33:35Z' - updated_at: '2008-01-14T04:33:35Z' - private-user: - value: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - name: monalisa octocat - company: GitHub - blog: https://github.com/blog - location: San Francisco - email: octocat@github.com - hireable: false - bio: There once was... - twitter_username: monatheoctocat - public_repos: 2 - public_gists: 1 - followers: 20 - following: 0 - created_at: '2008-01-14T04:33:35Z' - updated_at: '2008-01-14T04:33:35Z' - private_gists: 81 - total_private_repos: 100 - owned_private_repos: 100 - disk_usage: 10000 - collaborators: 8 - two_factor_authentication: true - plan: - name: Medium - space: 400 - private_repos: 20 - collaborators: 0 - codespaces-list: - value: - total_count: 3 - codespaces: - - id: 1 - name: monalisa-octocat-hello-world-g4wpq6h95q - environment_id: 26a7c758-7299-4a73-b978-5a92a7ae98a0 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer/devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-g4wpq6h95q.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-g4wpq6h95q/stop - recent_folders: [] - - id: 1 - name: monalisa-octocat-hello-world-3f89ada1j3 - environment_id: 526ce4d7-46da-494f-a4f9-cfd25b818719 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer/foobar/devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3 - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-3f89ada1j3.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-3f89ada1j3/stop - recent_folders: [] - - id: 1 - name: monalisa-octocat-hello-world-f8adfad99a - environment_id: 6ac8cd6d-a2d0-4ae3-8cea-e135059264df - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - billable_owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - repository: - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - hooks_url: http://api.github.com/repos/octocat/Hello-World/hooks - machine: - name: standardLinux - display_name: 4 cores, 8 GB RAM, 64 GB storage - operating_system: linux - storage_in_bytes: 68719476736 - memory_in_bytes: 8589934592 - cpus: 4 - prebuild: false - devcontainer_path: ".devcontainer.json" - created_at: '2021-10-14T00:53:30-06:00' - updated_at: '2021-10-14T00:53:32-06:00' - last_used_at: '2021-10-14T00:53:30-06:00' - state: Available - url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-f8adfad99a - git_status: - ahead: 0 - behind: 0 - has_unpushed_changes: false - has_uncommitted_changes: false - ref: main - location: WestUs2 - idle_timeout_minutes: 60 - web_url: https://monalisa-octocat-hello-world-f8adfad99a.github.dev - machines_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-f8adfad99a/machines - start_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-f8adfad99a/start - stop_url: https://api.github.com/user/codespaces/monalisa-octocat-hello-world-f8adfad99a/stop - recent_folders: [] - codespaces-user-public-key: - value: - key_id: '012345678912345678' - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234 - user-codespaces-secret: + role_name: read + allow_rebase_merge: true + template_repository: + id: 1296269 + node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 + name: Hello-World-Template + full_name: octocat/Hello-World-Template + owner: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + private: false + html_url: https://github.com/octocat/Hello-World-Template + description: This your first repo! + fork: false + url: https://api.github.com/repos/octocat/Hello-World-Template + archive_url: https://api.github.com/repos/octocat/Hello-World-Template/{archive_format}{/ref} + assignees_url: https://api.github.com/repos/octocat/Hello-World-Template/assignees{/user} + blobs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/blobs{/sha} + branches_url: https://api.github.com/repos/octocat/Hello-World-Template/branches{/branch} + collaborators_url: https://api.github.com/repos/octocat/Hello-World-Template/collaborators{/collaborator} + comments_url: https://api.github.com/repos/octocat/Hello-World-Template/comments{/number} + commits_url: https://api.github.com/repos/octocat/Hello-World-Template/commits{/sha} + compare_url: https://api.github.com/repos/octocat/Hello-World-Template/compare/{base}...{head} + contents_url: https://api.github.com/repos/octocat/Hello-World-Template/contents/{+path} + contributors_url: https://api.github.com/repos/octocat/Hello-World-Template/contributors + deployments_url: https://api.github.com/repos/octocat/Hello-World-Template/deployments + downloads_url: https://api.github.com/repos/octocat/Hello-World-Template/downloads + events_url: https://api.github.com/repos/octocat/Hello-World-Template/events + forks_url: https://api.github.com/repos/octocat/Hello-World-Template/forks + git_commits_url: https://api.github.com/repos/octocat/Hello-World-Template/git/commits{/sha} + git_refs_url: https://api.github.com/repos/octocat/Hello-World-Template/git/refs{/sha} + git_tags_url: https://api.github.com/repos/octocat/Hello-World-Template/git/tags{/sha} + git_url: git:github.com/octocat/Hello-World-Template.git + issue_comment_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/comments{/number} + issue_events_url: https://api.github.com/repos/octocat/Hello-World-Template/issues/events{/number} + issues_url: https://api.github.com/repos/octocat/Hello-World-Template/issues{/number} + keys_url: https://api.github.com/repos/octocat/Hello-World-Template/keys{/key_id} + labels_url: https://api.github.com/repos/octocat/Hello-World-Template/labels{/name} + languages_url: https://api.github.com/repos/octocat/Hello-World-Template/languages + merges_url: https://api.github.com/repos/octocat/Hello-World-Template/merges + milestones_url: https://api.github.com/repos/octocat/Hello-World-Template/milestones{/number} + notifications_url: https://api.github.com/repos/octocat/Hello-World-Template/notifications{?since,all,participating} + pulls_url: https://api.github.com/repos/octocat/Hello-World-Template/pulls{/number} + releases_url: https://api.github.com/repos/octocat/Hello-World-Template/releases{/id} + ssh_url: git@github.com:octocat/Hello-World-Template.git + stargazers_url: https://api.github.com/repos/octocat/Hello-World-Template/stargazers + statuses_url: https://api.github.com/repos/octocat/Hello-World-Template/statuses/{sha} + subscribers_url: https://api.github.com/repos/octocat/Hello-World-Template/subscribers + subscription_url: https://api.github.com/repos/octocat/Hello-World-Template/subscription + tags_url: https://api.github.com/repos/octocat/Hello-World-Template/tags + teams_url: https://api.github.com/repos/octocat/Hello-World-Template/teams + trees_url: https://api.github.com/repos/octocat/Hello-World-Template/git/trees{/sha} + clone_url: https://github.com/octocat/Hello-World-Template.git + mirror_url: git:git.example.com/octocat/Hello-World-Template + hooks_url: https://api.github.com/repos/octocat/Hello-World-Template/hooks + svn_url: https://svn.github.com/octocat/Hello-World-Template + homepage: https://github.com + language: + forks: 9 + forks_count: 9 + stargazers_count: 80 + watchers_count: 80 + watchers: 80 + size: 108 + default_branch: master + open_issues: 0 + open_issues_count: 0 + is_template: true + license: + key: mit + name: MIT License + url: https://api.github.com/licenses/mit + spdx_id: MIT + node_id: MDc6TGljZW5zZW1pdA== + html_url: https://api.github.com/licenses/mit + topics: + - octocat + - atom + - electron + - api + has_issues: true + has_projects: true + has_wiki: true + has_pages: false + has_downloads: true + archived: false + disabled: false + visibility: public + pushed_at: '2011-01-26T19:06:43Z' + created_at: '2011-01-26T19:01:12Z' + updated_at: '2011-01-26T19:14:43Z' + permissions: + pull: true + triage: false + push: false + maintain: false + admin: false + allow_rebase_merge: true + temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O + allow_squash_merge: true + allow_auto_merge: false + delete_branch_on_merge: true + allow_merge_commit: true + subscribers_count: 42 + network_count: 0 + temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O + allow_squash_merge: true + allow_auto_merge: false + delete_branch_on_merge: true + allow_merge_commit: true + subscribers_count: 42 + network_count: 0 + license: + key: mit + name: MIT License + url: https://api.github.com/licenses/mit + spdx_id: MIT + node_id: MDc6TGljZW5zZW1pdA== + html_url: https://api.github.com/licenses/mit + forks: 1 + open_issues: 1 + watchers: 1 + private-user-response-with-public-and-private-profile-information: + summary: Response with public and private profile information value: - name: CODESPACE_GH_SECRET - created_at: '2019-08-10T14:59:22Z' - updated_at: '2020-01-10T14:59:22Z' - visibility: selected - selected_repositories_url: https://api.github.com/user/codespaces/secrets/CODESPACE_GH_SECRET/repositories - user-export-details: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + name: monalisa octocat + company: GitHub + blog: https://github.com/blog + location: San Francisco + email: octocat@github.com + hireable: false + bio: There once was... + public_repos: 2 + public_gists: 1 + followers: 20 + following: 0 + created_at: '2008-01-14T04:33:35Z' + updated_at: '2008-01-14T04:33:35Z' + private_gists: 81 + total_private_repos: 100 + owned_private_repos: 100 + disk_usage: 10000 + collaborators: 8 + two_factor_authentication: true + plan: + name: Medium + space: 400 + private_repos: 20 + collaborators: 0 + private-user-response-with-public-profile-information: + summary: Response with public profile information value: - state: succeeded - completed_at: '2022-01-01T14:59:22Z' - branch: codespace-monalisa-octocat-hello-world-g4wpq6h95q - sha: fd95a81ca01e48ede9f39c799ecbcef817b8a3b2 - id: latest - export_url: https://api.github.com/user/codespaces/:name/exports/latest - email-items-3: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + name: monalisa octocat + company: GitHub + blog: https://github.com/blog + location: San Francisco + email: octocat@github.com + hireable: false + bio: There once was... + public_repos: 2 + public_gists: 1 + followers: 20 + following: 0 + created_at: '2008-01-14T04:33:35Z' + updated_at: '2008-01-14T04:33:35Z' + private-user: value: - - email: octocat@github.com - primary: true - verified: true - visibility: private + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + name: monalisa octocat + company: GitHub + blog: https://github.com/blog + location: San Francisco + email: octocat@github.com + hireable: false + bio: There once was... + public_repos: 2 + public_gists: 1 + followers: 20 + following: 0 + created_at: '2008-01-14T04:33:35Z' + updated_at: '2008-01-14T04:33:35Z' + private_gists: 81 + total_private_repos: 100 + owned_private_repos: 100 + disk_usage: 10000 + collaborators: 8 + two_factor_authentication: true + plan: + name: Medium + space: 400 + private_repos: 20 + collaborators: 0 email-items-2: value: - email: octocat@github.com @@ -75830,19 +77166,20 @@ components: - email: octocat@github.com primary: false verified: false - visibility: + visibility: - email: mona@github.com primary: false verified: false - visibility: + visibility: gpg-key-items: value: - id: 3 + name: Octocat's GPG Key primary_key_id: 2 key_id: 3262EFF25BA0D270 public_key: xsBNBFayYZ... emails: - - email: mastahyeti@users.noreply.github.com + - email: octocat@users.noreply.github.com verified: true subkeys: - id: 4 @@ -75857,21 +77194,24 @@ components: can_certify: false created_at: '2016-03-24T11:31:04-06:00' expires_at: '2016-03-24T11:31:04-07:00' + revoked: false can_sign: true can_encrypt_comms: false can_encrypt_storage: false can_certify: true created_at: '2016-03-24T11:31:04-06:00' expires_at: '2016-03-24T11:31:04-07:00' + revoked: false raw_key: string gpg-key: value: id: 3 + name: Octocat's GPG Key primary_key_id: 2 key_id: 3262EFF25BA0D270 public_key: xsBNBFayYZ... emails: - - email: mastahyeti@users.noreply.github.com + - email: octocat@users.noreply.github.com verified: true subkeys: - id: 4 @@ -75886,12 +77226,14 @@ components: can_certify: false created_at: '2016-03-24T11:31:04-06:00' expires_at: '2016-03-24T11:31:04-07:00' + revoked: false can_sign: true can_encrypt_comms: false can_encrypt_storage: false can_certify: true created_at: '2016-03-24T11:31:04-06:00' expires_at: '2016-03-24T11:31:04-07:00' + revoked: false raw_key: '"-----BEGIN PGP PUBLIC KEY BLOCK-----\nVersion: GnuPG v2\n\nmQENBFayYZ0BCAC4hScoJXXpyR+MXGcrBxElqw3FzCVvkViuyeko+Jp76QJhg8kr\nucRTxbnOoHfda/FmilEa/wxf9ch5/PSrrL26FxEoPHhJolp8fnIDLQeITn94NYdB\nZtnnEKslpPrG97qSUWIchvyqCPtvOb8+8fWvGx9K/ZWcEEdh1X8+WFR2jMENMeoX\nwxHWQoPnS7LpX/85/M7VUcJxvDVfv+eHsnQupmE5bGarKNih0oMe3LbdN3qA5PTz\nSCm6Iudar1VsQ+xTz08ymL7t4pnEtLguQ7EyatFHCjxNblv5RzxoL0tDgN3HqoDz\nc7TEA+q4RtDQl9amcvQ95emnXmZ974u7UkYdABEBAAG0HlNvbWUgVXNlciA8c29t\nZXVzZXJAZ21haWwuY29tPokBOAQTAQIAIgUCVrJhnQIbAwYLCQgHAwIGFQgCCQoL\nBBYCAwECHgECF4AACgkQMmLv8lug0nAViQgArWjI55+7p48URr2z9Jvak+yrBTx1\nzkufltQAnHTJkq+Kl9dySSmTnOop8o3rE4++IOpYV5Y36PkKf9EZMk4n1RQiDPKE\nAFtRVTkRaoWzOir9KQXJPfhKrl01j/QzY+utfiMvUoBJZ9ybq8Pa885SljW9lbaX\nIYw+hl8ZdJ2KStvGrEyfQvRyq3aN5c9TV//4BdGnwx7Qabq/U+G18lizG6f/yq15\ned7t0KELaCfeKPvytp4VE9/z/Ksah/h3+Qilx07/oG2Ae5kC1bEC9coD/ogPUhbv\nb2bsBIoY9E9YwsLoif2lU+o1t76zLgUktuNscRRUKobW028H1zuFS/XQhrkBDQRW\nsmGdAQgApnyyv3i144OLYy0O4UKQxd3e10Y3WpDwfnGIBefAI1m7RxnUxBag/DsU\n7gi9qLEC4VHSfq4eiNfr1LJOyCL2edTgCWFgBhVjbXjZe6YAOrAnhxwCErnN0Y7N\n6s8wVh9fObSOyf8ZE6G7JeKpcq9Q6gd/KxagfD48a1v+fyRHpyQc6J9pUEmtrDJ7\nBjmsd2VWzLBvNWdHyxDNtZweIaqIO9VUYYpr1mtTliNBOZLUelmgrt7HBRcJpWMA\nS8muVVbuP5MK0trLBq/JB8qUH3zRzB/PhMgzmkIfjEK1VYDWm4E8DYyTWEJcHqkb\neqFsNjrIlwPaA122BWC6gUOPwwH+oQARAQABiQEfBBgBAgAJBQJWsmGdAhsMAAoJ\nEDJi7/JboNJwAyAIALd4xcdmGbZD98gScJzqwzkOMcO8zFHqHNvJ42xIFvGny7c0\n1Rx7iyrdypOby5AxE+viQcjG4rpLZW/xKYBNGrCfDyQO7511I0v8x20EICMlMfD/\nNrWQCzesEPcUlKTP07d+sFyP8AyseOidbzY/92CpskTgdSBjY/ntLSaoknl/fjJE\nQM8OkPqU7IraO1Jzzdnm20d5PZL9+PIwIWdSTedU/vBMTJyNcoqvSfKf1wNC66XP\nhqfYgXJE564AdWZKA3C0IyCqiv+LHwxLnUHio1a4/r91C8KPzxs6tGxRDjXLd7ms\nuYFGWymiUGOE/giHlcxdYcHzwLnPDliMQOLiTkK5AQ0EVuxMygEIAOD+bW1cDTmE\nBxh5JECoqeHuwgl6DlLhnubWPkQ4ZeRzBRAsFcEJQlwlJjrzFDicL+lnm6Qq4tt0\n560TwHdf15/AKTZIZu7H25axvGNzgeaUkJEJdYAq9zTKWwX7wKyzBszi485nQg97\nMfAqwhMpDW0Qqf8+7Ug+WEmfBSGv9uL3aQC6WEeIsHfri0n0n8v4XgwhfShXguxO\nCsOztEsuW7WWKW9P4TngKKv4lCHdPlV6FwxeMzODBJvc2fkHVHnqc0PqszJ5xcF8\n6gZCpMM027SbpeYWCAD5zwJyYP9ntfO1p2HjnQ1dZaP9FeNcO7uIV1Lnd1eGCu6I\nsrVp5k1f3isAEQEAAYkCPgQYAQIACQUCVuxMygIbAgEpCRAyYu/yW6DScMBdIAQZ\nAQIABgUCVuxMygAKCRCKohN4dhq2b4tcCACHxmOHVXNpu47OvUGYQydLgMACUlXN\nlj+HfE0VReqShxdDmpasAY9IRpuMB2RsGK8GbNP+4SlOlAiPf5SMhS7nZNkNDgQQ\naZ3HFpgrFmFwmE10BKT4iQtoxELLM57z0qGOAfTsEjWFQa4sF+6IHAQR/ptkdkkI\nBUEXiMnAwVwBysLIJiLO8qdjB6qp52QkT074JVrwywT/P+DkMfC2k4r/AfEbf6eF\ndmPDuPk6KD87+hJZsSa5MaMUBQVvRO/mgEkhJRITVu58eWGaBOcQJ8gqurhCqM5P\nDfUA4TJ7wiqM6sS764vV1rOioTTXkszzhClQqET7hPVnVQjenYgv0EZHNyQH/1f1\n/CYqvV1vFjM9vJjMbxXsATCkZe6wvBVKD8vLsJAr8N+onKQz+4OPc3kmKq7aESu3\nCi/iuie5KKVwnuNhr9AzT61vEkKxwHcVFEvHB77F6ZAAInhRvjzmQbD2dlPLLQCC\nqDj71ODSSAPTEmUy6969bgD9PfWei7kNkBIx7s3eBv8yzytSc2EcuUgopqFazquw\nFs1+tqGHjBvQfTo6bqbJjp/9Ci2pvde3ElV2rAgUlb3lqXyXjRDqrXosh5GcRPQj\nK8Nhj1BNhnrCVskE4BP0LYbOHuzgm86uXwGCFsY+w2VOsSm16Jx5GHyG5S5WU3+D\nIts/HFYRLiFgDLmTlxo=\n=+OzK\n-----END PGP PUBLIC KEY BLOCK-----"' base-installation-for-auth-user-paginated: @@ -75940,8 +77282,8 @@ components: created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' app_slug: github-actions - suspended_at: - suspended_by: + suspended_at: + suspended_by: - id: 3 account: login: octocat @@ -75984,13 +77326,8 @@ components: created_at: '2017-07-08T16:18:44-04:00' updated_at: '2017-07-08T16:18:44-04:00' app_slug: github-actions - suspended_at: - suspended_by: - interaction-limit-user: - value: - limit: collaborators_only - origin: user - expires_at: '2018-08-17T04:18:39Z' + suspended_at: + suspended_by: key-items: value: - key: 2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234 @@ -76016,38 +77353,6 @@ components: created_at: '2020-06-11T21:31:57Z' verified: false read_only: false - user-marketplace-purchase-items: - value: - - billing_cycle: monthly - next_billing_date: '2017-11-11T00:00:00Z' - unit_count: - on_free_trial: true - free_trial_ends_on: '2017-11-11T00:00:00Z' - updated_at: '2017-11-02T01:12:12Z' - account: - login: github - id: 4 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= - url: https://api.github.com/orgs/github - email: - organization_billing_email: billing@github.com - type: Organization - plan: - url: https://api.github.com/marketplace_listing/plans/1313 - accounts_url: https://api.github.com/marketplace_listing/plans/1313/accounts - id: 1313 - number: 3 - name: Pro - description: A professional-grade CI solution - monthly_price_in_cents: 1099 - yearly_price_in_cents: 11870 - price_model: flat-rate - has_free_trial: true - unit_name: - state: published - bullets: - - Up to 25 private repositories - - 11 concurrent builds org-membership-items: value: - url: https://api.github.com/orgs/octocat/memberships/defunkt @@ -76109,249 +77414,98 @@ components: node_id: MDQ6VXNlcjE= avatar_url: https://github.com/images/error/octocat_happy.gif gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - org-membership: - value: - url: https://api.github.com/orgs/invitocat/memberships/defunkt - state: pending - role: admin - organization_url: https://api.github.com/orgs/invitocat - organization: - login: github - id: 1 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= - url: https://api.github.com/orgs/github - repos_url: https://api.github.com/orgs/github/repos - events_url: https://api.github.com/orgs/github/events - hooks_url: https://api.github.com/orgs/github/hooks - issues_url: https://api.github.com/orgs/github/issues - members_url: https://api.github.com/orgs/github/members{/member} - public_members_url: https://api.github.com/orgs/github/public_members{/member} - avatar_url: https://github.com/images/error/octocat_happy.gif - description: A great organization - user: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - org-membership-2: - value: - url: https://api.github.com/orgs/octocat/memberships/defunkt - state: active - role: admin - organization_url: https://api.github.com/orgs/octocat - organization: - login: github - id: 1 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= - url: https://api.github.com/orgs/github - repos_url: https://api.github.com/orgs/github/repos - events_url: https://api.github.com/orgs/github/events - hooks_url: https://api.github.com/orgs/github/hooks - issues_url: https://api.github.com/orgs/github/issues - members_url: https://api.github.com/orgs/github/members{/member} - public_members_url: https://api.github.com/orgs/github/public_members{/member} - avatar_url: https://github.com/images/error/octocat_happy.gif - description: A great organization - user: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - migration-items: - value: - - id: 79 - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - guid: 0b989ba4-242f-11e5-81e1-c7b6966d2516 - state: pending - lock_repositories: true - exclude_attachments: false - exclude_releases: false - exclude_owner_projects: false - repositories: - - id: 1296269 - node_id: MDEwOlJlcG9zaXRvcnkxMjk2MjY5 - name: Hello-World - full_name: octocat/Hello-World - owner: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - private: false - html_url: https://github.com/octocat/Hello-World - description: This your first repo! - fork: false - url: https://api.github.com/repos/octocat/Hello-World - archive_url: https://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref} - assignees_url: https://api.github.com/repos/octocat/Hello-World/assignees{/user} - blobs_url: https://api.github.com/repos/octocat/Hello-World/git/blobs{/sha} - branches_url: https://api.github.com/repos/octocat/Hello-World/branches{/branch} - collaborators_url: https://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator} - comments_url: https://api.github.com/repos/octocat/Hello-World/comments{/number} - commits_url: https://api.github.com/repos/octocat/Hello-World/commits{/sha} - compare_url: https://api.github.com/repos/octocat/Hello-World/compare/{base}...{head} - contents_url: https://api.github.com/repos/octocat/Hello-World/contents/{+path} - contributors_url: https://api.github.com/repos/octocat/Hello-World/contributors - deployments_url: https://api.github.com/repos/octocat/Hello-World/deployments - downloads_url: https://api.github.com/repos/octocat/Hello-World/downloads - events_url: https://api.github.com/repos/octocat/Hello-World/events - forks_url: https://api.github.com/repos/octocat/Hello-World/forks - git_commits_url: https://api.github.com/repos/octocat/Hello-World/git/commits{/sha} - git_refs_url: https://api.github.com/repos/octocat/Hello-World/git/refs{/sha} - git_tags_url: https://api.github.com/repos/octocat/Hello-World/git/tags{/sha} - git_url: git:github.com/octocat/Hello-World.git - issue_comment_url: https://api.github.com/repos/octocat/Hello-World/issues/comments{/number} - issue_events_url: https://api.github.com/repos/octocat/Hello-World/issues/events{/number} - issues_url: https://api.github.com/repos/octocat/Hello-World/issues{/number} - keys_url: https://api.github.com/repos/octocat/Hello-World/keys{/key_id} - labels_url: https://api.github.com/repos/octocat/Hello-World/labels{/name} - languages_url: https://api.github.com/repos/octocat/Hello-World/languages - merges_url: https://api.github.com/repos/octocat/Hello-World/merges - milestones_url: https://api.github.com/repos/octocat/Hello-World/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating} - pulls_url: https://api.github.com/repos/octocat/Hello-World/pulls{/number} - releases_url: https://api.github.com/repos/octocat/Hello-World/releases{/id} - ssh_url: git@github.com:octocat/Hello-World.git - stargazers_url: https://api.github.com/repos/octocat/Hello-World/stargazers - statuses_url: https://api.github.com/repos/octocat/Hello-World/statuses/{sha} - subscribers_url: https://api.github.com/repos/octocat/Hello-World/subscribers - subscription_url: https://api.github.com/repos/octocat/Hello-World/subscription - tags_url: https://api.github.com/repos/octocat/Hello-World/tags - teams_url: https://api.github.com/repos/octocat/Hello-World/teams - trees_url: https://api.github.com/repos/octocat/Hello-World/git/trees{/sha} - clone_url: https://github.com/octocat/Hello-World.git - mirror_url: git:git.example.com/octocat/Hello-World - hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks - svn_url: https://svn.github.com/octocat/Hello-World - homepage: https://github.com - language: - forks_count: 9 - stargazers_count: 80 - watchers_count: 80 - size: 108 - default_branch: master - open_issues_count: 0 - is_template: true - topics: - - octocat - - atom - - electron - - api - has_issues: true - has_projects: true - has_wiki: true - has_pages: false - has_downloads: true - archived: false - disabled: false - visibility: public - pushed_at: '2011-01-26T19:06:43Z' - created_at: '2011-01-26T19:01:12Z' - updated_at: '2011-01-26T19:14:43Z' - permissions: - admin: false - push: false - pull: true - allow_rebase_merge: true - template_repository: - temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O - allow_squash_merge: true - allow_auto_merge: false - delete_branch_on_merge: true - allow_merge_commit: true - subscribers_count: 42 - network_count: 0 - license: - key: mit - name: MIT License - url: https://api.github.com/licenses/mit - spdx_id: MIT - node_id: MDc6TGljZW5zZW1pdA== - html_url: https://api.github.com/licenses/mit - forks: 1 - open_issues: 1 - watchers: 1 - url: https://api.github.com/orgs/octo-org/migrations/79 - created_at: '2015-07-06T15:33:38-07:00' - updated_at: '2015-07-06T15:33:38-07:00' - node_id: MDQ6VXNlcjE= - migration-2: + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + org-membership: value: - id: 79 - node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/invitocat/memberships/defunkt + state: pending + role: admin + organization_url: https://api.github.com/orgs/invitocat + organization: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + hooks_url: https://api.github.com/orgs/github/hooks + issues_url: https://api.github.com/orgs/github/issues + members_url: https://api.github.com/orgs/github/members{/member} + public_members_url: https://api.github.com/orgs/github/public_members{/member} + avatar_url: https://github.com/images/error/octocat_happy.gif + description: A great organization + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + org-membership-2: + value: + url: https://api.github.com/orgs/octocat/memberships/defunkt + state: active + role: admin + organization_url: https://api.github.com/orgs/octocat + organization: + login: github + id: 1 + node_id: MDEyOk9yZ2FuaXphdGlvbjE= + url: https://api.github.com/orgs/github + repos_url: https://api.github.com/orgs/github/repos + events_url: https://api.github.com/orgs/github/events + hooks_url: https://api.github.com/orgs/github/hooks + issues_url: https://api.github.com/orgs/github/issues + members_url: https://api.github.com/orgs/github/members{/member} + public_members_url: https://api.github.com/orgs/github/public_members{/member} + avatar_url: https://github.com/images/error/octocat_happy.gif + description: A great organization + user: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + migration-items: + value: + - id: 79 owner: login: octocat id: 1 @@ -76448,7 +77602,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -76477,7 +77631,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -76498,7 +77652,8 @@ components: url: https://api.github.com/orgs/octo-org/migrations/79 created_at: '2015-07-06T15:33:38-07:00' updated_at: '2015-07-06T15:33:38-07:00' - migration: + node_id: MDQ6VXNlcjE= + migration-2: value: id: 79 node_id: MDEyOk9yZ2FuaXphdGlvbjE= @@ -76522,7 +77677,7 @@ components: type: User site_admin: false guid: 0b989ba4-242f-11e5-81e1-c7b6966d2516 - state: exported + state: pending lock_repositories: true exclude_attachments: false exclude_releases: false @@ -76598,7 +77753,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -76627,7 +77782,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -76648,198 +77803,6 @@ components: url: https://api.github.com/orgs/octo-org/migrations/79 created_at: '2015-07-06T15:33:38-07:00' updated_at: '2015-07-06T15:33:38-07:00' - packages-for-user: - value: - - id: 197 - name: hello_docker - package_type: container - owner: - login: monalisa - id: 9919 - node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= - avatar_url: https://avatars.monalisausercontent.com/u/9919?v=4 - gravatar_id: '' - url: https://api.github.com/users/monalisa - html_url: https://github.com/github - followers_url: https://api.github.com/users/github/followers - following_url: https://api.github.com/users/github/following{/other_user} - gists_url: https://api.github.com/users/github/gists{/gist_id} - starred_url: https://api.github.com/users/github/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/github/subscriptions - organizations_url: https://api.github.com/users/github/orgs - repos_url: https://api.github.com/users/github/repos - events_url: https://api.github.com/users/github/events{/privacy} - received_events_url: https://api.github.com/users/github/received_events - type: User - site_admin: false - version_count: 1 - visibility: private - url: https://api.github.com/orgs/github/packages/container/hello_docker - created_at: '2020-05-19T22:19:11Z' - updated_at: '2020-05-19T22:19:11Z' - html_url: https://github.com/orgs/github/packages/container/package/hello_docker - - id: 198 - name: goodbye_docker - package_type: container - owner: - login: github - id: 9919 - node_id: MDEyOk9yZ2FuaXphdGlvbjk5MTk= - avatar_url: https://avatars.githubusercontent.com/u/9919?v=4 - gravatar_id: '' - url: https://api.github.com/users/monalisa - html_url: https://github.com/github - followers_url: https://api.github.com/users/github/followers - following_url: https://api.github.com/users/github/following{/other_user} - gists_url: https://api.github.com/users/github/gists{/gist_id} - starred_url: https://api.github.com/users/github/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/github/subscriptions - organizations_url: https://api.github.com/users/github/orgs - repos_url: https://api.github.com/users/github/repos - events_url: https://api.github.com/users/github/events{/privacy} - received_events_url: https://api.github.com/users/github/received_events - type: User - site_admin: false - version_count: 2 - visibility: private - url: https://api.github.com/user/monalisa/packages/container/goodbye_docker - created_at: '2020-05-20T22:19:11Z' - updated_at: '2020-05-20T22:19:11Z' - html_url: https://github.com/user/monalisa/packages/container/package/goodbye_docker - package-user: - value: - id: 40201 - name: octo-name - package_type: rubygems - owner: - login: octocat - id: 209477 - node_id: MDQ6VXNlcjIwOTQ3Nw== - avatar_url: https://avatars.githubusercontent.com/u/209477?v=4 - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: true - version_count: 3 - visibility: public - url: https://api.github.com/users/octocat/packages/rubygems/octo-name - created_at: '2019-10-20T14:17:14Z' - updated_at: '2019-10-20T14:17:14Z' - repository: - id: 216219492 - node_id: MDEwOlJlcG9zaXRvcnkyMTYyMTk0OTI= - name: octo-name-repo - full_name: octocat/octo-name-repo - private: false - owner: - login: octocat - id: 209477 - node_id: MDQ6VXNlcjIwOTQ3Nw== - avatar_url: https://avatars.githubusercontent.com/u/209477?v=4 - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: true - html_url: https://github.com/octocat/octo-name-repo - description: Project for octocats - fork: false - url: https://api.github.com/repos/octocat/octo-name-repo - forks_url: https://api.github.com/repos/octocat/octo-name-repo/forks - keys_url: https://api.github.com/repos/octocat/octo-name-repo/keys{/key_id} - collaborators_url: https://api.github.com/repos/octocat/octo-name-repo/collaborators{/collaborator} - teams_url: https://api.github.com/repos/octocat/octo-name-repo/teams - hooks_url: https://api.github.com/repos/octocat/octo-name-repo/hooks - issue_events_url: https://api.github.com/repos/octocat/octo-name-repo/issues/events{/number} - events_url: https://api.github.com/repos/octocat/octo-name-repo/events - assignees_url: https://api.github.com/repos/octocat/octo-name-repo/assignees{/user} - branches_url: https://api.github.com/repos/octocat/octo-name-repo/branches{/branch} - tags_url: https://api.github.com/repos/octocat/octo-name-repo/tags - blobs_url: https://api.github.com/repos/octocat/octo-name-repo/git/blobs{/sha} - git_tags_url: https://api.github.com/repos/octocat/octo-name-repo/git/tags{/sha} - git_refs_url: https://api.github.com/repos/octocat/octo-name-repo/git/refs{/sha} - trees_url: https://api.github.com/repos/octocat/octo-name-repo/git/trees{/sha} - statuses_url: https://api.github.com/repos/octocat/octo-name-repo/statuses/{sha} - languages_url: https://api.github.com/repos/octocat/octo-name-repo/languages - stargazers_url: https://api.github.com/repos/octocat/octo-name-repo/stargazers - contributors_url: https://api.github.com/repos/octocat/octo-name-repo/contributors - subscribers_url: https://api.github.com/repos/octocat/octo-name-repo/subscribers - subscription_url: https://api.github.com/repos/octocat/octo-name-repo/subscription - commits_url: https://api.github.com/repos/octocat/octo-name-repo/commits{/sha} - git_commits_url: https://api.github.com/repos/octocat/octo-name-repo/git/commits{/sha} - comments_url: https://api.github.com/repos/octocat/octo-name-repo/comments{/number} - issue_comment_url: https://api.github.com/repos/octocat/octo-name-repo/issues/comments{/number} - contents_url: https://api.github.com/repos/octocat/octo-name-repo/contents/{+path} - compare_url: https://api.github.com/repos/octocat/octo-name-repo/compare/{base}...{head} - merges_url: https://api.github.com/repos/octocat/octo-name-repo/merges - archive_url: https://api.github.com/repos/octocat/octo-name-repo/{archive_format}{/ref} - downloads_url: https://api.github.com/repos/octocat/octo-name-repo/downloads - issues_url: https://api.github.com/repos/octocat/octo-name-repo/issues{/number} - pulls_url: https://api.github.com/repos/octocat/octo-name-repo/pulls{/number} - milestones_url: https://api.github.com/repos/octocat/octo-name-repo/milestones{/number} - notifications_url: https://api.github.com/repos/octocat/octo-name-repo/notifications{?since,all,participating} - labels_url: https://api.github.com/repos/octocat/octo-name-repo/labels{/name} - releases_url: https://api.github.com/repos/octocat/octo-name-repo/releases{/id} - deployments_url: https://api.github.com/repos/octocat/octo-name-repo/deployments - html_url: https://github.com/octocat/octo-name-repo/packages/40201 - package-versions-for-authenticated-user: - value: - - id: 45763 - name: sha256:08a44bab0bddaddd8837a8b381aebc2e4b933768b981685a9e088360af0d3dd9 - url: https://api.github.com/users/octocat/packages/container/hello_docker/versions/45763 - package_html_url: https://github.com/users/octocat/packages/container/package/hello_docker - created_at: '2020-09-11T21:56:40Z' - updated_at: '2021-02-05T21:32:32Z' - html_url: https://github.com/users/octocat/packages/container/hello_docker/45763 - metadata: - package_type: container - container: - tags: - - latest - - id: 881 - name: sha256:b3d3e366b55f9a54599220198b3db5da8f53592acbbb7dc7e4e9878762fc5344 - url: https://api.github.com/users/octocat/packages/container/hello_docker/versions/881 - package_html_url: https://github.com/users/octocat/packages/container/package/hello_docker - created_at: '2020-05-21T22:22:20Z' - updated_at: '2021-02-05T21:32:32Z' - html_url: https://github.com/users/octocat/packages/container/hello_docker/881 - metadata: - package_type: container - container: - tags: [] - package-version-authenticated-user: - value: - id: 214 - name: sha256:3561f0cff06caccddb99c93bd26e712fcc56a811de0f8ea7a17bb865f30b176a - url: https://api.github.com/users/octocat/packages/container/hello_docker/versions/214 - package_html_url: https://github.com/users/octocat/packages/container/package/hello_docker - created_at: '2020-05-15T03:46:45Z' - updated_at: '2020-05-15T03:46:45Z' - html_url: https://github.com/users/octocat/packages/container/hello_docker/214 - metadata: - package_type: container - container: - tags: - - 1.13.6 project: value: owner_url: https://api.github.com/users/octocat @@ -76946,7 +77909,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -76975,7 +77938,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -77068,7 +78031,7 @@ components: hooks_url: https://api.github.com/repos/octocat/Hello-World/hooks svn_url: https://svn.github.com/octocat/Hello-World homepage: https://github.com - language: + language: forks_count: 9 stargazers_count: 80 watchers_count: 80 @@ -77097,7 +78060,7 @@ components: push: false pull: true allow_rebase_merge: true - template_repository: + template_repository: temp_clone_token: ABTLWHOULUVAXGTRYU7OC2876QJ2O allow_squash_merge: true allow_auto_merge: false @@ -77128,7 +78091,7 @@ components: permission: admin members_url: https://api.github.com/teams/1/members{/member} repositories_url: https://api.github.com/teams/1/repos - parent: + parent: members_count: 3 repos_count: 10 created_at: '2017-07-14T16:53:42Z' @@ -77151,7 +78114,6 @@ components: blog: https://github.com/blog location: San Francisco email: octocat@github.com - is_verified: true has_organization_projects: true has_repository_projects: true public_repos: 2 @@ -77160,8 +78122,8 @@ components: following: 0 html_url: https://github.com/octocat created_at: '2008-01-14T04:33:35Z' - updated_at: '2017-08-17T12:37:15Z' type: Organization + ldap_dn: uid=asdf,ou=users,dc=github,dc=com public-user-default-response: summary: Default response value: @@ -77237,6 +78199,163 @@ components: space: 976562499 collaborators: 0 private_repos: 9999 + user-events-items: + value: + - id: '22249084947' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + action: started + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: false + created_at: '2022-06-07T07:50:26Z' + user-org-events-items: + value: + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: false + created_at: '2022-06-09T12:47:28Z' + - id: '22196946742' + type: CreateEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + ref: + ref_type: repository + master_branch: master + description: + pusher_type: user + public: false + created_at: '2022-06-07T07:50:26Z' + org: + id: 9919 + login: github + gravatar_id: '' + url: https://api.github.com/orgs/github + avatar_url: https://avatars.githubusercontent.com/u/9919? + user-public-events-items: + value: + - id: '22249084947' + type: WatchEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + action: started + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-08T23:29:25Z' hovercard: value: contexts: @@ -77246,320 +78365,239 @@ components: value: - id: 1 key: ssh-rsa AAA... - package-versions-for-user: - value: - - id: 3497268 - name: 0.3.0 - url: https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/3497268 - package_html_url: https://github.com/octocat/octo-name-repo/packages/40201 - license: MIT - created_at: '2020-08-31T15:22:11Z' - updated_at: '2020-08-31T15:22:12Z' - description: Project for octocats - html_url: https://github.com/octocat/octo-name-repo/packages/40201?version=0.3.0 - metadata: - package_type: rubygems - - id: 387039 - name: 0.2.0 - url: https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039 - package_html_url: https://github.com/octocat/octo-name-repo/packages/40201 - license: MIT - created_at: '2019-12-01T20:49:29Z' - updated_at: '2019-12-01T20:49:30Z' - description: Project for octocats - html_url: https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0 - metadata: - package_type: rubygems - - id: 169770 - name: 0.1.0 - url: https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/169770 - package_html_url: https://github.com/octocat/octo-name-repo/packages/40201 - license: MIT - created_at: '2019-10-20T14:17:14Z' - updated_at: '2019-10-20T14:17:15Z' - html_url: https://github.com/octocat/octo-name-repo/packages/40201?version=0.1.0 - metadata: - package_type: rubygems - package-version-user: - value: - id: 387039 - name: 0.2.0 - url: https://api.github.com/users/octocat/packages/rubygems/octo-name/versions/387039 - package_html_url: https://github.com/octocat/octo-name-repo/packages/40201 - license: MIT - created_at: '2019-12-01T20:49:29Z' - updated_at: '2019-12-01T20:49:30Z' - description: Octo-name client for Ruby - html_url: https://github.com/octocat/octo-name-repo/packages/40201?version=0.2.0 - metadata: - package_type: rubygems project-items-3: value: - owner_url: https://api.github.com/users/octocat - url: https://api.github.com/projects/1002603 - html_url: https://github.com/users/octocat/projects/1 - columns_url: https://api.github.com/projects/1002603/columns - id: 1002603 - node_id: MDc6UHJvamVjdDEwMDI2MDM= - name: My Projects - body: A board to manage my personal projects. - number: 1 - state: open - creator: - login: octocat - id: 1 - node_id: MDQ6VXNlcjE= - avatar_url: https://github.com/images/error/octocat_happy.gif - gravatar_id: '' - url: https://api.github.com/users/octocat - html_url: https://github.com/octocat - followers_url: https://api.github.com/users/octocat/followers - following_url: https://api.github.com/users/octocat/following{/other_user} - gists_url: https://api.github.com/users/octocat/gists{/gist_id} - starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} - subscriptions_url: https://api.github.com/users/octocat/subscriptions - organizations_url: https://api.github.com/users/octocat/orgs - repos_url: https://api.github.com/users/octocat/repos - events_url: https://api.github.com/users/octocat/events{/privacy} - received_events_url: https://api.github.com/users/octocat/received_events - type: User - site_admin: false - created_at: '2011-04-10T20:09:31Z' - updated_at: '2014-03-03T18:58:10Z' - responses: - not_found: - description: Resource not found - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - validation_failed_simple: - description: Validation failed - content: - application/json: - schema: - "$ref": "#/components/schemas/validation-error-simple" - bad_request: - description: Bad Request - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" - validation_failed: - description: Validation failed - content: - application/json: - schema: - "$ref": "#/components/schemas/validation-error" - accepted: - description: Accepted - content: - application/json: - schema: - type: object - preview_header_missing: - description: Preview header missing - content: - application/json: - schema: - type: object - required: - - message - - documentation_url - properties: - message: - type: string - documentation_url: - type: string - forbidden: - description: Forbidden - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - requires_authentication: - description: Requires authentication - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - not_modified: - description: Not modified - gone: - description: Gone - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - actions_runner_labels: - description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - labels - properties: - total_count: - type: integer - labels: - type: array - items: - "$ref": "#/components/schemas/runner-label" - examples: - default: - "$ref": "#/components/examples/runner-labels" - actions_runner_labels_readonly: - description: Response - content: - application/json: - schema: - type: object - required: - - total_count - - labels - properties: - total_count: - type: integer - labels: - type: array - items: - "$ref": "#/components/schemas/runner-label" - examples: - default: - "$ref": "#/components/examples/runner-labels-readonly" - service_unavailable: - description: Service unavailable - content: - application/json: - schema: - type: object - properties: - code: - type: string - message: - type: string - documentation_url: - type: string - code_scanning_forbidden_read: - description: Response if GitHub Advanced Security is not enabled for this repository - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - forbidden_gist: - description: Forbidden Gist - content: - application/json: - schema: - type: object - properties: - block: - type: object - properties: - reason: - type: string - created_at: - type: string - html_url: - type: string - nullable: true - message: - type: string - documentation_url: - type: string - moved_permanently: - description: Moved permanently - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - conflict: - description: Conflict - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - temporary_redirect: - description: Temporary Redirect - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - internal_error: - description: Internal Error - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - code_scanning_forbidden_write: - description: Response if the repository is archived or if github advanced security - is not enabled for this repository - content: - application/json: - schema: - "$ref": "#/components/schemas/basic-error" - found: - description: Found - no_content: - description: A header with no content is returned. - scim_not_found: - description: Resource not found - content: - application/json: - schema: - "$ref": "#/components/schemas/scim-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" - scim_forbidden: - description: Forbidden - content: - application/json: - schema: - "$ref": "#/components/schemas/scim-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" - scim_bad_request: - description: Bad Request - content: - application/json: - schema: - "$ref": "#/components/schemas/scim-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" - scim_internal_error: - description: Internal Error - content: - application/json: - schema: - "$ref": "#/components/schemas/scim-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" - scim_conflict: - description: Conflict - content: - application/json: - schema: - "$ref": "#/components/schemas/scim-error" - application/scim+json: - schema: - "$ref": "#/components/schemas/scim-error" + url: https://api.github.com/projects/1002603 + html_url: https://github.com/users/octocat/projects/1 + columns_url: https://api.github.com/projects/1002603/columns + id: 1002603 + node_id: MDc6UHJvamVjdDEwMDI2MDM= + name: My Projects + body: A board to manage my personal projects. + number: 1 + state: open + creator: + login: octocat + id: 1 + node_id: MDQ6VXNlcjE= + avatar_url: https://github.com/images/error/octocat_happy.gif + gravatar_id: '' + url: https://api.github.com/users/octocat + html_url: https://github.com/octocat + followers_url: https://api.github.com/users/octocat/followers + following_url: https://api.github.com/users/octocat/following{/other_user} + gists_url: https://api.github.com/users/octocat/gists{/gist_id} + starred_url: https://api.github.com/users/octocat/starred{/owner}{/repo} + subscriptions_url: https://api.github.com/users/octocat/subscriptions + organizations_url: https://api.github.com/users/octocat/orgs + repos_url: https://api.github.com/users/octocat/repos + events_url: https://api.github.com/users/octocat/events{/privacy} + received_events_url: https://api.github.com/users/octocat/received_events + type: User + site_admin: false + created_at: '2011-04-10T20:09:31Z' + updated_at: '2014-03-03T18:58:10Z' + user-received-events-items: + value: + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22196946742' + type: CreateEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + ref: + ref_type: repository + master_branch: master + description: + pusher_type: user + public: false + created_at: '2022-06-07T07:50:26Z' + org: + id: 9919 + login: github + gravatar_id: '' + url: https://api.github.com/orgs/github + avatar_url: https://avatars.githubusercontent.com/u/9919? + user-received-public-events-items: + value: + - id: '22249084964' + type: PushEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + push_id: 10115855396 + size: 1 + distinct_size: 1 + ref: refs/heads/master + head: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + before: 883efe034920928c47fe18598c01249d1a9fdabd + commits: + - sha: 7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + author: + email: octocat@github.com + name: Monalisa Octocat + message: commit + distinct: true + url: https://api.github.com/repos/octocat/Hello-World/commits/7a8f3ac80e2ad2f6842cb86f576d4bfe2c03e300 + public: true + created_at: '2022-06-09T12:47:28Z' + - id: '22196946742' + type: CreateEvent + actor: + id: 583231 + login: octocat + display_login: octocat + gravatar_id: '' + url: https://api.github.com/users/octocat + avatar_url: https://avatars.githubusercontent.com/u/583231?v=4 + repo: + id: 1296269 + name: octocat/Hello-World + url: https://api.github.com/repos/octocat/Hello-World + payload: + ref: + ref_type: repository + master_branch: master + description: + pusher_type: user + public: false + created_at: '2022-06-07T07:50:26Z' + org: + id: 9919 + login: github + gravatar_id: '' + url: https://api.github.com/orgs/github + avatar_url: https://avatars.githubusercontent.com/u/9919? parameters: per-page: name: per_page - description: Results per page (max 100) + description: The number of results per page (max 100). in: query schema: type: integer default: 30 + page: + name: page + description: Page number of the results to fetch. + in: query + schema: + type: integer + default: 1 + hook-id: + name: hook_id + description: The unique identifier of the hook. + in: path + required: true + schema: + type: integer + direction: + name: direction + description: The direction to sort the results by. + in: query + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + key-ids: + name: key_ids + description: The unique identifier of the key. + in: path + required: true + schema: + type: string + team-id: + name: team_id + description: The unique identifier of the team. + in: path + required: true + schema: + type: integer + username: + name: username + description: The handle for the GitHub user account. + in: path + required: true + schema: + type: string + org: + name: org + description: The organization name. The name is not case sensitive. + in: path + required: true + schema: + type: string + pre-receive-environment-id: + name: pre_receive_environment_id + description: The unique identifier of the pre-receive environment. + in: path + required: true + schema: + type: integer + pre-receive-hook-id: + name: pre_receive_hook_id + description: The unique identifier of the pre-receive hook. + in: path + required: true + schema: + type: integer + token-id: + name: token_id + description: The unique identifier of the token. + in: path + required: true + schema: + type: integer cursor: name: cursor description: 'Used for pagination: the starting delivery from which the page @@ -77575,13 +78613,6 @@ components: required: true schema: type: integer - page: - name: page - description: Page number of the results to fetch. - in: query - schema: - type: integer - default: 1 since: name: since description: 'Only show notifications updated after the given time. This is @@ -77594,14 +78625,17 @@ components: format: date-time installation-id: name: installation_id - description: installation_id parameter + description: The unique identifier of the installation. in: path required: true schema: type: integer + examples: + default: + value: 1 grant-id: name: grant_id - description: grant_id parameter + description: The unique identifier of the grant. in: path required: true schema: @@ -77610,18 +78644,31 @@ components: name: client_id in: path required: true - description: The client ID of your GitHub app. + description: The client ID of the GitHub app. schema: type: string + examples: + default: + value: Iv1.8a61f9b3a7aba766 app-slug: name: app_slug in: path required: true schema: type: string + oauth-client-id: + name: client_id + in: path + required: true + description: The client ID of the OAuth app. + schema: + type: string + examples: + default: + value: abcde12345fghij67890 authorization-id: name: authorization_id - description: authorization_id parameter + description: The unique identifier of the authorization. in: path required: true schema: @@ -77636,11 +78683,18 @@ components: type: string org-id: name: org_id - description: Unique identifier of an organization. + description: The unique identifier of the organization. in: path required: true schema: type: integer + visible-to-organization: + name: visible_to_organization + description: Only return runner groups that are allowed to be used by this organization. + in: query + required: false + schema: + type: string runner-group-id: name: runner_group_id description: Unique identifier of the self-hosted runner group. @@ -77665,7 +78719,7 @@ components: audit-log-phrase: name: phrase description: A search phrase. For more information, see [Searching the audit - log](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). + log](https://docs.github.com/enterprise-server@3.6/github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization#searching-the-audit-log). in: query required: false schema: @@ -77690,7 +78744,7 @@ components: - all audit-log-after: name: after - description: A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). + description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events after this cursor. in: query required: false @@ -77698,7 +78752,7 @@ components: type: string audit-log-before: name: before - description: A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). + description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). If specified, the query only searches for events before this cursor. in: query required: false @@ -77733,8 +78787,8 @@ components: in: query description: |- A comma-separated list of secret types to return. By default all secret types are returned. - See "[About secret scanning for private repositories](https://docs.github.com/code-security/secret-security/about-secret-scanning#about-secret-scanning-for-private-repositories)" - for a complete list of secret types (API slug). + See "[Secret scanning patterns](https://docs.github.com/enterprise-server@3.6/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-advanced-security)" + for a complete list of secret types. required: false schema: type: string @@ -77747,32 +78801,44 @@ components: required: false schema: type: string + secret-scanning-alert-sort: + name: sort + description: The property to sort the results by. `created` means when the alert + was created. `updated` means when the alert was updated or resolved. + in: query + required: false + schema: + type: string + enum: + - created + - updated + default: created pagination-before: name: before - description: A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). - If specified, the query only searches for events before this cursor. + description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). + If specified, the query only searches for results before this cursor. in: query required: false schema: type: string pagination-after: name: after - description: A cursor, as given in the [Link header](https://docs.github.com/rest/overview/resources-in-the-rest-api#link-header). - If specified, the query only searches for events after this cursor. + description: A cursor, as given in the [Link header](https://docs.github.com/enterprise-server@3.6/rest/overview/resources-in-the-rest-api#link-header). + If specified, the query only searches for results after this cursor. in: query required: false schema: type: string gist-id: name: gist_id - description: gist_id parameter + description: The unique identifier of the gist. in: path required: true schema: type: string comment-id: name: comment_id - description: comment_id parameter + description: The unique identifier of the comment. in: path required: true schema: @@ -77784,51 +78850,16 @@ components: required: false schema: type: string - direction: - name: direction - description: One of `asc` (ascending) or `desc` (descending). - in: query - required: false - schema: - type: string - enum: - - asc - - desc - default: desc - account-id: - name: account_id - description: account_id parameter - in: path - required: true - schema: - type: integer - plan-id: - name: plan_id - description: plan_id parameter - in: path - required: true - schema: - type: integer - sort: - name: sort - description: One of `created` (when the repository was starred) or `updated` - (when it was last pushed to). - in: query - required: false - schema: - type: string - enum: - - created - - updated - default: created owner: name: owner + description: The account owner of the repository. The name is not case sensitive. in: path required: true schema: type: string repo: name: repo + description: The name of the repository. The name is not case sensitive. in: path required: true schema: @@ -77862,7 +78893,9 @@ components: format: date-time thread-id: name: thread_id - description: thread_id parameter + description: The unique identifier of the notification thread. This corresponds + to the value returned in the `id` field when you retrieve notifications (for + example with the [`GET /notifications` operation](https://docs.github.com/enterprise-server@3.6/rest/reference/activity#list-notifications-for-the-authenticated-user)). in: path required: true schema: @@ -77875,168 +78908,119 @@ components: required: false schema: type: integer - org: - name: org - in: path - required: true - schema: - type: string - team-slug: - name: team_slug - description: team_slug parameter - in: path - required: true - schema: - type: string repository-id: name: repository_id + description: The unique identifier of the repository. in: path required: true schema: type: integer + visible-to-repository: + name: visible_to_repository + description: Only return runner groups that are allowed to be used by this repository. + in: query + required: false + schema: + type: string secret-name: name: secret_name - description: secret_name parameter + description: The name of the secret. in: path required: true schema: type: string - username: - name: username - in: path - required: true + tool-name: + name: tool_name + description: The name of a code scanning tool. Only results by this tool will + be listed. You can specify the tool by using either `tool_name` or `tool_guid`, + but not both. + in: query + required: false schema: - type: string + "$ref": "#/components/schemas/code-scanning-analysis-tool-name" + tool-guid: + name: tool_guid + description: The GUID of a code scanning tool. Only results by this tool will + be listed. Note that some code scanning tools may not include a GUID in their + analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, + but not both. + in: query + required: false + schema: + "$ref": "#/components/schemas/code-scanning-analysis-tool-guid" group-id: name: group_id - description: group_id parameter - in: path - required: true - schema: - type: integer - hook-id: - name: hook_id - in: path - required: true - schema: - type: integer - invitation-id: - name: invitation_id - description: invitation_id parameter + description: The unique identifier of the group. in: path required: true schema: type: integer migration-id: name: migration_id - description: migration_id parameter + description: The unique identifier of the migration. in: path required: true schema: type: integer - repo-name: - name: repo_name - description: repo_name parameter - in: path - required: true - schema: - type: string - package-visibility: - name: visibility - description: The selected visibility of the packages. Can be one of `public`, - `private`, or `internal`. Only `container` package_types currently support - `internal` visibility properly. For other ecosystems `internal` is synonymous - with `private`. This parameter is optional and only filters an existing result - set. - in: query - required: false - schema: - type: string - enum: - - public - - private - - internal - package-type: - name: package_type - description: The type of supported package. Can be one of `npm`, `maven`, `rubygems`, - `nuget`, `docker`, or `container`. Packages in GitHub's Gradle registry have - the type `maven`. Docker images pushed to GitHub's Container registry (`ghcr.io`) - have the type `container`. You can use the type `docker` to find images that - were pushed to GitHub's Docker registry (`docker.pkg.github.com`), even if - these have now been migrated to the Container registry. - in: path - required: true - schema: - type: string - enum: - - npm - - maven - - rubygems - - docker - - nuget - - container - package-name: - name: package_name - description: The name of the package. + team-slug: + name: team_slug + description: The slug of the team name. in: path required: true schema: type: string - package-version-id: - name: package_version_id - description: Unique identifier of the package version. - in: path - required: true - schema: - type: integer discussion-number: name: discussion_number + description: The number that identifies the discussion. in: path required: true schema: type: integer comment-number: name: comment_number + description: The number that identifies the comment. in: path required: true schema: type: integer reaction-id: name: reaction_id + description: The unique identifier of the reaction. in: path required: true schema: type: integer project-id: name: project_id + description: The unique identifier of the project. in: path required: true schema: type: integer card-id: name: card_id - description: card_id parameter + description: The unique identifier of the card. in: path required: true schema: type: integer column-id: name: column_id - description: column_id parameter + description: The unique identifier of the column. in: path required: true schema: type: integer artifact-id: name: artifact_id - description: artifact_id parameter + description: The unique identifier of the artifact. in: path required: true schema: type: integer job-id: name: job_id - description: job_id parameter + description: The unique identifier of the job. in: path required: true schema: @@ -78071,8 +79055,6 @@ components: description: Returns workflow runs with the check run `status` or `conclusion` that you specify. For example, a conclusion can be `success` or a status can be `in_progress`. Only GitHub can set a status of `waiting` or `requested`. - For a list of the possible `status` and `conclusion` options, see "[Create - a check run](https://docs.github.com/rest/reference/checks#create-a-check-run)." in: query required: false schema: @@ -78094,7 +79076,7 @@ components: created: name: created description: Returns workflow runs created within the given date-time range. - For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." + For more information on the syntax, see "[Understanding the search syntax](https://docs.github.com/enterprise-server@3.6/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates)." in: query required: false schema: @@ -78116,7 +79098,7 @@ components: type: integer run-id: name: run_id - description: The id of the workflow run. + description: The unique identifier of the workflow run. in: path required: true schema: @@ -78140,7 +79122,7 @@ components: - type: string autolink-id: name: autolink_id - description: autolink_id parameter + description: The unique identifier of the autolink. in: path required: true schema: @@ -78155,14 +79137,14 @@ components: x-multi-segment: true check-run-id: name: check_run_id - description: check_run_id parameter + description: The unique identifier of the check run. in: path required: true schema: type: integer check-suite-id: name: check_suite_id - description: check_suite_id parameter + description: The unique identifier of the check suite. in: path required: true schema: @@ -78176,8 +79158,7 @@ components: type: string status: name: status - description: Returns check runs with the specified `status`. Can be one of `queued`, - `in_progress`, or `completed`. + description: Returns check runs with the specified `status`. in: query required: false schema: @@ -78186,25 +79167,6 @@ components: - queued - in_progress - completed - tool-name: - name: tool_name - description: The name of a code scanning tool. Only results by this tool will - be listed. You can specify the tool by using either `tool_name` or `tool_guid`, - but not both. - in: query - required: false - schema: - "$ref": "#/components/schemas/code-scanning-analysis-tool-name" - tool-guid: - name: tool_guid - description: The GUID of a code scanning tool. Only results by this tool will - be listed. Note that some code scanning tools may not include a GUID in their - analysis data. You can specify the tool by using either `tool_guid` or `tool_name`, - but not both. - in: query - required: false - schema: - "$ref": "#/components/schemas/code-scanning-analysis-tool-guid" git-ref: name: ref description: The Git reference for the results you want to list. The `ref` for @@ -78226,12 +79188,20 @@ components: "$ref": "#/components/schemas/alert-number" commit-sha: name: commit_sha - description: commit_sha parameter + description: The SHA of the commit. in: path required: true schema: type: string x-multi-segment: true + manifest-path: + name: name + description: The full path, relative to the repository root, of the dependency + manifest file. + in: query + required: false + schema: + type: string deployment-id: name: deployment_id description: deployment_id parameter @@ -78243,76 +79213,91 @@ components: name: environment_name in: path required: true - description: The name of the environment + description: The name of the environment. schema: type: string - since-user: - name: since - description: A user ID. Only return users with an ID greater than this ID. + branch-policy-id: + name: branch_policy_id + in: path + required: true + description: The unique identifier of the branch policy. + schema: + type: integer + invitation-id: + name: invitation_id + description: The unique identifier of the invitation. + in: path + required: true + schema: + type: integer + sort: + name: sort + description: The property to sort the results by. `created` means when the repository + was starred. `updated` means when the repository was last pushed to. in: query required: false schema: - type: integer + type: string + enum: + - created + - updated + default: created issue-number: name: issue_number - description: issue_number parameter + description: The number that identifies the issue. in: path required: true schema: type: integer key-id: name: key_id - description: key_id parameter + description: The unique identifier of the key. in: path required: true schema: type: integer milestone-number: name: milestone_number - description: milestone_number parameter + description: The number that identifies the milestone. in: path required: true schema: type: integer pull-number: name: pull_number + description: The number that identifies the pull request. in: path required: true schema: type: integer review-id: name: review_id - description: review_id parameter + description: The unique identifier of the review. in: path required: true schema: type: integer asset-id: name: asset_id - description: asset_id parameter + description: The unique identifier of the asset. in: path required: true schema: type: integer release-id: name: release_id - description: release_id parameter + description: The unique identifier of the release. in: path required: true schema: type: integer - per: - name: per - description: 'Must be one of: `day`, `week`.' - in: query - required: false + tag-protection-id: + name: tag_protection_id + description: The unique identifier of the tag protection. + in: path + required: true schema: - type: string - enum: - - '' - - day - - week - default: day + type: integer since-repo: name: since description: A repository ID. Only return repositories with an ID greater than @@ -78344,7 +79329,7 @@ components: type: string scim-user-id: name: scim_user_id - description: scim_user_id parameter + description: The unique identifier of the SCIM user. in: path required: true schema: @@ -78362,38 +79347,18 @@ components: - desc - asc default: desc - team-id: - name: team_id + gpg-key-id: + name: gpg_key_id + description: The unique identifier of the GPG key. in: path required: true schema: type: integer - repository-id-in-query: - name: repository_id - description: ID of the Repository to filter on + since-user: + name: since + description: A user ID. Only return users with an ID greater than this ID. in: query - schema: - type: integer - codespace-name: - name: codespace_name - in: path - required: true - description: The name of the codespace. - schema: - type: string - export-id: - name: export_id - in: path - required: true - description: The ID of the export operation, or `latest`. Currently only `latest` - is currently supported. - schema: - type: string - gpg-key-id: - name: gpg_key_id - description: gpg_key_id parameter - in: path - required: true + required: false schema: type: integer headers: @@ -78426,4 +79391,171 @@ components: location: example: https://pipelines.actions.githubusercontent.com/OhgS4QRKqmgx7bKC27GKU83jnQjyeqG8oIMTge8eqtheppcmw8/_apis/pipelines/1/runs/176/signedlogcontent?urlExpires=2020-01-24T18%3A10%3A31.5729946Z&urlSigningMethod=HMACV1&urlSignature=agG73JakPYkHrh06seAkvmH7rBR4Ji4c2%2B6a2ejYh3E%3D schema: - type: string \ No newline at end of file + type: string + responses: + not_found: + description: Resource not found + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + validation_failed_simple: + description: Validation failed, or the endpoint has been spammed. + content: + application/json: + schema: + "$ref": "#/components/schemas/validation-error-simple" + bad_request: + description: Bad Request + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + application/scim+json: + schema: + "$ref": "#/components/schemas/scim-error" + validation_failed: + description: Validation failed, or the endpoint has been spammed. + content: + application/json: + schema: + "$ref": "#/components/schemas/validation-error" + accepted: + description: Accepted + content: + application/json: + schema: + type: object + forbidden: + description: Forbidden + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + requires_authentication: + description: Requires authentication + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + not_modified: + description: Not modified + gone: + description: Gone + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + actions_runner_labels: + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - labels + properties: + total_count: + type: integer + labels: + type: array + items: + "$ref": "#/components/schemas/runner-label" + examples: + default: + "$ref": "#/components/examples/runner-labels" + actions_runner_labels_readonly: + description: Response + content: + application/json: + schema: + type: object + required: + - total_count + - labels + properties: + total_count: + type: integer + labels: + type: array + items: + "$ref": "#/components/schemas/runner-label" + examples: + default: + "$ref": "#/components/examples/runner-labels-readonly" + service_unavailable: + description: Service unavailable + content: + application/json: + schema: + type: object + properties: + code: + type: string + message: + type: string + documentation_url: + type: string + code_scanning_forbidden_read: + description: Response if GitHub Advanced Security is not enabled for this repository + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + forbidden_gist: + description: Forbidden Gist + content: + application/json: + schema: + type: object + properties: + block: + type: object + properties: + reason: + type: string + created_at: + type: string + html_url: + type: string + nullable: true + message: + type: string + documentation_url: + type: string + moved_permanently: + description: Moved permanently + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + conflict: + description: Conflict + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + temporary_redirect: + description: Temporary Redirect + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + internal_error: + description: Internal Error + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + code_scanning_forbidden_write: + description: Response if the repository is archived or if GitHub Advanced Security + is not enabled for this repository + content: + application/json: + schema: + "$ref": "#/components/schemas/basic-error" + found: + description: Found + no_content: + description: A header with no content is returned. diff --git a/test/v3/specs/petstore.yaml b/test/v3/specs/petstore.yaml index 83ccdf1c6..070830d8d 100644 --- a/test/v3/specs/petstore.yaml +++ b/test/v3/specs/petstore.yaml @@ -1,44 +1,52 @@ -openapi: 3.0.1 +openapi: 3.0.3 info: - title: Swagger Petstore - description: 'This is a sample server Petstore server. You can find out more about Swagger - at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For - this sample, you can use the api key `special-key` to test the authorization filters.' + title: Swagger Petstore - OpenAPI 3.0 + description: |- + This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about + Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach! + You can now help us improve the API whether it's by making changes to the definition itself or to the code. + That way, with time, we can improve the API in general, and expose some of the new features in OAS3. + + _If you're looking for the Swagger 2.0/OAS 2.0 version of Petstore, then click [here](https://editor.swagger.io/?url=https://petstore.swagger.io/v2/swagger.yaml). Alternatively, you can load via the `Edit > Load Petstore OAS 2.0` menu option!_ + + Some useful links: + - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) + - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml) termsOfService: http://swagger.io/terms/ contact: email: apiteam@swagger.io license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - version: 1.0.0 + version: 1.0.11 externalDocs: description: Find out more about Swagger url: http://swagger.io servers: -- url: https://petstore.swagger.io/v2 -- url: http://petstore.swagger.io/v2 + - url: https://petstore3.swagger.io/api/v3 tags: -- name: pet - description: Everything about your Pets - externalDocs: - description: Find out more - url: http://swagger.io -- name: store - description: Access to Petstore orders -- name: user - description: Operations about user - externalDocs: - description: Find out more about our store - url: http://swagger.io + - name: pet + description: Everything about your Pets + externalDocs: + description: Find out more + url: http://swagger.io + - name: store + description: Access to Petstore orders + externalDocs: + description: Find out more about our store + url: http://swagger.io + - name: user + description: Operations about user paths: /pet: put: tags: - - pet + - pet summary: Update an existing pet + description: Update an existing pet by Id operationId: updatePet requestBody: - description: Pet object that needs to be added to the store + description: Update an existent pet in the store content: application/json: schema: @@ -46,29 +54,38 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' required: true responses: - 400: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Pet not found - content: {} - 405: + '405': description: Validation exception - content: {} security: - - petstore_auth: - - write:pets - - read:pets - x-codegen-request-body-name: body + - petstore_auth: + - write:pets + - read:pets post: tags: - - pet + - pet summary: Add a new pet to the store + description: Add a new pet to the store operationId: addPet requestBody: - description: Pet object that needs to be added to the store + description: Create a new pet in the store content: application/json: schema: @@ -76,240 +93,242 @@ paths: application/xml: schema: $ref: '#/components/schemas/Pet' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/Pet' required: true responses: - 405: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + '405': description: Invalid input - content: {} security: - - petstore_auth: - - write:pets - - read:pets - x-codegen-request-body-name: body + - petstore_auth: + - write:pets + - read:pets /pet/findByStatus: get: tags: - - pet + - pet summary: Finds Pets by status description: Multiple status values can be provided with comma separated strings operationId: findPetsByStatus parameters: - - name: status - in: query - description: Status values that need to be considered for filter - required: true - style: form - explode: true - schema: - type: array - items: + - name: status + in: query + description: Status values that need to be considered for filter + required: false + explode: true + schema: type: string default: available enum: - - available - - pending - - sold + - available + - pending + - sold responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: type: array items: $ref: '#/components/schemas/Pet' - application/json: + application/xml: schema: type: array items: $ref: '#/components/schemas/Pet' - 400: + '400': description: Invalid status value - content: {} security: - - petstore_auth: - - write:pets - - read:pets + - petstore_auth: + - write:pets + - read:pets /pet/findByTags: get: tags: - - pet + - pet summary: Finds Pets by tags - description: Muliple tags can be provided with comma separated strings. Use tag1, - tag2, tag3 for testing. + description: Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. operationId: findPetsByTags parameters: - - name: tags - in: query - description: Tags to filter by - required: true - style: form - explode: true - schema: - type: array - items: - type: string + - name: tags + in: query + description: Tags to filter by + required: false + explode: true + schema: + type: array + items: + type: string responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: type: array items: $ref: '#/components/schemas/Pet' - application/json: + application/xml: schema: type: array items: $ref: '#/components/schemas/Pet' - 400: + '400': description: Invalid tag value - content: {} - deprecated: true security: - - petstore_auth: - - write:pets - - read:pets + - petstore_auth: + - write:pets + - read:pets /pet/{petId}: get: tags: - - pet + - pet summary: Find pet by ID description: Returns a single pet operationId: getPetById parameters: - - name: petId - in: path - description: ID of pet to return - required: true - schema: - type: integer - format: int64 + - name: petId + in: path + description: ID of pet to return + required: true + schema: + type: integer + format: int64 responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: $ref: '#/components/schemas/Pet' - application/json: + application/xml: schema: $ref: '#/components/schemas/Pet' - 400: + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Pet not found - content: {} security: - - api_key: [] + - api_key: [] + - petstore_auth: + - write:pets + - read:pets post: tags: - - pet + - pet summary: Updates a pet in the store with form data + description: '' operationId: updatePetWithForm parameters: - - name: petId - in: path - description: ID of pet that needs to be updated - required: true - schema: - type: integer - format: int64 - requestBody: - content: - application/x-www-form-urlencoded: - schema: - properties: - name: - type: string - description: Updated name of the pet - status: - type: string - description: Updated status of the pet + - name: petId + in: path + description: ID of pet that needs to be updated + required: true + schema: + type: integer + format: int64 + - name: name + in: query + description: Name of pet that needs to be updated + schema: + type: string + - name: status + in: query + description: Status of pet that needs to be updated + schema: + type: string responses: - 405: + '405': description: Invalid input - content: {} security: - - petstore_auth: - - write:pets - - read:pets + - petstore_auth: + - write:pets + - read:pets delete: tags: - - pet + - pet summary: Deletes a pet + description: delete a pet operationId: deletePet parameters: - - name: api_key - in: header - schema: - type: string - - name: petId - in: path - description: Pet id to delete - required: true - schema: - type: integer - format: int64 + - name: api_key + in: header + description: '' + required: false + schema: + type: string + - name: petId + in: path + description: Pet id to delete + required: true + schema: + type: integer + format: int64 responses: - 400: - description: Invalid ID supplied - content: {} - 404: - description: Pet not found - content: {} + '400': + description: Invalid pet value security: - - petstore_auth: - - write:pets - - read:pets + - petstore_auth: + - write:pets + - read:pets /pet/{petId}/uploadImage: post: tags: - - pet + - pet summary: uploads an image + description: '' operationId: uploadFile parameters: - - name: petId - in: path - description: ID of pet to update - required: true - schema: - type: integer - format: int64 + - name: petId + in: path + description: ID of pet to update + required: true + schema: + type: integer + format: int64 + - name: additionalMetadata + in: query + description: Additional Metadata + required: false + schema: + type: string requestBody: content: - multipart/form-data: + application/octet-stream: schema: - properties: - additionalMetadata: - type: string - description: Additional data to pass to server - file: - type: string - description: file to upload - format: binary + type: string + format: binary responses: - 200: + '200': description: successful operation content: application/json: schema: $ref: '#/components/schemas/ApiResponse' security: - - petstore_auth: - - write:pets - - read:pets + - petstore_auth: + - write:pets + - read:pets /store/inventory: get: tags: - - store + - store summary: Returns pet inventories by status description: Returns a map of status codes to quantities operationId: getInventory responses: - 200: + '200': description: successful operation content: application/json: @@ -319,171 +338,159 @@ paths: type: integer format: int32 security: - - api_key: [] + - api_key: [] /store/order: post: tags: - - store + - store summary: Place an order for a pet + description: Place a new order in the store operationId: placeOrder requestBody: - description: order placed for purchasing the pet content: - '*/*': + application/json: + schema: + $ref: '#/components/schemas/Order' + application/xml: + schema: + $ref: '#/components/schemas/Order' + application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Order' - required: true responses: - 200: + '200': description: successful operation content: - application/xml: - schema: - $ref: '#/components/schemas/Order' application/json: schema: $ref: '#/components/schemas/Order' - 400: - description: Invalid Order - content: {} - x-codegen-request-body-name: body + '405': + description: Invalid input /store/order/{orderId}: get: tags: - - store + - store summary: Find purchase order by ID - description: For valid response try integer IDs with value >= 1 and <= 10. Other - values will generated exceptions + description: For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions. operationId: getOrderById parameters: - - name: orderId - in: path - description: ID of pet that needs to be fetched - required: true - schema: - maximum: 10.0 - minimum: 1.0 - type: integer - format: int64 + - name: orderId + in: path + description: ID of order that needs to be fetched + required: true + schema: + type: integer + format: int64 responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: $ref: '#/components/schemas/Order' - application/json: + application/xml: schema: $ref: '#/components/schemas/Order' - 400: + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Order not found - content: {} delete: tags: - - store + - store summary: Delete purchase order by ID - description: For valid response try integer IDs with positive integer value. Negative - or non-integer values will generate API errors + description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors operationId: deleteOrder parameters: - - name: orderId - in: path - description: ID of the order that needs to be deleted - required: true - schema: - minimum: 1.0 - type: integer - format: int64 + - name: orderId + in: path + description: ID of the order that needs to be deleted + required: true + schema: + type: integer + format: int64 responses: - 400: + '400': description: Invalid ID supplied - content: {} - 404: + '404': description: Order not found - content: {} /user: post: tags: - - user + - user summary: Create user description: This can only be done by the logged in user. operationId: createUser requestBody: description: Created user object content: - '*/*': + application/json: schema: $ref: '#/components/schemas/User' - required: true - responses: - default: - description: successful operation - content: {} - x-codegen-request-body-name: body - /user/createWithArray: - post: - tags: - - user - summary: Creates list of users with given input array - operationId: createUsersWithArrayInput - requestBody: - description: List of user object - content: - '*/*': + application/xml: schema: - type: array - items: - $ref: '#/components/schemas/User' - required: true + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/User' responses: default: description: successful operation - content: {} - x-codegen-request-body-name: body + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' /user/createWithList: post: tags: - - user + - user summary: Creates list of users with given input array + description: Creates list of users with given input array operationId: createUsersWithListInput requestBody: - description: List of user object content: - '*/*': + application/json: schema: type: array items: $ref: '#/components/schemas/User' - required: true responses: + '200': + description: Successful operation + content: + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' default: description: successful operation - content: {} - x-codegen-request-body-name: body /user/login: get: tags: - - user + - user summary: Logs user into the system + description: '' operationId: loginUser parameters: - - name: username - in: query - description: The user name for login - required: true - schema: - type: string - - name: password - in: query - description: The password for login in clear text - required: true - schema: - type: string + - name: username + in: query + description: The user name for login + required: false + schema: + type: string + - name: password + in: query + description: The password for login in clear text + required: false + schema: + type: string responses: - 200: + '200': description: successful operation headers: X-Rate-Limit: @@ -503,96 +510,93 @@ paths: application/json: schema: type: string - 400: + '400': description: Invalid username/password supplied - content: {} /user/logout: get: tags: - - user + - user summary: Logs out current logged in user session + description: '' operationId: logoutUser + parameters: [] responses: default: description: successful operation - content: {} /user/{username}: get: tags: - - user + - user summary: Get user by user name + description: '' operationId: getUserByName parameters: - - name: username - in: path - description: 'The name that needs to be fetched. Use user1 for testing. ' - required: true - schema: - type: string + - name: username + in: path + description: 'The name that needs to be fetched. Use user1 for testing. ' + required: true + schema: + type: string responses: - 200: + '200': description: successful operation content: - application/xml: + application/json: schema: $ref: '#/components/schemas/User' - application/json: + application/xml: schema: $ref: '#/components/schemas/User' - 400: + '400': description: Invalid username supplied - content: {} - 404: + '404': description: User not found - content: {} put: tags: - - user - summary: Updated user + - user + summary: Update user description: This can only be done by the logged in user. operationId: updateUser parameters: - - name: username - in: path - description: name that need to be updated - required: true - schema: - type: string + - name: username + in: path + description: name that need to be deleted + required: true + schema: + type: string requestBody: - description: Updated user object + description: Update an existent user in the store content: - '*/*': + application/json: + schema: + $ref: '#/components/schemas/User' + application/xml: + schema: + $ref: '#/components/schemas/User' + application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/User' - required: true responses: - 400: - description: Invalid user supplied - content: {} - 404: - description: User not found - content: {} - x-codegen-request-body-name: body + default: + description: successful operation delete: tags: - - user + - user summary: Delete user description: This can only be done by the logged in user. operationId: deleteUser parameters: - - name: username - in: path - description: The name that needs to be deleted - required: true - schema: - type: string + - name: username + in: path + description: The name that needs to be deleted + required: true + schema: + type: string responses: - 400: + '400': description: Invalid username supplied - content: {} - 404: + '404': description: User not found - content: {} components: schemas: Order: @@ -601,61 +605,110 @@ components: id: type: integer format: int64 + example: 10 petId: type: integer format: int64 + example: 198772 quantity: type: integer format: int32 + example: 7 shipDate: type: string format: date-time status: type: string description: Order Status + example: approved enum: - - placed - - approved - - delivered + - placed + - approved + - delivered complete: type: boolean - default: false xml: - name: Order + name: order + Customer: + type: object + properties: + id: + type: integer + format: int64 + example: 100000 + username: + type: string + example: fehguy + address: + type: array + xml: + name: addresses + wrapped: true + items: + $ref: '#/components/schemas/Address' + xml: + name: customer + Address: + type: object + properties: + street: + type: string + example: 437 Lytton + city: + type: string + example: Palo Alto + state: + type: string + example: CA + zip: + type: string + example: '94301' + xml: + name: address Category: type: object properties: id: type: integer format: int64 + example: 1 name: type: string + example: Dogs xml: - name: Category + name: category User: type: object properties: id: type: integer format: int64 + example: 10 username: type: string + example: theUser firstName: type: string + example: John lastName: type: string + example: James email: type: string + example: john@email.com password: type: string + example: '12345' phone: type: string + example: '12345' userStatus: type: integer description: User Status format: int32 + example: 1 xml: - name: User + name: user Tag: type: object properties: @@ -665,32 +718,33 @@ components: name: type: string xml: - name: Tag + name: tag Pet: required: - - name - - photoUrls + - name + - photoUrls type: object properties: id: type: integer format: int64 - category: - $ref: '#/components/schemas/Category' + example: 10 name: type: string example: doggie + category: + $ref: '#/components/schemas/Category' photoUrls: type: array xml: - name: photoUrl wrapped: true items: type: string + xml: + name: photoUrl tags: type: array xml: - name: tag wrapped: true items: $ref: '#/components/schemas/Tag' @@ -698,11 +752,11 @@ components: type: string description: pet status in the store enum: - - available - - pending - - sold + - available + - pending + - sold xml: - name: Pet + name: pet ApiResponse: type: object properties: @@ -713,12 +767,32 @@ components: type: string message: type: string + xml: + name: '##default' + requestBodies: + Pet: + description: Pet object that needs to be added to the store + content: + application/json: + schema: + $ref: '#/components/schemas/Pet' + application/xml: + schema: + $ref: '#/components/schemas/Pet' + UserArray: + description: List of user object + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/User' securitySchemes: petstore_auth: type: oauth2 flows: implicit: - authorizationUrl: http://petstore.swagger.io/oauth/dialog + authorizationUrl: https://petstore3.swagger.io/oauth/authorize scopes: write:pets: modify pets in your account read:pets: read your pets diff --git a/test/v3/specs/stripe.yaml b/test/v3/specs/stripe.yaml index 115ac5af5..dc8b929e9 100644 --- a/test/v3/specs/stripe.yaml +++ b/test/v3/specs/stripe.yaml @@ -39,8 +39,8 @@ components: maxLength: 5000 type: string created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. + description: Time at which the account was connected. Measured in seconds + since the Unix epoch. format: unix-time type: integer default_currency: @@ -275,6 +275,14 @@ components: - inactive - pending type: string + affirm_payments: + description: The status of the Affirm capability of the account, or whether + the account can directly process Affirm charges. + enum: + - active + - inactive + - pending + type: string afterpay_clearpay_payments: description: The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. @@ -309,6 +317,23 @@ components: - inactive - pending type: string + bank_transfer_payments: + description: The status of the customer_balance payments capability of the + account, or whether the account can directly process customer_balance + charges. + enum: + - active + - inactive + - pending + type: string + blik_payments: + description: The status of the blik payments capability of the account, + or whether the account can directly process blik charges. + enum: + - active + - inactive + - pending + type: string boleto_payments: description: The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. @@ -399,6 +424,14 @@ components: - inactive - pending type: string + konbini_payments: + description: The status of the konbini payments capability of the account, + or whether the account can directly process konbini charges. + enum: + - active + - inactive + - pending + type: string legacy_payments: description: The status of the legacy payments capability of the account. enum: @@ -406,6 +439,14 @@ components: - inactive - pending type: string + link_payments: + description: The status of the link_payments capability of the account, + or whether the account can directly process Link charges. + enum: + - active + - inactive + - pending + type: string oxxo_payments: description: The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. @@ -422,6 +463,22 @@ components: - inactive - pending type: string + paynow_payments: + description: The status of the paynow payments capability of the account, + or whether the account can directly process paynow charges. + enum: + - active + - inactive + - pending + type: string + promptpay_payments: + description: The status of the promptpay payments capability of the account, + or whether the account can directly process promptpay charges. + enum: + - active + - inactive + - pending + type: string sepa_debit_payments: description: The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits @@ -463,6 +520,23 @@ components: - inactive - pending type: string + treasury: + description: The status of the banking capability, or whether the account + can have bank accounts. + enum: + - active + - inactive + - pending + type: string + us_bank_account_ach_payments: + description: The status of the US bank account ACH payments capability of + the account, or whether the account can directly process US bank account + charges. + enum: + - active + - inactive + - pending + type: string title: AccountCapabilities type: object x-expandableFields: [] @@ -644,6 +718,24 @@ components: maxLength: 5000 nullable: true type: string + statement_descriptor_prefix_kana: + description: The Kana variation of the default text that appears on credit + card statements when a charge is made (Japan only). This field prefixes + any dynamic `statement_descriptor_suffix_kana` specified on the charge. + `statement_descriptor_prefix_kana` is useful for maximizing descriptor + space for the dynamic portion. + maxLength: 5000 + nullable: true + type: string + statement_descriptor_prefix_kanji: + description: The Kanji variation of the default text that appears on credit + card statements when a charge is made (Japan only). This field prefixes + any dynamic `statement_descriptor_suffix_kanji` specified on the charge. + `statement_descriptor_prefix_kanji` is useful for maximizing descriptor + space for the dynamic portion. + maxLength: 5000 + nullable: true + type: string title: AccountCardPaymentsSettings type: object x-expandableFields: @@ -818,6 +910,24 @@ components: maxLength: 5000 nullable: true type: string + statement_descriptor_prefix_kana: + description: The Kana variation of the default text that appears on credit + card statements when a charge is made (Japan only). This field prefixes + any dynamic `statement_descriptor_suffix_kana` specified on the charge. + `statement_descriptor_prefix_kana` is useful for maximizing descriptor + space for the dynamic portion. + maxLength: 5000 + nullable: true + type: string + statement_descriptor_prefix_kanji: + description: The Kanji variation of the default text that appears on credit + card statements when a charge is made (Japan only). This field prefixes + any dynamic `statement_descriptor_suffix_kanji` specified on the charge. + `statement_descriptor_prefix_kanji` is useful for maximizing descriptor + space for the dynamic portion. + maxLength: 5000 + nullable: true + type: string title: AccountPaymentsSettings type: object x-expandableFields: [] @@ -949,6 +1059,7 @@ components: enum: - invalid_address_city_state_postal_code - invalid_street_address + - invalid_tos_acceptance - invalid_value_other - verification_document_address_mismatch - verification_document_address_missing @@ -1041,6 +1152,8 @@ components: "$ref": "#/components/schemas/account_payout_settings" sepa_debit_payments: "$ref": "#/components/schemas/account_sepa_debit_payments_settings" + treasury: + "$ref": "#/components/schemas/account_treasury_settings" required: - branding - card_payments @@ -1057,6 +1170,29 @@ components: - payments - payouts - sepa_debit_payments + - treasury + account_terms_of_service: + description: '' + properties: + date: + description: The Unix timestamp marking when the account representative + accepted the service agreement. + nullable: true + type: integer + ip: + description: The IP address from which the account representative accepted + the service agreement. + maxLength: 5000 + nullable: true + type: string + user_agent: + description: The user agent of the browser from which the account representative + accepted the service agreement. + maxLength: 5000 + type: string + title: AccountTermsOfService + type: object + x-expandableFields: [] account_tos_acceptance: description: '' properties: @@ -1085,6 +1221,15 @@ components: title: AccountTOSAcceptance type: object x-expandableFields: [] + account_treasury_settings: + description: '' + properties: + tos_acceptance: + "$ref": "#/components/schemas/account_terms_of_service" + title: AccountTreasurySettings + type: object + x-expandableFields: + - tos_acceptance account_unification_account_controller: description: '' properties: @@ -1141,90 +1286,6 @@ components: title: Address type: object x-expandableFields: [] - alipay_account: - description: '' - properties: - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: The ID of the customer associated with this Alipay Account. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - fingerprint: - description: Uniquely identifies the account and will be the same across - all Alipay account objects that are linked to the same Alipay account. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - alipay_account - type: string - payment_amount: - description: If the Alipay account object is not reusable, the exact amount - that you can create a charge for. - nullable: true - type: integer - payment_currency: - description: If the Alipay account object is not reusable, the exact currency - that you can create a charge for. - nullable: true - type: string - reusable: - description: True if you can create multiple payments using this account. - If the account is reusable, then you can freely choose the amount of each - payment. - type: boolean - used: - description: Whether this Alipay account object has ever been used for a - payment. - type: boolean - username: - description: The username for the Alipay account. - maxLength: 5000 - type: string - required: - - created - - fingerprint - - id - - livemode - - object - - reusable - - used - - username - title: AlipayAccount - type: object - x-expandableFields: - - customer - x-resourceId: alipay_account api_errors: description: '' properties: @@ -1496,11 +1557,77 @@ components: - originating_transaction - refunds x-resourceId: application_fee + apps.secret: + description: |- + Secret Store is an API that allows Stripe Apps developers to securely persist secrets for use by UI Extensions and app backends. + + The primary resource in Secret Store is a `secret`. Other apps can't view secrets created by an app. Additionally, secrets are scoped to provide further permission control. + + All Dashboard users and the app backend share `account` scoped secrets. Use the `account` scope for secrets that don't change per-user, like a third-party API key. + + A `user` scoped secret is accessible by the app backend and one specific Dashboard user. Use the `user` scope for per-user secrets like per-user OAuth tokens, where different users might have different permissions. + + Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects). + properties: + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + deleted: + description: If true, indicates that this secret has been deleted + type: boolean + expires_at: + description: The Unix timestamp for the expiry time of the secret, after + which the secret deletes. + format: unix-time + nullable: true + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + name: + description: A name for the secret that's unique within the scope. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - apps.secret + type: string + payload: + description: The plaintext secret value to be stored. + maxLength: 5000 + nullable: true + type: string + scope: + "$ref": "#/components/schemas/secret_service_resource_scope" + required: + - created + - id + - livemode + - name + - object + - scope + title: SecretServiceResourceSecret + type: object + x-expandableFields: + - scope + x-resourceId: apps.secret automatic_tax: description: '' properties: enabled: description: Whether Stripe automatically computes tax on this invoice. + Note that incompatible invoice items (invoice items with manually specified + [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, + or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. type: boolean status: description: The status of the most recent automated tax calculation for @@ -1946,6 +2073,169 @@ components: - account - customer x-resourceId: bank_account + bank_connections_resource_accountholder: + description: '' + properties: + account: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The ID of the Stripe account this account belongs to. Should + only be present if `account_holder.type` is `account`. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + description: ID of the Stripe customer this account belongs to. Present + if and only if `account_holder.type` is `customer`. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + type: + description: Type of account holder that this account belongs to. + enum: + - account + - customer + type: string + required: + - type + title: BankConnectionsResourceAccountholder + type: object + x-expandableFields: + - account + - customer + bank_connections_resource_balance: + description: '' + properties: + as_of: + description: The time that the external institution calculated this balance. + Measured in seconds since the Unix epoch. + format: unix-time + type: integer + cash: + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_cash_balance" + credit: + "$ref": "#/components/schemas/bank_connections_resource_balance_api_resource_credit_balance" + current: + additionalProperties: + type: integer + description: |- + The balances owed to (or by) the account holder. + + Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + + Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + type: object + type: + description: The `type` of the balance. An additional hash is included on + the balance with a name matching this value. + enum: + - cash + - credit + type: string + required: + - as_of + - current + - type + title: BankConnectionsResourceBalance + type: object + x-expandableFields: + - cash + - credit + bank_connections_resource_balance_api_resource_cash_balance: + description: '' + properties: + available: + additionalProperties: + type: integer + description: |- + The funds available to the account holder. Typically this is the current balance less any holds. + + Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + + Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + nullable: true + type: object + title: BankConnectionsResourceBalanceAPIResourceCashBalance + type: object + x-expandableFields: [] + bank_connections_resource_balance_api_resource_credit_balance: + description: '' + properties: + used: + additionalProperties: + type: integer + description: |- + The credit that has been used by the account holder. + + Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + + Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + nullable: true + type: object + title: BankConnectionsResourceBalanceAPIResourceCreditBalance + type: object + x-expandableFields: [] + bank_connections_resource_balance_refresh: + description: '' + properties: + last_attempted_at: + description: The time at which the last refresh attempt was initiated. Measured + in seconds since the Unix epoch. + format: unix-time + type: integer + status: + description: The status of the last refresh attempt. + enum: + - failed + - pending + - succeeded + type: string + required: + - last_attempted_at + - status + title: BankConnectionsResourceBalanceRefresh + type: object + x-expandableFields: [] + bank_connections_resource_link_account_session_filters: + description: '' + properties: + countries: + description: List of countries from which to filter accounts. + items: + maxLength: 5000 + type: string + nullable: true + type: array + title: BankConnectionsResourceLinkAccountSessionFilters + type: object + x-expandableFields: [] + bank_connections_resource_ownership_refresh: + description: '' + properties: + last_attempted_at: + description: The time at which the last refresh attempt was initiated. Measured + in seconds since the Unix epoch. + format: unix-time + type: integer + status: + description: The status of the last refresh attempt. + enum: + - failed + - pending + - succeeded + type: string + required: + - last_attempted_at + - status + title: BankConnectionsResourceOwnershipRefresh + type: object + x-expandableFields: [] billing_details: description: '' properties: @@ -1982,10 +2272,17 @@ components: portal sessions. type: boolean application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" description: ID of the Connect Application that created the configuration. - maxLength: 5000 nullable: true - type: string + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" business_profile: "$ref": "#/components/schemas/portal_business_profile" created: @@ -2015,6 +2312,8 @@ components: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + login_page: + "$ref": "#/components/schemas/portal_login_page" metadata: additionalProperties: maxLength: 500 @@ -2043,13 +2342,16 @@ components: - id - is_default - livemode + - login_page - object - updated title: PortalConfiguration type: object x-expandableFields: + - application - business_profile - features + - login_page x-resourceId: billing_portal.configuration billing_portal.session: description: |- @@ -2149,7 +2451,6 @@ components: - zh-TW nullable: true type: string - x-stripeBypassValidation: true object: description: String representing the object's type. Objects of the same type share the same value. @@ -2170,6 +2471,7 @@ components: description: The URL to redirect customers to when they click on the portal's link to return to your website. maxLength: 5000 + nullable: true type: string url: description: The short-lived URL of the session that gives customers access @@ -2183,216 +2485,12 @@ components: - id - livemode - object - - return_url - url title: PortalSession type: object x-expandableFields: - configuration x-resourceId: billing_portal.session - bitcoin_receiver: - description: '' - properties: - active: - description: True when this bitcoin receiver has received a non-zero amount - of bitcoin. - type: boolean - amount: - description: The amount of `currency` that you are collecting as payment. - type: integer - amount_received: - description: The amount of `currency` to which `bitcoin_amount_received` - has been converted. - type: integer - bitcoin_amount: - description: 'The amount of bitcoin that the customer should send to fill - the receiver. The `bitcoin_amount` is denominated in Satoshi: there are - 10^8 Satoshi in one bitcoin.' - type: integer - bitcoin_amount_received: - description: The amount of bitcoin that has been sent by the customer to - this receiver. - type: integer - bitcoin_uri: - description: This URI can be displayed to the customer as a clickable link - (to activate their bitcoin client) or as a QR code (for mobile wallets). - maxLength: 5000 - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) - to which the bitcoin will be converted. - type: string - customer: - description: The customer ID of the bitcoin receiver. - maxLength: 5000 - nullable: true - type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - nullable: true - type: string - email: - description: The customer's email address, set by the API call that creates - the receiver. - maxLength: 5000 - nullable: true - type: string - filled: - description: This flag is initially false and updates to true when the customer - sends the `bitcoin_amount` to this receiver. - type: boolean - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - inbound_address: - description: A bitcoin address that is specific to this receiver. The customer - can send bitcoin to this address to fill the receiver. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - bitcoin_receiver - type: string - payment: - description: The ID of the payment created from the receiver, if any. Hidden - when viewing the receiver with a publishable key. - maxLength: 5000 - nullable: true - type: string - refund_address: - description: The refund address of this bitcoin receiver. - maxLength: 5000 - nullable: true - type: string - transactions: - description: A list with one entry for each time that the customer sent - bitcoin to the receiver. Hidden when viewing the receiver with a publishable - key. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/bitcoin_transaction" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: BitcoinTransactionList - type: object - x-expandableFields: - - data - uncaptured_funds: - description: This receiver contains uncaptured funds that can be used for - a payment or refunded. - type: boolean - used_for_payment: - description: Indicate if this source is used for payment. - nullable: true - type: boolean - required: - - active - - amount - - amount_received - - bitcoin_amount - - bitcoin_amount_received - - bitcoin_uri - - created - - currency - - filled - - id - - inbound_address - - livemode - - object - - uncaptured_funds - title: BitcoinReceiver - type: object - x-expandableFields: - - transactions - x-resourceId: bitcoin_receiver - bitcoin_transaction: - description: '' - properties: - amount: - description: The amount of `currency` that the transaction was converted - to in real-time. - type: integer - bitcoin_amount: - description: The amount of bitcoin contained in the transaction. - type: integer - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) - to which this transaction was converted. - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - bitcoin_transaction - type: string - receiver: - description: The receiver to which this transaction was sent. - maxLength: 5000 - type: string - required: - - amount - - bitcoin_amount - - created - - currency - - id - - object - - receiver - title: BitcoinTransaction - type: object - x-expandableFields: [] - x-resourceId: bitcoin_transaction capability: description: |- This is an object representing a capability for a Stripe account. @@ -2623,18 +2721,13 @@ components: enum: - card type: string - recipient: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/recipient" - description: The recipient that this card belongs to. This attribute will - not be in the card object if the card belongs to a customer or account - instead. + status: + description: For external accounts, possible values are `new` and `errored`. + If a transfer fails, the status is set to `errored` and transfers are + stopped until account details are updated. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/recipient" + type: string tokenization_method: description: If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, @@ -2655,7 +2748,6 @@ components: x-expandableFields: - account - customer - - recipient x-resourceId: card card_generated_from_payment_method_details: description: '' @@ -2701,6 +2793,45 @@ components: title: card_mandate_payment_method_details type: object x-expandableFields: [] + cash_balance: + description: A customer's `Cash balance` represents real funds. Customers can + add funds to their cash balance by sending a bank transfer. These funds can + be used for payment and can eventually be paid out to your bank account. + properties: + available: + additionalProperties: + type: integer + description: A hash of all cash balances available to this customer. You + cannot delete a customer with any cash balances, even if the balance is + 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + nullable: true + type: object + customer: + description: The ID of the customer whose cash balance this object represents. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - cash_balance + type: string + settings: + "$ref": "#/components/schemas/customer_balance_customer_balance_settings" + required: + - customer + - livemode + - object + - settings + title: cash_balance + type: object + x-expandableFields: + - settings + x-resourceId: cash_balance charge: description: |- To charge a credit or a debit card, you create a `Charge` object. You can @@ -2808,6 +2939,17 @@ components: disputed: description: Whether the charge has been disputed. type: boolean + failure_balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: ID of the balance transaction that describes the reversal of + the balance on your account due to payment failure. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" failure_code: description: Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list @@ -2870,16 +3012,6 @@ components: x-expansionResources: oneOf: - "$ref": "#/components/schemas/account" - order: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/order" - description: ID of the order this charge is for if one exists. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/order" outcome: anyOf: - "$ref": "#/components/schemas/charge_outcome" @@ -2911,6 +3043,8 @@ components: - "$ref": "#/components/schemas/payment_method_details" description: Details about the payment method at the time of the transaction. nullable: true + radar_options: + "$ref": "#/components/schemas/radar_radar_options" receipt_email: description: This is the email address that the receipt for this charge was sent to. @@ -3057,7 +3191,6 @@ components: - object - paid - refunded - - refunds - status title: Charge type: object @@ -3067,13 +3200,14 @@ components: - balance_transaction - billing_details - customer + - failure_balance_transaction - fraud_details - invoice - on_behalf_of - - order - outcome - payment_intent - payment_method_details + - radar_options - refunds - review - shipping @@ -3201,7 +3335,7 @@ components: 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). + Related guide: [Checkout Quickstart](https://stripe.com/docs/checkout/quickstart). properties: after_expiration: anyOf: @@ -3255,6 +3389,11 @@ components: description: When set, provides configuration for the Checkout Session to gather active consent from customers. nullable: true + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -3289,8 +3428,8 @@ components: anyOf: - "$ref": "#/components/schemas/payment_pages_checkout_session_customer_details" description: The customer details including the customer's tax exempt status - and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` - mode. + and the customer's tax IDs. Only the customer's email is present on Sessions + in `setup` mode. nullable: true customer_email: description: |- @@ -3438,6 +3577,14 @@ components: x-expansionResources: oneOf: - "$ref": "#/components/schemas/payment_link" + payment_method_collection: + description: Configure whether a Checkout Session should collect a payment + method. + enum: + - always + - if_required + nullable: true + type: string payment_method_options: anyOf: - "$ref": "#/components/schemas/checkout_session_payment_method_options" @@ -3480,33 +3627,28 @@ components: x-expansionResources: oneOf: - "$ref": "#/components/schemas/setup_intent" - shipping: - anyOf: - - "$ref": "#/components/schemas/shipping" - description: Shipping information for this Checkout Session. - nullable: true shipping_address_collection: anyOf: - "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_address_collection" description: When set, provides configuration for Checkout to collect a shipping address from a customer. nullable: true + shipping_cost: + anyOf: + - "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_cost" + description: The details of the customer cost of shipping, including the + customer chosen ShippingRate. + nullable: true + shipping_details: + anyOf: + - "$ref": "#/components/schemas/shipping" + description: Shipping information for this Checkout Session. + nullable: true shipping_options: description: The shipping rate options applied to this Session. items: "$ref": "#/components/schemas/payment_pages_checkout_session_shipping_option" type: array - shipping_rate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/shipping_rate" - description: The ID of the ShippingRate for Checkout Sessions in `payment` - mode. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/shipping_rate" status: description: The status of the Checkout Session, one of `open`, `complete`, or `expired`. @@ -3554,13 +3696,16 @@ components: description: Tax and discount details for the computed total amount. nullable: true url: - description: The URL to the Checkout Session. + description: |- + The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` + This value is only present when the session is active. maxLength: 5000 nullable: true type: string required: - automatic_tax - cancel_url + - created - expires_at - id - livemode @@ -3585,10 +3730,10 @@ components: - payment_method_options - phone_number_collection - setup_intent - - shipping - shipping_address_collection + - shipping_cost + - shipping_details - shipping_options - - shipping_rate - subscription - tax_id_collection - total_details @@ -3645,6 +3790,18 @@ components: type: string mandate_options: "$ref": "#/components/schemas/checkout_acss_debit_mandate_options" + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string verification_method: description: Bank account verification method. enum: @@ -3657,6 +3814,104 @@ components: type: object x-expandableFields: - mandate_options + checkout_affirm_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutAffirmPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_afterpay_clearpay_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutAfterpayClearpayPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_alipay_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutAlipayPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_au_becs_debit_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutAuBecsDebitPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_bacs_debit_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + title: CheckoutBacsDebitPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_bancontact_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutBancontactPaymentMethodOptions + type: object + x-expandableFields: [] checkout_boleto_payment_method_options: description: '' properties: @@ -3666,157 +3921,577 @@ components: to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. type: integer + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string required: - expires_after_days title: CheckoutBoletoPaymentMethodOptions type: object x-expandableFields: [] - checkout_oxxo_payment_method_options: + checkout_card_installments_options: description: '' properties: - expires_after_days: - description: The number of calendar days before an OXXO invoice expires. - For example, if you create an OXXO invoice on Monday and you set expires_after_days - to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City - time. - type: integer - required: - - expires_after_days - title: CheckoutOxxoPaymentMethodOptions + enabled: + description: Indicates if installments are enabled + type: boolean + title: CheckoutCardInstallmentsOptions type: object x-expandableFields: [] - checkout_session_payment_method_options: - description: '' - properties: - acss_debit: - "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" - boleto: - "$ref": "#/components/schemas/checkout_boleto_payment_method_options" - oxxo: - "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" - title: CheckoutSessionPaymentMethodOptions - type: object - x-expandableFields: - - acss_debit - - boleto - - oxxo - connect_collection_transfer: + checkout_card_payment_method_options: description: '' properties: - amount: - description: Amount transferred, in %s. - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + installments: + "$ref": "#/components/schemas/checkout_card_installments_options" + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session type: string - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: ID of the account that funds are being collected for. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - id: - description: Unique identifier for the object. + statement_descriptor_suffix_kana: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the Kana prefix (shortened Kana + descriptor) or Kana statement descriptor that’s set on the account to + form the complete statement descriptor. Maximum 22 characters. On card + statements, the *concatenation* of both prefix and suffix (including separators) + will appear truncated to 22 characters. maxLength: 5000 type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - connect_collection_transfer + statement_descriptor_suffix_kanji: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the Kanji prefix (shortened Kanji + descriptor) or Kanji statement descriptor that’s set on the account to + form the complete statement descriptor. Maximum 17 characters. On card + statements, the *concatenation* of both prefix and suffix (including separators) + will appear truncated to 17 characters. + maxLength: 5000 type: string - required: - - amount - - currency - - destination - - id - - livemode - - object - title: ConnectCollectionTransfer + title: CheckoutCardPaymentMethodOptions type: object x-expandableFields: - - destination - country_spec: - description: |- - Stripe needs to collect certain pieces of information about each account - created. These requirements can differ depending on the account's country. The - Country Specs API makes these rules available to your integration. - - You can also view the information from this API call as [an online - guide](/docs/connect/required-verification-information). + - installments + checkout_customer_balance_bank_transfer_payment_method_options: + description: '' properties: - default_currency: - description: The default currency for this country. This applies to both - payment methods and bank accounts. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. Represented as the ISO country - code for this country. - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - country_spec - type: string - supported_bank_account_currencies: - additionalProperties: - items: - maxLength: 5000 - type: string - type: array - description: Currencies that can be accepted in the specific country (for - transfers). - type: object - supported_payment_currencies: - description: Currencies that can be accepted in the specified country (for - payments). - items: - maxLength: 5000 - type: string - type: array - supported_payment_methods: - description: Payment methods available in the specified country. You may - need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) - on your account before they appear in this list. The `stripe` payment - method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). - items: - maxLength: 5000 - type: string - type: array - supported_transfer_countries: - description: Countries that can accept transfers from the specified country. + eu_bank_transfer: + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + requested_address_types: + description: |- + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. items: - maxLength: 5000 + enum: + - iban + - sepa + - sort_code + - spei + - zengin type: string + x-stripeBypassValidation: true type: array - verification_fields: - "$ref": "#/components/schemas/country_spec_verification_fields" - required: - - default_currency - - id - - object - - supported_bank_account_currencies - - supported_payment_currencies - - supported_payment_methods - - supported_transfer_countries - - verification_fields - title: CountrySpec + type: + description: 'The bank transfer type that this PaymentIntent is allowed + to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, + `jp_bank_transfer`, or `mx_bank_transfer`.' + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + nullable: true + type: string + x-stripeBypassValidation: true + title: CheckoutCustomerBalanceBankTransferPaymentMethodOptions type: object x-expandableFields: - - verification_fields - x-resourceId: country_spec - country_spec_verification_field_details: + - eu_bank_transfer + checkout_customer_balance_payment_method_options: + description: '' + properties: + bank_transfer: + "$ref": "#/components/schemas/checkout_customer_balance_bank_transfer_payment_method_options" + funding_type: + description: 'The funding method type to be used when there are not enough + funds in the customer balance. Permitted values include: `bank_transfer`.' + enum: + - bank_transfer + nullable: true + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutCustomerBalancePaymentMethodOptions + type: object + x-expandableFields: + - bank_transfer + checkout_eps_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutEpsPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_fpx_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutFpxPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_giropay_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutGiropayPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_grab_pay_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutGrabPayPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_ideal_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutIdealPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_klarna_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + title: CheckoutKlarnaPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_konbini_payment_method_options: + description: '' + properties: + expires_after_days: + description: The number of calendar days (between 1 and 60) after which + Konbini payment instructions will expire. For example, if a PaymentIntent + is confirmed with Konbini and `expires_after_days` set to 2 on Monday + JST, the instructions will expire on Wednesday 23:59:59 JST. + nullable: true + type: integer + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutKonbiniPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_oxxo_payment_method_options: + description: '' + properties: + expires_after_days: + description: The number of calendar days before an OXXO invoice expires. + For example, if you create an OXXO invoice on Monday and you set expires_after_days + to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City + time. + type: integer + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + required: + - expires_after_days + title: CheckoutOxxoPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_p24_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutP24PaymentMethodOptions + type: object + x-expandableFields: [] + checkout_paynow_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutPaynowPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_pix_payment_method_options: + description: '' + properties: + expires_after_seconds: + description: The number of seconds after which Pix payment will expire. + nullable: true + type: integer + title: CheckoutPixPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_sepa_debit_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + title: CheckoutSepaDebitPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_session_payment_method_options: + description: '' + properties: + acss_debit: + "$ref": "#/components/schemas/checkout_acss_debit_payment_method_options" + affirm: + "$ref": "#/components/schemas/checkout_affirm_payment_method_options" + afterpay_clearpay: + "$ref": "#/components/schemas/checkout_afterpay_clearpay_payment_method_options" + alipay: + "$ref": "#/components/schemas/checkout_alipay_payment_method_options" + au_becs_debit: + "$ref": "#/components/schemas/checkout_au_becs_debit_payment_method_options" + bacs_debit: + "$ref": "#/components/schemas/checkout_bacs_debit_payment_method_options" + bancontact: + "$ref": "#/components/schemas/checkout_bancontact_payment_method_options" + boleto: + "$ref": "#/components/schemas/checkout_boleto_payment_method_options" + card: + "$ref": "#/components/schemas/checkout_card_payment_method_options" + customer_balance: + "$ref": "#/components/schemas/checkout_customer_balance_payment_method_options" + eps: + "$ref": "#/components/schemas/checkout_eps_payment_method_options" + fpx: + "$ref": "#/components/schemas/checkout_fpx_payment_method_options" + giropay: + "$ref": "#/components/schemas/checkout_giropay_payment_method_options" + grabpay: + "$ref": "#/components/schemas/checkout_grab_pay_payment_method_options" + ideal: + "$ref": "#/components/schemas/checkout_ideal_payment_method_options" + klarna: + "$ref": "#/components/schemas/checkout_klarna_payment_method_options" + konbini: + "$ref": "#/components/schemas/checkout_konbini_payment_method_options" + oxxo: + "$ref": "#/components/schemas/checkout_oxxo_payment_method_options" + p24: + "$ref": "#/components/schemas/checkout_p24_payment_method_options" + paynow: + "$ref": "#/components/schemas/checkout_paynow_payment_method_options" + pix: + "$ref": "#/components/schemas/checkout_pix_payment_method_options" + sepa_debit: + "$ref": "#/components/schemas/checkout_sepa_debit_payment_method_options" + sofort: + "$ref": "#/components/schemas/checkout_sofort_payment_method_options" + us_bank_account: + "$ref": "#/components/schemas/checkout_us_bank_account_payment_method_options" + title: CheckoutSessionPaymentMethodOptions + type: object + x-expandableFields: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - boleto + - card + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - oxxo + - p24 + - paynow + - pix + - sepa_debit + - sofort + - us_bank_account + checkout_sofort_payment_method_options: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: CheckoutSofortPaymentMethodOptions + type: object + x-expandableFields: [] + checkout_us_bank_account_payment_method_options: + description: '' + properties: + financial_connections: + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + type: string + x-stripeBypassValidation: true + title: CheckoutUsBankAccountPaymentMethodOptions + type: object + x-expandableFields: + - financial_connections + connect_collection_transfer: + description: '' + properties: + amount: + description: Amount transferred, in %s. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + destination: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: ID of the account that funds are being collected for. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - connect_collection_transfer + type: string + required: + - amount + - currency + - destination + - id + - livemode + - object + title: ConnectCollectionTransfer + type: object + x-expandableFields: + - destination + country_spec: + description: |- + Stripe needs to collect certain pieces of information about each account + created. These requirements can differ depending on the account's country. The + Country Specs API makes these rules available to your integration. + + You can also view the information from this API call as [an online + guide](/docs/connect/required-verification-information). + properties: + default_currency: + description: The default currency for this country. This applies to both + payment methods and bank accounts. + maxLength: 5000 + type: string + id: + description: Unique identifier for the object. Represented as the ISO country + code for this country. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - country_spec + type: string + supported_bank_account_currencies: + additionalProperties: + items: + maxLength: 5000 + type: string + type: array + description: Currencies that can be accepted in the specific country (for + transfers). + type: object + supported_payment_currencies: + description: Currencies that can be accepted in the specified country (for + payments). + items: + maxLength: 5000 + type: string + type: array + supported_payment_methods: + description: Payment methods available in the specified country. You may + need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) + on your account before they appear in this list. The `stripe` payment + method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). + items: + maxLength: 5000 + type: string + type: array + supported_transfer_countries: + description: Countries that can accept transfers from the specified country. + items: + maxLength: 5000 + type: string + type: array + verification_fields: + "$ref": "#/components/schemas/country_spec_verification_fields" + required: + - default_currency + - id + - object + - supported_bank_account_currencies + - supported_payment_currencies + - supported_payment_methods + - supported_transfer_countries + - verification_fields + title: CountrySpec + type: object + x-expandableFields: + - verification_fields + x-resourceId: country_spec + country_spec_verification_field_details: description: '' properties: additional: @@ -3855,8 +4530,8 @@ components: coupon: description: |- A coupon contains information about a percent-off or amount-off discount you - might want to apply to a customer. Coupons may be applied to [invoices](https://stripe.com/docs/api#invoices) or - [orders](https://stripe.com/docs/api#create_order_legacy-coupon). Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge). + might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), + [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). properties: amount_off: description: Amount (in the `currency` specified) that will be taken off @@ -3876,6 +4551,13 @@ components: off. nullable: true type: string + currency_options: + additionalProperties: + "$ref": "#/components/schemas/coupon_currency_option" + description: Coupons defined in each available currency option. Each key + must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object duration: description: One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. @@ -3953,6 +4635,7 @@ components: type: object x-expandableFields: - applies_to + - currency_options x-resourceId: coupon coupon_applies_to: description: '' @@ -3968,6 +4651,18 @@ components: title: CouponAppliesTo type: object x-expandableFields: [] + coupon_currency_option: + description: '' + properties: + amount_off: + description: Amount (in the `currency` specified) that will be taken off + the subtotal of any invoices for this customer. + type: integer + required: + - amount_off + title: CouponCurrencyOption + type: object + x-expandableFields: [] credit_note: description: |- Issue a credit note to adjust an invoice's amount after the invoice is finalized. @@ -4128,7 +4823,12 @@ components: type: string subtotal: description: The integer amount in %s representing the amount of the credit - note, excluding tax and invoice level discounts. + note, excluding exclusive tax and invoice level discounts. + type: integer + subtotal_excluding_tax: + description: The integer amount in %s representing the amount of the credit + note, excluding all tax and invoice level discounts. + nullable: true type: integer tax_amounts: description: The aggregate amounts calculated per tax rate for all line @@ -4140,6 +4840,11 @@ components: description: The integer amount in %s representing the total amount of the credit note, including tax and all discount. type: integer + total_excluding_tax: + description: The integer amount in %s representing the total amount of the + credit note, excluding tax, but including discounts. + nullable: true + type: integer type: description: Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. @@ -4191,6 +4896,11 @@ components: description: The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. type: integer + amount_excluding_tax: + description: The integer amount in %s representing the amount being credited + for this line item, excluding all tax and discounts. + nullable: true + type: integer description: description: Description of the item being credited. maxLength: 5000 @@ -4257,6 +4967,12 @@ components: format: decimal nullable: true type: string + unit_amount_excluding_tax: + description: The amount in %s representing the unit amount being credited + for this line item, excluding all tax and discounts. + format: decimal + nullable: true + type: string required: - amount - discount_amount @@ -4300,6 +5016,67 @@ components: type: object x-expandableFields: - tax_rate + currency_option: + description: '' + properties: + custom_unit_amount: + anyOf: + - "$ref": "#/components/schemas/custom_unit_amount" + description: When set, provides configuration for the amount to be adjusted + by the customer during Checkout Sessions and Payment Links. + nullable: true + tax_behavior: + description: Specifies whether the price is considered inclusive of taxes + or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + Once specified as either `inclusive` or `exclusive`, it cannot be changed. + enum: + - exclusive + - inclusive + - unspecified + nullable: true + type: string + tiers: + description: Each element represents a pricing tier. This parameter requires + `billing_scheme` to be set to `tiered`. See also the documentation for + `billing_scheme`. + items: + "$ref": "#/components/schemas/price_tier" + type: array + unit_amount: + description: The unit amount in %s to be charged, represented as a whole + integer if possible. Only set if `billing_scheme=per_unit`. + nullable: true + type: integer + unit_amount_decimal: + description: The unit amount in %s to be charged, represented as a decimal + string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + format: decimal + nullable: true + type: string + title: CurrencyOption + type: object + x-expandableFields: + - custom_unit_amount + - tiers + custom_unit_amount: + description: '' + properties: + maximum: + description: The maximum unit amount the customer can specify for this item. + nullable: true + type: integer + minimum: + description: The minimum unit amount the customer can specify for this item. + Must be at least the minimum charge amount. + nullable: true + type: integer + preset: + description: The starting unit amount which can be updated by the customer. + nullable: true + type: integer + title: CustomUnitAmount + type: object + x-expandableFields: [] customer: description: |- This object represents a customer of your business. It lets you create recurring charges and track payments that belong to the same customer. @@ -4319,6 +5096,14 @@ components: account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account as invoices are finalized. type: integer + cash_balance: + anyOf: + - "$ref": "#/components/schemas/cash_balance" + description: The current funds being held by Stripe on behalf of the customer. + These funds can be applied towards payment intents with source "cash_balance".The + settings[reconciliation_mode] field describes whether these funds are + applied to such payment intents manually or automatically. + nullable: true created: description: Time at which the object was created. Measured in seconds since the Unix epoch. @@ -4334,9 +5119,7 @@ components: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" description: |- @@ -4346,11 +5129,10 @@ components: nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" + x-stripeBypassValidation: true delinquent: description: |- When the customer's latest invoice is billed by charging automatically, `delinquent` is `true` if the invoice's latest charge failed. When the customer's latest invoice is billed by sending an invoice, `delinquent` is `true` if the invoice isn't paid by its due date. @@ -4379,6 +5161,18 @@ components: description: Unique identifier for the object. maxLength: 5000 type: string + invoice_credit_balance: + additionalProperties: + type: integer + description: The current multi-currency balances, if any, being stored on + the customer.If positive in a currency, the customer has a credit to apply + to their next invoice denominated in that currency.If negative, the customer + has an amount owed that will be added to their next invoice denominated + in that currency. These balances do not refer to any unpaid invoices.They + solely track amounts that have yet to be successfully applied to any invoice. + A balance in a particular currency is only applied to any invoice as an + invoice in that currency is finalized. + type: object invoice_prefix: description: The prefix for the customer used to generate unique invoice numbers. @@ -4438,12 +5232,11 @@ components: description: Details about each object. items: anyOf: - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" title: Polymorphic + x-stripeBypassValidation: true type: array has_more: description: True if this list has another page of items after this @@ -4542,6 +5335,16 @@ components: type: object x-expandableFields: - data + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this customer belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" required: - created - id @@ -4551,6 +5354,7 @@ components: type: object x-expandableFields: - address + - cash_balance - default_source - discount - invoice_settings @@ -4559,6 +5363,7 @@ components: - subscriptions - tax - tax_ids + - test_clock x-resourceId: customer customer_acceptance: description: '' @@ -4586,37 +5391,168 @@ components: x-expandableFields: - offline - online - customer_balance_transaction: - description: |- - Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, - which denotes a debit or credit that's automatically applied to their next invoice upon finalization. - You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), - or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. - - Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. + customer_balance_customer_balance_settings: + description: '' properties: - amount: - description: The amount of the transaction. A negative value is a credit - for the customer's balance, and a positive value is a debit to the customer's - `balance`. - type: integer - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - credit_note: + reconciliation_mode: + description: The configuration for how funds that land in the customer cash + balance are reconciled. + enum: + - automatic + - manual + type: string + required: + - reconciliation_mode + title: CustomerBalanceCustomerBalanceSettings + type: object + x-expandableFields: [] + customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction: + description: '' + properties: + payment_intent: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/credit_note" - description: The ID of the credit note (if any) related to the transaction. - nullable: true + - "$ref": "#/components/schemas/payment_intent" + description: The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) + that funds were applied to. x-expansionResources: oneOf: - - "$ref": "#/components/schemas/credit_note" - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + - "$ref": "#/components/schemas/payment_intent" + required: + - payment_intent + title: CustomerBalanceResourceCashBalanceTransactionResourceAppliedToPaymentTransaction + type: object + x-expandableFields: + - payment_intent + customer_balance_resource_cash_balance_transaction_resource_funded_transaction: + description: '' + properties: + bank_transfer: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer" + required: + - bank_transfer + title: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransaction + type: object + x-expandableFields: + - bank_transfer + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer: + description: '' + properties: + eu_bank_transfer: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer" + reference: + description: The user-supplied reference field on the bank transfer. + maxLength: 5000 + nullable: true + type: string + type: + description: 'The funding method type used to fund the customer balance. + Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, + or `mx_bank_transfer`.' + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransfer + type: object + x-expandableFields: + - eu_bank_transfer + customer_balance_resource_cash_balance_transaction_resource_funded_transaction_resource_bank_transfer_resource_eu_bank_transfer: + description: '' + properties: + bic: + description: The BIC of the bank of the sender of the funding. + maxLength: 5000 + nullable: true + type: string + iban_last4: + description: The last 4 digits of the IBAN of the sender of the funding. + maxLength: 5000 + nullable: true + type: string + sender_name: + description: The full name of the sender, as supplied by the sending bank. + maxLength: 5000 + nullable: true + type: string + title: CustomerBalanceResourceCashBalanceTransactionResourceFundedTransactionResourceBankTransferResourceEuBankTransfer + type: object + x-expandableFields: [] + customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction: + description: '' + properties: + refund: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/refund" + description: The [Refund](https://stripe.com/docs/api/refunds/object) that + moved these funds into the customer's cash balance. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/refund" + required: + - refund + title: CustomerBalanceResourceCashBalanceTransactionResourceRefundedFromPaymentTransaction + type: object + x-expandableFields: + - refund + customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction: + description: '' + properties: + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_intent" + description: The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) + that funds were unapplied from. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_intent" + required: + - payment_intent + title: CustomerBalanceResourceCashBalanceTransactionResourceUnappliedFromPaymentTransaction + type: object + x-expandableFields: + - payment_intent + customer_balance_transaction: + description: |- + Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) value, + which denotes a debit or credit that's automatically applied to their next invoice upon finalization. + You may modify the value directly by using the [update customer API](https://stripe.com/docs/api/customers/update), + or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`. + + Related guide: [Customer Balance](https://stripe.com/docs/billing/customer/balance) to learn more. + properties: + amount: + description: The amount of the transaction. A negative value is a credit + for the customer's balance, and a positive value is a debit to the customer's + `balance`. + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + credit_note: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/credit_note" + description: The ID of the credit note (if any) related to the transaction. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/credit_note" + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string customer: @@ -4705,6 +5641,99 @@ components: - customer - invoice x-resourceId: customer_balance_transaction + customer_cash_balance_transaction: + description: |- + Customers with certain payments enabled have a cash balance, representing funds that were paid + by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + to payments, and refunds to the customer. + properties: + applied_to_payment: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_applied_to_payment_transaction" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + maxLength: 5000 + type: string + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + description: The customer whose available cash balance changed as a result + of this transaction. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + ending_balance: + description: The total available cash balance for the specified currency + after this transaction was applied. Represented in the [smallest currency + unit](https://stripe.com/docs/currencies#zero-decimal). + type: integer + funded: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_funded_transaction" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + net_amount: + description: The amount by which the cash balance changed, represented in + the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + A positive value represents funds being added to the cash balance, a negative + value represents funds being removed from the cash balance. + type: integer + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - customer_cash_balance_transaction + type: string + refunded_from_payment: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_refunded_from_payment_transaction" + type: + description: The type of the cash balance transaction. One of `applied_to_payment`, + `unapplied_from_payment`, `refunded_from_payment`, `funded`, `return_initiated`, + or `return_canceled`. New types may be added in future. See [Customer + Balance](https://stripe.com/docs/payments/customer-balance#types) to learn + more about these types. + enum: + - applied_to_payment + - funded + - refunded_from_payment + - return_canceled + - return_initiated + - unapplied_from_payment + type: string + unapplied_from_payment: + "$ref": "#/components/schemas/customer_balance_resource_cash_balance_transaction_resource_unapplied_from_payment_transaction" + required: + - created + - currency + - customer + - ending_balance + - id + - livemode + - net_amount + - object + - type + title: CustomerCashBalanceTransaction + type: object + x-expandableFields: + - applied_to_payment + - customer + - funded + - refunded_from_payment + - unapplied_from_payment + x-resourceId: customer_cash_balance_transaction customer_tax: description: '' properties: @@ -4787,7 +5816,7 @@ components: type: object x-expandableFields: [] x-resourceId: deleted_account - deleted_alipay_account: + deleted_apple_pay_domain: description: '' properties: deleted: @@ -4803,16 +5832,17 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - alipay_account + - apple_pay_domain type: string required: - deleted - id - object - title: AlipayDeletedAccount + title: DeletedApplePayDomain type: object x-expandableFields: [] - deleted_apple_pay_domain: + x-resourceId: deleted_apple_pay_domain + deleted_application: description: '' properties: deleted: @@ -4824,20 +5854,24 @@ components: description: Unique identifier for the object. maxLength: 5000 type: string + name: + description: The name of the application. + maxLength: 5000 + nullable: true + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - apple_pay_domain + - application type: string required: - deleted - id - object - title: DeletedApplePayDomain + title: DeletedApplication type: object x-expandableFields: [] - x-resourceId: deleted_apple_pay_domain deleted_bank_account: description: '' properties: @@ -4869,31 +5903,6 @@ components: title: DeletedBankAccount type: object x-expandableFields: [] - deleted_bitcoin_receiver: - description: '' - properties: - deleted: - description: Always true for a deleted object - enum: - - true - type: boolean - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - bitcoin_receiver - type: string - required: - - deleted - - id - - object - title: BitcoinDeletedReceiver - type: object - x-expandableFields: [] deleted_card: description: '' properties: @@ -5126,12 +6135,11 @@ components: x-resourceId: deleted_invoiceitem deleted_payment_source: anyOf: - - "$ref": "#/components/schemas/deleted_alipay_account" - "$ref": "#/components/schemas/deleted_bank_account" - - "$ref": "#/components/schemas/deleted_bitcoin_receiver" - "$ref": "#/components/schemas/deleted_card" title: Polymorphic x-resourceId: deleted_payment_source + x-stripeBypassValidation: true deleted_person: description: '' properties: @@ -5287,7 +6295,7 @@ components: type: object x-expandableFields: [] x-resourceId: deleted_radar.value_list_item - deleted_recipient: + deleted_sku: description: '' properties: deleted: @@ -5303,17 +6311,17 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - recipient + - sku type: string required: - deleted - id - object - title: DeletedTransferRecipient + title: DeletedSku type: object x-expandableFields: [] - x-resourceId: deleted_recipient - deleted_sku: + x-resourceId: deleted_sku + deleted_subscription_item: description: '' properties: deleted: @@ -5329,17 +6337,17 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - sku + - subscription_item type: string required: - deleted - id - object - title: DeletedSku + title: DeletedSubscriptionItem type: object x-expandableFields: [] - x-resourceId: deleted_sku - deleted_subscription_item: + x-resourceId: deleted_subscription_item + deleted_tax_id: description: '' properties: deleted: @@ -5355,17 +6363,17 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - subscription_item + - tax_id type: string required: - deleted - id - object - title: DeletedSubscriptionItem + title: deleted_tax_id type: object x-expandableFields: [] - x-resourceId: deleted_subscription_item - deleted_tax_id: + x-resourceId: deleted_tax_id + deleted_terminal.configuration: description: '' properties: deleted: @@ -5381,16 +6389,16 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - tax_id + - terminal.configuration type: string required: - deleted - id - object - title: deleted_tax_id + title: TerminalConfigurationDeletedConfiguration type: object x-expandableFields: [] - x-resourceId: deleted_tax_id + x-resourceId: deleted_terminal.configuration deleted_terminal.location: description: '' properties: @@ -5443,7 +6451,7 @@ components: type: object x-expandableFields: [] x-resourceId: deleted_terminal.reader - deleted_webhook_endpoint: + deleted_test_helpers.test_clock: description: '' properties: deleted: @@ -5459,48 +6467,46 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - webhook_endpoint + - test_helpers.test_clock type: string required: - deleted - id - object - title: NotificationWebhookEndpointDeleted + title: DeletedTestClock type: object x-expandableFields: [] - x-resourceId: deleted_webhook_endpoint - delivery_estimate: + x-resourceId: deleted_test_helpers.test_clock + deleted_webhook_endpoint: description: '' properties: - date: - description: If `type` is `"exact"`, `date` will be the expected delivery - date in the format YYYY-MM-DD. - maxLength: 5000 - type: string - earliest: - description: If `type` is `"range"`, `earliest` will be be the earliest - delivery date in the format YYYY-MM-DD. - maxLength: 5000 - type: string - latest: - description: If `type` is `"range"`, `latest` will be the latest delivery - date in the format YYYY-MM-DD. + deleted: + description: Always true for a deleted object + enum: + - true + type: boolean + id: + description: Unique identifier for the object. maxLength: 5000 type: string - type: - description: The type of estimate. Must be either `"range"` or `"exact"`. - maxLength: 5000 + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - webhook_endpoint type: string required: - - type - title: DeliveryEstimate + - deleted + - id + - object + title: NotificationWebhookEndpointDeleted type: object x-expandableFields: [] + x-resourceId: deleted_webhook_endpoint discount: description: |- - A discount represents the actual application of a coupon to a particular - customer. It contains information about when the discount began and when it - will end. + A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + It contains information about when the discount began, when it will end, and what it is applied to. Related guide: [Applying Discounts to Subscriptions](https://stripe.com/docs/billing/subscriptions/discounts). properties: @@ -5999,6 +7005,23 @@ components: title: DisputeEvidenceDetails type: object x-expandableFields: [] + email_sent: + description: '' + properties: + email_sent_at: + description: The timestamp when the email was sent. + format: unix-time + type: integer + email_sent_to: + description: The recipient's email address. + maxLength: 5000 + type: string + required: + - email_sent_at + - email_sent_to + title: EmailSent + type: object + x-expandableFields: [] ephemeral_key: description: '' properties: @@ -6345,6 +7368,7 @@ components: url: description: The URL where this list can be accessed. maxLength: 5000 + pattern: "^/v1/file_links" type: string required: - data @@ -6379,6 +7403,7 @@ components: - selfie - sigma_scheduled_query - tax_document_user_upload + - terminal_reader_splashscreen type: string x-stripeBypassValidation: true size: @@ -6480,6 +7505,359 @@ components: x-expandableFields: - file x-resourceId: file_link + financial_connections.account: + description: A Financial Connections Account represents an account that exists + outside of Stripe, to which you have been granted some degree of access. + properties: + account_holder: + anyOf: + - "$ref": "#/components/schemas/bank_connections_resource_accountholder" + description: The account holder that this account belongs to. + nullable: true + balance: + anyOf: + - "$ref": "#/components/schemas/bank_connections_resource_balance" + description: The most recent information about the account's balance. + nullable: true + balance_refresh: + anyOf: + - "$ref": "#/components/schemas/bank_connections_resource_balance_refresh" + description: The state of the most recent attempt to refresh the account + balance. + nullable: true + category: + description: The type of the account. Account category is further divided + in `subcategory`. + enum: + - cash + - credit + - investment + - other + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + display_name: + description: A human-readable name that has been assigned to this account, + either by the account holder or by the institution. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + institution_name: + description: The name of the institution that holds this account. + maxLength: 5000 + type: string + last4: + description: The last 4 digits of the account number. If present, this will + be 4 numeric characters. + maxLength: 5000 + nullable: true + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - financial_connections.account + type: string + ownership: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/financial_connections.account_ownership" + description: The most recent information about the account's owners. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/financial_connections.account_ownership" + ownership_refresh: + anyOf: + - "$ref": "#/components/schemas/bank_connections_resource_ownership_refresh" + description: The state of the most recent attempt to refresh the account + owners. + nullable: true + permissions: + description: The list of permissions granted by this account. + items: + enum: + - balances + - ownership + - payment_method + - transactions + type: string + nullable: true + type: array + status: + description: The status of the link to the account. + enum: + - active + - disconnected + - inactive + type: string + subcategory: + description: |- + If `category` is `cash`, one of: + + - `checking` + - `savings` + - `other` + + If `category` is `credit`, one of: + + - `mortgage` + - `line_of_credit` + - `credit_card` + - `other` + + If `category` is `investment` or `other`, this will be `other`. + enum: + - checking + - credit_card + - line_of_credit + - mortgage + - other + - savings + type: string + supported_payment_method_types: + description: The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) + that can be created from this account. + items: + enum: + - link + - us_bank_account + type: string + type: array + required: + - category + - created + - id + - institution_name + - livemode + - object + - status + - subcategory + - supported_payment_method_types + title: BankConnectionsResourceLinkedAccount + type: object + x-expandableFields: + - account_holder + - balance + - balance_refresh + - ownership + - ownership_refresh + x-resourceId: financial_connections.account + financial_connections.account_owner: + description: '' + properties: + email: + description: The email address of the owner. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + name: + description: The full name of the owner. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - financial_connections.account_owner + type: string + ownership: + description: The ownership object that this owner belongs to. + maxLength: 5000 + type: string + phone: + description: The raw phone number of the owner. + maxLength: 5000 + nullable: true + type: string + raw_address: + description: The raw physical address of the owner. + maxLength: 5000 + nullable: true + type: string + refreshed_at: + description: The timestamp of the refresh that updated this owner. + format: unix-time + nullable: true + type: integer + required: + - id + - name + - object + - ownership + title: BankConnectionsResourceOwner + type: object + x-expandableFields: [] + x-resourceId: financial_connections.account_owner + financial_connections.account_ownership: + description: Describes a snapshot of the owners of an account at a particular + point in time. + properties: + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - financial_connections.account_ownership + type: string + owners: + description: A paginated list of owners for this account. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account_owner" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: BankConnectionsResourceOwnerList + type: object + x-expandableFields: + - data + required: + - created + - id + - object + - owners + title: BankConnectionsResourceOwnership + type: object + x-expandableFields: + - owners + financial_connections.session: + description: A Financial Connections Session is the secure way to programmatically + launch the client-side Stripe.js modal that lets your users link their accounts. + properties: + account_holder: + anyOf: + - "$ref": "#/components/schemas/bank_connections_resource_accountholder" + description: The account holder for whom accounts are collected in this + session. + nullable: true + accounts: + description: The accounts that were collected as part of this Session. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/financial_connections/accounts" + type: string + required: + - data + - has_more + - object + - url + title: BankConnectionsResourceLinkedAccountList + type: object + x-expandableFields: + - data + client_secret: + description: A value that will be passed to the client to launch the authentication + flow. + maxLength: 5000 + type: string + filters: + "$ref": "#/components/schemas/bank_connections_resource_link_account_session_filters" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - financial_connections.session + type: string + permissions: + description: Permissions requested for accounts collected during this session. + items: + enum: + - balances + - ownership + - payment_method + - transactions + type: string + x-stripeBypassValidation: true + type: array + return_url: + description: For webview integrations only. Upon completing OAuth login + in the native browser, the user will be redirected to this URL to return + to your app. + maxLength: 5000 + type: string + required: + - accounts + - client_secret + - id + - livemode + - object + - permissions + title: BankConnectionsResourceLinkAccountSession + type: object + x-expandableFields: + - account_holder + - accounts + - filters + x-resourceId: financial_connections.session financial_reporting_finance_report_run_run_parameters: description: '' properties: @@ -6524,6 +7902,232 @@ components: title: FinancialReportingFinanceReportRunRunParameters type: object x-expandableFields: [] + funding_instructions: + description: |- + Each customer has a [`balance`](https://stripe.com/docs/api/customers/object#customer_object-balance) that is + automatically applied to future invoices and payments using the `customer_balance` payment method. + Customers can fund this balance by initiating a bank transfer to any account in the + `financial_addresses` field. + Related guide: [Customer Balance - Funding Instructions](https://stripe.com/docs/payments/customer-balance/funding-instructions) to learn more + properties: + bank_transfer: + "$ref": "#/components/schemas/funding_instructions_bank_transfer" + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + maxLength: 5000 + type: string + funding_type: + description: The `funding_type` of the returned instructions + enum: + - bank_transfer + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - funding_instructions + type: string + required: + - bank_transfer + - currency + - funding_type + - livemode + - object + title: CustomerBalanceFundingInstructionsCustomerBalanceFundingInstructions + type: object + x-expandableFields: + - bank_transfer + x-resourceId: funding_instructions + funding_instructions_bank_transfer: + description: '' + properties: + country: + description: The country of the bank account to fund + maxLength: 5000 + type: string + financial_addresses: + description: A list of financial addresses that can be used to fund a particular + balance + items: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + type: array + type: + description: The bank_transfer type + enum: + - eu_bank_transfer + - jp_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - country + - financial_addresses + - type + title: FundingInstructionsBankTransfer + type: object + x-expandableFields: + - financial_addresses + funding_instructions_bank_transfer_financial_address: + description: FinancialAddresses contain identifying information that resolves + to a FinancialAccount. + properties: + iban: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_iban_record" + sort_code: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_sort_code_record" + spei: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_spei_record" + supported_networks: + description: The payment networks supported by this FinancialAddress + items: + enum: + - bacs + - fps + - sepa + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + description: The type of financial address + enum: + - iban + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + zengin: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_zengin_record" + required: + - type + title: FundingInstructionsBankTransferFinancialAddress + type: object + x-expandableFields: + - iban + - sort_code + - spei + - zengin + funding_instructions_bank_transfer_iban_record: + description: Iban Records contain E.U. bank account details per the SEPA format. + properties: + account_holder_name: + description: The name of the person or business that owns the bank account + maxLength: 5000 + type: string + bic: + description: The BIC/SWIFT code of the account. + maxLength: 5000 + type: string + country: + description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + maxLength: 5000 + type: string + iban: + description: The IBAN of the account. + maxLength: 5000 + type: string + required: + - account_holder_name + - bic + - country + - iban + title: FundingInstructionsBankTransferIbanRecord + type: object + x-expandableFields: [] + funding_instructions_bank_transfer_sort_code_record: + description: Sort Code Records contain U.K. bank account details per the sort + code format. + properties: + account_holder_name: + description: The name of the person or business that owns the bank account + maxLength: 5000 + type: string + account_number: + description: The account number + maxLength: 5000 + type: string + sort_code: + description: The six-digit sort code + maxLength: 5000 + type: string + required: + - account_holder_name + - account_number + - sort_code + title: FundingInstructionsBankTransferSortCodeRecord + type: object + x-expandableFields: [] + funding_instructions_bank_transfer_spei_record: + description: SPEI Records contain Mexico bank account details per the SPEI format. + properties: + bank_code: + description: The three-digit bank code + maxLength: 5000 + type: string + bank_name: + description: The short banking institution name + maxLength: 5000 + type: string + clabe: + description: The CLABE number + maxLength: 5000 + type: string + required: + - bank_code + - bank_name + - clabe + title: FundingInstructionsBankTransferSpeiRecord + type: object + x-expandableFields: [] + funding_instructions_bank_transfer_zengin_record: + description: Zengin Records contain Japan bank account details per the Zengin + format. + properties: + account_holder_name: + description: The account holder name + maxLength: 5000 + nullable: true + type: string + account_number: + description: The account number + maxLength: 5000 + nullable: true + type: string + account_type: + description: The bank account type. In Japan, this can only be `futsu` or + `toza`. + maxLength: 5000 + nullable: true + type: string + bank_code: + description: The bank code of the account + maxLength: 5000 + nullable: true + type: string + bank_name: + description: The bank name of the account + maxLength: 5000 + nullable: true + type: string + branch_code: + description: The branch code of the account + maxLength: 5000 + nullable: true + type: string + branch_name: + description: The branch name of the account + maxLength: 5000 + nullable: true + type: string + title: FundingInstructionsBankTransferZenginRecord + type: object + x-expandableFields: [] gelato_data_document_report_date_of_birth: description: Point in Time properties: @@ -7088,7 +8692,7 @@ components: A VerificationSession transitions through [multiple statuses](/docs/identity/how-sessions-work) throughout its lifetime as it progresses through - the verification flow. The VerificationSession contains the user’s verified data after + the verification flow. The VerificationSession contains the user's verified data after verification checks are complete. Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) @@ -7207,6 +8811,76 @@ components: - redaction - verified_outputs x-resourceId: identity.verification_session + inbound_transfers: + description: '' + properties: + billing_details: + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + type: + description: The type of the payment method used in the InboundTransfer. + enum: + - us_bank_account + type: string + x-stripeBypassValidation: true + us_bank_account: + "$ref": "#/components/schemas/inbound_transfers_payment_method_details_us_bank_account" + required: + - billing_details + - type + title: InboundTransfers + type: object + x-expandableFields: + - billing_details + - us_bank_account + inbound_transfers_payment_method_details_us_bank_account: + description: '' + properties: + account_holder_type: + description: 'Account holder type: individual or company.' + enum: + - company + - individual + nullable: true + type: string + account_type: + description: 'Account type: checkings or savings. Defaults to checking if + omitted.' + enum: + - checking + - savings + nullable: true + type: string + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. + maxLength: 5000 + nullable: true + type: string + last4: + description: Last four digits of the bank account number. + maxLength: 5000 + nullable: true + type: string + network: + description: The US bank account network used to debit funds. + enum: + - ach + type: string + routing_number: + description: Routing number of the bank account. + maxLength: 5000 + nullable: true + type: string + required: + - network + title: inbound_transfers_payment_method_details_us_bank_account + type: object + x-expandableFields: [] invoice: description: |- Invoices are statements of amounts owed by a customer, and are either @@ -7282,8 +8956,20 @@ components: description: The amount, in %s, that was paid. type: integer amount_remaining: - description: The amount remaining, in %s, that is due. + description: The difference between amount_due and amount_paid, in %s. type: integer + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + description: ID of the Connect Application that created the invoice. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" application_fee_amount: description: The fee in %s that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. @@ -7448,9 +9134,7 @@ components: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" description: ID of the default payment source for the invoice. It must belong @@ -7460,11 +9144,10 @@ components: nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" + x-stripeBypassValidation: true default_tax_rates: description: The tax rates applied to this invoice, if any. items: @@ -7516,6 +9199,12 @@ components: maxLength: 5000 nullable: true type: string + from_invoice: + anyOf: + - "$ref": "#/components/schemas/invoices_from_invoice" + description: Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) + for more details. + nullable: true hosted_invoice_url: description: The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, @@ -7539,6 +9228,16 @@ components: description: The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. nullable: true + latest_revision: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/invoice" + description: The ID of the most recent non-draft revision of this invoice + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/invoice" lines: description: 'The individual line items that make up the invoice. `lines` is sorted as follows: invoice items in reverse chronological order, followed @@ -7675,6 +9374,11 @@ components: maxLength: 5000 nullable: true type: string + rendering_options: + anyOf: + - "$ref": "#/components/schemas/invoice_setting_rendering_options" + description: Options for invoice PDF rendering. + nullable: true starting_balance: description: Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer @@ -7716,14 +9420,30 @@ components: type: integer subtotal: description: Total of all subscriptions, invoice items, and prorations on - the invoice before any invoice level discount or tax is applied. Item - discounts are already incorporated + the invoice before any invoice level discount or exclusive tax is applied. + Item discounts are already incorporated + type: integer + subtotal_excluding_tax: + description: The integer amount in %s representing the subtotal of the invoice + before any invoice level discount or tax is applied. Item discounts are + already incorporated + nullable: true type: integer tax: description: The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. nullable: true type: integer + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this invoice belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" threshold_reason: "$ref": "#/components/schemas/invoice_threshold_reason" total: @@ -7736,6 +9456,11 @@ components: "$ref": "#/components/schemas/discounts_resource_discount_amount" nullable: true type: array + total_excluding_tax: + description: The integer amount in %s representing the total amount of the + invoice including all discounts but excluding all tax. + nullable: true + type: integer total_tax_amounts: description: The aggregate amounts calculated per tax rate for all line items. @@ -7788,6 +9513,7 @@ components: type: object x-expandableFields: - account_tax_ids + - application - automatic_tax - charge - custom_fields @@ -7800,19 +9526,33 @@ components: - default_tax_rates - discount - discounts + - from_invoice - last_finalization_error + - latest_revision - lines - on_behalf_of - payment_intent - payment_settings - quote + - rendering_options - status_transitions - subscription + - test_clock - threshold_reason - total_discount_amounts - total_tax_amounts - transfer_data x-resourceId: invoice + invoice_installments_card: + description: '' + properties: + enabled: + description: Whether Installments are enabled for this Invoice. + nullable: true + type: boolean + title: invoice_installments_card + type: object + x-expandableFields: [] invoice_item_threshold_reason: description: '' properties: @@ -7836,11 +9576,12 @@ components: description: '' properties: end: - description: End of the line item's billing period + description: The end of the period, which must be greater than or equal + to the start. format: unix-time type: integer start: - description: Start of the line item's billing period + description: The start of the period. format: unix-time type: integer required: @@ -7924,6 +9665,8 @@ components: invoice_payment_method_options_card: description: '' properties: + installments: + "$ref": "#/components/schemas/invoice_installments_card" request_three_d_secure: description: We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other @@ -7940,6 +9683,96 @@ components: type: string title: invoice_payment_method_options_card type: object + x-expandableFields: + - installments + invoice_payment_method_options_customer_balance: + description: '' + properties: + bank_transfer: + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer" + funding_type: + description: 'The funding method type to be used when there are not enough + funds in the customer balance. Permitted values include: `bank_transfer`.' + enum: + - bank_transfer + nullable: true + type: string + title: invoice_payment_method_options_customer_balance + type: object + x-expandableFields: + - bank_transfer + invoice_payment_method_options_customer_balance_bank_transfer: + description: '' + properties: + eu_bank_transfer: + "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer" + type: + description: 'The bank transfer type that can be used for funding. Permitted + values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, + or `mx_bank_transfer`.' + nullable: true + type: string + title: invoice_payment_method_options_customer_balance_bank_transfer + type: object + x-expandableFields: + - eu_bank_transfer + invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer: + description: '' + properties: + country: + description: 'The desired country code of the bank account information. + Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.' + enum: + - DE + - ES + - FR + - IE + - NL + type: string + required: + - country + title: invoice_payment_method_options_customer_balance_bank_transfer_eu_bank_transfer + type: object + x-expandableFields: [] + invoice_payment_method_options_konbini: + description: '' + properties: {} + title: invoice_payment_method_options_konbini + type: object + x-expandableFields: [] + invoice_payment_method_options_us_bank_account: + description: '' + properties: + financial_connections: + "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account_linked_account_options" + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_us_bank_account + type: object + x-expandableFields: + - financial_connections + invoice_payment_method_options_us_bank_account_linked_account_options: + description: '' + properties: + permissions: + description: The list of permissions to request. The `payment_method` permission + must be included. + items: + enum: + - balances + - payment_method + - transactions + type: string + x-stripeBypassValidation: true + type: array + title: invoice_payment_method_options_us_bank_account_linked_account_options + type: object x-expandableFields: [] invoice_setting_custom_field: description: '' @@ -7985,11 +9818,17 @@ components: maxLength: 5000 nullable: true type: string + rendering_options: + anyOf: + - "$ref": "#/components/schemas/invoice_setting_rendering_options" + description: Default options for invoice PDF rendering for this customer. + nullable: true title: InvoiceSettingCustomerSetting type: object x-expandableFields: - custom_fields - default_payment_method + - rendering_options invoice_setting_quote_setting: description: '' properties: @@ -8001,6 +9840,18 @@ components: title: InvoiceSettingQuoteSetting type: object x-expandableFields: [] + invoice_setting_rendering_options: + description: '' + properties: + amount_tax_display: + description: How line-item prices and amounts will be displayed with respect + to tax on invoice PDFs. + maxLength: 5000 + nullable: true + type: string + title: InvoiceSettingRenderingOptions + type: object + x-expandableFields: [] invoice_setting_subscription_schedule_setting: description: '' properties: @@ -8214,6 +10065,16 @@ components: "$ref": "#/components/schemas/tax_rate" nullable: true type: array + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this invoice item belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" unit_amount: description: Unit amount (in the `currency` specified) of the invoice item. nullable: true @@ -8246,7 +10107,63 @@ components: - price - subscription - tax_rates + - test_clock x-resourceId: invoiceitem + invoices_from_invoice: + description: '' + properties: + action: + description: The relation between this invoice and the cloned invoice + maxLength: 5000 + type: string + invoice: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/invoice" + description: The invoice that was cloned. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/invoice" + required: + - action + - invoice + title: InvoicesFromInvoice + type: object + x-expandableFields: + - invoice + invoices_line_items_credited_items: + description: '' + properties: + invoice: + description: Invoice containing the credited invoice line items + maxLength: 5000 + type: string + invoice_line_items: + description: Credited invoice line items + items: + maxLength: 5000 + type: string + type: array + required: + - invoice + - invoice_line_items + title: InvoicesLineItemsCreditedItems + type: object + x-expandableFields: [] + invoices_line_items_proration_details: + description: '' + properties: + credited_items: + anyOf: + - "$ref": "#/components/schemas/invoices_line_items_credited_items" + description: For a credit proration `line_item`, the original debit line_items + to which the credit proration applies. + nullable: true + title: InvoicesLineItemsProrationDetails + type: object + x-expandableFields: + - credited_items invoices_payment_method_options: description: '' properties: @@ -8269,15 +10186,45 @@ components: description: If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. nullable: true + customer_balance: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + description: If paying by `customer_balance`, this sub-hash contains details + about the Bank transfer payment method options to pass to the invoice’s + PaymentIntent. + nullable: true + konbini: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + description: If paying by `konbini`, this sub-hash contains details about + the Konbini payment method options to pass to the invoice’s PaymentIntent. + nullable: true + us_bank_account: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + description: If paying by `us_bank_account`, this sub-hash contains details + about the ACH direct debit payment method options to pass to the invoice’s + PaymentIntent. + nullable: true title: InvoicesPaymentMethodOptions type: object x-expandableFields: - acss_debit - bancontact - card + - customer_balance + - konbini + - us_bank_account invoices_payment_settings: description: '' properties: + default_mandate: + description: ID of the mandate to be used for this invoice. It must correspond + to the payment method used to pay the invoice, including the invoice's + default_payment_method or default_source, if set. + maxLength: 5000 + nullable: true + type: string payment_method_options: anyOf: - "$ref": "#/components/schemas/invoices_payment_method_options" @@ -8300,12 +10247,18 @@ components: - bancontact - boleto - card + - customer_balance - fpx - giropay - grabpay - ideal + - konbini + - link + - paynow + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -8320,16 +10273,18 @@ components: properties: type: description: The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, - `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, - `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, - `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, - `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, - `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, - `ge_vat`, `ua_vat`, `is_vat`, or `unknown` + `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, + `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, + `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, + `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, + `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, + `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, + or `unknown` enum: - ae_trn - au_abn - au_arn + - bg_uic - br_cnpj - br_cpf - ca_bn @@ -8341,10 +10296,12 @@ components: - ch_vat - cl_tin - es_cif + - eu_oss_vat - eu_vat - gb_vat - ge_vat - hk_br + - hu_tin - id_npwp - il_vat - in_gst @@ -8364,6 +10321,7 @@ components: - sa_vat - sg_gst - sg_uen + - si_tin - th_vat - tw_vat - ua_vat @@ -8407,74 +10365,6 @@ components: title: InvoicesStatusTransitions type: object x-expandableFields: [] - issuer_fraud_record: - description: |- - This resource has been renamed to [Early Fraud - Warning](#early_fraud_warning_object) and will be removed in a future API - version. - properties: - actionable: - description: An IFR is actionable if it has not received a dispute and has - not been fully refunded. You may wish to proactively refund a charge that - receives an IFR, in order to avoid receiving a dispute later. - type: boolean - charge: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: ID of the charge this issuer fraud record is for, optionally - expanded. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - fraud_type: - description: The type of fraud labelled by the issuer. One of `card_never_received`, - `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, - `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. - maxLength: 5000 - type: string - has_liability_shift: - description: If true, the associated charge is subject to [liability shift](https://stripe.com/docs/payments/3d-secure#disputed-payments). - type: boolean - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - issuer_fraud_record - type: string - post_date: - description: The timestamp at which the card issuer posted the issuer fraud - record. - type: integer - required: - - actionable - - charge - - created - - fraud_type - - has_liability_shift - - id - - livemode - - object - - post_date - title: IssuerFraudRecord - type: object - x-expandableFields: - - charge - x-resourceId: issuer_fraud_record issuing.authorization: description: |- When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` @@ -8592,6 +10482,12 @@ components: items: "$ref": "#/components/schemas/issuing.transaction" type: array + treasury: + anyOf: + - "$ref": "#/components/schemas/issuing_authorization_treasury" + description: "[Treasury](https://stripe.com/docs/api/treasury) details related + to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts)." + nullable: true verification_data: "$ref": "#/components/schemas/issuing_authorization_verification_data" wallet: @@ -8630,6 +10526,7 @@ components: - pending_request - request_history - transactions + - treasury - verification_data x-resourceId: issuing.authorization issuing.card: @@ -8643,11 +10540,11 @@ components: cancellation_reason: description: The reason why the card was canceled. enum: + - design_rejected - lost - stolen nullable: true type: string - x-stripeBypassValidation: true cardholder: "$ref": "#/components/schemas/issuing.cardholder" created: @@ -8657,7 +10554,8 @@ components: type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, + and `gbp` in the UK. type: string cvc: description: The card's CVC. For security reasons, this is only available @@ -8673,6 +10571,11 @@ components: exp_year: description: The expiration year of the card. type: integer + financial_account: + description: The financial account this card is attached to. + maxLength: 5000 + nullable: true + type: string id: description: Unique identifier for the object. maxLength: 5000 @@ -8902,8 +10805,10 @@ components: Related guide: [Disputing Transactions](https://stripe.com/docs/issuing/purchases/disputes) properties: amount: - description: Disputed amount. Usually the amount of the `transaction`, but - can differ (usually because of currency fluctuation). + description: Disputed amount in the card's currency and in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually + the amount of the `transaction`, but can differ (usually because of currency + fluctuation). type: integer balance_transactions: description: List of balance transactions associated with the dispute. @@ -8961,6 +10866,12 @@ components: x-expansionResources: oneOf: - "$ref": "#/components/schemas/issuing.transaction" + treasury: + anyOf: + - "$ref": "#/components/schemas/issuing_dispute_treasury" + description: "[Treasury](https://stripe.com/docs/api/treasury) details related + to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + nullable: true required: - amount - created @@ -8978,6 +10889,7 @@ components: - balance_transactions - evidence - transaction + - treasury x-resourceId: issuing.dispute issuing.settlement: description: When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) @@ -9188,6 +11100,12 @@ components: description: Additional purchase information that is optionally provided by the merchant. nullable: true + treasury: + anyOf: + - "$ref": "#/components/schemas/issuing_transaction_treasury" + description: "[Treasury](https://stripe.com/docs/api/treasury) details related + to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts" + nullable: true type: description: The nature of the transaction. enum: @@ -9228,6 +11146,7 @@ components: - dispute - merchant_data - purchase_details + - treasury x-resourceId: issuing.transaction issuing_authorization_amount_details: description: '' @@ -9395,6 +11314,35 @@ components: type: object x-expandableFields: - amount_details + issuing_authorization_treasury: + description: '' + properties: + received_credits: + description: The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) + associated with this authorization + items: + maxLength: 5000 + type: string + type: array + received_debits: + description: The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) + associated with this authorization + items: + maxLength: 5000 + type: string + type: array + transaction: + description: The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) + associated with this authorization + maxLength: 5000 + nullable: true + type: string + required: + - received_credits + - received_debits + title: IssuingAuthorizationTreasury + type: object + x-expandableFields: [] issuing_authorization_verification_data: description: '' properties: @@ -10104,6 +12052,11 @@ components: - usps nullable: true type: string + customs: + anyOf: + - "$ref": "#/components/schemas/issuing_card_shipping_customs" + description: Additional information that may be required for clearing customs. + nullable: true eta: description: A unix timestamp representing a best estimate of when the card will be delivered. @@ -10114,6 +12067,20 @@ components: description: Recipient name. maxLength: 5000 type: string + phone_number: + description: The phone number of the receiver of the bulk shipment. This + phone number will be provided to the shipping company, who might use it + to contact the receiver in case of delivery issues. + maxLength: 5000 + nullable: true + type: string + require_signature: + description: Whether a signature is required for card delivery. This feature + is only supported for US users. Standard shipping service does not support + signature on delivery. The default value for standard shipping service + is false and for express and priority services is true. + nullable: true + type: boolean service: description: Shipment service, such as `standard` or `express`. enum: @@ -10159,11 +12126,25 @@ components: type: object x-expandableFields: - address + - customs + issuing_card_shipping_customs: + description: '' + properties: + eori_number: + description: A registration number used for customs in Europe. See https://www.gov.uk/eori + and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en. + maxLength: 5000 + nullable: true + type: string + title: IssuingCardShippingCustoms + type: object + x-expandableFields: [] issuing_card_spending_limit: description: '' properties: amount: - description: Maximum amount allowed to spend per interval. + description: Maximum amount allowed to spend per interval. This amount is + in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). type: integer categories: description: Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) @@ -11244,7 +13225,8 @@ components: description: '' properties: amount: - description: Maximum amount allowed to spend per interval. + description: Maximum amount allowed to spend per interval. This amount is + in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). type: integer categories: description: Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) @@ -11928,6 +13910,25 @@ components: type: object x-expandableFields: - additional_documentation + issuing_dispute_treasury: + description: '' + properties: + debit_reversal: + description: The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) + representing this Issuing dispute + maxLength: 5000 + nullable: true + type: string + received_debit: + description: The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) + that is being disputed. + maxLength: 5000 + type: string + required: + - received_debit + title: IssuingDisputeTreasury + type: object + x-expandableFields: [] issuing_transaction_amount_details: description: '' properties: @@ -12109,12 +14110,38 @@ components: title: IssuingTransactionReceiptData type: object x-expandableFields: [] + issuing_transaction_treasury: + description: '' + properties: + received_credit: + description: The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_debits) + representing this Issuing transaction if it is a refund + maxLength: 5000 + nullable: true + type: string + received_debit: + description: The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_credits) + representing this Issuing transaction if it is a capture + maxLength: 5000 + nullable: true + type: string + title: IssuingTransactionTreasury + type: object + x-expandableFields: [] item: description: A line item. properties: + amount_discount: + description: Total discount amount applied. If no discounts were applied, + defaults to 0. + type: integer amount_subtotal: description: Total before any discounts or taxes are applied. type: integer + amount_tax: + description: Total tax amount applied. If no tax was applied, defaults to + 0. + type: integer amount_total: description: Total after discounts and taxes. type: integer @@ -12147,6 +14174,20 @@ components: - "$ref": "#/components/schemas/price" description: The price used to generate the line item. nullable: true + product: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" + description: |- + The ID of the product for this line item. + + This will always be the same as `price.product`. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" quantity: description: The quantity of products being purchased. nullable: true @@ -12157,7 +14198,9 @@ components: "$ref": "#/components/schemas/line_items_tax_amount" type: array required: + - amount_discount - amount_subtotal + - amount_tax - amount_total - currency - description @@ -12168,6 +14211,7 @@ components: x-expandableFields: - discounts - price + - product - taxes x-resourceId: item legal_entity_company: @@ -12516,6 +14560,11 @@ components: amount: description: The amount, in %s. type: integer + amount_excluding_tax: + description: The integer amount in %s representing the amount for this line + item, excluding all tax and discounts. + nullable: true + type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -12590,6 +14639,11 @@ components: proration: description: Whether this is a proration. type: boolean + proration_details: + anyOf: + - "$ref": "#/components/schemas/invoices_line_items_proration_details" + description: Additional details for proration line items + nullable: true quantity: description: The quantity of the subscription, if the line item is a subscription or a proration. @@ -12622,6 +14676,12 @@ components: - invoiceitem - subscription type: string + unit_amount_excluding_tax: + description: The amount in %s representing the unit amount for this line + item, excluding all tax and discounts. + format: decimal + nullable: true + type: string required: - amount - currency @@ -12640,6 +14700,7 @@ components: - discounts - period - price + - proration_details - tax_amounts - tax_rates x-resourceId: line_item @@ -12673,6 +14734,29 @@ components: type: object x-expandableFields: - rate + linked_account_options_us_bank_account: + description: '' + properties: + permissions: + description: The list of permissions to request. The `payment_method` permission + must be included. + items: + enum: + - balances + - ownership + - payment_method + - transactions + type: string + type: array + return_url: + description: For webview integrations only. Upon completing OAuth login + in the native browser, the user will be redirected to this URL to return + to your app. + maxLength: 5000 + type: string + title: linked_account_options_us_bank_account + type: object + x-expandableFields: [] login_link: description: '' properties: @@ -12844,12 +14928,67 @@ components: title: mandate_bacs_debit type: object x-expandableFields: [] + mandate_blik: + description: '' + properties: + expires_after: + description: Date at which the mandate expires. + format: unix-time + nullable: true + type: integer + off_session: + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + type: + description: Type of the mandate. + enum: + - off_session + - on_session + nullable: true + type: string + title: mandate_blik + type: object + x-expandableFields: + - off_session + mandate_link: + description: '' + properties: {} + title: mandate_link + type: object + x-expandableFields: [] mandate_multi_use: description: '' properties: {} title: mandate_multi_use type: object x-expandableFields: [] + mandate_options_off_session_details_blik: + description: '' + properties: + amount: + description: Amount of each recurring payment. + nullable: true + type: integer + currency: + description: Currency of each recurring payment. + maxLength: 5000 + nullable: true + type: string + interval: + description: Frequency interval of each recurring payment. + enum: + - day + - month + - week + - year + nullable: true + type: string + interval_count: + description: Frequency indicator of each recurring payment. + nullable: true + type: integer + title: mandate_options_off_session_details_blik + type: object + x-expandableFields: [] mandate_payment_method_details: description: '' properties: @@ -12859,8 +14998,12 @@ components: "$ref": "#/components/schemas/mandate_au_becs_debit" bacs_debit: "$ref": "#/components/schemas/mandate_bacs_debit" + blik: + "$ref": "#/components/schemas/mandate_blik" card: "$ref": "#/components/schemas/card_mandate_payment_method_details" + link: + "$ref": "#/components/schemas/mandate_link" sepa_debit: "$ref": "#/components/schemas/mandate_sepa_debit" type: @@ -12870,6 +15013,8 @@ components: method. maxLength: 5000 type: string + us_bank_account: + "$ref": "#/components/schemas/mandate_us_bank_account" required: - type title: mandate_payment_method_details @@ -12878,8 +15023,11 @@ components: - acss_debit - au_becs_debit - bacs_debit + - blik - card + - link - sepa_debit + - us_bank_account mandate_sepa_debit: description: '' properties: @@ -12913,6 +15061,12 @@ components: title: mandate_single_use type: object x-expandableFields: [] + mandate_us_bank_account: + description: '' + properties: {} + title: mandate_us_bank_account + type: object + x-expandableFields: [] networks: description: '' properties: @@ -12995,44 +15149,58 @@ components: x-expandableFields: [] order: description: |- - Order objects are created to handle end customers' purchases of previously - defined [products](https://stripe.com/docs/api#products). You can create, retrieve, and pay individual orders, as well - as list all orders. Orders are identified by a unique, random ID. + An Order describes a purchase being made by a customer, including the + products & quantities being purchased, the order status, the payment information, + and the billing/shipping details. - Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + Related guide: [Orders overview](https://stripe.com/docs/orders) properties: - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount for the order. + amount_subtotal: + description: Order cost before any discounts or taxes are applied. A positive + integer representing the subtotal of the order 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). type: integer - amount_returned: - description: The total amount that was returned to the customer. - nullable: true + amount_total: + description: Total order cost after discounts and taxes are applied. A positive + integer representing the cost of the order 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). To submit an order, the total must be either 0 or at least + $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). type: integer application: - description: ID of the Connect Application that created the order. - maxLength: 5000 - nullable: true - type: string - application_fee: - description: A fee in cents that will be applied to the order and transferred - to the application owner’s Stripe account. The request must be made with - an OAuth key or the Stripe-Account header in order to take an application - fee. For more information, see the application fees documentation. - nullable: true - type: integer - charge: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/charge" - description: The ID of the payment used to pay for the order. Present if - the order status is `paid`, `fulfilled`, or `refunded`. + - "$ref": "#/components/schemas/application" + description: ID of the Connect application that created the Order, if any. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/charge" + - "$ref": "#/components/schemas/application" + automatic_tax: + "$ref": "#/components/schemas/orders_v2_resource_automatic_tax" + billing_details: + anyOf: + - "$ref": "#/components/schemas/orders_v2_resource_billing_details" + description: Customer billing details associated with the order. + nullable: true + client_permissions: + anyOf: + - "$ref": "#/components/schemas/orders_v2_resource_client_permissions" + description: The fields on the Order that can be updated from the client + nullable: true + client_secret: + description: "The client secret of this Order. Used for client-side retrieval + using a publishable key. \n\nThe client secret can be used to complete + a payment for an Order 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. + \n\nRefer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) + to learn about how client_secret should be handled." + maxLength: 5000 + nullable: true + type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. @@ -13048,58 +15216,50 @@ components: type: string - "$ref": "#/components/schemas/customer" - "$ref": "#/components/schemas/deleted_customer" - description: The customer used for the order. + description: The customer which this orders belongs to. nullable: true x-expansionResources: oneOf: - "$ref": "#/components/schemas/customer" - "$ref": "#/components/schemas/deleted_customer" - email: - description: The email address of the customer placing the order. + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. maxLength: 5000 nullable: true type: string - external_coupon_code: - description: External coupon code to load for this order. - maxLength: 5000 - type: string + discounts: + description: The discounts applied to the order. Use `expand[]=discounts` + to expand each discount. + items: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/discount" + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/discount" + nullable: true + type: array id: description: Unique identifier for the object. maxLength: 5000 type: string - items: - description: List of items constituting the order. An order can have up - to 25 items. - items: - "$ref": "#/components/schemas/order_item" - type: array - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. + ip_address: + description: A recent IP address of the purchaser used for tax reporting + and tax location inference. + maxLength: 5000 nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - order type: string - returns: - description: A list of returns that have taken place for this order. - nullable: true + line_items: + description: A list of line items the customer is ordering. Each line item + includes information about the product, the quantity, and the resulting + cost. There is a maximum of 100 line items. properties: data: description: Details about each object. items: - "$ref": "#/components/schemas/order_return" + "$ref": "#/components/schemas/item" type: array has_more: description: True if this list has another page of items after this @@ -13120,1216 +15280,995 @@ components: - has_more - object - url - title: OrdersResourceOrderReturnList + title: OrdersV2ResourceLineItemList type: object x-expandableFields: - data - selected_shipping_method: - description: The shipping method that is currently selected for this order, - if any. If present, it is equal to one of the `id`s of shipping methods - in the `shipping_methods` array. At order creation time, if there are - multiple shipping methods, Stripe will automatically selected the first - method. - maxLength: 5000 + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - order type: string - shipping: + payment: + "$ref": "#/components/schemas/orders_v2_resource_payment" + shipping_cost: anyOf: - - "$ref": "#/components/schemas/shipping" - description: The shipping address for the order. Present if the order is - for goods to be shipped. - nullable: true - shipping_methods: - description: A list of supported shipping methods for this order. The desired - shipping method can be specified either by updating the order, or when - paying it. - items: - "$ref": "#/components/schemas/shipping_method" + - "$ref": "#/components/schemas/orders_v2_resource_shipping_cost" + description: The details of the customer cost of shipping, including the + customer chosen ShippingRate. nullable: true - type: array - status: - description: Current order status. One of `created`, `paid`, `canceled`, - `fulfilled`, or `returned`. More details in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - maxLength: 5000 - type: string - status_transitions: + shipping_details: anyOf: - - "$ref": "#/components/schemas/status_transitions" - description: The timestamps at which the order status was updated. + - "$ref": "#/components/schemas/orders_v2_resource_shipping_details" + description: Customer shipping information associated with the order. nullable: true - updated: - description: Time at which the object was last updated. Measured in seconds - since the Unix epoch. - format: unix-time - nullable: true - type: integer - upstream_id: - description: The user's order ID if it is different from the Stripe order - ID. - maxLength: 5000 + status: + description: The overall status of the order. + enum: + - canceled + - complete + - open + - processing + - submitted type: string + tax_details: + "$ref": "#/components/schemas/orders_v2_resource_tax_details" + total_details: + "$ref": "#/components/schemas/orders_v2_resource_total_details" required: - - amount + - amount_subtotal + - amount_total - created - currency - id - - items - livemode - object + - payment - status - title: Order + - total_details + title: OrdersV2ResourceOrder type: object x-expandableFields: - - charge + - application + - automatic_tax + - billing_details + - client_permissions - customer - - items - - returns - - shipping - - shipping_methods - - status_transitions + - discounts + - line_items + - payment + - shipping_cost + - shipping_details + - tax_details + - total_details x-resourceId: order - order_item: - description: |- - A representation of the constituent items of any given order. Can be used to - represent [SKUs](https://stripe.com/docs/api#skus), shipping costs, or taxes owed on the order. - - Related guide: [Orders](https://stripe.com/docs/orders/guide). + orders_payment_method_options_afterpay_clearpay: + description: '' properties: - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount for the line item. - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - description: - description: Description of the line item, meant to be displayable to the - user (e.g., `"Express shipping"`). - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. + capture_method: + description: Controls when the funds will be captured from the customer's + account. enum: - - order_item + - automatic + - manual type: string - parent: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/sku" - description: The ID of the associated object for this line item. Expandable - if not null (e.g., expandable to a SKU). - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/sku" - quantity: - description: A positive integer representing the number of instances of - `parent` that are included in this order item. Applicable/present only - if `type` is `sku`. - nullable: true - type: integer - type: - description: The type of line item. One of `sku`, `tax`, `shipping`, or - `discount`. + reference: + description: Order identifier shown to the user in Afterpay's online portal. + We recommend using a value that helps you answer any questions a customer + might have about the payment. The identifier is limited to 128 characters + and may contain only letters, digits, underscores, backslashes and dashes. maxLength: 5000 + nullable: true type: string - required: - - amount - - currency - - description - - object - - type - title: OrderItem - type: object - x-expandableFields: - - parent - order_return: - description: |- - A return represents the full or partial return of a number of [order items](https://stripe.com/docs/api#order_items). - Returns always belong to an order, and may optionally contain a refund. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with the payment method. - Related guide: [Handling Returns](https://stripe.com/docs/orders/guide#handling-returns). - properties: - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount for the returned line item. - type: integer - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - items: - description: The items included in this order return. - items: - "$ref": "#/components/schemas/order_item" - type: array - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. enum: - - order_return + - none type: string - order: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/order" - description: The order that this return includes items from. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/order" - refund: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/refund" - description: The ID of the refund issued for this return. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/refund" - required: - - amount - - created - - currency - - id - - items - - livemode - - object - title: OrderReturn + title: orders_payment_method_options_afterpay_clearpay type: object - x-expandableFields: - - items - - order - - refund - x-resourceId: order_return - package_dimensions: + x-expandableFields: [] + orders_v2_resource_automatic_payment_methods: description: '' properties: - height: - description: Height, in inches. - type: number - length: - description: Length, in inches. - type: number - weight: - description: Weight, in ounces. - type: number - width: - description: Width, in inches. - type: number + enabled: + description: Whether this Order has been opted into managing payment method + types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + type: boolean required: - - height - - length - - weight - - width - title: PackageDimensions + - enabled + title: OrdersV2ResourceAutomaticPaymentMethods type: object x-expandableFields: [] - payment_flows_automatic_payment_methods_payment_intent: + orders_v2_resource_automatic_tax: description: '' properties: enabled: - description: Automatically calculates compatible payment methods + description: Whether Stripe automatically computes tax on this Order. type: boolean + status: + description: The status of the most recent automated tax calculation for + this Order. + enum: + - complete + - failed + - requires_location_inputs + nullable: true + type: string required: - enabled - title: PaymentFlowsAutomaticPaymentMethodsPaymentIntent - type: object - x-expandableFields: [] - payment_flows_private_payment_methods_alipay: - description: '' - properties: {} - title: PaymentFlowsPrivatePaymentMethodsAlipay + title: OrdersV2ResourceAutomaticTax type: object x-expandableFields: [] - payment_flows_private_payment_methods_alipay_details: + orders_v2_resource_billing_details: description: '' properties: - buyer_id: - description: Uniquely identifies this particular Alipay account. You can - use this attribute to check whether two Alipay accounts are the same. + address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Billing address for the order. + nullable: true + email: + description: Email address for the order. maxLength: 5000 + nullable: true type: string - fingerprint: - description: Uniquely identifies this particular Alipay account. You can - use this attribute to check whether two Alipay accounts are the same. + name: + description: Full name for the order. maxLength: 5000 nullable: true type: string - transaction_id: - description: Transaction ID of this particular Alipay transaction. + phone: + description: Billing phone number for the order (including extension). maxLength: 5000 nullable: true type: string - title: PaymentFlowsPrivatePaymentMethodsAlipayDetails + title: OrdersV2ResourceBillingDetails + type: object + x-expandableFields: + - address + orders_v2_resource_card_payment_method_options: + description: '' + properties: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - automatic + - manual + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with the payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + + If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + enum: + - none + - off_session + - on_session + type: string + required: + - capture_method + title: OrdersV2ResourceCardPaymentMethodOptions type: object x-expandableFields: [] - payment_flows_private_payment_methods_klarna_dob: + orders_v2_resource_client_permissions: description: '' properties: - day: - description: The day of birth, between 1 and 31. + billing_details: + description: Allows or disallows billing details to be set on an Order with + a publishable key and Order client_secret + enum: + - allow + - disallow nullable: true - type: integer - month: - description: The month of birth, between 1 and 12. + type: string + promotion_codes: + description: Allows or disallows promotion codes to be set on an Order with + a publishable key and Order client_secret + enum: + - allow + - disallow nullable: true - type: integer - year: - description: The four-digit year of birth. + type: string + shipping_details: + description: Allows or disallows shipping details to be set on an Order + with a publishable key and Order client_secret + enum: + - allow + - disallow nullable: true - type: integer - title: PaymentFlowsPrivatePaymentMethodsKlarnaDOB + type: string + title: OrdersV2ResourceClientPermissions type: object x-expandableFields: [] - payment_intent: - description: |- - A PaymentIntent guides you through the process of collecting a payment from your customer. - We recommend that you create exactly one PaymentIntent for each order or - customer session in your system. You can reference the PaymentIntent later to - see the history of payment attempts for a particular session. - - A PaymentIntent transitions through - [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) - throughout its lifetime as it interfaces with Stripe.js to perform - authentication flows and ultimately creates at most one successful charge. - - Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). + orders_v2_resource_payment: + description: '' properties: - amount: - description: Amount intended to be collected by this PaymentIntent. A positive - integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) - (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). - The amount value supports up to eight digits (e.g., a value of 99999999 - for a USD charge of $999,999.99). - type: integer - amount_capturable: - description: Amount that can be captured from this PaymentIntent. - type: integer - amount_received: - description: Amount that was collected by this PaymentIntent. - type: integer - application: + payment_intent: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/application" - description: ID of the Connect application that created the PaymentIntent. + - "$ref": "#/components/schemas/payment_intent" + description: ID of the payment intent associated with this order. Null when + the order is `open`. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/payment_intent" + settings: + anyOf: + - "$ref": "#/components/schemas/orders_v2_resource_payment_settings" + description: Settings describing how the order should configure generated + PaymentIntents. + nullable: true + status: + description: The status of the underlying payment associated with this order, + if any. Null when the order is `open`. + enum: + - canceled + - complete + - not_required + - processing + - requires_action + - requires_capture + - requires_confirmation + - requires_payment_method + nullable: true + type: string + title: OrdersV2ResourcePayment + type: object + x-expandableFields: + - payment_intent + - settings + orders_v2_resource_payment_method_options: + description: '' + properties: + acss_debit: + "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + afterpay_clearpay: + "$ref": "#/components/schemas/orders_payment_method_options_afterpay_clearpay" + alipay: + "$ref": "#/components/schemas/payment_method_options_alipay" + bancontact: + "$ref": "#/components/schemas/payment_method_options_bancontact" + card: + "$ref": "#/components/schemas/orders_v2_resource_card_payment_method_options" + customer_balance: + "$ref": "#/components/schemas/payment_method_options_customer_balance" + ideal: + "$ref": "#/components/schemas/payment_method_options_ideal" + klarna: + "$ref": "#/components/schemas/payment_method_options_klarna" + link: + "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + oxxo: + "$ref": "#/components/schemas/payment_method_options_oxxo" + p24: + "$ref": "#/components/schemas/payment_method_options_p24" + paypal: + "$ref": "#/components/schemas/payment_method_options_paypal" + sepa_debit: + "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + sofort: + "$ref": "#/components/schemas/payment_method_options_sofort" + wechat_pay: + "$ref": "#/components/schemas/payment_method_options_wechat_pay" + title: OrdersV2ResourcePaymentMethodOptions + type: object + x-expandableFields: + - acss_debit + - afterpay_clearpay + - alipay + - bancontact + - card + - customer_balance + - ideal + - klarna + - link + - oxxo + - p24 + - paypal + - sepa_debit + - sofort + - wechat_pay + orders_v2_resource_payment_settings: + description: '' + properties: application_fee_amount: description: The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's - Stripe account. The amount of the application fee collected will be capped - at the total payment amount. For more information, see the PaymentIntents - [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + Stripe account. nullable: true type: integer automatic_payment_methods: anyOf: - - "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" - description: Settings to configure compatible payment methods from the [Stripe - Dashboard](https://dashboard.stripe.com/settings/payment_methods) + - "$ref": "#/components/schemas/orders_v2_resource_automatic_payment_methods" + description: Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + to manage payment method types. nullable: true - canceled_at: - description: Populated when `status` is `canceled`, this is the time at - which the PaymentIntent was canceled. Measured in seconds since the Unix - epoch. - format: unix-time + payment_method_options: + anyOf: + - "$ref": "#/components/schemas/orders_v2_resource_payment_method_options" + description: PaymentMethod-specific configuration to provide to the order's + PaymentIntent. nullable: true - type: integer - cancellation_reason: - description: Reason for cancellation of this PaymentIntent, either user-provided - (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or - generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). - enum: - - abandoned - - automatic - - duplicate - - failed_invoice - - fraudulent - - requested_by_customer - - void_invoice + payment_method_types: + description: The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) + to provide to the order's PaymentIntent. Do not include this attribute + if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + items: + enum: + - acss_debit + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - card + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - link + - oxxo + - p24 + - sepa_debit + - sofort + - wechat_pay + type: string + x-stripeBypassValidation: true + nullable: true + type: array + return_url: + description: The URL to redirect the customer to after they authenticate + their payment. + maxLength: 5000 nullable: true type: string - capture_method: - description: Controls when the funds will be captured from the customer's - account. - enum: - - automatic - - manual + statement_descriptor: + description: For non-card charges, you can use this value as the complete + description that appears on your customers' statements. Must contain at + least one letter, maximum 22 characters. + maxLength: 5000 + nullable: true type: string - charges: - description: Charges that were created by this PaymentIntent, if any. - properties: - data: - description: This list only contains the latest charge, even if there - were previously multiple unsuccessful charges. To view all previous - charges for a PaymentIntent, you can filter the charges list using - the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). - items: - "$ref": "#/components/schemas/charge" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: PaymentFlowsPaymentIntentResourceChargeList - type: object - x-expandableFields: - - data - client_secret: - description: "The client secret of this PaymentIntent. Used for client-side - retrieval using a publishable key. \n\nThe 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.\n\nRefer - to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?integration=elements) - and learn about how `client_secret` should be handled." + statement_descriptor_suffix: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the prefix (shortened descriptor) + or statement descriptor that’s set on the account to form the complete + statement descriptor. Maximum 22 characters for the concatenated descriptor. maxLength: 5000 nullable: true type: string - confirmation_method: - enum: - - automatic - - manual - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time + transfer_data: + anyOf: + - "$ref": "#/components/schemas/orders_v2_resource_transfer_data" + description: Provides configuration for completing a transfer for the order + after it is paid. + nullable: true + title: OrdersV2ResourcePaymentSettings + type: object + x-expandableFields: + - automatic_payment_methods + - payment_method_options + - transfer_data + orders_v2_resource_shipping_cost: + description: '' + properties: + amount_subtotal: + description: Total shipping cost before any discounts or taxes are applied. type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - customer: + amount_tax: + description: Total tax amount applied due to shipping costs. If no tax was + applied, defaults to 0. + type: integer + amount_total: + description: Total shipping cost after discounts and taxes are applied. + type: integer + shipping_rate: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: |- - ID of the Customer this PaymentIntent belongs to, if one exists. - - Payment methods attached to other Customers cannot be used with this PaymentIntent. - - If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + - "$ref": "#/components/schemas/shipping_rate" + description: The ID of the ShippingRate for this order. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. + - "$ref": "#/components/schemas/shipping_rate" + taxes: + description: The taxes applied to the shipping rate. + items: + "$ref": "#/components/schemas/line_items_tax_amount" + type: array + required: + - amount_subtotal + - amount_tax + - amount_total + title: OrdersV2ResourceShippingCost + type: object + x-expandableFields: + - shipping_rate + - taxes + orders_v2_resource_shipping_details: + description: '' + properties: + address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Recipient shipping address. Required if the order includes + products that are shippable. + nullable: true + name: + description: Recipient name. maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + phone: + description: Recipient phone (including extension). maxLength: 5000 + nullable: true type: string - invoice: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/invoice" - description: ID of the invoice that created this PaymentIntent, if it exists. + title: OrdersV2ResourceShippingDetails + type: object + x-expandableFields: + - address + orders_v2_resource_tax_details: + description: '' + properties: + tax_exempt: + description: Describes the purchaser's tax exemption status. One of `none`, + `exempt`, or `reverse`. + enum: + - exempt + - none + - reverse + type: string + tax_ids: + description: The purchaser's tax IDs to be used in calculation of tax for + this Order. + items: + "$ref": "#/components/schemas/orders_v2_resource_tax_details_resource_tax_id" + type: array + required: + - tax_exempt + - tax_ids + title: OrdersV2ResourceTaxDetails + type: object + x-expandableFields: + - tax_ids + orders_v2_resource_tax_details_resource_tax_id: + description: '' + properties: + type: + description: The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, + `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, + `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, + `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, + `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, + `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, + `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, + or `unknown` + enum: + - ae_trn + - au_abn + - au_arn + - bg_uic + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - es_cif + - eu_oss_vat + - eu_vat + - gb_vat + - ge_vat + - hk_br + - hu_tin + - id_npwp + - il_vat + - in_gst + - is_vat + - jp_cn + - jp_rn + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - nz_gst + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - th_vat + - tw_vat + - ua_vat + - unknown + - us_ein + - za_vat + type: string + value: + description: The value of the tax ID. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/invoice" - last_payment_error: - anyOf: - - "$ref": "#/components/schemas/api_errors" - description: The payment error encountered in the previous PaymentIntent - confirmation. It will be cleared if the PaymentIntent is later updated - for any reason. + type: string + required: + - type + title: OrdersV2ResourceTaxDetailsResourceTaxID + type: object + x-expandableFields: [] + orders_v2_resource_total_details: + description: '' + properties: + amount_discount: + description: This is the sum of all the discounts. + type: integer + amount_shipping: + description: This is the sum of all the shipping amounts. nullable: true - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. For more information, - see the [documentation](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). - type: object - next_action: - anyOf: - - "$ref": "#/components/schemas/payment_intent_next_action" - description: If present, this property tells you what actions you need to - take in order for your customer to fulfill a payment using the provided - source. + type: integer + amount_tax: + description: This is the sum of all the tax amounts. + type: integer + breakdown: + "$ref": "#/components/schemas/orders_v2_resource_total_details_api_resource_breakdown" + required: + - amount_discount + - amount_tax + title: OrdersV2ResourceTotalDetails + type: object + x-expandableFields: + - breakdown + orders_v2_resource_total_details_api_resource_breakdown: + description: '' + properties: + discounts: + description: The aggregated discounts. + items: + "$ref": "#/components/schemas/line_items_discount_amount" + type: array + taxes: + description: The aggregated tax amounts by rate. + items: + "$ref": "#/components/schemas/line_items_tax_amount" + type: array + required: + - discounts + - taxes + title: OrdersV2ResourceTotalDetailsAPIResourceBreakdown + type: object + x-expandableFields: + - discounts + - taxes + orders_v2_resource_transfer_data: + description: '' + properties: + amount: + description: The amount that will be transferred automatically when the + order is paid. If no amount is set, the full amount is transferred. There + cannot be any line items with recurring prices when using this field. nullable: true - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - payment_intent - type: string - on_behalf_of: + type: integer + destination: anyOf: - maxLength: 5000 type: string - "$ref": "#/components/schemas/account" - description: The account (if any) for which the funds of the PaymentIntent - are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) - for details. - nullable: true + description: ID of the Connected account receiving the transfer. x-expansionResources: oneOf: - "$ref": "#/components/schemas/account" - payment_method: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the payment method used in this PaymentIntent. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - payment_method_options: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options" - description: Payment-method-specific configuration for this PaymentIntent. - nullable: true - payment_method_types: - description: The list of payment method types (e.g. card) that this PaymentIntent - is allowed to use. - items: - maxLength: 5000 - type: string - type: array - processing: - anyOf: - - "$ref": "#/components/schemas/payment_intent_processing" - description: If present, this property tells you about the processing state - of the payment. - nullable: true - receipt_email: - description: Email address that the receipt for the resulting payment will - be sent to. If `receipt_email` is specified for a payment in live mode, - a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + required: + - destination + title: OrdersV2ResourceTransferData + type: object + x-expandableFields: + - destination + outbound_payments_payment_method_details: + description: '' + properties: + billing_details: + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + financial_account: + "$ref": "#/components/schemas/outbound_payments_payment_method_details_financial_account" + type: + description: The type of the payment method used in the OutboundPayment. + enum: + - financial_account + - us_bank_account + type: string + us_bank_account: + "$ref": "#/components/schemas/outbound_payments_payment_method_details_us_bank_account" + required: + - billing_details + - type + title: OutboundPaymentsPaymentMethodDetails + type: object + x-expandableFields: + - billing_details + - financial_account + - us_bank_account + outbound_payments_payment_method_details_financial_account: + description: '' + properties: + id: + description: Token of the FinancialAccount. maxLength: 5000 - nullable: true type: string - review: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/review" - description: ID of the review associated with this PaymentIntent, if any. + network: + description: The rails used to send funds. + enum: + - stripe + type: string + required: + - id + - network + title: outbound_payments_payment_method_details_financial_account + type: object + x-expandableFields: [] + outbound_payments_payment_method_details_us_bank_account: + description: '' + properties: + account_holder_type: + description: 'Account holder type: individual or company.' + enum: + - company + - individual nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/review" - setup_future_usage: - description: |- - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + type: string + account_type: + description: 'Account type: checkings or savings. Defaults to checking if + omitted.' enum: - - off_session - - on_session + - checking + - savings nullable: true type: string - shipping: - anyOf: - - "$ref": "#/components/schemas/shipping" - description: Shipping information for this PaymentIntent. + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 nullable: true - statement_descriptor: - description: For non-card charges, you can use this value as the complete - description that appears on your customers’ statements. Must contain at - least one letter, maximum 22 characters. + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - statement_descriptor_suffix: - description: Provides information about a card payment that customers see - on their statements. Concatenated with the prefix (shortened descriptor) - or statement descriptor that’s set on the account to form the complete - statement descriptor. Maximum 22 characters for the concatenated descriptor. + last4: + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - status: - description: Status of this PaymentIntent, one of `requires_payment_method`, - `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, - `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + network: + description: The US bank account network used to send funds. enum: - - canceled - - processing - - requires_action - - requires_capture - - requires_confirmation - - requires_payment_method - - succeeded + - ach + - us_domestic_wire type: string - transfer_data: - anyOf: - - "$ref": "#/components/schemas/transfer_data" - description: The data with which to automatically create a Transfer when - the payment is finalized. See the PaymentIntents [use case for connected - accounts](https://stripe.com/docs/payments/connected-accounts) for details. - nullable: true - transfer_group: - description: A string that identifies the resulting payment as part of a - group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) - for details. + routing_number: + description: Routing number of the bank account. maxLength: 5000 nullable: true type: string required: - - amount - - capture_method - - confirmation_method - - created - - currency - - id - - livemode - - object - - payment_method_types - - status - title: PaymentIntent - type: object - x-expandableFields: - - application - - automatic_payment_methods - - charges - - customer - - invoice - - last_payment_error - - next_action - - on_behalf_of - - payment_method - - payment_method_options - - processing - - review - - shipping - - transfer_data - x-resourceId: payment_intent - payment_intent_card_processing: - description: '' - properties: {} - title: PaymentIntentCardProcessing + - network + title: outbound_payments_payment_method_details_us_bank_account type: object x-expandableFields: [] - payment_intent_next_action: + outbound_transfers_payment_method_details: description: '' properties: - alipay_handle_redirect: - "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" - boleto_display_details: - "$ref": "#/components/schemas/payment_intent_next_action_boleto" - oxxo_display_details: - "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" - redirect_to_url: - "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" + billing_details: + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" type: - description: Type of the next action to perform, one of `redirect_to_url`, - `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or - `verify_with_microdeposits`. - maxLength: 5000 + description: The type of the payment method used in the OutboundTransfer. + enum: + - us_bank_account type: string - use_stripe_sdk: - description: When confirming a PaymentIntent with Stripe.js, Stripe.js depends - on the contents of this dictionary to invoke authentication flows. The - shape of the contents is subject to change and is only intended to be - used by Stripe.js. - type: object - verify_with_microdeposits: - "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" - wechat_pay_display_qr_code: - "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" - wechat_pay_redirect_to_android_app: - "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" - wechat_pay_redirect_to_ios_app: - "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" + x-stripeBypassValidation: true + us_bank_account: + "$ref": "#/components/schemas/outbound_transfers_payment_method_details_us_bank_account" required: + - billing_details - type - title: PaymentIntentNextAction + title: OutboundTransfersPaymentMethodDetails type: object x-expandableFields: - - alipay_handle_redirect - - boleto_display_details - - oxxo_display_details - - redirect_to_url - - verify_with_microdeposits - - wechat_pay_display_qr_code - - wechat_pay_redirect_to_android_app - - wechat_pay_redirect_to_ios_app - payment_intent_next_action_alipay_handle_redirect: + - billing_details + - us_bank_account + outbound_transfers_payment_method_details_us_bank_account: description: '' properties: - native_data: - description: The native data to be used with Alipay SDK you must redirect - your customer to in order to authenticate the payment in an Android App. - maxLength: 5000 + account_holder_type: + description: 'Account holder type: individual or company.' + enum: + - company + - individual nullable: true type: string - native_url: - description: The native URL you must redirect your customer to in order - to authenticate the payment in an iOS App. - maxLength: 5000 + account_type: + description: 'Account type: checkings or savings. Defaults to checking if + omitted.' + enum: + - checking + - savings nullable: true type: string - return_url: - description: If the customer does not exit their browser while authenticating, - they will be redirected to this specified URL after completion. + bank_name: + description: Name of the bank associated with the bank account. maxLength: 5000 nullable: true type: string - url: - description: The URL you must redirect your customer to in order to authenticate - the payment. + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - title: PaymentIntentNextActionAlipayHandleRedirect - type: object - x-expandableFields: [] - payment_intent_next_action_boleto: - description: '' - properties: - expires_at: - description: The timestamp after which the boleto expires. - format: unix-time - nullable: true - type: integer - hosted_voucher_url: - description: The URL to the hosted boleto voucher page, which allows customers - to view the boleto voucher. + last4: + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - number: - description: The boleto number. - maxLength: 5000 - nullable: true + network: + description: The US bank account network used to send funds. + enum: + - ach + - us_domestic_wire type: string - pdf: - description: The URL to the downloadable boleto voucher PDF. + routing_number: + description: Routing number of the bank account. maxLength: 5000 nullable: true type: string - title: payment_intent_next_action_boleto + required: + - network + title: outbound_transfers_payment_method_details_us_bank_account type: object x-expandableFields: [] - payment_intent_next_action_display_oxxo_details: + package_dimensions: description: '' properties: - expires_after: - description: The timestamp after which the OXXO voucher expires. - format: unix-time - nullable: true - type: integer - hosted_voucher_url: - description: The URL for the hosted OXXO voucher page, which allows customers - to view and print an OXXO voucher. - maxLength: 5000 - nullable: true - type: string - number: - description: OXXO reference number. - maxLength: 5000 - nullable: true - type: string - title: PaymentIntentNextActionDisplayOxxoDetails + height: + description: Height, in inches. + type: number + length: + description: Length, in inches. + type: number + weight: + description: Weight, in ounces. + type: number + width: + description: Width, in inches. + type: number + required: + - height + - length + - weight + - width + title: PackageDimensions type: object x-expandableFields: [] - payment_intent_next_action_redirect_to_url: + payment_flows_amount_details: description: '' properties: - return_url: - description: If the customer does not exit their browser while authenticating, - they will be redirected to this specified URL after completion. - maxLength: 5000 - nullable: true - type: string - url: - description: The URL you must redirect your customer to in order to authenticate - the payment. - maxLength: 5000 - nullable: true - type: string - title: PaymentIntentNextActionRedirectToUrl + tip: + "$ref": "#/components/schemas/payment_flows_amount_details_resource_tip" + title: PaymentFlowsAmountDetails type: object - x-expandableFields: [] - payment_intent_next_action_verify_with_microdeposits: + x-expandableFields: + - tip + payment_flows_amount_details_resource_tip: description: '' properties: - arrival_date: - description: The timestamp when the microdeposits are expected to land. - format: unix-time + amount: + description: Portion of the amount that corresponds to a tip. type: integer - hosted_verification_url: - description: The URL for the hosted verification page, which allows customers - to verify their bank account. - maxLength: 5000 - type: string - required: - - arrival_date - - hosted_verification_url - title: PaymentIntentNextActionVerifyWithMicrodeposits - type: object - x-expandableFields: [] - payment_intent_next_action_wechat_pay_display_qr_code: - description: '' - properties: - data: - description: The data being used to generate QR code - maxLength: 5000 - type: string - image_data_url: - description: The base64 image data for a pre-generated QR code - maxLength: 5000 - type: string - image_url_png: - description: The image_url_png string used to render QR code - maxLength: 5000 - type: string - image_url_svg: - description: The image_url_svg string used to render QR code - maxLength: 5000 - type: string - required: - - data - - image_data_url - - image_url_png - - image_url_svg - title: PaymentIntentNextActionWechatPayDisplayQrCode + title: PaymentFlowsAmountDetailsResourceTip type: object x-expandableFields: [] - payment_intent_next_action_wechat_pay_redirect_to_android_app: + payment_flows_automatic_payment_methods_payment_intent: description: '' properties: - app_id: - description: app_id is the APP ID registered on WeChat open platform - maxLength: 5000 - type: string - nonce_str: - description: nonce_str is a random string - maxLength: 5000 - type: string - package: - description: package is static value - maxLength: 5000 - type: string - partner_id: - description: an unique merchant ID assigned by Wechat Pay - maxLength: 5000 - type: string - prepay_id: - description: an unique trading ID assigned by Wechat Pay - maxLength: 5000 - type: string - sign: - description: A signature - maxLength: 5000 - type: string - timestamp: - description: Specifies the current time in epoch format - maxLength: 5000 - type: string + enabled: + description: Automatically calculates compatible payment methods + type: boolean required: - - app_id - - nonce_str - - package - - partner_id - - prepay_id - - sign - - timestamp - title: PaymentIntentNextActionWechatPayRedirectToAndroidApp + - enabled + title: PaymentFlowsAutomaticPaymentMethodsPaymentIntent type: object x-expandableFields: [] - payment_intent_next_action_wechat_pay_redirect_to_ios_app: + payment_flows_installment_options: description: '' properties: - native_url: - description: An universal link that redirect to Wechat Pay APP - maxLength: 5000 - type: string + enabled: + type: boolean + plan: + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" required: - - native_url - title: PaymentIntentNextActionWechatPayRedirectToIOSApp - type: object - x-expandableFields: [] - payment_intent_payment_method_options: - description: '' - properties: - acss_debit: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - afterpay_clearpay: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - alipay: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_alipay" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - au_becs_debit: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - bacs_debit: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_bacs_debit" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - bancontact: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_bancontact" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - boleto: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_boleto" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - card: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options_card" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - card_present: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_card_present" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - eps: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - fpx: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_fpx" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - giropay: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_giropay" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - grabpay: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_grabpay" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - ideal: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_ideal" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - interac_present: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_interac_present" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - klarna: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_klarna" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - oxxo: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_oxxo" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - p24: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_p24" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - sepa_debit: - anyOf: - - "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - sofort: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_sofort" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - wechat_pay: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_wechat_pay" - - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" - title: PaymentIntentPaymentMethodOptions - type: object - x-expandableFields: - - acss_debit - - afterpay_clearpay - - alipay - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - card_present - - eps - - fpx - - giropay - - grabpay - - ideal - - interac_present - - klarna - - oxxo - - p24 - - sepa_debit - - sofort - - wechat_pay - payment_intent_payment_method_options_acss_debit: - description: '' - properties: - mandate_options: - "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" - verification_method: - description: Bank account verification method. - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: payment_intent_payment_method_options_acss_debit - type: object - x-expandableFields: - - mandate_options - payment_intent_payment_method_options_au_becs_debit: - description: '' - properties: {} - title: payment_intent_payment_method_options_au_becs_debit - type: object - x-expandableFields: [] - payment_intent_payment_method_options_card: - description: '' - properties: - installments: - anyOf: - - "$ref": "#/components/schemas/payment_method_options_card_installments" - description: |- - Installment details for this payment (Mexico only). - - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - nullable: true - network: - description: Selected network to process this payment intent on. Depends - on the available networks of the card attached to the payment intent. - Can be only set confirm-time. - enum: - - amex - - cartes_bancaires - - diners - - discover - - interac - - jcb - - mastercard - - unionpay - - unknown - - visa - nullable: true - type: string - request_three_d_secure: - description: 'We strongly recommend that you rely on our SCA Engine to automatically - prompt your customers for authentication based on risk level and [other - requirements](https://stripe.com/docs/strong-customer-authentication). - However, if you wish to request 3D Secure based on logic from your own - fraud engine, provide this option. Permitted values include: `automatic` - or `any`. If not provided, defaults to `automatic`. Read our guide on - [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) - for more information on how this configuration interacts with Radar and - our SCA Engine.' - enum: - - any - - automatic - - challenge_only - nullable: true - type: string - setup_future_usage: - description: |- - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - enum: - - none - - off_session - - on_session - type: string - title: payment_intent_payment_method_options_card + - enabled + title: PaymentFlowsInstallmentOptions type: object x-expandableFields: - - installments - payment_intent_payment_method_options_eps: + - plan + payment_flows_private_payment_methods_alipay: description: '' properties: {} - title: payment_intent_payment_method_options_eps + title: PaymentFlowsPrivatePaymentMethodsAlipay type: object x-expandableFields: [] - payment_intent_payment_method_options_mandate_options_acss_debit: + payment_flows_private_payment_methods_alipay_details: description: '' properties: - custom_mandate_url: - description: A URL for custom mandate text + buyer_id: + description: Uniquely identifies this particular Alipay account. You can + use this attribute to check whether two Alipay accounts are the same. maxLength: 5000 type: string - interval_description: - description: Description of the interval. Only required if the 'payment_schedule' - parameter is 'interval' or 'combined'. + fingerprint: + description: Uniquely identifies this particular Alipay account. You can + use this attribute to check whether two Alipay accounts are the same. maxLength: 5000 nullable: true type: string - payment_schedule: - description: Payment schedule for the mandate. - enum: - - combined - - interval - - sporadic - nullable: true - type: string - transaction_type: - description: Transaction type of the mandate. - enum: - - business - - personal + transaction_id: + description: Transaction ID of this particular Alipay transaction. + maxLength: 5000 nullable: true type: string - title: payment_intent_payment_method_options_mandate_options_acss_debit - type: object - x-expandableFields: [] - payment_intent_payment_method_options_mandate_options_sepa_debit: - description: '' - properties: {} - title: payment_intent_payment_method_options_mandate_options_sepa_debit + title: PaymentFlowsPrivatePaymentMethodsAlipayDetails type: object x-expandableFields: [] - payment_intent_payment_method_options_sepa_debit: - description: '' - properties: - mandate_options: - "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" - title: payment_intent_payment_method_options_sepa_debit - type: object - x-expandableFields: - - mandate_options - payment_intent_processing: - description: '' - properties: - card: - "$ref": "#/components/schemas/payment_intent_card_processing" - type: - description: Type of the payment method for which payment is in `processing` - state, one of `card`. - enum: - - card - type: string - required: - - type - title: PaymentIntentProcessing - type: object - x-expandableFields: - - card - payment_intent_type_specific_payment_method_options_client: + payment_flows_private_payment_methods_klarna_dob: description: '' properties: - setup_future_usage: - description: |- - Indicates that you intend to make future payments with this PaymentIntent's payment method. - - Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. - - When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). - enum: - - none - - off_session - - on_session - type: string - title: PaymentIntentTypeSpecificPaymentMethodOptionsClient + day: + description: The day of birth, between 1 and 31. + nullable: true + type: integer + month: + description: The month of birth, between 1 and 12. + nullable: true + type: integer + year: + description: The four-digit year of birth. + nullable: true + type: integer + title: PaymentFlowsPrivatePaymentMethodsKlarnaDOB type: object x-expandableFields: [] - payment_link: + payment_intent: description: |- - A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + 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. - When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + 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 Links API](https://stripe.com/docs/payments/payment-links/api) + Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents). properties: - active: - description: Whether the payment link's `url` is active. If `false`, customers - visiting the URL will be shown a page saying that the link has been deactivated. - type: boolean - after_completion: - "$ref": "#/components/schemas/payment_links_resource_after_completion" - allow_promotion_codes: - description: Whether user redeemable promotion codes are enabled. - type: boolean + amount: + description: Amount intended to be collected by this PaymentIntent. A positive + integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) + (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal + currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + The amount value supports up to eight digits (e.g., a value of 99999999 + for a USD charge of $999,999.99). + type: integer + amount_capturable: + description: Amount that can be captured from this PaymentIntent. + type: integer + amount_details: + "$ref": "#/components/schemas/payment_flows_amount_details" + amount_received: + description: Amount that was collected by this PaymentIntent. + type: integer + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + description: ID of the Connect application that created the PaymentIntent. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" application_fee_amount: description: The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's - Stripe account. + Stripe account. The amount of the application fee collected will be capped + at the total payment amount. For more information, see the PaymentIntents + [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). nullable: true type: integer - application_fee_percent: - description: This represents the percentage of the subscription invoice - subtotal that will be transferred to the application owner's Stripe account. + automatic_payment_methods: + anyOf: + - "$ref": "#/components/schemas/payment_flows_automatic_payment_methods_payment_intent" + description: Settings to configure compatible payment methods from the [Stripe + Dashboard](https://dashboard.stripe.com/settings/payment_methods) nullable: true - type: number - automatic_tax: - "$ref": "#/components/schemas/payment_links_resource_automatic_tax" - billing_address_collection: - description: Configuration for collecting the customer's billing address. + canceled_at: + description: Populated when `status` is `canceled`, this is the time at + which the PaymentIntent was canceled. Measured in seconds since the Unix + epoch. + format: unix-time + nullable: true + type: integer + cancellation_reason: + description: Reason for cancellation of this PaymentIntent, either user-provided + (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or + generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). enum: - - auto - - required - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 + - abandoned + - automatic + - duplicate + - failed_invoice + - fraudulent + - requested_by_customer + - void_invoice + nullable: true type: string - line_items: - description: The line items representing what is being sold. + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - automatic + - manual + type: string + charges: + description: Charges that were created by this PaymentIntent, if any. properties: data: - description: Details about each object. + description: This list only contains the latest charge, even if there + were previously multiple unsuccessful charges. To view all previous + charges for a PaymentIntent, you can filter the charges list using + the `payment_intent` [parameter](https://stripe.com/docs/api/charges/list#list_charges-payment_intent). items: - "$ref": "#/components/schemas/item" + "$ref": "#/components/schemas/charge" type: array has_more: description: True if this list has another page of items after this @@ -14350,10 +16289,79 @@ components: - has_more - object - url - title: PaymentLinksResourceListLineItems + title: PaymentFlowsPaymentIntentResourceChargeList type: object x-expandableFields: - data + client_secret: + description: "The client secret of this PaymentIntent. Used for client-side + retrieval using a publishable key. \n\nThe client secret can be used to + complete a payment from your frontend. It should not be stored, logged, + or exposed to anyone other than the customer. Make sure that you have + TLS enabled on any page that includes the client secret.\n\nRefer to our + docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) + and learn about how `client_secret` should be handled." + maxLength: 5000 + nullable: true + type: string + confirmation_method: + enum: + - automatic + - manual + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: |- + ID of the Customer this PaymentIntent belongs to, if one exists. + + Payment methods attached to other Customers cannot be used with this PaymentIntent. + + If present in combination with [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage), this PaymentIntent's payment method will be attached to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + invoice: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/invoice" + description: ID of the invoice that created this PaymentIntent, if it exists. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/invoice" + last_payment_error: + anyOf: + - "$ref": "#/components/schemas/api_errors" + description: The payment error encountered in the previous PaymentIntent + confirmation. It will be cleared if the PaymentIntent is later updated + for any reason. + nullable: true livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -14364,1054 +16372,842 @@ components: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. + 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). type: object + next_action: + anyOf: + - "$ref": "#/components/schemas/payment_intent_next_action" + description: If present, this property tells you what actions you need to + take in order for your customer to fulfill a payment using the provided + source. + nullable: true object: description: String representing the object's type. Objects of the same type share the same value. enum: - - payment_link + - payment_intent type: string on_behalf_of: anyOf: - maxLength: 5000 type: string - "$ref": "#/components/schemas/account" - description: The account on behalf of which to charge. See the [Connect - documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) + description: The account (if any) for which the funds of the PaymentIntent + are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. nullable: true x-expansionResources: oneOf: - "$ref": "#/components/schemas/account" + payment_method: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: ID of the payment method used in this PaymentIntent. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + payment_method_options: + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options" + description: Payment-method-specific configuration for this PaymentIntent. + nullable: true payment_method_types: - description: The list of payment method types that customers can use. When - `null`, Stripe will dynamically show relevant payment methods you've enabled - in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + description: The list of payment method types (e.g. card) that this PaymentIntent + is allowed to use. items: - enum: - - card + maxLength: 5000 type: string - nullable: true type: array - phone_number_collection: - "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" - shipping_address_collection: + processing: anyOf: - - "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" - description: Configuration for collecting the customer's shipping address. + - "$ref": "#/components/schemas/payment_intent_processing" + description: If present, this property tells you about the processing state + of the payment. nullable: true - subscription_data: + receipt_email: + description: Email address that the receipt for the resulting payment will + be sent to. If `receipt_email` is specified for a payment in live mode, + a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + maxLength: 5000 + nullable: true + type: string + review: anyOf: - - "$ref": "#/components/schemas/payment_links_resource_subscription_data" - description: When creating a subscription, the specified configuration data - will be used. There must be at least one line item with a recurring price - to use `subscription_data`. + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/review" + description: ID of the review associated with this PaymentIntent, if any. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/review" + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - off_session + - on_session + nullable: true + type: string + shipping: + anyOf: + - "$ref": "#/components/schemas/shipping" + description: Shipping information for this PaymentIntent. + nullable: true + statement_descriptor: + description: For non-card charges, you can use this value as the complete + description that appears on your customers’ statements. Must contain at + least one letter, maximum 22 characters. + maxLength: 5000 + nullable: true + type: string + statement_descriptor_suffix: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the prefix (shortened descriptor) + or statement descriptor that’s set on the account to form the complete + statement descriptor. Maximum 22 characters for the concatenated descriptor. + maxLength: 5000 nullable: true + type: string + status: + description: Status of this PaymentIntent, one of `requires_payment_method`, + `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, + `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + enum: + - canceled + - processing + - requires_action + - requires_capture + - requires_confirmation + - requires_payment_method + - succeeded + type: string transfer_data: anyOf: - - "$ref": "#/components/schemas/payment_links_resource_transfer_data" - description: The account (if any) the payments will be attributed to for - tax reporting, and where funds from each payment will be transferred to. + - "$ref": "#/components/schemas/transfer_data" + description: The data with which to automatically create a Transfer when + the payment is finalized. See the PaymentIntents [use case for connected + accounts](https://stripe.com/docs/payments/connected-accounts) for details. nullable: true - url: - description: The public URL that can be shared with customers. + transfer_group: + description: A string that identifies the resulting payment as part of a + group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) + for details. maxLength: 5000 + nullable: true type: string required: - - active - - after_completion - - allow_promotion_codes - - automatic_tax - - billing_address_collection + - amount + - capture_method + - confirmation_method + - created + - currency - id - livemode - - metadata - object - - phone_number_collection - - url - title: PaymentLink + - payment_method_types + - status + title: PaymentIntent type: object x-expandableFields: - - after_completion - - automatic_tax - - line_items + - amount_details + - application + - automatic_payment_methods + - charges + - customer + - invoice + - last_payment_error + - next_action - on_behalf_of - - phone_number_collection - - shipping_address_collection - - subscription_data + - payment_method + - payment_method_options + - processing + - review + - shipping - transfer_data - x-resourceId: payment_link - payment_links_resource_after_completion: + x-resourceId: payment_intent + payment_intent_card_processing: description: '' properties: - hosted_confirmation: - "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" - redirect: - "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" + customer_notification: + "$ref": "#/components/schemas/payment_intent_processing_customer_notification" + title: PaymentIntentCardProcessing + type: object + x-expandableFields: + - customer_notification + payment_intent_next_action: + description: '' + properties: + alipay_handle_redirect: + "$ref": "#/components/schemas/payment_intent_next_action_alipay_handle_redirect" + boleto_display_details: + "$ref": "#/components/schemas/payment_intent_next_action_boleto" + card_await_notification: + "$ref": "#/components/schemas/payment_intent_next_action_card_await_notification" + display_bank_transfer_instructions: + "$ref": "#/components/schemas/payment_intent_next_action_display_bank_transfer_instructions" + konbini_display_details: + "$ref": "#/components/schemas/payment_intent_next_action_konbini" + oxxo_display_details: + "$ref": "#/components/schemas/payment_intent_next_action_display_oxxo_details" + paynow_display_qr_code: + "$ref": "#/components/schemas/payment_intent_next_action_paynow_display_qr_code" + pix_display_qr_code: + "$ref": "#/components/schemas/payment_intent_next_action_pix_display_qr_code" + promptpay_display_qr_code: + "$ref": "#/components/schemas/payment_intent_next_action_promptpay_display_qr_code" + redirect_to_url: + "$ref": "#/components/schemas/payment_intent_next_action_redirect_to_url" type: - description: The specified behavior after the purchase is complete. - enum: - - hosted_confirmation - - redirect + description: Type of the next action to perform, one of `redirect_to_url`, + `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or + `verify_with_microdeposits`. + maxLength: 5000 type: string + use_stripe_sdk: + description: When confirming a PaymentIntent with Stripe.js, Stripe.js depends + on the contents of this dictionary to invoke authentication flows. The + shape of the contents is subject to change and is only intended to be + used by Stripe.js. + type: object + verify_with_microdeposits: + "$ref": "#/components/schemas/payment_intent_next_action_verify_with_microdeposits" + wechat_pay_display_qr_code: + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_display_qr_code" + wechat_pay_redirect_to_android_app: + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_android_app" + wechat_pay_redirect_to_ios_app: + "$ref": "#/components/schemas/payment_intent_next_action_wechat_pay_redirect_to_ios_app" required: - type - title: PaymentLinksResourceAfterCompletion + title: PaymentIntentNextAction type: object x-expandableFields: - - hosted_confirmation - - redirect - payment_links_resource_automatic_tax: + - alipay_handle_redirect + - boleto_display_details + - card_await_notification + - display_bank_transfer_instructions + - konbini_display_details + - oxxo_display_details + - paynow_display_qr_code + - pix_display_qr_code + - promptpay_display_qr_code + - redirect_to_url + - verify_with_microdeposits + - wechat_pay_display_qr_code + - wechat_pay_redirect_to_android_app + - wechat_pay_redirect_to_ios_app + payment_intent_next_action_alipay_handle_redirect: description: '' properties: - enabled: - description: If `true`, tax will be calculated automatically using the customer's - location. + native_data: + description: The native data to be used with Alipay SDK you must redirect + your customer to in order to authenticate the payment in an Android App. + maxLength: 5000 + nullable: true + type: string + native_url: + description: The native URL you must redirect your customer to in order + to authenticate the payment in an iOS App. + maxLength: 5000 + nullable: true + type: string + return_url: + description: If the customer does not exit their browser while authenticating, + they will be redirected to this specified URL after completion. + maxLength: 5000 + nullable: true + type: string + url: + description: The URL you must redirect your customer to in order to authenticate + the payment. + maxLength: 5000 + nullable: true + type: string + title: PaymentIntentNextActionAlipayHandleRedirect + type: object + x-expandableFields: [] + payment_intent_next_action_boleto: + description: '' + properties: + expires_at: + description: The timestamp after which the boleto expires. + format: unix-time + nullable: true + type: integer + hosted_voucher_url: + description: The URL to the hosted boleto voucher page, which allows customers + to view the boleto voucher. + maxLength: 5000 + nullable: true + type: string + number: + description: The boleto number. + maxLength: 5000 + nullable: true + type: string + pdf: + description: The URL to the downloadable boleto voucher PDF. + maxLength: 5000 + nullable: true + type: string + title: payment_intent_next_action_boleto + type: object + x-expandableFields: [] + payment_intent_next_action_card_await_notification: + description: '' + properties: + charge_attempt_at: + description: The time that payment will be attempted. If customer approval + is required, they need to provide approval before this time. + format: unix-time + nullable: true + type: integer + customer_approval_required: + description: For payments greater than INR 15000, the customer must provide + explicit approval of the payment with their bank. For payments of lower + amount, no customer action is required. + nullable: true type: boolean + title: PaymentIntentNextActionCardAwaitNotification + type: object + x-expandableFields: [] + payment_intent_next_action_display_bank_transfer_instructions: + description: '' + properties: + amount_remaining: + description: The remaining amount that needs to be transferred to complete + the payment. + nullable: true + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + nullable: true + type: string + financial_addresses: + description: A list of financial addresses that can be used to fund the + customer balance + items: + "$ref": "#/components/schemas/funding_instructions_bank_transfer_financial_address" + type: array + hosted_instructions_url: + description: A link to a hosted page that guides your customer through completing + the transfer. + maxLength: 5000 + nullable: true + type: string + reference: + description: A string identifying this payment. Instruct your customer to + include this code in the reference or memo field of their bank transfer. + maxLength: 5000 + nullable: true + type: string + type: + description: Type of bank transfer + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true required: - - enabled - title: PaymentLinksResourceAutomaticTax + - type + title: PaymentIntentNextActionDisplayBankTransferInstructions + type: object + x-expandableFields: + - financial_addresses + payment_intent_next_action_display_oxxo_details: + description: '' + properties: + expires_after: + description: The timestamp after which the OXXO voucher expires. + format: unix-time + nullable: true + type: integer + hosted_voucher_url: + description: The URL for the hosted OXXO voucher page, which allows customers + to view and print an OXXO voucher. + maxLength: 5000 + nullable: true + type: string + number: + description: OXXO reference number. + maxLength: 5000 + nullable: true + type: string + title: PaymentIntentNextActionDisplayOxxoDetails type: object x-expandableFields: [] - payment_links_resource_completion_behavior_confirmation_page: + payment_intent_next_action_konbini: description: '' properties: - custom_message: - description: The custom message that is displayed to the customer after - the purchase is complete. + expires_at: + description: The timestamp at which the pending Konbini payment expires. + format: unix-time + type: integer + hosted_voucher_url: + description: The URL for the Konbini payment instructions page, which allows + customers to view and print a Konbini voucher. maxLength: 5000 nullable: true type: string - title: PaymentLinksResourceCompletionBehaviorConfirmationPage + stores: + "$ref": "#/components/schemas/payment_intent_next_action_konbini_stores" + required: + - expires_at + - stores + title: payment_intent_next_action_konbini + type: object + x-expandableFields: + - stores + payment_intent_next_action_konbini_familymart: + description: '' + properties: + confirmation_number: + description: The confirmation number. + maxLength: 5000 + type: string + payment_code: + description: The payment code. + maxLength: 5000 + type: string + required: + - payment_code + title: payment_intent_next_action_konbini_familymart type: object x-expandableFields: [] - payment_links_resource_completion_behavior_redirect: + payment_intent_next_action_konbini_lawson: description: '' properties: - url: - description: The URL the customer will be redirected to after the purchase - is complete. + confirmation_number: + description: The confirmation number. + maxLength: 5000 + type: string + payment_code: + description: The payment code. maxLength: 5000 type: string required: - - url - title: PaymentLinksResourceCompletionBehaviorRedirect + - payment_code + title: payment_intent_next_action_konbini_lawson type: object x-expandableFields: [] - payment_links_resource_phone_number_collection: + payment_intent_next_action_konbini_ministop: description: '' properties: - enabled: - description: If `true`, a phone number will be collected during checkout. - type: boolean + confirmation_number: + description: The confirmation number. + maxLength: 5000 + type: string + payment_code: + description: The payment code. + maxLength: 5000 + type: string required: - - enabled - title: PaymentLinksResourcePhoneNumberCollection + - payment_code + title: payment_intent_next_action_konbini_ministop type: object x-expandableFields: [] - payment_links_resource_shipping_address_collection: + payment_intent_next_action_konbini_seicomart: description: '' properties: - allowed_countries: - description: 'An array of two-letter ISO country codes representing which - countries Checkout should provide as options for shipping locations. Unsupported - country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, - UM, VI`.' - items: - enum: - - 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 - type: string - type: array + confirmation_number: + description: The confirmation number. + maxLength: 5000 + type: string + payment_code: + description: The payment code. + maxLength: 5000 + type: string required: - - allowed_countries - title: PaymentLinksResourceShippingAddressCollection + - payment_code + title: payment_intent_next_action_konbini_seicomart type: object x-expandableFields: [] - payment_links_resource_subscription_data: + payment_intent_next_action_konbini_stores: description: '' properties: - trial_period_days: - description: Integer representing the number of trial period days before - the customer is charged for the first time. + familymart: + anyOf: + - "$ref": "#/components/schemas/payment_intent_next_action_konbini_familymart" + description: FamilyMart instruction details. nullable: true - type: integer - title: PaymentLinksResourceSubscriptionData - type: object - x-expandableFields: [] - payment_links_resource_transfer_data: - description: '' - properties: - amount: - description: The amount in %s that will be transferred to the destination - account. By default, the entire amount is transferred to the destination. + lawson: + anyOf: + - "$ref": "#/components/schemas/payment_intent_next_action_konbini_lawson" + description: Lawson instruction details. nullable: true - type: integer - destination: + ministop: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: The connected account receiving the transfer. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - required: - - destination - title: PaymentLinksResourceTransferData + - "$ref": "#/components/schemas/payment_intent_next_action_konbini_ministop" + description: Ministop instruction details. + nullable: true + seicomart: + anyOf: + - "$ref": "#/components/schemas/payment_intent_next_action_konbini_seicomart" + description: Seicomart instruction details. + nullable: true + title: payment_intent_next_action_konbini_stores type: object x-expandableFields: - - destination - payment_method: - description: |- - PaymentMethod objects represent your customer's payment instruments. - They can be used with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or saved to - Customer objects to store instrument details for future payments. - - Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + - familymart + - lawson + - ministop + - seicomart + payment_intent_next_action_paynow_display_qr_code: + description: '' properties: - acss_debit: - "$ref": "#/components/schemas/payment_method_acss_debit" - afterpay_clearpay: - "$ref": "#/components/schemas/payment_method_afterpay_clearpay" - alipay: - "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" - au_becs_debit: - "$ref": "#/components/schemas/payment_method_au_becs_debit" - bacs_debit: - "$ref": "#/components/schemas/payment_method_bacs_debit" - bancontact: - "$ref": "#/components/schemas/payment_method_bancontact" - billing_details: - "$ref": "#/components/schemas/billing_details" - boleto: - "$ref": "#/components/schemas/payment_method_boleto" - card: - "$ref": "#/components/schemas/payment_method_card" - card_present: - "$ref": "#/components/schemas/payment_method_card_present" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - description: The ID of the Customer to which this PaymentMethod is saved. - This will not be set when the PaymentMethod has not been saved to a Customer. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - eps: - "$ref": "#/components/schemas/payment_method_eps" - fpx: - "$ref": "#/components/schemas/payment_method_fpx" - giropay: - "$ref": "#/components/schemas/payment_method_giropay" - grabpay: - "$ref": "#/components/schemas/payment_method_grabpay" - id: - description: Unique identifier for the object. + data: + description: The raw data string used to generate QR code, it should be + used together with QR code library. maxLength: 5000 type: string - ideal: - "$ref": "#/components/schemas/payment_method_ideal" - interac_present: - "$ref": "#/components/schemas/payment_method_interac_present" - klarna: - "$ref": "#/components/schemas/payment_method_klarna" - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - payment_method + image_url_png: + description: The image_url_png string used to render QR code + maxLength: 5000 type: string - oxxo: - "$ref": "#/components/schemas/payment_method_oxxo" - p24: - "$ref": "#/components/schemas/payment_method_p24" - sepa_debit: - "$ref": "#/components/schemas/payment_method_sepa_debit" - sofort: - "$ref": "#/components/schemas/payment_method_sofort" - type: - description: The type of the PaymentMethod. An additional hash is included - on the PaymentMethod with a name matching this value. It contains additional - information specific to the PaymentMethod type. - enum: - - acss_debit - - afterpay_clearpay - - alipay - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - card_present - - eps - - fpx - - giropay - - grabpay - - ideal - - interac_present - - klarna - - oxxo - - p24 - - sepa_debit - - sofort - - wechat_pay + image_url_svg: + description: The image_url_svg string used to render QR code + maxLength: 5000 type: string - x-stripeBypassValidation: true - wechat_pay: - "$ref": "#/components/schemas/payment_method_wechat_pay" required: - - billing_details - - created - - id - - livemode - - object - - type - title: PaymentMethod + - data + - image_url_png + - image_url_svg + title: PaymentIntentNextActionPaynowDisplayQrCode type: object - x-expandableFields: - - acss_debit - - afterpay_clearpay - - alipay - - au_becs_debit - - bacs_debit - - bancontact - - billing_details - - boleto - - card - - card_present - - customer - - eps - - fpx - - giropay - - grabpay - - ideal - - interac_present - - klarna - - oxxo - - p24 - - sepa_debit - - sofort - - wechat_pay - x-resourceId: payment_method - payment_method_acss_debit: + x-expandableFields: [] + payment_intent_next_action_pix_display_qr_code: description: '' properties: - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. + data: + description: The raw data string used to generate QR code, it should be + used together with QR code library. maxLength: 5000 - nullable: true type: string - institution_number: - description: Institution number of the bank account. + expires_at: + description: The date (unix timestamp) when the PIX expires. + type: integer + hosted_instructions_url: + description: The URL to the hosted pix instructions page, which allows customers + to view the pix QR code. maxLength: 5000 - nullable: true type: string - last4: - description: Last four digits of the bank account number. + image_url_png: + description: The image_url_png string used to render png QR code maxLength: 5000 - nullable: true type: string - transit_number: - description: Transit number of the bank account. + image_url_svg: + description: The image_url_svg string used to render svg QR code maxLength: 5000 - nullable: true type: string - title: payment_method_acss_debit - type: object - x-expandableFields: [] - payment_method_afterpay_clearpay: - description: '' - properties: {} - title: payment_method_afterpay_clearpay + title: PaymentIntentNextActionPixDisplayQrCode type: object x-expandableFields: [] - payment_method_au_becs_debit: + payment_intent_next_action_promptpay_display_qr_code: description: '' properties: - bsb_number: - description: Six-digit number identifying bank and branch associated with - this bank account. + data: + description: The raw data string used to generate QR code, it should be + used together with QR code library. maxLength: 5000 - nullable: true type: string - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. + hosted_instructions_url: + description: The URL to the hosted PromptPay instructions page, which allows + customers to view the PromptPay QR code. maxLength: 5000 - nullable: true type: string - last4: - description: Last four digits of the bank account number. + image_url_png: + description: The image_url_png string used to render QR code, can be used + as maxLength: 5000 - nullable: true type: string - title: payment_method_au_becs_debit + image_url_svg: + description: The image_url_svg string used to render QR code, can be used + as + maxLength: 5000 + type: string + required: + - data + - hosted_instructions_url + - image_url_png + - image_url_svg + title: PaymentIntentNextActionPromptpayDisplayQrCode type: object x-expandableFields: [] - payment_method_bacs_debit: + payment_intent_next_action_redirect_to_url: description: '' properties: - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. - maxLength: 5000 - nullable: true - type: string - last4: - description: Last four digits of the bank account number. + return_url: + description: If the customer does not exit their browser while authenticating, + they will be redirected to this specified URL after completion. maxLength: 5000 nullable: true type: string - sort_code: - description: Sort code of the bank account. (e.g., `10-20-30`) + url: + description: The URL you must redirect your customer to in order to authenticate + the payment. maxLength: 5000 nullable: true type: string - title: payment_method_bacs_debit - type: object - x-expandableFields: [] - payment_method_bancontact: - description: '' - properties: {} - title: payment_method_bancontact + title: PaymentIntentNextActionRedirectToUrl type: object x-expandableFields: [] - payment_method_boleto: + payment_intent_next_action_verify_with_microdeposits: description: '' properties: - tax_id: - description: Uniquely identifies the customer tax id (CNPJ or CPF) + arrival_date: + description: The timestamp when the microdeposits are expected to land. + format: unix-time + type: integer + hosted_verification_url: + description: The URL for the hosted verification page, which allows customers + to verify their bank account. maxLength: 5000 type: string + microdeposit_type: + description: The type of the microdeposit sent to the customer. Used to + distinguish between different verification methods. + enum: + - amounts + - descriptor_code + nullable: true + type: string required: - - tax_id - title: payment_method_boleto + - arrival_date + - hosted_verification_url + title: PaymentIntentNextActionVerifyWithMicrodeposits type: object x-expandableFields: [] - payment_method_card: + payment_intent_next_action_wechat_pay_display_qr_code: description: '' properties: - brand: - description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, - `unionpay`, `visa`, or `unknown`. + data: + description: The data being used to generate QR code maxLength: 5000 type: string - checks: - anyOf: - - "$ref": "#/components/schemas/payment_method_card_checks" - description: Checks on Card address and CVC if provided. - nullable: true - country: - description: Two-letter ISO code representing the country of the card. You - could use this attribute to get a sense of the international breakdown - of cards you've collected. - maxLength: 5000 - nullable: true - type: string - exp_month: - description: Two-digit number representing the card's expiration month. - type: integer - exp_year: - description: Four-digit number representing the card's expiration year. - type: integer - fingerprint: - description: |- - Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - - *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + image_data_url: + description: The base64 image data for a pre-generated QR code maxLength: 5000 - nullable: true type: string - funding: - description: Card funding type. Can be `credit`, `debit`, `prepaid`, or - `unknown`. + image_url_png: + description: The image_url_png string used to render QR code maxLength: 5000 type: string - generated_from: - anyOf: - - "$ref": "#/components/schemas/payment_method_card_generated_card" - description: Details of the original PaymentMethod that created this object. - nullable: true - last4: - description: The last four digits of the card. + image_url_svg: + description: The image_url_svg string used to render QR code maxLength: 5000 type: string - networks: - anyOf: - - "$ref": "#/components/schemas/networks" - description: Contains information about card networks that can be used to - process the payment. - nullable: true - three_d_secure_usage: - anyOf: - - "$ref": "#/components/schemas/three_d_secure_usage" - description: Contains details on how this Card maybe be used for 3D Secure - authentication. - nullable: true - wallet: - anyOf: - - "$ref": "#/components/schemas/payment_method_card_wallet" - description: If this Card is part of a card wallet, this contains the details - of the card wallet. - nullable: true required: - - brand - - exp_month - - exp_year - - funding - - last4 - title: payment_method_card + - data + - image_data_url + - image_url_png + - image_url_svg + title: PaymentIntentNextActionWechatPayDisplayQrCode type: object - x-expandableFields: - - checks - - generated_from - - networks - - three_d_secure_usage - - wallet - payment_method_card_checks: + x-expandableFields: [] + payment_intent_next_action_wechat_pay_redirect_to_android_app: description: '' properties: - address_line1_check: - description: If a address line1 was provided, results of the check, one - of `pass`, `fail`, `unavailable`, or `unchecked`. + app_id: + description: app_id is the APP ID registered on WeChat open platform maxLength: 5000 - nullable: true type: string - address_postal_code_check: - description: If a address postal code was provided, results of the check, - one of `pass`, `fail`, `unavailable`, or `unchecked`. + nonce_str: + description: nonce_str is a random string maxLength: 5000 - nullable: true type: string - cvc_check: - description: If a CVC was provided, results of the check, one of `pass`, - `fail`, `unavailable`, or `unchecked`. + package: + description: package is static value maxLength: 5000 - nullable: true type: string - title: payment_method_card_checks - type: object - x-expandableFields: [] - payment_method_card_generated_card: - description: '' - properties: - charge: - description: The charge that created this object. + partner_id: + description: an unique merchant ID assigned by WeChat Pay maxLength: 5000 - nullable: true type: string - payment_method_details: - anyOf: - - "$ref": "#/components/schemas/card_generated_from_payment_method_details" - description: Transaction-specific details of the payment method used in - the payment. - nullable: true - setup_attempt: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/setup_attempt" - description: The ID of the SetupAttempt that generated this PaymentMethod, - if any. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/setup_attempt" - title: payment_method_card_generated_card - type: object - x-expandableFields: - - payment_method_details - - setup_attempt - payment_method_card_present: - description: '' - properties: {} - title: payment_method_card_present - type: object - x-expandableFields: [] - payment_method_card_wallet: - description: '' - properties: - amex_express_checkout: - "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" - apple_pay: - "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" - dynamic_last4: - description: "(For tokenized numbers only.) The last four digits of the - device account number." + prepay_id: + description: an unique trading ID assigned by WeChat Pay maxLength: 5000 - nullable: true - type: string - google_pay: - "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" - masterpass: - "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" - samsung_pay: - "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" - type: - description: The type of the card wallet, one of `amex_express_checkout`, - `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. - An additional hash is included on the Wallet subhash with a name matching - this value. It contains additional information specific to the card wallet - type. - enum: - - amex_express_checkout - - apple_pay - - google_pay - - masterpass - - samsung_pay - - visa_checkout type: string - visa_checkout: - "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" - required: - - type - title: payment_method_card_wallet - type: object - x-expandableFields: - - amex_express_checkout - - apple_pay - - google_pay - - masterpass - - samsung_pay - - visa_checkout - payment_method_card_wallet_amex_express_checkout: - description: '' - properties: {} - title: payment_method_card_wallet_amex_express_checkout - type: object - x-expandableFields: [] - payment_method_card_wallet_apple_pay: - description: '' - properties: {} - title: payment_method_card_wallet_apple_pay - type: object - x-expandableFields: [] - payment_method_card_wallet_google_pay: - description: '' - properties: {} - title: payment_method_card_wallet_google_pay - type: object - x-expandableFields: [] - payment_method_card_wallet_masterpass: - description: '' - properties: - billing_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified billing address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - email: - description: Owner's verified email. Values are verified or provided by - the wallet directly (if supported) at the time of authorization or settlement. - They cannot be set or mutated. + sign: + description: A signature maxLength: 5000 - nullable: true type: string - name: - description: Owner's verified full name. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. + timestamp: + description: Specifies the current time in epoch format maxLength: 5000 - nullable: true type: string - shipping_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified shipping address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - title: payment_method_card_wallet_masterpass - type: object - x-expandableFields: - - billing_address - - shipping_address - payment_method_card_wallet_samsung_pay: - description: '' - properties: {} - title: payment_method_card_wallet_samsung_pay + required: + - app_id + - nonce_str + - package + - partner_id + - prepay_id + - sign + - timestamp + title: PaymentIntentNextActionWechatPayRedirectToAndroidApp type: object x-expandableFields: [] - payment_method_card_wallet_visa_checkout: + payment_intent_next_action_wechat_pay_redirect_to_ios_app: description: '' properties: - billing_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified billing address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - email: - description: Owner's verified email. Values are verified or provided by - the wallet directly (if supported) at the time of authorization or settlement. - They cannot be set or mutated. - maxLength: 5000 - nullable: true - type: string - name: - description: Owner's verified full name. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. + native_url: + description: An universal link that redirect to WeChat Pay app maxLength: 5000 - nullable: true type: string - shipping_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified shipping address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - title: payment_method_card_wallet_visa_checkout + required: + - native_url + title: PaymentIntentNextActionWechatPayRedirectToIOSApp type: object - x-expandableFields: - - billing_address - - shipping_address - payment_method_details: + x-expandableFields: [] + payment_intent_payment_method_options: description: '' properties: - ach_credit_transfer: - "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" - ach_debit: - "$ref": "#/components/schemas/payment_method_details_ach_debit" acss_debit: - "$ref": "#/components/schemas/payment_method_details_acss_debit" + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_acss_debit" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + affirm: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_affirm" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" afterpay_clearpay: - "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_afterpay_clearpay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" alipay: - "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_alipay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" au_becs_debit: - "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_au_becs_debit" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" bacs_debit: - "$ref": "#/components/schemas/payment_method_details_bacs_debit" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_bacs_debit" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" bancontact: - "$ref": "#/components/schemas/payment_method_details_bancontact" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_bancontact" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + blik: + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_blik" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" boleto: - "$ref": "#/components/schemas/payment_method_details_boleto" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_boleto" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" card: - "$ref": "#/components/schemas/payment_method_details_card" + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_card" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" card_present: - "$ref": "#/components/schemas/payment_method_details_card_present" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_card_present" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + customer_balance: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_customer_balance" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" eps: - "$ref": "#/components/schemas/payment_method_details_eps" + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_eps" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" fpx: - "$ref": "#/components/schemas/payment_method_details_fpx" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_fpx" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" giropay: - "$ref": "#/components/schemas/payment_method_details_giropay" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_giropay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" grabpay: - "$ref": "#/components/schemas/payment_method_details_grabpay" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_grabpay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" ideal: - "$ref": "#/components/schemas/payment_method_details_ideal" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_ideal" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" interac_present: - "$ref": "#/components/schemas/payment_method_details_interac_present" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_interac_present" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" klarna: - "$ref": "#/components/schemas/payment_method_details_klarna" - multibanco: - "$ref": "#/components/schemas/payment_method_details_multibanco" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_klarna" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + konbini: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_konbini" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + link: + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_link" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" oxxo: - "$ref": "#/components/schemas/payment_method_details_oxxo" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_oxxo" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" p24: - "$ref": "#/components/schemas/payment_method_details_p24" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_p24" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + paynow: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_paynow" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + pix: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_pix" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + promptpay: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_promptpay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" sepa_debit: - "$ref": "#/components/schemas/payment_method_details_sepa_debit" + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_sepa_debit" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" sofort: - "$ref": "#/components/schemas/payment_method_details_sofort" - stripe_account: - "$ref": "#/components/schemas/payment_method_details_stripe_account" - type: - description: |- - The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. - An additional hash is included on `payment_method_details` with a name matching this value. - It contains information specific to the payment method. - maxLength: 5000 - type: string - wechat: - "$ref": "#/components/schemas/payment_method_details_wechat" + anyOf: + - "$ref": "#/components/schemas/payment_method_options_sofort" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + us_bank_account: + anyOf: + - "$ref": "#/components/schemas/payment_intent_payment_method_options_us_bank_account" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" wechat_pay: - "$ref": "#/components/schemas/payment_method_details_wechat_pay" - required: - - type - title: payment_method_details + anyOf: + - "$ref": "#/components/schemas/payment_method_options_wechat_pay" + - "$ref": "#/components/schemas/payment_intent_type_specific_payment_method_options_client" + title: PaymentIntentPaymentMethodOptions type: object x-expandableFields: - - ach_credit_transfer - - ach_debit - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto - card - card_present + - customer_balance - eps - fpx - giropay @@ -15419,1731 +17215,1794 @@ components: - ideal - interac_present - klarna - - multibanco + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort - - stripe_account - - wechat + - us_bank_account - wechat_pay - payment_method_details_ach_credit_transfer: + payment_intent_payment_method_options_acss_debit: description: '' properties: - account_number: - description: Account number to transfer funds to. - maxLength: 5000 - nullable: true - type: string - bank_name: - description: Name of the bank associated with the routing number. - maxLength: 5000 - nullable: true - type: string - routing_number: - description: Routing transit number for the bank account to transfer funds - to. - maxLength: 5000 - nullable: true + mandate_options: + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_acss_debit" + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session type: string - swift_code: - description: SWIFT code of the bank associated with the routing number. - maxLength: 5000 - nullable: true + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits type: string - title: payment_method_details_ach_credit_transfer + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_acss_debit type: object - x-expandableFields: [] - payment_method_details_ach_debit: + x-expandableFields: + - mandate_options + payment_intent_payment_method_options_au_becs_debit: description: '' properties: - account_holder_type: - description: Type of entity that holds the account. This can be either `individual` - or `company`. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - company - - individual - nullable: true - type: string - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - country: - description: Two-letter ISO code representing the country the bank account - is located in. - maxLength: 5000 - nullable: true - type: string - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. - maxLength: 5000 - nullable: true - type: string - last4: - description: Last four digits of the bank account number. - maxLength: 5000 - nullable: true - type: string - routing_number: - description: Routing transit number of the bank account. - maxLength: 5000 - nullable: true + - none + - off_session + - on_session type: string - title: payment_method_details_ach_debit + title: payment_intent_payment_method_options_au_becs_debit type: object x-expandableFields: [] - payment_method_details_acss_debit: + payment_intent_payment_method_options_blik: + description: '' + properties: {} + title: payment_intent_payment_method_options_blik + type: object + x-expandableFields: [] + payment_intent_payment_method_options_card: description: '' properties: - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. - maxLength: 5000 - nullable: true + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual type: string - institution_number: - description: Institution number of the bank account - maxLength: 5000 + installments: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_card_installments" + description: |- + Installment details for this payment (Mexico only). + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + nullable: true + mandate_options: + anyOf: + - "$ref": "#/components/schemas/payment_method_options_card_mandate_options" + description: Configuration options for setting up an eMandate for cards + issued in India. + nullable: true + network: + description: Selected network to process this payment intent on. Depends + on the available networks of the card attached to the payment intent. + Can be only set confirm-time. + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa nullable: true type: string - last4: - description: Last four digits of the bank account number. - maxLength: 5000 + request_three_d_secure: + description: 'We strongly recommend that you rely on our SCA Engine to automatically + prompt your customers for authentication based on risk level and [other + requirements](https://stripe.com/docs/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own + fraud engine, provide this option. Permitted values include: `automatic` + or `any`. If not provided, defaults to `automatic`. Read our guide on + [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) + for more information on how this configuration interacts with Radar and + our SCA Engine.' + enum: + - any + - automatic + - challenge_only nullable: true type: string - mandate: - description: ID of the mandate used to make this payment. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + statement_descriptor_suffix_kana: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the Kana prefix (shortened Kana + descriptor) or Kana statement descriptor that’s set on the account to + form the complete statement descriptor. Maximum 22 characters. On card + statements, the *concatenation* of both prefix and suffix (including separators) + will appear truncated to 22 characters. maxLength: 5000 type: string - transit_number: - description: Transit number of the bank account. + statement_descriptor_suffix_kanji: + description: Provides information about a card payment that customers see + on their statements. Concatenated with the Kanji prefix (shortened Kanji + descriptor) or Kanji statement descriptor that’s set on the account to + form the complete statement descriptor. Maximum 17 characters. On card + statements, the *concatenation* of both prefix and suffix (including separators) + will appear truncated to 17 characters. maxLength: 5000 - nullable: true type: string - title: payment_method_details_acss_debit + title: payment_intent_payment_method_options_card type: object - x-expandableFields: [] - payment_method_details_afterpay_clearpay: + x-expandableFields: + - installments + - mandate_options + payment_intent_payment_method_options_eps: description: '' properties: - reference: - description: Order identifier shown to the merchant in Afterpay’s online - portal. - maxLength: 5000 - nullable: true + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none type: string - title: payment_method_details_afterpay_clearpay + title: payment_intent_payment_method_options_eps type: object x-expandableFields: [] - payment_method_details_au_becs_debit: + payment_intent_payment_method_options_link: description: '' properties: - bsb_number: - description: Bank-State-Branch number of the bank account. - maxLength: 5000 - nullable: true - type: string - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. - maxLength: 5000 - nullable: true + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual type: string - last4: - description: Last four digits of the bank account number. + persistent_token: + description: Token used for persistent Link logins. maxLength: 5000 nullable: true type: string - mandate: - description: ID of the mandate used to make this payment. - maxLength: 5000 + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session type: string - title: payment_method_details_au_becs_debit + title: payment_intent_payment_method_options_link type: object x-expandableFields: [] - payment_method_details_bacs_debit: + payment_intent_payment_method_options_mandate_options_acss_debit: description: '' properties: - fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. + custom_mandate_url: + description: A URL for custom mandate text maxLength: 5000 - nullable: true type: string - last4: - description: Last four digits of the bank account number. + interval_description: + description: Description of the interval. Only required if the 'payment_schedule' + parameter is 'interval' or 'combined'. maxLength: 5000 nullable: true type: string - mandate: - description: ID of the mandate used to make this payment. - maxLength: 5000 + payment_schedule: + description: Payment schedule for the mandate. + enum: + - combined + - interval + - sporadic nullable: true type: string - sort_code: - description: Sort code of the bank account. (e.g., `10-20-30`) - maxLength: 5000 + transaction_type: + description: Transaction type of the mandate. + enum: + - business + - personal nullable: true type: string - title: payment_method_details_bacs_debit + title: payment_intent_payment_method_options_mandate_options_acss_debit type: object x-expandableFields: [] - payment_method_details_bancontact: + payment_intent_payment_method_options_mandate_options_sepa_debit: + description: '' + properties: {} + title: payment_intent_payment_method_options_mandate_options_sepa_debit + type: object + x-expandableFields: [] + payment_intent_payment_method_options_sepa_debit: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bic: - description: Bank Identifier Code of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - generated_sepa_debit: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this Charge. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this Charge. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. - maxLength: 5000 - nullable: true - type: string - preferred_language: + mandate_options: + "$ref": "#/components/schemas/payment_intent_payment_method_options_mandate_options_sepa_debit" + setup_future_usage: description: |- - Preferred language of the Bancontact authorization page that the customer is redirected to. - Can be one of `en`, `de`, `fr`, or `nl` + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - de - - en - - fr - - nl - nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by Bancontact directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - maxLength: 5000 - nullable: true + - none + - off_session + - on_session type: string - title: payment_method_details_bancontact + title: payment_intent_payment_method_options_sepa_debit type: object x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - payment_method_details_boleto: - description: '' - properties: - tax_id: - description: The tax ID of the customer (CPF for individuals consumers or - CNPJ for businesses consumers) - maxLength: 5000 - type: string - required: - - tax_id - title: payment_method_details_boleto - type: object - x-expandableFields: [] - payment_method_details_card: + - mandate_options + payment_intent_payment_method_options_us_bank_account: description: '' properties: - brand: - description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, - `unionpay`, `visa`, or `unknown`. - maxLength: 5000 - nullable: true - type: string - checks: - anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_checks" - description: Check results by Card networks on Card address and CVC at time - of payment. - nullable: true - country: - description: Two-letter ISO code representing the country of the card. You - could use this attribute to get a sense of the international breakdown - of cards you've collected. - maxLength: 5000 - nullable: true - type: string - exp_month: - description: Two-digit number representing the card's expiration month. - type: integer - exp_year: - description: Four-digit number representing the card's expiration year. - type: integer - fingerprint: + financial_connections: + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + setup_future_usage: description: |- - Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + Indicates that you intend to make future payments with this PaymentIntent's payment method. - *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - maxLength: 5000 - nullable: true - type: string - funding: - description: Card funding type. Can be `credit`, `debit`, `prepaid`, or - `unknown`. - maxLength: 5000 - nullable: true - type: string - installments: - anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_installments" - description: |- - Installment details for this payment (Mexico only). + 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. - For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). - nullable: true - last4: - description: The last four digits of the card. - maxLength: 5000 - nullable: true + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session type: string - network: - description: Identifies which network this charge was processed on. Can - be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, - `mastercard`, `unionpay`, `visa`, or `unknown`. - maxLength: 5000 - nullable: true + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits type: string - three_d_secure: - anyOf: - - "$ref": "#/components/schemas/three_d_secure_details" - description: Populated if this transaction used 3D Secure authentication. - nullable: true - wallet: - anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_wallet" - description: If this Card is part of a card wallet, this contains the details - of the card wallet. - nullable: true - required: - - exp_month - - exp_year - title: payment_method_details_card + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_us_bank_account type: object x-expandableFields: - - checks - - installments - - three_d_secure - - wallet - payment_method_details_card_checks: + - financial_connections + payment_intent_processing: description: '' properties: - address_line1_check: - description: If a address line1 was provided, results of the check, one - of `pass`, `fail`, `unavailable`, or `unchecked`. - maxLength: 5000 - nullable: true - type: string - address_postal_code_check: - description: If a address postal code was provided, results of the check, - one of `pass`, `fail`, `unavailable`, or `unchecked`. - maxLength: 5000 - nullable: true - type: string - cvc_check: - description: If a CVC was provided, results of the check, one of `pass`, - `fail`, `unavailable`, or `unchecked`. - maxLength: 5000 - nullable: true + card: + "$ref": "#/components/schemas/payment_intent_card_processing" + type: + description: Type of the payment method for which payment is in `processing` + state, one of `card`. + enum: + - card type: string - title: payment_method_details_card_checks + required: + - type + title: PaymentIntentProcessing type: object - x-expandableFields: [] - payment_method_details_card_installments: + x-expandableFields: + - card + payment_intent_processing_customer_notification: description: '' properties: - plan: - anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_installments_plan" - description: Installment plan selected for the payment. + approval_requested: + description: Whether customer approval has been requested for this payment. + For payments greater than INR 15000 or mandate amount, the customer must + provide explicit approval of the payment with their bank. nullable: true - title: payment_method_details_card_installments + type: boolean + completes_at: + description: If customer approval is required, they need to provide approval + before this time. + format: unix-time + nullable: true + type: integer + title: PaymentIntentProcessingCustomerNotification type: object - x-expandableFields: - - plan - payment_method_details_card_installments_plan: + x-expandableFields: [] + payment_intent_type_specific_payment_method_options_client: description: '' properties: - count: - description: For `fixed_count` installment plans, this is the number of - installment payments your customer will make to their credit card. - nullable: true - type: integer - interval: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual + type: string + installments: + "$ref": "#/components/schemas/payment_flows_installment_options" + setup_future_usage: description: |- - For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. - One of `month`. + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - month - nullable: true + - none + - off_session + - on_session type: string - type: - description: Type of installment plan, one of `fixed_count`. + verification_method: + description: Bank account verification method. enum: - - fixed_count + - automatic + - instant + - microdeposits type: string - required: - - type - title: payment_method_details_card_installments_plan + x-stripeBypassValidation: true + title: PaymentIntentTypeSpecificPaymentMethodOptionsClient type: object - x-expandableFields: [] - payment_method_details_card_present: - description: '' + x-expandableFields: + - installments + payment_link: + description: |- + A payment link is a shareable URL that will take your customers to a hosted payment page. A payment link can be shared and used multiple times. + + When a customer opens a payment link it will open a new [checkout session](https://stripe.com/docs/api/checkout/sessions) to render the payment page. You can use [checkout session events](https://stripe.com/docs/api/events/types#event_types-checkout.session.completed) to track payments through payment links. + + Related guide: [Payment Links API](https://stripe.com/docs/payments/payment-links/api) properties: - amount_authorized: - description: The authorized amount + active: + description: Whether the payment link's `url` is active. If `false`, customers + visiting the URL will be shown a page saying that the link has been deactivated. + type: boolean + after_completion: + "$ref": "#/components/schemas/payment_links_resource_after_completion" + allow_promotion_codes: + description: Whether user redeemable promotion codes are enabled. + type: boolean + application_fee_amount: + description: The amount of the application fee (if any) that will be requested + to be applied to the payment and transferred to the application owner's + Stripe account. nullable: true type: integer - brand: - description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, - `unionpay`, `visa`, or `unknown`. - maxLength: 5000 + application_fee_percent: + description: This represents the percentage of the subscription invoice + subtotal that will be transferred to the application owner's Stripe account. nullable: true + type: number + automatic_tax: + "$ref": "#/components/schemas/payment_links_resource_automatic_tax" + billing_address_collection: + description: Configuration for collecting the customer's billing address. + enum: + - auto + - required type: string - cardholder_name: - description: The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) - format. May include alphanumeric characters, special characters and first/last - name separator (`/`). In some cases, the cardholder name may not be available - depending on how the issuer has configured the card. Cardholder name is - typically not available on swipe or contactless payments, such as those - made with Apple Pay and Google Pay. - maxLength: 5000 + consent_collection: + anyOf: + - "$ref": "#/components/schemas/payment_links_resource_consent_collection" + description: When set, provides configuration to gather active consent from + customers. nullable: true + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string - country: - description: Two-letter ISO code representing the country of the card. You - could use this attribute to get a sense of the international breakdown - of cards you've collected. - maxLength: 5000 - nullable: true + customer_creation: + description: Configuration for Customer creation during checkout. + enum: + - always + - if_required type: string - emv_auth_data: - description: Authorization response cryptogram. + id: + description: Unique identifier for the object. maxLength: 5000 - nullable: true type: string - exp_month: - description: Two-digit number representing the card's expiration month. - type: integer - exp_year: - description: Four-digit number representing the card's expiration year. - type: integer - fingerprint: - description: |- - Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - - *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - maxLength: 5000 - nullable: true - type: string - funding: - description: Card funding type. Can be `credit`, `debit`, `prepaid`, or - `unknown`. - maxLength: 5000 - nullable: true - type: string - generated_card: - description: ID of a card PaymentMethod generated from the card_present - PaymentMethod that may be attached to a Customer for future transactions. - Only present if it was possible to generate a card PaymentMethod. - maxLength: 5000 - nullable: true - type: string - last4: - description: The last four digits of the card. - maxLength: 5000 - nullable: true - type: string - network: - description: Identifies which network this charge was processed on. Can - be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, - `mastercard`, `unionpay`, `visa`, or `unknown`. - maxLength: 5000 - nullable: true - type: string - overcapture_supported: - description: Defines whether the authorized amount can be over-captured - or not - nullable: true + line_items: + description: The line items representing what is being sold. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/item" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: PaymentLinksResourceListLineItems + type: object + x-expandableFields: + - data + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. type: boolean - read_method: - description: How card details were read in this transaction. + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. enum: - - contact_emv - - contactless_emv - - contactless_magstripe_mode - - magnetic_stripe_fallback - - magnetic_stripe_track2 - nullable: true + - payment_link type: string - receipt: + on_behalf_of: anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_present_receipt" - description: A collection of fields required to be displayed on receipts. - Only required for EMV transactions. - nullable: true - required: - - exp_month - - exp_year - title: payment_method_details_card_present - type: object - x-expandableFields: - - receipt - payment_method_details_card_present_receipt: - description: '' - properties: - account_type: - description: The type of account being debited or credited - enum: - - checking - - credit - - prepaid - - unknown - type: string - x-stripeBypassValidation: true - application_cryptogram: - description: EMV tag 9F26, cryptogram generated by the integrated circuit - chip. - maxLength: 5000 - nullable: true - type: string - application_preferred_name: - description: Mnenomic of the Application Identifier. - maxLength: 5000 + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The account on behalf of which to charge. See the [Connect + documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) + for details. nullable: true - type: string - authorization_code: - description: Identifier for this transaction. - maxLength: 5000 + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + payment_intent_data: + anyOf: + - "$ref": "#/components/schemas/payment_links_resource_payment_intent_data" + description: Indicates the parameters to be passed to PaymentIntent creation + during checkout. nullable: true + payment_method_collection: + description: Configuration for collecting a payment method during checkout. + enum: + - always + - if_required type: string - authorization_response_code: - description: EMV tag 8A. A code returned by the card issuer. - maxLength: 5000 + payment_method_types: + description: The list of payment method types that customers can use. When + `null`, Stripe will dynamically show relevant payment methods you've enabled + in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + items: + enum: + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - card + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true nullable: true - type: string - cardholder_verification_method: - description: How the cardholder verified ownership of the card. - maxLength: 5000 + type: array + phone_number_collection: + "$ref": "#/components/schemas/payment_links_resource_phone_number_collection" + shipping_address_collection: + anyOf: + - "$ref": "#/components/schemas/payment_links_resource_shipping_address_collection" + description: Configuration for collecting the customer's shipping address. nullable: true + shipping_options: + description: The shipping rate options applied to the session. + items: + "$ref": "#/components/schemas/payment_links_resource_shipping_option" + type: array + submit_type: + description: Indicates the type of transaction being performed which customizes + relevant text on the page, such as the submit button. + enum: + - auto + - book + - donate + - pay type: string - dedicated_file_name: - description: EMV tag 84. Similar to the application identifier stored on - the integrated circuit chip. - maxLength: 5000 + subscription_data: + anyOf: + - "$ref": "#/components/schemas/payment_links_resource_subscription_data" + description: When creating a subscription, the specified configuration data + will be used. There must be at least one line item with a recurring price + to use `subscription_data`. nullable: true - type: string - terminal_verification_results: - description: The outcome of a series of EMV functions performed by the card - reader. - maxLength: 5000 + tax_id_collection: + "$ref": "#/components/schemas/payment_links_resource_tax_id_collection" + transfer_data: + anyOf: + - "$ref": "#/components/schemas/payment_links_resource_transfer_data" + description: The account (if any) the payments will be attributed to for + tax reporting, and where funds from each payment will be transferred to. nullable: true - type: string - transaction_status_information: - description: An indication of various EMV functions performed during the - transaction. + url: + description: The public URL that can be shared with customers. maxLength: 5000 - nullable: true type: string - title: payment_method_details_card_present_receipt + required: + - active + - after_completion + - allow_promotion_codes + - automatic_tax + - billing_address_collection + - currency + - customer_creation + - id + - livemode + - metadata + - object + - payment_method_collection + - phone_number_collection + - shipping_options + - submit_type + - tax_id_collection + - url + title: PaymentLink type: object - x-expandableFields: [] - payment_method_details_card_wallet: + x-expandableFields: + - after_completion + - automatic_tax + - consent_collection + - line_items + - on_behalf_of + - payment_intent_data + - phone_number_collection + - shipping_address_collection + - shipping_options + - subscription_data + - tax_id_collection + - transfer_data + x-resourceId: payment_link + payment_links_resource_after_completion: description: '' properties: - amex_express_checkout: - "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" - apple_pay: - "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" - dynamic_last4: - description: "(For tokenized numbers only.) The last four digits of the - device account number." - maxLength: 5000 - nullable: true - type: string - google_pay: - "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" - masterpass: - "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" - samsung_pay: - "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + hosted_confirmation: + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_confirmation_page" + redirect: + "$ref": "#/components/schemas/payment_links_resource_completion_behavior_redirect" type: - description: The type of the card wallet, one of `amex_express_checkout`, - `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. - An additional hash is included on the Wallet subhash with a name matching - this value. It contains additional information specific to the card wallet - type. + description: The specified behavior after the purchase is complete. enum: - - amex_express_checkout - - apple_pay - - google_pay - - masterpass - - samsung_pay - - visa_checkout + - hosted_confirmation + - redirect type: string - visa_checkout: - "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" required: - type - title: payment_method_details_card_wallet + title: PaymentLinksResourceAfterCompletion type: object x-expandableFields: - - amex_express_checkout - - apple_pay - - google_pay - - masterpass - - samsung_pay - - visa_checkout - payment_method_details_card_wallet_amex_express_checkout: - description: '' - properties: {} - title: payment_method_details_card_wallet_amex_express_checkout - type: object - x-expandableFields: [] - payment_method_details_card_wallet_apple_pay: - description: '' - properties: {} - title: payment_method_details_card_wallet_apple_pay - type: object - x-expandableFields: [] - payment_method_details_card_wallet_google_pay: + - hosted_confirmation + - redirect + payment_links_resource_automatic_tax: description: '' - properties: {} - title: payment_method_details_card_wallet_google_pay + properties: + enabled: + description: If `true`, tax will be calculated automatically using the customer's + location. + type: boolean + required: + - enabled + title: PaymentLinksResourceAutomaticTax type: object x-expandableFields: [] - payment_method_details_card_wallet_masterpass: + payment_links_resource_completion_behavior_confirmation_page: description: '' properties: - billing_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified billing address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - email: - description: Owner's verified email. Values are verified or provided by - the wallet directly (if supported) at the time of authorization or settlement. - They cannot be set or mutated. - maxLength: 5000 - nullable: true - type: string - name: - description: Owner's verified full name. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. + custom_message: + description: The custom message that is displayed to the customer after + the purchase is complete. maxLength: 5000 nullable: true type: string - shipping_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified shipping address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - title: payment_method_details_card_wallet_masterpass - type: object - x-expandableFields: - - billing_address - - shipping_address - payment_method_details_card_wallet_samsung_pay: - description: '' - properties: {} - title: payment_method_details_card_wallet_samsung_pay + title: PaymentLinksResourceCompletionBehaviorConfirmationPage type: object x-expandableFields: [] - payment_method_details_card_wallet_visa_checkout: + payment_links_resource_completion_behavior_redirect: description: '' properties: - billing_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified billing address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - email: - description: Owner's verified email. Values are verified or provided by - the wallet directly (if supported) at the time of authorization or settlement. - They cannot be set or mutated. - maxLength: 5000 - nullable: true - type: string - name: - description: Owner's verified full name. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. + url: + description: The URL the customer will be redirected to after the purchase + is complete. maxLength: 5000 - nullable: true type: string - shipping_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's verified shipping address. Values are verified or provided - by the wallet directly (if supported) at the time of authorization or - settlement. They cannot be set or mutated. - nullable: true - title: payment_method_details_card_wallet_visa_checkout + required: + - url + title: PaymentLinksResourceCompletionBehaviorRedirect type: object - x-expandableFields: - - billing_address - - shipping_address - payment_method_details_eps: + x-expandableFields: [] + payment_links_resource_consent_collection: description: '' properties: - bank: - description: The customer's bank. Should be one of `arzte_und_apotheker_bank`, - `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, - `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, - `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, - `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, - `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, - `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, - `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, - `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + promotions: + description: If set to `auto`, enables the collection of customer consent + for promotional communications. enum: - - arzte_und_apotheker_bank - - austrian_anadi_bank_ag - - bank_austria - - bankhaus_carl_spangler - - bankhaus_schelhammer_und_schattera_ag - - bawag_psk_ag - - bks_bank_ag - - brull_kallmus_bank_ag - - btv_vier_lander_bank - - capital_bank_grawe_gruppe_ag - - dolomitenbank - - easybank_ag - - erste_bank_und_sparkassen - - hypo_alpeadriabank_international_ag - - hypo_bank_burgenland_aktiengesellschaft - - hypo_noe_lb_fur_niederosterreich_u_wien - - hypo_oberosterreich_salzburg_steiermark - - hypo_tirol_bank_ag - - hypo_vorarlberg_bank_ag - - marchfelder_bank - - oberbank_ag - - raiffeisen_bankengruppe_osterreich - - schoellerbank_ag - - sparda_bank_wien - - volksbank_gruppe - - volkskreditbank_ag - - vr_bank_braunau + - auto + - none nullable: true type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by EPS directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - EPS rarely provides this information so the attribute is usually empty. - maxLength: 5000 + terms_of_service: + description: If set to `required`, it requires cutomers to accept the terms + of service before being able to pay. If set to `none`, customers won't + be shown a checkbox to accept the terms of service. + enum: + - none + - required nullable: true type: string - title: payment_method_details_eps + title: PaymentLinksResourceConsentCollection type: object x-expandableFields: [] - payment_method_details_fpx: + payment_links_resource_payment_intent_data: description: '' properties: - bank: - description: The customer's bank. Can be one of `affin_bank`, `agrobank`, - `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, - `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, - `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, - or `pb_enterprise`. + capture_method: + description: Indicates when the funds will be captured from the customer's + account. enum: - - affin_bank - - agrobank - - alliance_bank - - ambank - - bank_islam - - bank_muamalat - - bank_rakyat - - bsn - - cimb - - deutsche_bank - - hong_leong_bank - - hsbc - - kfh - - maybank2e - - maybank2u - - ocbc - - pb_enterprise - - public_bank - - rhb - - standard_chartered - - uob + - automatic + - manual + nullable: true type: string - transaction_id: - description: Unique transaction id generated by FPX for every request from - the merchant - maxLength: 5000 + setup_future_usage: + description: Indicates that you intend to make future payments with the + payment method collected during checkout. + enum: + - off_session + - on_session nullable: true type: string + title: PaymentLinksResourcePaymentIntentData + type: object + x-expandableFields: [] + payment_links_resource_phone_number_collection: + description: '' + properties: + enabled: + description: If `true`, a phone number will be collected during checkout. + type: boolean required: - - bank - title: payment_method_details_fpx + - enabled + title: PaymentLinksResourcePhoneNumberCollection type: object x-expandableFields: [] - payment_method_details_giropay: + payment_links_resource_shipping_address_collection: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bic: - description: Bank Identifier Code of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by Giropay directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - Giropay rarely provides this information so the attribute is usually empty. - maxLength: 5000 - nullable: true - type: string - title: payment_method_details_giropay + allowed_countries: + description: 'An array of two-letter ISO country codes representing which + countries Checkout should provide as options for shipping locations. Unsupported + country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, + UM, VI`.' + items: + enum: + - 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 + type: string + type: array + required: + - allowed_countries + title: PaymentLinksResourceShippingAddressCollection type: object x-expandableFields: [] - payment_method_details_grabpay: + payment_links_resource_shipping_option: description: '' properties: - transaction_id: - description: Unique transaction id generated by GrabPay + shipping_amount: + description: A non-negative integer in cents representing how much to charge. + type: integer + shipping_rate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/shipping_rate" + description: The ID of the Shipping Rate to use for this shipping option. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/shipping_rate" + required: + - shipping_amount + - shipping_rate + title: PaymentLinksResourceShippingOption + type: object + x-expandableFields: + - shipping_rate + payment_links_resource_subscription_data: + description: '' + properties: + description: + description: The subscription's description, meant to be displayable to + the customer. Use this field to optionally store an explanation of the + subscription. maxLength: 5000 nullable: true type: string - title: payment_method_details_grabpay + trial_period_days: + description: Integer representing the number of trial period days before + the customer is charged for the first time. + nullable: true + type: integer + title: PaymentLinksResourceSubscriptionData type: object x-expandableFields: [] - payment_method_details_ideal: + payment_links_resource_tax_id_collection: description: '' properties: - bank: - description: The customer's bank. Can be one of `abn_amro`, `asn_bank`, - `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, - `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - enum: - - abn_amro - - asn_bank - - bunq - - handelsbanken - - ing - - knab - - moneyou - - rabobank - - regiobank - - revolut - - sns_bank - - triodos_bank - - van_lanschot - nullable: true - type: string - bic: - description: The Bank Identifier Code of the customer's bank. - enum: - - ABNANL2A - - ASNBNL21 - - BUNQNL2A - - FVLBNL22 - - HANDNL2A - - INGBNL2A - - KNABNL2H - - MOYONL21 - - RABONL2U - - RBRBNL21 - - REVOLT21 - - SNSBNL2A - - TRIONL2U + enabled: + description: Indicates whether tax ID collection is enabled for the session. + type: boolean + required: + - enabled + title: PaymentLinksResourceTaxIdCollection + type: object + x-expandableFields: [] + payment_links_resource_transfer_data: + description: '' + properties: + amount: + description: The amount in %s that will be transferred to the destination + account. By default, the entire amount is transferred to the destination. nullable: true - type: string - generated_sepa_debit: + type: integer + destination: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this Charge. - nullable: true + - "$ref": "#/components/schemas/account" + description: The connected account receiving the transfer. x-expansionResources: oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: + - "$ref": "#/components/schemas/account" + required: + - destination + title: PaymentLinksResourceTransferData + type: object + x-expandableFields: + - destination + payment_method: + description: |- + PaymentMethod objects represent your customer's payment instruments. + You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them 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). + properties: + acss_debit: + "$ref": "#/components/schemas/payment_method_acss_debit" + affirm: + "$ref": "#/components/schemas/payment_method_affirm" + afterpay_clearpay: + "$ref": "#/components/schemas/payment_method_afterpay_clearpay" + alipay: + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay" + au_becs_debit: + "$ref": "#/components/schemas/payment_method_au_becs_debit" + bacs_debit: + "$ref": "#/components/schemas/payment_method_bacs_debit" + bancontact: + "$ref": "#/components/schemas/payment_method_bancontact" + billing_details: + "$ref": "#/components/schemas/billing_details" + blik: + "$ref": "#/components/schemas/payment_method_blik" + boleto: + "$ref": "#/components/schemas/payment_method_boleto" + card: + "$ref": "#/components/schemas/payment_method_card" + card_present: + "$ref": "#/components/schemas/payment_method_card_present" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + customer: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this Charge. + - "$ref": "#/components/schemas/customer" + description: The ID of the Customer to which this PaymentMethod is saved. + This will not be set when the PaymentMethod has not been saved to a Customer. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. + - "$ref": "#/components/schemas/customer" + customer_balance: + "$ref": "#/components/schemas/payment_method_customer_balance" + eps: + "$ref": "#/components/schemas/payment_method_eps" + fpx: + "$ref": "#/components/schemas/payment_method_fpx" + giropay: + "$ref": "#/components/schemas/payment_method_giropay" + grabpay: + "$ref": "#/components/schemas/payment_method_grabpay" + id: + description: Unique identifier for the object. maxLength: 5000 - nullable: true type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by iDEAL directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - maxLength: 5000 + ideal: + "$ref": "#/components/schemas/payment_method_ideal" + interac_present: + "$ref": "#/components/schemas/payment_method_interac_present" + klarna: + "$ref": "#/components/schemas/payment_method_klarna" + konbini: + "$ref": "#/components/schemas/payment_method_konbini" + link: + "$ref": "#/components/schemas/payment_method_link" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - payment_method type: string - title: payment_method_details_ideal + oxxo: + "$ref": "#/components/schemas/payment_method_oxxo" + p24: + "$ref": "#/components/schemas/payment_method_p24" + paynow: + "$ref": "#/components/schemas/payment_method_paynow" + pix: + "$ref": "#/components/schemas/payment_method_pix" + promptpay: + "$ref": "#/components/schemas/payment_method_promptpay" + radar_options: + "$ref": "#/components/schemas/radar_radar_options" + sepa_debit: + "$ref": "#/components/schemas/payment_method_sepa_debit" + sofort: + "$ref": "#/components/schemas/payment_method_sofort" + type: + description: The type of the PaymentMethod. An additional hash is included + on the PaymentMethod with a name matching this value. It contains additional + information specific to the PaymentMethod type. + enum: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - card + - card_present + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - interac_present + - klarna + - konbini + - link + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + us_bank_account: + "$ref": "#/components/schemas/payment_method_us_bank_account" + wechat_pay: + "$ref": "#/components/schemas/payment_method_wechat_pay" + required: + - billing_details + - created + - id + - livemode + - object + - type + title: PaymentMethod type: object x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - payment_method_details_interac_present: - description: '' - properties: - brand: - description: Card brand. Can be `interac`, `mastercard` or `visa`. - maxLength: 5000 - nullable: true - type: string - cardholder_name: - description: The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) - format. May include alphanumeric characters, special characters and first/last - name separator (`/`). In some cases, the cardholder name may not be available - depending on how the issuer has configured the card. Cardholder name is - typically not available on swipe or contactless payments, such as those - made with Apple Pay and Google Pay. - maxLength: 5000 - nullable: true - type: string - country: - description: Two-letter ISO code representing the country of the card. You - could use this attribute to get a sense of the international breakdown - of cards you've collected. - maxLength: 5000 - nullable: true - type: string - emv_auth_data: - description: Authorization response cryptogram. + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - billing_details + - blik + - boleto + - card + - card_present + - customer + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - interac_present + - klarna + - konbini + - link + - oxxo + - p24 + - paynow + - pix + - promptpay + - radar_options + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + x-resourceId: payment_method + payment_method_acss_debit: + description: '' + properties: + bank_name: + description: Name of the bank associated with the bank account. maxLength: 5000 nullable: true type: string - exp_month: - description: Two-digit number representing the card's expiration month. - type: integer - exp_year: - description: Four-digit number representing the card's expiration year. - type: integer fingerprint: - description: |- - Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. - - *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* - maxLength: 5000 - nullable: true - type: string - funding: - description: Card funding type. Can be `credit`, `debit`, `prepaid`, or - `unknown`. + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - generated_card: - description: ID of a card PaymentMethod generated from the card_present - PaymentMethod that may be attached to a Customer for future transactions. - Only present if it was possible to generate a card PaymentMethod. + institution_number: + description: Institution number of the bank account. maxLength: 5000 nullable: true type: string last4: - description: The last four digits of the card. + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - network: - description: Identifies which network this charge was processed on. Can - be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, - `mastercard`, `unionpay`, `visa`, or `unknown`. + transit_number: + description: Transit number of the bank account. maxLength: 5000 nullable: true type: string - preferred_locales: - description: EMV tag 5F2D. Preferred languages specified by the integrated - circuit chip. - items: - maxLength: 5000 - type: string - nullable: true - type: array - read_method: - description: How card details were read in this transaction. - enum: - - contact_emv - - contactless_emv - - contactless_magstripe_mode - - magnetic_stripe_fallback - - magnetic_stripe_track2 - nullable: true - type: string - receipt: - anyOf: - - "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" - description: A collection of fields required to be displayed on receipts. - Only required for EMV transactions. - nullable: true - required: - - exp_month - - exp_year - title: payment_method_details_interac_present + title: payment_method_acss_debit type: object - x-expandableFields: - - receipt - payment_method_details_interac_present_receipt: + x-expandableFields: [] + payment_method_affirm: + description: '' + properties: {} + title: payment_method_affirm + type: object + x-expandableFields: [] + payment_method_afterpay_clearpay: + description: '' + properties: {} + title: payment_method_afterpay_clearpay + type: object + x-expandableFields: [] + payment_method_au_becs_debit: description: '' properties: - account_type: - description: The type of account being debited or credited - enum: - - checking - - savings - - unknown - type: string - x-stripeBypassValidation: true - application_cryptogram: - description: EMV tag 9F26, cryptogram generated by the integrated circuit - chip. - maxLength: 5000 - nullable: true - type: string - application_preferred_name: - description: Mnenomic of the Application Identifier. - maxLength: 5000 - nullable: true - type: string - authorization_code: - description: Identifier for this transaction. - maxLength: 5000 - nullable: true - type: string - authorization_response_code: - description: EMV tag 8A. A code returned by the card issuer. - maxLength: 5000 - nullable: true - type: string - cardholder_verification_method: - description: How the cardholder verified ownership of the card. - maxLength: 5000 - nullable: true - type: string - dedicated_file_name: - description: EMV tag 84. Similar to the application identifier stored on - the integrated circuit chip. + bsb_number: + description: Six-digit number identifying bank and branch associated with + this bank account. maxLength: 5000 nullable: true type: string - terminal_verification_results: - description: The outcome of a series of EMV functions performed by the card - reader. + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - transaction_status_information: - description: An indication of various EMV functions performed during the - transaction. + last4: + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - title: payment_method_details_interac_present_receipt + title: payment_method_au_becs_debit type: object x-expandableFields: [] - payment_method_details_klarna: + payment_method_bacs_debit: description: '' properties: - payment_method_category: - description: |- - The Klarna payment method used for this transaction. - Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` - maxLength: 5000 - nullable: true - type: string - preferred_locale: - description: |- - Preferred language of the Klarna authorization page that the customer is redirected to. - Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, or `en-FR` + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - title: payment_method_details_klarna - type: object - x-expandableFields: [] - payment_method_details_multibanco: - description: '' - properties: - entity: - description: Entity number associated with this Multibanco payment. + last4: + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - reference: - description: Reference number associated with this Multibanco payment. + sort_code: + description: Sort code of the bank account. (e.g., `10-20-30`) maxLength: 5000 nullable: true type: string - title: payment_method_details_multibanco + title: payment_method_bacs_debit type: object x-expandableFields: [] - payment_method_details_oxxo: + payment_method_bancontact: description: '' - properties: - number: - description: OXXO reference number - maxLength: 5000 - nullable: true - type: string - title: payment_method_details_oxxo + properties: {} + title: payment_method_bancontact type: object x-expandableFields: [] - payment_method_details_p24: + payment_method_blik: + description: '' + properties: {} + title: payment_method_blik + type: object + x-expandableFields: [] + payment_method_boleto: description: '' properties: - bank: - description: The customer's bank. Can be one of `ing`, `citi_handlowy`, - `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, - `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, - `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, - `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, - `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. - enum: - - alior_bank - - bank_millennium - - bank_nowy_bfg_sa - - bank_pekao_sa - - banki_spbdzielcze - - blik - - bnp_paribas - - boz - - citi_handlowy - - credit_agricole - - envelobank - - etransfer_pocztowy24 - - getin_bank - - ideabank - - ing - - inteligo - - mbank_mtransfer - - nest_przelew - - noble_pay - - pbac_z_ipko - - plus_bank - - santander_przelew24 - - tmobile_usbugi_bankowe - - toyota_bank - - volkswagen_bank - nullable: true - type: string - reference: - description: Unique reference for this Przelewy24 payment. - maxLength: 5000 - nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by Przelewy24 directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - Przelewy24 rarely provides this information so the attribute is usually empty. + tax_id: + description: Uniquely identifies the customer tax id (CNPJ or CPF) maxLength: 5000 - nullable: true type: string - title: payment_method_details_p24 + required: + - tax_id + title: payment_method_boleto type: object x-expandableFields: [] - payment_method_details_sepa_debit: + payment_method_card: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. + brand: + description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, + `unionpay`, `visa`, or `unknown`. maxLength: 5000 - nullable: true type: string - branch_code: - description: Branch code of bank associated with the bank account. - maxLength: 5000 + checks: + anyOf: + - "$ref": "#/components/schemas/payment_method_card_checks" + description: Checks on Card address and CVC if provided. nullable: true - type: string country: - description: Two-letter ISO code representing the country the bank account - is located in. + description: Two-letter ISO code representing the country of the card. You + could use this attribute to get a sense of the international breakdown + of cards you've collected. maxLength: 5000 nullable: true type: string + exp_month: + description: Two-digit number representing the card's expiration month. + type: integer + exp_year: + description: Four-digit number representing the card's expiration year. + type: integer fingerprint: - description: Uniquely identifies this particular bank account. You can use - this attribute to check whether two bank accounts are the same. + description: |- + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* maxLength: 5000 nullable: true type: string - last4: - description: Last four characters of the IBAN. + funding: + description: Card funding type. Can be `credit`, `debit`, `prepaid`, or + `unknown`. maxLength: 5000 - nullable: true type: string - mandate: - description: ID of the mandate used to make this payment. - maxLength: 5000 + generated_from: + anyOf: + - "$ref": "#/components/schemas/payment_method_card_generated_card" + description: Details of the original PaymentMethod that created this object. nullable: true + last4: + description: The last four digits of the card. + maxLength: 5000 type: string - title: payment_method_details_sepa_debit + networks: + anyOf: + - "$ref": "#/components/schemas/networks" + description: Contains information about card networks that can be used to + process the payment. + nullable: true + three_d_secure_usage: + anyOf: + - "$ref": "#/components/schemas/three_d_secure_usage" + description: Contains details on how this Card maybe be used for 3D Secure + authentication. + nullable: true + wallet: + anyOf: + - "$ref": "#/components/schemas/payment_method_card_wallet" + description: If this Card is part of a card wallet, this contains the details + of the card wallet. + nullable: true + required: + - brand + - exp_month + - exp_year + - funding + - last4 + title: payment_method_card type: object - x-expandableFields: [] - payment_method_details_sofort: + x-expandableFields: + - checks + - generated_from + - networks + - three_d_secure_usage + - wallet + payment_method_card_checks: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. + address_line1_check: + description: If a address line1 was provided, results of the check, one + of `pass`, `fail`, `unavailable`, or `unchecked`. maxLength: 5000 nullable: true type: string - bank_name: - description: Name of the bank associated with the bank account. + address_postal_code_check: + description: If a address postal code was provided, results of the check, + one of `pass`, `fail`, `unavailable`, or `unchecked`. maxLength: 5000 nullable: true type: string - bic: - description: Bank Identifier Code of the bank associated with the bank account. + cvc_check: + description: If a CVC was provided, results of the check, one of `pass`, + `fail`, `unavailable`, or `unchecked`. maxLength: 5000 nullable: true type: string - country: - description: Two-letter ISO code representing the country the bank account - is located in. + title: payment_method_card_checks + type: object + x-expandableFields: [] + payment_method_card_generated_card: + description: '' + properties: + charge: + description: The charge that created this object. maxLength: 5000 nullable: true type: string - generated_sepa_debit: + payment_method_details: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this Charge. + - "$ref": "#/components/schemas/card_generated_from_payment_method_details" + description: Transaction-specific details of the payment method used in + the payment. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: + setup_attempt: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this Charge. + - "$ref": "#/components/schemas/setup_attempt" + description: The ID of the SetupAttempt that generated this PaymentMethod, + if any. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. + - "$ref": "#/components/schemas/setup_attempt" + title: payment_method_card_generated_card + type: object + x-expandableFields: + - payment_method_details + - setup_attempt + payment_method_card_present: + description: '' + properties: {} + title: payment_method_card_present + type: object + x-expandableFields: [] + payment_method_card_wallet: + description: '' + properties: + amex_express_checkout: + "$ref": "#/components/schemas/payment_method_card_wallet_amex_express_checkout" + apple_pay: + "$ref": "#/components/schemas/payment_method_card_wallet_apple_pay" + dynamic_last4: + description: "(For tokenized numbers only.) The last four digits of the + device account number." maxLength: 5000 nullable: true type: string - preferred_language: - description: |- - Preferred language of the SOFORT authorization page that the customer is redirected to. - Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + google_pay: + "$ref": "#/components/schemas/payment_method_card_wallet_google_pay" + masterpass: + "$ref": "#/components/schemas/payment_method_card_wallet_masterpass" + samsung_pay: + "$ref": "#/components/schemas/payment_method_card_wallet_samsung_pay" + type: + description: The type of the card wallet, one of `amex_express_checkout`, + `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. + An additional hash is included on the Wallet subhash with a name matching + this value. It contains additional information specific to the card wallet + type. enum: - - de - - en - - es - - fr - - it - - nl - - pl - nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by SOFORT directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - maxLength: 5000 - nullable: true + - amex_express_checkout + - apple_pay + - google_pay + - masterpass + - samsung_pay + - visa_checkout type: string - title: payment_method_details_sofort + visa_checkout: + "$ref": "#/components/schemas/payment_method_card_wallet_visa_checkout" + required: + - type + title: payment_method_card_wallet type: object x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - payment_method_details_stripe_account: + - amex_express_checkout + - apple_pay + - google_pay + - masterpass + - samsung_pay + - visa_checkout + payment_method_card_wallet_amex_express_checkout: description: '' properties: {} - title: payment_method_details_stripe_account + title: payment_method_card_wallet_amex_express_checkout type: object x-expandableFields: [] - payment_method_details_wechat: + payment_method_card_wallet_apple_pay: description: '' properties: {} - title: payment_method_details_wechat + title: payment_method_card_wallet_apple_pay type: object x-expandableFields: [] - payment_method_details_wechat_pay: + payment_method_card_wallet_google_pay: + description: '' + properties: {} + title: payment_method_card_wallet_google_pay + type: object + x-expandableFields: [] + payment_method_card_wallet_masterpass: description: '' properties: - fingerprint: - description: Uniquely identifies this particular WeChat Pay account. You - can use this attribute to check whether two WeChat accounts are the same. + billing_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's verified billing address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + nullable: true + email: + description: Owner's verified email. Values are verified or provided by + the wallet directly (if supported) at the time of authorization or settlement. + They cannot be set or mutated. maxLength: 5000 nullable: true type: string - transaction_id: - description: Transaction ID of this particular WeChat Pay transaction. + name: + description: Owner's verified full name. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. maxLength: 5000 nullable: true type: string - title: payment_method_details_wechat_pay + shipping_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's verified shipping address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + nullable: true + title: payment_method_card_wallet_masterpass type: object - x-expandableFields: [] - payment_method_eps: - description: '' - properties: - bank: - description: The customer's bank. Should be one of `arzte_und_apotheker_bank`, - `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, - `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, - `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, - `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, - `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, - `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, - `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, - `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. - enum: - - arzte_und_apotheker_bank - - austrian_anadi_bank_ag - - bank_austria - - bankhaus_carl_spangler - - bankhaus_schelhammer_und_schattera_ag - - bawag_psk_ag - - bks_bank_ag - - brull_kallmus_bank_ag - - btv_vier_lander_bank - - capital_bank_grawe_gruppe_ag - - dolomitenbank - - easybank_ag - - erste_bank_und_sparkassen - - hypo_alpeadriabank_international_ag - - hypo_bank_burgenland_aktiengesellschaft - - hypo_noe_lb_fur_niederosterreich_u_wien - - hypo_oberosterreich_salzburg_steiermark - - hypo_tirol_bank_ag - - hypo_vorarlberg_bank_ag - - marchfelder_bank - - oberbank_ag - - raiffeisen_bankengruppe_osterreich - - schoellerbank_ag - - sparda_bank_wien - - volksbank_gruppe - - volkskreditbank_ag - - vr_bank_braunau - nullable: true - type: string - title: payment_method_eps - type: object - x-expandableFields: [] - payment_method_fpx: - description: '' - properties: - bank: - description: The customer's bank, if provided. Can be one of `affin_bank`, - `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, - `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, - `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, - `maybank2e`, or `pb_enterprise`. - enum: - - affin_bank - - agrobank - - alliance_bank - - ambank - - bank_islam - - bank_muamalat - - bank_rakyat - - bsn - - cimb - - deutsche_bank - - hong_leong_bank - - hsbc - - kfh - - maybank2e - - maybank2u - - ocbc - - pb_enterprise - - public_bank - - rhb - - standard_chartered - - uob - type: string - required: - - bank - title: payment_method_fpx - type: object - x-expandableFields: [] - payment_method_giropay: - description: '' - properties: {} - title: payment_method_giropay - type: object - x-expandableFields: [] - payment_method_grabpay: - description: '' - properties: {} - title: payment_method_grabpay - type: object - x-expandableFields: [] - payment_method_ideal: - description: '' - properties: - bank: - description: The customer's bank, if provided. Can be one of `abn_amro`, - `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, - `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - enum: - - abn_amro - - asn_bank - - bunq - - handelsbanken - - ing - - knab - - moneyou - - rabobank - - regiobank - - revolut - - sns_bank - - triodos_bank - - van_lanschot - nullable: true - type: string - bic: - description: The Bank Identifier Code of the customer's bank, if the bank - was provided. - enum: - - ABNANL2A - - ASNBNL21 - - BUNQNL2A - - FVLBNL22 - - HANDNL2A - - INGBNL2A - - KNABNL2H - - MOYONL21 - - RABONL2U - - RBRBNL21 - - REVOLT21 - - SNSBNL2A - - TRIONL2U - nullable: true - type: string - title: payment_method_ideal - type: object - x-expandableFields: [] - payment_method_interac_present: + x-expandableFields: + - billing_address + - shipping_address + payment_method_card_wallet_samsung_pay: description: '' properties: {} - title: payment_method_interac_present + title: payment_method_card_wallet_samsung_pay type: object x-expandableFields: [] - payment_method_klarna: + payment_method_card_wallet_visa_checkout: description: '' properties: - dob: + billing_address: anyOf: - - "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" - description: The customer's date of birth, if provided. + - "$ref": "#/components/schemas/address" + description: Owner's verified billing address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. nullable: true - title: payment_method_klarna - type: object - x-expandableFields: - - dob - payment_method_options_afterpay_clearpay: - description: '' - properties: - reference: - description: |- - Order identifier shown to the merchant in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about - the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + email: + description: Owner's verified email. Values are verified or provided by + the wallet directly (if supported) at the time of authorization or settlement. + They cannot be set or mutated. maxLength: 5000 nullable: true type: string - title: payment_method_options_afterpay_clearpay - type: object - x-expandableFields: [] - payment_method_options_alipay: - description: '' - properties: {} - title: payment_method_options_alipay - type: object - x-expandableFields: [] - payment_method_options_bacs_debit: - description: '' - properties: {} - title: payment_method_options_bacs_debit - type: object - x-expandableFields: [] - payment_method_options_bancontact: - description: '' - properties: - preferred_language: - description: Preferred language of the Bancontact authorization page that - the customer is redirected to. - enum: - - de - - en - - fr - - nl - type: string - required: - - preferred_language - title: payment_method_options_bancontact - type: object - x-expandableFields: [] - payment_method_options_boleto: - description: '' - properties: - expires_after_days: - description: The number of calendar days before a Boleto voucher expires. - For example, if you create a Boleto voucher on Monday and you set expires_after_days - to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo - time. - type: integer - required: - - expires_after_days - title: payment_method_options_boleto - type: object - x-expandableFields: [] - payment_method_options_card_installments: - description: '' - properties: - available_plans: - description: Installment plans that may be selected for this PaymentIntent. - items: - "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + name: + description: Owner's verified full name. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + maxLength: 5000 nullable: true - type: array - enabled: - description: Whether Installments are enabled for this PaymentIntent. - type: boolean - plan: + type: string + shipping_address: anyOf: - - "$ref": "#/components/schemas/payment_method_details_card_installments_plan" - description: Installment plan selected for this PaymentIntent. + - "$ref": "#/components/schemas/address" + description: Owner's verified shipping address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. nullable: true - required: - - enabled - title: payment_method_options_card_installments + title: payment_method_card_wallet_visa_checkout type: object x-expandableFields: - - available_plans - - plan - payment_method_options_card_present: - description: '' - properties: {} - title: payment_method_options_card_present - type: object - x-expandableFields: [] - payment_method_options_fpx: - description: '' - properties: {} - title: payment_method_options_fpx - type: object - x-expandableFields: [] - payment_method_options_giropay: - description: '' - properties: {} - title: payment_method_options_giropay - type: object - x-expandableFields: [] - payment_method_options_grabpay: - description: '' - properties: {} - title: payment_method_options_grabpay - type: object - x-expandableFields: [] - payment_method_options_ideal: - description: '' - properties: {} - title: payment_method_options_ideal - type: object - x-expandableFields: [] - payment_method_options_interac_present: + - billing_address + - shipping_address + payment_method_customer_balance: description: '' properties: {} - title: payment_method_options_interac_present + title: payment_method_customer_balance type: object x-expandableFields: [] - payment_method_options_klarna: + payment_method_details: description: '' properties: - preferred_locale: - description: Preferred locale of the Klarna checkout page that the customer - is redirected to. + ach_credit_transfer: + "$ref": "#/components/schemas/payment_method_details_ach_credit_transfer" + ach_debit: + "$ref": "#/components/schemas/payment_method_details_ach_debit" + acss_debit: + "$ref": "#/components/schemas/payment_method_details_acss_debit" + affirm: + "$ref": "#/components/schemas/payment_method_details_affirm" + afterpay_clearpay: + "$ref": "#/components/schemas/payment_method_details_afterpay_clearpay" + alipay: + "$ref": "#/components/schemas/payment_flows_private_payment_methods_alipay_details" + au_becs_debit: + "$ref": "#/components/schemas/payment_method_details_au_becs_debit" + bacs_debit: + "$ref": "#/components/schemas/payment_method_details_bacs_debit" + bancontact: + "$ref": "#/components/schemas/payment_method_details_bancontact" + blik: + "$ref": "#/components/schemas/payment_method_details_blik" + boleto: + "$ref": "#/components/schemas/payment_method_details_boleto" + card: + "$ref": "#/components/schemas/payment_method_details_card" + card_present: + "$ref": "#/components/schemas/payment_method_details_card_present" + customer_balance: + "$ref": "#/components/schemas/payment_method_details_customer_balance" + eps: + "$ref": "#/components/schemas/payment_method_details_eps" + fpx: + "$ref": "#/components/schemas/payment_method_details_fpx" + giropay: + "$ref": "#/components/schemas/payment_method_details_giropay" + grabpay: + "$ref": "#/components/schemas/payment_method_details_grabpay" + ideal: + "$ref": "#/components/schemas/payment_method_details_ideal" + interac_present: + "$ref": "#/components/schemas/payment_method_details_interac_present" + klarna: + "$ref": "#/components/schemas/payment_method_details_klarna" + konbini: + "$ref": "#/components/schemas/payment_method_details_konbini" + link: + "$ref": "#/components/schemas/payment_method_details_link" + multibanco: + "$ref": "#/components/schemas/payment_method_details_multibanco" + oxxo: + "$ref": "#/components/schemas/payment_method_details_oxxo" + p24: + "$ref": "#/components/schemas/payment_method_details_p24" + paynow: + "$ref": "#/components/schemas/payment_method_details_paynow" + pix: + "$ref": "#/components/schemas/payment_method_details_pix" + promptpay: + "$ref": "#/components/schemas/payment_method_details_promptpay" + sepa_debit: + "$ref": "#/components/schemas/payment_method_details_sepa_debit" + sofort: + "$ref": "#/components/schemas/payment_method_details_sofort" + stripe_account: + "$ref": "#/components/schemas/payment_method_details_stripe_account" + type: + description: |- + The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + An additional hash is included on `payment_method_details` with a name matching this value. + It contains information specific to the payment method. maxLength: 5000 - nullable: true type: string - title: payment_method_options_klarna - type: object - x-expandableFields: [] - payment_method_options_oxxo: - description: '' - properties: - expires_after_days: - description: The number of calendar days before an OXXO invoice expires. - For example, if you create an OXXO invoice on Monday and you set expires_after_days - to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City - time. - type: integer + us_bank_account: + "$ref": "#/components/schemas/payment_method_details_us_bank_account" + wechat: + "$ref": "#/components/schemas/payment_method_details_wechat" + wechat_pay: + "$ref": "#/components/schemas/payment_method_details_wechat_pay" required: - - expires_after_days - title: payment_method_options_oxxo - type: object - x-expandableFields: [] - payment_method_options_p24: - description: '' - properties: {} - title: payment_method_options_p24 + - type + title: payment_method_details type: object - x-expandableFields: [] - payment_method_options_sofort: + x-expandableFields: + - ach_credit_transfer + - ach_debit + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - card + - card_present + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - interac_present + - klarna + - konbini + - link + - multibanco + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - stripe_account + - us_bank_account + - wechat + - wechat_pay + payment_method_details_ach_credit_transfer: description: '' properties: - preferred_language: - description: Preferred language of the SOFORT authorization page that the - customer is redirected to. - enum: - - de - - en - - es - - fr - - it - - nl - - pl + account_number: + description: Account number to transfer funds to. + maxLength: 5000 nullable: true type: string - title: payment_method_options_sofort - type: object - x-expandableFields: [] - payment_method_options_wechat_pay: - description: '' - properties: - app_id: - description: The app ID registered with WeChat Pay. Only required when client - is ios or android. + bank_name: + description: Name of the bank associated with the routing number. maxLength: 5000 nullable: true type: string - client: - description: The client type that the end customer will pay from - enum: - - android - - ios - - web + routing_number: + description: Routing transit number for the bank account to transfer funds + to. + maxLength: 5000 nullable: true type: string - x-stripeBypassValidation: true - title: payment_method_options_wechat_pay - type: object - x-expandableFields: [] - payment_method_oxxo: - description: '' - properties: {} - title: payment_method_oxxo - type: object - x-expandableFields: [] - payment_method_p24: - description: '' - properties: - bank: - description: The customer's bank, if provided. - enum: - - alior_bank - - bank_millennium - - bank_nowy_bfg_sa - - bank_pekao_sa - - banki_spbdzielcze - - blik - - bnp_paribas - - boz - - citi_handlowy - - credit_agricole - - envelobank - - etransfer_pocztowy24 - - getin_bank - - ideabank - - ing - - inteligo - - mbank_mtransfer - - nest_przelew - - noble_pay - - pbac_z_ipko - - plus_bank - - santander_przelew24 - - tmobile_usbugi_bankowe - - toyota_bank - - volkswagen_bank + swift_code: + description: SWIFT code of the bank associated with the routing number. + maxLength: 5000 nullable: true type: string - x-stripeBypassValidation: true - title: payment_method_p24 + title: payment_method_details_ach_credit_transfer type: object x-expandableFields: [] - payment_method_sepa_debit: + payment_method_details_ach_debit: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. - maxLength: 5000 + account_holder_type: + description: Type of entity that holds the account. This can be either `individual` + or `company`. + enum: + - company + - individual nullable: true type: string - branch_code: - description: Branch code of bank associated with the bank account. + bank_name: + description: Name of the bank associated with the bank account. maxLength: 5000 nullable: true type: string @@ -17159,3628 +19018,3125 @@ components: maxLength: 5000 nullable: true type: string - generated_from: - anyOf: - - "$ref": "#/components/schemas/sepa_debit_generated_from" - description: Information about the object that generated this PaymentMethod. - nullable: true last4: - description: Last four characters of the IBAN. + description: Last four digits of the bank account number. maxLength: 5000 nullable: true type: string - title: payment_method_sepa_debit - type: object - x-expandableFields: - - generated_from - payment_method_sofort: - description: '' - properties: - country: - description: Two-letter ISO code representing the country the bank account - is located in. + routing_number: + description: Routing transit number of the bank account. maxLength: 5000 nullable: true type: string - title: payment_method_sofort + title: payment_method_details_ach_debit type: object x-expandableFields: [] - payment_method_wechat_pay: + payment_method_details_acss_debit: + description: '' + properties: + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. + maxLength: 5000 + nullable: true + type: string + institution_number: + description: Institution number of the bank account + maxLength: 5000 + nullable: true + type: string + last4: + description: Last four digits of the bank account number. + maxLength: 5000 + nullable: true + type: string + mandate: + description: ID of the mandate used to make this payment. + maxLength: 5000 + type: string + transit_number: + description: Transit number of the bank account. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_acss_debit + type: object + x-expandableFields: [] + payment_method_details_affirm: description: '' properties: {} - title: payment_method_wechat_pay + title: payment_method_details_affirm type: object x-expandableFields: [] - payment_pages_checkout_session_after_expiration: + payment_method_details_afterpay_clearpay: description: '' properties: - recovery: - anyOf: - - "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" - description: When set, configuration used to recover the Checkout Session - on expiry. + reference: + description: Order identifier shown to the merchant in Afterpay’s online + portal. + maxLength: 5000 nullable: true - title: PaymentPagesCheckoutSessionAfterExpiration + type: string + title: payment_method_details_afterpay_clearpay type: object - x-expandableFields: - - recovery - payment_pages_checkout_session_after_expiration_recovery: + x-expandableFields: [] + payment_method_details_au_becs_debit: description: '' properties: - allow_promotion_codes: - description: Enables user redeemable promotion codes on the recovered Checkout - Sessions. Defaults to `false` - type: boolean - enabled: - description: |- - If `true`, a recovery url will be generated to recover this Checkout Session if it - expires before a transaction is completed. It will be attached to the - Checkout Session object upon expiration. - type: boolean - expires_at: - description: The timestamp at which the recovery URL will expire. - format: unix-time + bsb_number: + description: Bank-State-Branch number of the bank account. + maxLength: 5000 nullable: true - type: integer - url: - description: URL that creates a new Checkout Session when clicked that is - a copy of this expired Checkout Session + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - required: - - allow_promotion_codes - - enabled - title: PaymentPagesCheckoutSessionAfterExpirationRecovery + last4: + description: Last four digits of the bank account number. + maxLength: 5000 + nullable: true + type: string + mandate: + description: ID of the mandate used to make this payment. + maxLength: 5000 + type: string + title: payment_method_details_au_becs_debit type: object x-expandableFields: [] - payment_pages_checkout_session_automatic_tax: + payment_method_details_bacs_debit: description: '' properties: - enabled: - description: Indicates whether automatic tax is enabled for the session - type: boolean - status: - description: The status of the most recent automated tax calculation for - this session. - enum: - - complete - - failed - - requires_location_inputs + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. + maxLength: 5000 nullable: true type: string - required: - - enabled - title: PaymentPagesCheckoutSessionAutomaticTax + last4: + description: Last four digits of the bank account number. + maxLength: 5000 + nullable: true + type: string + mandate: + description: ID of the mandate used to make this payment. + maxLength: 5000 + nullable: true + type: string + sort_code: + description: Sort code of the bank account. (e.g., `10-20-30`) + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_bacs_debit type: object x-expandableFields: [] - payment_pages_checkout_session_consent: + payment_method_details_bancontact: description: '' properties: - promotions: + bank_code: + description: Bank code of bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + bic: + description: Bank Identifier Code of the bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + generated_sepa_debit: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this Charge. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this Charge. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" + iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 + nullable: true + type: string + preferred_language: description: |- - If `opt_in`, the customer consents to receiving promotional communications - from the merchant about this Checkout Session. + Preferred language of the Bancontact authorization page that the customer is redirected to. + Can be one of `en`, `de`, `fr`, or `nl` enum: - - opt_in - - opt_out + - de + - en + - fr + - nl nullable: true type: string - title: PaymentPagesCheckoutSessionConsent + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by Bancontact directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_bancontact + type: object + x-expandableFields: + - generated_sepa_debit + - generated_sepa_debit_mandate + payment_method_details_blik: + description: '' + properties: {} + title: payment_method_details_blik type: object x-expandableFields: [] - payment_pages_checkout_session_consent_collection: + payment_method_details_boleto: description: '' properties: - promotions: - description: |- - If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout - Session will determine whether to display an option to opt into promotional communication - from the merchant depending on the customer's locale. Only available to US merchants. - enum: - - auto - nullable: true + tax_id: + description: The tax ID of the customer (CPF for individuals consumers or + CNPJ for businesses consumers) + maxLength: 5000 type: string - title: PaymentPagesCheckoutSessionConsentCollection + required: + - tax_id + title: payment_method_details_boleto type: object x-expandableFields: [] - payment_pages_checkout_session_customer_details: + payment_method_details_card: description: '' properties: - email: + brand: + description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, + `unionpay`, `visa`, or `unknown`. + maxLength: 5000 + nullable: true + type: string + checks: + anyOf: + - "$ref": "#/components/schemas/payment_method_details_card_checks" + description: Check results by Card networks on Card address and CVC at time + of payment. + nullable: true + country: + description: Two-letter ISO code representing the country of the card. You + could use this attribute to get a sense of the international breakdown + of cards you've collected. + maxLength: 5000 + nullable: true + type: string + exp_month: + description: Two-digit number representing the card's expiration month. + type: integer + exp_year: + description: Four-digit number representing the card's expiration year. + type: integer + fingerprint: description: |- - The email associated with the Customer, if one exists, on the Checkout Session at the time of checkout or at time of session expiry. - Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* maxLength: 5000 nullable: true type: string - phone: - description: The customer's phone number at the time of checkout + funding: + description: Card funding type. Can be `credit`, `debit`, `prepaid`, or + `unknown`. maxLength: 5000 nullable: true type: string - tax_exempt: - description: The customer’s tax exempt status at time of checkout. - enum: - - exempt - - none - - reverse + installments: + anyOf: + - "$ref": "#/components/schemas/payment_method_details_card_installments" + description: |- + Installment details for this payment (Mexico only). + + For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + nullable: true + last4: + description: The last four digits of the card. + maxLength: 5000 nullable: true type: string - tax_ids: - description: The customer’s tax IDs at time of checkout. - items: - "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" + mandate: + description: ID of the mandate used to make this payment or created by it. + maxLength: 5000 nullable: true - type: array - title: PaymentPagesCheckoutSessionCustomerDetails + type: string + network: + description: Identifies which network this charge was processed on. Can + be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, + `mastercard`, `unionpay`, `visa`, or `unknown`. + maxLength: 5000 + nullable: true + type: string + three_d_secure: + anyOf: + - "$ref": "#/components/schemas/three_d_secure_details" + description: Populated if this transaction used 3D Secure authentication. + nullable: true + wallet: + anyOf: + - "$ref": "#/components/schemas/payment_method_details_card_wallet" + description: If this Card is part of a card wallet, this contains the details + of the card wallet. + nullable: true + required: + - exp_month + - exp_year + title: payment_method_details_card type: object x-expandableFields: - - tax_ids - payment_pages_checkout_session_phone_number_collection: + - checks + - installments + - three_d_secure + - wallet + payment_method_details_card_checks: description: '' properties: - enabled: - description: Indicates whether phone number collection is enabled for the - session - type: boolean + address_line1_check: + description: If a address line1 was provided, results of the check, one + of `pass`, `fail`, `unavailable`, or `unchecked`. + maxLength: 5000 + nullable: true + type: string + address_postal_code_check: + description: If a address postal code was provided, results of the check, + one of `pass`, `fail`, `unavailable`, or `unchecked`. + maxLength: 5000 + nullable: true + type: string + cvc_check: + description: If a CVC was provided, results of the check, one of `pass`, + `fail`, `unavailable`, or `unchecked`. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_card_checks + type: object + x-expandableFields: [] + payment_method_details_card_installments: + description: '' + properties: + plan: + anyOf: + - "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + description: Installment plan selected for the payment. + nullable: true + title: payment_method_details_card_installments + type: object + x-expandableFields: + - plan + payment_method_details_card_installments_plan: + description: '' + properties: + count: + description: For `fixed_count` installment plans, this is the number of + installment payments your customer will make to their credit card. + nullable: true + type: integer + interval: + description: |- + For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + One of `month`. + enum: + - month + nullable: true + type: string + type: + description: Type of installment plan, one of `fixed_count`. + enum: + - fixed_count + type: string required: - - enabled - title: PaymentPagesCheckoutSessionPhoneNumberCollection + - type + title: payment_method_details_card_installments_plan type: object x-expandableFields: [] - payment_pages_checkout_session_shipping_address_collection: + payment_method_details_card_present: description: '' properties: - allowed_countries: + amount_authorized: + description: The authorized amount + nullable: true + type: integer + brand: + description: Card brand. Can be `amex`, `diners`, `discover`, `jcb`, `mastercard`, + `unionpay`, `visa`, or `unknown`. + maxLength: 5000 + nullable: true + type: string + capture_before: + description: When using manual capture, a future timestamp after which the + charge will be automatically refunded if uncaptured. + format: unix-time + type: integer + cardholder_name: + description: The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) + format. May include alphanumeric characters, special characters and first/last + name separator (`/`). In some cases, the cardholder name may not be available + depending on how the issuer has configured the card. Cardholder name is + typically not available on swipe or contactless payments, such as those + made with Apple Pay and Google Pay. + maxLength: 5000 + nullable: true + type: string + country: + description: Two-letter ISO code representing the country of the card. You + could use this attribute to get a sense of the international breakdown + of cards you've collected. + maxLength: 5000 + nullable: true + type: string + emv_auth_data: + description: Authorization response cryptogram. + maxLength: 5000 + nullable: true + type: string + exp_month: + description: Two-digit number representing the card's expiration month. + type: integer + exp_year: + description: Four-digit number representing the card's expiration year. + type: integer + fingerprint: description: |- - An array of two-letter ISO country codes representing which countries Checkout should provide as options for - shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. - items: - enum: - - 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 - type: string - type: array - required: - - allowed_countries - title: PaymentPagesCheckoutSessionShippingAddressCollection - type: object - x-expandableFields: [] - payment_pages_checkout_session_shipping_option: - description: '' - properties: - shipping_amount: - description: A non-negative integer in cents representing how much to charge. - type: integer - shipping_rate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/shipping_rate" - description: The shipping rate. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/shipping_rate" - required: - - shipping_amount - - shipping_rate - title: PaymentPagesCheckoutSessionShippingOption - type: object - x-expandableFields: - - shipping_rate - payment_pages_checkout_session_tax_id: - description: '' - properties: - type: - description: The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, - `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `za_vat`, - `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, - `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, `kr_brn`, - `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, - `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, - `ge_vat`, `ua_vat`, `is_vat`, or `unknown` - enum: - - ae_trn - - au_abn - - au_arn - - br_cnpj - - br_cpf - - ca_bn - - ca_gst_hst - - ca_pst_bc - - ca_pst_mb - - ca_pst_sk - - ca_qst - - ch_vat - - cl_tin - - es_cif - - eu_vat - - gb_vat - - ge_vat - - hk_br - - id_npwp - - il_vat - - in_gst - - is_vat - - jp_cn - - jp_rn - - kr_brn - - li_uid - - mx_rfc - - my_frp - - my_itn - - my_sst - - no_vat - - nz_gst - - ru_inn - - ru_kpp - - sa_vat - - sg_gst - - sg_uen - - th_vat - - tw_vat - - ua_vat - - unknown - - us_ein - - za_vat + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* + maxLength: 5000 + nullable: true type: string - value: - description: The value of the tax ID. + funding: + description: Card funding type. Can be `credit`, `debit`, `prepaid`, or + `unknown`. maxLength: 5000 nullable: true type: string - required: - - type - title: PaymentPagesCheckoutSessionTaxID - type: object - x-expandableFields: [] - payment_pages_checkout_session_tax_id_collection: - description: '' - properties: - enabled: - description: Indicates whether tax ID collection is enabled for the session - type: boolean - required: - - enabled - title: PaymentPagesCheckoutSessionTaxIDCollection - type: object - x-expandableFields: [] - payment_pages_checkout_session_total_details: - description: '' - properties: - amount_discount: - description: This is the sum of all the line item discounts. - type: integer - amount_shipping: - description: This is the sum of all the line item shipping amounts. + generated_card: + description: ID of a card PaymentMethod generated from the card_present + PaymentMethod that may be attached to a Customer for future transactions. + Only present if it was possible to generate a card PaymentMethod. + maxLength: 5000 nullable: true - type: integer - amount_tax: - description: This is the sum of all the line item tax amounts. - type: integer - breakdown: - "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" - required: - - amount_discount - - amount_tax - title: PaymentPagesCheckoutSessionTotalDetails - type: object - x-expandableFields: - - breakdown - payment_pages_checkout_session_total_details_resource_breakdown: - description: '' - properties: - discounts: - description: The aggregated line item discounts. - items: - "$ref": "#/components/schemas/line_items_discount_amount" - type: array - taxes: - description: The aggregated line item tax amounts by rate. - items: - "$ref": "#/components/schemas/line_items_tax_amount" - type: array - required: - - discounts - - taxes - title: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown - type: object - x-expandableFields: - - discounts - - taxes - payment_source: - anyOf: - - "$ref": "#/components/schemas/account" - - "$ref": "#/components/schemas/alipay_account" - - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - - "$ref": "#/components/schemas/card" - - "$ref": "#/components/schemas/source" - title: Polymorphic - x-resourceId: payment_source - payout: - description: |- - A `Payout` object is created when you receive funds from Stripe, or when you - initiate a payout to either a bank account or debit card of a [connected - Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, - as well as list all payouts. Payouts are made on [varying - schedules](/docs/connect/manage-payout-schedule), depending on your country and - industry. - - Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). - properties: - amount: - description: Amount (in %s) to be transferred to your bank account or debit - card. - type: integer - arrival_date: - description: Date the payout is expected to arrive in the bank. This factors - in delays like weekends or bank holidays. - format: unix-time - type: integer - automatic: - description: Returns `true` if the payout was created by an [automated payout - schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` - if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). + type: string + incremental_authorization_supported: + description: Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) + is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). type: boolean - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: ID of the balance transaction that describes the impact of - this payout on your account balance. + last4: + description: The last four digits of the card. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. + network: + description: Identifies which network this charge was processed on. Can + be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, + `mastercard`, `unionpay`, `visa`, or `unknown`. maxLength: 5000 nullable: true type: string - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/card" - - "$ref": "#/components/schemas/deleted_bank_account" - - "$ref": "#/components/schemas/deleted_card" - description: ID of the bank account or card the payout was sent to. + overcapture_supported: + description: Defines whether the authorized amount can be over-captured + or not + type: boolean + read_method: + description: How card details were read in this transaction. + enum: + - contact_emv + - contactless_emv + - contactless_magstripe_mode + - magnetic_stripe_fallback + - magnetic_stripe_track2 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/card" - - "$ref": "#/components/schemas/deleted_bank_account" - - "$ref": "#/components/schemas/deleted_card" - x-stripeBypassValidation: true - failure_balance_transaction: + type: string + receipt: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: If the payout failed or was canceled, this will be the ID of - the balance transaction that reversed the initial balance transaction, - and puts the funds from the failed payout back in your balance. + - "$ref": "#/components/schemas/payment_method_details_card_present_receipt" + description: A collection of fields required to be displayed on receipts. + Only required for EMV transactions. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - failure_code: - description: Error code explaining reason for payout failure if available. - See [Types of payout failures](https://stripe.com/docs/api#payout_failures) - for a list of failure codes. + required: + - exp_month + - exp_year + - incremental_authorization_supported + - overcapture_supported + title: payment_method_details_card_present + type: object + x-expandableFields: + - receipt + payment_method_details_card_present_receipt: + description: '' + properties: + account_type: + description: The type of account being debited or credited + enum: + - checking + - credit + - prepaid + - unknown + type: string + x-stripeBypassValidation: true + application_cryptogram: + description: EMV tag 9F26, cryptogram generated by the integrated circuit + chip. maxLength: 5000 nullable: true type: string - failure_message: - description: Message to user further explaining reason for payout failure - if available. + application_preferred_name: + description: Mnenomic of the Application Identifier. maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + authorization_code: + description: Identifier for this transaction. maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. nullable: true - type: object - method: - description: The method used to send this payout, which can be `standard` - or `instant`. `instant` is only supported for payouts to debit cards. - (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) - for more information.) - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - payout type: string - original_payout: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payout" - description: If the payout reverses another, this is the ID of the original - payout. + authorization_response_code: + description: EMV tag 8A. A code returned by the card issuer. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payout" - reversed_by: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payout" - description: If the payout was reversed, this is the ID of the payout that - reverses this payout. + type: string + cardholder_verification_method: + description: How the cardholder verified ownership of the card. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payout" - source_type: - description: The source balance this payout came from. One of `card`, `fpx`, - or `bank_account`. + type: string + dedicated_file_name: + description: EMV tag 84. Similar to the application identifier stored on + the integrated circuit chip. maxLength: 5000 + nullable: true type: string - statement_descriptor: - description: Extra information about a payout to be displayed on the user's - bank statement. + terminal_verification_results: + description: The outcome of a series of EMV functions performed by the card + reader. maxLength: 5000 nullable: true type: string - status: - description: 'Current status of the payout: `paid`, `pending`, `in_transit`, - `canceled` or `failed`. A payout is `pending` until it is submitted to - the bank, when it becomes `in_transit`. The status then changes to `paid` - if the transaction goes through, or to `failed` or `canceled` (within - 5 business days). Some failed payouts may initially show as `paid` but - then change to `failed`.' + transaction_status_information: + description: An indication of various EMV functions performed during the + transaction. maxLength: 5000 + nullable: true type: string - type: - description: Can be `bank_account` or `card`. - enum: - - bank_account - - card + title: payment_method_details_card_present_receipt + type: object + x-expandableFields: [] + payment_method_details_card_wallet: + description: '' + properties: + amex_express_checkout: + "$ref": "#/components/schemas/payment_method_details_card_wallet_amex_express_checkout" + apple_pay: + "$ref": "#/components/schemas/payment_method_details_card_wallet_apple_pay" + dynamic_last4: + description: "(For tokenized numbers only.) The last four digits of the + device account number." + maxLength: 5000 + nullable: true type: string - x-stripeBypassValidation: true + google_pay: + "$ref": "#/components/schemas/payment_method_details_card_wallet_google_pay" + masterpass: + "$ref": "#/components/schemas/payment_method_details_card_wallet_masterpass" + samsung_pay: + "$ref": "#/components/schemas/payment_method_details_card_wallet_samsung_pay" + type: + description: The type of the card wallet, one of `amex_express_checkout`, + `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, or `visa_checkout`. + An additional hash is included on the Wallet subhash with a name matching + this value. It contains additional information specific to the card wallet + type. + enum: + - amex_express_checkout + - apple_pay + - google_pay + - masterpass + - samsung_pay + - visa_checkout + type: string + visa_checkout: + "$ref": "#/components/schemas/payment_method_details_card_wallet_visa_checkout" required: - - amount - - arrival_date - - automatic - - created - - currency - - id - - livemode - - method - - object - - source_type - - status - type - title: Payout + title: payment_method_details_card_wallet type: object x-expandableFields: - - balance_transaction - - destination - - failure_balance_transaction - - original_payout - - reversed_by - x-resourceId: payout - period: + - amex_express_checkout + - apple_pay + - google_pay + - masterpass + - samsung_pay + - visa_checkout + payment_method_details_card_wallet_amex_express_checkout: + description: '' + properties: {} + title: payment_method_details_card_wallet_amex_express_checkout + type: object + x-expandableFields: [] + payment_method_details_card_wallet_apple_pay: + description: '' + properties: {} + title: payment_method_details_card_wallet_apple_pay + type: object + x-expandableFields: [] + payment_method_details_card_wallet_google_pay: + description: '' + properties: {} + title: payment_method_details_card_wallet_google_pay + type: object + x-expandableFields: [] + payment_method_details_card_wallet_masterpass: description: '' properties: - end: - description: The end date of this usage period. All usage up to and including - this point in time is included. - format: unix-time + billing_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's verified billing address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. nullable: true - type: integer - start: - description: The start date of this usage period. All usage after this point - in time is included. - format: unix-time + email: + description: Owner's verified email. Values are verified or provided by + the wallet directly (if supported) at the time of authorization or settlement. + They cannot be set or mutated. + maxLength: 5000 nullable: true - type: integer - title: Period + type: string + name: + description: Owner's verified full name. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + maxLength: 5000 + nullable: true + type: string + shipping_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's verified shipping address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + nullable: true + title: payment_method_details_card_wallet_masterpass + type: object + x-expandableFields: + - billing_address + - shipping_address + payment_method_details_card_wallet_samsung_pay: + description: '' + properties: {} + title: payment_method_details_card_wallet_samsung_pay type: object x-expandableFields: [] - person: - description: |- - This is an object representing a person associated with a Stripe account. - - A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. - See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. - - Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). + payment_method_details_card_wallet_visa_checkout: + description: '' properties: - account: - description: The account the person is associated with. + billing_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's verified billing address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + nullable: true + email: + description: Owner's verified email. Values are verified or provided by + the wallet directly (if supported) at the time of authorization or settlement. + They cannot be set or mutated. maxLength: 5000 + nullable: true type: string - address: - "$ref": "#/components/schemas/address" - address_kana: - anyOf: - - "$ref": "#/components/schemas/legal_entity_japan_address" + name: + description: Owner's verified full name. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. + maxLength: 5000 nullable: true - address_kanji: + type: string + shipping_address: anyOf: - - "$ref": "#/components/schemas/legal_entity_japan_address" + - "$ref": "#/components/schemas/address" + description: Owner's verified shipping address. Values are verified or provided + by the wallet directly (if supported) at the time of authorization or + settlement. They cannot be set or mutated. nullable: true - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - dob: - "$ref": "#/components/schemas/legal_entity_dob" - email: - description: The person's email address. + title: payment_method_details_card_wallet_visa_checkout + type: object + x-expandableFields: + - billing_address + - shipping_address + payment_method_details_customer_balance: + description: '' + properties: {} + title: payment_method_details_customer_balance + type: object + x-expandableFields: [] + payment_method_details_eps: + description: '' + properties: + bank: + description: The customer's bank. Should be one of `arzte_und_apotheker_bank`, + `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, + `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, + `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, + `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, + `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, + `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, + `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, + `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + enum: + - arzte_und_apotheker_bank + - austrian_anadi_bank_ag + - bank_austria + - bankhaus_carl_spangler + - bankhaus_schelhammer_und_schattera_ag + - bawag_psk_ag + - bks_bank_ag + - brull_kallmus_bank_ag + - btv_vier_lander_bank + - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag + - dolomitenbank + - easybank_ag + - erste_bank_und_sparkassen + - hypo_alpeadriabank_international_ag + - hypo_bank_burgenland_aktiengesellschaft + - hypo_noe_lb_fur_niederosterreich_u_wien + - hypo_oberosterreich_salzburg_steiermark + - hypo_tirol_bank_ag + - hypo_vorarlberg_bank_ag + - marchfelder_bank + - oberbank_ag + - raiffeisen_bankengruppe_osterreich + - schoellerbank_ag + - sparda_bank_wien + - volksbank_gruppe + - volkskreditbank_ag + - vr_bank_braunau + nullable: true + type: string + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by EPS directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + EPS rarely provides this information so the attribute is usually empty. maxLength: 5000 nullable: true type: string - first_name: - description: The person's first name. + title: payment_method_details_eps + type: object + x-expandableFields: [] + payment_method_details_fpx: + description: '' + properties: + bank: + description: The customer's bank. Can be one of `affin_bank`, `agrobank`, + `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, + `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, + `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, + or `pb_enterprise`. + enum: + - affin_bank + - agrobank + - alliance_bank + - ambank + - bank_islam + - bank_muamalat + - bank_rakyat + - bsn + - cimb + - deutsche_bank + - hong_leong_bank + - hsbc + - kfh + - maybank2e + - maybank2u + - ocbc + - pb_enterprise + - public_bank + - rhb + - standard_chartered + - uob + type: string + transaction_id: + description: Unique transaction id generated by FPX for every request from + the merchant maxLength: 5000 nullable: true type: string - first_name_kana: - description: The Kana variation of the person's first name (Japan only). + required: + - bank + title: payment_method_details_fpx + type: object + x-expandableFields: [] + payment_method_details_giropay: + description: '' + properties: + bank_code: + description: Bank code of bank associated with the bank account. maxLength: 5000 nullable: true type: string - first_name_kanji: - description: The Kanji variation of the person's first name (Japan only). + bank_name: + description: Name of the bank associated with the bank account. maxLength: 5000 nullable: true type: string - full_name_aliases: - description: A list of alternate names or aliases that the person is known - by. - items: - maxLength: 5000 + bic: + description: Bank Identifier Code of the bank associated with the bank account. + maxLength: 5000 + nullable: true + type: string + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by Giropay directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + Giropay rarely provides this information so the attribute is usually empty. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_giropay + type: object + x-expandableFields: [] + payment_method_details_grabpay: + description: '' + properties: + transaction_id: + description: Unique transaction id generated by GrabPay + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_grabpay + type: object + x-expandableFields: [] + payment_method_details_ideal: + description: '' + properties: + bank: + description: The customer's bank. Can be one of `abn_amro`, `asn_bank`, + `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, + `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot + nullable: true + type: string + bic: + description: The Bank Identifier Code of the customer's bank. + enum: + - ABNANL2A + - ASNBNL21 + - BUNQNL2A + - FVLBNL22 + - HANDNL2A + - INGBNL2A + - KNABNL2H + - MOYONL21 + - RABONL2U + - RBRBNL21 + - REVOLT21 + - SNSBNL2A + - TRIONL2U + nullable: true + type: string + generated_sepa_debit: + anyOf: + - maxLength: 5000 type: string - type: array - future_requirements: + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this Charge. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: anyOf: - - "$ref": "#/components/schemas/person_future_requirements" + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this Charge. nullable: true - gender: - description: The person's gender (International regulations require either - "male" or "female"). + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" + iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by iDEAL directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. maxLength: 5000 + nullable: true type: string - id_number_provided: - description: Whether the person's `id_number` was provided. - type: boolean - last_name: - description: The person's last name. + title: payment_method_details_ideal + type: object + x-expandableFields: + - generated_sepa_debit + - generated_sepa_debit_mandate + payment_method_details_interac_present: + description: '' + properties: + brand: + description: Card brand. Can be `interac`, `mastercard` or `visa`. maxLength: 5000 nullable: true type: string - last_name_kana: - description: The Kana variation of the person's last name (Japan only). + cardholder_name: + description: The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) + format. May include alphanumeric characters, special characters and first/last + name separator (`/`). In some cases, the cardholder name may not be available + depending on how the issuer has configured the card. Cardholder name is + typically not available on swipe or contactless payments, such as those + made with Apple Pay and Google Pay. maxLength: 5000 nullable: true type: string - last_name_kanji: - description: The Kanji variation of the person's last name (Japan only). + country: + description: Two-letter ISO code representing the country of the card. You + could use this attribute to get a sense of the international breakdown + of cards you've collected. maxLength: 5000 nullable: true type: string - maiden_name: - description: The person's maiden name. + emv_auth_data: + description: Authorization response cryptogram. maxLength: 5000 nullable: true type: string - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - nationality: - description: The country where the person is a national. + exp_month: + description: Two-digit number representing the card's expiration month. + type: integer + exp_year: + description: Four-digit number representing the card's expiration year. + type: integer + fingerprint: + description: |- + Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + + *Starting May 1, 2021, card fingerprint in India for Connect will change to allow two fingerprints for the same card --- one for India and one for the rest of the world.* maxLength: 5000 nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - person + funding: + description: Card funding type. Can be `credit`, `debit`, `prepaid`, or + `unknown`. + maxLength: 5000 + nullable: true type: string - phone: - description: The person's phone number. + generated_card: + description: ID of a card PaymentMethod generated from the card_present + PaymentMethod that may be attached to a Customer for future transactions. + Only present if it was possible to generate a card PaymentMethod. maxLength: 5000 nullable: true type: string - political_exposure: - description: Indicates if the person or any of their representatives, family - members, or other closely related persons, declares that they hold or - have held an important public job or function, in any jurisdiction. + last4: + description: The last four digits of the card. + maxLength: 5000 + nullable: true + type: string + network: + description: Identifies which network this charge was processed on. Can + be `amex`, `cartes_bancaires`, `diners`, `discover`, `interac`, `jcb`, + `mastercard`, `unionpay`, `visa`, or `unknown`. + maxLength: 5000 + nullable: true + type: string + preferred_locales: + description: EMV tag 5F2D. Preferred languages specified by the integrated + circuit chip. + items: + maxLength: 5000 + type: string + nullable: true + type: array + read_method: + description: How card details were read in this transaction. enum: - - existing - - none + - contact_emv + - contactless_emv + - contactless_magstripe_mode + - magnetic_stripe_fallback + - magnetic_stripe_track2 + nullable: true type: string - relationship: - "$ref": "#/components/schemas/person_relationship" - requirements: + receipt: anyOf: - - "$ref": "#/components/schemas/person_requirements" - nullable: true - ssn_last_4_provided: - description: Whether the last four digits of the person's Social Security - number have been provided (U.S. only). - type: boolean - verification: - "$ref": "#/components/schemas/legal_entity_person_verification" - required: - - account - - created - - id - - object - title: Person - type: object - x-expandableFields: - - address - - address_kana - - address_kanji - - dob - - future_requirements - - relationship - - requirements - - verification - x-resourceId: person - person_future_requirements: - description: '' - properties: - alternatives: - description: Fields that are due and can be satisfied by providing the corresponding - alternative fields instead. - items: - "$ref": "#/components/schemas/account_requirements_alternative" + - "$ref": "#/components/schemas/payment_method_details_interac_present_receipt" + description: A collection of fields required to be displayed on receipts. + Only required for EMV transactions. nullable: true - type: array - currently_due: - description: Fields that need to be collected to keep the person's account - enabled. If not collected by the account's `future_requirements[current_deadline]`, - these fields will transition to the main `requirements` hash, and may - immediately become `past_due`, but the account may also be given a grace - period depending on the account's enablement state prior to transition. - items: - maxLength: 5000 - type: string - type: array - errors: - description: Fields that are `currently_due` and need to be collected again - because validation or verification failed. - items: - "$ref": "#/components/schemas/account_requirements_error" - type: array - eventually_due: - description: Fields that need to be collected assuming all volume thresholds - are reached. As they become required, they appear in `currently_due` as - well, and the account's `future_requirements[current_deadline]` becomes - set. - items: - maxLength: 5000 - type: string - type: array - past_due: - description: Fields that weren't collected by the account's `requirements.current_deadline`. - These fields need to be collected to enable the person's account. New - fields will never appear here; `future_requirements.past_due` will always - be a subset of `requirements.past_due`. - items: - maxLength: 5000 - type: string - type: array - pending_verification: - description: Fields that may become required depending on the results of - verification or review. Will be an empty array unless an asynchronous - verification is pending. If verification fails, these fields move to `eventually_due` - or `currently_due`. - items: - maxLength: 5000 - type: string - type: array required: - - currently_due - - errors - - eventually_due - - past_due - - pending_verification - title: PersonFutureRequirements + - exp_month + - exp_year + title: payment_method_details_interac_present type: object x-expandableFields: - - alternatives - - errors - person_relationship: + - receipt + payment_method_details_interac_present_receipt: description: '' properties: - director: - description: Whether the person is a director of the account's legal entity. - Directors are typically members of the governing board of the company, - or responsible for ensuring the company meets its regulatory obligations. - nullable: true - type: boolean - executive: - description: Whether the person has significant responsibility to control, - manage, or direct the organization. - nullable: true - type: boolean - owner: - description: Whether the person is an owner of the account’s legal entity. - nullable: true - type: boolean - percent_ownership: - description: The percent owned by the person of the account's legal entity. - nullable: true - type: number - representative: - description: Whether the person is authorized as the primary representative - of the account. This is the person nominated by the business to provide - information about themselves, and general information about the account. - There can only be one representative at any given time. At the time the - account is created, this person should be set to the person responsible - for opening the account. - nullable: true - type: boolean - title: - description: The person's title (e.g., CEO, Support Engineer). + account_type: + description: The type of account being debited or credited + enum: + - checking + - savings + - unknown + type: string + x-stripeBypassValidation: true + application_cryptogram: + description: EMV tag 9F26, cryptogram generated by the integrated circuit + chip. maxLength: 5000 nullable: true type: string - title: PersonRelationship - type: object - x-expandableFields: [] - person_requirements: - description: '' - properties: - alternatives: - description: Fields that are due and can be satisfied by providing the corresponding - alternative fields instead. - items: - "$ref": "#/components/schemas/account_requirements_alternative" - nullable: true - type: array - currently_due: - description: Fields that need to be collected to keep the person's account - enabled. If not collected by the account's `current_deadline`, these fields - appear in `past_due` as well, and the account is disabled. - items: - maxLength: 5000 - type: string - type: array - errors: - description: Fields that are `currently_due` and need to be collected again - because validation or verification failed. - items: - "$ref": "#/components/schemas/account_requirements_error" - type: array - eventually_due: - description: Fields that need to be collected assuming all volume thresholds - are reached. As they become required, they appear in `currently_due` as - well, and the account's `current_deadline` becomes set. - items: - maxLength: 5000 - type: string - type: array - past_due: - description: Fields that weren't collected by the account's `current_deadline`. - These fields need to be collected to enable the person's account. - items: - maxLength: 5000 - type: string - type: array - pending_verification: - description: Fields that may become required depending on the results of - verification or review. Will be an empty array unless an asynchronous - verification is pending. If verification fails, these fields move to `eventually_due`, - `currently_due`, or `past_due`. - items: - maxLength: 5000 - type: string - type: array - required: - - currently_due - - errors - - eventually_due - - past_due - - pending_verification - title: PersonRequirements - type: object - x-expandableFields: - - alternatives - - errors - plan: - description: |- - You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. - - Plans define the base price, currency, and billing cycle for recurring purchases of products. - [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. - - For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. - - Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). - properties: - active: - description: Whether the plan can be used for new purchases. - type: boolean - aggregate_usage: - description: Specifies a usage aggregation strategy for plans of `usage_type=metered`. - Allowed values are `sum` for summing up all usage during a period, `last_during_period` - for using the last usage record reported within a period, `last_ever` - for using the last usage record ever (across period bounds) or `max` which - uses the usage record with the maximum reported usage during a period. - Defaults to `sum`. - enum: - - last_during_period - - last_ever - - max - - sum + application_preferred_name: + description: Mnenomic of the Application Identifier. + maxLength: 5000 nullable: true type: string - amount: - description: The unit amount in %s to be charged, represented as a whole - integer if possible. Only set if `billing_scheme=per_unit`. - nullable: true - type: integer - amount_decimal: - description: The unit amount in %s to be charged, represented as a decimal - string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - format: decimal + authorization_code: + description: Identifier for this transaction. + maxLength: 5000 nullable: true type: string - billing_scheme: - description: Describes how to compute the price per period. Either `per_unit` - or `tiered`. `per_unit` indicates that the fixed amount (specified in - `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), - or per unit of total usage (for plans with `usage_type=metered`). `tiered` - indicates that the unit pricing will be computed using a tiering strategy - as defined using the `tiers` and `tiers_mode` attributes. - enum: - - per_unit - - tiered - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - id: - description: Unique identifier for the object. + authorization_response_code: + description: EMV tag 8A. A code returned by the card issuer. maxLength: 5000 + nullable: true type: string - interval: - description: The frequency at which a subscription is billed. One of `day`, - `week`, `month` or `year`. - enum: - - day - - month - - week - - year + cardholder_verification_method: + description: How the cardholder verified ownership of the card. + maxLength: 5000 + nullable: true type: string - interval_count: - description: The number of intervals (specified in the `interval` attribute) - between subscription billings. For example, `interval=month` and `interval_count=3` - bills every 3 months. - type: integer - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. + dedicated_file_name: + description: EMV tag 84. Similar to the application identifier stored on + the integrated circuit chip. + maxLength: 5000 nullable: true - type: object - nickname: - description: A brief description of the plan, hidden from customers. + type: string + terminal_verification_results: + description: The outcome of a series of EMV functions performed by the card + reader. maxLength: 5000 nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - plan + transaction_status_information: + description: An indication of various EMV functions performed during the + transaction. + maxLength: 5000 + nullable: true type: string - product: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/product" - - "$ref": "#/components/schemas/deleted_product" - description: The product whose pricing this plan determines. + title: payment_method_details_interac_present_receipt + type: object + x-expandableFields: [] + payment_method_details_klarna: + description: '' + properties: + payment_method_category: + description: |- + The Klarna payment method used for this transaction. + Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/product" - - "$ref": "#/components/schemas/deleted_product" - tiers: - description: Each element represents a pricing tier. This parameter requires - `billing_scheme` to be set to `tiered`. See also the documentation for - `billing_scheme`. - items: - "$ref": "#/components/schemas/plan_tier" - type: array - tiers_mode: - description: Defines if the tiering price should be `graduated` or `volume` - based. In `volume`-based tiering, the maximum quantity within a period - determines the per unit price. In `graduated` tiering, pricing can change - as the quantity grows. - enum: - - graduated - - volume + type: string + preferred_locale: + description: |- + Preferred language of the Klarna authorization page that the customer is redirected to. + Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + maxLength: 5000 nullable: true type: string - transform_usage: + title: payment_method_details_klarna + type: object + x-expandableFields: [] + payment_method_details_konbini: + description: '' + properties: + store: anyOf: - - "$ref": "#/components/schemas/transform_usage" - description: Apply a transformation to the reported usage or set quantity - before computing the amount billed. Cannot be combined with `tiers`. + - "$ref": "#/components/schemas/payment_method_details_konbini_store" + description: If the payment succeeded, this contains the details of the + convenience store where the payment was completed. nullable: true - trial_period_days: - description: Default number of trial days when subscribing a customer to - this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). - nullable: true - type: integer - usage_type: - description: Configures how the quantity per period should be determined. - Can be either `metered` or `licensed`. `licensed` automatically bills - the `quantity` set when adding it to a subscription. `metered` aggregates - the total usage based on usage records. Defaults to `licensed`. - enum: - - licensed - - metered - type: string - required: - - active - - billing_scheme - - created - - currency - - id - - interval - - interval_count - - livemode - - object - - usage_type - title: Plan + title: payment_method_details_konbini type: object x-expandableFields: - - product - - tiers - - transform_usage - x-resourceId: plan - plan_tier: + - store + payment_method_details_konbini_store: description: '' properties: - flat_amount: - description: Price for the entire tier. - nullable: true - type: integer - flat_amount_decimal: - description: Same as `flat_amount`, but contains a decimal value with at - most 12 decimal places. - format: decimal + chain: + description: The name of the convenience store chain where the payment was + completed. + enum: + - familymart + - lawson + - ministop + - seicomart nullable: true type: string - unit_amount: - description: Per unit price for units relevant to the tier. - nullable: true - type: integer - unit_amount_decimal: - description: Same as `unit_amount`, but contains a decimal value with at - most 12 decimal places. - format: decimal + title: payment_method_details_konbini_store + type: object + x-expandableFields: [] + payment_method_details_link: + description: '' + properties: {} + title: payment_method_details_link + type: object + x-expandableFields: [] + payment_method_details_multibanco: + description: '' + properties: + entity: + description: Entity number associated with this Multibanco payment. + maxLength: 5000 nullable: true type: string - up_to: - description: Up to and including to this quantity will be contained in the - tier. + reference: + description: Reference number associated with this Multibanco payment. + maxLength: 5000 nullable: true - type: integer - title: PlanTier + type: string + title: payment_method_details_multibanco type: object x-expandableFields: [] - platform_tax_fee: + payment_method_details_oxxo: description: '' properties: - account: - description: The Connected account that incurred this charge. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. + number: + description: OXXO reference number maxLength: 5000 + nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. + title: payment_method_details_oxxo + type: object + x-expandableFields: [] + payment_method_details_p24: + description: '' + properties: + bank: + description: The customer's bank. Can be one of `ing`, `citi_handlowy`, + `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, + `bank_nowy_bfg_sa`, `getin_bank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, + `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, + `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, + `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. enum: - - platform_tax_fee + - alior_bank + - bank_millennium + - bank_nowy_bfg_sa + - bank_pekao_sa + - banki_spbdzielcze + - blik + - bnp_paribas + - boz + - citi_handlowy + - credit_agricole + - envelobank + - etransfer_pocztowy24 + - getin_bank + - ideabank + - ing + - inteligo + - mbank_mtransfer + - nest_przelew + - noble_pay + - pbac_z_ipko + - plus_bank + - santander_przelew24 + - tmobile_usbugi_bankowe + - toyota_bank + - volkswagen_bank + nullable: true type: string - source_transaction: - description: The payment object that caused this tax to be inflicted. + reference: + description: Unique reference for this Przelewy24 payment. maxLength: 5000 + nullable: true type: string - type: - description: The type of tax (VAT). + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by Przelewy24 directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + Przelewy24 rarely provides this information so the attribute is usually empty. maxLength: 5000 + nullable: true type: string - required: - - account - - id - - object - - source_transaction - - type - title: PlatformTax + title: payment_method_details_p24 type: object x-expandableFields: [] - portal_business_profile: + payment_method_details_paynow: description: '' properties: - headline: - description: The messaging shown to customers in the portal. + reference: + description: Reference number associated with this PayNow payment maxLength: 5000 nullable: true type: string - privacy_policy_url: - description: A link to the business’s publicly available privacy policy. - maxLength: 5000 - type: string - terms_of_service_url: - description: A link to the business’s publicly available terms of service. - maxLength: 5000 - type: string - required: - - privacy_policy_url - - terms_of_service_url - title: PortalBusinessProfile - type: object - x-expandableFields: [] - portal_customer_update: - description: '' - properties: - allowed_updates: - description: The types of customer updates that are supported. When empty, - customers are not updateable. - items: - enum: - - address - - email - - phone - - shipping - - tax_id - type: string - type: array - enabled: - description: Whether the feature is enabled. - type: boolean - required: - - allowed_updates - - enabled - title: PortalCustomerUpdate + title: payment_method_details_paynow type: object x-expandableFields: [] - portal_features: + payment_method_details_pix: description: '' properties: - customer_update: - "$ref": "#/components/schemas/portal_customer_update" - invoice_history: - "$ref": "#/components/schemas/portal_invoice_list" - payment_method_update: - "$ref": "#/components/schemas/portal_payment_method_update" - subscription_cancel: - "$ref": "#/components/schemas/portal_subscription_cancel" - subscription_pause: - "$ref": "#/components/schemas/portal_subscription_pause" - subscription_update: - "$ref": "#/components/schemas/portal_subscription_update" - required: - - customer_update - - invoice_history - - payment_method_update - - subscription_cancel - - subscription_pause - - subscription_update - title: PortalFeatures - type: object - x-expandableFields: - - customer_update - - invoice_history - - payment_method_update - - subscription_cancel - - subscription_pause - - subscription_update - portal_invoice_list: - description: '' - properties: - enabled: - description: Whether the feature is enabled. - type: boolean - required: - - enabled - title: PortalInvoiceList + bank_transaction_id: + description: Unique transaction id generated by BCB + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_pix type: object x-expandableFields: [] - portal_payment_method_update: + payment_method_details_promptpay: description: '' properties: - enabled: - description: Whether the feature is enabled. - type: boolean - required: - - enabled - title: PortalPaymentMethodUpdate + reference: + description: Bill reference generated by PromptPay + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_promptpay type: object x-expandableFields: [] - portal_subscription_cancel: + payment_method_details_sepa_debit: description: '' properties: - cancellation_reason: - "$ref": "#/components/schemas/portal_subscription_cancellation_reason" - enabled: - description: Whether the feature is enabled. - type: boolean - mode: - description: Whether to cancel subscriptions immediately or at the end of - the billing period. - enum: - - at_period_end - - immediately + bank_code: + description: Bank code of bank associated with the bank account. + maxLength: 5000 + nullable: true type: string - proration_behavior: - description: Whether to create prorations when canceling subscriptions. - Possible values are `none` and `create_prorations`. - enum: - - always_invoice - - create_prorations - - none + branch_code: + description: Branch code of bank associated with the bank account. + maxLength: 5000 + nullable: true type: string - required: - - cancellation_reason - - enabled - - mode - - proration_behavior - title: PortalSubscriptionCancel - type: object - x-expandableFields: - - cancellation_reason - portal_subscription_cancellation_reason: - description: '' - properties: - enabled: - description: Whether the feature is enabled. - type: boolean - options: - description: Which cancellation reasons will be given as options to the - customer. - items: - enum: - - customer_service - - low_quality - - missing_features - - other - - switched_service - - too_complex - - too_expensive - - unused - type: string - type: array - required: - - enabled - - options - title: PortalSubscriptionCancellationReason - type: object - x-expandableFields: [] - portal_subscription_pause: - description: '' - properties: - enabled: - description: Whether the feature is enabled. - type: boolean - required: - - enabled - title: PortalSubscriptionPause - type: object - x-expandableFields: [] - portal_subscription_update: - description: '' - properties: - default_allowed_updates: - description: The types of subscription updates that are supported for items - listed in the `products` attribute. When empty, subscriptions are not - updateable. - items: - enum: - - price - - promotion_code - - quantity - type: string - type: array - enabled: - description: Whether the feature is enabled. - type: boolean - products: - description: The list of products that support subscription updates. - items: - "$ref": "#/components/schemas/portal_subscription_update_product" + country: + description: Two-letter ISO code representing the country the bank account + is located in. + maxLength: 5000 nullable: true - type: array - proration_behavior: - description: Determines how to handle prorations resulting from subscription - updates. Valid values are `none`, `create_prorations`, and `always_invoice`. - enum: - - always_invoice - - create_prorations - - none type: string - required: - - default_allowed_updates - - enabled - - proration_behavior - title: PortalSubscriptionUpdate - type: object - x-expandableFields: - - products - portal_subscription_update_product: - description: '' - properties: - prices: - description: The list of price IDs which, when subscribed to, a subscription - can be updated. - items: - maxLength: 5000 - type: string - type: array - product: - description: The product ID. + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 + nullable: true type: string - required: - - prices - - product - title: PortalSubscriptionUpdateProduct + last4: + description: Last four characters of the IBAN. + maxLength: 5000 + nullable: true + type: string + mandate: + description: ID of the mandate used to make this payment. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_sepa_debit type: object x-expandableFields: [] - price: - description: |- - Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. - [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. - - For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. - - Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + payment_method_details_sofort: + description: '' properties: - active: - description: Whether the price can be used for new purchases. - type: boolean - billing_scheme: - description: Describes how to compute the price per period. Either `per_unit` - or `tiered`. `per_unit` indicates that the fixed amount (specified in - `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` - (for prices with `usage_type=licensed`), or per unit of total usage (for - prices with `usage_type=metered`). `tiered` indicates that the unit pricing - will be computed using a tiering strategy as defined using the `tiers` - and `tiers_mode` attributes. - enum: - - per_unit - - tiered - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - id: - description: Unique identifier for the object. + bank_code: + description: Bank code of bank associated with the bank account. maxLength: 5000 + nullable: true type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - lookup_key: - description: A lookup key used to retrieve prices dynamically from a static - string. This may be up to 200 characters. + bank_name: + description: Name of the bank associated with the bank account. maxLength: 5000 nullable: true type: string - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - nickname: - description: A brief description of the price, hidden from customers. + bic: + description: Bank Identifier Code of the bank associated with the bank account. maxLength: 5000 nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - price + country: + description: Two-letter ISO code representing the country the bank account + is located in. + maxLength: 5000 + nullable: true type: string - product: + generated_sepa_debit: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/product" - - "$ref": "#/components/schemas/deleted_product" - description: The ID of the product this price is associated with. + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this Charge. + nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/product" - - "$ref": "#/components/schemas/deleted_product" - recurring: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: anyOf: - - "$ref": "#/components/schemas/recurring" - description: The recurring components of a price such as `interval` and - `usage_type`. + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this Charge. nullable: true - tax_behavior: - description: Specifies whether the price is considered inclusive of taxes - or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. - Once specified as either `inclusive` or `exclusive`, it cannot be changed. - enum: - - exclusive - - inclusive - - unspecified + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" + iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 nullable: true type: string - tiers: - description: Each element represents a pricing tier. This parameter requires - `billing_scheme` to be set to `tiered`. See also the documentation for - `billing_scheme`. - items: - "$ref": "#/components/schemas/price_tier" - type: array - tiers_mode: - description: Defines if the tiering price should be `graduated` or `volume` - based. In `volume`-based tiering, the maximum quantity within a period - determines the per unit price. In `graduated` tiering, pricing can change - as the quantity grows. + preferred_language: + description: |- + Preferred language of the SOFORT authorization page that the customer is redirected to. + Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` enum: - - graduated - - volume - nullable: true - type: string - transform_quantity: - anyOf: - - "$ref": "#/components/schemas/transform_quantity" - description: Apply a transformation to the reported usage or set quantity - before computing the amount billed. Cannot be combined with `tiers`. + - de + - en + - es + - fr + - it + - nl + - pl nullable: true - type: - description: One of `one_time` or `recurring` depending on whether the price - is for a one-time purchase or a recurring (subscription) purchase. - enum: - - one_time - - recurring type: string - unit_amount: - description: The unit amount in %s to be charged, represented as a whole - integer if possible. Only set if `billing_scheme=per_unit`. - nullable: true - type: integer - unit_amount_decimal: - description: The unit amount in %s to be charged, represented as a decimal - string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. - format: decimal + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by SOFORT directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + maxLength: 5000 nullable: true type: string - required: - - active - - billing_scheme - - created - - currency - - id - - livemode - - metadata - - object - - product - - type - title: Price + title: payment_method_details_sofort type: object x-expandableFields: - - product - - recurring - - tiers - - transform_quantity - x-resourceId: price - price_tier: + - generated_sepa_debit + - generated_sepa_debit_mandate + payment_method_details_stripe_account: + description: '' + properties: {} + title: payment_method_details_stripe_account + type: object + x-expandableFields: [] + payment_method_details_us_bank_account: description: '' properties: - flat_amount: - description: Price for the entire tier. + account_holder_type: + description: 'Account holder type: individual or company.' + enum: + - company + - individual nullable: true - type: integer - flat_amount_decimal: - description: Same as `flat_amount`, but contains a decimal value with at - most 12 decimal places. - format: decimal + type: string + account_type: + description: 'Account type: checkings or savings. Defaults to checking if + omitted.' + enum: + - checking + - savings nullable: true type: string - unit_amount: - description: Per unit price for units relevant to the tier. + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 nullable: true - type: integer - unit_amount_decimal: - description: Same as `unit_amount`, but contains a decimal value with at - most 12 decimal places. - format: decimal + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. + maxLength: 5000 nullable: true type: string - up_to: - description: Up to and including to this quantity will be contained in the - tier. + last4: + description: Last four digits of the bank account number. + maxLength: 5000 nullable: true - type: integer - title: PriceTier + type: string + routing_number: + description: Routing number of the bank account. + maxLength: 5000 + nullable: true + type: string + title: payment_method_details_us_bank_account type: object x-expandableFields: [] - product: - description: |- - Products describe the specific goods or services you offer to your customers. - For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. - They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. - - Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), - [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), - [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), - and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) + payment_method_details_wechat: + description: '' + properties: {} + title: payment_method_details_wechat + type: object + x-expandableFields: [] + payment_method_details_wechat_pay: + description: '' properties: - active: - description: Whether the product is currently available for purchase. - type: boolean - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - description: - description: The product's description, meant to be displayable to the customer. - Use this field to optionally store a long form explanation of the product - being sold for your own rendering purposes. + fingerprint: + description: Uniquely identifies this particular WeChat Pay account. You + can use this attribute to check whether two WeChat accounts are the same. maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + transaction_id: + description: Transaction ID of this particular WeChat Pay transaction. maxLength: 5000 + nullable: true type: string - images: - description: A list of up to 8 URLs of images for this product, meant to - be displayable to the customer. - items: - maxLength: 5000 - type: string - type: array - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - name: - description: The product's name, meant to be displayable to the customer. - Whenever this product is sold via a subscription, name will show up on - associated invoice line item descriptions. - maxLength: 5000 + title: payment_method_details_wechat_pay + type: object + x-expandableFields: [] + payment_method_eps: + description: '' + properties: + bank: + description: The customer's bank. Should be one of `arzte_und_apotheker_bank`, + `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, + `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, + `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, + `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, + `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, + `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, + `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, + `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + enum: + - arzte_und_apotheker_bank + - austrian_anadi_bank_ag + - bank_austria + - bankhaus_carl_spangler + - bankhaus_schelhammer_und_schattera_ag + - bawag_psk_ag + - bks_bank_ag + - brull_kallmus_bank_ag + - btv_vier_lander_bank + - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag + - dolomitenbank + - easybank_ag + - erste_bank_und_sparkassen + - hypo_alpeadriabank_international_ag + - hypo_bank_burgenland_aktiengesellschaft + - hypo_noe_lb_fur_niederosterreich_u_wien + - hypo_oberosterreich_salzburg_steiermark + - hypo_tirol_bank_ag + - hypo_vorarlberg_bank_ag + - marchfelder_bank + - oberbank_ag + - raiffeisen_bankengruppe_osterreich + - schoellerbank_ag + - sparda_bank_wien + - volksbank_gruppe + - volkskreditbank_ag + - vr_bank_braunau + nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. + title: payment_method_eps + type: object + x-expandableFields: [] + payment_method_fpx: + description: '' + properties: + bank: + description: The customer's bank, if provided. Can be one of `affin_bank`, + `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, + `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, + `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, + `maybank2e`, or `pb_enterprise`. enum: - - product + - affin_bank + - agrobank + - alliance_bank + - ambank + - bank_islam + - bank_muamalat + - bank_rakyat + - bsn + - cimb + - deutsche_bank + - hong_leong_bank + - hsbc + - kfh + - maybank2e + - maybank2u + - ocbc + - pb_enterprise + - public_bank + - rhb + - standard_chartered + - uob type: string - package_dimensions: - anyOf: - - "$ref": "#/components/schemas/package_dimensions" - description: The dimensions of this product for shipping purposes. - nullable: true - shippable: - description: Whether this product is shipped (i.e., physical goods). + required: + - bank + title: payment_method_fpx + type: object + x-expandableFields: [] + payment_method_giropay: + description: '' + properties: {} + title: payment_method_giropay + type: object + x-expandableFields: [] + payment_method_grabpay: + description: '' + properties: {} + title: payment_method_grabpay + type: object + x-expandableFields: [] + payment_method_ideal: + description: '' + properties: + bank: + description: The customer's bank, if provided. Can be one of `abn_amro`, + `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, + `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot nullable: true - type: boolean - statement_descriptor: - description: Extra information about a product which will appear on your - customer's credit card statement. In the case that multiple products are - billed at once, the first statement descriptor will be used. - maxLength: 5000 + type: string + bic: + description: The Bank Identifier Code of the customer's bank, if the bank + was provided. + enum: + - ABNANL2A + - ASNBNL21 + - BUNQNL2A + - FVLBNL22 + - HANDNL2A + - INGBNL2A + - KNABNL2H + - MOYONL21 + - RABONL2U + - RBRBNL21 + - REVOLT21 + - SNSBNL2A + - TRIONL2U nullable: true type: string - tax_code: + title: payment_method_ideal + type: object + x-expandableFields: [] + payment_method_interac_present: + description: '' + properties: {} + title: payment_method_interac_present + type: object + x-expandableFields: [] + payment_method_klarna: + description: '' + properties: + dob: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/tax_code" - description: A [tax code](https://stripe.com/docs/tax/tax-codes) ID. + - "$ref": "#/components/schemas/payment_flows_private_payment_methods_klarna_dob" + description: The customer's date of birth, if provided. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/tax_code" - unit_label: - description: A label that represents units of this product in Stripe and - on customers’ receipts and invoices. When set, this will be included in - associated invoice line item descriptions. + title: payment_method_klarna + type: object + x-expandableFields: + - dob + payment_method_konbini: + description: '' + properties: {} + title: payment_method_konbini + type: object + x-expandableFields: [] + payment_method_link: + description: '' + properties: + email: + description: Account owner's email address. maxLength: 5000 nullable: true type: string - updated: - description: Time at which the object was last updated. Measured in seconds - since the Unix epoch. - format: unix-time - type: integer - url: - description: A URL of a publicly-accessible webpage for this product. - maxLength: 2048 - nullable: true + persistent_token: + description: Token used for persistent Link logins. + maxLength: 5000 type: string - required: - - active - - created - - id - - images - - livemode - - metadata - - name - - object - - updated - title: Product + title: payment_method_link type: object - x-expandableFields: - - package_dimensions - - tax_code - x-resourceId: product - promotion_code: - description: |- - A Promotion Code represents a customer-redeemable code for a coupon. It can be used to - create multiple codes for a single coupon. + x-expandableFields: [] + payment_method_options_affirm: + description: '' properties: - active: - description: Whether the promotion code is currently active. A promotion - code is only active if the coupon is also valid. - type: boolean - code: - description: The customer-facing code. Regardless of case, this code must - be unique across all active promotion codes for each customer. + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_affirm + type: object + x-expandableFields: [] + payment_method_options_afterpay_clearpay: + description: '' + properties: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual + type: string + reference: + description: |- + Order identifier shown to the customer in Afterpay’s online portal. We recommend using a value that helps you answer any questions a customer might have about + the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. maxLength: 5000 + nullable: true type: string - coupon: - "$ref": "#/components/schemas/coupon" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_afterpay_clearpay + type: object + x-expandableFields: [] + payment_method_options_alipay: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + type: string + title: payment_method_options_alipay + type: object + x-expandableFields: [] + payment_method_options_bacs_debit: + description: '' + properties: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + title: payment_method_options_bacs_debit + type: object + x-expandableFields: [] + payment_method_options_bancontact: + description: '' + properties: + preferred_language: + description: Preferred language of the Bancontact authorization page that + the customer is redirected to. + enum: + - de + - en + - fr + - nl + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + type: string + required: + - preferred_language + title: payment_method_options_bancontact + type: object + x-expandableFields: [] + payment_method_options_boleto: + description: '' + properties: + expires_after_days: + description: The number of calendar days before a Boleto voucher expires. + For example, if you create a Boleto voucher on Monday and you set expires_after_days + to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo + time. type: integer - customer: + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + - on_session + type: string + required: + - expires_after_days + title: payment_method_options_boleto + type: object + x-expandableFields: [] + payment_method_options_card_installments: + description: '' + properties: + available_plans: + description: Installment plans that may be selected for this PaymentIntent. + items: + "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + nullable: true + type: array + enabled: + description: Whether Installments are enabled for this PaymentIntent. + type: boolean + plan: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: The customer that this promotion code can be used by. + - "$ref": "#/components/schemas/payment_method_details_card_installments_plan" + description: Installment plan selected for this PaymentIntent. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - expires_at: - description: Date at which the promotion code can no longer be redeemed. + required: + - enabled + title: payment_method_options_card_installments + type: object + x-expandableFields: + - available_plans + - plan + payment_method_options_card_mandate_options: + description: '' + properties: + amount: + description: Amount to be charged for future payments. + type: integer + amount_type: + description: One of `fixed` or `maximum`. If `fixed`, the `amount` param + refers to the exact amount to be charged in future payments. If `maximum`, + the amount charged can be up to the value passed for the `amount` param. + enum: + - fixed + - maximum + type: string + description: + description: A description of the mandate or subscription that is meant + to be displayed to the customer. + maxLength: 200 + nullable: true + type: string + end_date: + description: End date of the mandate or subscription. If not provided, the + mandate will be active until canceled. If provided, end date should be + after start date. format: unix-time nullable: true type: integer - id: - description: Unique identifier for the object. - maxLength: 5000 + interval: + description: Specifies payment frequency. One of `day`, `week`, `month`, + `year`, or `sporadic`. + enum: + - day + - month + - sporadic + - week + - year type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - max_redemptions: - description: Maximum number of times this promotion code can be redeemed. + interval_count: + description: The number of intervals between payments. For example, `interval=month` + and `interval_count=3` indicates one payment every three months. Maximum + of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter + is optional when `interval=sporadic`. nullable: true type: integer - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - promotion_code + reference: + description: Unique identifier for the mandate or subscription. + maxLength: 80 type: string - restrictions: - "$ref": "#/components/schemas/promotion_codes_resource_restrictions" - times_redeemed: - description: Number of times this promotion code has been used. + start_date: + description: Start date of the mandate or subscription. Start date should + not be lesser than yesterday. + format: unix-time type: integer + supported_types: + description: Specifies the type of mandates supported. Possible values are + `india`. + items: + enum: + - india + type: string + nullable: true + type: array required: - - active - - code - - coupon - - created - - id - - livemode - - object - - restrictions - - times_redeemed - title: PromotionCode + - amount + - amount_type + - interval + - reference + - start_date + title: payment_method_options_card_mandate_options type: object - x-expandableFields: - - coupon - - customer - - restrictions - x-resourceId: promotion_code - promotion_codes_resource_restrictions: + x-expandableFields: [] + payment_method_options_card_present: description: '' properties: - first_time_transaction: - description: A Boolean indicating if the Promotion Code should only be redeemed - for Customers without any successful payments or invoices - type: boolean - minimum_amount: - description: Minimum amount required to redeem this Promotion Code into - a Coupon (e.g., a purchase must be $100 or more to work). + request_extended_authorization: + description: Request ability to capture this payment beyond the standard + [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) nullable: true - type: integer - minimum_amount_currency: - description: Three-letter [ISO code](https://stripe.com/docs/currencies) - for minimum_amount - maxLength: 5000 + type: boolean + request_incremental_authorization_support: + description: Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) + this PaymentIntent if the combination of MCC and card brand is eligible. + Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) + response to verify support. nullable: true - type: string - required: - - first_time_transaction - title: PromotionCodesResourceRestrictions + type: boolean + title: payment_method_options_card_present type: object x-expandableFields: [] - quote: - description: |- - A Quote is a way to model prices that you'd like to provide to a customer. - Once accepted, it will automatically create an invoice, subscription or subscription schedule. + payment_method_options_customer_balance: + description: '' properties: - amount_subtotal: - description: Total before any discounts or taxes are applied. - type: integer - amount_total: - description: Total after discounts and taxes are applied. - type: integer - application_fee_amount: - description: The amount of the application fee (if any) that will be requested - to be applied to the payment and transferred to the application owner's - Stripe account. Only applicable if there are no line items with recurring - prices on the quote. - nullable: true - type: integer - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the application owner's Stripe account. - Only applicable if there are line items with recurring prices on the quote. - nullable: true - type: number - automatic_tax: - "$ref": "#/components/schemas/quotes_resource_automatic_tax" - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When charging - automatically, Stripe will attempt to pay invoices at the end of the subscription - cycle or on finalization using the default payment method attached to - the subscription or customer. When sending an invoice, Stripe will email - your customer an invoice with payment instructions. Defaults to `charge_automatically`. + bank_transfer: + "$ref": "#/components/schemas/payment_method_options_customer_balance_bank_transfer" + funding_type: + description: 'The funding method type to be used when there are not enough + funds in the customer balance. Permitted values include: `bank_transfer`.' enum: - - charge_automatically - - send_invoice - type: string - computed: - "$ref": "#/components/schemas/quotes_resource_computed" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - maxLength: 5000 + - bank_transfer nullable: true type: string - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: The customer which this quote belongs to. A customer is required - before finalizing the quote. Once specified, it cannot be changed. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - default_tax_rates: - description: The tax rates applied to this quote. - items: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/tax_rate" - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/tax_rate" - type: array - description: - description: A description that will be displayed on the quote PDF. - maxLength: 5000 - nullable: true + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none type: string - discounts: - description: The discounts applied to this quote. + title: payment_method_options_customer_balance + type: object + x-expandableFields: + - bank_transfer + payment_method_options_customer_balance_bank_transfer: + description: '' + properties: + eu_bank_transfer: + "$ref": "#/components/schemas/payment_method_options_customer_balance_eu_bank_account" + requested_address_types: + description: |- + List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + + Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. items: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/discount" - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/discount" - type: array - expires_at: - description: The date on which the quote will be canceled if in `open` or - `draft` status. Measured in seconds since the Unix epoch. - format: unix-time - type: integer - footer: - description: A footer that will be displayed on the quote PDF. - maxLength: 5000 - nullable: true - type: string - from_quote: - anyOf: - - "$ref": "#/components/schemas/quotes_resource_from_quote" - description: Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) - for more details. - nullable: true - header: - description: A header that will be displayed on the quote PDF. - maxLength: 5000 - nullable: true - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - invoice: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/invoice" - - "$ref": "#/components/schemas/deleted_invoice" - description: The invoice that was created from this quote. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/invoice" - - "$ref": "#/components/schemas/deleted_invoice" - invoice_settings: - anyOf: - - "$ref": "#/components/schemas/invoice_setting_quote_setting" - description: All invoices will be billed using the specified settings. - nullable: true - line_items: - description: A list of items the customer is being quoted for. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/item" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: QuotesResourceListLineItems - type: object - x-expandableFields: - - data - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 + enum: + - iban + - sepa + - sort_code + - spei + - zengin type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - number: - description: A unique number that identifies this particular quote. This - number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). - maxLength: 5000 - nullable: true - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. + x-stripeBypassValidation: true + type: array + type: + description: 'The bank transfer type that this PaymentIntent is allowed + to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, + `jp_bank_transfer`, or `mx_bank_transfer`.' enum: - - quote - type: string - on_behalf_of: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: The account on behalf of which to charge. See the [Connect - documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) - for details. + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - status: - description: The status of the quote. - enum: - - accepted - - canceled - - draft - - open type: string - status_transitions: - "$ref": "#/components/schemas/quotes_resource_status_transitions" - subscription: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/subscription" - description: The subscription that was created or updated from this quote. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/subscription" - subscription_data: - "$ref": "#/components/schemas/quotes_resource_subscription_data" - subscription_schedule: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/subscription_schedule" - description: The subscription schedule that was created or updated from - this quote. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/subscription_schedule" - total_details: - "$ref": "#/components/schemas/quotes_resource_total_details" - transfer_data: - anyOf: - - "$ref": "#/components/schemas/quotes_resource_transfer_data" - description: The account (if any) the payments will be attributed to for - tax reporting, and where funds from each payment will be transferred to - for each of the invoices. - nullable: true - required: - - amount_subtotal - - amount_total - - automatic_tax - - collection_method - - computed - - created - - discounts - - expires_at - - id - - livemode - - metadata - - object - - status - - status_transitions - - subscription_data - - total_details - title: Quote + x-stripeBypassValidation: true + title: payment_method_options_customer_balance_bank_transfer type: object x-expandableFields: - - automatic_tax - - computed - - customer - - default_tax_rates - - discounts - - from_quote - - invoice - - invoice_settings - - line_items - - on_behalf_of - - status_transitions - - subscription - - subscription_data - - subscription_schedule - - total_details - - transfer_data - x-resourceId: quote - quotes_resource_automatic_tax: + - eu_bank_transfer + payment_method_options_customer_balance_eu_bank_account: description: '' properties: - enabled: - description: Automatically calculate taxes - type: boolean - status: - description: The status of the most recent automated tax calculation for - this quote. + country: + description: 'The desired country code of the bank account information. + Permitted values include: `DE`, `ES`, `FR`, `IE`, or `NL`.' enum: - - complete - - failed - - requires_location_inputs - nullable: true + - DE + - ES + - FR + - IE + - NL type: string required: - - enabled - title: QuotesResourceAutomaticTax + - country + title: payment_method_options_customer_balance_eu_bank_account type: object x-expandableFields: [] - quotes_resource_computed: + payment_method_options_fpx: description: '' properties: - recurring: - anyOf: - - "$ref": "#/components/schemas/quotes_resource_recurring" - description: The definitive totals and line items the customer will be charged - on a recurring basis. Takes into account the line items with recurring - prices and discounts with `duration=forever` coupons only. Defaults to - `null` if no inputted line items with recurring prices. - nullable: true - upfront: - "$ref": "#/components/schemas/quotes_resource_upfront" - required: - - upfront - title: QuotesResourceComputed + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_fpx type: object - x-expandableFields: - - recurring - - upfront - quotes_resource_from_quote: + x-expandableFields: [] + payment_method_options_giropay: description: '' properties: - is_revision: - description: Whether this quote is a revision of a different quote. - type: boolean - quote: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/quote" - description: The quote that was cloned. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/quote" - required: - - is_revision - - quote - title: QuotesResourceFromQuote + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_giropay type: object - x-expandableFields: - - quote - quotes_resource_recurring: + x-expandableFields: [] + payment_method_options_grabpay: description: '' properties: - amount_subtotal: - description: Total before any discounts or taxes are applied. - type: integer - amount_total: - description: Total after discounts and taxes are applied. - type: integer - interval: - description: The frequency at which a subscription is billed. One of `day`, - `week`, `month` or `year`. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - day - - month - - week - - year + - none type: string - interval_count: - description: The number of intervals (specified in the `interval` attribute) - between subscription billings. For example, `interval=month` and `interval_count=3` - bills every 3 months. - type: integer - total_details: - "$ref": "#/components/schemas/quotes_resource_total_details" - required: - - amount_subtotal - - amount_total - - interval - - interval_count - - total_details - title: QuotesResourceRecurring + title: payment_method_options_grabpay type: object - x-expandableFields: - - total_details - quotes_resource_status_transitions: + x-expandableFields: [] + payment_method_options_ideal: description: '' properties: - accepted_at: - description: The time that the quote was accepted. Measured in seconds since - Unix epoch. - format: unix-time - nullable: true - type: integer - canceled_at: - description: The time that the quote was canceled. Measured in seconds since - Unix epoch. - format: unix-time - nullable: true - type: integer - finalized_at: - description: The time that the quote was finalized. Measured in seconds - since Unix epoch. - format: unix-time + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + - off_session + type: string + title: payment_method_options_ideal + type: object + x-expandableFields: [] + payment_method_options_interac_present: + description: '' + properties: {} + title: payment_method_options_interac_present + type: object + x-expandableFields: [] + payment_method_options_klarna: + description: '' + properties: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual + type: string + preferred_locale: + description: Preferred locale of the Klarna checkout page that the customer + is redirected to. + maxLength: 5000 nullable: true - type: integer - title: QuotesResourceStatusTransitions + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_klarna type: object x-expandableFields: [] - quotes_resource_subscription_data: + payment_method_options_konbini: description: '' properties: - effective_date: - description: When creating a new subscription, the date of which the subscription - schedule will start after the quote is accepted. This date is ignored - if it is in the past when the quote is accepted. Measured in seconds since - the Unix epoch. - format: unix-time + confirmation_number: + description: An optional 10 to 11 digit numeric-only string determining + the confirmation code at applicable convenience stores. + maxLength: 5000 + nullable: true + type: string + expires_after_days: + description: The number of calendar days (between 1 and 60) after which + Konbini payment instructions will expire. For example, if a PaymentIntent + is confirmed with Konbini and `expires_after_days` set to 2 on Monday + JST, the instructions will expire on Wednesday 23:59:59 JST. nullable: true type: integer - trial_period_days: - description: Integer representing the number of trial period days before - the customer is charged for the first time. + expires_at: + description: The timestamp at which the Konbini payment instructions will + expire. Only one of `expires_after_days` or `expires_at` may be set. + format: unix-time nullable: true type: integer - title: QuotesResourceSubscriptionData + product_description: + description: A product descriptor of up to 22 characters, which will appear + to customers at the convenience store. + maxLength: 5000 + nullable: true + type: string + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_konbini type: object x-expandableFields: [] - quotes_resource_total_details: + payment_method_options_oxxo: description: '' properties: - amount_discount: - description: This is the sum of all the line item discounts. - type: integer - amount_shipping: - description: This is the sum of all the line item shipping amounts. - nullable: true - type: integer - amount_tax: - description: This is the sum of all the line item tax amounts. + expires_after_days: + description: The number of calendar days before an OXXO invoice expires. + For example, if you create an OXXO invoice on Monday and you set expires_after_days + to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City + time. type: integer - breakdown: - "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" - required: - - amount_discount - - amount_tax - title: QuotesResourceTotalDetails + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + required: + - expires_after_days + title: payment_method_options_oxxo type: object - x-expandableFields: - - breakdown - quotes_resource_total_details_resource_breakdown: + x-expandableFields: [] + payment_method_options_p24: description: '' properties: - discounts: - description: The aggregated line item discounts. - items: - "$ref": "#/components/schemas/line_items_discount_amount" - type: array - taxes: - description: The aggregated line item tax amounts by rate. - items: - "$ref": "#/components/schemas/line_items_tax_amount" - type: array - required: - - discounts - - taxes - title: QuotesResourceTotalDetailsResourceBreakdown + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_p24 type: object - x-expandableFields: - - discounts - - taxes - quotes_resource_transfer_data: + x-expandableFields: [] + payment_method_options_paynow: description: '' properties: - amount: - description: The amount in %s that will be transferred to the destination - account when the invoice is paid. By default, the entire amount is transferred - to the destination. - nullable: true - type: integer - amount_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the destination account. By default, - the entire amount will be transferred to the destination. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none + type: string + title: payment_method_options_paynow + type: object + x-expandableFields: [] + payment_method_options_paypal: + description: '' + properties: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - manual + type: string + preferred_locale: + description: Preferred locale of the PayPal checkout page that the customer + is redirected to. + maxLength: 5000 nullable: true - type: number - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: The account where funds from the payment will be transferred - to upon payment success. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - required: - - destination - title: QuotesResourceTransferData + type: string + title: payment_method_options_paypal type: object - x-expandableFields: - - destination - quotes_resource_upfront: + x-expandableFields: [] + payment_method_options_pix: description: '' properties: - amount_subtotal: - description: Total before any discounts or taxes are applied. + expires_after_seconds: + description: The number of seconds (between 10 and 1209600) after which + Pix payment will expire. + nullable: true type: integer - amount_total: - description: Total after discounts and taxes are applied. + expires_at: + description: The timestamp at which the Pix expires. + nullable: true type: integer - line_items: - description: The line items that will appear on the next invoice after this - quote is accepted. This does not include pending invoice items that exist - on the customer but may still be included in the next invoice. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/item" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: QuotesResourceListLineItems - type: object - x-expandableFields: - - data - total_details: - "$ref": "#/components/schemas/quotes_resource_total_details" - required: - - amount_subtotal - - amount_total - - total_details - title: QuotesResourceUpfront - type: object - x-expandableFields: - - line_items - - total_details - radar.early_fraud_warning: - description: |- - An early fraud warning indicates that the card issuer has notified us that a - charge may be fraudulent. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. - Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). - properties: - actionable: - description: An EFW is actionable if it has not received a dispute and has - not been fully refunded. You may wish to proactively refund a charge that - receives an EFW, in order to avoid receiving a dispute later. - type: boolean - charge: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: ID of the charge this early fraud warning is for, optionally - expanded. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - fraud_type: - description: The type of fraud labelled by the issuer. One of `card_never_received`, - `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, - `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - radar.early_fraud_warning + - none type: string - payment_intent: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_intent" - description: ID of the Payment Intent this early fraud warning is for, optionally - expanded. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_intent" - required: - - actionable - - charge - - created - - fraud_type - - id - - livemode - - object - title: RadarEarlyFraudWarning + title: payment_method_options_pix type: object - x-expandableFields: - - charge - - payment_intent - x-resourceId: radar.early_fraud_warning - radar.value_list: - description: |- - Value lists allow you to group values together which can then be referenced in rules. - - Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). + x-expandableFields: [] + payment_method_options_promptpay: + description: '' properties: - alias: - description: The name of the value list for use in rules. - maxLength: 5000 - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - created_by: - description: The name or email address of the user who created this value - list. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - item_type: - description: The type of items in the value list. One of `card_fingerprint`, - `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, - or `customer_id`. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - card_bin - - card_fingerprint - - case_sensitive_string - - country - - customer_id - - email - - ip_address - - string + - none type: string - list_items: - description: List of items contained within this value list. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/radar.value_list_item" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: RadarListListItemList - type: object - x-expandableFields: - - data - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - name: - description: The name of the value list. - maxLength: 5000 + title: payment_method_options_promptpay + type: object + x-expandableFields: [] + payment_method_options_sofort: + description: '' + properties: + preferred_language: + description: Preferred language of the SOFORT authorization page that the + customer is redirected to. + enum: + - de + - en + - es + - fr + - it + - nl + - pl + nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). enum: - - radar.value_list + - none + - off_session type: string - required: - - alias - - created - - created_by - - id - - item_type - - list_items - - livemode - - metadata - - name - - object - title: RadarListList + title: payment_method_options_sofort type: object - x-expandableFields: - - list_items - x-resourceId: radar.value_list - radar.value_list_item: - description: |- - Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. - - Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). + x-expandableFields: [] + payment_method_options_wechat_pay: + description: '' properties: - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - created_by: - description: The name or email address of the user who added this item to - the value list. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. + app_id: + description: The app ID registered with WeChat Pay. Only required when client + is ios or android. maxLength: 5000 + nullable: true type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. + client: + description: The client type that the end customer will pay from enum: - - radar.value_list_item + - android + - ios + - web + nullable: true type: string - value: - description: The value of the item. - maxLength: 5000 + x-stripeBypassValidation: true + setup_future_usage: + description: |- + Indicates that you intend to make future payments with this PaymentIntent's payment method. + + Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + + When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + enum: + - none type: string - value_list: - description: The identifier of the value list this item belongs to. - maxLength: 5000 + title: payment_method_options_wechat_pay + type: object + x-expandableFields: [] + payment_method_oxxo: + description: '' + properties: {} + title: payment_method_oxxo + type: object + x-expandableFields: [] + payment_method_p24: + description: '' + properties: + bank: + description: The customer's bank, if provided. + enum: + - alior_bank + - bank_millennium + - bank_nowy_bfg_sa + - bank_pekao_sa + - banki_spbdzielcze + - blik + - bnp_paribas + - boz + - citi_handlowy + - credit_agricole + - envelobank + - etransfer_pocztowy24 + - getin_bank + - ideabank + - ing + - inteligo + - mbank_mtransfer + - nest_przelew + - noble_pay + - pbac_z_ipko + - plus_bank + - santander_przelew24 + - tmobile_usbugi_bankowe + - toyota_bank + - volkswagen_bank + nullable: true type: string - required: - - created - - created_by - - id - - livemode - - object - - value - - value_list - title: RadarListListItem + x-stripeBypassValidation: true + title: payment_method_p24 type: object x-expandableFields: [] - x-resourceId: radar.value_list_item - radar_review_resource_location: + payment_method_paynow: + description: '' + properties: {} + title: payment_method_paynow + type: object + x-expandableFields: [] + payment_method_pix: + description: '' + properties: {} + title: payment_method_pix + type: object + x-expandableFields: [] + payment_method_promptpay: + description: '' + properties: {} + title: payment_method_promptpay + type: object + x-expandableFields: [] + payment_method_sepa_debit: description: '' properties: - city: - description: The city where the payment originated. + bank_code: + description: Bank code of bank associated with the bank account. maxLength: 5000 nullable: true type: string - country: - description: Two-letter ISO code representing the country where the payment - originated. + branch_code: + description: Branch code of bank associated with the bank account. maxLength: 5000 nullable: true type: string - latitude: - description: The geographic latitude where the payment originated. - nullable: true - type: number - longitude: - description: The geographic longitude where the payment originated. + country: + description: Two-letter ISO code representing the country the bank account + is located in. + maxLength: 5000 nullable: true - type: number - region: - description: The state/county/province/region where the payment originated. + type: string + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - title: RadarReviewResourceLocation - type: object - x-expandableFields: [] - radar_review_resource_session: - description: '' - properties: - browser: - description: The browser used in this browser session (e.g., `Chrome`). - maxLength: 5000 - nullable: true - type: string - device: - description: Information about the device used for the browser session (e.g., - `Samsung SM-G930T`). - maxLength: 5000 + generated_from: + anyOf: + - "$ref": "#/components/schemas/sepa_debit_generated_from" + description: Information about the object that generated this PaymentMethod. nullable: true - type: string - platform: - description: The platform for the browser session (e.g., `Macintosh`). + last4: + description: Last four characters of the IBAN. maxLength: 5000 nullable: true type: string - version: - description: The version for the browser session (e.g., `61.0.3163.100`). + title: payment_method_sepa_debit + type: object + x-expandableFields: + - generated_from + payment_method_sofort: + description: '' + properties: + country: + description: Two-letter ISO code representing the country the bank account + is located in. maxLength: 5000 nullable: true type: string - title: RadarReviewResourceSession + title: payment_method_sofort type: object x-expandableFields: [] - recipient: - description: |- - With `Recipient` objects, you can transfer money from your Stripe account to a - third-party bank account or debit card. The API allows you to create, delete, - and update your recipients. You can retrieve individual recipients as well as - a list of all your recipients. - - **`Recipient` objects have been deprecated in favor of - [Connect](https://stripe.com/docs/connect), specifically Connect's much more powerful - [Account objects](https://stripe.com/docs/api#account). Stripe accounts that don't already use - recipients can no longer begin doing so. Please use `Account` objects - instead.** + payment_method_us_bank_account: + description: '' properties: - active_account: - anyOf: - - "$ref": "#/components/schemas/bank_account" - description: Hash describing the current account on the recipient, if there - is one. + account_holder_type: + description: 'Account holder type: individual or company.' + enum: + - company + - individual nullable: true - cards: - description: '' + type: string + account_type: + description: 'Account type: checkings or savings. Defaults to checking if + omitted.' + enum: + - checking + - savings nullable: true - properties: - data: - items: - "$ref": "#/components/schemas/card" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: CardList - type: object - x-expandableFields: - - data - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - default_card: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/card" - description: The default card to use for creating transfers to this recipient. + type: string + bank_name: + description: The name of the bank. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/card" - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. + type: string + financial_connections_account: + description: The ID of the Financial Connections Account used to create + the payment method. maxLength: 5000 nullable: true type: string - email: + fingerprint: + description: Uniquely identifies this particular bank account. You can use + this attribute to check whether two bank accounts are the same. maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + last4: + description: Last four digits of the bank account number. maxLength: 5000 + nullable: true type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - migrated_to: + networks: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: 'The ID of the [Custom account](https://stripe.com/docs/connect/custom-accounts) - this recipient was migrated to. If set, the recipient can no longer be - updated, nor can transfers be made to it: use the Custom account instead.' + - "$ref": "#/components/schemas/us_bank_account_networks" + description: Contains information about US bank account networks that can + be used. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - name: - description: Full, legal name of the recipient. + routing_number: + description: Routing number of the bank account. maxLength: 5000 nullable: true type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - recipient - type: string - rolled_back_from: + title: payment_method_us_bank_account + type: object + x-expandableFields: + - networks + payment_method_wechat_pay: + description: '' + properties: {} + title: payment_method_wechat_pay + type: object + x-expandableFields: [] + payment_pages_checkout_session_after_expiration: + description: '' + properties: + recovery: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - type: - description: Type of the recipient, one of `individual` or `corporation`. - maxLength: 5000 - type: string - required: - - created - - id - - livemode - - metadata - - object - - type - title: TransferRecipient + - "$ref": "#/components/schemas/payment_pages_checkout_session_after_expiration_recovery" + description: When set, configuration used to recover the Checkout Session + on expiry. + nullable: true + title: PaymentPagesCheckoutSessionAfterExpiration type: object x-expandableFields: - - active_account - - cards - - default_card - - migrated_to - - rolled_back_from - x-resourceId: recipient - recurring: + - recovery + payment_pages_checkout_session_after_expiration_recovery: description: '' properties: - aggregate_usage: - description: Specifies a usage aggregation strategy for prices of `usage_type=metered`. - Allowed values are `sum` for summing up all usage during a period, `last_during_period` - for using the last usage record reported within a period, `last_ever` - for using the last usage record ever (across period bounds) or `max` which - uses the usage record with the maximum reported usage during a period. - Defaults to `sum`. - enum: - - last_during_period - - last_ever - - max - - sum + allow_promotion_codes: + description: Enables user redeemable promotion codes on the recovered Checkout + Sessions. Defaults to `false` + type: boolean + enabled: + description: |- + If `true`, a recovery url will be generated to recover this Checkout Session if it + expires before a transaction is completed. It will be attached to the + Checkout Session object upon expiration. + type: boolean + expires_at: + description: The timestamp at which the recovery URL will expire. + format: unix-time nullable: true - type: string - interval: - description: The frequency at which a subscription is billed. One of `day`, - `week`, `month` or `year`. - enum: - - day - - month - - week - - year - type: string - interval_count: - description: The number of intervals (specified in the `interval` attribute) - between subscription billings. For example, `interval=month` and `interval_count=3` - bills every 3 months. type: integer - usage_type: - description: Configures how the quantity per period should be determined. - Can be either `metered` or `licensed`. `licensed` automatically bills - the `quantity` set when adding it to a subscription. `metered` aggregates - the total usage based on usage records. Defaults to `licensed`. - enum: - - licensed - - metered + url: + description: URL that creates a new Checkout Session when clicked that is + a copy of this expired Checkout Session + maxLength: 5000 + nullable: true type: string required: - - interval - - interval_count - - usage_type - title: Recurring + - allow_promotion_codes + - enabled + title: PaymentPagesCheckoutSessionAfterExpirationRecovery type: object x-expandableFields: [] - refund: - description: |- - `Refund` objects allow you to refund a charge that has previously been created - but not yet refunded. Funds will be refunded to the credit or debit card that - was originally charged. - - Related guide: [Refunds](https://stripe.com/docs/refunds). + payment_pages_checkout_session_automatic_tax: + description: '' properties: - amount: - description: Amount, in %s. - type: integer - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: Balance transaction that describes the impact on your account - balance. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - charge: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: ID of the charge that was refunded. + enabled: + description: Indicates whether automatic tax is enabled for the session + type: boolean + status: + description: The status of the most recent automated tax calculation for + this session. + enum: + - complete + - failed + - requires_location_inputs nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. (Available on non-card refunds only) - maxLength: 5000 - type: string - failure_balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: If the refund failed, this balance transaction describes the - adjustment made on your account balance that reverses the initial balance - transaction. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - failure_reason: - description: If the refund failed, the reason for refund failure if known. - Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, - or `unknown`. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 type: string - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. + required: + - enabled + title: PaymentPagesCheckoutSessionAutomaticTax + type: object + x-expandableFields: [] + payment_pages_checkout_session_consent: + description: '' + properties: + promotions: + description: |- + If `opt_in`, the customer consents to receiving promotional communications + from the merchant about this Checkout Session. enum: - - refund - type: string - payment_intent: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_intent" - description: ID of the PaymentIntent that was refunded. + - opt_in + - opt_out nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_intent" - reason: - description: Reason for the refund, either user-provided (`duplicate`, `fraudulent`, - or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + type: string + terms_of_service: + description: If `accepted`, the customer in this Checkout Session has agreed + to the merchant's terms of service. enum: - - duplicate - - expired_uncaptured_charge - - fraudulent - - requested_by_customer + - accepted nullable: true type: string x-stripeBypassValidation: true - receipt_number: - description: This is the transaction number that appears on email receipts - sent for this refund. - maxLength: 5000 + title: PaymentPagesCheckoutSessionConsent + type: object + x-expandableFields: [] + payment_pages_checkout_session_consent_collection: + description: '' + properties: + promotions: + description: |- + If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + Session will determine whether to display an option to opt into promotional communication + from the merchant depending on the customer's locale. Only available to US merchants. + enum: + - auto + - none nullable: true type: string - source_transfer_reversal: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/transfer_reversal" - description: The transfer reversal that is associated with the refund. Only - present if the charge came from another Stripe account. See the Connect - documentation for details. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/transfer_reversal" - status: - description: Status of the refund. For credit card refunds, this can be - `pending`, `succeeded`, or `failed`. For other types of refunds, it can - be `pending`, `succeeded`, `failed`, or `canceled`. Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) - documentation for more details. - maxLength: 5000 + terms_of_service: + description: If set to `required`, it requires customers to accept the terms + of service before being able to pay. + enum: + - none + - required nullable: true type: string - transfer_reversal: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/transfer_reversal" - description: If the accompanying transfer was reversed, the transfer reversal - object. Only applicable if the charge was created using the destination - parameter. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/transfer_reversal" - required: - - amount - - created - - currency - - id - - object - title: Refund + title: PaymentPagesCheckoutSessionConsentCollection type: object - x-expandableFields: - - balance_transaction - - charge - - failure_balance_transaction - - payment_intent - - source_transfer_reversal - - transfer_reversal - x-resourceId: refund - reporting.report_run: - description: |- - The Report Run object represents an instance of a report type generated with - specific run parameters. Once the object is created, Stripe begins processing the report. - When the report has finished running, it will give you a reference to a file - where you can retrieve your results. For an overview, see - [API Access to Reports](https://stripe.com/docs/reporting/statements/api). - - Note that certain report types can only be run based on your live-mode data (not test-mode - data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + x-expandableFields: [] + payment_pages_checkout_session_customer_details: + description: '' properties: - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - error: + address: + anyOf: + - "$ref": "#/components/schemas/address" + description: 'The customer''s address after a completed Checkout Session. + Note: This property is populated only for sessions on or after March 30, + 2022.' + nullable: true + email: description: |- - If something should go wrong during the run, a message about the failure (populated when - `status=failed`). + The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. maxLength: 5000 nullable: true type: string - id: - description: Unique identifier for the object. + name: + description: 'The customer''s name after a completed Checkout Session. Note: + This property is populated only for sessions on or after March 30, 2022.' maxLength: 5000 + nullable: true type: string - livemode: - description: "`true` if the report is run on live mode data and `false` - if it is run on test mode data." - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - reporting.report_run - type: string - parameters: - "$ref": "#/components/schemas/financial_reporting_finance_report_run_run_parameters" - report_type: - description: The ID of the [report type](https://stripe.com/docs/reports/report-types) - to run, such as `"balance.summary.1"`. + phone: + description: The customer's phone number after a completed Checkout Session. maxLength: 5000 + nullable: true type: string - result: - anyOf: - - "$ref": "#/components/schemas/file" - description: |- - The file object representing the result of the report run (populated when - `status=succeeded`). + tax_exempt: + description: The customer’s tax exempt status after a completed Checkout + Session. + enum: + - exempt + - none + - reverse nullable: true - status: - description: |- - Status of this report run. This will be `pending` when the run is initially created. - When the run finishes, this will be set to `succeeded` and the `result` field will be populated. - Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. - maxLength: 5000 type: string - succeeded_at: - description: |- - Timestamp at which this run successfully finished (populated when - `status=succeeded`). Measured in seconds since the Unix epoch. - format: unix-time + tax_ids: + description: The customer’s tax IDs after a completed Checkout Session. + items: + "$ref": "#/components/schemas/payment_pages_checkout_session_tax_id" nullable: true - type: integer - required: - - created - - id - - livemode - - object - - parameters - - report_type - - status - title: reporting_report_run + type: array + title: PaymentPagesCheckoutSessionCustomerDetails type: object x-expandableFields: - - parameters - - result - x-resourceId: reporting.report_run - reporting.report_type: - description: |- - The Report Type resource corresponds to a particular type of report, such as - the "Activity summary" or "Itemized payouts" reports. These objects are - identified by an ID belonging to a set of enumerated values. See - [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) - for those Report Type IDs, along with required and optional parameters. - - Note that certain report types can only be run based on your live-mode data (not test-mode - data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + - address + - tax_ids + payment_pages_checkout_session_phone_number_collection: + description: '' properties: - data_available_end: - description: Most recent time for which this Report Type is available. Measured - in seconds since the Unix epoch. - format: unix-time - type: integer - data_available_start: - description: Earliest time for which this Report Type is available. Measured - in seconds since the Unix epoch. - format: unix-time - type: integer - default_columns: - description: List of column names that are included by default when this - Report Type gets run. (If the Report Type doesn't support the `columns` - parameter, this will be null.) - items: - maxLength: 5000 - type: string - nullable: true - type: array - id: - description: The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), - such as `balance.summary.1`. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. + enabled: + description: Indicates whether phone number collection is enabled for the + session type: boolean - name: - description: Human-readable name of the Report Type - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - reporting.report_type - type: string - updated: - description: When this Report Type was latest updated. Measured in seconds - since the Unix epoch. - format: unix-time - type: integer - version: - description: Version of the Report Type. Different versions report with - the same ID will have the same purpose, but may take different run parameters - or have different result schemas. - type: integer required: - - data_available_end - - data_available_start - - id - - livemode - - name - - object - - updated - - version - title: reporting_report_type + - enabled + title: PaymentPagesCheckoutSessionPhoneNumberCollection type: object x-expandableFields: [] - x-resourceId: reporting.report_type - reserve_transaction: + payment_pages_checkout_session_shipping_address_collection: description: '' properties: - amount: - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - nullable: true - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - reserve_transaction - type: string + allowed_countries: + description: |- + An array of two-letter ISO country codes representing which countries Checkout should provide as options for + shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. + items: + enum: + - 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 + type: string + type: array required: - - amount - - currency - - id - - object - title: ReserveTransaction + - allowed_countries + title: PaymentPagesCheckoutSessionShippingAddressCollection type: object x-expandableFields: [] - review: - description: |- - Reviews can be used to supplement automated fraud detection with human expertise. - - Learn more about [Radar](/radar) and reviewing payments - [here](https://stripe.com/docs/radar/reviews). + payment_pages_checkout_session_shipping_cost: + description: '' properties: - billing_zip: - description: The ZIP or postal code of the card used, if applicable. - maxLength: 5000 - nullable: true - type: string - charge: + amount_subtotal: + description: Total shipping cost before any discounts or taxes are applied. + type: integer + amount_tax: + description: Total tax amount applied due to shipping costs. If no tax was + applied, defaults to 0. + type: integer + amount_total: + description: Total shipping cost after discounts and taxes are applied. + type: integer + shipping_rate: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/charge" - description: The charge associated with this review. + - "$ref": "#/components/schemas/shipping_rate" + description: The ID of the ShippingRate for this order. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/charge" - closed_reason: - description: The reason the review was closed, or null if it has not yet - been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, - or `redacted`. - enum: - - approved - - disputed - - redacted - - refunded - - refunded_as_fraud - nullable: true - type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time + - "$ref": "#/components/schemas/shipping_rate" + taxes: + description: The taxes applied to the shipping rate. + items: + "$ref": "#/components/schemas/line_items_tax_amount" + type: array + required: + - amount_subtotal + - amount_tax + - amount_total + title: PaymentPagesCheckoutSessionShippingCost + type: object + x-expandableFields: + - shipping_rate + - taxes + payment_pages_checkout_session_shipping_option: + description: '' + properties: + shipping_amount: + description: A non-negative integer in cents representing how much to charge. type: integer - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - ip_address: - description: The IP address where the payment originated. - maxLength: 5000 - nullable: true - type: string - ip_address_location: - anyOf: - - "$ref": "#/components/schemas/radar_review_resource_location" - description: Information related to the location of the payment. Note that - this information is an approximation and attempts to locate the nearest - population center - it should not be used to determine a specific address. - nullable: true - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - review - type: string - open: - description: If `true`, the review needs action. - type: boolean - opened_reason: - description: The reason the review was opened. One of `rule` or `manual`. - enum: - - manual - - rule - type: string - payment_intent: + shipping_rate: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_intent" - description: The PaymentIntent ID associated with this review, if one exists. + - "$ref": "#/components/schemas/shipping_rate" + description: The shipping rate. x-expansionResources: oneOf: - - "$ref": "#/components/schemas/payment_intent" - reason: - description: The reason the review is currently open or closed. One of `rule`, - `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or - `redacted`. - maxLength: 5000 - type: string - session: - anyOf: - - "$ref": "#/components/schemas/radar_review_resource_session" - description: Information related to the browsing session of the user who - initiated the payment. - nullable: true + - "$ref": "#/components/schemas/shipping_rate" required: - - created - - id - - livemode - - object - - open - - opened_reason - - reason - title: RadarReview + - shipping_amount + - shipping_rate + title: PaymentPagesCheckoutSessionShippingOption type: object x-expandableFields: - - charge - - ip_address_location - - payment_intent - - session - x-resourceId: review - rule: + - shipping_rate + payment_pages_checkout_session_tax_id: description: '' properties: - action: - description: The action taken on the payment. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - predicate: - description: The predicate to evaluate the payment against. - maxLength: 5000 - type: string - required: - - action - - id - - predicate - title: RadarRule - type: object - x-expandableFields: [] - scheduled_query_run: - description: |- - If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll - receive a `sigma.scheduled_query_run.created` webhook each time the query - runs. The webhook contains a `ScheduledQueryRun` object, which you can use to - retrieve the query results. - properties: - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - data_load_time: - description: When the query was run, Sigma contained a snapshot of your - Stripe data at this time. - format: unix-time - type: integer - error: - "$ref": "#/components/schemas/sigma_scheduled_query_run_error" - file: - anyOf: - - "$ref": "#/components/schemas/file" - description: The file object representing the results of the query. - nullable: true - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. + type: + description: The type of the tax ID, one of `eu_vat`, `br_cnpj`, `br_cpf`, + `eu_oss_vat`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, + `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, + `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `li_uid`, `my_itn`, `us_ein`, + `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, + `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, + `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, + or `unknown` enum: - - scheduled_query_run - type: string - result_available_until: - description: Time at which the result expires and is no longer available - for download. - format: unix-time - type: integer - sql: - description: SQL for the query. - maxLength: 100000 - type: string - status: - description: The query's execution status, which will be `completed` for - successful runs, and `canceled`, `failed`, or `timed_out` otherwise. - maxLength: 5000 + - ae_trn + - au_abn + - au_arn + - bg_uic + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - es_cif + - eu_oss_vat + - eu_vat + - gb_vat + - ge_vat + - hk_br + - hu_tin + - id_npwp + - il_vat + - in_gst + - is_vat + - jp_cn + - jp_rn + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - nz_gst + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - th_vat + - tw_vat + - ua_vat + - unknown + - us_ein + - za_vat type: string - title: - description: Title of the query. + value: + description: The value of the tax ID. maxLength: 5000 + nullable: true type: string required: - - created - - data_load_time - - id - - livemode - - object - - result_available_until - - sql - - status - - title - title: ScheduledQueryRun + - type + title: PaymentPagesCheckoutSessionTaxID type: object - x-expandableFields: - - error - - file - x-resourceId: scheduled_query_run - schedules_phase_automatic_tax: + x-expandableFields: [] + payment_pages_checkout_session_tax_id_collection: description: '' properties: enabled: - description: Whether Stripe automatically computes tax on invoices created - during this phase. + description: Indicates whether tax ID collection is enabled for the session type: boolean required: - enabled - title: SchedulesPhaseAutomaticTax + title: PaymentPagesCheckoutSessionTaxIDCollection type: object x-expandableFields: [] - sepa_debit_generated_from: + payment_pages_checkout_session_total_details: description: '' properties: - charge: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: The ID of the Charge that generated this PaymentMethod, if - any. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - setup_attempt: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/setup_attempt" - description: The ID of the SetupAttempt that generated this PaymentMethod, - if any. + amount_discount: + description: This is the sum of all the discounts. + type: integer + amount_shipping: + description: This is the sum of all the shipping amounts. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/setup_attempt" - title: sepa_debit_generated_from + type: integer + amount_tax: + description: This is the sum of all the tax amounts. + type: integer + breakdown: + "$ref": "#/components/schemas/payment_pages_checkout_session_total_details_resource_breakdown" + required: + - amount_discount + - amount_tax + title: PaymentPagesCheckoutSessionTotalDetails type: object x-expandableFields: - - charge - - setup_attempt - setup_attempt: + - breakdown + payment_pages_checkout_session_total_details_resource_breakdown: + description: '' + properties: + discounts: + description: The aggregated discounts. + items: + "$ref": "#/components/schemas/line_items_discount_amount" + type: array + taxes: + description: The aggregated tax amounts by rate. + items: + "$ref": "#/components/schemas/line_items_tax_amount" + type: array + required: + - discounts + - taxes + title: PaymentPagesCheckoutSessionTotalDetailsResourceBreakdown + type: object + x-expandableFields: + - discounts + - taxes + payment_source: + anyOf: + - "$ref": "#/components/schemas/account" + - "$ref": "#/components/schemas/bank_account" + - "$ref": "#/components/schemas/card" + - "$ref": "#/components/schemas/source" + title: Polymorphic + x-resourceId: payment_source + x-stripeBypassValidation: true + payout: description: |- - A SetupAttempt describes one attempted confirmation of a SetupIntent, - whether that confirmation was successful or unsuccessful. You can use - SetupAttempts to inspect details of a specific attempt at setting up a - payment method using a SetupIntent. + A `Payout` object is created when you receive funds from Stripe, or when you + initiate a payout to either a bank account or debit card of a [connected + Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + as well as list all payouts. Payouts are made on [varying + schedules](/docs/connect/manage-payout-schedule), depending on your country and + industry. + + Related guide: [Receiving Payouts](https://stripe.com/docs/payouts). properties: - application: + amount: + description: Amount (in %s) to be transferred to your bank account or debit + card. + type: integer + arrival_date: + description: Date the payout is expected to arrive in the bank. This factors + in delays like weekends or bank holidays. + format: unix-time + type: integer + automatic: + description: Returns `true` if the payout was created by an [automated payout + schedule](https://stripe.com/docs/payouts#payout-schedule), and `false` + if it was [requested manually](https://stripe.com/docs/payouts#manual-payouts). + type: boolean + balance_transaction: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/application" - description: The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) - on the SetupIntent at the time of this confirmation. + - "$ref": "#/components/schemas/balance_transaction" + description: ID of the balance transaction that describes the impact of + this payout on your account balance. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/balance_transaction" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - customer: + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + destination: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) - on the SetupIntent at the time of this confirmation. + - "$ref": "#/components/schemas/bank_account" + - "$ref": "#/components/schemas/card" + - "$ref": "#/components/schemas/deleted_bank_account" + - "$ref": "#/components/schemas/deleted_card" + description: ID of the bank account or card the payout was sent to. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" + - "$ref": "#/components/schemas/bank_account" + - "$ref": "#/components/schemas/card" + - "$ref": "#/components/schemas/deleted_bank_account" + - "$ref": "#/components/schemas/deleted_card" + x-stripeBypassValidation: true + failure_balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: If the payout failed or was canceled, this will be the ID of + the balance transaction that reversed the initial balance transaction, + and puts the funds from the failed payout back in your balance. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + failure_code: + description: Error code explaining reason for payout failure if available. + See [Types of payout failures](https://stripe.com/docs/api#payout_failures) + for a list of failure codes. + maxLength: 5000 + nullable: true + type: string + failure_message: + description: Message to user further explaining reason for payout failure + if available. + maxLength: 5000 + nullable: true + type: string id: description: Unique identifier for the object. maxLength: 5000 @@ -20789,513 +22145,520 @@ components: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + method: + description: The method used to send this payout, which can be `standard` + or `instant`. `instant` is only supported for payouts to debit cards. + (See [Instant payouts for marketplaces](https://stripe.com/blog/instant-payouts-for-marketplaces) + for more information.) + maxLength: 5000 + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - setup_attempt + - payout type: string - on_behalf_of: + original_payout: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/account" - description: The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) - on the SetupIntent at the time of this confirmation. + - "$ref": "#/components/schemas/payout" + description: If the payout reverses another, this is the ID of the original + payout. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/account" - payment_method: + - "$ref": "#/components/schemas/payout" + reversed_by: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the payment method used with this SetupAttempt. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - payment_method_details: - "$ref": "#/components/schemas/setup_attempt_payment_method_details" - setup_error: - anyOf: - - "$ref": "#/components/schemas/api_errors" - description: The error encountered during this attempt to confirm the SetupIntent, - if any. + - "$ref": "#/components/schemas/payout" + description: If the payout was reversed, this is the ID of the payout that + reverses this payout. nullable: true - setup_intent: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/setup_intent" - description: ID of the SetupIntent that this attempt belongs to. x-expansionResources: oneOf: - - "$ref": "#/components/schemas/setup_intent" - status: - description: Status of this SetupAttempt, one of `requires_confirmation`, - `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + - "$ref": "#/components/schemas/payout" + source_type: + description: The source balance this payout came from. One of `card`, `fpx`, + or `bank_account`. maxLength: 5000 type: string - usage: - description: The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) - on the SetupIntent at the time of this confirmation, one of `off_session` - or `on_session`. + statement_descriptor: + description: Extra information about a payout to be displayed on the user's + bank statement. + maxLength: 5000 + nullable: true + type: string + status: + description: 'Current status of the payout: `paid`, `pending`, `in_transit`, + `canceled` or `failed`. A payout is `pending` until it is submitted to + the bank, when it becomes `in_transit`. The status then changes to `paid` + if the transaction goes through, or to `failed` or `canceled` (within + 5 business days). Some failed payouts may initially show as `paid` but + then change to `failed`.' maxLength: 5000 type: string + type: + description: Can be `bank_account` or `card`. + enum: + - bank_account + - card + type: string + x-stripeBypassValidation: true required: + - amount + - arrival_date + - automatic - created + - currency - id - livemode + - method - object - - payment_method - - payment_method_details - - setup_intent + - source_type - status - - usage - title: PaymentFlowsSetupIntentSetupAttempt - type: object - x-expandableFields: - - application - - customer - - on_behalf_of - - payment_method - - payment_method_details - - setup_error - - setup_intent - x-resourceId: setup_attempt - setup_attempt_payment_method_details: - description: '' - properties: - acss_debit: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" - au_becs_debit: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" - bacs_debit: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" - bancontact: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" - boleto: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" - card: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" - card_present: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" - ideal: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" - sepa_debit: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" - sofort: - "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" - type: - description: The type of the payment method used in the SetupIntent (e.g., - `card`). An additional hash is included on `payment_method_details` with - a name matching this value. It contains confirmation-specific information - for the payment method. - maxLength: 5000 - type: string - required: - type - title: SetupAttemptPaymentMethodDetails + title: Payout type: object x-expandableFields: - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - card_present - - ideal - - sepa_debit - - sofort - setup_attempt_payment_method_details_acss_debit: - description: '' - properties: {} - title: setup_attempt_payment_method_details_acss_debit - type: object - x-expandableFields: [] - setup_attempt_payment_method_details_au_becs_debit: - description: '' - properties: {} - title: setup_attempt_payment_method_details_au_becs_debit - type: object - x-expandableFields: [] - setup_attempt_payment_method_details_bacs_debit: + - balance_transaction + - destination + - failure_balance_transaction + - original_payout + - reversed_by + x-resourceId: payout + period: description: '' - properties: {} - title: setup_attempt_payment_method_details_bacs_debit + properties: + end: + description: The end date of this usage period. All usage up to and including + this point in time is included. + format: unix-time + nullable: true + type: integer + start: + description: The start date of this usage period. All usage after this point + in time is included. + format: unix-time + nullable: true + type: integer + title: Period type: object x-expandableFields: [] - setup_attempt_payment_method_details_bancontact: - description: '' + person: + description: |- + This is an object representing a person associated with a Stripe account. + + A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account. + See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform pre-filling and account onboarding steps. + + Related guide: [Handling Identity Verification with the API](https://stripe.com/docs/connect/identity-verification-api#person-information). properties: - bank_code: - description: Bank code of bank associated with the bank account. + account: + description: The account the person is associated with. + maxLength: 5000 + type: string + address: + "$ref": "#/components/schemas/address" + address_kana: + anyOf: + - "$ref": "#/components/schemas/legal_entity_japan_address" + nullable: true + address_kanji: + anyOf: + - "$ref": "#/components/schemas/legal_entity_japan_address" + nullable: true + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + dob: + "$ref": "#/components/schemas/legal_entity_dob" + email: + description: The person's email address. maxLength: 5000 nullable: true type: string - bank_name: - description: Name of the bank associated with the bank account. + first_name: + description: The person's first name. maxLength: 5000 nullable: true type: string - bic: - description: Bank Identifier Code of the bank associated with the bank account. + first_name_kana: + description: The Kana variation of the person's first name (Japan only). maxLength: 5000 nullable: true type: string - generated_sepa_debit: - anyOf: - - maxLength: 5000 + first_name_kanji: + description: The Kanji variation of the person's first name (Japan only). + maxLength: 5000 + nullable: true + type: string + full_name_aliases: + description: A list of alternate names or aliases that the person is known + by. + items: + maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this SetupAttempt. + type: array + future_requirements: + anyOf: + - "$ref": "#/components/schemas/person_future_requirements" nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this SetupAttempt. + gender: + description: The person's gender (International regulations require either + "male" or "female"). nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + id_number_provided: + description: Whether the person's `id_number` was provided. + type: boolean + id_number_secondary_provided: + description: Whether the person's `id_number_secondary` was provided. + type: boolean + last_name: + description: The person's last name. maxLength: 5000 nullable: true type: string - preferred_language: - description: |- - Preferred language of the Bancontact authorization page that the customer is redirected to. - Can be one of `en`, `de`, `fr`, or `nl` - enum: - - de - - en - - fr - - nl + last_name_kana: + description: The Kana variation of the person's last name (Japan only). + maxLength: 5000 nullable: true type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by Bancontact directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. + last_name_kanji: + description: The Kanji variation of the person's last name (Japan only). maxLength: 5000 nullable: true type: string - title: setup_attempt_payment_method_details_bancontact - type: object - x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - setup_attempt_payment_method_details_boleto: - description: '' - properties: {} - title: setup_attempt_payment_method_details_boleto - type: object - x-expandableFields: [] - setup_attempt_payment_method_details_card: - description: '' - properties: - three_d_secure: + maiden_name: + description: The person's maiden name. + maxLength: 5000 + nullable: true + type: string + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + nationality: + description: The country where the person is a national. + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - person + type: string + phone: + description: The person's phone number. + maxLength: 5000 + nullable: true + type: string + political_exposure: + description: Indicates if the person or any of their representatives, family + members, or other closely related persons, declares that they hold or + have held an important public job or function, in any jurisdiction. + enum: + - existing + - none + type: string + registered_address: + "$ref": "#/components/schemas/address" + relationship: + "$ref": "#/components/schemas/person_relationship" + requirements: anyOf: - - "$ref": "#/components/schemas/three_d_secure_details" - description: Populated if this authorization used 3D Secure authentication. + - "$ref": "#/components/schemas/person_requirements" nullable: true - title: setup_attempt_payment_method_details_card + ssn_last_4_provided: + description: Whether the last four digits of the person's Social Security + number have been provided (U.S. only). + type: boolean + verification: + "$ref": "#/components/schemas/legal_entity_person_verification" + required: + - account + - created + - id + - object + title: Person type: object x-expandableFields: - - three_d_secure - setup_attempt_payment_method_details_card_present: + - address + - address_kana + - address_kanji + - dob + - future_requirements + - registered_address + - relationship + - requirements + - verification + x-resourceId: person + person_future_requirements: description: '' properties: - generated_card: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the Card PaymentMethod which was generated by this - SetupAttempt. + alternatives: + description: Fields that are due and can be satisfied by providing the corresponding + alternative fields instead. + items: + "$ref": "#/components/schemas/account_requirements_alternative" nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - title: setup_attempt_payment_method_details_card_present + type: array + currently_due: + description: Fields that need to be collected to keep the person's account + enabled. If not collected by the account's `future_requirements[current_deadline]`, + these fields will transition to the main `requirements` hash, and may + immediately become `past_due`, but the account may also be given a grace + period depending on the account's enablement state prior to transition. + items: + maxLength: 5000 + type: string + type: array + errors: + description: Fields that are `currently_due` and need to be collected again + because validation or verification failed. + items: + "$ref": "#/components/schemas/account_requirements_error" + type: array + eventually_due: + description: Fields that need to be collected assuming all volume thresholds + are reached. As they become required, they appear in `currently_due` as + well, and the account's `future_requirements[current_deadline]` becomes + set. + items: + maxLength: 5000 + type: string + type: array + past_due: + description: Fields that weren't collected by the account's `requirements.current_deadline`. + These fields need to be collected to enable the person's account. New + fields will never appear here; `future_requirements.past_due` will always + be a subset of `requirements.past_due`. + items: + maxLength: 5000 + type: string + type: array + pending_verification: + description: Fields that may become required depending on the results of + verification or review. Will be an empty array unless an asynchronous + verification is pending. If verification fails, these fields move to `eventually_due` + or `currently_due`. + items: + maxLength: 5000 + type: string + type: array + required: + - currently_due + - errors + - eventually_due + - past_due + - pending_verification + title: PersonFutureRequirements type: object x-expandableFields: - - generated_card - setup_attempt_payment_method_details_ideal: + - alternatives + - errors + person_relationship: description: '' properties: - bank: - description: The customer's bank. Can be one of `abn_amro`, `asn_bank`, - `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, - `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. - enum: - - abn_amro - - asn_bank - - bunq - - handelsbanken - - ing - - knab - - moneyou - - rabobank - - regiobank - - revolut - - sns_bank - - triodos_bank - - van_lanschot + director: + description: Whether the person is a director of the account's legal entity. + Directors are typically members of the governing board of the company, + or responsible for ensuring the company meets its regulatory obligations. nullable: true - type: string - bic: - description: The Bank Identifier Code of the customer's bank. - enum: - - ABNANL2A - - ASNBNL21 - - BUNQNL2A - - FVLBNL22 - - HANDNL2A - - INGBNL2A - - KNABNL2H - - MOYONL21 - - RABONL2U - - RBRBNL21 - - REVOLT21 - - SNSBNL2A - - TRIONL2U + type: boolean + executive: + description: Whether the person has significant responsibility to control, + manage, or direct the organization. nullable: true - type: string - generated_sepa_debit: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this SetupAttempt. + type: boolean + owner: + description: Whether the person is an owner of the account’s legal entity. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this SetupAttempt. + type: boolean + percent_ownership: + description: The percent owned by the person of the account's legal entity. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. - maxLength: 5000 + type: number + representative: + description: Whether the person is authorized as the primary representative + of the account. This is the person nominated by the business to provide + information about themselves, and general information about the account. + There can only be one representative at any given time. At the time the + account is created, this person should be set to the person responsible + for opening the account. nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by iDEAL directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. + type: boolean + title: + description: The person's title (e.g., CEO, Support Engineer). maxLength: 5000 nullable: true type: string - title: setup_attempt_payment_method_details_ideal - type: object - x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - setup_attempt_payment_method_details_sepa_debit: - description: '' - properties: {} - title: setup_attempt_payment_method_details_sepa_debit + title: PersonRelationship type: object x-expandableFields: [] - setup_attempt_payment_method_details_sofort: + person_requirements: description: '' properties: - bank_code: - description: Bank code of bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bank_name: - description: Name of the bank associated with the bank account. - maxLength: 5000 - nullable: true - type: string - bic: - description: Bank Identifier Code of the bank associated with the bank account. - maxLength: 5000 + alternatives: + description: Fields that are due and can be satisfied by providing the corresponding + alternative fields instead. + items: + "$ref": "#/components/schemas/account_requirements_alternative" nullable: true - type: string - generated_sepa_debit: - anyOf: - - maxLength: 5000 + type: array + currently_due: + description: Fields that need to be collected to keep the person's account + enabled. If not collected by the account's `current_deadline`, these fields + appear in `past_due` as well, and the account is disabled. + items: + maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_method" - description: The ID of the SEPA Direct Debit PaymentMethod which was generated - by this SetupAttempt. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - generated_sepa_debit_mandate: - anyOf: - - maxLength: 5000 + type: array + errors: + description: Fields that are `currently_due` and need to be collected again + because validation or verification failed. + items: + "$ref": "#/components/schemas/account_requirements_error" + type: array + eventually_due: + description: Fields that need to be collected assuming all volume thresholds + are reached. As they become required, they appear in `currently_due` as + well, and the account's `current_deadline` becomes set. + items: + maxLength: 5000 type: string - - "$ref": "#/components/schemas/mandate" - description: The mandate for the SEPA Direct Debit PaymentMethod which was - generated by this SetupAttempt. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" - iban_last4: - description: Last four characters of the IBAN. - maxLength: 5000 - nullable: true - type: string - preferred_language: - description: |- - Preferred language of the Sofort authorization page that the customer is redirected to. - Can be one of `en`, `de`, `fr`, or `nl` - enum: - - de - - en - - fr - - nl - nullable: true - type: string - verified_name: - description: |- - Owner's verified full name. Values are verified or provided by Sofort directly - (if supported) at the time of authorization or settlement. They cannot be set or mutated. - maxLength: 5000 - nullable: true - type: string - title: setup_attempt_payment_method_details_sofort + type: array + past_due: + description: Fields that weren't collected by the account's `current_deadline`. + These fields need to be collected to enable the person's account. + items: + maxLength: 5000 + type: string + type: array + pending_verification: + description: Fields that may become required depending on the results of + verification or review. Will be an empty array unless an asynchronous + verification is pending. If verification fails, these fields move to `eventually_due`, + `currently_due`, or `past_due`. + items: + maxLength: 5000 + type: string + type: array + required: + - currently_due + - errors + - eventually_due + - past_due + - pending_verification + title: PersonRequirements type: object x-expandableFields: - - generated_sepa_debit - - generated_sepa_debit_mandate - setup_intent: + - alternatives + - errors + plan: description: |- - A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. - For example, you could use a SetupIntent to set up and save your customer's card without immediately collecting a payment. - Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. - - Create a SetupIntent as soon as you're ready to collect your customer's payment credentials. - Do not maintain long-lived, unconfirmed SetupIntents as they may no longer be valid. - The SetupIntent then transitions through multiple [statuses](https://stripe.com/docs/payments/intents#intent-statuses) as it guides - you through the setup process. + You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. - 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. + Plans define the base price, currency, and billing cycle for recurring purchases of products. + [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and plans help you track pricing. Different physical goods or levels of service should be represented by products, and pricing options should be represented by plans. This approach lets you change prices without having to change your provisioning scheme. - By using SetupIntents, you ensure that your customers experience the minimum set of required friction, - even as regulations change over time. + For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. - Related guide: [Setup Intents API](https://stripe.com/docs/payments/setup-intents). + Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). properties: - application: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/application" - description: ID of the Connect application that created the SetupIntent. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/application" - cancellation_reason: - description: Reason for cancellation of this SetupIntent, one of `abandoned`, - `requested_by_customer`, or `duplicate`. + active: + description: Whether the plan can be used for new purchases. + type: boolean + aggregate_usage: + description: Specifies a usage aggregation strategy for plans of `usage_type=metered`. + Allowed values are `sum` for summing up all usage during a period, `last_during_period` + for using the last usage record reported within a period, `last_ever` + for using the last usage record ever (across period bounds) or `max` which + uses the usage record with the maximum reported usage during a period. + Defaults to `sum`. enum: - - abandoned - - duplicate - - requested_by_customer + - last_during_period + - last_ever + - max + - sum nullable: true type: string - client_secret: - description: |- - The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. - - The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. - maxLength: 5000 + amount: + description: The unit amount in %s to be charged, represented as a whole + integer if possible. Only set if `billing_scheme=per_unit`. + nullable: true + type: integer + amount_decimal: + description: The unit amount in %s to be charged, represented as a decimal + string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + format: decimal nullable: true type: string + billing_scheme: + description: Describes how to compute the price per period. Either `per_unit` + or `tiered`. `per_unit` indicates that the fixed amount (specified in + `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), + or per unit of total usage (for plans with `usage_type=metered`). `tiered` + indicates that the unit pricing will be computed using a tiering strategy + as defined using the `tiers` and `tiers_mode` attributes. + enum: + - per_unit + - tiered + type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: |- - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - nullable: true + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string id: description: Unique identifier for the object. maxLength: 5000 type: string - last_setup_error: - anyOf: - - "$ref": "#/components/schemas/api_errors" - description: The error encountered in the previous SetupIntent confirmation. - nullable: true - latest_attempt: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/setup_attempt" - description: The most recent SetupAttempt for this SetupIntent. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/setup_attempt" + interval: + description: The frequency at which a subscription is billed. One of `day`, + `week`, `month` or `year`. + enum: + - day + - month + - week + - year + type: string + interval_count: + description: The number of intervals (specified in the `interval` attribute) + between subscription billings. For example, `interval=month` and `interval_count=3` + bills every 3 months. + type: integer livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean - mandate: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/mandate" - description: ID of the multi use Mandate generated by the SetupIntent. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" metadata: additionalProperties: maxLength: 500 @@ -21305,374 +22668,443 @@ components: information about the object in a structured format. nullable: true type: object - next_action: - anyOf: - - "$ref": "#/components/schemas/setup_intent_next_action" - description: If present, this property tells you what actions you need to - take in order for your customer to continue payment setup. + nickname: + description: A brief description of the plan, hidden from customers. + maxLength: 5000 nullable: true + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - setup_intent + - plan type: string - on_behalf_of: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: The account (if any) for which the setup is intended. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - payment_method: + product: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the payment method used with this SetupIntent. + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" + description: The product whose pricing this plan determines. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/payment_method" - payment_method_options: - anyOf: - - "$ref": "#/components/schemas/setup_intent_payment_method_options" - description: Payment-method-specific configuration for this SetupIntent. - nullable: true - payment_method_types: - description: The list of payment method types (e.g. card) that this SetupIntent - is allowed to set up. + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" + tiers: + description: Each element represents a pricing tier. This parameter requires + `billing_scheme` to be set to `tiered`. See also the documentation for + `billing_scheme`. items: - maxLength: 5000 - type: string + "$ref": "#/components/schemas/plan_tier" type: array - single_use_mandate: + tiers_mode: + description: Defines if the tiering price should be `graduated` or `volume` + based. In `volume`-based tiering, the maximum quantity within a period + determines the per unit price. In `graduated` tiering, pricing can change + as the quantity grows. + enum: + - graduated + - volume + nullable: true + type: string + transform_usage: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/mandate" - description: ID of the single_use Mandate generated by the SetupIntent. + - "$ref": "#/components/schemas/transform_usage" + description: Apply a transformation to the reported usage or set quantity + before computing the amount billed. Cannot be combined with `tiers`. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/mandate" - status: - description: "[Status](https://stripe.com/docs/payments/intents#intent-statuses) - of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, - `requires_action`, `processing`, `canceled`, or `succeeded`." + trial_period_days: + description: Default number of trial days when subscribing a customer to + this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + nullable: true + type: integer + usage_type: + description: Configures how the quantity per period should be determined. + Can be either `metered` or `licensed`. `licensed` automatically bills + the `quantity` set when adding it to a subscription. `metered` aggregates + the total usage based on usage records. Defaults to `licensed`. enum: - - canceled - - processing - - requires_action - - requires_confirmation - - requires_payment_method - - succeeded - type: string - usage: - description: |- - Indicates how the payment method is intended to be used in the future. - - Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. - maxLength: 5000 + - licensed + - metered type: string required: + - active + - billing_scheme - created + - currency - id + - interval + - interval_count - livemode - object - - payment_method_types - - status - - usage - title: SetupIntent + - usage_type + title: Plan type: object x-expandableFields: - - application - - customer - - last_setup_error - - latest_attempt - - mandate - - next_action - - on_behalf_of - - payment_method - - payment_method_options - - single_use_mandate - x-resourceId: setup_intent - setup_intent_next_action: + - product + - tiers + - transform_usage + x-resourceId: plan + plan_tier: description: '' properties: - redirect_to_url: - "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + flat_amount: + description: Price for the entire tier. + nullable: true + type: integer + flat_amount_decimal: + description: Same as `flat_amount`, but contains a decimal value with at + most 12 decimal places. + format: decimal + nullable: true + type: string + unit_amount: + description: Per unit price for units relevant to the tier. + nullable: true + type: integer + unit_amount_decimal: + description: Same as `unit_amount`, but contains a decimal value with at + most 12 decimal places. + format: decimal + nullable: true + type: string + up_to: + description: Up to and including to this quantity will be contained in the + tier. + nullable: true + type: integer + title: PlanTier + type: object + x-expandableFields: [] + platform_tax_fee: + description: '' + properties: + account: + description: The Connected account that incurred this charge. + maxLength: 5000 + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - platform_tax_fee + type: string + source_transaction: + description: The payment object that caused this tax to be inflicted. + maxLength: 5000 + type: string type: - description: Type of the next action to perform, one of `redirect_to_url`, - `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or - `verify_with_microdeposits`. + description: The type of tax (VAT). maxLength: 5000 type: string - use_stripe_sdk: - description: When confirming a SetupIntent with Stripe.js, Stripe.js depends - on the contents of this dictionary to invoke authentication flows. The - shape of the contents is subject to change and is only intended to be - used by Stripe.js. - type: object - verify_with_microdeposits: - "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" required: + - account + - id + - object + - source_transaction - type - title: SetupIntentNextAction + title: PlatformTax type: object - x-expandableFields: - - redirect_to_url - - verify_with_microdeposits - setup_intent_next_action_redirect_to_url: + x-expandableFields: [] + portal_business_profile: description: '' properties: - return_url: - description: If the customer does not exit their browser while authenticating, - they will be redirected to this specified URL after completion. + headline: + description: The messaging shown to customers in the portal. maxLength: 5000 nullable: true type: string - url: - description: The URL you must redirect your customer to in order to authenticate. + privacy_policy_url: + description: A link to the business’s publicly available privacy policy. maxLength: 5000 nullable: true type: string - title: SetupIntentNextActionRedirectToUrl + terms_of_service_url: + description: A link to the business’s publicly available terms of service. + maxLength: 5000 + nullable: true + type: string + title: PortalBusinessProfile type: object x-expandableFields: [] - setup_intent_next_action_verify_with_microdeposits: + portal_customer_update: description: '' properties: - arrival_date: - description: The timestamp when the microdeposits are expected to land. - format: unix-time - type: integer - hosted_verification_url: - description: The URL for the hosted verification page, which allows customers - to verify their bank account. - maxLength: 5000 - type: string + allowed_updates: + description: The types of customer updates that are supported. When empty, + customers are not updateable. + items: + enum: + - address + - email + - phone + - shipping + - tax_id + type: string + type: array + enabled: + description: Whether the feature is enabled. + type: boolean required: - - arrival_date - - hosted_verification_url - title: SetupIntentNextActionVerifyWithMicrodeposits + - allowed_updates + - enabled + title: PortalCustomerUpdate type: object x-expandableFields: [] - setup_intent_payment_method_options: + portal_features: description: '' properties: - acss_debit: - "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" - card: - "$ref": "#/components/schemas/setup_intent_payment_method_options_card" - sepa_debit: - "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" - title: SetupIntentPaymentMethodOptions + customer_update: + "$ref": "#/components/schemas/portal_customer_update" + invoice_history: + "$ref": "#/components/schemas/portal_invoice_list" + payment_method_update: + "$ref": "#/components/schemas/portal_payment_method_update" + subscription_cancel: + "$ref": "#/components/schemas/portal_subscription_cancel" + subscription_pause: + "$ref": "#/components/schemas/portal_subscription_pause" + subscription_update: + "$ref": "#/components/schemas/portal_subscription_update" + required: + - customer_update + - invoice_history + - payment_method_update + - subscription_cancel + - subscription_pause + - subscription_update + title: PortalFeatures type: object x-expandableFields: - - acss_debit - - card - - sepa_debit - setup_intent_payment_method_options_acss_debit: + - customer_update + - invoice_history + - payment_method_update + - subscription_cancel + - subscription_pause + - subscription_update + portal_invoice_list: description: '' properties: - currency: - description: Currency supported by the bank account - enum: - - cad - - usd - nullable: true - type: string - mandate_options: - "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" - verification_method: - description: Bank account verification method. - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: setup_intent_payment_method_options_acss_debit + enabled: + description: Whether the feature is enabled. + type: boolean + required: + - enabled + title: PortalInvoiceList type: object - x-expandableFields: - - mandate_options - setup_intent_payment_method_options_card: + x-expandableFields: [] + portal_login_page: description: '' properties: - request_three_d_secure: - description: 'We strongly recommend that you rely on our SCA Engine to automatically - prompt your customers for authentication based on risk level and [other - requirements](https://stripe.com/docs/strong-customer-authentication). - However, if you wish to request 3D Secure based on logic from your own - fraud engine, provide this option. Permitted values include: `automatic` - or `any`. If not provided, defaults to `automatic`. Read our guide on - [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) - for more information on how this configuration interacts with Radar and - our SCA Engine.' - enum: - - any - - automatic - - challenge_only + enabled: + description: |- + If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + + If `false`, the previously generated `url`, if any, will be deactivated. + type: boolean + url: + description: A shareable URL to the hosted portal login page. Your customers + will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) + and receive a link to their customer portal. + maxLength: 5000 nullable: true type: string - title: setup_intent_payment_method_options_card + required: + - enabled + title: PortalLoginPage type: object x-expandableFields: [] - setup_intent_payment_method_options_mandate_options_acss_debit: + portal_payment_method_update: description: '' properties: - custom_mandate_url: - description: A URL for custom mandate text - maxLength: 5000 - type: string - default_for: - description: List of Stripe products where this mandate can be selected - automatically. - items: - enum: - - invoice - - subscription - type: string - type: array - interval_description: - description: Description of the interval. Only required if the 'payment_schedule' - parameter is 'interval' or 'combined'. - maxLength: 5000 - nullable: true - type: string - payment_schedule: - description: Payment schedule for the mandate. + enabled: + description: Whether the feature is enabled. + type: boolean + required: + - enabled + title: PortalPaymentMethodUpdate + type: object + x-expandableFields: [] + portal_subscription_cancel: + description: '' + properties: + cancellation_reason: + "$ref": "#/components/schemas/portal_subscription_cancellation_reason" + enabled: + description: Whether the feature is enabled. + type: boolean + mode: + description: Whether to cancel subscriptions immediately or at the end of + the billing period. enum: - - combined - - interval - - sporadic - nullable: true + - at_period_end + - immediately type: string - transaction_type: - description: Transaction type of the mandate. + proration_behavior: + description: Whether to create prorations when canceling subscriptions. + Possible values are `none` and `create_prorations`. enum: - - business - - personal - nullable: true + - always_invoice + - create_prorations + - none type: string - title: setup_intent_payment_method_options_mandate_options_acss_debit + required: + - cancellation_reason + - enabled + - mode + - proration_behavior + title: PortalSubscriptionCancel type: object - x-expandableFields: [] - setup_intent_payment_method_options_mandate_options_sepa_debit: + x-expandableFields: + - cancellation_reason + portal_subscription_cancellation_reason: description: '' - properties: {} - title: setup_intent_payment_method_options_mandate_options_sepa_debit + properties: + enabled: + description: Whether the feature is enabled. + type: boolean + options: + description: Which cancellation reasons will be given as options to the + customer. + items: + enum: + - customer_service + - low_quality + - missing_features + - other + - switched_service + - too_complex + - too_expensive + - unused + type: string + type: array + required: + - enabled + - options + title: PortalSubscriptionCancellationReason type: object x-expandableFields: [] - setup_intent_payment_method_options_sepa_debit: + portal_subscription_pause: description: '' properties: - mandate_options: - "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" - title: setup_intent_payment_method_options_sepa_debit + enabled: + description: Whether the feature is enabled. + type: boolean + required: + - enabled + title: PortalSubscriptionPause type: object - x-expandableFields: - - mandate_options - shipping: + x-expandableFields: [] + portal_subscription_update: description: '' properties: - address: - "$ref": "#/components/schemas/address" - carrier: - description: The delivery service that shipped a physical product, such - as Fedex, UPS, USPS, etc. - maxLength: 5000 - nullable: true - type: string - name: - description: Recipient name. - maxLength: 5000 - nullable: true - type: string - phone: - description: Recipient phone (including extension). - maxLength: 5000 - nullable: true - type: string - tracking_number: - description: The tracking number for a physical product, obtained from the - delivery service. If multiple tracking numbers were generated for this - purchase, please separate them with commas. - maxLength: 5000 + default_allowed_updates: + description: The types of subscription updates that are supported for items + listed in the `products` attribute. When empty, subscriptions are not + updateable. + items: + enum: + - price + - promotion_code + - quantity + type: string + type: array + enabled: + description: Whether the feature is enabled. + type: boolean + products: + description: The list of products that support subscription updates. + items: + "$ref": "#/components/schemas/portal_subscription_update_product" nullable: true + type: array + proration_behavior: + description: Determines how to handle prorations resulting from subscription + updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + enum: + - always_invoice + - create_prorations + - none type: string - title: Shipping + required: + - default_allowed_updates + - enabled + - proration_behavior + title: PortalSubscriptionUpdate type: object x-expandableFields: - - address - shipping_method: + - products + portal_subscription_update_product: description: '' properties: - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount for the line item. - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - delivery_estimate: - anyOf: - - "$ref": "#/components/schemas/delivery_estimate" - description: The estimated delivery date for the given shipping method. - Can be either a specific date or a range. - nullable: true - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - type: string - id: - description: Unique identifier for the object. + prices: + description: The list of price IDs which, when subscribed to, a subscription + can be updated. + items: + maxLength: 5000 + type: string + type: array + product: + description: The product ID. maxLength: 5000 type: string required: - - amount - - currency - - description - - id - title: ShippingMethod + - prices + - product + title: PortalSubscriptionUpdateProduct type: object - x-expandableFields: - - delivery_estimate - shipping_rate: + x-expandableFields: [] + price: description: |- - Shipping rates describe the price of shipping presented to your customers and can be - applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) to collect shipping costs. + Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. + [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. + + For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. + + Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). properties: active: - description: Whether the shipping rate can be used for new purchases. Defaults - to `true`. + description: Whether the price can be used for new purchases. type: boolean + billing_scheme: + description: Describes how to compute the price per period. Either `per_unit` + or `tiered`. `per_unit` indicates that the fixed amount (specified in + `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` + (for prices with `usage_type=licensed`), or per unit of total usage (for + prices with `usage_type=metered`). `tiered` indicates that the unit pricing + will be computed using a tiering strategy as defined using the `tiers` + and `tiers_mode` attributes. + enum: + - per_unit + - tiered + type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - delivery_estimate: + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + currency_options: + additionalProperties: + "$ref": "#/components/schemas/currency_option" + description: Prices defined in each available currency option. Each key + must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object + custom_unit_amount: anyOf: - - "$ref": "#/components/schemas/shipping_rate_delivery_estimate" - description: The estimated range for how long shipping will take, meant - to be displayable to the customer. This will appear on CheckoutSessions. + - "$ref": "#/components/schemas/custom_unit_amount" + description: When set, provides configuration for the amount to be adjusted + by the customer during Checkout Sessions and Payment Links. nullable: true - display_name: - description: The name of the shipping rate, meant to be displayable to the - customer. This will appear on CheckoutSessions. - maxLength: 5000 - nullable: true - type: string - fixed_amount: - "$ref": "#/components/schemas/shipping_rate_fixed_amount" id: description: Unique identifier for the object. maxLength: 5000 @@ -21681,6 +23113,12 @@ components: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + lookup_key: + description: A lookup key used to retrieve prices dynamically from a static + string. This may be up to 200 characters. + maxLength: 5000 + nullable: true + type: string metadata: additionalProperties: maxLength: 500 @@ -21689,166 +23127,185 @@ components: that you can attach to an object. This can be useful for storing additional information about the object in a structured format. type: object + nickname: + description: A brief description of the price, hidden from customers. + maxLength: 5000 + nullable: true + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - shipping_rate + - price type: string + product: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" + description: The ID of the product this price is associated with. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/deleted_product" + recurring: + anyOf: + - "$ref": "#/components/schemas/recurring" + description: The recurring components of a price such as `interval` and + `usage_type`. + nullable: true tax_behavior: - description: Specifies whether the rate is considered inclusive of taxes + description: Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + Once specified as either `inclusive` or `exclusive`, it cannot be changed. enum: - exclusive - inclusive - unspecified nullable: true type: string - tax_code: + tiers: + description: Each element represents a pricing tier. This parameter requires + `billing_scheme` to be set to `tiered`. See also the documentation for + `billing_scheme`. + items: + "$ref": "#/components/schemas/price_tier" + type: array + tiers_mode: + description: Defines if the tiering price should be `graduated` or `volume` + based. In `volume`-based tiering, the maximum quantity within a period + determines the per unit price. In `graduated` tiering, pricing can change + as the quantity grows. + enum: + - graduated + - volume + nullable: true + type: string + transform_quantity: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/tax_code" - description: A [tax code](https://stripe.com/docs/tax/tax-codes) ID. The - Shipping tax code is `txcd_92010001`. + - "$ref": "#/components/schemas/transform_quantity" + description: Apply a transformation to the reported usage or set quantity + before computing the amount billed. Cannot be combined with `tiers`. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/tax_code" type: - description: The type of calculation to use on the shipping rate. Can only - be `fixed_amount` for now. + description: One of `one_time` or `recurring` depending on whether the price + is for a one-time purchase or a recurring (subscription) purchase. enum: - - fixed_amount + - one_time + - recurring + type: string + unit_amount: + description: The unit amount in %s to be charged, represented as a whole + integer if possible. Only set if `billing_scheme=per_unit`. + nullable: true + type: integer + unit_amount_decimal: + description: The unit amount in %s to be charged, represented as a decimal + string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + format: decimal + nullable: true type: string required: - active + - billing_scheme - created + - currency - id - livemode - metadata - object + - product - type - title: ShippingRate + title: Price type: object x-expandableFields: - - delivery_estimate - - fixed_amount - - tax_code - x-resourceId: shipping_rate - shipping_rate_delivery_estimate: + - currency_options + - custom_unit_amount + - product + - recurring + - tiers + - transform_quantity + x-resourceId: price + price_tier: description: '' properties: - maximum: - anyOf: - - "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" - description: The upper bound of the estimated range. If empty, represents - no upper bound i.e., infinite. + flat_amount: + description: Price for the entire tier. nullable: true - minimum: - anyOf: - - "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" - description: The lower bound of the estimated range. If empty, represents - no lower bound. + type: integer + flat_amount_decimal: + description: Same as `flat_amount`, but contains a decimal value with at + most 12 decimal places. + format: decimal nullable: true - title: ShippingRateDeliveryEstimate - type: object - x-expandableFields: - - maximum - - minimum - shipping_rate_delivery_estimate_bound: - description: '' - properties: - unit: - description: A unit of time. - enum: - - business_day - - day - - hour - - month - - week type: string - value: - description: Must be greater than 0. - type: integer - required: - - unit - - value - title: ShippingRateDeliveryEstimateBound - type: object - x-expandableFields: [] - shipping_rate_fixed_amount: - description: '' - properties: - amount: - description: A non-negative integer in cents representing how much to charge. + unit_amount: + description: Per unit price for units relevant to the tier. + nullable: true type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - required: - - amount - - currency - title: ShippingRateFixedAmount - type: object - x-expandableFields: [] - sigma_scheduled_query_run_error: - description: '' - properties: - message: - description: Information about the run failure. - maxLength: 5000 + unit_amount_decimal: + description: Same as `unit_amount`, but contains a decimal value with at + most 12 decimal places. + format: decimal + nullable: true type: string - required: - - message - title: SigmaScheduledQueryRunError + up_to: + description: Up to and including to this quantity will be contained in the + tier. + nullable: true + type: integer + title: PriceTier type: object x-expandableFields: [] - sku: + product: description: |- - Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). - SKUs describe specific product variations, taking into account any combination of: attributes, - currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents - the `size: large`, `color: red` version of that shirt. - - Can also be used to manage inventory. + Products describe the specific goods or services you offer to your customers. + For example, you might offer a Standard and Premium version of your goods or service; each version would be a separate Product. + They can be used in conjunction with [Prices](https://stripe.com/docs/api#prices) to configure pricing in Payment Links, Checkout, and Subscriptions. - Related guide: [Tax, Shipping, and Inventory](https://stripe.com/docs/orders). + Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), + [share a Payment Link](https://stripe.com/docs/payments/payment-links/overview), + [accept payments with Checkout](https://stripe.com/docs/payments/accept-a-payment#create-product-prices-upfront), + and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) properties: active: - description: Whether the SKU is available for purchase. + description: Whether the product is currently available for purchase. type: boolean - attributes: - additionalProperties: - maxLength: 5000 - type: string - description: 'A dictionary of attributes and values for the attributes defined - by the product. If, for example, a product''s attributes are `["size", - "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": - "Medium", "gender": "Unisex"}`.' - type: object created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + default_price: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/price" + description: The ID of the [Price](https://stripe.com/docs/api/prices) object + that is the default price for this product. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/price" + description: + description: The product's description, meant to be displayable to the customer. + Use this field to optionally store a long form explanation of the product + being sold for your own rendering purposes. + maxLength: 5000 + nullable: true type: string id: description: Unique identifier for the object. maxLength: 5000 type: string - image: - description: The URL of an image for this SKU, meant to be displayable to - the customer. - maxLength: 2048 - nullable: true - type: string - inventory: - "$ref": "#/components/schemas/sku_inventory" + images: + description: A list of up to 8 URLs of images for this product, meant to + be displayable to the customer. + items: + maxLength: 5000 + type: string + type: array livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. @@ -21861,159 +23318,126 @@ components: that you can attach to an object. This can be useful for storing additional information about the object in a structured format. type: object + name: + description: The product's name, meant to be displayable to the customer. + maxLength: 5000 + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - sku + - product type: string package_dimensions: anyOf: - "$ref": "#/components/schemas/package_dimensions" - description: The dimensions of this SKU for shipping purposes. + description: The dimensions of this product for shipping purposes. nullable: true - price: - description: The cost of the item as a positive integer in the smallest - currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, - Japanese Yen being a zero-decimal currency). - type: integer - product: + shippable: + description: Whether this product is shipped (i.e., physical goods). + nullable: true + type: boolean + statement_descriptor: + description: Extra information about a product which will appear on your + customer's credit card statement. In the case that multiple products are + billed at once, the first statement descriptor will be used. + maxLength: 5000 + nullable: true + type: string + tax_code: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/product" - description: The ID of the product this SKU is associated with. The product - must be currently active. + - "$ref": "#/components/schemas/tax_code" + description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/product" + - "$ref": "#/components/schemas/tax_code" + unit_label: + description: A label that represents units of this product in Stripe and + on customers’ receipts and invoices. When set, this will be included in + associated invoice line item descriptions. + maxLength: 5000 + nullable: true + type: string updated: description: Time at which the object was last updated. Measured in seconds since the Unix epoch. format: unix-time type: integer + url: + description: A URL of a publicly-accessible webpage for this product. + maxLength: 2048 + nullable: true + type: string required: - active - - attributes - created - - currency - id - - inventory + - images - livemode - metadata + - name - object - - price - - product - updated - title: Sku + title: Product type: object x-expandableFields: - - inventory + - default_price - package_dimensions - - product - x-resourceId: sku - sku_inventory: - description: '' - properties: - quantity: - description: The count of inventory available. Will be present if and only - if `type` is `finite`. - nullable: true - type: integer - type: - description: Inventory type. Possible values are `finite`, `bucket` (not - quantified), and `infinite`. - maxLength: 5000 - type: string - value: - description: An indicator of the inventory available. Possible values are - `in_stock`, `limited`, and `out_of_stock`. Will be present if and only - if `type` is `bucket`. - maxLength: 5000 - nullable: true - type: string - required: - - type - title: SKUInventory - type: object - x-expandableFields: [] - source: + - tax_code + x-resourceId: product + promotion_code: description: |- - `Source` objects allow you to accept a variety of payment methods. They - represent a customer's payment instrument, and can be used with the Stripe API - just like a `Card` object: once chargeable, they can be charged, or can be - attached to customers. - - Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + A Promotion Code represents a customer-redeemable code for a [coupon](https://stripe.com/docs/api#coupons). It can be used to + create multiple codes for a single coupon. properties: - ach_credit_transfer: - "$ref": "#/components/schemas/source_type_ach_credit_transfer" - ach_debit: - "$ref": "#/components/schemas/source_type_ach_debit" - acss_debit: - "$ref": "#/components/schemas/source_type_acss_debit" - alipay: - "$ref": "#/components/schemas/source_type_alipay" - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount associated with the source. This is the - amount for which the source will be chargeable once ready. Required for - `single_use` sources. - nullable: true - type: integer - au_becs_debit: - "$ref": "#/components/schemas/source_type_au_becs_debit" - bancontact: - "$ref": "#/components/schemas/source_type_bancontact" - card: - "$ref": "#/components/schemas/source_type_card" - card_present: - "$ref": "#/components/schemas/source_type_card_present" - client_secret: - description: The client secret of the source. Used for client-side retrieval - using a publishable key. + active: + description: Whether the promotion code is currently active. A promotion + code is only active if the coupon is also valid. + type: boolean + code: + description: The customer-facing code. Regardless of case, this code must + be unique across all active promotion codes for each customer. maxLength: 5000 type: string - code_verification: - "$ref": "#/components/schemas/source_code_verification_flow" + coupon: + "$ref": "#/components/schemas/coupon" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - currency: - description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) - associated with the source. This is the currency for which the source - will be chargeable once ready. Required for `single_use` sources. - nullable: true - type: string customer: - description: The ID of the customer to which this source is attached. This - will not be present when the source has not been attached to a customer. + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: The customer that this promotion code can be used by. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + expires_at: + description: Date at which the promotion code can no longer be redeemed. + format: unix-time + nullable: true + type: integer + id: + description: Unique identifier for the object. maxLength: 5000 type: string - eps: - "$ref": "#/components/schemas/source_type_eps" - flow: - description: The authentication `flow` of the source. `flow` is one of `redirect`, - `receiver`, `code_verification`, `none`. - maxLength: 5000 - type: string - giropay: - "$ref": "#/components/schemas/source_type_giropay" - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - ideal: - "$ref": "#/components/schemas/source_type_ideal" - klarna: - "$ref": "#/components/schemas/source_type_klarna" livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + max_redemptions: + description: Maximum number of times this promotion code can be redeemed. + nullable: true + type: integer metadata: additionalProperties: maxLength: 500 @@ -22023,468 +23447,687 @@ components: information about the object in a structured format. nullable: true type: object - multibanco: - "$ref": "#/components/schemas/source_type_multibanco" object: description: String representing the object's type. Objects of the same type share the same value. enum: - - source - type: string - owner: - anyOf: - - "$ref": "#/components/schemas/source_owner" - description: Information about the owner of the payment instrument that - may be used or required by particular source types. - nullable: true - p24: - "$ref": "#/components/schemas/source_type_p24" - receiver: - "$ref": "#/components/schemas/source_receiver_flow" - redirect: - "$ref": "#/components/schemas/source_redirect_flow" - sepa_debit: - "$ref": "#/components/schemas/source_type_sepa_debit" - sofort: - "$ref": "#/components/schemas/source_type_sofort" - source_order: - "$ref": "#/components/schemas/source_order" - statement_descriptor: - description: Extra information about a source. This will appear on your - customer's statement every time you charge the source. - maxLength: 5000 - nullable: true - type: string - status: - description: The status of the source, one of `canceled`, `chargeable`, - `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used - to create a charge. - maxLength: 5000 - type: string - three_d_secure: - "$ref": "#/components/schemas/source_type_three_d_secure" - type: - description: The `type` of the source. The `type` is a payment method, one - of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, - `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, - `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash - is included on the source with a name matching this value. It contains - additional information specific to the [payment method](https://stripe.com/docs/sources) - used. - enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - alipay - - au_becs_debit - - bancontact - - card - - card_present - - eps - - giropay - - ideal - - klarna - - multibanco - - p24 - - sepa_debit - - sofort - - three_d_secure - - wechat - type: string - x-stripeBypassValidation: true - usage: - description: Either `reusable` or `single_use`. Whether this source should - be reusable or not. Some source types may or may not be reusable by construction, - while others may leave the option at creation. If an incompatible value - is passed, an error will be returned. - maxLength: 5000 - nullable: true + - promotion_code type: string - wechat: - "$ref": "#/components/schemas/source_type_wechat" + restrictions: + "$ref": "#/components/schemas/promotion_codes_resource_restrictions" + times_redeemed: + description: Number of times this promotion code has been used. + type: integer required: - - client_secret + - active + - code + - coupon - created - - flow - id - livemode - object - - status - - type - title: Source + - restrictions + - times_redeemed + title: PromotionCode type: object x-expandableFields: - - code_verification - - owner - - receiver - - redirect - - source_order - x-resourceId: source - source_code_verification_flow: + - coupon + - customer + - restrictions + x-resourceId: promotion_code + promotion_code_currency_option: description: '' properties: - attempts_remaining: - description: The number of attempts remaining to authenticate the source - object with a verification code. + minimum_amount: + description: Minimum amount required to redeem this Promotion Code into + a Coupon (e.g., a purchase must be $100 or more to work). type: integer - status: - description: The status of the code verification, either `pending` (awaiting - verification, `attempts_remaining` should be greater than 0), `succeeded` - (successful verification) or `failed` (failed verification, cannot be - verified anymore as `attempts_remaining` should be 0). + required: + - minimum_amount + title: PromotionCodeCurrencyOption + type: object + x-expandableFields: [] + promotion_codes_resource_restrictions: + description: '' + properties: + currency_options: + additionalProperties: + "$ref": "#/components/schemas/promotion_code_currency_option" + description: Promotion code restrictions defined in each available currency + option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object + first_time_transaction: + description: A Boolean indicating if the Promotion Code should only be redeemed + for Customers without any successful payments or invoices + type: boolean + minimum_amount: + description: Minimum amount required to redeem this Promotion Code into + a Coupon (e.g., a purchase must be $100 or more to work). + nullable: true + type: integer + minimum_amount_currency: + description: Three-letter [ISO code](https://stripe.com/docs/currencies) + for minimum_amount maxLength: 5000 + nullable: true type: string required: - - attempts_remaining - - status - title: SourceCodeVerificationFlow + - first_time_transaction + title: PromotionCodesResourceRestrictions type: object - x-expandableFields: [] - source_mandate_notification: + x-expandableFields: + - currency_options + quote: description: |- - Source mandate notifications should be created when a notification related to - a source mandate must be sent to the payer. They will trigger a webhook or - deliver an email to the customer. + A Quote is a way to model prices that you'd like to provide to a customer. + Once accepted, it will automatically create an invoice, subscription or subscription schedule. properties: - acss_debit: - "$ref": "#/components/schemas/source_mandate_notification_acss_debit_data" - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the amount associated with the mandate notification. The - amount is expressed in the currency of the underlying source. Required - if the notification type is `debit_initiated`. + amount_subtotal: + description: Total before any discounts or taxes are applied. + type: integer + amount_total: + description: Total after discounts and taxes are applied. + type: integer + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + description: ID of the Connect Application that created the quote. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + application_fee_amount: + description: The amount of the application fee (if any) that will be requested + to be applied to the payment and transferred to the application owner's + Stripe account. Only applicable if there are no line items with recurring + prices on the quote. nullable: true type: integer - bacs_debit: - "$ref": "#/components/schemas/source_mandate_notification_bacs_debit_data" + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the application owner's Stripe account. + Only applicable if there are line items with recurring prices on the quote. + nullable: true + type: number + automatic_tax: + "$ref": "#/components/schemas/quotes_resource_automatic_tax" + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When charging + automatically, Stripe will attempt to pay invoices at the end of the subscription + cycle or on finalization using the default payment method attached to + the subscription or customer. When sending an invoice, Stripe will email + your customer an invoice with payment instructions. Defaults to `charge_automatically`. + enum: + - charge_automatically + - send_invoice + type: string + computed: + "$ref": "#/components/schemas/quotes_resource_computed" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + maxLength: 5000 + nullable: true + type: string + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: The customer which this quote belongs to. A customer is required + before finalizing the quote. Once specified, it cannot be changed. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + default_tax_rates: + description: The tax rates applied to this quote. + items: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/tax_rate" + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/tax_rate" + type: array + description: + description: A description that will be displayed on the quote PDF. + maxLength: 5000 + nullable: true + type: string + discounts: + description: The discounts applied to this quote. + items: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/discount" + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/discount" + type: array + expires_at: + description: The date on which the quote will be canceled if in `open` or + `draft` status. Measured in seconds since the Unix epoch. + format: unix-time + type: integer + footer: + description: A footer that will be displayed on the quote PDF. + maxLength: 5000 + nullable: true + type: string + from_quote: + anyOf: + - "$ref": "#/components/schemas/quotes_resource_from_quote" + description: Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) + for more details. + nullable: true + header: + description: A header that will be displayed on the quote PDF. + maxLength: 5000 + nullable: true + type: string id: description: Unique identifier for the object. maxLength: 5000 type: string + invoice: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/invoice" + - "$ref": "#/components/schemas/deleted_invoice" + description: The invoice that was created from this quote. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/invoice" + - "$ref": "#/components/schemas/deleted_invoice" + invoice_settings: + anyOf: + - "$ref": "#/components/schemas/invoice_setting_quote_setting" + description: All invoices will be billed using the specified settings. + nullable: true + line_items: + description: A list of items the customer is being quoted for. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/item" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: QuotesResourceListLineItems + type: object + x-expandableFields: + - data livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + number: + description: A unique number that identifies this particular quote. This + number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + maxLength: 5000 + nullable: true + type: string object: description: String representing the object's type. Objects of the same type share the same value. enum: - - source_mandate_notification - type: string - reason: - description: The reason of the mandate notification. Valid reasons are `mandate_confirmed` - or `debit_initiated`. - maxLength: 5000 + - quote type: string - sepa_debit: - "$ref": "#/components/schemas/source_mandate_notification_sepa_debit_data" - source: - "$ref": "#/components/schemas/source" + on_behalf_of: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The account on behalf of which to charge. See the [Connect + documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) + for details. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" status: - description: The status of the mandate notification. Valid statuses are - `pending` or `submitted`. - maxLength: 5000 - type: string - type: - description: The type of source this mandate notification is attached to. - Should be the source type identifier code for the payment method, such - as `three_d_secure`. - maxLength: 5000 + description: The status of the quote. + enum: + - accepted + - canceled + - draft + - open type: string + status_transitions: + "$ref": "#/components/schemas/quotes_resource_status_transitions" + subscription: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/subscription" + description: The subscription that was created or updated from this quote. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/subscription" + subscription_data: + "$ref": "#/components/schemas/quotes_resource_subscription_data" + subscription_schedule: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/subscription_schedule" + description: The subscription schedule that was created or updated from + this quote. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/subscription_schedule" + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this quote belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" + total_details: + "$ref": "#/components/schemas/quotes_resource_total_details" + transfer_data: + anyOf: + - "$ref": "#/components/schemas/quotes_resource_transfer_data" + description: The account (if any) the payments will be attributed to for + tax reporting, and where funds from each payment will be transferred to + for each of the invoices. + nullable: true required: + - amount_subtotal + - amount_total + - automatic_tax + - collection_method + - computed - created + - discounts + - expires_at - id - livemode + - metadata - object - - reason - - source - status - - type - title: SourceMandateNotification + - status_transitions + - subscription_data + - total_details + title: Quote type: object x-expandableFields: - - acss_debit - - bacs_debit - - sepa_debit - - source - x-resourceId: source_mandate_notification - source_mandate_notification_acss_debit_data: + - application + - automatic_tax + - computed + - customer + - default_tax_rates + - discounts + - from_quote + - invoice + - invoice_settings + - line_items + - on_behalf_of + - status_transitions + - subscription + - subscription_data + - subscription_schedule + - test_clock + - total_details + - transfer_data + x-resourceId: quote + quotes_resource_automatic_tax: description: '' properties: - statement_descriptor: - description: The statement descriptor associate with the debit. - maxLength: 5000 + enabled: + description: Automatically calculate taxes + type: boolean + status: + description: The status of the most recent automated tax calculation for + this quote. + enum: + - complete + - failed + - requires_location_inputs + nullable: true type: string - title: SourceMandateNotificationAcssDebitData + required: + - enabled + title: QuotesResourceAutomaticTax type: object x-expandableFields: [] - source_mandate_notification_bacs_debit_data: + quotes_resource_computed: description: '' properties: - last4: - description: Last 4 digits of the account number associated with the debit. - maxLength: 5000 - type: string - title: SourceMandateNotificationBacsDebitData + recurring: + anyOf: + - "$ref": "#/components/schemas/quotes_resource_recurring" + description: The definitive totals and line items the customer will be charged + on a recurring basis. Takes into account the line items with recurring + prices and discounts with `duration=forever` coupons only. Defaults to + `null` if no inputted line items with recurring prices. + nullable: true + upfront: + "$ref": "#/components/schemas/quotes_resource_upfront" + required: + - upfront + title: QuotesResourceComputed type: object - x-expandableFields: [] - source_mandate_notification_sepa_debit_data: + x-expandableFields: + - recurring + - upfront + quotes_resource_from_quote: description: '' properties: - creditor_identifier: - description: SEPA creditor ID. - maxLength: 5000 - type: string - last4: - description: Last 4 digits of the account number associated with the debit. - maxLength: 5000 - type: string - mandate_reference: - description: Mandate reference associated with the debit. - maxLength: 5000 - type: string - title: SourceMandateNotificationSepaDebitData + is_revision: + description: Whether this quote is a revision of a different quote. + type: boolean + quote: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/quote" + description: The quote that was cloned. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/quote" + required: + - is_revision + - quote + title: QuotesResourceFromQuote type: object - x-expandableFields: [] - source_order: + x-expandableFields: + - quote + quotes_resource_recurring: description: '' properties: - amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the total amount for the order. + amount_subtotal: + description: Total before any discounts or taxes are applied. type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - email: - description: The email address of the customer placing the order. - maxLength: 5000 + amount_total: + description: Total after discounts and taxes are applied. + type: integer + interval: + description: The frequency at which a subscription is billed. One of `day`, + `week`, `month` or `year`. + enum: + - day + - month + - week + - year type: string - items: - description: List of items constituting the order. - items: - "$ref": "#/components/schemas/source_order_item" - nullable: true - type: array - shipping: - "$ref": "#/components/schemas/shipping" + interval_count: + description: The number of intervals (specified in the `interval` attribute) + between subscription billings. For example, `interval=month` and `interval_count=3` + bills every 3 months. + type: integer + total_details: + "$ref": "#/components/schemas/quotes_resource_total_details" required: - - amount - - currency - title: SourceOrder + - amount_subtotal + - amount_total + - interval + - interval_count + - total_details + title: QuotesResourceRecurring type: object x-expandableFields: - - items - - shipping - source_order_item: + - total_details + quotes_resource_status_transitions: description: '' properties: - amount: - description: The amount (price) for this order item. + accepted_at: + description: The time that the quote was accepted. Measured in seconds since + Unix epoch. + format: unix-time nullable: true type: integer - currency: - description: This currency of this order item. Required when `amount` is - present. - maxLength: 5000 - nullable: true - type: string - description: - description: Human-readable description for this order item. - maxLength: 5000 - nullable: true - type: string - parent: - description: The ID of the associated object for this line item. Expandable - if not null (e.g., expandable to a SKU). - maxLength: 5000 + canceled_at: + description: The time that the quote was canceled. Measured in seconds since + Unix epoch. + format: unix-time nullable: true - type: string - quantity: - description: The quantity of this order item. When type is `sku`, this is - the number of instances of the SKU to be ordered. type: integer - type: - description: The type of this order item. Must be `sku`, `tax`, or `shipping`. - maxLength: 5000 + finalized_at: + description: The time that the quote was finalized. Measured in seconds + since Unix epoch. + format: unix-time nullable: true - type: string - title: SourceOrderItem + type: integer + title: QuotesResourceStatusTransitions type: object x-expandableFields: [] - source_owner: + quotes_resource_subscription_data: description: '' properties: - address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Owner's address. - nullable: true - email: - description: Owner's email address. - maxLength: 5000 - nullable: true - type: string - name: - description: Owner's full name. - maxLength: 5000 - nullable: true - type: string - phone: - description: Owner's phone number (including extension). - maxLength: 5000 - nullable: true - type: string - verified_address: - anyOf: - - "$ref": "#/components/schemas/address" - description: Verified owner's address. Verified values are verified or provided - by the payment method directly (and if supported) at the time of authorization - or settlement. They cannot be set or mutated. - nullable: true - verified_email: - description: Verified owner's email address. Verified values are verified - or provided by the payment method directly (and if supported) at the time - of authorization or settlement. They cannot be set or mutated. + description: + description: The subscription's description, meant to be displayable to + the customer. Use this field to optionally store an explanation of the + subscription. maxLength: 5000 nullable: true type: string - verified_name: - description: Verified owner's full name. Verified values are verified or - provided by the payment method directly (and if supported) at the time - of authorization or settlement. They cannot be set or mutated. - maxLength: 5000 + effective_date: + description: When creating a new subscription, the date of which the subscription + schedule will start after the quote is accepted. This date is ignored + if it is in the past when the quote is accepted. Measured in seconds since + the Unix epoch. + format: unix-time nullable: true - type: string - verified_phone: - description: Verified owner's phone number (including extension). Verified - values are verified or provided by the payment method directly (and if - supported) at the time of authorization or settlement. They cannot be - set or mutated. - maxLength: 5000 + type: integer + trial_period_days: + description: Integer representing the number of trial period days before + the customer is charged for the first time. nullable: true - type: string - title: SourceOwner + type: integer + title: QuotesResourceSubscriptionData type: object - x-expandableFields: - - address - - verified_address - source_receiver_flow: + x-expandableFields: [] + quotes_resource_total_details: description: '' properties: - address: - description: The address of the receiver source. This is the value that - should be communicated to the customer to send their funds to. - maxLength: 5000 - nullable: true - type: string - amount_charged: - description: The total amount that was moved to your balance. This is almost - always equal to the amount charged. In rare cases when customers deposit - excess funds and we are unable to refund those, those funds get moved - to your balance and show up in amount_charged as well. The amount charged - is expressed in the source's currency. + amount_discount: + description: This is the sum of all the discounts. type: integer - amount_received: - description: The total amount received by the receiver source. `amount_received - = amount_returned + amount_charged` should be true for consumed sources - unless customers deposit excess funds. The amount received is expressed - in the source's currency. + amount_shipping: + description: This is the sum of all the shipping amounts. + nullable: true type: integer - amount_returned: - description: The total amount that was returned to the customer. The amount - returned is expressed in the source's currency. + amount_tax: + description: This is the sum of all the tax amounts. type: integer - refund_attributes_method: - description: Type of refund attribute method, one of `email`, `manual`, - or `none`. - maxLength: 5000 - type: string - refund_attributes_status: - description: Type of refund attribute status, one of `missing`, `requested`, - or `available`. - maxLength: 5000 - type: string + breakdown: + "$ref": "#/components/schemas/quotes_resource_total_details_resource_breakdown" required: - - amount_charged - - amount_received - - amount_returned - - refund_attributes_method - - refund_attributes_status - title: SourceReceiverFlow + - amount_discount + - amount_tax + title: QuotesResourceTotalDetails type: object - x-expandableFields: [] - source_redirect_flow: + x-expandableFields: + - breakdown + quotes_resource_total_details_resource_breakdown: description: '' properties: - failure_reason: - description: The failure reason for the redirect, either `user_abort` (the - customer aborted or dropped out of the redirect flow), `declined` (the - authentication failed or the transaction was declined), or `processing_error` - (the redirect failed due to a technical error). Present only if the redirect - status is `failed`. - maxLength: 5000 - nullable: true - type: string - return_url: - description: The URL you provide to redirect the customer to after they - authenticated their payment. - maxLength: 5000 - type: string - status: - description: The status of the redirect, either `pending` (ready to be used - by your customer to authenticate the transaction), `succeeded` (succesful - authentication, cannot be reused) or `not_required` (redirect should not - be used) or `failed` (failed authentication, cannot be reused). - maxLength: 5000 - type: string - url: - description: The URL provided to you to redirect a customer to as part of - a `redirect` authentication flow. - maxLength: 2048 - type: string + discounts: + description: The aggregated discounts. + items: + "$ref": "#/components/schemas/line_items_discount_amount" + type: array + taxes: + description: The aggregated tax amounts by rate. + items: + "$ref": "#/components/schemas/line_items_tax_amount" + type: array required: - - return_url - - status - - url - title: SourceRedirectFlow + - discounts + - taxes + title: QuotesResourceTotalDetailsResourceBreakdown type: object - x-expandableFields: [] - source_transaction: - description: |- - Some payment methods have no required amount that a customer must send. - Customers can be instructed to send any amount, and it can be made up of - multiple transactions. As such, sources can have multiple associated - transactions. + x-expandableFields: + - discounts + - taxes + quotes_resource_transfer_data: + description: '' properties: - ach_credit_transfer: - "$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data" amount: - description: A positive integer in the smallest currency unit (that is, - 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) - representing the amount your customer has pushed to the receiver. + description: The amount in %s that will be transferred to the destination + account when the invoice is paid. By default, the entire amount is transferred + to the destination. + nullable: true type: integer - chf_credit_transfer: - "$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data" + amount_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the destination account. By default, + the entire amount will be transferred to the destination. + nullable: true + type: number + destination: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The account where funds from the payment will be transferred + to upon payment success. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + required: + - destination + title: QuotesResourceTransferData + type: object + x-expandableFields: + - destination + quotes_resource_upfront: + description: '' + properties: + amount_subtotal: + description: Total before any discounts or taxes are applied. + type: integer + amount_total: + description: Total after discounts and taxes are applied. + type: integer + line_items: + description: The line items that will appear on the next invoice after this + quote is accepted. This does not include pending invoice items that exist + on the customer but may still be included in the next invoice. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/item" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: QuotesResourceListLineItems + type: object + x-expandableFields: + - data + total_details: + "$ref": "#/components/schemas/quotes_resource_total_details" + required: + - amount_subtotal + - amount_total + - total_details + title: QuotesResourceUpfront + type: object + x-expandableFields: + - line_items + - total_details + radar.early_fraud_warning: + description: |- + An early fraud warning indicates that the card issuer has notified us that a + charge may be fraudulent. + + Related guide: [Early Fraud Warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings). + properties: + actionable: + description: An EFW is actionable if it has not received a dispute and has + not been fully refunded. You may wish to proactively refund a charge that + receives an EFW, in order to avoid receiving a dispute later. + type: boolean + charge: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: ID of the charge this early fraud warning is for, optionally + expanded. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + fraud_type: + description: The type of fraud labelled by the issuer. One of `card_never_received`, + `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, + `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. + maxLength: 5000 type: string - gbp_credit_transfer: - "$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data" id: description: Unique identifier for the object. maxLength: 5000 @@ -22497,875 +24140,1587 @@ components: description: String representing the object's type. Objects of the same type share the same value. enum: - - source_transaction - type: string - paper_check: - "$ref": "#/components/schemas/source_transaction_paper_check_data" - sepa_credit_transfer: - "$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data" - source: - description: The ID of the source this transaction is attached to. - maxLength: 5000 - type: string - status: - description: The status of the transaction, one of `succeeded`, `pending`, - or `failed`. - maxLength: 5000 - type: string - type: - description: The type of source this transaction is attached to. - enum: - - ach_credit_transfer - - ach_debit - - alipay - - bancontact - - card - - card_present - - eps - - giropay - - ideal - - klarna - - multibanco - - p24 - - sepa_debit - - sofort - - three_d_secure - - wechat + - radar.early_fraud_warning type: string + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_intent" + description: ID of the Payment Intent this early fraud warning is for, optionally + expanded. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_intent" required: - - amount + - actionable + - charge - created - - currency + - fraud_type - id - livemode - object - - source - - status - - type - title: SourceTransaction + title: RadarEarlyFraudWarning type: object x-expandableFields: - - ach_credit_transfer - - chf_credit_transfer - - gbp_credit_transfer - - paper_check - - sepa_credit_transfer - x-resourceId: source_transaction - source_transaction_ach_credit_transfer_data: - description: '' + - charge + - payment_intent + x-resourceId: radar.early_fraud_warning + radar.value_list: + description: |- + Value lists allow you to group values together which can then be referenced in rules. + + Related guide: [Default Stripe Lists](https://stripe.com/docs/radar/lists#managing-list-items). properties: - customer_data: - description: Customer data associated with the transfer. - maxLength: 5000 - type: string - fingerprint: - description: Bank account fingerprint associated with the transfer. + alias: + description: The name of the value list for use in rules. maxLength: 5000 type: string - last4: - description: Last 4 digits of the account number associated with the transfer. + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + created_by: + description: The name or email address of the user who created this value + list. maxLength: 5000 type: string - routing_number: - description: Routing number associated with the transfer. + id: + description: Unique identifier for the object. maxLength: 5000 type: string - title: SourceTransactionAchCreditTransferData - type: object - x-expandableFields: [] - source_transaction_chf_credit_transfer_data: - description: '' - properties: - reference: - description: Reference associated with the transfer. - maxLength: 5000 - type: string - sender_address_country: - description: Sender's country address. - maxLength: 5000 - type: string - sender_address_line1: - description: Sender's line 1 address. - maxLength: 5000 + item_type: + description: The type of items in the value list. One of `card_fingerprint`, + `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, + or `customer_id`. + enum: + - card_bin + - card_fingerprint + - case_sensitive_string + - country + - customer_id + - email + - ip_address + - string type: string - sender_iban: - description: Sender's bank account IBAN. + list_items: + description: List of items contained within this value list. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/radar.value_list_item" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: RadarListListItemList + type: object + x-expandableFields: + - data + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + name: + description: The name of the value list. maxLength: 5000 type: string - sender_name: - description: Sender's name. - maxLength: 5000 + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - radar.value_list type: string - title: SourceTransactionChfCreditTransferData + required: + - alias + - created + - created_by + - id + - item_type + - list_items + - livemode + - metadata + - name + - object + title: RadarListList type: object - x-expandableFields: [] - source_transaction_gbp_credit_transfer_data: - description: '' + x-expandableFields: + - list_items + x-resourceId: radar.value_list + radar.value_list_item: + description: |- + Value list items allow you to add specific values to a given Radar value list, which can then be used in rules. + + Related guide: [Managing List Items](https://stripe.com/docs/radar/lists#managing-list-items). properties: - fingerprint: - description: Bank account fingerprint associated with the Stripe owned bank - account receiving the transfer. - maxLength: 5000 - type: string - funding_method: - description: 'The credit transfer rails the sender used to push this transfer. - The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. - Currently only Faster Payments is supported.' - maxLength: 5000 - type: string - last4: - description: Last 4 digits of sender account number associated with the - transfer. + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + created_by: + description: The name or email address of the user who added this item to + the value list. maxLength: 5000 type: string - reference: - description: Sender entered arbitrary information about the transfer. + id: + description: Unique identifier for the object. maxLength: 5000 type: string - sender_account_number: - description: Sender account number associated with the transfer. - maxLength: 5000 + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - radar.value_list_item type: string - sender_name: - description: Sender name associated with the transfer. + value: + description: The value of the item. maxLength: 5000 type: string - sender_sort_code: - description: Sender sort code associated with the transfer. + value_list: + description: The identifier of the value list this item belongs to. maxLength: 5000 type: string - title: SourceTransactionGbpCreditTransferData + required: + - created + - created_by + - id + - livemode + - object + - value + - value_list + title: RadarListListItem type: object x-expandableFields: [] - source_transaction_paper_check_data: - description: '' + x-resourceId: radar.value_list_item + radar_radar_options: + description: Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) + for more information. properties: - available_at: - description: Time at which the deposited funds will be available for use. - Measured in seconds since the Unix epoch. - maxLength: 5000 - type: string - invoices: - description: Comma-separated list of invoice IDs associated with the paper - check. + session: + description: A [Radar Session](https://stripe.com/docs/radar/radar-session) + is a snapshot of the browser metadata and device details that help Radar + make more accurate predictions on your payments. maxLength: 5000 type: string - title: SourceTransactionPaperCheckData + title: RadarRadarOptions type: object x-expandableFields: [] - source_transaction_sepa_credit_transfer_data: + radar_review_resource_location: description: '' properties: - reference: - description: Reference associated with the transfer. - maxLength: 5000 - type: string - sender_iban: - description: Sender's bank account IBAN. + city: + description: The city where the payment originated. maxLength: 5000 + nullable: true type: string - sender_name: - description: Sender's name. + country: + description: Two-letter ISO code representing the country where the payment + originated. maxLength: 5000 - type: string - title: SourceTransactionSepaCreditTransferData - type: object - x-expandableFields: [] - source_type_ach_credit_transfer: - properties: - account_number: nullable: true type: string - bank_name: + latitude: + description: The geographic latitude where the payment originated. nullable: true - type: string - fingerprint: + type: number + longitude: + description: The geographic longitude where the payment originated. nullable: true - type: string - refund_account_holder_name: + type: number + region: + description: The state/county/province/region where the payment originated. + maxLength: 5000 nullable: true type: string - refund_account_holder_type: + title: RadarReviewResourceLocation + type: object + x-expandableFields: [] + radar_review_resource_session: + description: '' + properties: + browser: + description: The browser used in this browser session (e.g., `Chrome`). + maxLength: 5000 nullable: true type: string - refund_routing_number: + device: + description: Information about the device used for the browser session (e.g., + `Samsung SM-G930T`). + maxLength: 5000 nullable: true type: string - routing_number: + platform: + description: The platform for the browser session (e.g., `Macintosh`). + maxLength: 5000 nullable: true type: string - swift_code: + version: + description: The version for the browser session (e.g., `61.0.3163.100`). + maxLength: 5000 nullable: true type: string + title: RadarReviewResourceSession type: object - source_type_ach_debit: + x-expandableFields: [] + received_payment_method_details_financial_account: + description: '' properties: - bank_name: - nullable: true - type: string - country: - nullable: true + id: + description: The FinancialAccount ID. + maxLength: 5000 type: string - fingerprint: - nullable: true + network: + description: The rails the ReceivedCredit was sent over. A FinancialAccount + can only send funds over `stripe`. + enum: + - stripe type: string - last4: + required: + - id + - network + title: received_payment_method_details_financial_account + type: object + x-expandableFields: [] + recurring: + description: '' + properties: + aggregate_usage: + description: Specifies a usage aggregation strategy for prices of `usage_type=metered`. + Allowed values are `sum` for summing up all usage during a period, `last_during_period` + for using the last usage record reported within a period, `last_ever` + for using the last usage record ever (across period bounds) or `max` which + uses the usage record with the maximum reported usage during a period. + Defaults to `sum`. + enum: + - last_during_period + - last_ever + - max + - sum nullable: true type: string - routing_number: - nullable: true + interval: + description: The frequency at which a subscription is billed. One of `day`, + `week`, `month` or `year`. + enum: + - day + - month + - week + - year type: string - type: - nullable: true + interval_count: + description: The number of intervals (specified in the `interval` attribute) + between subscription billings. For example, `interval=month` and `interval_count=3` + bills every 3 months. + type: integer + usage_type: + description: Configures how the quantity per period should be determined. + Can be either `metered` or `licensed`. `licensed` automatically bills + the `quantity` set when adding it to a subscription. `metered` aggregates + the total usage based on usage records. Defaults to `licensed`. + enum: + - licensed + - metered type: string + required: + - interval + - interval_count + - usage_type + title: Recurring type: object - source_type_acss_debit: + x-expandableFields: [] + refund: + description: |- + `Refund` objects allow you to refund a charge that has previously been created + but not yet refunded. Funds will be refunded to the credit or debit card that + was originally charged. + + Related guide: [Refunds](https://stripe.com/docs/refunds). properties: - bank_address_city: + amount: + description: Amount, in %s. + type: integer + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: Balance transaction that describes the impact on your account + balance. nullable: true - type: string - bank_address_line_1: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + charge: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: ID of the charge that was refunded. nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string - bank_address_line_2: - nullable: true + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. (Available on non-card refunds only) + maxLength: 5000 type: string - bank_address_postal_code: - nullable: true + failure_balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: If the refund failed, this balance transaction describes the + adjustment made on your account balance that reverses the initial balance + transaction. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + failure_reason: + description: If the refund failed, the reason for refund failure if known. + Possible values are `lost_or_stolen_card`, `expired_or_canceled_card`, + or `unknown`. + maxLength: 5000 type: string - bank_name: - nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - category: - nullable: true + instructions_email: + description: Email to which refund instructions, if required, are sent to. + maxLength: 5000 type: string - country: + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. nullable: true + type: object + next_action: + "$ref": "#/components/schemas/refund_next_action" + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - refund type: string - fingerprint: + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_intent" + description: ID of the PaymentIntent that was refunded. nullable: true - type: string - last4: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_intent" + reason: + description: Reason for the refund, either user-provided (`duplicate`, `fraudulent`, + or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). + enum: + - duplicate + - expired_uncaptured_charge + - fraudulent + - requested_by_customer nullable: true type: string - routing_number: + x-stripeBypassValidation: true + receipt_number: + description: This is the transaction number that appears on email receipts + sent for this refund. + maxLength: 5000 nullable: true type: string - type: object - source_type_alipay: - properties: - data_string: + source_transfer_reversal: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/transfer_reversal" + description: The transfer reversal that is associated with the refund. Only + present if the charge came from another Stripe account. See the Connect + documentation for details. nullable: true - type: string - native_url: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/transfer_reversal" + status: + description: Status of the refund. For credit card refunds, this can be + `pending`, `succeeded`, or `failed`. For other types of refunds, it can + be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. + Refer to our [refunds](https://stripe.com/docs/refunds#failed-refunds) + documentation for more details. + maxLength: 5000 nullable: true type: string - statement_descriptor: + transfer_reversal: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/transfer_reversal" + description: If the accompanying transfer was reversed, the transfer reversal + object. Only applicable if the charge was created using the destination + parameter. nullable: true - type: string + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/transfer_reversal" + required: + - amount + - created + - currency + - id + - object + title: Refund type: object - source_type_au_becs_debit: + x-expandableFields: + - balance_transaction + - charge + - failure_balance_transaction + - next_action + - payment_intent + - source_transfer_reversal + - transfer_reversal + x-resourceId: refund + refund_next_action: + description: '' properties: - bsb_number: - nullable: true - type: string - fingerprint: - nullable: true - type: string - last4: + display_details: + anyOf: + - "$ref": "#/components/schemas/refund_next_action_display_details" + description: Contains the refund details. nullable: true + type: + description: Type of the next action to perform. + maxLength: 5000 type: string + required: + - type + title: RefundNextAction type: object - source_type_bancontact: + x-expandableFields: + - display_details + refund_next_action_display_details: + description: '' properties: - bank_code: + email_sent: + "$ref": "#/components/schemas/email_sent" + expires_at: + description: The expiry timestamp. + format: unix-time + type: integer + required: + - email_sent + - expires_at + title: RefundNextActionDisplayDetails + type: object + x-expandableFields: + - email_sent + reporting.report_run: + description: |- + The Report Run object represents an instance of a report type generated with + specific run parameters. Once the object is created, Stripe begins processing the report. + When the report has finished running, it will give you a reference to a file + where you can retrieve your results. For an overview, see + [API Access to Reports](https://stripe.com/docs/reporting/statements/api). + + Note that certain report types can only be run based on your live-mode data (not test-mode + data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). + properties: + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + error: + description: |- + If something should go wrong during the run, a message about the failure (populated when + `status=failed`). + maxLength: 5000 nullable: true type: string - bank_name: - nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - bic: - nullable: true + livemode: + description: "`true` if the report is run on live mode data and `false` + if it is run on test mode data." + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - reporting.report_run type: string - iban_last4: - nullable: true + parameters: + "$ref": "#/components/schemas/financial_reporting_finance_report_run_run_parameters" + report_type: + description: The ID of the [report type](https://stripe.com/docs/reports/report-types) + to run, such as `"balance.summary.1"`. + maxLength: 5000 type: string - preferred_language: + result: + anyOf: + - "$ref": "#/components/schemas/file" + description: |- + The file object representing the result of the report run (populated when + `status=succeeded`). nullable: true + status: + description: |- + Status of this report run. This will be `pending` when the run is initially created. + When the run finishes, this will be set to `succeeded` and the `result` field will be populated. + Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + maxLength: 5000 type: string - statement_descriptor: + succeeded_at: + description: |- + Timestamp at which this run successfully finished (populated when + `status=succeeded`). Measured in seconds since the Unix epoch. + format: unix-time nullable: true - type: string + type: integer + required: + - created + - id + - livemode + - object + - parameters + - report_type + - status + title: reporting_report_run type: object - source_type_card: + x-expandableFields: + - parameters + - result + x-resourceId: reporting.report_run + reporting.report_type: + description: |- + The Report Type resource corresponds to a particular type of report, such as + the "Activity summary" or "Itemized payouts" reports. These objects are + identified by an ID belonging to a set of enumerated values. See + [API Access to Reports documentation](https://stripe.com/docs/reporting/statements/api) + for those Report Type IDs, along with required and optional parameters. + + Note that certain report types can only be run based on your live-mode data (not test-mode + data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). properties: - address_line1_check: - nullable: true - type: string - address_zip_check: - nullable: true - type: string - brand: - nullable: true - type: string - country: - nullable: true - type: string - cvc_check: - nullable: true - type: string - dynamic_last4: - nullable: true - type: string - exp_month: - nullable: true + data_available_end: + description: Most recent time for which this Report Type is available. Measured + in seconds since the Unix epoch. + format: unix-time type: integer - exp_year: - nullable: true + data_available_start: + description: Earliest time for which this Report Type is available. Measured + in seconds since the Unix epoch. + format: unix-time type: integer - fingerprint: - type: string - funding: - nullable: true - type: string - last4: + default_columns: + description: List of column names that are included by default when this + Report Type gets run. (If the Report Type doesn't support the `columns` + parameter, this will be null.) + items: + maxLength: 5000 + type: string nullable: true + type: array + id: + description: The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), + such as `balance.summary.1`. + maxLength: 5000 type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean name: - nullable: true - type: string - three_d_secure: + description: Human-readable name of the Report Type + maxLength: 5000 type: string - tokenization_method: - nullable: true + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - reporting.report_type type: string + updated: + description: When this Report Type was latest updated. Measured in seconds + since the Unix epoch. + format: unix-time + type: integer + version: + description: Version of the Report Type. Different versions report with + the same ID will have the same purpose, but may take different run parameters + or have different result schemas. + type: integer + required: + - data_available_end + - data_available_start + - id + - livemode + - name + - object + - updated + - version + title: reporting_report_type type: object - source_type_card_present: + x-expandableFields: [] + x-resourceId: reporting.report_type + reserve_transaction: + description: '' properties: - application_cryptogram: - type: string - application_preferred_name: - type: string - authorization_code: - nullable: true - type: string - authorization_response_code: + amount: + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string - brand: + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 nullable: true type: string - country: - nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - cvm_type: + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - reserve_transaction type: string - data_type: + required: + - amount + - currency + - id + - object + title: ReserveTransaction + type: object + x-expandableFields: [] + review: + description: |- + Reviews can be used to supplement automated fraud detection with human expertise. + + Learn more about [Radar](/radar) and reviewing payments + [here](https://stripe.com/docs/radar/reviews). + properties: + billing_zip: + description: The ZIP or postal code of the card used, if applicable. + maxLength: 5000 nullable: true type: string - dedicated_file_name: - type: string - emv_auth_data: - type: string - evidence_customer_signature: + charge: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: The charge associated with this review. nullable: true - type: string - evidence_transaction_certificate: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" + closed_reason: + description: The reason the review was closed, or null if it has not yet + been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, + or `redacted`. + enum: + - approved + - disputed + - redacted + - refunded + - refunded_as_fraud nullable: true type: string - exp_month: - nullable: true - type: integer - exp_year: - nullable: true + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time type: integer - fingerprint: - type: string - funding: - nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - last4: + ip_address: + description: The IP address where the payment originated. + maxLength: 5000 nullable: true type: string - pos_device_id: + ip_address_location: + anyOf: + - "$ref": "#/components/schemas/radar_review_resource_location" + description: Information related to the location of the payment. Note that + this information is an approximation and attempts to locate the nearest + population center - it should not be used to determine a specific address. nullable: true + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - review type: string - pos_entry_mode: + open: + description: If `true`, the review needs action. + type: boolean + opened_reason: + description: The reason the review was opened. One of `rule` or `manual`. + enum: + - manual + - rule type: string - read_method: - nullable: true + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_intent" + description: The PaymentIntent ID associated with this review, if one exists. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_intent" + reason: + description: The reason the review is currently open or closed. One of `rule`, + `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or + `redacted`. + maxLength: 5000 type: string - reader: + session: + anyOf: + - "$ref": "#/components/schemas/radar_review_resource_session" + description: Information related to the browsing session of the user who + initiated the payment. nullable: true - type: string - terminal_verification_results: - type: string - transaction_status_information: - type: string + required: + - created + - id + - livemode + - object + - open + - opened_reason + - reason + title: RadarReview type: object - source_type_eps: + x-expandableFields: + - charge + - ip_address_location + - payment_intent + - session + x-resourceId: review + rule: + description: '' properties: - reference: - nullable: true + action: + description: The action taken on the payment. + maxLength: 5000 type: string - statement_descriptor: - nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + predicate: + description: The predicate to evaluate the payment against. + maxLength: 5000 type: string + required: + - action + - id + - predicate + title: RadarRule type: object - source_type_giropay: + x-expandableFields: [] + scheduled_query_run: + description: |- + If you have [scheduled a Sigma query](https://stripe.com/docs/sigma/scheduled-queries), you'll + receive a `sigma.scheduled_query_run.created` webhook each time the query + runs. The webhook contains a `ScheduledQueryRun` object, which you can use to + retrieve the query results. properties: - bank_code: + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + data_load_time: + description: When the query was run, Sigma contained a snapshot of your + Stripe data at this time. + format: unix-time + type: integer + error: + "$ref": "#/components/schemas/sigma_scheduled_query_run_error" + file: + anyOf: + - "$ref": "#/components/schemas/file" + description: The file object representing the results of the query. nullable: true + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - bank_name: - nullable: true + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - scheduled_query_run type: string - bic: - nullable: true + result_available_until: + description: Time at which the result expires and is no longer available + for download. + format: unix-time + type: integer + sql: + description: SQL for the query. + maxLength: 100000 type: string - statement_descriptor: - nullable: true + status: + description: The query's execution status, which will be `completed` for + successful runs, and `canceled`, `failed`, or `timed_out` otherwise. + maxLength: 5000 + type: string + title: + description: Title of the query. + maxLength: 5000 type: string + required: + - created + - data_load_time + - id + - livemode + - object + - result_available_until + - sql + - status + - title + title: ScheduledQueryRun type: object - source_type_ideal: + x-expandableFields: + - error + - file + x-resourceId: scheduled_query_run + schedules_phase_automatic_tax: + description: '' properties: - bank: - nullable: true - type: string - bic: - nullable: true - type: string - iban_last4: - nullable: true - type: string - statement_descriptor: - nullable: true - type: string + enabled: + description: Whether Stripe automatically computes tax on invoices created + during this phase. + type: boolean + required: + - enabled + title: SchedulesPhaseAutomaticTax type: object - source_type_klarna: + x-expandableFields: [] + secret_service_resource_scope: + description: '' properties: - background_image_url: - type: string - client_token: - nullable: true - type: string - first_name: - type: string - last_name: - type: string - locale: - type: string - logo_url: - type: string - page_title: - type: string - pay_later_asset_urls_descriptive: - type: string - pay_later_asset_urls_standard: - type: string - pay_later_name: - type: string - pay_later_redirect_url: - type: string - pay_now_asset_urls_descriptive: - type: string - pay_now_asset_urls_standard: - type: string - pay_now_name: - type: string - pay_now_redirect_url: - type: string - pay_over_time_asset_urls_descriptive: - type: string - pay_over_time_asset_urls_standard: - type: string - pay_over_time_name: - type: string - pay_over_time_redirect_url: - type: string - payment_method_categories: - type: string - purchase_country: - type: string - purchase_type: - type: string - redirect_url: - type: string - shipping_delay: - type: integer - shipping_first_name: + type: + description: The secret scope type. + enum: + - account + - user type: string - shipping_last_name: + user: + description: The user ID, if type is set to "user" + maxLength: 5000 type: string + required: + - type + title: SecretServiceResourceScope type: object - source_type_multibanco: + x-expandableFields: [] + sepa_debit_generated_from: + description: '' properties: - entity: - nullable: true - type: string - reference: + charge: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: The ID of the Charge that generated this PaymentMethod, if + any. nullable: true - type: string - refund_account_holder_address_city: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" + setup_attempt: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/setup_attempt" + description: The ID of the SetupAttempt that generated this PaymentMethod, + if any. nullable: true - type: string - refund_account_holder_address_country: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/setup_attempt" + title: sepa_debit_generated_from + type: object + x-expandableFields: + - charge + - setup_attempt + setup_attempt: + description: |- + A SetupAttempt describes one attempted confirmation of a SetupIntent, + whether that confirmation was successful or unsuccessful. You can use + SetupAttempts to inspect details of a specific attempt at setting up a + payment method using a SetupIntent. + properties: + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + description: The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) + on the SetupIntent at the time of this confirmation. nullable: true - type: string - refund_account_holder_address_line1: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + attach_to_self: + description: |- + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + type: boolean + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) + on the SetupIntent at the time of this confirmation. nullable: true - type: string - refund_account_holder_address_line2: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + flow_directions: + description: |- + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + items: + enum: + - inbound + - outbound + type: string nullable: true + type: array + id: + description: Unique identifier for the object. + maxLength: 5000 type: string - refund_account_holder_address_postal_code: - nullable: true + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - setup_attempt type: string - refund_account_holder_address_state: + on_behalf_of: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) + on the SetupIntent at the time of this confirmation. nullable: true - type: string - refund_account_holder_name: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + payment_method: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: ID of the payment method used with this SetupAttempt. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + payment_method_details: + "$ref": "#/components/schemas/setup_attempt_payment_method_details" + setup_error: + anyOf: + - "$ref": "#/components/schemas/api_errors" + description: The error encountered during this attempt to confirm the SetupIntent, + if any. nullable: true + setup_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/setup_intent" + description: ID of the SetupIntent that this attempt belongs to. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/setup_intent" + status: + description: Status of this SetupAttempt, one of `requires_confirmation`, + `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. + maxLength: 5000 type: string - refund_iban: - nullable: true + usage: + description: The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) + on the SetupIntent at the time of this confirmation, one of `off_session` + or `on_session`. + maxLength: 5000 type: string + required: + - created + - id + - livemode + - object + - payment_method + - payment_method_details + - setup_intent + - status + - usage + title: PaymentFlowsSetupIntentSetupAttempt type: object - source_type_p24: + x-expandableFields: + - application + - customer + - on_behalf_of + - payment_method + - payment_method_details + - setup_error + - setup_intent + x-resourceId: setup_attempt + setup_attempt_payment_method_details: + description: '' properties: - reference: - nullable: true + acss_debit: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_acss_debit" + au_becs_debit: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_au_becs_debit" + bacs_debit: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bacs_debit" + bancontact: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_bancontact" + blik: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_blik" + boleto: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_boleto" + card: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card" + card_present: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_card_present" + ideal: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_ideal" + link: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_link" + sepa_debit: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sepa_debit" + sofort: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_sofort" + type: + description: The type of the payment method used in the SetupIntent (e.g., + `card`). An additional hash is included on `payment_method_details` with + a name matching this value. It contains confirmation-specific information + for the payment method. + maxLength: 5000 type: string + us_bank_account: + "$ref": "#/components/schemas/setup_attempt_payment_method_details_us_bank_account" + required: + - type + title: SetupAttemptPaymentMethodDetails type: object - source_type_sepa_debit: - properties: - bank_code: - nullable: true - type: string - branch_code: - nullable: true - type: string - country: - nullable: true - type: string - fingerprint: - nullable: true - type: string - last4: - nullable: true - type: string - mandate_reference: - nullable: true - type: string - mandate_url: - nullable: true - type: string + x-expandableFields: + - acss_debit + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - card + - card_present + - ideal + - link + - sepa_debit + - sofort + - us_bank_account + setup_attempt_payment_method_details_acss_debit: + description: '' + properties: {} + title: setup_attempt_payment_method_details_acss_debit type: object - source_type_sofort: + x-expandableFields: [] + setup_attempt_payment_method_details_au_becs_debit: + description: '' + properties: {} + title: setup_attempt_payment_method_details_au_becs_debit + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_bacs_debit: + description: '' + properties: {} + title: setup_attempt_payment_method_details_bacs_debit + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_bancontact: + description: '' properties: bank_code: + description: Bank code of bank associated with the bank account. + maxLength: 5000 nullable: true type: string bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 nullable: true type: string bic: + description: Bank Identifier Code of the bank associated with the bank account. + maxLength: 5000 nullable: true type: string - country: + generated_sepa_debit: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this SetupAttempt. nullable: true - type: string + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this SetupAttempt. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 nullable: true type: string preferred_language: + description: |- + Preferred language of the Bancontact authorization page that the customer is redirected to. + Can be one of `en`, `de`, `fr`, or `nl` + enum: + - de + - en + - fr + - nl nullable: true type: string - statement_descriptor: + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by Bancontact directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + maxLength: 5000 nullable: true type: string + title: setup_attempt_payment_method_details_bancontact type: object - source_type_three_d_secure: + x-expandableFields: + - generated_sepa_debit + - generated_sepa_debit_mandate + setup_attempt_payment_method_details_blik: + description: '' + properties: {} + title: setup_attempt_payment_method_details_blik + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_boleto: + description: '' + properties: {} + title: setup_attempt_payment_method_details_boleto + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_card: + description: '' properties: - address_line1_check: - nullable: true - type: string - address_zip_check: + three_d_secure: + anyOf: + - "$ref": "#/components/schemas/three_d_secure_details" + description: Populated if this authorization used 3D Secure authentication. nullable: true - type: string - authenticated: + title: setup_attempt_payment_method_details_card + type: object + x-expandableFields: + - three_d_secure + setup_attempt_payment_method_details_card_present: + description: '' + properties: + generated_card: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: The ID of the Card PaymentMethod which was generated by this + SetupAttempt. nullable: true - type: boolean - brand: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + title: setup_attempt_payment_method_details_card_present + type: object + x-expandableFields: + - generated_card + setup_attempt_payment_method_details_ideal: + description: '' + properties: + bank: + description: The customer's bank. Can be one of `abn_amro`, `asn_bank`, + `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `rabobank`, `regiobank`, + `revolut`, `sns_bank`, `triodos_bank`, or `van_lanschot`. + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot nullable: true type: string - card: + bic: + description: The Bank Identifier Code of the customer's bank. + enum: + - ABNANL2A + - ASNBNL21 + - BUNQNL2A + - FVLBNL22 + - HANDNL2A + - INGBNL2A + - KNABNL2H + - MOYONL21 + - RABONL2U + - RBRBNL21 + - REVOLT21 + - SNSBNL2A + - TRIONL2U nullable: true type: string - country: + generated_sepa_debit: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this SetupAttempt. nullable: true - type: string - customer: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this SetupAttempt. nullable: true - type: string - cvc_check: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" + iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 nullable: true type: string - dynamic_last4: + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by iDEAL directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + maxLength: 5000 nullable: true type: string - exp_month: - nullable: true - type: integer - exp_year: + title: setup_attempt_payment_method_details_ideal + type: object + x-expandableFields: + - generated_sepa_debit + - generated_sepa_debit_mandate + setup_attempt_payment_method_details_link: + description: '' + properties: {} + title: setup_attempt_payment_method_details_link + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_sepa_debit: + description: '' + properties: {} + title: setup_attempt_payment_method_details_sepa_debit + type: object + x-expandableFields: [] + setup_attempt_payment_method_details_sofort: + description: '' + properties: + bank_code: + description: Bank code of bank associated with the bank account. + maxLength: 5000 nullable: true - type: integer - fingerprint: type: string - funding: + bank_name: + description: Name of the bank associated with the bank account. + maxLength: 5000 nullable: true type: string - last4: + bic: + description: Bank Identifier Code of the bank associated with the bank account. + maxLength: 5000 nullable: true type: string - name: + generated_sepa_debit: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: The ID of the SEPA Direct Debit PaymentMethod which was generated + by this SetupAttempt. nullable: true - type: string - three_d_secure: - type: string - tokenization_method: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + generated_sepa_debit_mandate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: The mandate for the SEPA Direct Debit PaymentMethod which was + generated by this SetupAttempt. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" + iban_last4: + description: Last four characters of the IBAN. + maxLength: 5000 nullable: true type: string - type: object - source_type_wechat: - properties: - prepay_id: - type: string - qr_code_url: + preferred_language: + description: |- + Preferred language of the Sofort authorization page that the customer is redirected to. + Can be one of `en`, `de`, `fr`, or `nl` + enum: + - de + - en + - fr + - nl nullable: true type: string - statement_descriptor: + verified_name: + description: |- + Owner's verified full name. Values are verified or provided by Sofort directly + (if supported) at the time of authorization or settlement. They cannot be set or mutated. + maxLength: 5000 + nullable: true type: string + title: setup_attempt_payment_method_details_sofort type: object - status_transitions: + x-expandableFields: + - generated_sepa_debit + - generated_sepa_debit_mandate + setup_attempt_payment_method_details_us_bank_account: description: '' - properties: - canceled: - description: The time that the order was canceled. - format: unix-time - nullable: true - type: integer - fulfiled: - description: The time that the order was fulfilled. - format: unix-time - nullable: true - type: integer - paid: - description: The time that the order was paid. - format: unix-time - nullable: true - type: integer - returned: - description: The time that the order was returned. - format: unix-time - nullable: true - type: integer - title: StatusTransitions + properties: {} + title: setup_attempt_payment_method_details_us_bank_account type: object x-expandableFields: [] - subscription: + setup_intent: description: |- - Subscriptions allow you to charge a customer on a recurring basis. + 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. - Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + 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). properties: - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the application owner's Stripe account. - nullable: true - type: number - automatic_tax: - "$ref": "#/components/schemas/subscription_automatic_tax" - billing_cycle_anchor: - description: Determines the date of the first full invoice, and, for plans - with `month` or `year` intervals, the day of the month for subsequent - invoices. - format: unix-time - type: integer - billing_thresholds: + application: anyOf: - - "$ref": "#/components/schemas/subscription_billing_thresholds" - description: Define thresholds at which an invoice will be sent, and the - subscription advanced to a new billing period - nullable: true - cancel_at: - description: A date in the future at which the subscription will automatically - get canceled - format: unix-time + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + description: ID of the Connect application that created the SetupIntent. nullable: true - type: integer - cancel_at_period_end: - description: If the subscription has been canceled with the `at_period_end` - flag set to `true`, `cancel_at_period_end` on the subscription will be - true. You can use this attribute to determine whether a subscription that - has a status of active is scheduled to be canceled at the end of the current - period. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + attach_to_self: + description: |- + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. type: boolean - canceled_at: - description: If the subscription has been canceled, the date of that cancellation. - If the subscription was canceled with `cancel_at_period_end`, `canceled_at` - will reflect the time of the most recent update request, not the end of - the subscription period when the subscription is automatically moved to - a canceled state. - format: unix-time - nullable: true - type: integer - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When charging - automatically, Stripe will attempt to pay this subscription at the end - of the cycle using the default source attached to the customer. When sending - an invoice, Stripe will email your customer an invoice with payment instructions. + cancellation_reason: + description: Reason for cancellation of this SetupIntent, one of `abandoned`, + `requested_by_customer`, or `duplicate`. enum: - - charge_automatically - - send_invoice + - abandoned + - duplicate + - requested_by_customer + nullable: true + type: string + client_secret: + description: |- + The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. + + The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + maxLength: 5000 + nullable: true type: string created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - current_period_end: - description: End of the current period that the subscription has been invoiced - for. At the end of this period, a new invoice will be created. - format: unix-time - type: integer - current_period_start: - description: Start of the current period that the subscription has been - invoiced for. - format: unix-time - type: integer customer: anyOf: - maxLength: 5000 type: string - "$ref": "#/components/schemas/customer" - "$ref": "#/components/schemas/deleted_customer" - description: ID of the customer who owns the subscription. + description: |- + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + nullable: true x-expansionResources: oneOf: - "$ref": "#/components/schemas/customer" - "$ref": "#/components/schemas/deleted_customer" - days_until_due: - description: Number of days a customer has to pay invoices generated by - this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. - nullable: true - type: integer - default_payment_method: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the default payment method for the subscription. It must - belong to the customer associated with the subscription. This takes precedence - over `default_source`. If neither are set, invoices will use the customer's - [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - default_source: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/alipay_account" - - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - - "$ref": "#/components/schemas/card" - - "$ref": "#/components/schemas/source" - description: ID of the default payment source for the subscription. It must - belong to the customer associated with the subscription and be in a chargeable - state. If `default_payment_method` is also set, `default_payment_method` - will take precedence. If neither are set, invoices will use the customer's - [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/alipay_account" - - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - - "$ref": "#/components/schemas/card" - - "$ref": "#/components/schemas/source" - default_tax_rates: - description: The tax rates that will apply to any subscription item that - does not have `tax_rates` set. Invoices created will have their `default_tax_rates` - populated from the subscription. + type: string + flow_directions: + description: |- + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. items: - "$ref": "#/components/schemas/tax_rate" + enum: + - inbound + - outbound + type: string nullable: true type: array - discount: - anyOf: - - "$ref": "#/components/schemas/discount" - description: Describes the current discount applied to this subscription, - if there is one. When billing, a discount applied to a subscription overrides - a discount applied on a customer-wide basis. - nullable: true - ended_at: - description: If the subscription has ended, the date the subscription ended. - format: unix-time - nullable: true - type: integer id: description: Unique identifier for the object. maxLength: 5000 type: string - items: - description: List of subscription items, each with an attached price. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/subscription_item" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: SubscriptionItemList - type: object - x-expandableFields: - - data - latest_invoice: + last_setup_error: + anyOf: + - "$ref": "#/components/schemas/api_errors" + description: The error encountered in the previous SetupIntent confirmation. + nullable: true + latest_attempt: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/invoice" - description: The most recent invoice this subscription has generated. + - "$ref": "#/components/schemas/setup_attempt" + description: The most recent SetupAttempt for this SetupIntent. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/invoice" + - "$ref": "#/components/schemas/setup_attempt" livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + mandate: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/mandate" + description: ID of the multi use Mandate generated by the SetupIntent. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/mandate" metadata: additionalProperties: maxLength: 500 @@ -23373,357 +25728,539 @@ components: description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + nullable: true type: object - next_pending_invoice_item_invoice: - description: Specifies the approximate timestamp on which any pending invoice - items will be billed according to the schedule provided at `pending_invoice_item_interval`. - format: unix-time + next_action: + anyOf: + - "$ref": "#/components/schemas/setup_intent_next_action" + description: If present, this property tells you what actions you need to + take in order for your customer to continue payment setup. nullable: true - type: integer object: description: String representing the object's type. Objects of the same type share the same value. enum: - - subscription + - setup_intent type: string - pause_collection: - anyOf: - - "$ref": "#/components/schemas/subscriptions_resource_pause_collection" - description: If specified, payment collection for this subscription will - be paused. - nullable: true - payment_settings: - anyOf: - - "$ref": "#/components/schemas/subscriptions_resource_payment_settings" - description: Payment settings passed on to invoices created by the subscription. - nullable: true - pending_invoice_item_interval: + on_behalf_of: anyOf: - - "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" - description: Specifies an interval for how often to bill for any pending - invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) - for the given subscription at the specified interval. + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The account (if any) for which the setup is intended. nullable: true - pending_setup_intent: + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + payment_method: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/setup_intent" - description: You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) - to collect user authentication when creating a subscription without immediate - payment or updating a subscription's payment method, allowing you to optimize - for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + - "$ref": "#/components/schemas/payment_method" + description: ID of the payment method used with this SetupIntent. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/setup_intent" - pending_update: + - "$ref": "#/components/schemas/payment_method" + payment_method_options: anyOf: - - "$ref": "#/components/schemas/subscriptions_resource_pending_update" - description: If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) - that will be applied to the subscription once the `latest_invoice` has - been paid. + - "$ref": "#/components/schemas/setup_intent_payment_method_options" + description: Payment-method-specific configuration for this SetupIntent. nullable: true - schedule: + payment_method_types: + description: The list of payment method types (e.g. card) that this SetupIntent + is allowed to set up. + items: + maxLength: 5000 + type: string + type: array + single_use_mandate: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/subscription_schedule" - description: The schedule attached to the subscription + - "$ref": "#/components/schemas/mandate" + description: ID of the single_use Mandate generated by the SetupIntent. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/subscription_schedule" - start_date: - description: Date when the subscription was first created. The date might - differ from the `created` date due to backdating. - format: unix-time - type: integer + - "$ref": "#/components/schemas/mandate" status: - description: "Possible values are `incomplete`, `incomplete_expired`, `trialing`, - `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `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. - \n\nA subscription that is currently in a trial period is `trialing` and - moves to `active` when the trial period is over. \n\nIf 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. \n\nIf 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." + description: "[Status](https://stripe.com/docs/payments/intents#intent-statuses) + of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, + `requires_action`, `processing`, `canceled`, or `succeeded`." enum: - - active - canceled - - incomplete - - incomplete_expired - - past_due - - trialing - - unpaid + - processing + - requires_action + - requires_confirmation + - requires_payment_method + - succeeded + type: string + usage: + description: |- + Indicates how the payment method is intended to be used in the future. + + Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + maxLength: 5000 type: string - transfer_data: - anyOf: - - "$ref": "#/components/schemas/subscription_transfer_data" - description: The account (if any) the subscription's payments will be attributed - to for tax reporting, and where funds from each payment will be transferred - to for each of the subscription's invoices. - nullable: true - trial_end: - description: If the subscription has a trial, the end of that trial. - format: unix-time - nullable: true - type: integer - trial_start: - description: If the subscription has a trial, the beginning of that trial. - format: unix-time - nullable: true - type: integer required: - - automatic_tax - - billing_cycle_anchor - - cancel_at_period_end - - collection_method - created - - current_period_end - - current_period_start - - customer - id - - items - livemode - - metadata - object - - start_date + - payment_method_types - status - title: Subscription + - usage + title: SetupIntent type: object x-expandableFields: - - automatic_tax - - billing_thresholds + - application - customer - - default_payment_method - - default_source - - default_tax_rates - - discount - - items - - latest_invoice - - pause_collection - - payment_settings - - pending_invoice_item_interval - - pending_setup_intent - - pending_update - - schedule - - transfer_data - x-resourceId: subscription - subscription_automatic_tax: + - last_setup_error + - latest_attempt + - mandate + - next_action + - on_behalf_of + - payment_method + - payment_method_options + - single_use_mandate + x-resourceId: setup_intent + setup_intent_next_action: description: '' properties: - enabled: - description: Whether Stripe automatically computes tax on this subscription. - type: boolean + redirect_to_url: + "$ref": "#/components/schemas/setup_intent_next_action_redirect_to_url" + type: + description: Type of the next action to perform, one of `redirect_to_url`, + `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or + `verify_with_microdeposits`. + maxLength: 5000 + type: string + use_stripe_sdk: + description: When confirming a SetupIntent with Stripe.js, Stripe.js depends + on the contents of this dictionary to invoke authentication flows. The + shape of the contents is subject to change and is only intended to be + used by Stripe.js. + type: object + verify_with_microdeposits: + "$ref": "#/components/schemas/setup_intent_next_action_verify_with_microdeposits" required: - - enabled - title: SubscriptionAutomaticTax + - type + title: SetupIntentNextAction type: object - x-expandableFields: [] - subscription_billing_thresholds: + x-expandableFields: + - redirect_to_url + - verify_with_microdeposits + setup_intent_next_action_redirect_to_url: description: '' properties: - amount_gte: - description: Monetary threshold that triggers the subscription to create - an invoice + return_url: + description: If the customer does not exit their browser while authenticating, + they will be redirected to this specified URL after completion. + maxLength: 5000 nullable: true - type: integer - reset_billing_cycle_anchor: - description: Indicates if the `billing_cycle_anchor` should be reset when - a threshold is reached. If true, `billing_cycle_anchor` will be updated - to the date/time the threshold was last reached; otherwise, the value - will remain unchanged. This value may not be `true` if the subscription - contains items with plans that have `aggregate_usage=last_ever`. + type: string + url: + description: The URL you must redirect your customer to in order to authenticate. + maxLength: 5000 nullable: true - type: boolean - title: SubscriptionBillingThresholds + type: string + title: SetupIntentNextActionRedirectToUrl type: object x-expandableFields: [] - subscription_item: - description: |- - Subscription items allow you to create customer subscriptions with more than - one plan, making it easy to represent complex billing relationships. + setup_intent_next_action_verify_with_microdeposits: + description: '' properties: - billing_thresholds: - anyOf: - - "$ref": "#/components/schemas/subscription_item_billing_thresholds" - description: Define thresholds at which an invoice will be sent, and the - related subscription advanced to a new billing period - nullable: true - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. + arrival_date: + description: The timestamp when the microdeposits are expected to land. + format: unix-time type: integer - id: - description: Unique identifier for the object. + hosted_verification_url: + description: The URL for the hosted verification page, which allows customers + to verify their bank account. maxLength: 5000 type: string - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. + microdeposit_type: + description: The type of the microdeposit sent to the customer. Used to + distinguish between different verification methods. enum: - - subscription_item - type: string - price: - "$ref": "#/components/schemas/price" - quantity: - description: The [quantity](https://stripe.com/docs/subscriptions/quantities) - of the plan to which the customer should be subscribed. - type: integer - subscription: - description: The `subscription` this `subscription_item` belongs to. - maxLength: 5000 - type: string - tax_rates: - description: The tax rates which apply to this `subscription_item`. When - set, the `default_tax_rates` on the subscription do not apply to this - `subscription_item`. - items: - "$ref": "#/components/schemas/tax_rate" + - amounts + - descriptor_code nullable: true - type: array + type: string required: - - created - - id - - metadata - - object - - price - - subscription - title: SubscriptionItem + - arrival_date + - hosted_verification_url + title: SetupIntentNextActionVerifyWithMicrodeposits + type: object + x-expandableFields: [] + setup_intent_payment_method_options: + description: '' + properties: + acss_debit: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_acss_debit" + - "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + blik: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_blik" + - "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + card: + "$ref": "#/components/schemas/setup_intent_payment_method_options_card" + link: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_link" + - "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + sepa_debit: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_sepa_debit" + - "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + us_bank_account: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_us_bank_account" + - "$ref": "#/components/schemas/setup_intent_type_specific_payment_method_options_client" + title: SetupIntentPaymentMethodOptions type: object x-expandableFields: - - billing_thresholds - - price - - tax_rates - x-resourceId: subscription_item - subscription_item_billing_thresholds: + - acss_debit + - blik + - card + - link + - sepa_debit + - us_bank_account + setup_intent_payment_method_options_acss_debit: description: '' properties: - usage_gte: - description: Usage threshold that triggers the subscription to create an - invoice + currency: + description: Currency supported by the bank account + enum: + - cad + - usd nullable: true - type: integer - title: SubscriptionItemBillingThresholds + type: string + mandate_options: + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_acss_debit" + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_acss_debit type: object - x-expandableFields: [] - subscription_payment_method_options_card: + x-expandableFields: + - mandate_options + setup_intent_payment_method_options_blik: description: '' properties: mandate_options: - "$ref": "#/components/schemas/invoice_mandate_options_card" + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_blik" + title: setup_intent_payment_method_options_blik + type: object + x-expandableFields: + - mandate_options + setup_intent_payment_method_options_card: + description: '' + properties: + mandate_options: + anyOf: + - "$ref": "#/components/schemas/setup_intent_payment_method_options_card_mandate_options" + description: Configuration options for setting up an eMandate for cards + issued in India. + nullable: true + network: + description: Selected network to process this SetupIntent on. Depends on + the available networks of the card attached to the setup intent. Can be + only set confirm-time. + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + nullable: true + type: string request_three_d_secure: - description: We strongly recommend that you rely on our SCA Engine to automatically + description: 'We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own - fraud engine, provide this option. Read our guide on [manually requesting - 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) + 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. + our SCA Engine.' enum: - any - automatic + - challenge_only nullable: true type: string - title: subscription_payment_method_options_card + title: setup_intent_payment_method_options_card type: object x-expandableFields: - mandate_options - subscription_pending_invoice_item_interval: + setup_intent_payment_method_options_card_mandate_options: description: '' properties: + amount: + description: Amount to be charged for future payments. + type: integer + amount_type: + description: One of `fixed` or `maximum`. If `fixed`, the `amount` param + refers to the exact amount to be charged in future payments. If `maximum`, + the amount charged can be up to the value passed for the `amount` param. + enum: + - fixed + - maximum + type: string + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: A description of the mandate or subscription that is meant + to be displayed to the customer. + maxLength: 200 + nullable: true + type: string + end_date: + description: End date of the mandate or subscription. If not provided, the + mandate will be active until canceled. If provided, end date should be + after start date. + format: unix-time + nullable: true + type: integer interval: - description: Specifies invoicing frequency. Either `day`, `week`, `month` - or `year`. + description: Specifies payment frequency. One of `day`, `week`, `month`, + `year`, or `sporadic`. enum: - day - month + - sporadic - week - year type: string interval_count: - description: The number of intervals between invoices. For example, `interval=month` - and `interval_count=3` bills every 3 months. Maximum of one year interval - allowed (1 year, 12 months, or 52 weeks). + description: The number of intervals between payments. For example, `interval=month` + and `interval_count=3` indicates one payment every three months. Maximum + of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter + is optional when `interval=sporadic`. + nullable: true + type: integer + reference: + description: Unique identifier for the mandate or subscription. + maxLength: 80 + type: string + start_date: + description: Start date of the mandate or subscription. Start date should + not be lesser than yesterday. + format: unix-time type: integer + supported_types: + description: Specifies the type of mandates supported. Possible values are + `india`. + items: + enum: + - india + type: string + nullable: true + type: array required: + - amount + - amount_type + - currency - interval - - interval_count - title: SubscriptionPendingInvoiceItemInterval + - reference + - start_date + title: setup_intent_payment_method_options_card_mandate_options type: object x-expandableFields: [] - subscription_schedule: - description: |- - A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. - - Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + setup_intent_payment_method_options_link: + description: '' properties: - canceled_at: - description: Time at which the subscription schedule was canceled. Measured - in seconds since the Unix epoch. - format: unix-time + persistent_token: + description: Token used for persistent Link logins. + maxLength: 5000 nullable: true - type: integer - completed_at: - description: Time at which the subscription schedule was completed. Measured - in seconds since the Unix epoch. + type: string + title: setup_intent_payment_method_options_link + type: object + x-expandableFields: [] + setup_intent_payment_method_options_mandate_options_acss_debit: + description: '' + properties: + custom_mandate_url: + description: A URL for custom mandate text + maxLength: 5000 + type: string + default_for: + description: List of Stripe products where this mandate can be selected + automatically. + items: + enum: + - invoice + - subscription + type: string + type: array + interval_description: + description: Description of the interval. Only required if the 'payment_schedule' + parameter is 'interval' or 'combined'. + maxLength: 5000 + nullable: true + type: string + payment_schedule: + description: Payment schedule for the mandate. + enum: + - combined + - interval + - sporadic + nullable: true + type: string + transaction_type: + description: Transaction type of the mandate. + enum: + - business + - personal + nullable: true + type: string + title: setup_intent_payment_method_options_mandate_options_acss_debit + type: object + x-expandableFields: [] + setup_intent_payment_method_options_mandate_options_blik: + description: '' + properties: + expires_after: + description: Date at which the mandate expires. format: unix-time nullable: true type: integer + off_session: + "$ref": "#/components/schemas/mandate_options_off_session_details_blik" + type: + description: Type of the mandate. + enum: + - off_session + - on_session + nullable: true + type: string + title: setup_intent_payment_method_options_mandate_options_blik + type: object + x-expandableFields: + - off_session + setup_intent_payment_method_options_mandate_options_sepa_debit: + description: '' + properties: {} + title: setup_intent_payment_method_options_mandate_options_sepa_debit + type: object + x-expandableFields: [] + setup_intent_payment_method_options_sepa_debit: + description: '' + properties: + mandate_options: + "$ref": "#/components/schemas/setup_intent_payment_method_options_mandate_options_sepa_debit" + title: setup_intent_payment_method_options_sepa_debit + type: object + x-expandableFields: + - mandate_options + setup_intent_payment_method_options_us_bank_account: + description: '' + properties: + financial_connections: + "$ref": "#/components/schemas/linked_account_options_us_bank_account" + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_us_bank_account + type: object + x-expandableFields: + - financial_connections + setup_intent_type_specific_payment_method_options_client: + description: '' + properties: + verification_method: + description: Bank account verification method. + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: SetupIntentTypeSpecificPaymentMethodOptionsClient + type: object + x-expandableFields: [] + shipping: + description: '' + properties: + address: + "$ref": "#/components/schemas/address" + carrier: + description: The delivery service that shipped a physical product, such + as Fedex, UPS, USPS, etc. + maxLength: 5000 + nullable: true + type: string + name: + description: Recipient name. + maxLength: 5000 + type: string + phone: + description: Recipient phone (including extension). + maxLength: 5000 + nullable: true + type: string + tracking_number: + description: The tracking number for a physical product, obtained from the + delivery service. If multiple tracking numbers were generated for this + purchase, please separate them with commas. + maxLength: 5000 + nullable: true + type: string + title: Shipping + type: object + x-expandableFields: + - address + shipping_rate: + description: |- + Shipping rates describe the price of shipping presented to your customers and can be + applied to [Checkout Sessions](https://stripe.com/docs/payments/checkout/shipping) + and [Orders](https://stripe.com/docs/orders/shipping) to collect shipping costs. + properties: + active: + description: Whether the shipping rate can be used for new purchases. Defaults + to `true`. + type: boolean created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - current_phase: + delivery_estimate: anyOf: - - "$ref": "#/components/schemas/subscription_schedule_current_phase" - description: Object representing the start and end dates for the current - phase of the subscription schedule, if it is `active`. + - "$ref": "#/components/schemas/shipping_rate_delivery_estimate" + description: The estimated range for how long shipping will take, meant + to be displayable to the customer. This will appear on CheckoutSessions. + nullable: true + display_name: + description: The name of the shipping rate, meant to be displayable to the + customer. This will appear on CheckoutSessions. + maxLength: 5000 nullable: true - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - description: ID of the customer who owns the subscription schedule. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" - - "$ref": "#/components/schemas/deleted_customer" - default_settings: - "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" - end_behavior: - description: Behavior of the subscription schedule and underlying subscription - when it ends. Possible values are `release` and `cancel`. - enum: - - cancel - - none - - release - - renew type: string + fixed_amount: + "$ref": "#/components/schemas/shipping_rate_fixed_amount" id: description: Unique identifier for the object. maxLength: 5000 @@ -23739,1241 +26276,818 @@ components: description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. - nullable: true type: object object: description: String representing the object's type. Objects of the same type share the same value. enum: - - subscription_schedule - type: string - phases: - description: Configuration for the subscription schedule's phases. - items: - "$ref": "#/components/schemas/subscription_schedule_phase_configuration" - type: array - released_at: - description: Time at which the subscription schedule was released. Measured - in seconds since the Unix epoch. - format: unix-time - nullable: true - type: integer - released_subscription: - description: ID of the subscription once managed by the subscription schedule - (if it is released). - maxLength: 5000 - nullable: true + - shipping_rate type: string - status: - description: The present status of the subscription schedule. Possible values - are `not_started`, `active`, `completed`, `released`, and `canceled`. - You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + tax_behavior: + description: Specifies whether the rate is considered inclusive of taxes + or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. enum: - - active - - canceled - - completed - - not_started - - released + - exclusive + - inclusive + - unspecified + nullable: true type: string - subscription: + tax_code: anyOf: - maxLength: 5000 type: string - - "$ref": "#/components/schemas/subscription" - description: ID of the subscription managed by the subscription schedule. + - "$ref": "#/components/schemas/tax_code" + description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + The Shipping tax code is `txcd_92010001`. nullable: true x-expansionResources: oneOf: - - "$ref": "#/components/schemas/subscription" + - "$ref": "#/components/schemas/tax_code" + type: + description: The type of calculation to use on the shipping rate. Can only + be `fixed_amount` for now. + enum: + - fixed_amount + type: string required: + - active - created - - customer - - default_settings - - end_behavior - id - livemode + - metadata - object - - phases - - status - title: SubscriptionSchedule + - type + title: ShippingRate type: object x-expandableFields: - - current_phase - - customer - - default_settings - - phases - - subscription - x-resourceId: subscription_schedule - subscription_schedule_add_invoice_item: - description: An Add Invoice Item describes the prices and quantities that will - be added as pending invoice items when entering a phase. + - delivery_estimate + - fixed_amount + - tax_code + x-resourceId: shipping_rate + shipping_rate_currency_option: + description: '' properties: - price: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/price" - - "$ref": "#/components/schemas/deleted_price" - description: ID of the price used to generate the invoice item. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/price" - - "$ref": "#/components/schemas/deleted_price" - quantity: - description: The quantity of the invoice item. - nullable: true + amount: + description: A non-negative integer in cents representing how much to charge. type: integer - tax_rates: - description: The tax rates which apply to the item. When set, the `default_tax_rates` - do not apply to this item. - items: - "$ref": "#/components/schemas/tax_rate" - nullable: true - type: array + tax_behavior: + description: Specifies whether the rate is considered inclusive of taxes + or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + enum: + - exclusive + - inclusive + - unspecified + type: string required: - - price - title: SubscriptionScheduleAddInvoiceItem + - amount + - tax_behavior + title: ShippingRateCurrencyOption type: object - x-expandableFields: - - price - - tax_rates - subscription_schedule_configuration_item: - description: A phase item describes the price and quantity of a phase. + x-expandableFields: [] + shipping_rate_delivery_estimate: + description: '' properties: - billing_thresholds: + maximum: anyOf: - - "$ref": "#/components/schemas/subscription_item_billing_thresholds" - description: Define thresholds at which an invoice will be sent, and the - related subscription advanced to a new billing period + - "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + description: The upper bound of the estimated range. If empty, represents + no upper bound i.e., infinite. nullable: true - price: + minimum: anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/price" - - "$ref": "#/components/schemas/deleted_price" - description: ID of the price to which the customer should be subscribed. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/price" - - "$ref": "#/components/schemas/deleted_price" - quantity: - description: Quantity of the plan to which the customer should be subscribed. - type: integer - tax_rates: - description: The tax rates which apply to this `phase_item`. When set, the - `default_tax_rates` on the phase do not apply to this `phase_item`. - items: - "$ref": "#/components/schemas/tax_rate" + - "$ref": "#/components/schemas/shipping_rate_delivery_estimate_bound" + description: The lower bound of the estimated range. If empty, represents + no lower bound. nullable: true - type: array - required: - - price - title: SubscriptionScheduleConfigurationItem + title: ShippingRateDeliveryEstimate type: object x-expandableFields: - - billing_thresholds - - price - - tax_rates - subscription_schedule_current_phase: + - maximum + - minimum + shipping_rate_delivery_estimate_bound: description: '' properties: - end_date: - description: The end of this phase of the subscription schedule. - format: unix-time - type: integer - start_date: - description: The start of this phase of the subscription schedule. - format: unix-time + unit: + description: A unit of time. + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + description: Must be greater than 0. type: integer required: - - end_date - - start_date - title: SubscriptionScheduleCurrentPhase + - unit + - value + title: ShippingRateDeliveryEstimateBound type: object x-expandableFields: [] - subscription_schedule_phase_configuration: - description: A phase describes the plans, coupon, and trialing status of a subscription - for a predefined time period. + shipping_rate_fixed_amount: + description: '' properties: - add_invoice_items: - description: A list of prices and quantities that will generate invoice - items appended to the first invoice for this phase. - items: - "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" - type: array - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the application owner's Stripe account - during this phase of the schedule. - nullable: true - type: number - automatic_tax: - "$ref": "#/components/schemas/schedules_phase_automatic_tax" - billing_cycle_anchor: - description: Possible values are `phase_start` or `automatic`. If `phase_start` - then billing cycle anchor of the subscription is set to the start of the - phase when entering the phase. If `automatic` then the billing cycle anchor - is automatically modified as needed when entering the phase. For more - information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - enum: - - automatic - - phase_start - nullable: true - type: string - billing_thresholds: - anyOf: - - "$ref": "#/components/schemas/subscription_billing_thresholds" - description: Define thresholds at which an invoice will be sent, and the - subscription advanced to a new billing period - nullable: true - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When charging - automatically, Stripe will attempt to pay the underlying subscription - at the end of each billing cycle using the default source attached to - the customer. When sending an invoice, Stripe will email your customer - an invoice with payment instructions. - enum: - - charge_automatically - - send_invoice - nullable: true - type: string - coupon: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/coupon" - - "$ref": "#/components/schemas/deleted_coupon" - description: ID of the coupon to use during this phase of the subscription - schedule. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/coupon" - - "$ref": "#/components/schemas/deleted_coupon" - default_payment_method: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the default payment method for the subscription schedule. - It must belong to the customer associated with the subscription schedule. - If not set, invoices will use the default payment method in the customer's - invoice settings. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - default_tax_rates: - description: The default tax rates to apply to the subscription during this - phase of the subscription schedule. - items: - "$ref": "#/components/schemas/tax_rate" - nullable: true - type: array - end_date: - description: The end of this phase of the subscription schedule. - format: unix-time + amount: + description: A non-negative integer in cents representing how much to charge. type: integer - invoice_settings: - anyOf: - - "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" - description: The invoice settings applicable during this phase. - nullable: true - items: - description: Subscription items to configure the subscription to during - this phase of the subscription schedule. - items: - "$ref": "#/components/schemas/subscription_schedule_configuration_item" - type: array - proration_behavior: - description: If the subscription schedule will prorate when transitioning - to this phase. Possible values are `create_prorations` and `none`. - enum: - - always_invoice - - create_prorations - - none + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string - start_date: - description: The start of this phase of the subscription schedule. - format: unix-time - type: integer - transfer_data: - anyOf: - - "$ref": "#/components/schemas/subscription_transfer_data" - description: The account (if any) the associated subscription's payments - will be attributed to for tax reporting, and where funds from each payment - will be transferred to for each of the subscription's invoices. - nullable: true - trial_end: - description: When the trial ends within the phase. - format: unix-time - nullable: true - type: integer + currency_options: + additionalProperties: + "$ref": "#/components/schemas/shipping_rate_currency_option" + description: Shipping rates defined in each available currency option. Each + key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object required: - - add_invoice_items - - end_date - - items - - proration_behavior - - start_date - title: SubscriptionSchedulePhaseConfiguration + - amount + - currency + title: ShippingRateFixedAmount type: object x-expandableFields: - - add_invoice_items - - automatic_tax - - billing_thresholds - - coupon - - default_payment_method - - default_tax_rates - - invoice_settings - - items - - transfer_data - subscription_schedules_resource_default_settings: + - currency_options + sigma_scheduled_query_run_error: description: '' properties: - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the application owner's Stripe account - during this phase of the schedule. - nullable: true - type: number - automatic_tax: - "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" - billing_cycle_anchor: - description: Possible values are `phase_start` or `automatic`. If `phase_start` - then billing cycle anchor of the subscription is set to the start of the - phase when entering the phase. If `automatic` then the billing cycle anchor - is automatically modified as needed when entering the phase. For more - information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - enum: - - automatic - - phase_start - type: string - billing_thresholds: - anyOf: - - "$ref": "#/components/schemas/subscription_billing_thresholds" - description: Define thresholds at which an invoice will be sent, and the - subscription advanced to a new billing period - nullable: true - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When charging - automatically, Stripe will attempt to pay the underlying subscription - at the end of each billing cycle using the default source attached to - the customer. When sending an invoice, Stripe will email your customer - an invoice with payment instructions. - enum: - - charge_automatically - - send_invoice - nullable: true + message: + description: Information about the run failure. + maxLength: 5000 type: string - default_payment_method: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/payment_method" - description: ID of the default payment method for the subscription schedule. - If not set, invoices will use the default payment method in the customer's - invoice settings. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/payment_method" - invoice_settings: - anyOf: - - "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" - description: The subscription schedule's default invoice settings. - nullable: true - transfer_data: - anyOf: - - "$ref": "#/components/schemas/subscription_transfer_data" - description: The account (if any) the associated subscription's payments - will be attributed to for tax reporting, and where funds from each payment - will be transferred to for each of the subscription's invoices. - nullable: true - required: - - billing_cycle_anchor - title: SubscriptionSchedulesResourceDefaultSettings - type: object - x-expandableFields: - - automatic_tax - - billing_thresholds - - default_payment_method - - invoice_settings - - transfer_data - subscription_schedules_resource_default_settings_automatic_tax: - description: '' - properties: - enabled: - description: Whether Stripe automatically computes tax on invoices created - during this phase. - type: boolean required: - - enabled - title: SubscriptionSchedulesResourceDefaultSettingsAutomaticTax + - message + title: SigmaScheduledQueryRunError type: object x-expandableFields: [] - subscription_transfer_data: - description: '' - properties: - amount_percent: - description: A non-negative decimal between 0 and 100, with at most two - decimal places. This represents the percentage of the subscription invoice - subtotal that will be transferred to the destination account. By default, - the entire amount is transferred to the destination. - nullable: true - type: number - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: The account where funds from the payment will be transferred - to upon payment success. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - required: - - destination - title: SubscriptionTransferData - type: object - x-expandableFields: - - destination - subscriptions_resource_pause_collection: + sku: description: |- - The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription - should be paused. - properties: - behavior: - description: The payment collection behavior for this subscription while - paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. - enum: - - keep_as_draft - - mark_uncollectible - - void - type: string - resumes_at: - description: The time after which the subscription will resume collecting - payments. - format: unix-time - nullable: true - type: integer - required: - - behavior - title: SubscriptionsResourcePauseCollection - type: object - x-expandableFields: [] - subscriptions_resource_payment_method_options: - description: '' - properties: - acss_debit: - anyOf: - - "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" - description: This sub-hash contains details about the Canadian pre-authorized - debit payment method options to pass to invoices created by the subscription. - nullable: true - bancontact: - anyOf: - - "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" - description: This sub-hash contains details about the Bancontact payment - method options to pass to invoices created by the subscription. - nullable: true - card: - anyOf: - - "$ref": "#/components/schemas/subscription_payment_method_options_card" - description: This sub-hash contains details about the Card payment method - options to pass to invoices created by the subscription. - nullable: true - title: SubscriptionsResourcePaymentMethodOptions - type: object - x-expandableFields: - - acss_debit - - bancontact - - card - subscriptions_resource_payment_settings: - description: '' + Stores representations of [stock keeping units](http://en.wikipedia.org/wiki/Stock_keeping_unit). + SKUs describe specific product variations, taking into account any combination of: attributes, + currency, and cost. For example, a product may be a T-shirt, whereas a specific SKU represents + the `size: large`, `color: red` version of that shirt. + + Can also be used to manage inventory. properties: - payment_method_options: - anyOf: - - "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" - description: Payment-method-specific configuration to provide to invoices - created by the subscription. - nullable: true - payment_method_types: - description: The list of payment method types to provide to every invoice - created by the subscription. If not set, Stripe attempts to automatically - determine the types to use by looking at the invoice’s default payment - method, the subscription’s default payment method, the customer’s default - payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). - items: - enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - fpx - - giropay - - grabpay - - ideal - - sepa_debit - - sofort - - wechat_pay + active: + description: Whether the SKU is available for purchase. + type: boolean + attributes: + additionalProperties: + maxLength: 5000 type: string - x-stripeBypassValidation: true - nullable: true - type: array - title: SubscriptionsResourcePaymentSettings - type: object - x-expandableFields: - - payment_method_options - subscriptions_resource_pending_update: - description: |- - Pending Updates store the changes pending from a previous update that will be applied - to the Subscription upon successful payment. - properties: - billing_cycle_anchor: - description: If the update is applied, determines the date of the first - full invoice, and, for plans with `month` or `year` intervals, the day - of the month for subsequent invoices. - format: unix-time - nullable: true - type: integer - expires_at: - description: The point after which the changes reflected by this update - will be discarded and no longer applied. - format: unix-time - type: integer - subscription_items: - description: List of subscription items, each with an attached plan, that - will be set if the update is applied. - items: - "$ref": "#/components/schemas/subscription_item" - nullable: true - type: array - trial_end: - description: Unix timestamp representing the end of the trial period the - customer will get before being charged for the first time, if the update - is applied. + description: 'A dictionary of attributes and values for the attributes defined + by the product. If, for example, a product''s attributes are `["size", + "gender"]`, a valid SKU has the following dictionary of attributes: `{"size": + "Medium", "gender": "Unisex"}`.' + type: object + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. format: unix-time - nullable: true type: integer - trial_from_plan: - description: Indicates if a plan's `trial_period_days` should be applied - to the subscription. Setting `trial_end` per subscription is preferred, - and this defaults to `false`. Setting this flag to `true` together with - `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) - to learn more. - nullable: true - type: boolean - required: - - expires_at - title: SubscriptionsResourcePendingUpdate - type: object - x-expandableFields: - - subscription_items - tax_code: - description: "[Tax codes](https://stripe.com/docs/tax/tax-codes) classify goods - and services for tax purposes." - properties: - description: - description: A detailed description of which types of products the tax code - represents. - maxLength: 5000 + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string id: description: Unique identifier for the object. maxLength: 5000 type: string - name: - description: A short name for the tax code. - maxLength: 5000 + image: + description: The URL of an image for this SKU, meant to be displayable to + the customer. + maxLength: 2048 + nullable: true type: string + inventory: + "$ref": "#/components/schemas/sku_inventory" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object object: description: String representing the object's type. Objects of the same type share the same value. enum: - - tax_code + - sku type: string + package_dimensions: + anyOf: + - "$ref": "#/components/schemas/package_dimensions" + description: The dimensions of this SKU for shipping purposes. + nullable: true + price: + description: The cost of the item as a positive integer in the smallest + currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, + Japanese Yen being a zero-decimal currency). + type: integer + product: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/product" + description: The ID of the product this SKU is associated with. The product + must be currently active. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/product" + updated: + description: Time at which the object was last updated. Measured in seconds + since the Unix epoch. + format: unix-time + type: integer required: - - description + - active + - attributes + - created + - currency - id - - name + - inventory + - livemode + - metadata - object - title: TaxProductResourceTaxCode + - price + - product + - updated + title: Sku type: object - x-expandableFields: [] - x-resourceId: tax_code - tax_deducted_at_source: + x-expandableFields: + - inventory + - package_dimensions + - product + x-resourceId: sku + sku_inventory: description: '' properties: - id: - description: Unique identifier for the object. + quantity: + description: The count of inventory available. Will be present if and only + if `type` is `finite`. + nullable: true + type: integer + type: + description: Inventory type. Possible values are `finite`, `bucket` (not + quantified), and `infinite`. maxLength: 5000 type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - tax_deducted_at_source - type: string - period_end: - description: The end of the invoicing period. This TDS applies to Stripe - fees collected during this invoicing period. - format: unix-time - type: integer - period_start: - description: The start of the invoicing period. This TDS applies to Stripe - fees collected during this invoicing period. - format: unix-time - type: integer - tax_deduction_account_number: - description: The TAN that was supplied to Stripe when TDS was assessed + value: + description: An indicator of the inventory available. Possible values are + `in_stock`, `limited`, and `out_of_stock`. Will be present if and only + if `type` is `bucket`. maxLength: 5000 + nullable: true type: string required: - - id - - object - - period_end - - period_start - - tax_deduction_account_number - title: TaxDeductedAtSource + - type + title: SKUInventory type: object x-expandableFields: [] - tax_id: + source: description: |- - You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). - A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + `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 guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). properties: - country: - description: Two-letter ISO code representing the country of the tax ID. - maxLength: 5000 + ach_credit_transfer: + "$ref": "#/components/schemas/source_type_ach_credit_transfer" + ach_debit: + "$ref": "#/components/schemas/source_type_ach_debit" + acss_debit: + "$ref": "#/components/schemas/source_type_acss_debit" + alipay: + "$ref": "#/components/schemas/source_type_alipay" + amount: + description: A positive integer in the smallest currency unit (that is, + 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) + representing the total amount associated with the source. This is the + amount for which the source will be chargeable once ready. Required for + `single_use` sources. nullable: true + type: integer + au_becs_debit: + "$ref": "#/components/schemas/source_type_au_becs_debit" + bancontact: + "$ref": "#/components/schemas/source_type_bancontact" + card: + "$ref": "#/components/schemas/source_type_card" + card_present: + "$ref": "#/components/schemas/source_type_card_present" + client_secret: + description: The client secret of the source. Used for client-side retrieval + using a publishable key. + maxLength: 5000 type: string + code_verification: + "$ref": "#/components/schemas/source_code_verification_flow" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - customer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/customer" - description: ID of the customer. + currency: + description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) + associated with the source. This is the currency for which the source + will be chargeable once ready. Required for `single_use` sources. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/customer" + type: string + customer: + description: The ID of the customer to which this source is attached. This + will not be present when the source has not been attached to a customer. + maxLength: 5000 + type: string + eps: + "$ref": "#/components/schemas/source_type_eps" + flow: + description: The authentication `flow` of the source. `flow` is one of `redirect`, + `receiver`, `code_verification`, `none`. + maxLength: 5000 + type: string + giropay: + "$ref": "#/components/schemas/source_type_giropay" id: description: Unique identifier for the object. maxLength: 5000 type: string + ideal: + "$ref": "#/components/schemas/source_type_ideal" + klarna: + "$ref": "#/components/schemas/source_type_klarna" livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + multibanco: + "$ref": "#/components/schemas/source_type_multibanco" object: description: String representing the object's type. Objects of the same type share the same value. enum: - - tax_id + - source + type: string + owner: + anyOf: + - "$ref": "#/components/schemas/source_owner" + description: Information about the owner of the payment instrument that + may be used or required by particular source types. + nullable: true + p24: + "$ref": "#/components/schemas/source_type_p24" + receiver: + "$ref": "#/components/schemas/source_receiver_flow" + redirect: + "$ref": "#/components/schemas/source_redirect_flow" + sepa_debit: + "$ref": "#/components/schemas/source_type_sepa_debit" + sofort: + "$ref": "#/components/schemas/source_type_sofort" + source_order: + "$ref": "#/components/schemas/source_order" + statement_descriptor: + description: Extra information about a source. This will appear on your + customer's statement every time you charge the source. + maxLength: 5000 + nullable: true + type: string + status: + description: The status of the source, one of `canceled`, `chargeable`, + `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used + to create a charge. + maxLength: 5000 type: string + three_d_secure: + "$ref": "#/components/schemas/source_type_three_d_secure" type: - description: Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `br_cnpj`, - `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, - `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, `gb_vat`, `ge_vat`, - `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, - `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, - `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `th_vat`, `tw_vat`, - `ua_vat`, `us_ein`, or `za_vat`. Note that some legacy tax IDs have type - `unknown` + description: The `type` of the source. The `type` is a payment method, one + of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, + `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, + `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash + is included on the source with a name matching this value. It contains + additional information specific to the [payment method](https://stripe.com/docs/sources) + used. enum: - - ae_trn - - au_abn - - au_arn - - br_cnpj - - br_cpf - - ca_bn - - ca_gst_hst - - ca_pst_bc - - ca_pst_mb - - ca_pst_sk - - ca_qst - - ch_vat - - cl_tin - - es_cif - - eu_vat - - gb_vat - - ge_vat - - hk_br - - id_npwp - - il_vat - - in_gst - - is_vat - - jp_cn - - jp_rn - - kr_brn - - li_uid - - mx_rfc - - my_frp - - my_itn - - my_sst - - no_vat - - nz_gst - - ru_inn - - ru_kpp - - sa_vat - - sg_gst - - sg_uen - - th_vat - - tw_vat - - ua_vat - - unknown - - us_ein - - za_vat + - ach_credit_transfer + - ach_debit + - acss_debit + - alipay + - au_becs_debit + - bancontact + - card + - card_present + - eps + - giropay + - ideal + - klarna + - multibanco + - p24 + - sepa_debit + - sofort + - three_d_secure + - wechat type: string - value: - description: Value of the tax ID. + x-stripeBypassValidation: true + usage: + description: Either `reusable` or `single_use`. Whether this source should + be reusable or not. Some source types may or may not be reusable by construction, + while others may leave the option at creation. If an incompatible value + is passed, an error will be returned. maxLength: 5000 - type: string - verification: - anyOf: - - "$ref": "#/components/schemas/tax_id_verification" - description: Tax ID verification information. nullable: true + type: string + wechat: + "$ref": "#/components/schemas/source_type_wechat" required: + - client_secret - created + - flow - id - livemode - object + - status - type - - value - title: tax_id + title: Source type: object x-expandableFields: - - customer - - verification - x-resourceId: tax_id - tax_id_verification: + - code_verification + - owner + - receiver + - redirect + - source_order + x-resourceId: source + source_code_verification_flow: description: '' properties: + attempts_remaining: + description: The number of attempts remaining to authenticate the source + object with a verification code. + type: integer status: - description: Verification status, one of `pending`, `verified`, `unverified`, - or `unavailable`. - enum: - - pending - - unavailable - - unverified - - verified - type: string - verified_address: - description: Verified address. - maxLength: 5000 - nullable: true - type: string - verified_name: - description: Verified name. + description: The status of the code verification, either `pending` (awaiting + verification, `attempts_remaining` should be greater than 0), `succeeded` + (successful verification) or `failed` (failed verification, cannot be + verified anymore as `attempts_remaining` should be 0). maxLength: 5000 - nullable: true type: string required: + - attempts_remaining - status - title: tax_id_verification + title: SourceCodeVerificationFlow type: object x-expandableFields: [] - tax_rate: + source_mandate_notification: description: |- - Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. - - Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). + 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. properties: - active: - description: Defaults to `true`. When set to `false`, this tax rate cannot - be used with new applications or Checkout Sessions, but will still work - for subscriptions and invoices that already have it set. - type: boolean - country: - description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - maxLength: 5000 + acss_debit: + "$ref": "#/components/schemas/source_mandate_notification_acss_debit_data" + amount: + description: A positive integer in the smallest currency unit (that is, + 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) + representing the amount associated with the mandate notification. The + amount is expressed in the currency of the underlying source. Required + if the notification type is `debit_initiated`. nullable: true - type: string + type: integer + bacs_debit: + "$ref": "#/components/schemas/source_mandate_notification_bacs_debit_data" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. format: unix-time type: integer - description: - description: An arbitrary string attached to the tax rate for your internal - use only. It will not be visible to your customers. - maxLength: 5000 - nullable: true - type: string - display_name: - description: The display name of the tax rates as it will appear to your - customer on their receipt email, PDF, and the hosted invoice page. - maxLength: 5000 - type: string id: description: Unique identifier for the object. maxLength: 5000 type: string - inclusive: - description: This specifies if the tax rate is inclusive or exclusive. - type: boolean - jurisdiction: - description: The jurisdiction for the tax rate. You can use this label field - for tax reporting purposes. It also appears on your customer’s invoice. - maxLength: 5000 - nullable: true - type: string livemode: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object object: description: String representing the object's type. Objects of the same type share the same value. enum: - - tax_rate + - source_mandate_notification type: string - percentage: - description: This represents the tax rate percent out of 100. - type: number - state: - description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), - without country prefix. For example, "NY" for New York, United States.' + reason: + description: The reason of the mandate notification. Valid reasons are `mandate_confirmed` + or `debit_initiated`. maxLength: 5000 - nullable: true type: string - tax_type: - description: The high-level tax type, such as `vat` or `sales_tax`. - enum: - - gst - - hst - - jct - - pst - - qst - - rst - - sales_tax - - vat - nullable: true + sepa_debit: + "$ref": "#/components/schemas/source_mandate_notification_sepa_debit_data" + source: + "$ref": "#/components/schemas/source" + status: + description: The status of the mandate notification. Valid statuses are + `pending` or `submitted`. + maxLength: 5000 + type: string + type: + description: The type of source this mandate notification is attached to. + Should be the source type identifier code for the payment method, such + as `three_d_secure`. + maxLength: 5000 type: string required: - - active - created - - display_name - id - - inclusive - livemode - object - - percentage - title: TaxRate + - reason + - source + - status + - type + title: SourceMandateNotification type: object - x-expandableFields: [] - x-resourceId: tax_rate - terminal.connection_token: - description: |- - A Connection Token is used by the Stripe Terminal SDK to connect to a reader. - - Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + x-expandableFields: + - acss_debit + - bacs_debit + - sepa_debit + - source + x-resourceId: source_mandate_notification + source_mandate_notification_acss_debit_data: + description: '' properties: - location: - description: The id of the location that this connection token is scoped - to. Note that location scoping only applies to internet-connected readers. - For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + statement_descriptor: + description: The statement descriptor associate with the debit. maxLength: 5000 type: string - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - terminal.connection_token - type: string - secret: - description: Your application should pass this token to the Stripe Terminal - SDK. + title: SourceMandateNotificationAcssDebitData + type: object + x-expandableFields: [] + source_mandate_notification_bacs_debit_data: + description: '' + properties: + last4: + description: Last 4 digits of the account number associated with the debit. maxLength: 5000 type: string - required: - - object - - secret - title: TerminalConnectionToken + title: SourceMandateNotificationBacsDebitData type: object x-expandableFields: [] - x-resourceId: terminal.connection_token - terminal.location: - description: |- - A Location represents a grouping of readers. - - Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + source_mandate_notification_sepa_debit_data: + description: '' properties: - address: - "$ref": "#/components/schemas/address" - display_name: - description: The display name of the location. + creditor_identifier: + description: SEPA creditor ID. maxLength: 5000 type: string - id: - description: Unique identifier for the object. + last4: + description: Last 4 digits of the account number associated with the debit. maxLength: 5000 type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - terminal.location + mandate_reference: + description: Mandate reference associated with the debit. + maxLength: 5000 + type: string + title: SourceMandateNotificationSepaDebitData + type: object + x-expandableFields: [] + source_order: + description: '' + properties: + amount: + description: A positive integer in the smallest currency unit (that is, + 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) + representing the total amount for the order. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + email: + description: The email address of the customer placing the order. + maxLength: 5000 type: string + items: + description: List of items constituting the order. + items: + "$ref": "#/components/schemas/source_order_item" + nullable: true + type: array + shipping: + "$ref": "#/components/schemas/shipping" required: - - address - - display_name - - id - - livemode - - metadata - - object - title: TerminalLocationLocation + - amount + - currency + title: SourceOrder type: object x-expandableFields: - - address - x-resourceId: terminal.location - terminal.reader: - description: |- - A Reader represents a physical device for accepting payment details. - - Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). + - items + - shipping + source_order_item: + description: '' properties: - device_sw_version: - description: The current software version of the reader. - maxLength: 5000 + amount: + description: The amount (price) for this order item. nullable: true - type: string - device_type: - description: Type of reader, one of `bbpos_chipper2x`, `bbpos_wisepos_e`, - or `verifone_P400`. - enum: - - bbpos_chipper2x - - bbpos_wisepos_e - - verifone_P400 - type: string - id: - description: Unique identifier for the object. + type: integer + currency: + description: This currency of this order item. Required when `amount` is + present. maxLength: 5000 + nullable: true type: string - ip_address: - description: The local IP address of the reader. + description: + description: Human-readable description for this order item. maxLength: 5000 nullable: true type: string - label: - description: Custom label given to the reader for easier identification. + parent: + description: The ID of the associated object for this line item. Expandable + if not null (e.g., expandable to a SKU). maxLength: 5000 - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - location: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/terminal.location" - description: The location identifier of the reader. nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/terminal.location" - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - terminal.reader - type: string - serial_number: - description: Serial number of the reader. - maxLength: 5000 type: string - status: - description: The networking status of the reader. + quantity: + description: The quantity of this order item. When type is `sku`, this is + the number of instances of the SKU to be ordered. + type: integer + type: + description: The type of this order item. Must be `sku`, `tax`, or `shipping`. maxLength: 5000 nullable: true type: string - required: - - device_type - - id - - label - - livemode - - metadata - - object - - serial_number - title: TerminalReaderReader + title: SourceOrderItem type: object - x-expandableFields: - - location - x-resourceId: terminal.reader - three_d_secure: - description: |- - Cardholder authentication via 3D Secure is initiated by creating a `3D Secure` - object. Once the object has been created, you can use it to authenticate the - cardholder and create a charge. + x-expandableFields: [] + source_owner: + description: '' properties: - amount: - description: Amount of the charge that you will create when authentication - completes. - type: integer - authenticated: - description: True if the cardholder went through the authentication flow - and their bank indicated that authentication succeeded. - type: boolean - card: - "$ref": "#/components/schemas/card" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Owner's address. + nullable: true + email: + description: Owner's email address. maxLength: 5000 + nullable: true type: string - id: - description: Unique identifier for the object. + name: + description: Owner's full name. maxLength: 5000 + nullable: true type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - three_d_secure + phone: + description: Owner's phone number (including extension). + maxLength: 5000 + nullable: true type: string - redirect_url: - description: If present, this is the URL that you should send the cardholder - to for authentication. If you are going to use Stripe.js to display the - authentication page in an iframe, you should use the value "_callback". + verified_address: + anyOf: + - "$ref": "#/components/schemas/address" + description: Verified owner's address. Verified values are verified or provided + by the payment method directly (and if supported) at the time of authorization + or settlement. They cannot be set or mutated. + nullable: true + verified_email: + description: Verified owner's email address. Verified values are verified + or provided by the payment method directly (and if supported) at the time + of authorization or settlement. They cannot be set or mutated. maxLength: 5000 nullable: true type: string - status: - description: Possible values are `redirect_pending`, `succeeded`, or `failed`. - When the cardholder can be authenticated, the object starts with status - `redirect_pending`. When liability will be shifted to the cardholder's - bank (either because the cardholder was successfully authenticated, or - because the bank has not implemented 3D Secure, the object wlil be in - status `succeeded`. `failed` indicates that authentication was attempted - unsuccessfully. + verified_name: + description: Verified owner's full name. Verified values are verified or + provided by the payment method directly (and if supported) at the time + of authorization or settlement. They cannot be set or mutated. maxLength: 5000 + nullable: true type: string - required: - - amount - - authenticated - - card - - created - - currency - - id - - livemode - - object - - status - title: ThreeDSecure + verified_phone: + description: Verified owner's phone number (including extension). Verified + values are verified or provided by the payment method directly (and if + supported) at the time of authorization or settlement. They cannot be + set or mutated. + maxLength: 5000 + nullable: true + type: string + title: SourceOwner type: object x-expandableFields: - - card - x-resourceId: three_d_secure - three_d_secure_details: + - address + - verified_address + source_receiver_flow: description: '' properties: - authentication_flow: - description: |- - For authenticated transactions: how the customer was authenticated by - the issuing bank. - enum: - - challenge - - frictionless - nullable: true - type: string - result: - description: Indicates the outcome of 3D Secure authentication. - enum: - - attempt_acknowledged - - authenticated - - failed - - not_supported - - processing_error + address: + description: The address of the receiver source. This is the value that + should be communicated to the customer to send their funds to. + maxLength: 5000 nullable: true type: string - x-stripeBypassValidation: true - result_reason: - description: |- - Additional information about why 3D Secure succeeded or failed based - on the `result`. - enum: - - abandoned - - bypassed - - canceled - - card_not_enrolled - - network_not_supported - - protocol_error - - rejected - nullable: true + amount_charged: + description: The total amount that was moved to your balance. This is almost + always equal to the amount charged. In rare cases when customers deposit + excess funds and we are unable to refund those, those funds get moved + to your balance and show up in amount_charged as well. The amount charged + is expressed in the source's currency. + type: integer + amount_received: + description: The total amount received by the receiver source. `amount_received + = amount_returned + amount_charged` should be true for consumed sources + unless customers deposit excess funds. The amount received is expressed + in the source's currency. + type: integer + amount_returned: + description: The total amount that was returned to the customer. The amount + returned is expressed in the source's currency. + type: integer + refund_attributes_method: + description: Type of refund attribute method, one of `email`, `manual`, + or `none`. + maxLength: 5000 type: string - version: - description: The version of 3D Secure that was used. - enum: - - 1.0.2 - - 2.1.0 - - 2.2.0 - nullable: true + refund_attributes_status: + description: Type of refund attribute status, one of `missing`, `requested`, + or `available`. + maxLength: 5000 type: string - x-stripeBypassValidation: true - title: three_d_secure_details - type: object - x-expandableFields: [] - three_d_secure_usage: - description: '' - properties: - supported: - description: Whether 3D Secure is supported on this card. - type: boolean required: - - supported - title: three_d_secure_usage + - amount_charged + - amount_received + - amount_returned + - refund_attributes_method + - refund_attributes_status + title: SourceReceiverFlow type: object x-expandableFields: [] - token: - description: |- - Tokenization is the process Stripe uses to collect sensitive card or bank - account details, or personally identifiable information (PII), directly from - your customers in a secure manner. A token representing this information is - returned to your server to use. You should use our - [recommended payments integrations](https://stripe.com/docs/payments) to perform this process - client-side. This ensures that no sensitive card data touches your server, - and allows your integration to operate in a PCI-compliant way. - - If you cannot use client-side tokenization, you can also create tokens using - the API with either your publishable or secret API key. Keep in mind that if - your integration uses this method, you are responsible for any PCI compliance - that may be required, and you must keep your secret API key safe. Unlike with - client-side tokenization, your customer's information is not sent directly to - Stripe, so we cannot determine how it is handled or stored. - - Tokens cannot be stored or used more than once. To store card or bank account - information for later use, you can create [Customer](https://stripe.com/docs/api#customers) - objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that - [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, - performs best with integrations that use client-side tokenization. - - Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) + source_redirect_flow: + description: '' properties: - bank_account: - "$ref": "#/components/schemas/bank_account" - card: - "$ref": "#/components/schemas/card" - client_ip: - description: IP address of the client that generated the token. + failure_reason: + description: The failure reason for the redirect, either `user_abort` (the + customer aborted or dropped out of the redirect flow), `declined` (the + authentication failed or the transaction was declined), or `processing_error` + (the redirect failed due to a technical error). Present only if the redirect + status is `failed`. maxLength: 5000 nullable: true type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - id: - description: Unique identifier for the object. + return_url: + description: The URL you provide to redirect the customer to after they + authenticated their payment. maxLength: 5000 type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - token - type: string - type: - description: 'Type of the token: `account`, `bank_account`, `card`, or `pii`.' + status: + description: The status of the redirect, either `pending` (ready to be used + by your customer to authenticate the transaction), `succeeded` (succesful + authentication, cannot be reused) or `not_required` (redirect should not + be used) or `failed` (failed authentication, cannot be reused). maxLength: 5000 type: string - used: - description: Whether this token has already been used (tokens can be used - only once). - type: boolean + url: + description: The URL provided to you to redirect a customer to as part of + a `redirect` authentication flow. + maxLength: 2048 + type: string required: - - created - - id - - livemode - - object - - type - - used - title: Token + - return_url + - status + - url + title: SourceRedirectFlow type: object - x-expandableFields: - - bank_account - - card - x-resourceId: token - topup: + x-expandableFields: [] + source_transaction: description: |- - To top up your Stripe balance, you create a top-up object. You can retrieve - individual top-ups, as well as list all top-ups. Top-ups are identified by a - unique, random ID. - - Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). + 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. properties: + ach_credit_transfer: + "$ref": "#/components/schemas/source_transaction_ach_credit_transfer_data" amount: - description: Amount transferred. + description: A positive integer in the smallest currency unit (that is, + 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) + representing the amount your customer has pushed to the receiver. type: integer - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: ID of the balance transaction that describes the impact of - this top-up on your account balance. May not be specified depending on - status of top-up. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" + chf_credit_transfer: + "$ref": "#/components/schemas/source_transaction_chf_credit_transfer_data" created: description: Time at which the object was created. Measured in seconds since the Unix epoch. @@ -24982,33 +27096,9 @@ components: currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - maxLength: 5000 - type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. - maxLength: 5000 - nullable: true - type: string - expected_availability_date: - description: Date the funds are expected to arrive in your Stripe account - for payouts. This factors in delays like weekends or bank holidays. May - not be specified depending on status of top-up. - nullable: true - type: integer - failure_code: - description: Error code explaining reason for top-up failure if available - (see [the errors section](https://stripe.com/docs/api#errors) for a list - of codes). - maxLength: 5000 - nullable: true - type: string - failure_message: - description: Message to user further explaining reason for top-up failure - if available. - maxLength: 5000 - nullable: true type: string + gbp_credit_transfer: + "$ref": "#/components/schemas/source_transaction_gbp_credit_transfer_data" id: description: Unique identifier for the object. maxLength: 5000 @@ -25017,42 +27107,44 @@ components: description: Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object object: description: String representing the object's type. Objects of the same type share the same value. enum: - - topup + - source_transaction type: string + paper_check: + "$ref": "#/components/schemas/source_transaction_paper_check_data" + sepa_credit_transfer: + "$ref": "#/components/schemas/source_transaction_sepa_credit_transfer_data" source: - "$ref": "#/components/schemas/source" - statement_descriptor: - description: Extra information about a top-up. This will appear on your - source's bank statement. It must contain at least one letter. + description: The ID of the source this transaction is attached to. maxLength: 5000 - nullable: true type: string status: - description: The status of the top-up is either `canceled`, `failed`, `pending`, - `reversed`, or `succeeded`. - enum: - - canceled - - failed - - pending - - reversed - - succeeded - type: string - transfer_group: - description: A string that identifies this top-up as part of a group. + description: The status of the transaction, one of `succeeded`, `pending`, + or `failed`. maxLength: 5000 - nullable: true + type: string + type: + description: The type of source this transaction is attached to. + enum: + - ach_credit_transfer + - ach_debit + - alipay + - bancontact + - card + - card_present + - eps + - giropay + - ideal + - klarna + - multibanco + - p24 + - sepa_debit + - sofort + - three_d_secure + - wechat type: string required: - amount @@ -25060,1094 +27152,6051 @@ components: - currency - id - livemode - - metadata - object - source - status - title: Topup + - type + title: SourceTransaction type: object x-expandableFields: - - balance_transaction - - source - x-resourceId: topup - transfer: - description: |- - A `Transfer` object is created when you move funds between Stripe accounts as - part of Connect. - - Before April 6, 2017, transfers also represented movement of funds from a - Stripe account to a card or bank account. This behavior has since been split - out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more - information, read about the - [transfer/payout split](https://stripe.com/docs/transfer-payout-split). - - Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). + - ach_credit_transfer + - chf_credit_transfer + - gbp_credit_transfer + - paper_check + - sepa_credit_transfer + x-resourceId: source_transaction + source_transaction_ach_credit_transfer_data: + description: '' properties: - amount: - description: Amount in %s to be transferred. - type: integer - amount_reversed: - description: Amount in %s reversed (can be less than the amount attribute - on the transfer if a partial reversal was issued). - type: integer - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: Balance transaction that describes the impact of this transfer - on your account balance. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - created: - description: Time that this record of the transfer was first created. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - description: - description: An arbitrary string attached to the object. Often useful for - displaying to users. + customer_data: + description: Customer data associated with the transfer. maxLength: 5000 - nullable: true type: string - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: ID of the Stripe account the transfer was sent to. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - destination_payment: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: If the destination is a Stripe account, this will be the ID - of the payment that the destination account received for the transfer. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - id: - description: Unique identifier for the object. + fingerprint: + description: Bank account fingerprint associated with the transfer. maxLength: 5000 type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - transfer - type: string - reversals: - description: A list of reversals that have been applied to the transfer. - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/transfer_reversal" - type: array - has_more: - description: True if this list has another page of items after this - one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: TransferReversalList - type: object - x-expandableFields: - - data - reversed: - description: Whether the transfer has been fully reversed. If the transfer - is only partially reversed, this attribute will still be false. - type: boolean - source_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/charge" - description: ID of the charge or payment that was used to fund the transfer. - If null, the transfer was funded from the available balance. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/charge" - source_type: - description: The source balance this transfer came from. One of `card`, - `fpx`, or `bank_account`. + last4: + description: Last 4 digits of the account number associated with the transfer. maxLength: 5000 - nullable: true type: string - transfer_group: - description: A string that identifies this transaction as part of a group. - See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) - for details. + routing_number: + description: Routing number associated with the transfer. maxLength: 5000 - nullable: true type: string - required: - - amount - - amount_reversed - - created - - currency - - id - - livemode - - metadata - - object - - reversals - - reversed - title: Transfer + title: SourceTransactionAchCreditTransferData type: object - x-expandableFields: - - balance_transaction - - destination - - destination_payment - - reversals - - source_transaction - x-resourceId: transfer - transfer_data: + x-expandableFields: [] + source_transaction_chf_credit_transfer_data: description: '' properties: - amount: - description: Amount intended to be collected by this PaymentIntent. A positive - integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) - (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). - The amount value supports up to eight digits (e.g., a value of 99999999 - for a USD charge of $999,999.99). - type: integer - destination: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/account" - description: |- - The account (if any) the payment will be attributed to for tax - reporting, and where funds from the payment will be transferred to upon - payment success. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/account" - required: - - destination - title: transfer_data - type: object - x-expandableFields: - - destination - transfer_reversal: - description: |- - [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a - connected account, either entirely or partially, and can also specify whether - to refund any related application fees. Transfer reversals add to the - platform's balance and subtract from the destination account's balance. - - Reversing a transfer that was made for a [destination - charge](/docs/connect/destination-charges) is allowed only up to the amount of - the charge. It is possible to reverse a - [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) - transfer only if the destination account has enough balance to cover the - reversal. - - Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). - properties: - amount: - description: Amount, in %s. - type: integer - balance_transaction: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/balance_transaction" - description: Balance transaction that describes the impact on your account - balance. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/balance_transaction" - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + reference: + description: Reference associated with the transfer. + maxLength: 5000 type: string - destination_payment_refund: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/refund" - description: Linked payment refund for the transfer reversal. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/refund" - id: - description: Unique identifier for the object. + sender_address_country: + description: Sender's country address. maxLength: 5000 type: string - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - nullable: true - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - transfer_reversal + sender_address_line1: + description: Sender's line 1 address. + maxLength: 5000 type: string - source_refund: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/refund" - description: ID of the refund responsible for the transfer reversal. - nullable: true - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/refund" - transfer: - anyOf: - - maxLength: 5000 - type: string - - "$ref": "#/components/schemas/transfer" - description: ID of the transfer that was reversed. - x-expansionResources: - oneOf: - - "$ref": "#/components/schemas/transfer" - required: - - amount - - created - - currency - - id - - object - - transfer - title: TransferReversal - type: object - x-expandableFields: - - balance_transaction - - destination_payment_refund - - source_refund - - transfer - x-resourceId: transfer_reversal - transfer_schedule: - description: '' - properties: - delay_days: - description: The number of days charges for the account will be held before - being paid out. - type: integer - interval: - description: How frequently funds will be paid out. One of `manual` (payouts - only created via API call), `daily`, `weekly`, or `monthly`. + sender_iban: + description: Sender's bank account IBAN. maxLength: 5000 type: string - monthly_anchor: - description: The day of the month funds will be paid out. Only shown if - `interval` is monthly. Payouts scheduled between the 29th and 31st of - the month are sent on the last day of shorter months. - type: integer - weekly_anchor: - description: The day of the week funds will be paid out, of the style 'monday', - 'tuesday', etc. Only shown if `interval` is weekly. + sender_name: + description: Sender's name. maxLength: 5000 type: string - required: - - delay_days - - interval - title: TransferSchedule + title: SourceTransactionChfCreditTransferData type: object x-expandableFields: [] - transform_quantity: + source_transaction_gbp_credit_transfer_data: description: '' properties: - divide_by: - description: Divide usage by this number. - type: integer - round: - description: After division, either round the result `up` or `down`. - enum: - - down - - up + fingerprint: + description: Bank account fingerprint associated with the Stripe owned bank + account receiving the transfer. + maxLength: 5000 type: string - required: - - divide_by - - round - title: TransformQuantity - type: object - x-expandableFields: [] - transform_usage: - description: '' - properties: - divide_by: - description: Divide usage by this number. - type: integer - round: - description: After division, either round the result `up` or `down`. - enum: - - down - - up + funding_method: + description: 'The credit transfer rails the sender used to push this transfer. + The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. + Currently only Faster Payments is supported.' + maxLength: 5000 type: string - required: - - divide_by - - round - title: TransformUsage - type: object - x-expandableFields: [] - usage_record: - description: |- - Usage records allow you to report customer usage and metrics to Stripe for - metered billing of subscription prices. - - Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). - properties: - id: - description: Unique identifier for the object. + last4: + description: Last 4 digits of sender account number associated with the + transfer. maxLength: 5000 type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - usage_record + reference: + description: Sender entered arbitrary information about the transfer. + maxLength: 5000 type: string - quantity: - description: The usage quantity for the specified date. - type: integer - subscription_item: - description: The ID of the subscription item this usage record contains - data for. + sender_account_number: + description: Sender account number associated with the transfer. maxLength: 5000 type: string - timestamp: - description: The timestamp when this usage occurred. - format: unix-time - type: integer - required: - - id - - livemode - - object - - quantity - - subscription_item - - timestamp - title: UsageRecord + sender_name: + description: Sender name associated with the transfer. + maxLength: 5000 + type: string + sender_sort_code: + description: Sender sort code associated with the transfer. + maxLength: 5000 + type: string + title: SourceTransactionGbpCreditTransferData type: object x-expandableFields: [] - x-resourceId: usage_record - usage_record_summary: + source_transaction_paper_check_data: description: '' properties: - id: - description: Unique identifier for the object. - maxLength: 5000 - type: string - invoice: - description: The invoice in which this usage period has been billed for. + available_at: + description: Time at which the deposited funds will be available for use. + Measured in seconds since the Unix epoch. maxLength: 5000 - nullable: true - type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - usage_record_summary type: string - period: - "$ref": "#/components/schemas/period" - subscription_item: - description: The ID of the subscription item this summary is describing. + invoices: + description: Comma-separated list of invoice IDs associated with the paper + check. maxLength: 5000 type: string - total_usage: - description: The total usage within this usage period. - type: integer - required: - - id - - livemode - - object - - period - - subscription_item - - total_usage - title: UsageRecordSummary + title: SourceTransactionPaperCheckData type: object - x-expandableFields: - - period - x-resourceId: usage_record_summary - verification_session_redaction: + x-expandableFields: [] + source_transaction_sepa_credit_transfer_data: description: '' properties: - status: - description: Indicates whether this object and its related objects have - been redacted or not. - enum: - - processing - - redacted + reference: + description: Reference associated with the transfer. + maxLength: 5000 type: string - required: - - status - title: verification_session_redaction + sender_iban: + description: Sender's bank account IBAN. + maxLength: 5000 + type: string + sender_name: + description: Sender's name. + maxLength: 5000 + type: string + title: SourceTransactionSepaCreditTransferData type: object x-expandableFields: [] - webhook_endpoint: - description: |- - You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be - notified about events that happen in your Stripe account or connected - accounts. - - Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. - - Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + source_type_ach_credit_transfer: properties: - api_version: - description: The API version events are rendered as for this webhook endpoint. - maxLength: 5000 + account_number: nullable: true type: string - application: - description: The ID of the associated Connect application. - maxLength: 5000 + bank_name: nullable: true type: string - created: - description: Time at which the object was created. Measured in seconds since - the Unix epoch. - format: unix-time - type: integer - description: - description: An optional description of what the webhook is used for. - maxLength: 5000 + fingerprint: nullable: true type: string - enabled_events: - description: The list of events to enable for this endpoint. `['*']` indicates - that all events are enabled, except those that require explicit selection. - items: - maxLength: 5000 - type: string - type: array - id: - description: Unique identifier for the object. - maxLength: 5000 + refund_account_holder_name: + nullable: true type: string - livemode: - description: Has the value `true` if the object exists in live mode or the - value `false` if the object exists in test mode. - type: boolean - metadata: - additionalProperties: - maxLength: 500 - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing additional - information about the object in a structured format. - type: object - object: - description: String representing the object's type. Objects of the same - type share the same value. - enum: - - webhook_endpoint + refund_account_holder_type: + nullable: true type: string - secret: - description: The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). - Only returned at creation. - maxLength: 5000 + refund_routing_number: + nullable: true type: string - status: - description: The status of the webhook. It can be `enabled` or `disabled`. - maxLength: 5000 + routing_number: + nullable: true type: string - url: - description: The URL of the webhook endpoint. - maxLength: 5000 + swift_code: + nullable: true type: string - required: - - created - - enabled_events - - id - - livemode - - metadata - - object - - status - - url - title: NotificationWebhookEndpoint type: object - x-expandableFields: [] - x-resourceId: webhook_endpoint - securitySchemes: - basicAuth: - description: 'Basic HTTP authentication. Allowed headers-- Authorization: Basic - | Authorization: Basic ' - scheme: basic - type: http - bearerAuth: - bearerFormat: auth-scheme - description: 'Bearer HTTP authentication. Allowed headers-- Authorization: Bearer - ' - scheme: bearer - type: http -info: - contact: - email: dev-platform@stripe.com - name: Stripe Dev Platform Team - url: https://stripe.com - description: The Stripe REST API. Please see https://stripe.com/docs/api for more - details. - termsOfService: https://stripe.com/us/terms/ - title: Stripe API - version: '2020-08-27' - x-stripeSpecFilename: spec3 -openapi: 3.0.0 -paths: - "/v1/3d_secure": - post: - description: "

Initiate 3D Secure authentication.

" - operationId: Post3dSecure - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: Amount of the charge that you will create when authentication - completes. - type: integer - card: - description: The ID of a card token, or the ID of a card belonging - to the given customer. - maxLength: 5000 - type: string - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - customer: - description: The customer associated with this 3D secure authentication. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - return_url: - description: The URL that the cardholder's browser will be returned - to when authentication completes. - type: string - required: - - amount - - currency - - return_url - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/three_d_secure" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/3d_secure/{three_d_secure}": - get: - description: "

Retrieves a 3D Secure object.

" - operationId: Get3dSecureThreeDSecure - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: three_d_secure - required: true - schema: - maxLength: 5000 + source_type_ach_debit: + properties: + bank_name: + nullable: true type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/three_d_secure" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/account": - delete: - description: |- -

With Connect, you can delete accounts you manage.

- -

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

- -

If you want to delete your own account, use the account information tab in your account settings instead.

- operationId: DeleteAccount - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: - account: - maxLength: 5000 - type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/deleted_account" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - get: - description: "

Retrieves the details of an account.

" - operationId: GetAccount - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/account" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: |- -

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

- -

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

- operationId: PostAccount - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - bank_account: - explode: true - style: deepObject - business_profile: - explode: true - style: deepObject - capabilities: - explode: true - style: deepObject - company: - explode: true - style: deepObject - documents: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - individual: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - settings: - explode: true - style: deepObject - tos_acceptance: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - account_token: - description: An [account token](https://stripe.com/docs/api#create_account_token), - used to securely provide details to the account. - maxLength: 5000 - type: string - bank_account: - anyOf: - - properties: - account_holder_name: - maxLength: 5000 - type: string - account_holder_type: - enum: - - company - - individual - maxLength: 5000 - type: string - account_number: - maxLength: 5000 - type: string - account_type: - enum: - - checking - - futsu - - savings - - toza - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - currency: - type: string - object: - enum: - - bank_account - maxLength: 5000 - type: string - routing_number: - maxLength: 5000 - type: string - required: - - account_number - - country - title: external_account_payout_bank_account - type: object - - maxLength: 5000 - type: string - description: Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), - or a dictionary containing a user's bank account details. - business_profile: - description: Business information about the account. - properties: - mcc: - maxLength: 4 - type: string - name: - maxLength: 5000 - type: string - product_description: - maxLength: 40000 - type: string - support_address: - properties: - city: - maxLength: 100 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 200 - type: string - line2: - maxLength: 200 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: address_specs - type: object - support_email: - type: string - support_phone: - maxLength: 5000 - type: string - support_url: - anyOf: - - type: string - - enum: - - '' - type: string - url: - maxLength: 5000 - type: string - title: business_profile_specs - type: object - business_type: - description: The business type. - enum: - - company - - government_entity - - individual - - non_profit - type: string - x-stripeBypassValidation: true - capabilities: - description: Each key of the dictionary represents a capability, - and each capability maps to its settings (e.g. whether it has - been requested or not). Each capability will be inactive until - you have provided its specific requirements and Stripe has verified - them. An account may have some of its requested capabilities be - active and some be inactive. - properties: - acss_debit_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - afterpay_clearpay_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - au_becs_debit_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - bacs_debit_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - bancontact_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - boleto_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - card_issuing: - properties: - requested: - type: boolean - title: capability_param - type: object - card_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - cartes_bancaires_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - eps_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - fpx_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - giropay_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - grabpay_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - ideal_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - jcb_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - klarna_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - legacy_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - oxxo_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - p24_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - sepa_debit_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - sofort_payments: - properties: - requested: - type: boolean - title: capability_param - type: object - tax_reporting_us_1099_k: - properties: - requested: - type: boolean - title: capability_param - type: object - tax_reporting_us_1099_misc: - properties: - requested: - type: boolean - title: capability_param - type: object - transfers: - properties: - requested: - type: boolean - title: capability_param - type: object - title: capabilities_param - type: object - company: - description: Information about the company or business. This field - is available for any `business_type`. - properties: - address: - properties: - city: - maxLength: 100 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 200 - type: string - line2: - maxLength: 200 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 + country: + nullable: true + type: string + fingerprint: + nullable: true + type: string + last4: + nullable: true + type: string + routing_number: + nullable: true + type: string + type: + nullable: true + type: string + type: object + source_type_acss_debit: + properties: + bank_address_city: + nullable: true + type: string + bank_address_line_1: + nullable: true + type: string + bank_address_line_2: + nullable: true + type: string + bank_address_postal_code: + nullable: true + type: string + bank_name: + nullable: true + type: string + category: + nullable: true + type: string + country: + nullable: true + type: string + fingerprint: + nullable: true + type: string + last4: + nullable: true + type: string + routing_number: + nullable: true + type: string + type: object + source_type_alipay: + properties: + data_string: + nullable: true + type: string + native_url: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_au_becs_debit: + properties: + bsb_number: + nullable: true + type: string + fingerprint: + nullable: true + type: string + last4: + nullable: true + type: string + type: object + source_type_bancontact: + properties: + bank_code: + nullable: true + type: string + bank_name: + nullable: true + type: string + bic: + nullable: true + type: string + iban_last4: + nullable: true + type: string + preferred_language: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_card: + properties: + address_line1_check: + nullable: true + type: string + address_zip_check: + nullable: true + type: string + brand: + nullable: true + type: string + country: + nullable: true + type: string + cvc_check: + nullable: true + type: string + dynamic_last4: + nullable: true + type: string + exp_month: + nullable: true + type: integer + exp_year: + nullable: true + type: integer + fingerprint: + type: string + funding: + nullable: true + type: string + last4: + nullable: true + type: string + name: + nullable: true + type: string + three_d_secure: + type: string + tokenization_method: + nullable: true + type: string + type: object + source_type_card_present: + properties: + application_cryptogram: + type: string + application_preferred_name: + type: string + authorization_code: + nullable: true + type: string + authorization_response_code: + type: string + brand: + nullable: true + type: string + country: + nullable: true + type: string + cvm_type: + type: string + data_type: + nullable: true + type: string + dedicated_file_name: + type: string + emv_auth_data: + type: string + evidence_customer_signature: + nullable: true + type: string + evidence_transaction_certificate: + nullable: true + type: string + exp_month: + nullable: true + type: integer + exp_year: + nullable: true + type: integer + fingerprint: + type: string + funding: + nullable: true + type: string + last4: + nullable: true + type: string + pos_device_id: + nullable: true + type: string + pos_entry_mode: + type: string + read_method: + nullable: true + type: string + reader: + nullable: true + type: string + terminal_verification_results: + type: string + transaction_status_information: + type: string + type: object + source_type_eps: + properties: + reference: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_giropay: + properties: + bank_code: + nullable: true + type: string + bank_name: + nullable: true + type: string + bic: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_ideal: + properties: + bank: + nullable: true + type: string + bic: + nullable: true + type: string + iban_last4: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_klarna: + properties: + background_image_url: + type: string + client_token: + nullable: true + type: string + first_name: + type: string + last_name: + type: string + locale: + type: string + logo_url: + type: string + page_title: + type: string + pay_later_asset_urls_descriptive: + type: string + pay_later_asset_urls_standard: + type: string + pay_later_name: + type: string + pay_later_redirect_url: + type: string + pay_now_asset_urls_descriptive: + type: string + pay_now_asset_urls_standard: + type: string + pay_now_name: + type: string + pay_now_redirect_url: + type: string + pay_over_time_asset_urls_descriptive: + type: string + pay_over_time_asset_urls_standard: + type: string + pay_over_time_name: + type: string + pay_over_time_redirect_url: + type: string + payment_method_categories: + type: string + purchase_country: + type: string + purchase_type: + type: string + redirect_url: + type: string + shipping_delay: + type: integer + shipping_first_name: + type: string + shipping_last_name: + type: string + type: object + source_type_multibanco: + properties: + entity: + nullable: true + type: string + reference: + nullable: true + type: string + refund_account_holder_address_city: + nullable: true + type: string + refund_account_holder_address_country: + nullable: true + type: string + refund_account_holder_address_line1: + nullable: true + type: string + refund_account_holder_address_line2: + nullable: true + type: string + refund_account_holder_address_postal_code: + nullable: true + type: string + refund_account_holder_address_state: + nullable: true + type: string + refund_account_holder_name: + nullable: true + type: string + refund_iban: + nullable: true + type: string + type: object + source_type_p24: + properties: + reference: + nullable: true + type: string + type: object + source_type_sepa_debit: + properties: + bank_code: + nullable: true + type: string + branch_code: + nullable: true + type: string + country: + nullable: true + type: string + fingerprint: + nullable: true + type: string + last4: + nullable: true + type: string + mandate_reference: + nullable: true + type: string + mandate_url: + nullable: true + type: string + type: object + source_type_sofort: + properties: + bank_code: + nullable: true + type: string + bank_name: + nullable: true + type: string + bic: + nullable: true + type: string + country: + nullable: true + type: string + iban_last4: + nullable: true + type: string + preferred_language: + nullable: true + type: string + statement_descriptor: + nullable: true + type: string + type: object + source_type_three_d_secure: + properties: + address_line1_check: + nullable: true + type: string + address_zip_check: + nullable: true + type: string + authenticated: + nullable: true + type: boolean + brand: + nullable: true + type: string + card: + nullable: true + type: string + country: + nullable: true + type: string + customer: + nullable: true + type: string + cvc_check: + nullable: true + type: string + dynamic_last4: + nullable: true + type: string + exp_month: + nullable: true + type: integer + exp_year: + nullable: true + type: integer + fingerprint: + type: string + funding: + nullable: true + type: string + last4: + nullable: true + type: string + name: + nullable: true + type: string + three_d_secure: + type: string + tokenization_method: + nullable: true + type: string + type: object + source_type_wechat: + properties: + prepay_id: + type: string + qr_code_url: + nullable: true + type: string + statement_descriptor: + type: string + type: object + subscription: + description: |- + Subscriptions allow you to charge a customer on a recurring basis. + + Related guide: [Creating Subscriptions](https://stripe.com/docs/billing/subscriptions/creating). + properties: + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + description: ID of the Connect Application that created the subscription. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the application owner's Stripe account. + nullable: true + type: number + automatic_tax: + "$ref": "#/components/schemas/subscription_automatic_tax" + billing_cycle_anchor: + description: Determines the date of the first full invoice, and, for plans + with `month` or `year` intervals, the day of the month for subsequent + invoices. The timestamp is in UTC format. + format: unix-time + type: integer + billing_thresholds: + anyOf: + - "$ref": "#/components/schemas/subscription_billing_thresholds" + description: Define thresholds at which an invoice will be sent, and the + subscription advanced to a new billing period + nullable: true + cancel_at: + description: A date in the future at which the subscription will automatically + get canceled + format: unix-time + nullable: true + type: integer + cancel_at_period_end: + description: If the subscription has been canceled with the `at_period_end` + flag set to `true`, `cancel_at_period_end` on the subscription will be + true. You can use this attribute to determine whether a subscription that + has a status of active is scheduled to be canceled at the end of the current + period. + type: boolean + canceled_at: + description: If the subscription has been canceled, the date of that cancellation. + If the subscription was canceled with `cancel_at_period_end`, `canceled_at` + will reflect the time of the most recent update request, not the end of + the subscription period when the subscription is automatically moved to + a canceled state. + format: unix-time + nullable: true + type: integer + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When charging + automatically, Stripe will attempt to pay this subscription at the end + of the cycle using the default source attached to the customer. When sending + an invoice, Stripe will email your customer an invoice with payment instructions. + enum: + - charge_automatically + - send_invoice + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + current_period_end: + description: End of the current period that the subscription has been invoiced + for. At the end of this period, a new invoice will be created. + format: unix-time + type: integer + current_period_start: + description: Start of the current period that the subscription has been + invoiced for. + format: unix-time + type: integer + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: ID of the customer who owns the subscription. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + days_until_due: + description: Number of days a customer has to pay invoices generated by + this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + nullable: true + type: integer + default_payment_method: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: ID of the default payment method for the subscription. It must + belong to the customer associated with the subscription. This takes precedence + over `default_source`. If neither are set, invoices will use the customer's + [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + default_source: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/bank_account" + - "$ref": "#/components/schemas/card" + - "$ref": "#/components/schemas/source" + description: ID of the default payment source for the subscription. It must + belong to the customer associated with the subscription and be in a chargeable + state. If `default_payment_method` is also set, `default_payment_method` + will take precedence. If neither are set, invoices will use the customer's + [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/bank_account" + - "$ref": "#/components/schemas/card" + - "$ref": "#/components/schemas/source" + x-stripeBypassValidation: true + default_tax_rates: + description: The tax rates that will apply to any subscription item that + does not have `tax_rates` set. Invoices created will have their `default_tax_rates` + populated from the subscription. + items: + "$ref": "#/components/schemas/tax_rate" + nullable: true + type: array + description: + description: The subscription's description, meant to be displayable to + the customer. Use this field to optionally store an explanation of the + subscription for rendering in Stripe surfaces. + maxLength: 500 + nullable: true + type: string + discount: + anyOf: + - "$ref": "#/components/schemas/discount" + description: Describes the current discount applied to this subscription, + if there is one. When billing, a discount applied to a subscription overrides + a discount applied on a customer-wide basis. + nullable: true + ended_at: + description: If the subscription has ended, the date the subscription ended. + format: unix-time + nullable: true + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + items: + description: List of subscription items, each with an attached price. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/subscription_item" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SubscriptionItemList + type: object + x-expandableFields: + - data + latest_invoice: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/invoice" + description: The most recent invoice this subscription has generated. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/invoice" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + next_pending_invoice_item_invoice: + description: Specifies the approximate timestamp on which any pending invoice + items will be billed according to the schedule provided at `pending_invoice_item_interval`. + format: unix-time + nullable: true + type: integer + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - subscription + type: string + pause_collection: + anyOf: + - "$ref": "#/components/schemas/subscriptions_resource_pause_collection" + description: If specified, payment collection for this subscription will + be paused. + nullable: true + payment_settings: + anyOf: + - "$ref": "#/components/schemas/subscriptions_resource_payment_settings" + description: Payment settings passed on to invoices created by the subscription. + nullable: true + pending_invoice_item_interval: + anyOf: + - "$ref": "#/components/schemas/subscription_pending_invoice_item_interval" + description: Specifies an interval for how often to bill for any pending + invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) + for the given subscription at the specified interval. + nullable: true + pending_setup_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/setup_intent" + description: You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) + to collect user authentication when creating a subscription without immediate + payment or updating a subscription's payment method, allowing you to optimize + for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/setup_intent" + pending_update: + anyOf: + - "$ref": "#/components/schemas/subscriptions_resource_pending_update" + description: If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) + that will be applied to the subscription once the `latest_invoice` has + been paid. + nullable: true + schedule: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/subscription_schedule" + description: The schedule attached to the subscription + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/subscription_schedule" + start_date: + description: Date when the subscription was first created. The date might + differ from the `created` date due to backdating. + format: unix-time + type: integer + status: + description: "Possible values are `incomplete`, `incomplete_expired`, `trialing`, + `active`, `past_due`, `canceled`, or `unpaid`. \n\nFor `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. + \n\nA subscription that is currently in a trial period is `trialing` and + moves to `active` when the trial period is over. \n\nIf 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. \n\nIf subscription `collection_method=send_invoice` + it becomes `past_due` when its invoice is not paid by the due date, and + `canceled` or `unpaid` if it is still not paid by an additional deadline + after that. Note that when a subscription has a status of `unpaid`, no + subsequent invoices will be attempted (invoices will be created, but then + immediately automatically closed). After receiving updated payment information + from a customer, you may choose to reopen and pay their closed invoices." + enum: + - active + - canceled + - incomplete + - incomplete_expired + - past_due + - trialing + - unpaid + type: string + x-stripeBypassValidation: true + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this subscription belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" + transfer_data: + anyOf: + - "$ref": "#/components/schemas/subscription_transfer_data" + description: The account (if any) the subscription's payments will be attributed + to for tax reporting, and where funds from each payment will be transferred + to for each of the subscription's invoices. + nullable: true + trial_end: + description: If the subscription has a trial, the end of that trial. + format: unix-time + nullable: true + type: integer + trial_start: + description: If the subscription has a trial, the beginning of that trial. + format: unix-time + nullable: true + type: integer + required: + - automatic_tax + - billing_cycle_anchor + - cancel_at_period_end + - collection_method + - created + - currency + - current_period_end + - current_period_start + - customer + - id + - items + - livemode + - metadata + - object + - start_date + - status + title: Subscription + type: object + x-expandableFields: + - application + - automatic_tax + - billing_thresholds + - customer + - default_payment_method + - default_source + - default_tax_rates + - discount + - items + - latest_invoice + - pause_collection + - payment_settings + - pending_invoice_item_interval + - pending_setup_intent + - pending_update + - schedule + - test_clock + - transfer_data + x-resourceId: subscription + subscription_automatic_tax: + description: '' + properties: + enabled: + description: Whether Stripe automatically computes tax on this subscription. + type: boolean + required: + - enabled + title: SubscriptionAutomaticTax + type: object + x-expandableFields: [] + subscription_billing_thresholds: + description: '' + properties: + amount_gte: + description: Monetary threshold that triggers the subscription to create + an invoice + nullable: true + type: integer + reset_billing_cycle_anchor: + description: Indicates if the `billing_cycle_anchor` should be reset when + a threshold is reached. If true, `billing_cycle_anchor` will be updated + to the date/time the threshold was last reached; otherwise, the value + will remain unchanged. This value may not be `true` if the subscription + contains items with plans that have `aggregate_usage=last_ever`. + nullable: true + type: boolean + title: SubscriptionBillingThresholds + type: object + x-expandableFields: [] + subscription_item: + description: |- + Subscription items allow you to create customer subscriptions with more than + one plan, making it easy to represent complex billing relationships. + properties: + billing_thresholds: + anyOf: + - "$ref": "#/components/schemas/subscription_item_billing_thresholds" + description: Define thresholds at which an invoice will be sent, and the + related subscription advanced to a new billing period + nullable: true + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - subscription_item + type: string + price: + "$ref": "#/components/schemas/price" + quantity: + description: The [quantity](https://stripe.com/docs/subscriptions/quantities) + of the plan to which the customer should be subscribed. + type: integer + subscription: + description: The `subscription` this `subscription_item` belongs to. + maxLength: 5000 + type: string + tax_rates: + description: The tax rates which apply to this `subscription_item`. When + set, the `default_tax_rates` on the subscription do not apply to this + `subscription_item`. + items: + "$ref": "#/components/schemas/tax_rate" + nullable: true + type: array + required: + - created + - id + - metadata + - object + - price + - subscription + title: SubscriptionItem + type: object + x-expandableFields: + - billing_thresholds + - price + - tax_rates + x-resourceId: subscription_item + subscription_item_billing_thresholds: + description: '' + properties: + usage_gte: + description: Usage threshold that triggers the subscription to create an + invoice + nullable: true + type: integer + title: SubscriptionItemBillingThresholds + type: object + x-expandableFields: [] + subscription_payment_method_options_card: + description: '' + properties: + mandate_options: + "$ref": "#/components/schemas/invoice_mandate_options_card" + network: + description: Selected network to process this Subscription on. Depends on + the available networks of the card attached to the Subscription. Can be + only set confirm-time. + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + nullable: true + type: string + request_three_d_secure: + description: We strongly recommend that you rely on our SCA Engine to automatically + prompt your customers for authentication based on risk level and [other + requirements](https://stripe.com/docs/strong-customer-authentication). + However, if you wish to request 3D Secure based on logic from your own + fraud engine, provide this option. Read our guide on [manually requesting + 3D Secure](https://stripe.com/docs/payments/3d-secure#manual-three-ds) + for more information on how this configuration interacts with Radar and + our SCA Engine. + enum: + - any + - automatic + nullable: true + type: string + title: subscription_payment_method_options_card + type: object + x-expandableFields: + - mandate_options + subscription_pending_invoice_item_interval: + description: '' + properties: + interval: + description: Specifies invoicing frequency. Either `day`, `week`, `month` + or `year`. + enum: + - day + - month + - week + - year + type: string + interval_count: + description: The number of intervals between invoices. For example, `interval=month` + and `interval_count=3` bills every 3 months. Maximum of one year interval + allowed (1 year, 12 months, or 52 weeks). + type: integer + required: + - interval + - interval_count + title: SubscriptionPendingInvoiceItemInterval + type: object + x-expandableFields: [] + subscription_schedule: + description: |- + A subscription schedule allows you to create and manage the lifecycle of a subscription by predefining expected changes. + + Related guide: [Subscription Schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + properties: + application: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + description: ID of the Connect Application that created the schedule. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/application" + - "$ref": "#/components/schemas/deleted_application" + canceled_at: + description: Time at which the subscription schedule was canceled. Measured + in seconds since the Unix epoch. + format: unix-time + nullable: true + type: integer + completed_at: + description: Time at which the subscription schedule was completed. Measured + in seconds since the Unix epoch. + format: unix-time + nullable: true + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + current_phase: + anyOf: + - "$ref": "#/components/schemas/subscription_schedule_current_phase" + description: Object representing the start and end dates for the current + phase of the subscription schedule, if it is `active`. + nullable: true + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + description: ID of the customer who owns the subscription schedule. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + - "$ref": "#/components/schemas/deleted_customer" + default_settings: + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings" + end_behavior: + description: Behavior of the subscription schedule and underlying subscription + when it ends. Possible values are `release` and `cancel`. + enum: + - cancel + - none + - release + - renew + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - subscription_schedule + type: string + phases: + description: Configuration for the subscription schedule's phases. + items: + "$ref": "#/components/schemas/subscription_schedule_phase_configuration" + type: array + released_at: + description: Time at which the subscription schedule was released. Measured + in seconds since the Unix epoch. + format: unix-time + nullable: true + type: integer + released_subscription: + description: ID of the subscription once managed by the subscription schedule + (if it is released). + maxLength: 5000 + nullable: true + type: string + status: + description: The present status of the subscription schedule. Possible values + are `not_started`, `active`, `completed`, `released`, and `canceled`. + You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + enum: + - active + - canceled + - completed + - not_started + - released + type: string + subscription: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/subscription" + description: ID of the subscription managed by the subscription schedule. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/subscription" + test_clock: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/test_helpers.test_clock" + description: ID of the test clock this subscription schedule belongs to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/test_helpers.test_clock" + required: + - created + - customer + - default_settings + - end_behavior + - id + - livemode + - object + - phases + - status + title: SubscriptionSchedule + type: object + x-expandableFields: + - application + - current_phase + - customer + - default_settings + - phases + - subscription + - test_clock + x-resourceId: subscription_schedule + subscription_schedule_add_invoice_item: + description: An Add Invoice Item describes the prices and quantities that will + be added as pending invoice items when entering a phase. + properties: + price: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/price" + - "$ref": "#/components/schemas/deleted_price" + description: ID of the price used to generate the invoice item. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/price" + - "$ref": "#/components/schemas/deleted_price" + quantity: + description: The quantity of the invoice item. + nullable: true + type: integer + tax_rates: + description: The tax rates which apply to the item. When set, the `default_tax_rates` + do not apply to this item. + items: + "$ref": "#/components/schemas/tax_rate" + nullable: true + type: array + required: + - price + title: SubscriptionScheduleAddInvoiceItem + type: object + x-expandableFields: + - price + - tax_rates + subscription_schedule_configuration_item: + description: A phase item describes the price and quantity of a phase. + properties: + billing_thresholds: + anyOf: + - "$ref": "#/components/schemas/subscription_item_billing_thresholds" + description: Define thresholds at which an invoice will be sent, and the + related subscription advanced to a new billing period + nullable: true + price: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/price" + - "$ref": "#/components/schemas/deleted_price" + description: ID of the price to which the customer should be subscribed. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/price" + - "$ref": "#/components/schemas/deleted_price" + quantity: + description: Quantity of the plan to which the customer should be subscribed. + type: integer + tax_rates: + description: The tax rates which apply to this `phase_item`. When set, the + `default_tax_rates` on the phase do not apply to this `phase_item`. + items: + "$ref": "#/components/schemas/tax_rate" + nullable: true + type: array + required: + - price + title: SubscriptionScheduleConfigurationItem + type: object + x-expandableFields: + - billing_thresholds + - price + - tax_rates + subscription_schedule_current_phase: + description: '' + properties: + end_date: + description: The end of this phase of the subscription schedule. + format: unix-time + type: integer + start_date: + description: The start of this phase of the subscription schedule. + format: unix-time + type: integer + required: + - end_date + - start_date + title: SubscriptionScheduleCurrentPhase + type: object + x-expandableFields: [] + subscription_schedule_phase_configuration: + description: A phase describes the plans, coupon, and trialing status of a subscription + for a predefined time period. + properties: + add_invoice_items: + description: A list of prices and quantities that will generate invoice + items appended to the next invoice for this phase. + items: + "$ref": "#/components/schemas/subscription_schedule_add_invoice_item" + type: array + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the application owner's Stripe account + during this phase of the schedule. + nullable: true + type: number + automatic_tax: + "$ref": "#/components/schemas/schedules_phase_automatic_tax" + billing_cycle_anchor: + description: Possible values are `phase_start` or `automatic`. If `phase_start` + then billing cycle anchor of the subscription is set to the start of the + phase when entering the phase. If `automatic` then the billing cycle anchor + is automatically modified as needed when entering the phase. For more + information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + enum: + - automatic + - phase_start + nullable: true + type: string + billing_thresholds: + anyOf: + - "$ref": "#/components/schemas/subscription_billing_thresholds" + description: Define thresholds at which an invoice will be sent, and the + subscription advanced to a new billing period + nullable: true + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When charging + automatically, Stripe will attempt to pay the underlying subscription + at the end of each billing cycle using the default source attached to + the customer. When sending an invoice, Stripe will email your customer + an invoice with payment instructions. + enum: + - charge_automatically + - send_invoice + nullable: true + type: string + coupon: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/coupon" + - "$ref": "#/components/schemas/deleted_coupon" + description: ID of the coupon to use during this phase of the subscription + schedule. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/coupon" + - "$ref": "#/components/schemas/deleted_coupon" + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + default_payment_method: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: ID of the default payment method for the subscription schedule. + It must belong to the customer associated with the subscription schedule. + If not set, invoices will use the default payment method in the customer's + invoice settings. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + default_tax_rates: + description: The default tax rates to apply to the subscription during this + phase of the subscription schedule. + items: + "$ref": "#/components/schemas/tax_rate" + nullable: true + type: array + description: + description: Subscription description, meant to be displayable to the customer. + Use this field to optionally store an explanation of the subscription. + maxLength: 5000 + nullable: true + type: string + end_date: + description: The end of this phase of the subscription schedule. + format: unix-time + type: integer + invoice_settings: + anyOf: + - "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + description: The invoice settings applicable during this phase. + nullable: true + items: + description: Subscription items to configure the subscription to during + this phase of the subscription schedule. + items: + "$ref": "#/components/schemas/subscription_schedule_configuration_item" + type: array + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to a phase. Metadata on a schedule's phase will update + the underlying subscription's `metadata` when the phase is entered. Updating + the underlying subscription's `metadata` directly will not affect the + current phase's `metadata`. + nullable: true + type: object + proration_behavior: + description: If the subscription schedule will prorate when transitioning + to this phase. Possible values are `create_prorations` and `none`. + enum: + - always_invoice + - create_prorations + - none + type: string + start_date: + description: The start of this phase of the subscription schedule. + format: unix-time + type: integer + transfer_data: + anyOf: + - "$ref": "#/components/schemas/subscription_transfer_data" + description: The account (if any) the associated subscription's payments + will be attributed to for tax reporting, and where funds from each payment + will be transferred to for each of the subscription's invoices. + nullable: true + trial_end: + description: When the trial ends within the phase. + format: unix-time + nullable: true + type: integer + required: + - add_invoice_items + - currency + - end_date + - items + - proration_behavior + - start_date + title: SubscriptionSchedulePhaseConfiguration + type: object + x-expandableFields: + - add_invoice_items + - automatic_tax + - billing_thresholds + - coupon + - default_payment_method + - default_tax_rates + - invoice_settings + - items + - transfer_data + subscription_schedules_resource_default_settings: + description: '' + properties: + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the application owner's Stripe account + during this phase of the schedule. + nullable: true + type: number + automatic_tax: + "$ref": "#/components/schemas/subscription_schedules_resource_default_settings_automatic_tax" + billing_cycle_anchor: + description: Possible values are `phase_start` or `automatic`. If `phase_start` + then billing cycle anchor of the subscription is set to the start of the + phase when entering the phase. If `automatic` then the billing cycle anchor + is automatically modified as needed when entering the phase. For more + information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + enum: + - automatic + - phase_start + type: string + billing_thresholds: + anyOf: + - "$ref": "#/components/schemas/subscription_billing_thresholds" + description: Define thresholds at which an invoice will be sent, and the + subscription advanced to a new billing period + nullable: true + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When charging + automatically, Stripe will attempt to pay the underlying subscription + at the end of each billing cycle using the default source attached to + the customer. When sending an invoice, Stripe will email your customer + an invoice with payment instructions. + enum: + - charge_automatically + - send_invoice + nullable: true + type: string + default_payment_method: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_method" + description: ID of the default payment method for the subscription schedule. + If not set, invoices will use the default payment method in the customer's + invoice settings. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_method" + description: + description: Subscription description, meant to be displayable to the customer. + Use this field to optionally store an explanation of the subscription. + maxLength: 5000 + nullable: true + type: string + invoice_settings: + anyOf: + - "$ref": "#/components/schemas/invoice_setting_subscription_schedule_setting" + description: The subscription schedule's default invoice settings. + nullable: true + transfer_data: + anyOf: + - "$ref": "#/components/schemas/subscription_transfer_data" + description: The account (if any) the associated subscription's payments + will be attributed to for tax reporting, and where funds from each payment + will be transferred to for each of the subscription's invoices. + nullable: true + required: + - billing_cycle_anchor + title: SubscriptionSchedulesResourceDefaultSettings + type: object + x-expandableFields: + - automatic_tax + - billing_thresholds + - default_payment_method + - invoice_settings + - transfer_data + subscription_schedules_resource_default_settings_automatic_tax: + description: '' + properties: + enabled: + description: Whether Stripe automatically computes tax on invoices created + during this phase. + type: boolean + required: + - enabled + title: SubscriptionSchedulesResourceDefaultSettingsAutomaticTax + type: object + x-expandableFields: [] + subscription_transfer_data: + description: '' + properties: + amount_percent: + description: A non-negative decimal between 0 and 100, with at most two + decimal places. This represents the percentage of the subscription invoice + subtotal that will be transferred to the destination account. By default, + the entire amount is transferred to the destination. + nullable: true + type: number + destination: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: The account where funds from the payment will be transferred + to upon payment success. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + required: + - destination + title: SubscriptionTransferData + type: object + x-expandableFields: + - destination + subscriptions_resource_pause_collection: + description: |- + The Pause Collection settings determine how we will pause collection for this subscription and for how long the subscription + should be paused. + properties: + behavior: + description: The payment collection behavior for this subscription while + paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + enum: + - keep_as_draft + - mark_uncollectible + - void + type: string + resumes_at: + description: The time after which the subscription will resume collecting + payments. + format: unix-time + nullable: true + type: integer + required: + - behavior + title: SubscriptionsResourcePauseCollection + type: object + x-expandableFields: [] + subscriptions_resource_payment_method_options: + description: '' + properties: + acss_debit: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_acss_debit" + description: This sub-hash contains details about the Canadian pre-authorized + debit payment method options to pass to invoices created by the subscription. + nullable: true + bancontact: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_bancontact" + description: This sub-hash contains details about the Bancontact payment + method options to pass to invoices created by the subscription. + nullable: true + card: + anyOf: + - "$ref": "#/components/schemas/subscription_payment_method_options_card" + description: This sub-hash contains details about the Card payment method + options to pass to invoices created by the subscription. + nullable: true + customer_balance: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_customer_balance" + description: This sub-hash contains details about the Bank transfer payment + method options to pass to invoices created by the subscription. + nullable: true + konbini: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_konbini" + description: This sub-hash contains details about the Konbini payment method + options to pass to invoices created by the subscription. + nullable: true + us_bank_account: + anyOf: + - "$ref": "#/components/schemas/invoice_payment_method_options_us_bank_account" + description: This sub-hash contains details about the ACH direct debit payment + method options to pass to invoices created by the subscription. + nullable: true + title: SubscriptionsResourcePaymentMethodOptions + type: object + x-expandableFields: + - acss_debit + - bancontact + - card + - customer_balance + - konbini + - us_bank_account + subscriptions_resource_payment_settings: + description: '' + properties: + payment_method_options: + anyOf: + - "$ref": "#/components/schemas/subscriptions_resource_payment_method_options" + description: Payment-method-specific configuration to provide to invoices + created by the subscription. + nullable: true + payment_method_types: + description: The list of payment method types to provide to every invoice + created by the subscription. If not set, Stripe attempts to automatically + determine the types to use by looking at the invoice’s default payment + method, the subscription’s default payment method, the customer’s default + payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + items: + enum: + - ach_credit_transfer + - ach_debit + - acss_debit + - au_becs_debit + - bacs_debit + - bancontact + - boleto + - card + - customer_balance + - fpx + - giropay + - grabpay + - ideal + - konbini + - link + - paynow + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + nullable: true + type: array + save_default_payment_method: + description: Either `off`, or `on_subscription`. With `on_subscription` + Stripe updates `subscription.default_payment_method` when a subscription + payment succeeds. + enum: + - 'off' + - on_subscription + nullable: true + type: string + title: SubscriptionsResourcePaymentSettings + type: object + x-expandableFields: + - payment_method_options + subscriptions_resource_pending_update: + description: |- + Pending Updates store the changes pending from a previous update that will be applied + to the Subscription upon successful payment. + properties: + billing_cycle_anchor: + description: If the update is applied, determines the date of the first + full invoice, and, for plans with `month` or `year` intervals, the day + of the month for subsequent invoices. The timestamp is in UTC format. + format: unix-time + nullable: true + type: integer + expires_at: + description: The point after which the changes reflected by this update + will be discarded and no longer applied. + format: unix-time + type: integer + subscription_items: + description: List of subscription items, each with an attached plan, that + will be set if the update is applied. + items: + "$ref": "#/components/schemas/subscription_item" + nullable: true + type: array + trial_end: + description: Unix timestamp representing the end of the trial period the + customer will get before being charged for the first time, if the update + is applied. + format: unix-time + nullable: true + type: integer + trial_from_plan: + description: Indicates if a plan's `trial_period_days` should be applied + to the subscription. Setting `trial_end` per subscription is preferred, + and this defaults to `false`. Setting this flag to `true` together with + `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) + to learn more. + nullable: true + type: boolean + required: + - expires_at + title: SubscriptionsResourcePendingUpdate + type: object + x-expandableFields: + - subscription_items + tax_code: + description: "[Tax codes](https://stripe.com/docs/tax/tax-categories) classify + goods and services for tax purposes." + properties: + description: + description: A detailed description of which types of products the tax code + represents. + maxLength: 5000 + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + name: + description: A short name for the tax code. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - tax_code + type: string + required: + - description + - id + - name + - object + title: TaxProductResourceTaxCode + type: object + x-expandableFields: [] + x-resourceId: tax_code + tax_deducted_at_source: + description: '' + properties: + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - tax_deducted_at_source + type: string + period_end: + description: The end of the invoicing period. This TDS applies to Stripe + fees collected during this invoicing period. + format: unix-time + type: integer + period_start: + description: The start of the invoicing period. This TDS applies to Stripe + fees collected during this invoicing period. + format: unix-time + type: integer + tax_deduction_account_number: + description: The TAN that was supplied to Stripe when TDS was assessed + maxLength: 5000 + type: string + required: + - id + - object + - period_end + - period_start + - tax_deduction_account_number + title: TaxDeductedAtSource + type: object + x-expandableFields: [] + tax_id: + description: |- + You can add one or multiple tax IDs to a [customer](https://stripe.com/docs/api/customers). + A customer's tax IDs are displayed on invoices and credit notes issued for the customer. + + Related guide: [Customer Tax Identification Numbers](https://stripe.com/docs/billing/taxes/tax-ids). + properties: + country: + description: Two-letter ISO code representing the country of the tax ID. + maxLength: 5000 + nullable: true + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + customer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/customer" + description: ID of the customer. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/customer" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - tax_id + type: string + type: + description: Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, `bg_uic`, + `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, + `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, + `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, + `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, + `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, + `sg_uen`, `si_tin`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat`. + Note that some legacy tax IDs have type `unknown` + enum: + - ae_trn + - au_abn + - au_arn + - bg_uic + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - es_cif + - eu_oss_vat + - eu_vat + - gb_vat + - ge_vat + - hk_br + - hu_tin + - id_npwp + - il_vat + - in_gst + - is_vat + - jp_cn + - jp_rn + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - nz_gst + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - th_vat + - tw_vat + - ua_vat + - unknown + - us_ein + - za_vat + type: string + value: + description: Value of the tax ID. + maxLength: 5000 + type: string + verification: + anyOf: + - "$ref": "#/components/schemas/tax_id_verification" + description: Tax ID verification information. + nullable: true + required: + - created + - id + - livemode + - object + - type + - value + title: tax_id + type: object + x-expandableFields: + - customer + - verification + x-resourceId: tax_id + tax_id_verification: + description: '' + properties: + status: + description: Verification status, one of `pending`, `verified`, `unverified`, + or `unavailable`. + enum: + - pending + - unavailable + - unverified + - verified + type: string + verified_address: + description: Verified address. + maxLength: 5000 + nullable: true + type: string + verified_name: + description: Verified name. + maxLength: 5000 + nullable: true + type: string + required: + - status + title: tax_id_verification + type: object + x-expandableFields: [] + tax_rate: + description: |- + Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + + Related guide: [Tax Rates](https://stripe.com/docs/billing/taxes/tax-rates). + properties: + active: + description: Defaults to `true`. When set to `false`, this tax rate cannot + be used with new applications or Checkout Sessions, but will still work + for subscriptions and invoices that already have it set. + type: boolean + country: + description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + maxLength: 5000 + nullable: true + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + description: + description: An arbitrary string attached to the tax rate for your internal + use only. It will not be visible to your customers. + maxLength: 5000 + nullable: true + type: string + display_name: + description: The display name of the tax rates as it will appear to your + customer on their receipt email, PDF, and the hosted invoice page. + maxLength: 5000 + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + inclusive: + description: This specifies if the tax rate is inclusive or exclusive. + type: boolean + jurisdiction: + description: The jurisdiction for the tax rate. You can use this label field + for tax reporting purposes. It also appears on your customer’s invoice. + maxLength: 5000 + nullable: true + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - tax_rate + type: string + percentage: + description: This represents the tax rate percent out of 100. + type: number + state: + description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), + without country prefix. For example, "NY" for New York, United States.' + maxLength: 5000 + nullable: true + type: string + tax_type: + description: The high-level tax type, such as `vat` or `sales_tax`. + enum: + - gst + - hst + - jct + - pst + - qst + - rst + - sales_tax + - vat + nullable: true + type: string + required: + - active + - created + - display_name + - id + - inclusive + - livemode + - object + - percentage + title: TaxRate + type: object + x-expandableFields: [] + x-resourceId: tax_rate + terminal.configuration: + description: A Configurations object represents how features should be configured + for terminal readers. + properties: + bbpos_wisepos_e: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + is_account_default: + description: Whether this Configuration is the default for your account + nullable: true + type: boolean + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - terminal.configuration + type: string + tipping: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_tipping" + verifone_p400: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_device_type_specific_config" + required: + - id + - livemode + - object + title: TerminalConfigurationConfiguration + type: object + x-expandableFields: + - bbpos_wisepos_e + - tipping + - verifone_p400 + x-resourceId: terminal.configuration + terminal.connection_token: + description: |- + A Connection Token is used by the Stripe Terminal SDK to connect to a reader. + + Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + properties: + location: + description: The id of the location that this connection token is scoped + to. Note that location scoping only applies to internet-connected readers. + For more details, see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + maxLength: 5000 + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - terminal.connection_token + type: string + secret: + description: Your application should pass this token to the Stripe Terminal + SDK. + maxLength: 5000 + type: string + required: + - object + - secret + title: TerminalConnectionToken + type: object + x-expandableFields: [] + x-resourceId: terminal.connection_token + terminal.location: + description: |- + A Location represents a grouping of readers. + + Related guide: [Fleet Management](https://stripe.com/docs/terminal/fleet/locations). + properties: + address: + "$ref": "#/components/schemas/address" + configuration_overrides: + description: The ID of a configuration that will be used to customize all + readers in this location. + maxLength: 5000 + type: string + display_name: + description: The display name of the location. + maxLength: 5000 + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - terminal.location + type: string + required: + - address + - display_name + - id + - livemode + - metadata + - object + title: TerminalLocationLocation + type: object + x-expandableFields: + - address + x-resourceId: terminal.location + terminal.reader: + description: |- + A Reader represents a physical device for accepting payment details. + + Related guide: [Connecting to a Reader](https://stripe.com/docs/terminal/payments/connect-reader). + properties: + action: + anyOf: + - "$ref": "#/components/schemas/terminal_reader_reader_resource_reader_action" + description: The most recent action performed by the reader. + nullable: true + device_sw_version: + description: The current software version of the reader. + maxLength: 5000 + nullable: true + type: string + device_type: + description: Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `bbpos_chipper2x`, + `bbpos_wisepos_e`, `verifone_P400`, or `simulated_wisepos_e`. + enum: + - bbpos_chipper2x + - bbpos_wisepad3 + - bbpos_wisepos_e + - simulated_wisepos_e + - stripe_m2 + - verifone_P400 + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + ip_address: + description: The local IP address of the reader. + maxLength: 5000 + nullable: true + type: string + label: + description: Custom label given to the reader for easier identification. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + location: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/terminal.location" + description: The location identifier of the reader. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/terminal.location" + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - terminal.reader + type: string + serial_number: + description: Serial number of the reader. + maxLength: 5000 + type: string + status: + description: The networking status of the reader. + maxLength: 5000 + nullable: true + type: string + required: + - device_type + - id + - label + - livemode + - metadata + - object + - serial_number + title: TerminalReaderReader + type: object + x-expandableFields: + - action + - location + x-resourceId: terminal.reader + terminal_configuration_configuration_resource_currency_specific_config: + description: '' + properties: + fixed_amounts: + description: Fixed amounts displayed when collecting a tip + items: + type: integer + nullable: true + type: array + percentages: + description: Percentages displayed when collecting a tip + items: + type: integer + nullable: true + type: array + smart_tip_threshold: + description: Below this amount, fixed amounts will be displayed; above it, + percentages will be displayed + type: integer + title: TerminalConfigurationConfigurationResourceCurrencySpecificConfig + type: object + x-expandableFields: [] + terminal_configuration_configuration_resource_device_type_specific_config: + description: '' + properties: + splashscreen: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/file" + description: A File ID representing an image you would like displayed on + the reader. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/file" + title: TerminalConfigurationConfigurationResourceDeviceTypeSpecificConfig + type: object + x-expandableFields: + - splashscreen + terminal_configuration_configuration_resource_tipping: + description: '' + properties: + aud: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + cad: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + chf: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + czk: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + dkk: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + eur: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + gbp: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + hkd: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + myr: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + nok: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + nzd: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + sek: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + sgd: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + usd: + "$ref": "#/components/schemas/terminal_configuration_configuration_resource_currency_specific_config" + title: TerminalConfigurationConfigurationResourceTipping + type: object + x-expandableFields: + - aud + - cad + - chf + - czk + - dkk + - eur + - gbp + - hkd + - myr + - nok + - nzd + - sek + - sgd + - usd + terminal_reader_reader_resource_cart: + description: Represents a cart to be displayed on the reader + properties: + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + line_items: + description: List of line items in the cart. + items: + "$ref": "#/components/schemas/terminal_reader_reader_resource_line_item" + type: array + tax: + description: Tax amount for the entire cart. A positive integer in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal). + nullable: true + type: integer + total: + description: Total amount for the entire cart, including tax. A positive + integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + type: integer + required: + - currency + - line_items + - total + title: TerminalReaderReaderResourceCart + type: object + x-expandableFields: + - line_items + terminal_reader_reader_resource_line_item: + description: Represents a line item to be displayed on the reader + properties: + amount: + description: The amount of the line item. A positive integer in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal). + type: integer + description: + description: Description of the line item. + maxLength: 5000 + type: string + quantity: + description: The quantity of the line item. + type: integer + required: + - amount + - description + - quantity + title: TerminalReaderReaderResourceLineItem + type: object + x-expandableFields: [] + terminal_reader_reader_resource_process_config: + description: Represents a per-transaction override of a reader configuration + properties: + skip_tipping: + description: Override showing a tipping selection screen on this transaction. + type: boolean + title: TerminalReaderReaderResourceProcessConfig + type: object + x-expandableFields: [] + terminal_reader_reader_resource_process_payment_intent_action: + description: Represents a reader action to process a payment intent + properties: + payment_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/payment_intent" + description: Most recent PaymentIntent processed by the reader. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/payment_intent" + process_config: + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_config" + required: + - payment_intent + title: TerminalReaderReaderResourceProcessPaymentIntentAction + type: object + x-expandableFields: + - payment_intent + - process_config + terminal_reader_reader_resource_process_setup_intent_action: + description: Represents a reader action to process a setup intent + properties: + generated_card: + description: ID of a card PaymentMethod generated from the card_present + PaymentMethod that may be attached to a Customer for future transactions. + Only present if it was possible to generate a card PaymentMethod. + maxLength: 5000 + type: string + setup_intent: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/setup_intent" + description: Most recent SetupIntent processed by the reader. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/setup_intent" + required: + - setup_intent + title: TerminalReaderReaderResourceProcessSetupIntentAction + type: object + x-expandableFields: + - setup_intent + terminal_reader_reader_resource_reader_action: + description: Represents an action performed by the reader + properties: + failure_code: + description: Failure code, only set if status is `failed`. + maxLength: 5000 + nullable: true + type: string + failure_message: + description: Detailed failure message, only set if status is `failed`. + maxLength: 5000 + nullable: true + type: string + process_payment_intent: + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_payment_intent_action" + process_setup_intent: + "$ref": "#/components/schemas/terminal_reader_reader_resource_process_setup_intent_action" + set_reader_display: + "$ref": "#/components/schemas/terminal_reader_reader_resource_set_reader_display_action" + status: + description: Status of the action performed by the reader. + enum: + - failed + - in_progress + - succeeded + type: string + type: + description: Type of action performed by the reader. + enum: + - process_payment_intent + - process_setup_intent + - set_reader_display + type: string + x-stripeBypassValidation: true + required: + - status + - type + title: TerminalReaderReaderResourceReaderAction + type: object + x-expandableFields: + - process_payment_intent + - process_setup_intent + - set_reader_display + terminal_reader_reader_resource_set_reader_display_action: + description: Represents a reader action to set the reader display + properties: + cart: + anyOf: + - "$ref": "#/components/schemas/terminal_reader_reader_resource_cart" + description: Cart object to be displayed by the reader. + nullable: true + type: + description: Type of information to be displayed by the reader. + enum: + - cart + type: string + required: + - type + title: TerminalReaderReaderResourceSetReaderDisplayAction + type: object + x-expandableFields: + - cart + test_helpers.test_clock: + description: |- + A test clock enables deterministic control over objects in testmode. With a test clock, you can create + objects at a frozen time in the past or future, and advance to a specific future time to observe webhooks and state changes. After the clock advances, + you can either validate the current state of your scenario (and test your assumptions), change the current state of your scenario (and test more complex scenarios), or keep advancing forward in time. + properties: + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + deletes_after: + description: Time at which this clock is scheduled to auto delete. + format: unix-time + type: integer + frozen_time: + description: Time at which all objects belonging to this clock are frozen. + format: unix-time + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + name: + description: The custom name supplied at creation. + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - test_helpers.test_clock + type: string + status: + description: The status of the Test Clock. + enum: + - advancing + - internal_failure + - ready + type: string + required: + - created + - deletes_after + - frozen_time + - id + - livemode + - object + - status + title: TestClock + type: object + x-expandableFields: [] + x-resourceId: test_helpers.test_clock + three_d_secure_details: + description: '' + properties: + authentication_flow: + description: |- + For authenticated transactions: how the customer was authenticated by + the issuing bank. + enum: + - challenge + - frictionless + nullable: true + type: string + result: + description: Indicates the outcome of 3D Secure authentication. + enum: + - attempt_acknowledged + - authenticated + - exempted + - failed + - not_supported + - processing_error + nullable: true + type: string + result_reason: + description: |- + Additional information about why 3D Secure succeeded or failed based + on the `result`. + enum: + - abandoned + - bypassed + - canceled + - card_not_enrolled + - network_not_supported + - protocol_error + - rejected + nullable: true + type: string + version: + description: The version of 3D Secure that was used. + enum: + - 1.0.2 + - 2.1.0 + - 2.2.0 + nullable: true + type: string + x-stripeBypassValidation: true + title: three_d_secure_details + type: object + x-expandableFields: [] + three_d_secure_usage: + description: '' + properties: + supported: + description: Whether 3D Secure is supported on this card. + type: boolean + required: + - supported + title: three_d_secure_usage + type: object + x-expandableFields: [] + token: + description: |- + Tokenization is the process Stripe uses to collect sensitive card or bank + account details, or personally identifiable information (PII), directly from + your customers in a secure manner. A token representing this information is + returned to your server to use. You should use our + [recommended payments integrations](https://stripe.com/docs/payments) to perform this process + client-side. This ensures that no sensitive card data touches your server, + and allows your integration to operate in a PCI-compliant way. + + If you cannot use client-side tokenization, you can also create tokens using + the API with either your publishable or secret API key. Keep in mind that if + your integration uses this method, you are responsible for any PCI compliance + that may be required, and you must keep your secret API key safe. Unlike with + client-side tokenization, your customer's information is not sent directly to + Stripe, so we cannot determine how it is handled or stored. + + Tokens cannot be stored or used more than once. To store card or bank account + information for later use, you can create [Customer](https://stripe.com/docs/api#customers) + objects or [Custom accounts](https://stripe.com/docs/api#external_accounts). Note that + [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, + performs best with integrations that use client-side tokenization. + + Related guide: [Accept a payment](https://stripe.com/docs/payments/accept-a-payment-charges#web-create-token) + properties: + bank_account: + "$ref": "#/components/schemas/bank_account" + card: + "$ref": "#/components/schemas/card" + client_ip: + description: IP address of the client that generated the token. + maxLength: 5000 + nullable: true + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - token + type: string + type: + description: 'Type of the token: `account`, `bank_account`, `card`, or `pii`.' + maxLength: 5000 + type: string + used: + description: Whether this token has already been used (tokens can be used + only once). + type: boolean + required: + - created + - id + - livemode + - object + - type + - used + title: Token + type: object + x-expandableFields: + - bank_account + - card + x-resourceId: token + topup: + description: |- + To top up your Stripe balance, you create a top-up object. You can retrieve + individual top-ups, as well as list all top-ups. Top-ups are identified by a + unique, random ID. + + Related guide: [Topping Up your Platform Account](https://stripe.com/docs/connect/top-ups). + properties: + amount: + description: Amount transferred. + type: integer + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: ID of the balance transaction that describes the impact of + this top-up on your account balance. May not be specified depending on + status of top-up. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + expected_availability_date: + description: Date the funds are expected to arrive in your Stripe account + for payouts. This factors in delays like weekends or bank holidays. May + not be specified depending on status of top-up. + nullable: true + type: integer + failure_code: + description: Error code explaining reason for top-up failure if available + (see [the errors section](https://stripe.com/docs/api#errors) for a list + of codes). + maxLength: 5000 + nullable: true + type: string + failure_message: + description: Message to user further explaining reason for top-up failure + if available. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - topup + type: string + source: + anyOf: + - "$ref": "#/components/schemas/source" + description: For most Stripe users, the source of every top-up is a bank + account. This hash is then the [source object](https://stripe.com/docs/api#source_object) + describing that bank account. + nullable: true + statement_descriptor: + description: Extra information about a top-up. This will appear on your + source's bank statement. It must contain at least one letter. + maxLength: 5000 + nullable: true + type: string + status: + description: The status of the top-up is either `canceled`, `failed`, `pending`, + `reversed`, or `succeeded`. + enum: + - canceled + - failed + - pending + - reversed + - succeeded + type: string + transfer_group: + description: A string that identifies this top-up as part of a group. + maxLength: 5000 + nullable: true + type: string + required: + - amount + - created + - currency + - id + - livemode + - metadata + - object + - status + title: Topup + type: object + x-expandableFields: + - balance_transaction + - source + x-resourceId: topup + transfer: + description: |- + A `Transfer` object is created when you move funds between Stripe accounts as + part of Connect. + + Before April 6, 2017, transfers also represented movement of funds from a + Stripe account to a card or bank account. This behavior has since been split + out into a [Payout](https://stripe.com/docs/api#payout_object) object, with corresponding payout endpoints. For more + information, read about the + [transfer/payout split](https://stripe.com/docs/transfer-payout-split). + + Related guide: [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers). + properties: + amount: + description: Amount in %s to be transferred. + type: integer + amount_reversed: + description: Amount in %s reversed (can be less than the amount attribute + on the transfer if a partial reversal was issued). + type: integer + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: Balance transaction that describes the impact of this transfer + on your account balance. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + created: + description: Time that this record of the transfer was first created. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + destination: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: ID of the Stripe account the transfer was sent to. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + destination_payment: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: If the destination is a Stripe account, this will be the ID + of the payment that the destination account received for the transfer. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - transfer + type: string + reversals: + description: A list of reversals that have been applied to the transfer. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/transfer_reversal" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: TransferReversalList + type: object + x-expandableFields: + - data + reversed: + description: Whether the transfer has been fully reversed. If the transfer + is only partially reversed, this attribute will still be false. + type: boolean + source_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/charge" + description: ID of the charge or payment that was used to fund the transfer. + If null, the transfer was funded from the available balance. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/charge" + source_type: + description: The source balance this transfer came from. One of `card`, + `fpx`, or `bank_account`. + maxLength: 5000 + type: string + transfer_group: + description: A string that identifies this transaction as part of a group. + See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) + for details. + maxLength: 5000 + nullable: true + type: string + required: + - amount + - amount_reversed + - created + - currency + - id + - livemode + - metadata + - object + - reversals + - reversed + title: Transfer + type: object + x-expandableFields: + - balance_transaction + - destination + - destination_payment + - reversals + - source_transaction + x-resourceId: transfer + transfer_data: + description: '' + properties: + amount: + description: Amount intended to be collected by this PaymentIntent. A positive + integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) + (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal + currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + The amount value supports up to eight digits (e.g., a value of 99999999 + for a USD charge of $999,999.99). + type: integer + destination: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/account" + description: |- + The account (if any) the payment will be attributed to for tax + reporting, and where funds from the payment will be transferred to upon + payment success. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/account" + required: + - destination + title: transfer_data + type: object + x-expandableFields: + - destination + transfer_reversal: + description: |- + [Stripe Connect](https://stripe.com/docs/connect) platforms can reverse transfers made to a + connected account, either entirely or partially, and can also specify whether + to refund any related application fees. Transfer reversals add to the + platform's balance and subtract from the destination account's balance. + + Reversing a transfer that was made for a [destination + charge](/docs/connect/destination-charges) is allowed only up to the amount of + the charge. It is possible to reverse a + [transfer_group](https://stripe.com/docs/connect/charges-transfers#transfer-options) + transfer only if the destination account has enough balance to cover the + reversal. + + Related guide: [Reversing Transfers](https://stripe.com/docs/connect/charges-transfers#reversing-transfers). + properties: + amount: + description: Amount, in %s. + type: integer + balance_transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/balance_transaction" + description: Balance transaction that describes the impact on your account + balance. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/balance_transaction" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + destination_payment_refund: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/refund" + description: Linked payment refund for the transfer reversal. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/refund" + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - transfer_reversal + type: string + source_refund: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/refund" + description: ID of the refund responsible for the transfer reversal. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/refund" + transfer: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/transfer" + description: ID of the transfer that was reversed. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/transfer" + required: + - amount + - created + - currency + - id + - object + - transfer + title: TransferReversal + type: object + x-expandableFields: + - balance_transaction + - destination_payment_refund + - source_refund + - transfer + x-resourceId: transfer_reversal + transfer_schedule: + description: '' + properties: + delay_days: + description: The number of days charges for the account will be held before + being paid out. + type: integer + interval: + description: How frequently funds will be paid out. One of `manual` (payouts + only created via API call), `daily`, `weekly`, or `monthly`. + maxLength: 5000 + type: string + monthly_anchor: + description: The day of the month funds will be paid out. Only shown if + `interval` is monthly. Payouts scheduled between the 29th and 31st of + the month are sent on the last day of shorter months. + type: integer + weekly_anchor: + description: The day of the week funds will be paid out, of the style 'monday', + 'tuesday', etc. Only shown if `interval` is weekly. + maxLength: 5000 + type: string + required: + - delay_days + - interval + title: TransferSchedule + type: object + x-expandableFields: [] + transform_quantity: + description: '' + properties: + divide_by: + description: Divide usage by this number. + type: integer + round: + description: After division, either round the result `up` or `down`. + enum: + - down + - up + type: string + required: + - divide_by + - round + title: TransformQuantity + type: object + x-expandableFields: [] + transform_usage: + description: '' + properties: + divide_by: + description: Divide usage by this number. + type: integer + round: + description: After division, either round the result `up` or `down`. + enum: + - down + - up + type: string + required: + - divide_by + - round + title: TransformUsage + type: object + x-expandableFields: [] + treasury.credit_reversal: + description: You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) + depending on their network and source flow. Reversing a ReceivedCredit leads + to the creation of a new object known as a CreditReversal. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + financial_account: + description: The FinancialAccount to reverse funds from. + maxLength: 5000 + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + network: + description: The rails used to reverse the funds. + enum: + - ach + - stripe + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.credit_reversal + type: string + received_credit: + description: The ReceivedCredit being reversed. + maxLength: 5000 + type: string + status: + description: Status of the CreditReversal + enum: + - canceled + - posted + - processing + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_received_credits_resource_status_transitions" + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - created + - currency + - financial_account + - id + - livemode + - metadata + - network + - object + - received_credit + - status + - status_transitions + title: TreasuryReceivedCreditsResourceCreditReversal + type: object + x-expandableFields: + - status_transitions + - transaction + x-resourceId: treasury.credit_reversal + treasury.debit_reversal: + description: You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) + depending on their network and source flow. Reversing a ReceivedDebit leads + to the creation of a new object known as a DebitReversal. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + financial_account: + description: The FinancialAccount to reverse funds from. + maxLength: 5000 + nullable: true + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + linked_flows: + anyOf: + - "$ref": "#/components/schemas/treasury_received_debits_resource_debit_reversal_linked_flows" + description: Other flows linked to a DebitReversal. + nullable: true + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + network: + description: The rails used to reverse the funds. + enum: + - ach + - card + type: string + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.debit_reversal + type: string + received_debit: + description: The ReceivedDebit being reversed. + maxLength: 5000 + type: string + status: + description: Status of the DebitReversal + enum: + - failed + - processing + - succeeded + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_received_debits_resource_status_transitions" + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - created + - currency + - id + - livemode + - metadata + - network + - object + - received_debit + - status + - status_transitions + title: TreasuryReceivedDebitsResourceDebitReversal + type: object + x-expandableFields: + - linked_flows + - status_transitions + - transaction + x-resourceId: treasury.debit_reversal + treasury.financial_account: + description: |- + Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. + FinancialAccounts serve as the source and destination of Treasury’s money movement APIs. + properties: + active_features: + description: The array of paths to active Features in the Features hash. + items: + enum: + - card_issuing + - deposit_insurance + - financial_addresses.aba + - inbound_transfers.ach + - intra_stripe_flows + - outbound_payments.ach + - outbound_payments.us_domestic_wire + - outbound_transfers.ach + - outbound_transfers.us_domestic_wire + - remote_deposit_capture + type: string + x-stripeBypassValidation: true + type: array + balance: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_balance" + country: + description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + maxLength: 5000 + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + features: + "$ref": "#/components/schemas/treasury.financial_account_features" + financial_addresses: + description: The set of credentials that resolve to a FinancialAccount. + items: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_address" + type: array + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + nullable: true + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.financial_account + type: string + pending_features: + description: The array of paths to pending Features in the Features hash. + items: + enum: + - card_issuing + - deposit_insurance + - financial_addresses.aba + - inbound_transfers.ach + - intra_stripe_flows + - outbound_payments.ach + - outbound_payments.us_domestic_wire + - outbound_transfers.ach + - outbound_transfers.us_domestic_wire + - remote_deposit_capture + type: string + x-stripeBypassValidation: true + type: array + platform_restrictions: + anyOf: + - "$ref": "#/components/schemas/treasury_financial_accounts_resource_platform_restrictions" + description: The set of functionalities that the platform can restrict on + the FinancialAccount. + nullable: true + restricted_features: + description: The array of paths to restricted Features in the Features hash. + items: + enum: + - card_issuing + - deposit_insurance + - financial_addresses.aba + - inbound_transfers.ach + - intra_stripe_flows + - outbound_payments.ach + - outbound_payments.us_domestic_wire + - outbound_transfers.ach + - outbound_transfers.us_domestic_wire + - remote_deposit_capture + type: string + x-stripeBypassValidation: true + type: array + status: + description: The enum specifying what state the account is in. + enum: + - closed + - open + type: string + x-stripeBypassValidation: true + status_details: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_status_details" + supported_currencies: + description: The currencies the FinancialAccount can hold a balance in. + Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. + items: + type: string + type: array + required: + - balance + - country + - created + - financial_addresses + - id + - livemode + - object + - status + - status_details + - supported_currencies + title: TreasuryFinancialAccountsResourceFinancialAccount + type: object + x-expandableFields: + - balance + - features + - financial_addresses + - platform_restrictions + - status_details + x-resourceId: treasury.financial_account + treasury.financial_account_features: + description: |- + Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. + Stripe or the platform can control Features via the requested field. + properties: + card_issuing: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + deposit_insurance: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + financial_addresses: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_financial_addresses_features" + inbound_transfers: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_inbound_transfers" + intra_stripe_flows: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.financial_account_features + type: string + outbound_payments: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_payments" + outbound_transfers: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_outbound_transfers" + required: + - object + title: TreasuryFinancialAccountsResourceFinancialAccountFeatures + type: object + x-expandableFields: + - card_issuing + - deposit_insurance + - financial_addresses + - inbound_transfers + - intra_stripe_flows + - outbound_payments + - outbound_transfers + x-resourceId: treasury.financial_account_features + treasury.inbound_transfer: + description: Use [InboundTransfers](https://stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) + via a PaymentMethod that is owned by you. The funds will be transferred via + an ACH debit. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + cancelable: + description: Returns `true` if the InboundTransfer is able to be canceled. + type: boolean + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + failure_details: + anyOf: + - "$ref": "#/components/schemas/treasury_inbound_transfers_resource_failure_details" + description: Details about this InboundTransfer's failure. Only set when + status is `failed`. + nullable: true + financial_account: + description: The FinancialAccount that received the funds. + maxLength: 5000 + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + linked_flows: + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.inbound_transfer + type: string + origin_payment_method: + description: The origin payment method to be debited for an InboundTransfer. + maxLength: 5000 + type: string + origin_payment_method_details: + anyOf: + - "$ref": "#/components/schemas/inbound_transfers" + description: Details about the PaymentMethod for an InboundTransfer. + nullable: true + returned: + description: Returns `true` if the funds for an InboundTransfer were returned + after the InboundTransfer went to the `succeeded` state. + nullable: true + type: boolean + statement_descriptor: + description: Statement descriptor shown when funds are debited from the + source. Not all payment networks support `statement_descriptor`. + maxLength: 5000 + type: string + status: + description: 'Status of the InboundTransfer: `processing`, `succeeded`, + `failed`, and `canceled`. An InboundTransfer is `processing` if it is + created and pending. The status changes to `succeeded` once the funds + have been "confirmed" and a `transaction` is created and posted. The status + changes to `failed` if the transfer fails.' + enum: + - canceled + - failed + - processing + - succeeded + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions" + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - cancelable + - created + - currency + - financial_account + - id + - linked_flows + - livemode + - metadata + - object + - origin_payment_method + - statement_descriptor + - status + - status_transitions + title: TreasuryInboundTransfersResourceInboundTransfer + type: object + x-expandableFields: + - failure_details + - linked_flows + - origin_payment_method_details + - status_transitions + - transaction + x-resourceId: treasury.inbound_transfer + treasury.outbound_payment: + description: |- + Use OutboundPayments to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + + Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + cancelable: + description: Returns `true` if the object can be canceled, and `false` otherwise. + type: boolean + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: ID of the [customer](https://stripe.com/docs/api/customers) + to whom an OutboundPayment is sent. + maxLength: 5000 + nullable: true + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + destination_payment_method: + description: The PaymentMethod via which an OutboundPayment is sent. This + field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + maxLength: 5000 + nullable: true + type: string + destination_payment_method_details: + anyOf: + - "$ref": "#/components/schemas/outbound_payments_payment_method_details" + description: Details about the PaymentMethod for an OutboundPayment. + nullable: true + end_user_details: + anyOf: + - "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_end_user_details" + description: Details about the end user. + nullable: true + expected_arrival_date: + description: The date when funds are expected to arrive in the destination + account. + format: unix-time + type: integer + financial_account: + description: The FinancialAccount that funds were pulled from. + maxLength: 5000 + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.outbound_payment + type: string + returned_details: + anyOf: + - "$ref": "#/components/schemas/treasury_outbound_payments_resource_returned_status" + description: Details about a returned OutboundPayment. Only set when the + status is `returned`. + nullable: true + statement_descriptor: + description: The description that appears on the receiving end for an OutboundPayment + (for example, bank statement for external bank transfer). + maxLength: 5000 + type: string + status: + description: 'Current status of the OutboundPayment: `processing`, `failed`, + `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if + it has been created and is pending. The status changes to `posted` once + the OutboundPayment has been "confirmed" and funds have left the account, + or to `failed` or `canceled`. If an OutboundPayment fails to arrive at + its destination, its status will change to `returned`.' + enum: + - canceled + - failed + - posted + - processing + - returned + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_outbound_payments_resource_outbound_payment_resource_status_transitions" + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - cancelable + - created + - currency + - expected_arrival_date + - financial_account + - id + - livemode + - metadata + - object + - statement_descriptor + - status + - status_transitions + - transaction + title: TreasuryOutboundPaymentsResourceOutboundPayment + type: object + x-expandableFields: + - destination_payment_method_details + - end_user_details + - returned_details + - status_transitions + - transaction + x-resourceId: treasury.outbound_payment + treasury.outbound_transfer: + description: |- + Use OutboundTransfers to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + + Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + cancelable: + description: Returns `true` if the object can be canceled, and `false` otherwise. + type: boolean + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + nullable: true + type: string + destination_payment_method: + description: The PaymentMethod used as the payment instrument for an OutboundTransfer. + maxLength: 5000 + nullable: true + type: string + destination_payment_method_details: + "$ref": "#/components/schemas/outbound_transfers_payment_method_details" + expected_arrival_date: + description: The date when funds are expected to arrive in the destination + account. + format: unix-time + type: integer + financial_account: + description: The FinancialAccount that funds were pulled from. + maxLength: 5000 + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.outbound_transfer + type: string + returned_details: + anyOf: + - "$ref": "#/components/schemas/treasury_outbound_transfers_resource_returned_details" + description: Details about a returned OutboundTransfer. Only set when the + status is `returned`. + nullable: true + statement_descriptor: + description: Information about the OutboundTransfer to be sent to the recipient + account. + maxLength: 5000 + type: string + status: + description: 'Current status of the OutboundTransfer: `processing`, `failed`, + `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` + if it has been created and is pending. The status changes to `posted` + once the OutboundTransfer has been "confirmed" and funds have left the + account, or to `failed` or `canceled`. If an OutboundTransfer fails to + arrive at its destination, its status will change to `returned`.' + enum: + - canceled + - failed + - posted + - processing + - returned + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_outbound_transfers_resource_status_transitions" + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - cancelable + - created + - currency + - destination_payment_method_details + - expected_arrival_date + - financial_account + - id + - livemode + - metadata + - object + - statement_descriptor + - status + - status_transitions + - transaction + title: TreasuryOutboundTransfersResourceOutboundTransfer + type: object + x-expandableFields: + - destination_payment_method_details + - returned_details + - status_transitions + - transaction + x-resourceId: treasury.outbound_transfer + treasury.received_credit: + description: ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) + (for example, via ACH or wire). These money movements are not initiated from + the FinancialAccount. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + type: string + failure_code: + description: Reason for the failure. A ReceivedCredit might fail because + the receiving FinancialAccount is closed or frozen. + enum: + - account_closed + - account_frozen + - other + nullable: true + type: string + x-stripeBypassValidation: true + financial_account: + description: The FinancialAccount that received the funds. + maxLength: 5000 + nullable: true + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + initiating_payment_method_details: + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + linked_flows: + "$ref": "#/components/schemas/treasury_received_credits_resource_linked_flows" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + network: + description: The rails used to send the funds. + enum: + - ach + - card + - stripe + - us_domestic_wire + type: string + x-stripeBypassValidation: true + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.received_credit + type: string + reversal_details: + anyOf: + - "$ref": "#/components/schemas/treasury_received_credits_resource_reversal_details" + description: Details describing when a ReceivedCredit may be reversed. + nullable: true + status: + description: Status of the ReceivedCredit. ReceivedCredits are created either + `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is + declined, the failure reason can be found in the `failure_code` field. + enum: + - failed + - succeeded + type: string + x-stripeBypassValidation: true + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - created + - currency + - description + - id + - initiating_payment_method_details + - linked_flows + - livemode + - network + - object + - status + title: TreasuryReceivedCreditsResourceReceivedCredit + type: object + x-expandableFields: + - initiating_payment_method_details + - linked_flows + - reversal_details + - transaction + x-resourceId: treasury.received_credit + treasury.received_debit: + description: ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). + These are not initiated from the FinancialAccount. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + type: string + failure_code: + description: Reason for the failure. A ReceivedDebit might fail because + the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. + enum: + - account_closed + - account_frozen + - insufficient_funds + - other + nullable: true + type: string + financial_account: + description: The FinancialAccount that funds were pulled from. + maxLength: 5000 + nullable: true + type: string + hosted_regulatory_receipt_url: + description: A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) + URL that is provided when money movement is considered regulated under + Stripe's money transmission licenses. + maxLength: 5000 + nullable: true + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + initiating_payment_method_details: + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details" + linked_flows: + "$ref": "#/components/schemas/treasury_received_debits_resource_linked_flows" + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + network: + description: The network used for the ReceivedDebit. + enum: + - ach + - card + - stripe + type: string + x-stripeBypassValidation: true + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.received_debit + type: string + reversal_details: + anyOf: + - "$ref": "#/components/schemas/treasury_received_debits_resource_reversal_details" + description: Details describing when a ReceivedDebit might be reversed. + nullable: true + status: + description: Status of the ReceivedDebit. ReceivedDebits are created with + a status of either `succeeded` (approved) or `failed` (declined). The + failure reason can be found under the `failure_code`. + enum: + - failed + - succeeded + type: string + x-stripeBypassValidation: true + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + nullable: true + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - amount + - created + - currency + - description + - id + - linked_flows + - livemode + - network + - object + - status + title: TreasuryReceivedDebitsResourceReceivedDebit + type: object + x-expandableFields: + - initiating_payment_method_details + - linked_flows + - reversal_details + - transaction + x-resourceId: treasury.received_debit + treasury.transaction: + description: Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) + balance. + properties: + amount: + description: Amount (in cents) transferred. + type: integer + balance_impact: + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful for + displaying to users. + maxLength: 5000 + type: string + entries: + description: A list of TransactionEntries that are part of this Transaction. + This cannot be expanded in any list endpoints. + nullable: true + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.transaction_entry" + type: array + has_more: + description: True if this list has another page of items after this + one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/treasury/transaction_entries" + type: string + required: + - data + - has_more + - object + - url + title: TreasuryTransactionsResourceTransactionEntryList + type: object + x-expandableFields: + - data + financial_account: + description: The FinancialAccount associated with this object. + maxLength: 5000 + type: string + flow: + description: ID of the flow that created the Transaction. + maxLength: 5000 + nullable: true + type: string + flow_details: + anyOf: + - "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + description: Details of the flow that created the Transaction. + nullable: true + flow_type: + description: Type of the flow that created the Transaction. + enum: + - credit_reversal + - debit_reversal + - inbound_transfer + - issuing_authorization + - other + - outbound_payment + - outbound_transfer + - received_credit + - received_debit + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.transaction + type: string + status: + description: Status of the Transaction. + enum: + - open + - posted + - void + type: string + status_transitions: + "$ref": "#/components/schemas/treasury_transactions_resource_abstract_transaction_resource_status_transitions" + required: + - amount + - balance_impact + - created + - currency + - description + - financial_account + - flow_type + - id + - livemode + - object + - status + - status_transitions + title: TreasuryTransactionsResourceTransaction + type: object + x-expandableFields: + - balance_impact + - entries + - flow_details + - status_transitions + x-resourceId: treasury.transaction + treasury.transaction_entry: + description: TransactionEntries represent individual units of money movements + within a single [Transaction](https://stripe.com/docs/api#transactions). + properties: + balance_impact: + "$ref": "#/components/schemas/treasury_transactions_resource_balance_impact" + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + effective_at: + description: When the TransactionEntry will impact the FinancialAccount's + balance. + format: unix-time + type: integer + financial_account: + description: The FinancialAccount associated with this object. + maxLength: 5000 + type: string + flow: + description: Token of the flow associated with the TransactionEntry. + maxLength: 5000 + nullable: true + type: string + flow_details: + anyOf: + - "$ref": "#/components/schemas/treasury_transactions_resource_flow_details" + description: Details of the flow associated with the TransactionEntry. + nullable: true + flow_type: + description: Type of the flow associated with the TransactionEntry. + enum: + - credit_reversal + - debit_reversal + - inbound_transfer + - issuing_authorization + - other + - outbound_payment + - outbound_transfer + - received_credit + - received_debit + type: string + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - treasury.transaction_entry + type: string + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + type: + description: The specific money movement that generated the TransactionEntry. + enum: + - credit_reversal + - credit_reversal_posting + - debit_reversal + - inbound_transfer + - inbound_transfer_return + - issuing_authorization_hold + - issuing_authorization_release + - other + - outbound_payment + - outbound_payment_cancellation + - outbound_payment_failure + - outbound_payment_posting + - outbound_payment_return + - outbound_transfer + - outbound_transfer_cancellation + - outbound_transfer_failure + - outbound_transfer_posting + - outbound_transfer_return + - received_credit + - received_debit + type: string + required: + - balance_impact + - created + - currency + - effective_at + - financial_account + - flow_type + - id + - livemode + - object + - transaction + - type + title: TreasuryTransactionsResourceTransactionEntry + type: object + x-expandableFields: + - balance_impact + - flow_details + - transaction + x-resourceId: treasury.transaction_entry + treasury_financial_accounts_resource_aba_record: + description: ABA Records contain U.S. bank account details per the ABA format. + properties: + account_holder_name: + description: The name of the person or business that owns the bank account. + maxLength: 5000 + type: string + account_number: + description: The account number. + maxLength: 5000 + nullable: true + type: string + account_number_last4: + description: The last four characters of the account number. + maxLength: 5000 + type: string + bank_name: + description: Name of the bank. + maxLength: 5000 + type: string + routing_number: + description: Routing number for the account. + maxLength: 5000 + type: string + required: + - account_holder_name + - account_number_last4 + - bank_name + - routing_number + title: TreasuryFinancialAccountsResourceABARecord + type: object + x-expandableFields: [] + treasury_financial_accounts_resource_balance: + description: Balance information for the FinancialAccount + properties: + cash: + additionalProperties: + type: integer + description: Funds the user can spend right now. + type: object + inbound_pending: + additionalProperties: + type: integer + description: Funds not spendable yet, but will become available at a later + time. + type: object + outbound_pending: + additionalProperties: + type: integer + description: Funds in the account, but not spendable because they are being + held for pending outbound flows. + type: object + required: + - cash + - inbound_pending + - outbound_pending + title: TreasuryFinancialAccountsResourceBalance + type: object + x-expandableFields: [] + treasury_financial_accounts_resource_closed_status_details: + description: '' + properties: + reasons: + description: The array that contains reasons for a FinancialAccount closure. + items: + enum: + - account_rejected + - closed_by_platform + - other + type: string + type: array + required: + - reasons + title: TreasuryFinancialAccountsResourceClosedStatusDetails + type: object + x-expandableFields: [] + treasury_financial_accounts_resource_financial_address: + description: FinancialAddresses contain identifying information that resolves + to a FinancialAccount. + properties: + aba: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_aba_record" + supported_networks: + description: The list of networks that the address supports + items: + enum: + - ach + - us_domestic_wire + type: string + x-stripeBypassValidation: true + type: array + type: + description: The type of financial address + enum: + - aba + type: string + x-stripeBypassValidation: true + required: + - type + title: TreasuryFinancialAccountsResourceFinancialAddress + type: object + x-expandableFields: + - aba + treasury_financial_accounts_resource_financial_addresses_features: + description: Settings related to Financial Addresses features on a Financial + Account + properties: + aba: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + title: TreasuryFinancialAccountsResourceFinancialAddressesFeatures + type: object + x-expandableFields: + - aba + treasury_financial_accounts_resource_inbound_transfers: + description: InboundTransfers contains inbound transfers features for a FinancialAccount. + properties: + ach: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + title: TreasuryFinancialAccountsResourceInboundTransfers + type: object + x-expandableFields: + - ach + treasury_financial_accounts_resource_outbound_payments: + description: Settings related to Outbound Payments features on a Financial Account + properties: + ach: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + us_domestic_wire: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + title: TreasuryFinancialAccountsResourceOutboundPayments + type: object + x-expandableFields: + - ach + - us_domestic_wire + treasury_financial_accounts_resource_outbound_transfers: + description: OutboundTransfers contains outbound transfers features for a FinancialAccount. + properties: + ach: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + us_domestic_wire: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggle_settings" + title: TreasuryFinancialAccountsResourceOutboundTransfers + type: object + x-expandableFields: + - ach + - us_domestic_wire + treasury_financial_accounts_resource_platform_restrictions: + description: Restrictions that a Connect Platform has placed on this FinancialAccount. + properties: + inbound_flows: + description: Restricts all inbound money movement. + enum: + - restricted + - unrestricted + nullable: true + type: string + outbound_flows: + description: Restricts all outbound money movement. + enum: + - restricted + - unrestricted + nullable: true + type: string + title: TreasuryFinancialAccountsResourcePlatformRestrictions + type: object + x-expandableFields: [] + treasury_financial_accounts_resource_status_details: + description: '' + properties: + closed: + anyOf: + - "$ref": "#/components/schemas/treasury_financial_accounts_resource_closed_status_details" + description: Details related to the closure of this FinancialAccount + nullable: true + title: TreasuryFinancialAccountsResourceStatusDetails + type: object + x-expandableFields: + - closed + treasury_financial_accounts_resource_toggle_settings: + description: Toggle settings for enabling/disabling a feature + properties: + requested: + description: Whether the FinancialAccount should have the Feature. + type: boolean + status: + description: Whether the Feature is operational. + enum: + - active + - pending + - restricted + type: string + status_details: + description: Additional details; includes at least one entry when the status + is not `active`. + items: + "$ref": "#/components/schemas/treasury_financial_accounts_resource_toggles_setting_status_details" + type: array + required: + - requested + - status + - status_details + title: TreasuryFinancialAccountsResourceToggleSettings + type: object + x-expandableFields: + - status_details + treasury_financial_accounts_resource_toggles_setting_status_details: + description: Additional details on the FinancialAccount Features information. + properties: + code: + description: Represents the reason why the status is `pending` or `restricted`. + enum: + - activating + - capability_not_requested + - financial_account_closed + - rejected_other + - rejected_unsupported_business + - requirements_past_due + - requirements_pending_verification + - restricted_by_platform + - restricted_other + type: string + x-stripeBypassValidation: true + resolution: + description: Represents what the user should do, if anything, to activate + the Feature. + enum: + - contact_stripe + - provide_information + - remove_restriction + nullable: true + type: string + x-stripeBypassValidation: true + restriction: + description: The `platform_restrictions` that are restricting this Feature. + enum: + - inbound_flows + - outbound_flows + type: string + required: + - code + title: TreasuryFinancialAccountsResourceTogglesSettingStatusDetails + type: object + x-expandableFields: [] + treasury_inbound_transfers_resource_failure_details: + description: '' + properties: + code: + description: Reason for the failure. + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - debit_not_authorized + - incorrect_account_holder_address + - incorrect_account_holder_name + - incorrect_account_holder_tax_id + - insufficient_funds + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + required: + - code + title: TreasuryInboundTransfersResourceFailureDetails + type: object + x-expandableFields: [] + treasury_inbound_transfers_resource_inbound_transfer_resource_linked_flows: + description: '' + properties: + received_debit: + description: If funds for this flow were returned after the flow went to + the `succeeded` state, this field contains a reference to the ReceivedDebit + return. + maxLength: 5000 + nullable: true + type: string + title: TreasuryInboundTransfersResourceInboundTransferResourceLinkedFlows + type: object + x-expandableFields: [] + treasury_inbound_transfers_resource_inbound_transfer_resource_status_transitions: + description: '' + properties: + canceled_at: + description: Timestamp describing when an InboundTransfer changed status + to `canceled`. + format: unix-time + nullable: true + type: integer + failed_at: + description: Timestamp describing when an InboundTransfer changed status + to `failed`. + format: unix-time + nullable: true + type: integer + succeeded_at: + description: Timestamp describing when an InboundTransfer changed status + to `succeeded`. + format: unix-time + nullable: true + type: integer + title: TreasuryInboundTransfersResourceInboundTransferResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_outbound_payments_resource_outbound_payment_resource_end_user_details: + description: '' + properties: + ip_address: + description: IP address of the user initiating the OutboundPayment. Set + if `present` is set to `true`. IP address collection is required for risk + and compliance reasons. This will be used to help determine if the OutboundPayment + is authorized or should be blocked. + maxLength: 5000 + nullable: true + type: string + present: + description: "`true`` if the OutboundPayment creation request is being made + on behalf of an end user by a platform. Otherwise, `false`." + type: boolean + required: + - present + title: TreasuryOutboundPaymentsResourceOutboundPaymentResourceEndUserDetails + type: object + x-expandableFields: [] + treasury_outbound_payments_resource_outbound_payment_resource_status_transitions: + description: '' + properties: + canceled_at: + description: Timestamp describing when an OutboundPayment changed status + to `canceled`. + format: unix-time + nullable: true + type: integer + failed_at: + description: Timestamp describing when an OutboundPayment changed status + to `failed`. + format: unix-time + nullable: true + type: integer + posted_at: + description: Timestamp describing when an OutboundPayment changed status + to `posted`. + format: unix-time + nullable: true + type: integer + returned_at: + description: Timestamp describing when an OutboundPayment changed status + to `returned`. + format: unix-time + nullable: true + type: integer + title: TreasuryOutboundPaymentsResourceOutboundPaymentResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_outbound_payments_resource_returned_status: + description: '' + properties: + code: + description: Reason for the return. + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - declined + - incorrect_account_holder_name + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - code + - transaction + title: TreasuryOutboundPaymentsResourceReturnedStatus + type: object + x-expandableFields: + - transaction + treasury_outbound_transfers_resource_returned_details: + description: '' + properties: + code: + description: Reason for the return. + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - declined + - incorrect_account_holder_name + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + transaction: + anyOf: + - maxLength: 5000 + type: string + - "$ref": "#/components/schemas/treasury.transaction" + description: The Transaction associated with this object. + x-expansionResources: + oneOf: + - "$ref": "#/components/schemas/treasury.transaction" + required: + - code + - transaction + title: TreasuryOutboundTransfersResourceReturnedDetails + type: object + x-expandableFields: + - transaction + treasury_outbound_transfers_resource_status_transitions: + description: '' + properties: + canceled_at: + description: Timestamp describing when an OutboundTransfer changed status + to `canceled` + format: unix-time + nullable: true + type: integer + failed_at: + description: Timestamp describing when an OutboundTransfer changed status + to `failed` + format: unix-time + nullable: true + type: integer + posted_at: + description: Timestamp describing when an OutboundTransfer changed status + to `posted` + format: unix-time + nullable: true + type: integer + returned_at: + description: Timestamp describing when an OutboundTransfer changed status + to `returned` + format: unix-time + nullable: true + type: integer + title: TreasuryOutboundTransfersResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_received_credits_resource_linked_flows: + description: '' + properties: + credit_reversal: + description: The CreditReversal created as a result of this ReceivedCredit + being reversed. + maxLength: 5000 + nullable: true + type: string + issuing_authorization: + description: Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) + object. + maxLength: 5000 + nullable: true + type: string + issuing_transaction: + description: Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) + object. + maxLength: 5000 + nullable: true + type: string + source_flow: + description: ID of the source flow. Set if `network` is `stripe` and the + source flow is visible to the user. Examples of source flows include OutboundPayments, + payouts, or CreditReversals. + maxLength: 5000 + nullable: true + type: string + source_flow_details: + anyOf: + - "$ref": "#/components/schemas/treasury_received_credits_resource_source_flows_details" + description: The expandable object of the source flow. + nullable: true + source_flow_type: + description: The type of flow that originated the ReceivedCredit (for example, + `outbound_payment`). + maxLength: 5000 + nullable: true + type: string + title: TreasuryReceivedCreditsResourceLinkedFlows + type: object + x-expandableFields: + - source_flow_details + treasury_received_credits_resource_reversal_details: + description: '' + properties: + deadline: + description: Time before which a ReceivedCredit can be reversed. + format: unix-time + nullable: true + type: integer + restricted_reason: + description: Set if a ReceivedCredit cannot be reversed. + enum: + - already_reversed + - deadline_passed + - network_restricted + - other + - source_flow_restricted + nullable: true + type: string + title: TreasuryReceivedCreditsResourceReversalDetails + type: object + x-expandableFields: [] + treasury_received_credits_resource_source_flows_details: + description: '' + properties: + credit_reversal: + "$ref": "#/components/schemas/treasury.credit_reversal" + outbound_payment: + "$ref": "#/components/schemas/treasury.outbound_payment" + payout: + "$ref": "#/components/schemas/payout" + type: + description: The type of the source flow that originated the ReceivedCredit. + enum: + - credit_reversal + - other + - outbound_payment + - payout + type: string + x-stripeBypassValidation: true + required: + - type + title: TreasuryReceivedCreditsResourceSourceFlowsDetails + type: object + x-expandableFields: + - credit_reversal + - outbound_payment + - payout + treasury_received_credits_resource_status_transitions: + description: '' + properties: + posted_at: + description: Timestamp describing when the CreditReversal changed status + to `posted` + format: unix-time + nullable: true + type: integer + title: TreasuryReceivedCreditsResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_received_debits_resource_debit_reversal_linked_flows: + description: '' + properties: + issuing_dispute: + description: Set if there is an Issuing dispute associated with the DebitReversal. + maxLength: 5000 + nullable: true + type: string + title: TreasuryReceivedDebitsResourceDebitReversalLinkedFlows + type: object + x-expandableFields: [] + treasury_received_debits_resource_linked_flows: + description: '' + properties: + debit_reversal: + description: The DebitReversal created as a result of this ReceivedDebit + being reversed. + maxLength: 5000 + nullable: true + type: string + inbound_transfer: + description: Set if the ReceivedDebit is associated with an InboundTransfer's + return of funds. + maxLength: 5000 + nullable: true + type: string + issuing_authorization: + description: Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) + object. + maxLength: 5000 + nullable: true + type: string + issuing_transaction: + description: Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) + object. + maxLength: 5000 + nullable: true + type: string + title: TreasuryReceivedDebitsResourceLinkedFlows + type: object + x-expandableFields: [] + treasury_received_debits_resource_reversal_details: + description: '' + properties: + deadline: + description: Time before which a ReceivedDebit can be reversed. + format: unix-time + nullable: true + type: integer + restricted_reason: + description: Set if a ReceivedDebit can't be reversed. + enum: + - already_reversed + - deadline_passed + - network_restricted + - other + - source_flow_restricted + nullable: true + type: string + title: TreasuryReceivedDebitsResourceReversalDetails + type: object + x-expandableFields: [] + treasury_received_debits_resource_status_transitions: + description: '' + properties: + completed_at: + description: Timestamp describing when the DebitReversal changed status + to `completed`. + format: unix-time + nullable: true + type: integer + title: TreasuryReceivedDebitsResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_shared_resource_billing_details: + description: '' + properties: + address: + "$ref": "#/components/schemas/address" + email: + description: Email address. + maxLength: 5000 + nullable: true + type: string + name: + description: Full name. + maxLength: 5000 + nullable: true + type: string + required: + - address + title: TreasurySharedResourceBillingDetails + type: object + x-expandableFields: + - address + treasury_shared_resource_initiating_payment_method_details_initiating_payment_method_details: + description: '' + properties: + balance: + description: Set when `type` is `balance`. + enum: + - payments + type: string + billing_details: + "$ref": "#/components/schemas/treasury_shared_resource_billing_details" + financial_account: + "$ref": "#/components/schemas/received_payment_method_details_financial_account" + issuing_card: + description: Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) + ID. + maxLength: 5000 + type: string + type: + description: Polymorphic type matching the originating money movement's + source. This can be an external account, a Stripe balance, or a FinancialAccount. + enum: + - balance + - financial_account + - issuing_card + - stripe + - us_bank_account + type: string + x-stripeBypassValidation: true + us_bank_account: + "$ref": "#/components/schemas/treasury_shared_resource_initiating_payment_method_details_us_bank_account" + required: + - billing_details + - type + title: TreasurySharedResourceInitiatingPaymentMethodDetailsInitiatingPaymentMethodDetails + type: object + x-expandableFields: + - billing_details + - financial_account + - us_bank_account + treasury_shared_resource_initiating_payment_method_details_us_bank_account: + description: '' + properties: + bank_name: + description: Bank name. + maxLength: 5000 + nullable: true + type: string + last4: + description: The last four digits of the bank account number. + maxLength: 5000 + nullable: true + type: string + routing_number: + description: The routing number for the bank account. + maxLength: 5000 + nullable: true + type: string + title: TreasurySharedResourceInitiatingPaymentMethodDetailsUSBankAccount + type: object + x-expandableFields: [] + treasury_transactions_resource_abstract_transaction_resource_status_transitions: + description: '' + properties: + posted_at: + description: Timestamp describing when the Transaction changed status to + `posted`. + format: unix-time + nullable: true + type: integer + void_at: + description: Timestamp describing when the Transaction changed status to + `void`. + format: unix-time + nullable: true + type: integer + title: TreasuryTransactionsResourceAbstractTransactionResourceStatusTransitions + type: object + x-expandableFields: [] + treasury_transactions_resource_balance_impact: + description: Change to a FinancialAccount's balance + properties: + cash: + description: The change made to funds the user can spend right now. + type: integer + inbound_pending: + description: The change made to funds that are not spendable yet, but will + become available at a later time. + type: integer + outbound_pending: + description: The change made to funds in the account, but not spendable + because they are being held for pending outbound flows. + type: integer + required: + - cash + - inbound_pending + - outbound_pending + title: TreasuryTransactionsResourceBalanceImpact + type: object + x-expandableFields: [] + treasury_transactions_resource_flow_details: + description: '' + properties: + credit_reversal: + "$ref": "#/components/schemas/treasury.credit_reversal" + debit_reversal: + "$ref": "#/components/schemas/treasury.debit_reversal" + inbound_transfer: + "$ref": "#/components/schemas/treasury.inbound_transfer" + issuing_authorization: + "$ref": "#/components/schemas/issuing.authorization" + outbound_payment: + "$ref": "#/components/schemas/treasury.outbound_payment" + outbound_transfer: + "$ref": "#/components/schemas/treasury.outbound_transfer" + received_credit: + "$ref": "#/components/schemas/treasury.received_credit" + received_debit: + "$ref": "#/components/schemas/treasury.received_debit" + type: + description: Type of the flow that created the Transaction. Set to the same + value as `flow_type`. + enum: + - credit_reversal + - debit_reversal + - inbound_transfer + - issuing_authorization + - other + - outbound_payment + - outbound_transfer + - received_credit + - received_debit + type: string + required: + - type + title: TreasuryTransactionsResourceFlowDetails + type: object + x-expandableFields: + - credit_reversal + - debit_reversal + - inbound_transfer + - issuing_authorization + - outbound_payment + - outbound_transfer + - received_credit + - received_debit + us_bank_account_networks: + description: '' + properties: + preferred: + description: The preferred network. + maxLength: 5000 + nullable: true + type: string + supported: + description: All supported networks. + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + required: + - supported + title: us_bank_account_networks + type: object + x-expandableFields: [] + usage_record: + description: |- + Usage records allow you to report customer usage and metrics to Stripe for + metered billing of subscription prices. + + Related guide: [Metered Billing](https://stripe.com/docs/billing/subscriptions/metered-billing). + properties: + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - usage_record + type: string + quantity: + description: The usage quantity for the specified date. + type: integer + subscription_item: + description: The ID of the subscription item this usage record contains + data for. + maxLength: 5000 + type: string + timestamp: + description: The timestamp when this usage occurred. + format: unix-time + type: integer + required: + - id + - livemode + - object + - quantity + - subscription_item + - timestamp + title: UsageRecord + type: object + x-expandableFields: [] + x-resourceId: usage_record + usage_record_summary: + description: '' + properties: + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + invoice: + description: The invoice in which this usage period has been billed for. + maxLength: 5000 + nullable: true + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - usage_record_summary + type: string + period: + "$ref": "#/components/schemas/period" + subscription_item: + description: The ID of the subscription item this summary is describing. + maxLength: 5000 + type: string + total_usage: + description: The total usage within this usage period. + type: integer + required: + - id + - livemode + - object + - period + - subscription_item + - total_usage + title: UsageRecordSummary + type: object + x-expandableFields: + - period + x-resourceId: usage_record_summary + verification_session_redaction: + description: '' + properties: + status: + description: Indicates whether this object and its related objects have + been redacted or not. + enum: + - processing + - redacted + type: string + required: + - status + title: verification_session_redaction + type: object + x-expandableFields: [] + webhook_endpoint: + description: |- + You can configure [webhook endpoints](https://stripe.com/docs/webhooks/) via the API to be + notified about events that happen in your Stripe account or connected + accounts. + + Most users configure webhooks from [the dashboard](https://dashboard.stripe.com/webhooks), which provides a user interface for registering and testing your webhook endpoints. + + Related guide: [Setting up Webhooks](https://stripe.com/docs/webhooks/configure). + properties: + api_version: + description: The API version events are rendered as for this webhook endpoint. + maxLength: 5000 + nullable: true + type: string + application: + description: The ID of the associated Connect application. + maxLength: 5000 + nullable: true + type: string + created: + description: Time at which the object was created. Measured in seconds since + the Unix epoch. + format: unix-time + type: integer + description: + description: An optional description of what the webhook is used for. + maxLength: 5000 + nullable: true + type: string + enabled_events: + description: The list of events to enable for this endpoint. `['*']` indicates + that all events are enabled, except those that require explicit selection. + items: + maxLength: 5000 + type: string + type: array + id: + description: Unique identifier for the object. + maxLength: 5000 + type: string + livemode: + description: Has the value `true` if the object exists in live mode or the + value `false` if the object exists in test mode. + type: boolean + metadata: + additionalProperties: + maxLength: 500 + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing additional + information about the object in a structured format. + type: object + object: + description: String representing the object's type. Objects of the same + type share the same value. + enum: + - webhook_endpoint + type: string + secret: + description: The endpoint's secret, used to generate [webhook signatures](https://stripe.com/docs/webhooks/signatures). + Only returned at creation. + maxLength: 5000 + type: string + status: + description: The status of the webhook. It can be `enabled` or `disabled`. + maxLength: 5000 + type: string + url: + description: The URL of the webhook endpoint. + maxLength: 5000 + type: string + required: + - created + - enabled_events + - id + - livemode + - metadata + - object + - status + - url + title: NotificationWebhookEndpoint + type: object + x-expandableFields: [] + x-resourceId: webhook_endpoint + securitySchemes: + basicAuth: + description: 'Basic HTTP authentication. Allowed headers-- Authorization: Basic + | Authorization: Basic ' + scheme: basic + type: http + bearerAuth: + bearerFormat: auth-scheme + description: 'Bearer HTTP authentication. Allowed headers-- Authorization: Bearer + ' + scheme: bearer + type: http +info: + contact: + email: dev-platform@stripe.com + name: Stripe Dev Platform Team + url: https://stripe.com + description: The Stripe REST API. Please see https://stripe.com/docs/api for more + details. + termsOfService: https://stripe.com/us/terms/ + title: Stripe API + version: '2022-08-01' + x-stripeSpecFilename: spec3 +openapi: 3.0.0 +paths: + "/v1/account": + delete: + description: |- +

With Connect, you can delete accounts you manage.

+ +

Accounts created using test-mode keys can be deleted at any time. Standard accounts created using live-mode keys cannot be deleted. Custom or Express accounts created using live-mode keys can only be deleted once all balances are zero.

+ +

If you want to delete your own account, use the account information tab in your account settings instead.

+ operationId: DeleteAccount + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: + account: + maxLength: 5000 + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/deleted_account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + get: + description: "

Retrieves the details of an account.

" + operationId: GetAccount + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

Updates a connected account by setting the values of the parameters passed. Any parameters not provided are left unchanged. Most parameters can be changed only for Custom accounts. (These are marked Custom Only below.) Parameters marked Custom and Express are not supported for Standard accounts.

+ +

To update your own account, use the Dashboard. Refer to our Connect documentation to learn more about updating accounts.

+ operationId: PostAccount + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + bank_account: + explode: true + style: deepObject + business_profile: + explode: true + style: deepObject + capabilities: + explode: true + style: deepObject + company: + explode: true + style: deepObject + documents: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + individual: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + settings: + explode: true + style: deepObject + tos_acceptance: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + account_token: + description: An [account token](https://stripe.com/docs/api#create_account_token), + used to securely provide details to the account. + maxLength: 5000 + type: string + bank_account: + anyOf: + - properties: + account_holder_name: + maxLength: 5000 + type: string + account_holder_type: + enum: + - company + - individual + maxLength: 5000 + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - futsu + - savings + - toza + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + currency: + type: string + object: + enum: + - bank_account + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + required: + - account_number + - country + title: external_account_payout_bank_account + type: object + - maxLength: 5000 + type: string + description: Either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), + or a dictionary containing a user's bank account details. + business_profile: + description: Business information about the account. + properties: + mcc: + maxLength: 4 + type: string + name: + maxLength: 5000 + type: string + product_description: + maxLength: 40000 + type: string + support_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object + support_email: + type: string + support_phone: + maxLength: 5000 + type: string + support_url: + anyOf: + - type: string + - enum: + - '' + type: string + url: + maxLength: 5000 + type: string + title: business_profile_specs + type: object + business_type: + description: The business type. + enum: + - company + - government_entity + - individual + - non_profit + type: string + x-stripeBypassValidation: true + capabilities: + description: Each key of the dictionary represents a capability, + and each capability maps to its settings (e.g. whether it has + been requested or not). Each capability will be inactive until + you have provided its specific requirements and Stripe has verified + them. An account may have some of its requested capabilities be + active and some be inactive. + properties: + acss_debit_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + affirm_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + afterpay_clearpay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + au_becs_debit_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + bacs_debit_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + bancontact_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + bank_transfer_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + blik_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + boleto_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + card_issuing: + properties: + requested: + type: boolean + title: capability_param + type: object + card_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + cartes_bancaires_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + eps_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + fpx_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + giropay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + grabpay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + ideal_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + jcb_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + klarna_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + konbini_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + legacy_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + link_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + oxxo_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + p24_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + paynow_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + promptpay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + sepa_debit_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + sofort_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + tax_reporting_us_1099_k: + properties: + requested: + type: boolean + title: capability_param + type: object + tax_reporting_us_1099_misc: + properties: + requested: + type: boolean + title: capability_param + type: object + transfers: + properties: + requested: + type: boolean + title: capability_param + type: object + treasury: + properties: + requested: + type: boolean + title: capability_param + type: object + us_bank_account_ach_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + title: capabilities_param + type: object + company: + description: Information about the company or business. This field + is available for any `business_type`. + properties: + address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 type: string title: address_specs type: object @@ -26380,7 +33429,9 @@ paths: 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. + [bank account](https://stripe.com/docs/api#account_create_bank_account) + or [card creation](https://stripe.com/docs/api#account_create_card) + APIs. maxLength: 5000 type: string x-stripeBypassValidation: true @@ -26503,6 +33554,9 @@ paths: id_number: maxLength: 5000 type: string + id_number_secondary: + maxLength: 5000 + type: string last_name: maxLength: 100 type: string @@ -26530,6 +33584,28 @@ paths: - existing - none type: string + registered_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -26621,6 +33697,20 @@ paths: statement_descriptor_prefix: maxLength: 10 type: string + statement_descriptor_prefix_kana: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string + statement_descriptor_prefix_kanji: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string title: card_payments_settings_specs type: object payments: @@ -26678,6 +33768,22 @@ paths: type: string title: payout_settings_specs type: object + treasury: + properties: + tos_acceptance: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: settings_terms_of_service_specs + type: object + title: treasury_settings_specs + type: object title: settings_specs_update type: object tos_acceptance: @@ -27619,10 +34725,6 @@ paths: maxLength: 5000 type: string type: array - redirect_url: - description: Where to redirect the user after they log out of their - dashboard. - type: string required: - account type: object @@ -27748,6 +34850,7 @@ paths: - has_more - object - url + title: PersonList type: object x-expandableFields: - data @@ -27789,6 +34892,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -27974,6 +35080,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -28026,6 +35140,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -28214,6 +35351,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -28399,6 +35539,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -28451,6 +35599,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -28626,6 +35797,7 @@ paths: - has_more - object - url + title: PersonList type: object x-expandableFields: - data @@ -28667,6 +35839,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -28852,6 +36027,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -28904,6 +36087,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -29092,6 +36298,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -29277,6 +36486,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -29329,6 +36546,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -29577,6 +36817,7 @@ paths: - has_more - object - url + title: AccountList type: object x-expandableFields: - data @@ -29752,6 +36993,12 @@ paths: type: boolean title: capability_param type: object + affirm_payments: + properties: + requested: + type: boolean + title: capability_param + type: object afterpay_clearpay_payments: properties: requested: @@ -29776,6 +37023,18 @@ paths: type: boolean title: capability_param type: object + bank_transfer_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + blik_payments: + properties: + requested: + type: boolean + title: capability_param + type: object boleto_payments: properties: requested: @@ -29842,12 +37101,24 @@ paths: type: boolean title: capability_param type: object + konbini_payments: + properties: + requested: + type: boolean + title: capability_param + type: object legacy_payments: properties: requested: type: boolean title: capability_param type: object + link_payments: + properties: + requested: + type: boolean + title: capability_param + type: object oxxo_payments: properties: requested: @@ -29860,6 +37131,18 @@ paths: type: boolean title: capability_param type: object + paynow_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + promptpay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object sepa_debit_payments: properties: requested: @@ -29890,6 +37173,18 @@ paths: type: boolean title: capability_param type: object + treasury: + properties: + requested: + type: boolean + title: capability_param + type: object + us_bank_account_ach_payments: + properties: + requested: + type: boolean + title: capability_param + type: object title: capabilities_param type: object company: @@ -30057,7 +37352,10 @@ paths: 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. + for the account being created. Available countries include [Stripe's + global markets](https://stripe.com/global) as well as countries + where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) + are supported. maxLength: 5000 type: string default_currency: @@ -30156,7 +37454,9 @@ paths: 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. + [bank account](https://stripe.com/docs/api#account_create_bank_account) + or [card creation](https://stripe.com/docs/api#account_create_card) + APIs. maxLength: 5000 type: string x-stripeBypassValidation: true @@ -30279,6 +37579,9 @@ paths: id_number: maxLength: 5000 type: string + id_number_secondary: + maxLength: 5000 + type: string last_name: maxLength: 100 type: string @@ -30306,6 +37609,28 @@ paths: - existing - none type: string + registered_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -30397,6 +37722,20 @@ paths: statement_descriptor_prefix: maxLength: 10 type: string + statement_descriptor_prefix_kana: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string + statement_descriptor_prefix_kanji: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string title: card_payments_settings_specs type: object payments: @@ -30454,6 +37793,22 @@ paths: type: string title: payout_settings_specs type: object + treasury: + properties: + tos_acceptance: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: settings_terms_of_service_specs + type: object + title: treasury_settings_specs + type: object title: settings_specs type: object tos_acceptance: @@ -30753,6 +38108,12 @@ paths: type: boolean title: capability_param type: object + affirm_payments: + properties: + requested: + type: boolean + title: capability_param + type: object afterpay_clearpay_payments: properties: requested: @@ -30777,6 +38138,18 @@ paths: type: boolean title: capability_param type: object + bank_transfer_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + blik_payments: + properties: + requested: + type: boolean + title: capability_param + type: object boleto_payments: properties: requested: @@ -30843,12 +38216,24 @@ paths: type: boolean title: capability_param type: object + konbini_payments: + properties: + requested: + type: boolean + title: capability_param + type: object legacy_payments: properties: requested: type: boolean title: capability_param type: object + link_payments: + properties: + requested: + type: boolean + title: capability_param + type: object oxxo_payments: properties: requested: @@ -30861,6 +38246,18 @@ paths: type: boolean title: capability_param type: object + paynow_payments: + properties: + requested: + type: boolean + title: capability_param + type: object + promptpay_payments: + properties: + requested: + type: boolean + title: capability_param + type: object sepa_debit_payments: properties: requested: @@ -30891,6 +38288,18 @@ paths: type: boolean title: capability_param type: object + treasury: + properties: + requested: + type: boolean + title: capability_param + type: object + us_bank_account_ach_payments: + properties: + requested: + type: boolean + title: capability_param + type: object title: capabilities_param type: object company: @@ -31148,7 +38557,9 @@ paths: 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. + [bank account](https://stripe.com/docs/api#account_create_bank_account) + or [card creation](https://stripe.com/docs/api#account_create_card) + APIs. maxLength: 5000 type: string x-stripeBypassValidation: true @@ -31271,6 +38682,9 @@ paths: id_number: maxLength: 5000 type: string + id_number_secondary: + maxLength: 5000 + type: string last_name: maxLength: 100 type: string @@ -31298,6 +38712,28 @@ paths: - existing - none type: string + registered_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object ssn_last_4: maxLength: 5000 type: string @@ -31389,6 +38825,20 @@ paths: statement_descriptor_prefix: maxLength: 10 type: string + statement_descriptor_prefix_kana: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string + statement_descriptor_prefix_kanji: + anyOf: + - maxLength: 10 + type: string + - enum: + - '' + type: string title: card_payments_settings_specs type: object payments: @@ -31446,6 +38896,22 @@ paths: type: string title: payout_settings_specs type: object + treasury: + properties: + tos_acceptance: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: settings_terms_of_service_specs + type: object + title: treasury_settings_specs + type: object title: settings_specs_update type: object tos_acceptance: @@ -32478,10 +39944,6 @@ paths: maxLength: 5000 type: string type: array - redirect_url: - description: Where to redirect the user after they log out of their - dashboard. - type: string type: object required: false responses: @@ -32612,6 +40074,7 @@ paths: - has_more - object - url + title: PersonList type: object x-expandableFields: - data @@ -32661,6 +40124,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -32843,6 +40309,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -32895,6 +40369,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -33104,6 +40601,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -33286,6 +40786,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -33338,6 +40846,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -33520,6 +41051,7 @@ paths: - has_more - object - url + title: PersonList type: object x-expandableFields: - data @@ -33569,6 +41101,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -33751,6 +41286,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -33803,6 +41346,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -34012,6 +41578,9 @@ paths: metadata: explode: true style: deepObject + registered_address: + explode: true + style: deepObject relationship: explode: true style: deepObject @@ -34194,6 +41763,14 @@ paths: provide a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). maxLength: 5000 type: string + id_number_secondary: + description: The person's secondary ID number, as appropriate for + their country, will be used for enhanced verification checks. + In Thailand, this would be the laser code found on the back of + an ID card. Instead of the number itself, you can also provide + a [PII token provided by Stripe.js](https://stripe.com/docs/js/tokens_sources/create_token?type=pii). + maxLength: 5000 + type: string last_name: description: The person's last name. maxLength: 5000 @@ -34246,6 +41823,29 @@ paths: any jurisdiction. maxLength: 5000 type: string + registered_address: + description: The person's registered address. + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object relationship: description: The relationship that this person has with the account's legal entity. @@ -34706,6 +42306,7 @@ paths: - has_more - object - url + title: PlatformEarningList type: object x-expandableFields: - data @@ -35009,9 +42610,197 @@ paths: description: '' properties: data: - description: Details about each object. + description: Details about each object. + items: + "$ref": "#/components/schemas/fee_refund" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: FeeRefundList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

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.

+ operationId: PostApplicationFeesIdRefunds + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: A positive integer, in _cents (or local equivalent)_, + representing how much of this fee to refund. Can refund only up + to the remaining unrefunded amount of the fee. + type: integer + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/fee_refund" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/apps/secrets": + get: + description: "

List all secrets stored on the given scope.

" + operationId: GetAppsSecrets + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: Specifies the scoping of the secret. Requests originating from + UI extensions can only access account-scoped secrets or secrets scoped to + their own user. + explode: true + in: query + name: scope + required: true + schema: + properties: + type: + enum: + - account + - user + type: string + user: + maxLength: 5000 + type: string + required: + - type + title: scope_param + type: object + style: deepObject + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: items: - "$ref": "#/components/schemas/fee_refund" + "$ref": "#/components/schemas/apps.secret" type: array has_more: description: True if this list has another page of items after @@ -35026,13 +42815,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 + pattern: "^/v1/apps/secrets" type: string required: - data - has_more - object - url - title: FeeRefundList + title: SecretServiceResourceSecretList type: object x-expandableFields: - data @@ -35044,25 +42834,8 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: |- -

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.

- operationId: PostApplicationFeesIdRefunds - parameters: - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

Create or replace a secret in the secret store.

" + operationId: PostAppsSecrets requestBody: content: application/x-www-form-urlencoded: @@ -35070,32 +42843,182 @@ paths: expand: explode: true style: deepObject - metadata: + scope: explode: true style: deepObject schema: additionalProperties: false properties: - amount: - description: A positive integer, in _%s_, representing how much - of this fee to refund. Can refund only up to the remaining unrefunded - amount of the fee. - type: integer expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - additionalProperties: + expires_at: + description: The Unix timestamp for the expiry time of the secret, + after which the secret deletes. + format: unix-time + type: integer + name: + description: A name for the secret that's unique within the scope. + maxLength: 5000 + type: string + payload: + description: The plaintext secret value to be stored. + maxLength: 5000 + type: string + scope: + description: Specifies the scoping of the secret. Requests originating + from UI extensions can only access account-scoped secrets or secrets + scoped to their own user. + properties: + type: + enum: + - account + - user + type: string + user: + maxLength: 5000 + type: string + required: + - type + title: scope_param + type: object + required: + - name + - payload + - scope + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/apps.secret" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/apps/secrets/delete": + post: + description: "

Deletes a secret from the secret store by name and scope.

" + operationId: PostAppsSecretsDelete + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + scope: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. + type: array + name: + description: A name for the secret that's unique within the scope. + maxLength: 5000 + type: string + scope: + description: Specifies the scoping of the secret. Requests originating + from UI extensions can only access account-scoped secrets or secrets + scoped to their own user. + properties: + type: + enum: + - account + - user + type: string + user: + maxLength: 5000 + type: string + required: + - type + title: scope_param type: object + required: + - name + - scope + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/apps.secret" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/apps/secrets/find": + get: + description: "

Finds a secret in the secret store by name and scope.

" + operationId: GetAppsSecretsFind + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A name for the secret that's unique within the scope. + in: query + name: name + required: true + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies the scoping of the secret. Requests originating from + UI extensions can only access account-scoped secrets or secrets scoped to + their own user. + explode: true + in: query + name: scope + required: true + schema: + properties: + type: + enum: + - account + - user + type: string + user: + maxLength: 5000 + type: string + required: + - type + title: scope_param + type: object + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} type: object required: false responses: @@ -35103,7 +43026,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/fee_refund" + "$ref": "#/components/schemas/apps.secret" description: Successful response. default: content: @@ -35678,6 +43601,7 @@ paths: - has_more - object - url + title: PortalConfigurationList type: object x-expandableFields: - data @@ -35708,6 +43632,9 @@ paths: features: explode: true style: deepObject + login_page: + explode: true + style: deepObject metadata: explode: true style: deepObject @@ -35725,9 +43652,6 @@ paths: type: string terms_of_service_url: type: string - required: - - privacy_policy_url - - terms_of_service_url title: business_profile_create_param type: object default_return_url: @@ -35768,7 +43692,6 @@ paths: enabled: type: boolean required: - - allowed_updates - enabled title: customer_update_creation_param type: object @@ -35890,6 +43813,16 @@ paths: type: object title: features_creation_param type: object + login_page: + description: The hosted login page for this configuration. Learn + more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + properties: + enabled: + type: boolean + required: + - enabled + title: login_page_create_param + type: object metadata: additionalProperties: type: string @@ -35991,6 +43924,9 @@ paths: features: explode: true style: deepObject + login_page: + explode: true + style: deepObject metadata: explode: true style: deepObject @@ -36009,9 +43945,17 @@ paths: maxLength: 60 type: string privacy_policy_url: - type: string + anyOf: + - type: string + - enum: + - '' + type: string terms_of_service_url: - type: string + anyOf: + - type: string + - enum: + - '' + type: string title: business_profile_update_param type: object default_return_url: @@ -36164,6 +44108,16 @@ paths: type: object title: features_updating_param type: object + login_page: + description: The hosted login page for this configuration. Learn + more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + properties: + enabled: + type: boolean + required: + - enabled + title: login_page_update_param + type: object metadata: anyOf: - additionalProperties: @@ -36241,230 +44195,62 @@ paths: - en-IN - en-NZ - en-SG - - es - - es-419 - - et - - fi - - fil - - fr - - fr-CA - - hr - - hu - - id - - it - - ja - - ko - - lt - - lv - - ms - - mt - - nb - - nl - - pl - - pt - - pt-BR - - ro - - ru - - sk - - sl - - sv - - th - - tr - - vi - - zh - - zh-HK - - zh-TW - type: string - x-stripeBypassValidation: true - on_behalf_of: - description: The `on_behalf_of` account to use for this session. - When specified, only subscriptions and invoices with this `on_behalf_of` - account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). - Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) - to modify the `on_behalf_of` account's branding settings, which - the portal displays. - type: string - return_url: - description: The default URL to redirect customers to when they - click on the portal's link to return to your website. - type: string - required: - - customer - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/billing_portal.session" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/bitcoin/receivers": - get: - deprecated: true - description: "

Returns a list of your receivers. Receivers are returned sorted - by creation date, with the most recently created receivers appearing first.

" - operationId: GetBitcoinReceivers - parameters: - - description: Filter for active receivers. - in: query - name: active - required: false - schema: - type: boolean - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: Filter for filled receivers. - in: query - name: filled - required: false - schema: - type: boolean - style: form - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Filter for receivers with uncaptured funds. - in: query - name: uncaptured_funds - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/bitcoin_receiver" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/bitcoin/receivers" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/bitcoin/receivers/{id}": - get: - deprecated: true - description: "

Retrieves the Bitcoin receiver with the given ID.

" - operationId: GetBitcoinReceiversId - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} + - es + - es-419 + - et + - fi + - fil + - fr + - fr-CA + - hr + - hu + - id + - it + - ja + - ko + - lt + - lv + - ms + - mt + - nb + - nl + - pl + - pt + - pt-BR + - ro + - ru + - sk + - sl + - sv + - th + - tr + - vi + - zh + - zh-HK + - zh-TW + type: string + on_behalf_of: + description: The `on_behalf_of` account to use for this session. + When specified, only subscriptions and invoices with this `on_behalf_of` + account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). + Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) + to modify the `on_behalf_of` account's branding settings, which + the portal displays. + type: string + return_url: + description: The default URL to redirect customers to when they + click on the portal's link to return to your website. + type: string + required: + - customer type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/bitcoin_receiver" + "$ref": "#/components/schemas/billing_portal.session" description: Successful response. default: content: @@ -36472,13 +44258,32 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/bitcoin/receivers/{receiver}/transactions": + "/v1/charges": get: - deprecated: true - description: "

List bitcoin transacitons for a given receiver.

" - operationId: GetBitcoinReceiversReceiverTransactions + description: "

Returns a list of charges you’ve previously created. The charges + are returned in sorted order, with the most recent charges appearing first.

" + operationId: GetCharges parameters: - - description: Only return transactions for the customer specified by this customer + - explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return charges for the customer specified by this customer ID. in: query name: customer @@ -36496,7 +44301,6 @@ paths: name: ending_before required: false schema: - maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -36518,13 +44322,15 @@ paths: schema: type: integer style: form - - in: path - name: receiver - required: true + - description: Only return charges that were created by the PaymentIntent specified + by this PaymentIntent ID. + in: query + name: payment_intent + required: false schema: maxLength: 5000 type: string - style: simple + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -36533,6 +44339,13 @@ paths: in: query name: starting_after required: false + schema: + type: string + style: form + - description: Only return charges for this transfer group. + in: query + name: transfer_group + required: false schema: maxLength: 5000 type: string @@ -36554,9 +44367,8 @@ paths: description: '' properties: data: - description: Details about each object. items: - "$ref": "#/components/schemas/bitcoin_transaction" + "$ref": "#/components/schemas/charge" type: array has_more: description: True if this list has another page of items after @@ -36571,13 +44383,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 + pattern: "^/v1/charges" type: string required: - data - has_more - object - url - title: BitcoinTransactionList + title: ChargeList type: object x-expandableFields: - data @@ -36588,78 +44401,285 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/bitcoin/transactions": - get: - deprecated: true - description: "

List bitcoin transacitons for a given receiver.

" - operationId: GetBitcoinTransactions - parameters: - - description: Only return transactions for the customer specified by this customer - ID. - in: query - name: customer - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - in: query - name: receiver - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form + post: + description: "

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).

" + operationId: PostCharges requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + card: + explode: true + style: deepObject + destination: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + radar_options: + explode: true + style: deepObject + shipping: + explode: true + style: deepObject + transfer_data: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + amount: + description: Amount intended to be collected by this payment. A + positive integer representing how much to charge in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal) + (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal + currency). The minimum amount is $0.50 US or [equivalent in charge + currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + The amount value supports up to eight digits (e.g., a value of + 99999999 for a USD charge of $999,999.99). + type: integer + application_fee: + type: integer + application_fee_amount: + description: A fee in cents (or local equivalent) 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). + type: integer + capture: + description: Whether to immediately capture the charge. Defaults + to `true`. When `false`, the charge issues an authorization (or + pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) + later. Uncaptured charges expire after a set number of days (7 + by default). For more information, see the [authorizing charges + and settling later](https://stripe.com/docs/charges/placing-a-hold) + documentation. + type: boolean + card: + anyOf: + - properties: + address_city: + maxLength: 5000 + type: string + address_country: + maxLength: 5000 + type: string + address_line1: + maxLength: 5000 + type: string + address_line2: + maxLength: 5000 + type: string + address_state: + maxLength: 5000 + type: string + address_zip: + maxLength: 5000 + type: string + cvc: + maxLength: 5000 + type: string + exp_month: + type: integer + exp_year: + type: integer + metadata: + additionalProperties: + type: string + type: object + name: + maxLength: 5000 + type: string + number: + maxLength: 5000 + type: string + object: + enum: + - card + maxLength: 5000 + type: string + required: + - exp_month + - exp_year + - number + title: customer_payment_source_card + type: object + - maxLength: 5000 + type: string + description: A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). + x-stripeBypassValidation: true + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: The ID of an existing customer that will be charged + in this request. + maxLength: 500 + type: string + description: + description: An arbitrary string which you can attach to a `Charge` + object. It is displayed when in the web interface alongside the + charge. Note that if you use Stripe to send automatic email receipts + to your customers, your receipt emails will include the `description` + of the charge(s) that they are describing. + maxLength: 40000 + type: string + destination: + anyOf: + - properties: + account: + maxLength: 5000 + type: string + amount: + type: integer + required: + - account + title: destination_specs + type: object + - type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + on_behalf_of: + description: The Stripe account ID for which these funds are intended. + Automatically set if you use the `destination` parameter. For + details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). + maxLength: 5000 + type: string + radar_options: + description: Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) + for more information. + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object + receipt_email: + description: The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) + will be sent. The receipt will not be sent until the charge is + paid, and no receipts will be sent for test mode charges. If this + charge is for a [Customer](https://stripe.com/docs/api/customers/object), + the email address specified here will override the customer's + email address. If `receipt_email` is specified for a charge in + live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + type: string + shipping: + description: Shipping information for the charge. Helps prevent + fraud on charges for physical goods. + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: optional_fields_address + type: object + carrier: + maxLength: 5000 + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + tracking_number: + maxLength: 5000 + type: string + required: + - address + - name + title: optional_fields_shipping + type: object + source: + description: A payment source to be charged. This can be the ID + of a [card](https://stripe.com/docs/api#cards) (i.e., credit or + debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), + a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), + or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). + For certain sources---namely, [cards](https://stripe.com/docs/api#cards), + [bank accounts](https://stripe.com/docs/api#bank_accounts), and + attached [sources](https://stripe.com/docs/api#sources)---you + must also pass the ID of the associated customer. + maxLength: 5000 + type: string + x-stripeBypassValidation: true + statement_descriptor: + description: For card charges, use `statement_descriptor_suffix` + instead. Otherwise, you can use this value as the complete description + of a charge on your customers’ statements. Must contain at least + one letter, maximum 22 characters. + maxLength: 22 + type: string + statement_descriptor_suffix: + description: Provides information about the charge that customers + see on their statements. Concatenated with the prefix (shortened + descriptor) or statement descriptor that’s set on the account + to form the complete statement descriptor. Maximum 22 characters + for the concatenated descriptor. + maxLength: 22 + type: string + transfer_data: + description: An optional dictionary including the account to automatically + transfer to as part of a destination charge. [See the Connect + documentation](https://stripe.com/docs/connect/destination-charges) + for details. + properties: + amount: + type: integer + destination: + maxLength: 5000 + type: string + required: + - destination + title: transfer_data_specs + type: object + transfer_group: + description: A string that identifies this transaction as part of + a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). + type: string type: object required: false responses: @@ -36667,36 +44687,7 @@ paths: content: application/json: schema: - description: '' - properties: - data: - description: Details about each object. - items: - "$ref": "#/components/schemas/bitcoin_transaction" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: BitcoinTransactionList - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/charge" description: Successful response. default: content: @@ -36704,51 +44695,15 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/charges": + "/v1/charges/search": get: - description: "

Returns a list of charges you’ve previously created. The charges - are returned in sorted order, with the most recent charges appearing first.

" - operationId: GetCharges + description: |- +

Search for charges you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetChargesSearch parameters: - - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return charges for the customer specified by this customer - ID. - in: query - name: customer - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - type: string - style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -36768,30 +44723,21 @@ paths: schema: type: integer style: form - - description: Only return charges that were created by the PaymentIntent specified - by this PaymentIntent ID. + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. in: query - name: payment_intent + name: page required: false schema: maxLength: 5000 type: string style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - type: string - style: form - - description: Only return charges for this transfer group. + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). in: query - name: transfer_group - required: false + name: query + required: true schema: maxLength: 5000 type: string @@ -36817,25 +44763,30 @@ paths: "$ref": "#/components/schemas/charge" type: array has_more: - description: True if this list has another page of items after - this one that can be fetched. type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string object: description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. + the same type share the same value. enum: - - list + - search_result type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer url: - description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/charges" type: string required: - data - has_more - object - url + title: SearchResult type: object x-expandableFields: - data @@ -36846,288 +44797,6 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - post: - description: "

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).

" - operationId: PostCharges - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - card: - explode: true - style: deepObject - destination: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - shipping: - explode: true - style: deepObject - transfer_data: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: Amount intended to be collected by this payment. A - positive integer representing how much to charge in the [smallest - currency unit](https://stripe.com/docs/currencies#zero-decimal) - (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal - currency). The minimum amount is $0.50 US or [equivalent in charge - currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). - The amount value supports up to eight digits (e.g., a value of - 99999999 for a USD charge of $999,999.99). - type: integer - application_fee: - type: integer - application_fee_amount: - description: A fee in %s that will be applied to the charge and - transferred to the application owner's Stripe account. The request - must be made with an OAuth key or the `Stripe-Account` header - in order to take an application fee. For more information, see - the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). - type: integer - capture: - description: Whether to immediately capture the charge. Defaults - to `true`. When `false`, the charge issues an authorization (or - pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) - later. Uncaptured charges expire after a set number of days (7 - by default). For more information, see the [authorizing charges - and settling later](https://stripe.com/docs/charges/placing-a-hold) - documentation. - type: boolean - card: - anyOf: - - properties: - address_city: - maxLength: 5000 - type: string - address_country: - maxLength: 5000 - type: string - address_line1: - maxLength: 5000 - type: string - address_line2: - maxLength: 5000 - type: string - address_state: - maxLength: 5000 - type: string - address_zip: - maxLength: 5000 - type: string - cvc: - maxLength: 5000 - type: string - exp_month: - type: integer - exp_year: - type: integer - metadata: - additionalProperties: - type: string - type: object - name: - maxLength: 5000 - type: string - number: - maxLength: 5000 - type: string - object: - enum: - - card - maxLength: 5000 - type: string - required: - - exp_month - - exp_year - - number - title: customer_payment_source_card - type: object - - maxLength: 5000 - type: string - description: A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). - x-stripeBypassValidation: true - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - customer: - description: The ID of an existing customer that will be charged - in this request. - maxLength: 500 - type: string - description: - description: An arbitrary string which you can attach to a `Charge` - object. It is displayed when in the web interface alongside the - charge. Note that if you use Stripe to send automatic email receipts - to your customers, your receipt emails will include the `description` - of the charge(s) that they are describing. - maxLength: 40000 - type: string - destination: - anyOf: - - properties: - account: - maxLength: 5000 - type: string - amount: - type: integer - required: - - account - title: destination_specs - type: object - - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - on_behalf_of: - description: The Stripe account ID for which these funds are intended. - Automatically set if you use the `destination` parameter. For - details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/charges-transfers#on-behalf-of). - maxLength: 5000 - type: string - receipt_email: - description: The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) - will be sent. The receipt will not be sent until the charge is - paid, and no receipts will be sent for test mode charges. If this - charge is for a [Customer](https://stripe.com/docs/api/customers/object), - the email address specified here will override the customer's - email address. If `receipt_email` is specified for a charge in - live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). - type: string - shipping: - description: Shipping information for the charge. Helps prevent - fraud on charges for physical goods. - properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: optional_fields_address - type: object - carrier: - maxLength: 5000 - type: string - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - tracking_number: - maxLength: 5000 - type: string - required: - - address - - name - title: optional_fields_shipping - type: object - source: - description: A payment source to be charged. This can be the ID - of a [card](https://stripe.com/docs/api#cards) (i.e., credit or - debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), - a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), - or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). - For certain sources---namely, [cards](https://stripe.com/docs/api#cards), - [bank accounts](https://stripe.com/docs/api#bank_accounts), and - attached [sources](https://stripe.com/docs/api#sources)---you - must also pass the ID of the associated customer. - maxLength: 5000 - type: string - x-stripeBypassValidation: true - statement_descriptor: - description: For card charges, use `statement_descriptor_suffix` - instead. Otherwise, you can use this value as the complete description - of a charge on your customers’ statements. Must contain at least - one letter, maximum 22 characters. - maxLength: 22 - type: string - statement_descriptor_suffix: - description: Provides information about the charge that customers - see on their statements. Concatenated with the prefix (shortened - descriptor) or statement descriptor that’s set on the account - to form the complete statement descriptor. Maximum 22 characters - for the concatenated descriptor. - maxLength: 22 - type: string - transfer_data: - description: An optional dictionary including the account to automatically - transfer to as part of a destination charge. [See the Connect - documentation](https://stripe.com/docs/connect/destination-charges) - for details. - properties: - amount: - type: integer - destination: - maxLength: 5000 - type: string - required: - - destination - title: transfer_data_specs - type: object - transfer_group: - description: A string that identifies this transaction as part of - a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/charges-transfers#transfer-options). - type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/charge" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. "/v1/charges/{charge}": get: description: "

Retrieves the details of a charge that has previously been @@ -37706,6 +45375,8 @@ paths: maxLength: 5000 type: string type: array + instructions_email: + type: string metadata: anyOf: - additionalProperties: @@ -37880,13 +45551,26 @@ paths: additionalProperties: false properties: amount: + description: A positive integer representing how much to refund. type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: Customer whose customer balance to refund from. + maxLength: 5000 + type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + instructions_email: + description: Address to send refund email, use customer email if + not specified + type: string metadata: anyOf: - additionalProperties: @@ -37900,6 +45584,11 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + origin: + description: Origin of the refund + enum: + - customer_balance + type: string payment_intent: maxLength: 5000 type: string @@ -38042,6 +45731,28 @@ paths: description: "

Returns a list of Checkout Sessions.

" operationId: GetCheckoutSessions parameters: + - description: Only return the Checkout Sessions for the Customer specified. + in: query + name: customer + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return the Checkout Sessions for the Customer details specified. + explode: true + in: query + name: customer_details + required: false + schema: + properties: + email: + type: string + required: + - email + title: customer_details_params + type: object + style: deepObject - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -38266,9 +45977,19 @@ paths: promotions: enum: - auto + - none + type: string + terms_of_service: + enum: + - none + - required type: string title: consent_collection_params type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string customer: description: |- ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recent card @@ -38291,7 +46012,8 @@ paths: When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). - Sessions that do not create Customers will instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) in the Dashboard. + Sessions that don't create Customers instead create [Guest Customers](https://support.stripe.com/questions/guest-customer-faq) + in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. Can only be set in `payment` and `setup` mode. enum: @@ -38353,8 +46075,9 @@ paths: type: array expires_at: description: The Epoch time in seconds at which the Checkout Session - will expire. It can be anywhere from 1 to 24 hours after Checkout - Session creation. By default, this value is 24 hours from creation. + will expire. It can be anywhere from 30 minutes to 24 hours after + Checkout Session creation. By default, this value is 24 hours + from creation. format: unix-time type: integer line_items: @@ -38363,7 +46086,7 @@ paths: For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. - For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices in will be on the initial invoice only. + For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. items: properties: adjustable_quantity: @@ -38378,9 +46101,6 @@ paths: - enabled title: adjustable_quantity_params type: object - description: - maxLength: 5000 - type: string dynamic_tax_rates: items: maxLength: 5000 @@ -38614,6 +46334,18 @@ paths: type: string title: payment_intent_data_params type: object + payment_method_collection: + description: |- + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + enum: + - always + - if_required + type: string payment_method_options: description: Payment-method-specific configuration. properties: @@ -38655,6 +46387,12 @@ paths: type: string title: mandate_options_param type: object + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string verification_method: enum: - automatic @@ -38664,16 +46402,276 @@ paths: x-stripeBypassValidation: true title: payment_method_options_param type: object + affirm: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + afterpay_clearpay: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + alipay: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + au_becs_debit: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + bacs_debit: + properties: + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + title: payment_method_options_param + type: object + bancontact: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object boleto: properties: expires_after_days: type: integer + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + title: payment_method_options_param + type: object + card: + properties: + installments: + properties: + enabled: + type: boolean + title: installments_param + type: object + setup_future_usage: + enum: + - off_session + - on_session + type: string + statement_descriptor_suffix_kana: + maxLength: 22 + type: string + statement_descriptor_suffix_kanji: + maxLength: 17 + type: string + title: payment_method_options_param + type: object + customer_balance: + properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + eps: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + fpx: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + giropay: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + grabpay: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + ideal: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + klarna: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + konbini: + properties: + expires_after_days: + type: integer + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object oxxo: properties: expires_after_days: type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + p24: + properties: + setup_future_usage: + enum: + - none + type: string + tos_shown_and_accepted: + type: boolean + title: payment_method_options_param + type: object + paynow: + properties: + setup_future_usage: + enum: + - none + type: string + tos_shown_and_accepted: + type: boolean + title: payment_method_options_param + type: object + pix: + properties: + expires_after_seconds: + type: integer + title: payment_method_options_param + type: object + sepa_debit: + properties: + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + title: payment_method_options_param + type: object + sofort: + properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + us_bank_account: + properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: linked_account_options_param + type: object + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + type: string + x-stripeBypassValidation: true title: payment_method_options_param type: object wechat_pay: @@ -38688,6 +46686,10 @@ paths: - web type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string required: - client title: payment_method_options_param @@ -38698,6 +46700,9 @@ paths: description: |- A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + In `payment` and `subscription` mode, you can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + It is required in `setup` mode. + Read more about the supported payment methods and their requirements in our [payment method details guide](/docs/payments/checkout/payment-methods). @@ -38707,23 +46712,31 @@ paths: items: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto - card + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -39062,6 +47075,22 @@ paths: type: integer currency: type: string + currency_options: + additionalProperties: + properties: + amount: + type: integer + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + required: + - amount + title: currency_option + type: object + type: object required: - amount - currency @@ -39113,24 +47142,9 @@ paths: maxLength: 5000 type: string type: array - items: - items: - properties: - plan: - maxLength: 5000 - type: string - quantity: - type: integer - tax_rates: - items: - maxLength: 5000 - type: string - type: array - required: - - plan - title: subscription_data_item_param - type: object - type: array + description: + maxLength: 500 + type: string metadata: additionalProperties: type: string @@ -39475,6 +47489,7 @@ paths: - has_more - object - url + title: CountrySpecList type: object x-expandableFields: - data @@ -39640,6 +47655,7 @@ paths: - has_more - object - url + title: CouponsResourceCouponList type: object x-expandableFields: - data @@ -39663,6 +47679,9 @@ paths: applies_to: explode: true style: deepObject + currency_options: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -39691,6 +47710,20 @@ paths: description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). type: string + currency_options: + additionalProperties: + properties: + amount_off: + type: integer + required: + - amount_off + title: currency_option + type: object + description: Coupons defined in each available currency option (only + supported if `amount_off` is passed). Each key must be a three-letter + [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object duration: description: Specifies how long the discount will be in effect if used on a subscription. Can be `forever`, `once`, or `repeating`. @@ -39867,6 +47900,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + currency_options: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -39876,6 +47912,20 @@ paths: schema: additionalProperties: false properties: + currency_options: + additionalProperties: + properties: + amount_off: + type: integer + required: + - amount_off + title: currency_option + type: object + description: Coupons defined in each available currency option (only + supported if the coupon is amount-based). Each key must be a three-letter + [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object expand: description: Specifies which fields in the response should be expanded. items: @@ -40066,13 +48116,13 @@ paths: additionalProperties: false properties: amount: - description: The integer amount in %s representing the total amount - of the credit note. + description: The integer amount in cents (or local equivalent) representing + the total amount of the credit note. type: integer credit_amount: - description: The integer amount in %s representing the amount to - credit the customer's balance, which will be automatically applied - to their next invoice. + description: The integer amount in cents (or local equivalent) representing + the amount to credit the customer's balance, which will be automatically + applied to their next invoice. type: integer expand: description: Specifies which fields in the response should be expanded. @@ -40136,8 +48186,8 @@ paths: All keys can be unset by posting an empty value to `metadata`. type: object out_of_band_amount: - description: The integer amount in %s representing the amount that - is credited outside of Stripe. + description: The integer amount in cents (or local equivalent) representing + the amount that is credited outside of Stripe. type: integer reason: description: Reason for issuing this credit note, one of `duplicate`, @@ -40152,9 +48202,9 @@ paths: description: ID of an existing refund to link this credit note to. type: string refund_amount: - description: The integer amount in %s representing the amount to - refund. If set, a refund will be created for the charge associated - with the invoice. + description: The integer amount in cents (or local equivalent) representing + the amount to refund. If set, a refund will be created for the + charge associated with the invoice. type: integer required: - invoice @@ -40178,16 +48228,17 @@ paths: description: "

Get a preview of a credit note without creating it.

" operationId: GetCreditNotesPreview parameters: - - description: The integer amount in %s representing the total amount of the - credit note. + - description: The integer amount in cents (or local equivalent) representing + the total amount of the credit note. in: query name: amount required: false schema: type: integer style: form - - description: The integer amount in %s representing the amount to credit the - customer's balance, which will be automatically applied to their next invoice. + - description: The integer amount in cents (or local equivalent) representing + the amount to credit the customer's balance, which will be automatically + applied to their next invoice. in: query name: credit_amount required: false @@ -40278,8 +48329,8 @@ paths: type: string type: object style: deepObject - - description: The integer amount in %s representing the amount that is credited - outside of Stripe. + - description: The integer amount in cents (or local equivalent) representing + the amount that is credited outside of Stripe. in: query name: out_of_band_amount required: false @@ -40306,8 +48357,9 @@ paths: schema: type: string style: form - - description: The integer amount in %s representing the amount to refund. If - set, a refund will be created for the charge associated with the invoice. + - description: The integer amount in cents (or local equivalent) representing + the amount to refund. If set, a refund will be created for the charge associated + with the invoice. in: query name: refund_amount required: false @@ -40343,16 +48395,17 @@ paths: the full (paginated) list of line items.

" operationId: GetCreditNotesPreviewLines parameters: - - description: The integer amount in %s representing the total amount of the - credit note. + - description: The integer amount in cents (or local equivalent) representing + the total amount of the credit note. in: query name: amount required: false schema: type: integer style: form - - description: The integer amount in %s representing the amount to credit the - customer's balance, which will be automatically applied to their next invoice. + - description: The integer amount in cents (or local equivalent) representing + the amount to credit the customer's balance, which will be automatically + applied to their next invoice. in: query name: credit_amount required: false @@ -40463,8 +48516,8 @@ paths: type: string type: object style: deepObject - - description: The integer amount in %s representing the amount that is credited - outside of Stripe. + - description: The integer amount in cents (or local equivalent) representing + the amount that is credited outside of Stripe. in: query name: out_of_band_amount required: false @@ -40491,8 +48544,9 @@ paths: schema: type: string style: form - - description: The integer amount in %s representing the amount to refund. If - set, a refund will be created for the charge associated with the invoice. + - description: The integer amount in cents (or local equivalent) representing + the amount to refund. If set, a refund will be created for the charge associated + with the invoice. in: query name: refund_amount required: false @@ -40894,6 +48948,16 @@ paths: maxLength: 5000 type: string style: form + - description: Provides a list of customers that are associated with the specified + test clock. The response will not include customers with test clocks if + this parameter is not set. + in: query + name: test_clock + required: false + schema: + maxLength: 5000 + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -40934,6 +48998,7 @@ paths: - has_more - object - url + title: CustomerResourceCustomerList type: object x-expandableFields: - data @@ -40954,6 +49019,9 @@ paths: address: explode: true style: deepObject + cash_balance: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -41006,12 +49074,27 @@ paths: type: string description: The customer's address. balance: - description: An integer amount in %s that represents the customer's - current balance, which affect the customer's future invoices. - A negative amount represents a credit that decreases the amount - due on an invoice; a positive amount increases the amount due - on an invoice. + description: An integer amount in cents (or local equivalent) 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. type: integer + cash_balance: + description: Balance information and default balance settings for + this customer. + properties: + settings: + properties: + reconciliation_mode: + enum: + - automatic + - manual + type: string + title: balance_settings_param + type: object + title: cash_balance_param + type: object coupon: maxLength: 5000 type: string @@ -41065,6 +49148,20 @@ paths: footer: maxLength: 5000 type: string + rendering_options: + anyOf: + - properties: + amount_tax_display: + enum: + - '' + - exclude_tax + - include_inclusive_tax + type: string + title: rendering_options_param + type: object + - enum: + - '' + type: string title: customer_param type: object metadata: @@ -41181,6 +49278,7 @@ paths: - ae_trn - au_abn - au_arn + - bg_uic - br_cnpj - br_cpf - ca_bn @@ -41192,10 +49290,12 @@ paths: - ch_vat - cl_tin - es_cif + - eu_oss_vat - eu_vat - gb_vat - ge_vat - hk_br + - hu_tin - id_npwp - il_vat - in_gst @@ -41215,6 +49315,7 @@ paths: - sa_vat - sg_gst - sg_uen + - si_tin - th_vat - tw_vat - ua_vat @@ -41231,6 +49332,10 @@ paths: title: data_params type: object type: array + test_clock: + description: ID of the test clock to attach to the customer. + maxLength: 5000 + type: string type: object required: false responses: @@ -41246,6 +49351,108 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/customers/search": + get: + description: |- +

Search for customers you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetCustomersSearch + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + in: query + name: query + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/customer" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/customers/{customer}": delete: description: "

Permanently deletes a customer. It cannot be undone. Also immediately @@ -41354,6 +49561,9 @@ paths: card: explode: true style: deepObject + cash_balance: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -41372,9 +49582,6 @@ paths: tax: explode: true style: deepObject - trial_end: - explode: true - style: deepObject schema: additionalProperties: false properties: @@ -41406,11 +49613,11 @@ paths: type: string description: The customer's address. balance: - description: An integer amount in %s that represents the customer's - current balance, which affect the customer's future invoices. - A negative amount represents a credit that decreases the amount - due on an invoice; a positive amount increases the amount due - on an invoice. + description: An integer amount in cents (or local equivalent) 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. type: integer bank_account: anyOf: @@ -41502,6 +49709,21 @@ paths: type: string description: A token, like the ones returned by [Stripe.js](https://stripe.com/docs/js). x-stripeBypassValidation: true + cash_balance: + description: Balance information and default balance settings for + this customer. + properties: + settings: + properties: + reconciliation_mode: + enum: + - automatic + - manual + type: string + title: balance_settings_param + type: object + title: cash_balance_param + type: object coupon: maxLength: 5000 type: string @@ -41579,6 +49801,20 @@ paths: footer: maxLength: 5000 type: string + rendering_options: + anyOf: + - properties: + amount_tax_display: + enum: + - '' + - exclude_tax + - include_inclusive_tax + type: string + title: rendering_options_param + type: object + - enum: + - '' + type: string title: customer_param type: object metadata: @@ -41683,21 +49919,6 @@ paths: - none - reverse type: string - trial_end: - anyOf: - - enum: - - now - maxLength: 5000 - type: string - - format: unix-time - type: integer - description: Unix timestamp representing the end of the trial period - the customer will get before being charged for the first time. - This will always overwrite any trials that might apply via a subscribed - plan. If set, trial_end will override the default trial period - of the plan the customer is being subscribed to. The special value - `now` can be provided to end the customer's trial immediately. - Can be at most two years from `billing_cycle_anchor`. type: object required: false responses: @@ -41846,8 +50067,8 @@ paths: additionalProperties: false properties: amount: - description: The integer amount in **%s** to apply to the customer's - credit balance. + description: The integer amount in **cents (or local equivalent)** + to apply to the customer's credit balance. type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), @@ -43152,6 +51373,269 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/customers/{customer}/cash_balance": + get: + description: "

Retrieves a customer’s cash balance.

" + operationId: GetCustomersCustomerCashBalance + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/cash_balance" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Changes the settings on a customer’s cash balance.

" + operationId: PostCustomersCustomerCashBalance + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + settings: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + settings: + description: A hash of settings for this cash balance. + properties: + reconciliation_mode: + enum: + - automatic + - manual + type: string + title: balance_settings_param + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/cash_balance" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/customers/{customer}/cash_balance_transactions": + get: + description:

Returns a list of transactions that modified the customer’s + cash balance.

+ operationId: GetCustomersCustomerCashBalanceTransactions + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: |- + Customers with certain payments enabled have a cash balance, representing funds that were paid + by the customer to a merchant, but have not yet been allocated to a payment. Cash Balance Transactions + represent when funds are moved into or out of this balance. This includes funding by the customer, allocation + to payments, and refunds to the customer. + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/customer_cash_balance_transaction" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: CustomerCashBalanceTransactionList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/customers/{customer}/cash_balance_transactions/{transaction}": + get: + description:

Retrieves a specific cash balance transaction, which updated + the customer’s cash balance.

+ operationId: GetCustomersCustomerCashBalanceTransactionsTransaction + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: transaction + required: true + schema: + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/customer_cash_balance_transaction" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/customers/{customer}/discount": delete: description: "

Removes the currently applied discount on a customer.

" @@ -43230,6 +51714,102 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/customers/{customer}/funding_instructions": + post: + description: |- +

Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + funding instructions will be created. If funding instructions have already been created for a given customer, the same + funding instructions will be retrieved. In other words, we will return the same funding instructions each time.

+ operationId: PostCustomersCustomerFundingInstructions + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + bank_transfer: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + bank_transfer: + description: Additional parameters for `bank_transfer` funding types + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_account_params + type: object + requested_address_types: + items: + enum: + - iban + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_params + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + funding_type: + description: The `funding_type` to get the instructions for. + enum: + - bank_transfer + type: string + required: + - bank_transfer + - currency + - funding_type + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/funding_instructions" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/customers/{customer}/payment_methods": get: description: "

Returns a list of PaymentMethods for a given Customer

" @@ -43290,23 +51870,32 @@ paths: schema: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto - card + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -43361,6 +51950,58 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/customers/{customer}/payment_methods/{payment_method}": + get: + description: "

Retrieves a PaymentMethod object for a given Customer.

" + operationId: GetCustomersCustomerPaymentMethodsPaymentMethod + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: payment_method + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/payment_method" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/customers/{customer}/sources": get: description: "

List sources for a specified customer.

" @@ -43442,12 +52083,11 @@ paths: description: Details about each object. items: anyOf: - - "$ref": "#/components/schemas/alipay_account" - "$ref": "#/components/schemas/bank_account" - - "$ref": "#/components/schemas/bitcoin_receiver" - "$ref": "#/components/schemas/card" - "$ref": "#/components/schemas/source" title: Polymorphic + x-stripeBypassValidation: true type: array has_more: description: True if this list has another page of items after @@ -44125,7 +52765,7 @@ paths: properties: add_invoice_items: description: A list of prices and quantities that will generate - invoice items appended to the first invoice for this subscription. + invoice items appended to the next invoice for this subscription. You may pass up to 20 items. items: properties: @@ -44178,7 +52818,9 @@ paths: For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). type: number automatic_tax: - description: Automatic tax settings for this subscription. + description: Automatic tax settings for this subscription. We recommend + you only include this parameter when the existing value is being + changed. properties: enabled: type: boolean @@ -44199,7 +52841,7 @@ paths: 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 subsequent invoices. The timestamp is in UTC format. format: unix-time type: integer x-stripeBypassValidation: true @@ -44246,6 +52888,10 @@ paths: for that particular subscription. maxLength: 5000 type: string + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string days_until_due: description: Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` @@ -44457,6 +53103,21 @@ paths: type: string title: mandate_options_param type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true request_three_d_secure: enum: - any @@ -44467,6 +53128,69 @@ paths: - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string title: payment_method_options type: object payment_method_types: @@ -44481,12 +53205,18 @@ paths: - bancontact - boleto - card + - customer_balance - fpx - giropay - grabpay - ideal + - konbini + - link + - paynow + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -44494,6 +53224,11 @@ paths: - enum: - '' type: string + save_default_payment_method: + enum: + - 'off' + - on_subscription + type: string title: payment_settings type: object pending_invoice_item_interval: @@ -44525,10 +53260,9 @@ paths: maxLength: 5000 type: string proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + resulting from the `billing_cycle_anchor`. If no value is passed, + the default is `create_prorations`. enum: - always_invoice - create_prorations @@ -44780,7 +53514,7 @@ paths: properties: add_invoice_items: description: A list of prices and quantities that will generate - invoice items appended to the first invoice for this subscription. + invoice items appended to the next invoice for this subscription. You may pass up to 20 items. items: properties: @@ -44833,7 +53567,9 @@ paths: For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). type: number automatic_tax: - description: Automatic tax settings for this subscription. + description: Automatic tax settings for this subscription. We recommend + you only include this parameter when the existing value is being + changed. properties: enabled: type: boolean @@ -45142,6 +53878,21 @@ paths: type: string title: mandate_options_param type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true request_three_d_secure: enum: - any @@ -45152,6 +53903,69 @@ paths: - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string title: payment_method_options type: object payment_method_types: @@ -45166,12 +53980,18 @@ paths: - bancontact - boleto - card + - customer_balance - fpx - giropay - grabpay - ideal + - konbini + - link + - paynow + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -45179,6 +53999,11 @@ paths: - enum: - '' type: string + save_default_payment_method: + enum: + - 'off' + - on_subscription + type: string title: payment_settings type: object pending_invoice_item_interval: @@ -45210,12 +54035,10 @@ paths: maxLength: 5000 type: string proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting + `billing_cycle_anchor=now`, or starting a trial), or if an item's + `quantity` changes. enum: - always_invoice - create_prorations @@ -45514,16 +54337,18 @@ paths: type: array type: description: Type of the tax ID, one of `ae_trn`, `au_abn`, `au_arn`, - `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, - `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, `eu_vat`, - `gb_vat`, `ge_vat`, `hk_br`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, - `jp_cn`, `jp_rn`, `kr_brn`, `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, - `my_sst`, `no_vat`, `nz_gst`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, - `sg_uen`, `th_vat`, `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` + `bg_uic`, `br_cnpj`, `br_cpf`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, + `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `ch_vat`, `cl_tin`, `es_cif`, + `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `hk_br`, `hu_tin`, + `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `kr_brn`, + `li_uid`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `no_vat`, `nz_gst`, + `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `th_vat`, + `tw_vat`, `ua_vat`, `us_ein`, or `za_vat` enum: - ae_trn - au_abn - au_arn + - bg_uic - br_cnpj - br_cpf - ca_bn @@ -45535,10 +54360,12 @@ paths: - ch_vat - cl_tin - es_cif + - eu_oss_vat - eu_vat - gb_vat - ge_vat - hk_br + - hu_tin - id_npwp - il_vat - in_gst @@ -45558,6 +54385,7 @@ paths: - sa_vat - sg_gst - sg_uen + - si_tin - th_vat - tw_vat - ua_vat @@ -45802,6 +54630,7 @@ paths: - has_more - object - url + title: DisputeList type: object x-expandableFields: - data @@ -46431,6 +55260,7 @@ paths: - has_more - object - url + title: ExchangeRateList type: object x-expandableFields: - data @@ -46585,6 +55415,7 @@ paths: description: '' properties: data: + description: Details about each object. items: "$ref": "#/components/schemas/file_link" type: array @@ -46608,6 +55439,7 @@ paths: - has_more - object - url + title: FileFileLinkList type: object x-expandableFields: - data @@ -46649,7 +55481,8 @@ paths: description: 'The ID of the file. The file''s `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `identity_document_downloadable`, - `pci_document`, `selfie`, `sigma_scheduled_query`, or `tax_document_user_upload`.' + `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, + or `terminal_reader_splashscreen`.' maxLength: 5000 type: string metadata: @@ -46878,6 +55711,7 @@ paths: - selfie - sigma_scheduled_query - tax_document_user_upload + - terminal_reader_splashscreen maxLength: 5000 type: string x-stripeBypassValidation: true @@ -46912,7 +55746,476 @@ paths: properties: data: items: - "$ref": "#/components/schemas/file" + "$ref": "#/components/schemas/file" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/files" + type: string + required: + - data + - has_more + - object + - url + title: FileFileList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

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.

+ operationId: PostFiles + requestBody: + content: + multipart/form-data: + encoding: + expand: + explode: true + style: deepObject + file_link_data: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + file: + description: A file to upload. The file should follow the specifications + of RFC 2388 (which defines file transfers for the `multipart/form-data` + protocol). + type: string + file_link_data: + description: Optional parameters to automatically create a [file + link](https://stripe.com/docs/api#file_links) for the newly created + file. + properties: + create: + type: boolean + expires_at: + format: unix-time + type: integer + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + required: + - create + title: file_link_creation_params + type: object + purpose: + description: The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) + of the uploaded file. + enum: + - account_requirement + - additional_verification + - business_icon + - business_logo + - customer_signature + - dispute_evidence + - identity_document + - pci_document + - tax_document_user_upload + - terminal_reader_splashscreen + type: string + x-stripeBypassValidation: true + required: + - file + - purpose + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/file" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + servers: + - url: https://files.stripe.com/ + "/v1/files/{file}": + get: + description:

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.

+ operationId: GetFilesFile + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: file + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/file" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/financial_connections/accounts": + get: + description: "

Returns a list of Financial Connections Account + objects.

" + operationId: GetFinancialConnectionsAccounts + parameters: + - description: If present, only return accounts that belong to the specified + account holder. `account_holder[customer]` and `account_holder[account]` + are mutually exclusive. + explode: true + in: query + name: account_holder + required: false + schema: + properties: + account: + maxLength: 5000 + type: string + customer: + maxLength: 5000 + type: string + title: accountholder_params + type: object + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: If present, only return accounts that were collected as part + of the given session. + in: query + name: session + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/financial_connections/accounts" + type: string + required: + - data + - has_more + - object + - url + title: BankConnectionsResourceLinkedAccountList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/financial_connections/accounts/{account}": + get: + description: "

Retrieves the details of an Financial Connections Account.

" + operationId: GetFinancialConnectionsAccountsAccount + parameters: + - in: path + name: account + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/financial_connections.account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/financial_connections/accounts/{account}/disconnect": + post: + description: "

Disables your access to a Financial Connections Account. + You will no longer be able to access data associated with the account (e.g. + balances, transactions).

" + operationId: PostFinancialConnectionsAccountsAccountDisconnect + parameters: + - in: path + name: account + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/financial_connections.account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/financial_connections/accounts/{account}/owners": + get: + description: "

Lists all owners for a given Account

" + operationId: GetFinancialConnectionsAccountsAccountOwners + parameters: + - in: path + name: account + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The ID of the ownership object to fetch owners from. + in: query + name: ownership + required: true + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account_owner" type: array has_more: description: True if this list has another page of items after @@ -46927,13 +56230,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/files" type: string required: - data - has_more - object - url + title: BankConnectionsResourceOwnerList type: object x-expandableFields: - data @@ -46944,20 +56247,27 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/financial_connections/accounts/{account}/refresh": post: - description: |- -

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.

- operationId: PostFiles + description: "

Refreshes the data associated with a Financial Connections + Account.

" + operationId: PostFinancialConnectionsAccountsAccountRefresh + parameters: + - in: path + name: account + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: - multipart/form-data: + application/x-www-form-urlencoded: encoding: expand: explode: true style: deepObject - file_link_data: + features: explode: true style: deepObject schema: @@ -46969,51 +56279,118 @@ paths: maxLength: 5000 type: string type: array - file: - description: A file to upload. The file should follow the specifications - of RFC 2388 (which defines file transfers for the `multipart/form-data` - protocol). - type: string - file_link_data: - description: Optional parameters to automatically create a [file - link](https://stripe.com/docs/api#file_links) for the newly created - file. + features: + description: The list of account features that you would like to + refresh. + items: + enum: + - balance + - ownership + type: string + x-stripeBypassValidation: true + type: array + required: + - features + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/financial_connections.account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/financial_connections/sessions": + post: + description: "

To launch the Financial Connections authorization flow, create + a Session. The session’s client_secret can be used + to launch the flow using Stripe.js.

" + operationId: PostFinancialConnectionsSessions + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + account_holder: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + filters: + explode: true + style: deepObject + permissions: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + account_holder: + description: The account holder to link accounts for. properties: - create: - type: boolean - expires_at: - format: unix-time - type: integer - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + account: + maxLength: 5000 + type: string + customer: + maxLength: 5000 + type: string + type: + enum: + - account + - customer + type: string + required: + - type + title: accountholder_params + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + filters: + description: Filters to restrict the kinds of accounts to collect. + properties: + countries: + items: + maxLength: 5000 type: string + type: array required: - - create - title: file_link_creation_params + - countries + title: filters_params type: object - purpose: - description: The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) - of the uploaded file. - enum: - - account_requirement - - additional_verification - - business_icon - - business_logo - - customer_signature - - dispute_evidence - - identity_document - - pci_document - - tax_document_user_upload + permissions: + description: |- + List of data features that you would like to request access to. + + Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + description: For webview integrations only. Upon completing OAuth + login in the native browser, the user will be redirected to this + URL to return to your app. + maxLength: 5000 type: string - x-stripeBypassValidation: true required: - - file - - purpose + - account_holder + - permissions type: object required: true responses: @@ -47021,7 +56398,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/file" + "$ref": "#/components/schemas/financial_connections.session" description: Successful response. default: content: @@ -47029,15 +56406,10 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - servers: - - url: https://files.stripe.com/ - "/v1/files/{file}": + "/v1/financial_connections/sessions/{session}": get: - description:

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.

- operationId: GetFilesFile + description: "

Retrieves the details of a Financial Connections Session

" + operationId: GetFinancialConnectionsSessionsSession parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -47051,7 +56423,7 @@ paths: type: array style: deepObject - in: path - name: file + name: session required: true schema: maxLength: 5000 @@ -47071,7 +56443,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/file" + "$ref": "#/components/schemas/financial_connections.session" description: Successful response. default: content: @@ -47206,6 +56578,7 @@ paths: - has_more - object - url + title: GelatoVerificationReportList type: object x-expandableFields: - data @@ -47381,6 +56754,7 @@ paths: - has_more - object - url + title: GelatoVerificationSessionList type: object x-expandableFields: - data @@ -47878,6 +57252,7 @@ paths: - has_more - object - url + title: InvoicesItemsList type: object x-expandableFields: - data @@ -47919,9 +57294,9 @@ paths: additionalProperties: false properties: amount: - description: The integer amount in %s of the charge to be applied - to the upcoming invoice. Passing in a negative `amount` will reduce - the `amount_due` on the invoice. + description: The integer amount in cents (or local equivalent) of + the charge to be applied to the upcoming invoice. Passing in a + negative `amount` will reduce the `amount_due` on the invoice. type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), @@ -47989,7 +57364,8 @@ paths: Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. period: - description: The period associated with this invoice item. + description: The period associated with this invoice item. When + set to different values, the period will be rendered on the invoice. properties: end: format: unix-time @@ -48053,15 +57429,16 @@ paths: type: string type: array unit_amount: - description: The integer unit amount in %s of the charge to be applied - to the upcoming invoice. This `unit_amount` will be multiplied - by the quantity to get the full amount. Passing in a negative - `unit_amount` will reduce the `amount_due` on the invoice. + description: The integer unit amount in cents (or local equivalent) + 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. type: integer unit_amount_decimal: description: Same as `unit_amount`, but accepts a decimal value - in %s with at most 12 decimal places. Only one of `unit_amount` - and `unit_amount_decimal` can be set. + in cents (or local equivalent) with at most 12 decimal places. + Only one of `unit_amount` and `unit_amount_decimal` can be set. format: decimal type: string required: @@ -48200,9 +57577,9 @@ paths: additionalProperties: false properties: amount: - description: The integer amount in %s of the charge to be applied - to the upcoming invoice. If you want to apply a credit to the - customer's account, pass a negative amount. + description: The integer amount in cents (or local equivalent) 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. type: integer description: description: An arbitrary string which you can attach to the invoice @@ -48254,7 +57631,8 @@ paths: Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. period: - description: The period associated with this invoice item. + description: The period associated with this invoice item. When + set to different values, the period will be rendered on the invoice. properties: end: format: unix-time @@ -48314,15 +57692,16 @@ paths: invoice item. Pass an empty string to remove previously-defined tax rates. unit_amount: - description: The integer unit amount in %s of the charge to be applied - to the upcoming invoice. This unit_amount will be multiplied by - the quantity to get the full amount. If you want to apply a credit - to the customer's account, pass a negative unit_amount. + description: The integer unit amount in cents (or local equivalent) + 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. type: integer unit_amount_decimal: description: Same as `unit_amount`, but accepts a decimal value - in %s with at most 12 decimal places. Only one of `unit_amount` - and `unit_amount_decimal` can be set. + in cents (or local equivalent) with at most 12 decimal places. + Only one of `unit_amount` and `unit_amount_decimal` can be set. format: decimal type: string type: object @@ -48525,8 +57904,7 @@ paths: description: Error response. post: description:

This endpoint creates a draft invoice for a given customer. - The draft invoice created pulls in all pending invoice items on that customer, - including prorations. The invoice remains a draft until you finalize + The invoice remains a draft until you finalize the invoice, which allows you to pay or send the invoice to your customers.

operationId: PostInvoices @@ -48552,12 +57930,18 @@ paths: expand: explode: true style: deepObject + from_invoice: + explode: true + style: deepObject metadata: explode: true style: deepObject payment_settings: explode: true style: deepObject + rendering_options: + explode: true + style: deepObject transfer_data: explode: true style: deepObject @@ -48576,11 +57960,11 @@ paths: description: The account tax IDs associated with the invoice. Only editable when the invoice is a draft. application_fee_amount: - description: A fee in %s that will be applied to the invoice and - transferred to the application owner's Stripe account. The request - must be made with an OAuth key or the Stripe-Account header in - order to take an application fee. For more information, see the - application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + description: A fee in cents (or local equivalent) that will be applied + to the invoice and transferred to the application owner's Stripe + account. The request must be made with an OAuth key or the Stripe-Account + header in order to take an application fee. For more information, + see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). type: integer auto_advance: description: Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) @@ -48606,6 +57990,10 @@ paths: - charge_automatically - send_invoice type: string + currency: + description: The currency to create this invoice in. Defaults to + that of `customer` if not specified. + type: string custom_fields: anyOf: - items: @@ -48696,6 +58084,24 @@ paths: description: Footer to be displayed on the invoice. maxLength: 5000 type: string + from_invoice: + description: Revise an existing invoice. The new invoice will be + created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) + for more details. + properties: + action: + enum: + - revision + maxLength: 5000 + type: string + invoice: + maxLength: 5000 + type: string + required: + - action + - invoice + title: from_invoice + type: object metadata: anyOf: - additionalProperties: @@ -48720,6 +58126,9 @@ paths: description: Configuration settings for the PaymentIntent that is generated when the invoice is finalized. properties: + default_mandate: + maxLength: 5000 + type: string payment_method_options: properties: acss_debit: @@ -48764,6 +58173,34 @@ paths: card: anyOf: - properties: + installments: + properties: + enabled: + type: boolean + plan: + anyOf: + - properties: + count: + type: integer + interval: + enum: + - month + type: string + type: + enum: + - fixed_count + type: string + required: + - count + - interval + - type + title: installment_plan + type: object + - enum: + - '' + type: string + title: installments_param + type: object request_three_d_secure: enum: - any @@ -48774,6 +58211,69 @@ paths: - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string title: payment_method_options type: object payment_method_types: @@ -48788,12 +58288,18 @@ paths: - bancontact - boleto - card + - customer_balance - fpx - giropay - grabpay - ideal + - konbini + - link + - paynow + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -48803,6 +58309,33 @@ paths: type: string title: payment_settings type: object + pending_invoice_items_behavior: + description: How to handle pending invoice items on invoice creation. + One of `include` or `exclude`. `include` will include any pending + invoice items, and will create an empty draft invoice if no pending + invoice items exist. `exclude` will always create an empty invoice + draft regardless if there are pending invoice items or not. Defaults + to `exclude` if the parameter is omitted. + enum: + - exclude + - include + - include_and_require + type: string + rendering_options: + anyOf: + - properties: + amount_tax_display: + enum: + - '' + - exclude_tax + - include_inclusive_tax + type: string + title: rendering_options_param + type: object + - enum: + - '' + type: string + description: Options for invoice PDF rendering. statement_descriptor: description: Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If @@ -48812,12 +58345,12 @@ paths: maxLength: 22 type: string subscription: - description: The ID of the subscription to invoice, if any. If not - set, the created invoice will include all pending invoice items - for the customer. If set, the created invoice will only include - pending invoice items for that subscription and pending invoice - items not associated with any subscription. The subscription's - billing cycle and regular subscription events won't be affected. + description: The ID of the subscription to invoice, if any. If set, + the created invoice will only include pending invoice items for + that subscription and pending invoice items not associated with + any subscription if `pending_invoice_items_behavior` is `include`. + The subscription's billing cycle and regular subscription events + won't be affected. maxLength: 5000 type: string transfer_data: @@ -48833,10 +58366,8 @@ paths: - destination title: transfer_data_specs type: object - required: - - customer type: object - required: true + required: false responses: '200': content: @@ -48850,6 +58381,108 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/invoices/search": + get: + description: |- +

Search for invoices you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetInvoicesSearch + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + in: query + name: query + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/invoice" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/invoices/upcoming": get: description: |- @@ -48887,6 +58520,14 @@ paths: maxLength: 5000 type: string style: form + - description: The currency to preview this invoice in. Defaults to that of + `customer` if not specified. + in: query + name: currency + required: false + schema: + type: string + style: form - description: The identifier of the customer whose upcoming invoice you'd like to retrieve. in: query @@ -48994,6 +58635,7 @@ paths: - ae_trn - au_abn - au_arn + - bg_uic - br_cnpj - br_cpf - ca_bn @@ -49005,10 +58647,12 @@ paths: - ch_vat - cl_tin - es_cif + - eu_oss_vat - eu_vat - gb_vat - ge_vat - hk_br + - hu_tin - id_npwp - il_vat - in_gst @@ -49028,6 +58672,7 @@ paths: - sa_vat - sg_gst - sg_uen + - si_tin - th_vat - tw_vat - ua_vat @@ -49370,12 +59015,9 @@ paths: type: object type: array style: deepObject - - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. + - description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, + or starting a trial), or if an item's `quantity` changes. in: query name: subscription_proration_behavior required: false @@ -49492,6 +59134,14 @@ paths: maxLength: 5000 type: string style: form + - description: The currency to preview this invoice in. Defaults to that of + `customer` if not specified. + in: query + name: currency + required: false + schema: + type: string + style: form - description: The identifier of the customer whose upcoming invoice you'd like to retrieve. in: query @@ -49599,6 +59249,7 @@ paths: - ae_trn - au_abn - au_arn + - bg_uic - br_cnpj - br_cpf - ca_bn @@ -49610,10 +59261,12 @@ paths: - ch_vat - cl_tin - es_cif + - eu_oss_vat - eu_vat - gb_vat - ge_vat - hk_br + - hu_tin - id_npwp - il_vat - in_gst @@ -49633,6 +59286,7 @@ paths: - sa_vat - sg_gst - sg_uen + - si_tin - th_vat - tw_vat - ua_vat @@ -50007,12 +59661,9 @@ paths: type: object type: array style: deepObject - - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. + - description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, + or starting a trial), or if an item's `quantity` changes. in: query name: subscription_proration_behavior required: false @@ -50252,6 +59903,9 @@ paths: payment_settings: explode: true style: deepObject + rendering_options: + explode: true + style: deepObject transfer_data: explode: true style: deepObject @@ -50270,11 +59924,11 @@ paths: description: The account tax IDs associated with the invoice. Only editable when the invoice is a draft. application_fee_amount: - description: A fee in %s that will be applied to the invoice and - transferred to the application owner's Stripe account. The request - must be made with an OAuth key or the Stripe-Account header in - order to take an application fee. For more information, see the - application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + description: A fee in cents (or local equivalent) that will be applied + to the invoice and transferred to the application owner's Stripe + account. The request must be made with an OAuth key or the Stripe-Account + header in order to take an application fee. For more information, + see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). type: integer auto_advance: description: Controls whether Stripe will perform [automatic collection](https://stripe.com/docs/billing/invoices/workflow/#auto_advance) @@ -50419,6 +60073,9 @@ paths: description: Configuration settings for the PaymentIntent that is generated when the invoice is finalized. properties: + default_mandate: + maxLength: 5000 + type: string payment_method_options: properties: acss_debit: @@ -50463,6 +60120,34 @@ paths: card: anyOf: - properties: + installments: + properties: + enabled: + type: boolean + plan: + anyOf: + - properties: + count: + type: integer + interval: + enum: + - month + type: string + type: + enum: + - fixed_count + type: string + required: + - count + - interval + - type + title: installment_plan + type: object + - enum: + - '' + type: string + title: installments_param + type: object request_three_d_secure: enum: - any @@ -50473,6 +60158,69 @@ paths: - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string title: payment_method_options type: object payment_method_types: @@ -50487,12 +60235,18 @@ paths: - bancontact - boleto - card + - customer_balance - fpx - giropay - grabpay - ideal + - konbini + - link + - paynow + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -50502,6 +60256,21 @@ paths: type: string title: payment_settings type: object + rendering_options: + anyOf: + - properties: + amount_tax_display: + enum: + - '' + - exclude_tax + - include_inclusive_tax + type: string + title: rendering_options_param + type: object + - enum: + - '' + type: string + description: Options for invoice PDF rendering. statement_descriptor: description: Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If @@ -50789,6 +60558,13 @@ paths: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`." type: boolean + mandate: + description: ID of the mandate to be used for this invoice. It must + correspond to the payment method used to pay the invoice, including + the payment_method param or the invoice's default_payment_method + or default_source, if set. + maxLength: 5000 + type: string off_session: description: Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). @@ -50917,20 +60693,50 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuer_fraud_records": + "/v1/issuing/authorizations": get: - deprecated: true - description: "

Returns a list of issuer fraud records.

" - operationId: GetIssuerFraudRecords + description: "

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.

" + operationId: GetIssuingAuthorizations parameters: - - description: Only return issuer fraud records for the charge specified by - this charge ID. + - description: Only return authorizations that belong to the given card. in: query - name: charge + name: card + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return authorizations that belong to the given cardholder. + in: query + name: cardholder required: false schema: + maxLength: 5000 type: string style: form + - description: Only return authorizations that were created during the given + date interval. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -50974,6 +60780,18 @@ paths: maxLength: 5000 type: string style: form + - description: Only return authorizations with the given status. One of `pending`, + `closed`, or `reversed`. + in: query + name: status + required: false + schema: + enum: + - closed + - pending + - reversed + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -50992,7 +60810,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/issuer_fraud_record" + "$ref": "#/components/schemas/issuing.authorization" type: array has_more: description: True if this list has another page of items after @@ -51007,14 +60825,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/issuer_fraud_records" + pattern: "^/v1/issuing/authorizations" type: string required: - data - has_more - object - url - title: RadarIssuerFraudRecordList + title: IssuingAuthorizationList type: object x-expandableFields: - data @@ -51025,15 +60843,18 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuer_fraud_records/{issuer_fraud_record}": + "/v1/issuing/authorizations/{authorization}": get: - deprecated: true - description: |- -

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.

- operationId: GetIssuerFraudRecordsIssuerFraudRecord + description: "

Retrieves an Issuing Authorization object.

" + operationId: GetIssuingAuthorizationsAuthorization parameters: + - in: path + name: authorization + required: true + schema: + maxLength: 5000 + type: string + style: simple - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -51045,8 +60866,36 @@ paths: type: string type: array style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.authorization" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates the specified Issuing Authorization object + by setting the values of the parameters passed. Any parameters not provided + will be left unchanged.

" + operationId: PostIssuingAuthorizationsAuthorization + parameters: - in: path - name: issuer_fraud_record + name: authorization required: true schema: maxLength: 5000 @@ -51055,10 +60904,35 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. type: object required: false responses: @@ -51066,7 +60940,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuer_fraud_record" + "$ref": "#/components/schemas/issuing.authorization" description: Successful response. default: content: @@ -51074,31 +60948,143 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/authorizations": - get: - description: "

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.

" - operationId: GetIssuingAuthorizations + "/v1/issuing/authorizations/{authorization}/approve": + post: + description:

Approves a pending Issuing Authorization object. + This request should be made within the timeout window of the real-time + authorization flow.

+ operationId: PostIssuingAuthorizationsAuthorizationApprove parameters: - - description: Only return authorizations that belong to the given card. - in: query - name: card - required: false + - in: path + name: authorization + required: true schema: maxLength: 5000 type: string - style: form - - description: Only return authorizations that belong to the given cardholder. - in: query - name: cardholder + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: If the authorization's `pending_request.is_amount_controllable` + property is `true`, you may provide this value to control how + much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) + to decline an authorization request). + type: integer + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.authorization" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/authorizations/{authorization}/decline": + post: + description:

Declines a pending Issuing Authorization object. + This request should be made within the timeout window of the real + time authorization flow.

+ operationId: PostIssuingAuthorizationsAuthorizationDecline + parameters: + - in: path + name: authorization + required: true schema: maxLength: 5000 type: string - style: form - - description: Only return authorizations that were created during the given - date interval. + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.authorization" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/cardholders": + get: + description: "

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.

" + operationId: GetIssuingCardholders + parameters: + - description: Only return cardholders that were created during the given date + interval. explode: true in: query name: created @@ -51118,6 +61104,13 @@ paths: type: object - type: integer style: deepObject + - description: Only return cardholders that have the given email address. + in: query + name: email + required: false + schema: + type: string + style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -51149,6 +61142,13 @@ paths: schema: type: integer style: form + - description: Only return cardholders that have the given phone number. + in: query + name: phone_number + required: false + schema: + type: string + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -51161,17 +61161,29 @@ paths: maxLength: 5000 type: string style: form - - description: Only return authorizations with the given status. One of `pending`, - `closed`, or `reversed`. + - description: Only return cardholders that have the given status. One of `active`, + `inactive`, or `blocked`. in: query name: status required: false schema: enum: - - closed - - pending - - reversed + - active + - blocked + - inactive + type: string + style: form + - description: Only return cardholders that have the given type. One of `individual` + or `company`. + in: query + name: type + required: false + schema: + enum: + - company + - individual type: string + x-stripeBypassValidation: true style: form requestBody: content: @@ -51181,41 +61193,1127 @@ paths: additionalProperties: false properties: {} type: object - required: false + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/issuing.cardholder" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/issuing/cardholders" + type: string + required: + - data + - has_more + - object + - url + title: IssuingCardholderList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new Issuing Cardholder object that can + be issued cards.

" + operationId: PostIssuingCardholders + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + billing: + explode: true + style: deepObject + company: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + individual: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + spending_controls: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + billing: + description: The cardholder's billing address. + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + required: + - city + - country + - line1 + - postal_code + title: required_address + type: object + required: + - address + title: billing_specs + type: object + company: + description: Additional information about a `company` cardholder. + properties: + tax_id: + maxLength: 5000 + type: string + title: company_param + type: object + email: + description: The cardholder's email address. + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + individual: + description: Additional information about an `individual` cardholder. + properties: + dob: + properties: + day: + type: integer + month: + type: integer + year: + type: integer + required: + - day + - month + - year + title: date_of_birth_specs + type: object + first_name: + type: string + last_name: + type: string + verification: + properties: + document: + properties: + back: + maxLength: 5000 + type: string + front: + maxLength: 5000 + type: string + title: person_verification_document_param + type: object + title: person_verification_param + type: object + required: + - first_name + - last_name + title: individual_param + type: object + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + name: + description: The cardholder's name. This will be printed on cards + issued to them. The maximum length of this field is 24 characters. + This field cannot contain any special characters or numbers. + type: string + phone_number: + description: The cardholder's phone number. This will be transformed + to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided + in that format already. This is required for all cardholders who + will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) + for more details. + type: string + spending_controls: + description: Rules that control spending across this cardholder's + cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) + for more details. + properties: + allowed_categories: + items: + enum: + - 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 + maxLength: 5000 + type: string + type: array + blocked_categories: + items: + enum: + - 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 + maxLength: 5000 + type: string + type: array + spending_limits: + items: + properties: + amount: + type: integer + categories: + items: + enum: + - 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 + maxLength: 5000 + type: string + type: array + interval: + enum: + - all_time + - daily + - monthly + - per_authorization + - weekly + - yearly + type: string + required: + - amount + - interval + title: spending_limits_param + type: object + type: array + spending_limits_currency: + type: string + title: authorization_controls_param_v2 + type: object + status: + description: Specifies whether to permit authorizations on this + cardholder's cards. Defaults to `active`. + enum: + - active + - inactive + type: string + type: + description: One of `individual` or `company`. + enum: + - company + - individual + type: string + x-stripeBypassValidation: true + required: + - billing + - name + - type + type: object + required: true responses: '200': content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.authorization" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/authorizations" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/issuing.cardholder" description: Successful response. default: content: @@ -51223,13 +62321,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/authorizations/{authorization}": + "/v1/issuing/cardholders/{cardholder}": get: - description: "

Retrieves an Issuing Authorization object.

" - operationId: GetIssuingAuthorizationsAuthorization + description: "

Retrieves an Issuing Cardholder object.

" + operationId: GetIssuingCardholdersCardholder parameters: - in: path - name: authorization + name: cardholder required: true schema: maxLength: 5000 @@ -51260,7 +62358,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.authorization" + "$ref": "#/components/schemas/issuing.cardholder" description: Successful response. default: content: @@ -51269,356 +62367,18 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates the specified Issuing Authorization object + description: "

Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

" - operationId: PostIssuingAuthorizationsAuthorization - parameters: - - in: path - name: authorization - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.authorization" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/authorizations/{authorization}/approve": - post: - description:

Approves a pending Issuing Authorization object. - This request should be made within the timeout window of the real-time - authorization flow.

- operationId: PostIssuingAuthorizationsAuthorizationApprove - parameters: - - in: path - name: authorization - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: If the authorization's `pending_request.is_amount_controllable` - property is `true`, you may provide this value to control how - much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) - to decline an authorization request). - type: integer - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.authorization" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/authorizations/{authorization}/decline": - post: - description:

Declines a pending Issuing Authorization object. - This request should be made within the timeout window of the real - time authorization flow.

- operationId: PostIssuingAuthorizationsAuthorizationDecline + operationId: PostIssuingCardholdersCardholder parameters: - in: path - name: authorization + name: cardholder required: true schema: maxLength: 5000 type: string style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.authorization" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/cardholders": - get: - description: "

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.

" - operationId: GetIssuingCardholders - parameters: - - description: Only return cardholders that were created during the given date - interval. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return cardholders that have the given email address. - in: query - name: email - required: false - schema: - type: string - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: Only return cardholders that have the given phone number. - in: query - name: phone_number - required: false - schema: - type: string - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return cardholders that have the given status. One of `active`, - `inactive`, or `blocked`. - in: query - name: status - required: false - schema: - enum: - - active - - blocked - - inactive - type: string - style: form - - description: Only return cardholders that have the given type. One of `individual` - or `company`. - in: query - name: type - required: false - schema: - enum: - - company - - individual - type: string - x-stripeBypassValidation: true - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.cardholder" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/cardholders" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Creates a new Issuing Cardholder object that can - be issued cards.

" - operationId: PostIssuingCardholders requestBody: content: application/x-www-form-urlencoded: @@ -51713,10 +62473,8 @@ paths: title: date_of_birth_specs type: object first_name: - maxLength: 5000 type: string last_name: - maxLength: 5000 type: string verification: properties: @@ -51746,16 +62504,11 @@ paths: Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. type: object - name: - description: The cardholder's name. This will be printed on cards - issued to them. The maximum length of this field is 24 characters. - type: string phone_number: - description: The cardholder's phone number. This will be transformed - to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided - in that format already. This is required for all cardholders who - will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) - for more details. + description: The cardholder's phone number. This is required for + all cardholders who will be creating EU cards. See the [3D Secure + documentation](https://stripe.com/docs/issuing/3d-secure) for + more details. type: string spending_controls: description: Rules that control spending across this cardholder's @@ -52670,24 +63423,13 @@ paths: type: object status: description: Specifies whether to permit authorizations on this - cardholder's cards. Defaults to `active`. + cardholder's cards. enum: - active - inactive type: string - type: - description: One of `individual` or `company`. - enum: - - company - - individual - type: string - x-stripeBypassValidation: true - required: - - billing - - name - - type type: object - required: true + required: false responses: '200': content: @@ -52701,18 +63443,68 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/cardholders/{cardholder}": + "/v1/issuing/cards": get: - description: "

Retrieves an Issuing Cardholder object.

" - operationId: GetIssuingCardholdersCardholder + description: "

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.

" + operationId: GetIssuingCards parameters: - - in: path + - description: Only return cards belonging to the Cardholder with the provided + ID. + in: query name: cardholder - required: true + required: false schema: maxLength: 5000 type: string - style: simple + style: form + - description: Only return cards that were issued during the given date interval. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return cards that have the given expiration month. + in: query + name: exp_month + required: false + schema: + type: integer + style: form + - description: Only return cards that have the given expiration year. + in: query + name: exp_year + required: false + schema: + type: integer + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -52724,6 +63516,58 @@ paths: type: string type: array style: deepObject + - description: Only return cards that have the given last four digits. + in: query + name: last4 + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return cards that have the given status. One of `active`, + `inactive`, or `canceled`. + in: query + name: status + required: false + schema: + enum: + - active + - canceled + - inactive + type: string + x-stripeBypassValidation: true + style: form + - description: Only return cards that have the given type. One of `virtual` + or `physical`. + in: query + name: type + required: false + schema: + enum: + - physical + - virtual + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -52738,7 +63582,36 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.cardholder" + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/issuing.card" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/issuing/cards" + type: string + required: + - data + - has_more + - object + - url + title: IssuingCardList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -52747,35 +63620,19 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates the specified Issuing Cardholder object - by setting the values of the parameters passed. Any parameters not provided - will be left unchanged.

" - operationId: PostIssuingCardholdersCardholder - parameters: - - in: path - name: cardholder - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

Creates an Issuing Card object.

" + operationId: PostIssuingCards requestBody: content: application/x-www-form-urlencoded: encoding: - billing: - explode: true - style: deepObject - company: - explode: true - style: deepObject expand: explode: true style: deepObject - individual: + metadata: explode: true style: deepObject - metadata: + shipping: explode: true style: deepObject spending_controls: @@ -52784,8 +63641,48 @@ paths: schema: additionalProperties: false properties: - billing: - description: The cardholder's billing address. + cardholder: + description: The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) + object with which the card will be associated. + maxLength: 5000 + type: string + currency: + description: The currency for the card. + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_account: + type: string + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + replacement_for: + description: The card this is meant to be a replacement for (if + any). + maxLength: 5000 + type: string + replacement_reason: + description: If `replacement_for` is specified, this should indicate + why that card is being replaced. + enum: + - damaged + - expired + - lost + - stolen + type: string + x-stripeBypassValidation: true + shipping: + description: The address where the card will be shipped. properties: address: properties: @@ -52814,87 +63711,40 @@ paths: - postal_code title: required_address type: object - required: - - address - title: billing_specs - type: object - company: - description: Additional information about a `company` cardholder. - properties: - tax_id: - maxLength: 5000 - type: string - title: company_param - type: object - email: - description: The cardholder's email address. - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - individual: - description: Additional information about an `individual` cardholder. - properties: - dob: + customs: properties: - day: - type: integer - month: - type: integer - year: - type: integer - required: - - day - - month - - year - title: date_of_birth_specs + eori_number: + maxLength: 5000 + type: string + title: customs_param type: object - first_name: + name: maxLength: 5000 type: string - last_name: - maxLength: 5000 + phone_number: + type: string + require_signature: + type: boolean + service: + enum: + - express + - priority + - standard + type: string + x-stripeBypassValidation: true + type: + enum: + - bulk + - individual type: string - verification: - properties: - document: - properties: - back: - maxLength: 5000 - type: string - front: - maxLength: 5000 - type: string - title: person_verification_document_param - type: object - title: person_verification_param - type: object required: - - first_name - - last_name - title: individual_param - type: object - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. + - address + - name + title: shipping_specs type: object - phone_number: - description: The cardholder's phone number. This is required for - all cardholders who will be creating EU cards. See the [3D Secure - documentation](https://stripe.com/docs/issuing/3d-secure) for - more details. - type: string spending_controls: - description: Rules that control spending across this cardholder's - cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) + description: Rules that control spending for this card. Refer to + our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. properties: allowed_categories: @@ -53799,25 +64649,33 @@ paths: title: spending_limits_param type: object type: array - spending_limits_currency: - type: string - title: authorization_controls_param_v2 + title: authorization_controls_param type: object status: - description: Specifies whether to permit authorizations on this - cardholder's cards. + description: Whether authorizations can be approved on this card. + Defaults to `inactive`. enum: - active - inactive type: string + type: + description: The type of card to issue. Possible values are `physical` + or `virtual`. + enum: + - physical + - virtual + type: string + required: + - currency + - type type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/issuing.cardholder" + "$ref": "#/components/schemas/issuing.card" description: Successful response. default: content: @@ -53825,68 +64683,18 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/cards": + "/v1/issuing/cards/{card}": get: - description: "

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.

" - operationId: GetIssuingCards + description: "

Retrieves an Issuing Card object.

" + operationId: GetIssuingCardsCard parameters: - - description: Only return cards belonging to the Cardholder with the provided - ID. - in: query - name: cardholder - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return cards that were issued during the given date interval. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false + - in: path + name: card + required: true schema: maxLength: 5000 type: string - style: form - - description: Only return cards that have the given expiration month. - in: query - name: exp_month - required: false - schema: - type: integer - style: form - - description: Only return cards that have the given expiration year. - in: query - name: exp_year - required: false - schema: - type: integer - style: form + style: simple - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -53898,58 +64706,6 @@ paths: type: string type: array style: deepObject - - description: Only return cards that have the given last four digits. - in: query - name: last4 - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return cards that have the given status. One of `active`, - `inactive`, or `canceled`. - in: query - name: status - required: false - schema: - enum: - - active - - canceled - - inactive - type: string - x-stripeBypassValidation: true - style: form - - description: Only return cards that have the given type. One of `virtual` - or `physical`. - in: query - name: type - required: false - schema: - enum: - - physical - - virtual - type: string - style: form requestBody: content: application/x-www-form-urlencoded: @@ -53964,35 +64720,7 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.card" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/cards" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/issuing.card" description: Successful response. default: content: @@ -54001,8 +64729,18 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Creates an Issuing Card object.

" - operationId: PostIssuingCards + description: "

Updates the specified Issuing Card object by setting + the values of the parameters passed. Any parameters not provided will be left + unchanged.

" + operationId: PostIssuingCardsCard + parameters: + - in: path + name: card + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -54013,7 +64751,7 @@ paths: metadata: explode: true style: deepObject - shipping: + pin: explode: true style: deepObject spending_controls: @@ -54022,13 +64760,11 @@ paths: schema: additionalProperties: false properties: - cardholder: - description: The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) - object with which the card will be associated. - maxLength: 5000 - type: string - currency: - description: The currency for the card. + cancellation_reason: + description: Reason why the `status` of this card is `canceled`. + enum: + - lost + - stolen type: string expand: description: Specifies which fields in the response should be expanded. @@ -54037,78 +64773,25 @@ paths: type: string type: array metadata: - additionalProperties: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - type: object - replacement_for: - description: The card this is meant to be a replacement for (if - any). - maxLength: 5000 - type: string - replacement_reason: - description: If `replacement_for` is specified, this should indicate - why that card is being replaced. - enum: - - damaged - - expired - - lost - - stolen - type: string - x-stripeBypassValidation: true - shipping: - description: The address where the card will be shipped. + pin: + description: The desired new PIN for this card. properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - required: - - city - - country - - line1 - - postal_code - title: required_address - type: object - name: + encrypted_number: maxLength: 5000 type: string - service: - enum: - - express - - priority - - standard - type: string - x-stripeBypassValidation: true - type: - enum: - - bulk - - individual - type: string - required: - - address - - name - title: shipping_specs + title: encrypted_pin_param type: object spending_controls: description: Rules that control spending for this card. Refer to @@ -55001,139 +65684,489 @@ paths: - wrecking_and_salvage_yards maxLength: 5000 type: string - type: array - interval: + type: array + interval: + enum: + - all_time + - daily + - monthly + - per_authorization + - weekly + - yearly + type: string + required: + - amount + - interval + title: spending_limits_param + type: object + type: array + title: authorization_controls_param + type: object + status: + description: Dictates whether authorizations can be approved on + this card. If this card is being canceled because it was lost + or stolen, this information should be provided as `cancellation_reason`. + enum: + - active + - canceled + - inactive + type: string + x-stripeBypassValidation: true + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.card" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/disputes": + get: + description: "

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.

" + operationId: GetIssuingDisputes + parameters: + - description: Select Issuing disputes that were created during the given date + interval. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Select Issuing disputes with the given status. + in: query + name: status + required: false + schema: + enum: + - expired + - lost + - submitted + - unsubmitted + - won + type: string + style: form + - description: Select the Issuing dispute for the given transaction. + in: query + name: transaction + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/issuing.dispute" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/issuing/disputes" + type: string + required: + - data + - has_more + - object + - url + title: IssuingDisputeList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description:

Creates an Issuing Dispute object. Individual pieces + of evidence within the evidence object are optional at this point. + Stripe only validates that required evidence is present during submission. + Refer to Dispute + reasons and evidence for more details about evidence requirements.

+ operationId: PostIssuingDisputes + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + evidence: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + treasury: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: The dispute amount in the card's currency and in the + [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + If not set, defaults to the full transaction amount. + type: integer + evidence: + description: Evidence provided for the dispute. + properties: + canceled: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + canceled_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + cancellation_policy_provided: + anyOf: + - type: boolean + - enum: + - '' + type: string + cancellation_reason: + maxLength: 1500 + type: string + expected_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: + enum: + - '' + - merchandise + - service + type: string + return_status: + enum: + - '' + - merchant_rejected + - successful + type: string + returned_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: canceled + type: object + - enum: + - '' + type: string + duplicate: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + card_statement: + anyOf: + - type: string + - enum: + - '' + type: string + cash_receipt: + anyOf: + - type: string + - enum: + - '' + type: string + check_image: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + original_transaction: + maxLength: 5000 + type: string + title: duplicate + type: object + - enum: + - '' + type: string + fraudulent: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + title: fraudulent + type: object + - enum: + - '' + type: string + merchandise_not_as_described: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + received_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + return_description: + maxLength: 1500 + type: string + return_status: + enum: + - '' + - merchant_rejected + - successful + type: string + returned_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: merchandise_not_as_described + type: object + - enum: + - '' + type: string + not_received: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + expected_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: + enum: + - '' + - merchandise + - service + type: string + title: not_received + type: object + - enum: + - '' + type: string + other: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: enum: - - all_time - - daily - - monthly - - per_authorization - - weekly - - yearly + - '' + - merchandise + - service type: string - required: - - amount - - interval - title: spending_limits_param + title: other type: object - type: array - title: authorization_controls_param + - enum: + - '' + type: string + reason: + enum: + - canceled + - duplicate + - fraudulent + - merchandise_not_as_described + - not_received + - other + - service_not_as_described + type: string + x-stripeBypassValidation: true + service_not_as_described: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + canceled_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + cancellation_reason: + maxLength: 1500 + type: string + explanation: + maxLength: 1500 + type: string + received_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: service_not_as_described + type: object + - enum: + - '' + type: string + title: evidence_param type: object - status: - description: Whether authorizations can be approved on this card. - Defaults to `inactive`. - enum: - - active - - inactive - type: string - type: - description: The type of card to issue. Possible values are `physical` - or `virtual`. - enum: - - physical - - virtual - type: string - required: - - currency - - type - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.card" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/cards/{card}": - get: - description: "

Retrieves an Issuing Card object.

" - operationId: GetIssuingCardsCard - parameters: - - in: path - name: card - required: true - schema: - maxLength: 5000 - type: string - style: simple - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.card" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Updates the specified Issuing Card object by setting - the values of the parameters passed. Any parameters not provided will be left - unchanged.

" - operationId: PostIssuingCardsCard - parameters: - - in: path - name: card - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - pin: - explode: true - style: deepObject - spending_controls: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - cancellation_reason: - description: Reason why the `status` of this card is `canceled`. - enum: - - lost - - stolen - type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -55141,945 +66174,1092 @@ paths: type: string type: array metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + additionalProperties: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - pin: - description: The desired new PIN for this card. - properties: - encrypted_number: - maxLength: 5000 - type: string - title: encrypted_pin_param type: object - spending_controls: - description: Rules that control spending for this card. Refer to - our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) - for more details. + transaction: + description: The ID of the issuing transaction to create a dispute + for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + maxLength: 5000 + type: string + treasury: + description: Params for disputes related to Treasury FinancialAccounts properties: - allowed_categories: - items: - enum: - - 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 - maxLength: 5000 + received_debit: + maxLength: 5000 + type: string + required: + - received_debit + title: treasury_param + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.dispute" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/disputes/{dispute}": + get: + description: "

Retrieves an Issuing Dispute object.

" + operationId: GetIssuingDisputesDispute + parameters: + - in: path + name: dispute + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.dispute" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates the specified Issuing Dispute object by + setting the values of the parameters passed. Any parameters not provided will + be left unchanged. Properties on the evidence object can be unset + by passing in an empty string.

" + operationId: PostIssuingDisputesDispute + parameters: + - in: path + name: dispute + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + evidence: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: The dispute amount in the card's currency and in the + [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + type: integer + evidence: + description: Evidence provided for the dispute. + properties: + canceled: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + canceled_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + cancellation_policy_provided: + anyOf: + - type: boolean + - enum: + - '' + type: string + cancellation_reason: + maxLength: 1500 + type: string + expected_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: + enum: + - '' + - merchandise + - service + type: string + return_status: + enum: + - '' + - merchant_rejected + - successful + type: string + returned_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: canceled + type: object + - enum: + - '' type: string - type: array - blocked_categories: - items: - enum: - - 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 - maxLength: 5000 + duplicate: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + card_statement: + anyOf: + - type: string + - enum: + - '' + type: string + cash_receipt: + anyOf: + - type: string + - enum: + - '' + type: string + check_image: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + original_transaction: + maxLength: 5000 + type: string + title: duplicate + type: object + - enum: + - '' + type: string + fraudulent: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + title: fraudulent + type: object + - enum: + - '' + type: string + merchandise_not_as_described: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + received_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + return_description: + maxLength: 1500 + type: string + return_status: + enum: + - '' + - merchant_rejected + - successful + type: string + returned_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: merchandise_not_as_described + type: object + - enum: + - '' type: string - type: array - spending_limits: - items: - properties: - amount: - type: integer - categories: - items: - enum: - - 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 - maxLength: 5000 + not_received: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' type: string - type: array - interval: + expected_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: enum: - - all_time - - daily - - monthly - - per_authorization - - weekly - - yearly + - '' + - merchandise + - service type: string - required: - - amount - - interval - title: spending_limits_param + title: not_received + type: object + - enum: + - '' + type: string + other: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + explanation: + maxLength: 1500 + type: string + product_description: + maxLength: 1500 + type: string + product_type: + enum: + - '' + - merchandise + - service + type: string + title: other + type: object + - enum: + - '' + type: string + reason: + enum: + - canceled + - duplicate + - fraudulent + - merchandise_not_as_described + - not_received + - other + - service_not_as_described + type: string + x-stripeBypassValidation: true + service_not_as_described: + anyOf: + - properties: + additional_documentation: + anyOf: + - type: string + - enum: + - '' + type: string + canceled_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + cancellation_reason: + maxLength: 1500 + type: string + explanation: + maxLength: 1500 + type: string + received_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + title: service_not_as_described type: object + - enum: + - '' + type: string + title: evidence_param + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.dispute" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/disputes/{dispute}/submit": + post: + description:

Submits an Issuing Dispute to the card network. + Stripe validates that all evidence fields required for the dispute’s reason + are present. For more details, see Dispute + reasons and evidence.

+ operationId: PostIssuingDisputesDisputeSubmit + parameters: + - in: path + name: dispute + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.dispute" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/settlements": + get: + description: "

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.

" + operationId: GetIssuingSettlements + parameters: + - description: Only return issuing settlements that were created during the + given date interval. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/issuing.settlement" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/issuing/settlements" + type: string + required: + - data + - has_more + - object + - url + title: IssuingSettlementList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/settlements/{settlement}": + get: + description: "

Retrieves an Issuing Settlement object.

" + operationId: GetIssuingSettlementsSettlement + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: settlement + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.settlement" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates the specified Issuing Settlement object + by setting the values of the parameters passed. Any parameters not provided + will be left unchanged.

" + operationId: PostIssuingSettlementsSettlement + parameters: + - in: path + name: settlement + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.settlement" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/transactions": + get: + description: "

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.

" + operationId: GetIssuingTransactions + parameters: + - description: Only return transactions that belong to the given card. + in: query + name: card + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return transactions that belong to the given cardholder. + in: query + name: cardholder + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return transactions that were created during the given date + interval. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return transactions that have the given type. One of `capture` + or `refund`. + in: query + name: type + required: false + schema: + enum: + - capture + - refund + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/issuing.transaction" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/issuing/transactions" + type: string + required: + - data + - has_more + - object + - url + title: IssuingTransactionList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/issuing/transactions/{transaction}": + get: + description: "

Retrieves an Issuing Transaction object.

" + operationId: GetIssuingTransactionsTransaction + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: transaction + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.transaction" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates the specified Issuing Transaction object + by setting the values of the parameters passed. Any parameters not provided + will be left unchanged.

" + operationId: PostIssuingTransactionsTransaction + parameters: + - in: path + name: transaction + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.transaction" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/link_account_sessions": + post: + description: "

To launch the Financial Connections authorization flow, create + a Session. The session’s client_secret can be used + to launch the flow using Stripe.js.

" + operationId: PostLinkAccountSessions + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + account_holder: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + filters: + explode: true + style: deepObject + permissions: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + account_holder: + description: The account holder to link accounts for. + properties: + account: + maxLength: 5000 + type: string + customer: + maxLength: 5000 + type: string + type: + enum: + - account + - customer + type: string + required: + - type + title: accountholder_params + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + filters: + description: Filters to restrict the kinds of accounts to collect. + properties: + countries: + items: + maxLength: 5000 + type: string type: array - title: authorization_controls_param + required: + - countries + title: filters_params type: object - status: - description: Dictates whether authorizations can be approved on - this card. If this card is being canceled because it was lost - or stolen, this information should be provided as `cancellation_reason`. - enum: - - active - - canceled - - inactive + permissions: + description: |- + List of data features that you would like to request access to. + + Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + description: For webview integrations only. Upon completing OAuth + login in the native browser, the user will be redirected to this + URL to return to your app. + maxLength: 5000 type: string - x-stripeBypassValidation: true + required: + - account_holder + - permissions + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/financial_connections.session" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/link_account_sessions/{session}": + get: + description: "

Retrieves the details of a Financial Connections Session

" + operationId: GetLinkAccountSessionsSession + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: session + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} type: object required: false responses: @@ -56087,7 +67267,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.card" + "$ref": "#/components/schemas/financial_connections.session" description: Successful response. default: content: @@ -56095,33 +67275,29 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/disputes": + "/v1/linked_accounts": get: - description: "

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.

" - operationId: GetIssuingDisputes + description: "

Returns a list of Financial Connections Account + objects.

" + operationId: GetLinkedAccounts parameters: - - description: Select Issuing disputes that were created during the given date - interval. + - description: If present, only return accounts that belong to the specified + account holder. `account_holder[customer]` and `account_holder[account]` + are mutually exclusive. explode: true in: query - name: created + name: account_holder required: false schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer + properties: + account: + maxLength: 5000 + type: string + customer: + maxLength: 5000 + type: string + title: accountholder_params + type: object style: deepObject - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list @@ -56154,409 +67330,72 @@ paths: schema: type: integer style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. + - description: If present, only return accounts that were collected as part + of the given session. in: query - name: starting_after + name: session required: false schema: maxLength: 5000 type: string style: form - - description: Select Issuing disputes with the given status. - in: query - name: status - required: false - schema: - enum: - - expired - - lost - - submitted - - unsubmitted - - won - type: string - style: form - - description: Select the Issuing dispute for the given transaction. + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. in: query - name: transaction + name: starting_after required: false schema: maxLength: 5000 type: string - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.dispute" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/disputes" - type: string - required: - - data - - has_more - - object - - url - title: IssuingDisputeList - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description:

Creates an Issuing Dispute object. Individual pieces - of evidence within the evidence object are optional at this point. - Stripe only validates that required evidence is present during submission. - Refer to Dispute - reasons and evidence for more details about evidence requirements.

- operationId: PostIssuingDisputes - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - evidence: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - evidence: - description: Evidence provided for the dispute. - properties: - canceled: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - canceled_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - cancellation_policy_provided: - anyOf: - - type: boolean - - enum: - - '' - type: string - cancellation_reason: - maxLength: 1500 - type: string - expected_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - return_status: - enum: - - '' - - merchant_rejected - - successful - type: string - returned_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: canceled - type: object - - enum: - - '' - type: string - duplicate: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - card_statement: - anyOf: - - type: string - - enum: - - '' - type: string - cash_receipt: - anyOf: - - type: string - - enum: - - '' - type: string - check_image: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - original_transaction: - maxLength: 5000 - type: string - title: duplicate - type: object - - enum: - - '' - type: string - fraudulent: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - title: fraudulent - type: object - - enum: - - '' - type: string - merchandise_not_as_described: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - received_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - return_description: - maxLength: 1500 - type: string - return_status: - enum: - - '' - - merchant_rejected - - successful - type: string - returned_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: merchandise_not_as_described - type: object - - enum: - - '' - type: string - not_received: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - expected_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - title: not_received - type: object - - enum: - - '' - type: string - other: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - title: other - type: object - - enum: - - '' - type: string - reason: - enum: - - canceled - - duplicate - - fraudulent - - merchandise_not_as_described - - not_received - - other - - service_not_as_described - type: string - x-stripeBypassValidation: true - service_not_as_described: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - canceled_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - cancellation_reason: - maxLength: 1500 - type: string - explanation: - maxLength: 1500 - type: string - received_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: service_not_as_described - type: object - - enum: - - '' - type: string - title: evidence_param - type: object - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - transaction: - description: The ID of the issuing transaction to create a dispute - for. - maxLength: 5000 - type: string - required: - - transaction + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/issuing.dispute" + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/financial_connections/accounts" + type: string + required: + - data + - has_more + - object + - url + title: BankConnectionsResourceLinkedAccountList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -56564,13 +67403,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/disputes/{dispute}": + "/v1/linked_accounts/{account}": get: - description: "

Retrieves an Issuing Dispute object.

" - operationId: GetIssuingDisputesDispute + description: "

Retrieves the details of an Financial Connections Account.

" + operationId: GetLinkedAccountsAccount parameters: - in: path - name: dispute + name: account required: true schema: maxLength: 5000 @@ -56601,7 +67440,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.dispute" + "$ref": "#/components/schemas/financial_connections.account" description: Successful response. default: content: @@ -56609,15 +67448,15 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/linked_accounts/{account}/disconnect": post: - description: "

Updates the specified Issuing Dispute object by - setting the values of the parameters passed. Any parameters not provided will - be left unchanged. Properties on the evidence object can be unset - by passing in an empty string.

" - operationId: PostIssuingDisputesDispute + description: "

Disables your access to a Financial Connections Account. + You will no longer be able to access data associated with the account (e.g. + balances, transactions).

" + operationId: PostLinkedAccountsAccountDisconnect parameters: - in: path - name: dispute + name: account required: true schema: maxLength: 5000 @@ -56627,303 +67466,18 @@ paths: content: application/x-www-form-urlencoded: encoding: - evidence: - explode: true - style: deepObject expand: explode: true style: deepObject - metadata: - explode: true - style: deepObject schema: additionalProperties: false properties: - evidence: - description: Evidence provided for the dispute. - properties: - canceled: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - canceled_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - cancellation_policy_provided: - anyOf: - - type: boolean - - enum: - - '' - type: string - cancellation_reason: - maxLength: 1500 - type: string - expected_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - return_status: - enum: - - '' - - merchant_rejected - - successful - type: string - returned_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: canceled - type: object - - enum: - - '' - type: string - duplicate: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - card_statement: - anyOf: - - type: string - - enum: - - '' - type: string - cash_receipt: - anyOf: - - type: string - - enum: - - '' - type: string - check_image: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - original_transaction: - maxLength: 5000 - type: string - title: duplicate - type: object - - enum: - - '' - type: string - fraudulent: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - title: fraudulent - type: object - - enum: - - '' - type: string - merchandise_not_as_described: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - received_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - return_description: - maxLength: 1500 - type: string - return_status: - enum: - - '' - - merchant_rejected - - successful - type: string - returned_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: merchandise_not_as_described - type: object - - enum: - - '' - type: string - not_received: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - expected_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - title: not_received - type: object - - enum: - - '' - type: string - other: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - explanation: - maxLength: 1500 - type: string - product_description: - maxLength: 1500 - type: string - product_type: - enum: - - '' - - merchandise - - service - type: string - title: other - type: object - - enum: - - '' - type: string - reason: - enum: - - canceled - - duplicate - - fraudulent - - merchandise_not_as_described - - not_received - - other - - service_not_as_described - type: string - x-stripeBypassValidation: true - service_not_as_described: - anyOf: - - properties: - additional_documentation: - anyOf: - - type: string - - enum: - - '' - type: string - canceled_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - cancellation_reason: - maxLength: 1500 - type: string - explanation: - maxLength: 1500 - type: string - received_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - title: service_not_as_described - type: object - - enum: - - '' - type: string - title: evidence_param - type: object expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. type: object required: false responses: @@ -56931,7 +67485,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.dispute" + "$ref": "#/components/schemas/financial_connections.account" description: Successful response. default: content: @@ -56939,16 +67493,128 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/disputes/{dispute}/submit": + "/v1/linked_accounts/{account}/owners": + get: + description: "

Lists all owners for a given Account

" + operationId: GetLinkedAccountsAccountOwners + parameters: + - in: path + name: account + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The ID of the ownership object to fetch owners from. + in: query + name: ownership + required: true + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/financial_connections.account_owner" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: BankConnectionsResourceOwnerList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/linked_accounts/{account}/refresh": post: - description:

Submits an Issuing Dispute to the card network. - Stripe validates that all evidence fields required for the dispute’s reason - are present. For more details, see Dispute - reasons and evidence.

- operationId: PostIssuingDisputesDisputeSubmit + description: "

Refreshes the data associated with a Financial Connections + Account.

" + operationId: PostLinkedAccountsAccountRefresh parameters: - in: path - name: dispute + name: account required: true schema: maxLength: 5000 @@ -56961,31 +67627,74 @@ paths: expand: explode: true style: deepObject - metadata: + features: explode: true style: deepObject schema: additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + features: + description: The list of account features that you would like to + refresh. + items: + enum: + - balance + - ownership + type: string + x-stripeBypassValidation: true + type: array + required: + - features + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/financial_connections.account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/mandates/{mandate}": + get: + description: "

Retrieves a Mandate object.

" + operationId: GetMandatesMandate + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: mandate + required: true + schema: + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} type: object required: false responses: @@ -56993,7 +67702,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.dispute" + "$ref": "#/components/schemas/mandate" description: Successful response. default: content: @@ -57001,34 +67710,20 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/settlements": + "/v1/orders": get: - description: "

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.

" - operationId: GetIssuingSettlements + description: "

Returns a list of your orders. The orders are returned sorted + by creation date, with the most recently created orders appearing first.

" + operationId: GetOrders parameters: - - description: Only return issuing settlements that were created during the - given date interval. - explode: true + - description: Only return orders for the given customer. in: query - name: created + name: customer required: false schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject + maxLength: 5000 + type: string + style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -57038,7 +67733,6 @@ paths: name: ending_before required: false schema: - maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -57069,7 +67763,6 @@ paths: name: starting_after required: false schema: - maxLength: 5000 type: string style: form requestBody: @@ -57080,41 +67773,943 @@ paths: additionalProperties: false properties: {} type: object - required: false + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/order" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/orders" + type: string + required: + - data + - has_more + - object + - url + title: OrdersV2ResourceOrderList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new open order object.

" + operationId: PostOrders + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + automatic_tax: + explode: true + style: deepObject + billing_details: + explode: true + style: deepObject + client_permissions: + explode: true + style: deepObject + discounts: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + line_items: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + payment: + explode: true + style: deepObject + shipping_cost: + explode: true + style: deepObject + shipping_details: + explode: true + style: deepObject + tax_details: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + automatic_tax: + description: Settings for automatic tax calculation for this order. + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax + type: object + billing_details: + anyOf: + - properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: validated_optional_fields_address + type: object + email: + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 20 + type: string + title: billing_details + type: object + - enum: + - '' + type: string + description: Billing details for the customer. If a customer is + provided, this will be automatically populated with values from + that customer if override values are not provided. + client_permissions: + description: The fields on the order that are allowed to be updated + from your frontend application with a publishable key and order + client secret. + properties: + billing_details: + enum: + - allow + - disallow + type: string + promotion_codes: + enum: + - allow + - disallow + type: string + shipping_details: + enum: + - allow + - disallow + type: string + title: client_permissions + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: The customer associated with this order. + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + discounts: + anyOf: + - items: + properties: + coupon: + maxLength: 5000 + type: string + discount: + maxLength: 5000 + type: string + promotion_code: + maxLength: 5000 + type: string + title: discounts_data_param + type: object + type: array + - enum: + - '' + type: string + description: The coupons, promotion codes, and/or discounts to apply + to the order. + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + ip_address: + description: The IP address of the purchaser for this order. + type: string + line_items: + description: A list of line items the customer is ordering. Each + line item includes information about the product, the quantity, + and the resulting cost. + items: + properties: + description: + maxLength: 5000 + type: string + discounts: + anyOf: + - items: + properties: + coupon: + maxLength: 5000 + type: string + discount: + maxLength: 5000 + type: string + title: discounts_data_param + type: object + type: array + - enum: + - '' + type: string + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + title: price_data_with_optional_product + type: object + product: + maxLength: 5000 + type: string + product_data: + properties: + description: + maxLength: 40000 + type: string + id: + maxLength: 5000 + type: string + images: + anyOf: + - items: + type: string + type: array + - enum: + - '' + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + name: + maxLength: 5000 + type: string + package_dimensions: + anyOf: + - properties: + height: + type: number + length: + type: number + weight: + type: number + width: + type: number + required: + - height + - length + - weight + - width + title: package_dimensions_specs + type: object + - enum: + - '' + type: string + shippable: + type: boolean + tax_code: + maxLength: 5000 + type: string + url: + anyOf: + - type: string + - enum: + - '' + type: string + required: + - id + - name + title: product_upsert_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: create_params + type: object + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + payment: + description: Payment information associated with the order, including + payment settings. + properties: + settings: + properties: + application_fee_amount: + type: integer + payment_method_options: + properties: + acss_debit: + properties: + mandate_options: + properties: + custom_mandate_url: + anyOf: + - type: string + - enum: + - '' + type: string + interval_description: + maxLength: 500 + type: string + payment_schedule: + enum: + - combined + - interval + - sporadic + type: string + transaction_type: + enum: + - business + - personal + type: string + title: payment_intent_payment_method_options_mandate_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_param + type: object + afterpay_clearpay: + properties: + capture_method: + enum: + - automatic + - manual + type: string + reference: + maxLength: 128 + type: string + setup_future_usage: + enum: + - none + type: string + title: afterpay_clearpay_payment_method_options_param + type: object + alipay: + properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + bancontact: + properties: + preferred_language: + enum: + - de + - en + - fr + - nl + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + card: + properties: + capture_method: + enum: + - automatic + - manual + type: string + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + title: card_payment_method_options + type: object + customer_balance: + properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + ideal: + properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + klarna: + properties: + capture_method: + enum: + - '' + - manual + type: string + preferred_locale: + enum: + - da-DK + - de-AT + - de-CH + - de-DE + - en-AT + - en-AU + - en-BE + - en-CA + - en-CH + - en-DE + - en-DK + - en-ES + - en-FI + - en-FR + - en-GB + - en-IE + - en-IT + - en-NL + - en-NO + - en-NZ + - en-PL + - en-PT + - en-SE + - en-US + - es-ES + - es-US + - fi-FI + - fr-BE + - fr-CA + - fr-CH + - fr-FR + - it-CH + - it-IT + - nb-NO + - nl-BE + - nl-NL + - pl-PL + - pt-PT + - sv-FI + - sv-SE + type: string + x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + link: + properties: + capture_method: + enum: + - '' + - manual + type: string + persistent_token: + maxLength: 5000 + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_intent_payment_method_options_param + type: object + oxxo: + properties: + expires_after_days: + type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + p24: + properties: + setup_future_usage: + enum: + - none + type: string + tos_shown_and_accepted: + type: boolean + title: payment_method_options_param + type: object + sepa_debit: + properties: + mandate_options: + properties: {} + title: payment_method_options_mandate_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + title: payment_intent_payment_method_options_param + type: object + sofort: + properties: + preferred_language: + enum: + - '' + - de + - en + - es + - fr + - it + - nl + - pl + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + wechat_pay: + properties: + app_id: + maxLength: 5000 + type: string + client: + enum: + - android + - ios + - web + type: string + x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string + required: + - client + title: payment_method_options_param + type: object + title: create_params + type: object + payment_method_types: + items: + enum: + - acss_debit + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - card + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - link + - oxxo + - p24 + - sepa_debit + - sofort + - wechat_pay + type: string + x-stripeBypassValidation: true + type: array + return_url: + type: string + statement_descriptor: + maxLength: 22 + type: string + statement_descriptor_suffix: + maxLength: 22 + type: string + transfer_data: + properties: + amount: + type: integer + destination: + type: string + required: + - destination + title: transfer_data + type: object + title: create_params + type: object + required: + - settings + title: create_params + type: object + shipping_cost: + anyOf: + - properties: + shipping_rate: + maxLength: 5000 + type: string + shipping_rate_data: + properties: + delivery_estimate: + properties: + maximum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + minimum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + title: delivery_estimate + type: object + display_name: + maxLength: 100 + type: string + fixed_amount: + properties: + amount: + type: integer + currency: + type: string + currency_options: + additionalProperties: + properties: + amount: + type: integer + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + required: + - amount + title: currency_option + type: object + type: object + required: + - amount + - currency + title: fixed_amount + type: object + metadata: + additionalProperties: + type: string + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + tax_code: + type: string + type: + enum: + - fixed_amount + type: string + required: + - display_name + title: method_params + type: object + title: shipping_cost + type: object + - enum: + - '' + type: string + description: Settings for the customer cost of shipping for this + order. + shipping_details: + anyOf: + - properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: validated_optional_fields_address + type: object + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + required: + - address + - name + title: shipping_details + type: object + - enum: + - '' + type: string + description: Shipping details for the order. + tax_details: + description: Additional tax details about the purchaser to be used + for this order. + properties: + tax_exempt: + enum: + - '' + - exempt + - none + - reverse + type: string + tax_ids: + items: + properties: + type: + enum: + - ae_trn + - au_abn + - au_arn + - bg_uic + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - es_cif + - eu_oss_vat + - eu_vat + - gb_vat + - ge_vat + - hk_br + - hu_tin + - id_npwp + - il_vat + - in_gst + - is_vat + - jp_cn + - jp_rn + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - nz_gst + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - th_vat + - tw_vat + - ua_vat + - us_ein + - za_vat + maxLength: 5000 + type: string + x-stripeBypassValidation: true + value: + type: string + required: + - type + - value + title: data_params + type: object + type: array + title: tax_details + type: object + required: + - currency + - line_items + type: object + required: true responses: '200': content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.settlement" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/settlements" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/order" description: Successful response. default: content: @@ -57122,10 +68717,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/issuing/settlements/{settlement}": + "/v1/orders/{id}": get: - description: "

Retrieves an Issuing Settlement object.

" - operationId: GetIssuingSettlementsSettlement + description: "

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.

" + operationId: GetOrdersId parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -57139,7 +68736,7 @@ paths: type: array style: deepObject - in: path - name: settlement + name: id required: true schema: maxLength: 5000 @@ -57159,7 +68756,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.settlement" + "$ref": "#/components/schemas/order" description: Successful response. default: content: @@ -57168,13 +68765,12 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates the specified Issuing Settlement object - by setting the values of the parameters passed. Any parameters not provided - will be left unchanged.

" - operationId: PostIssuingSettlementsSettlement + description: "

Updates the specific order by setting the values of the parameters + passed. Any parameters not provided will be left unchanged.

" + operationId: PostOrdersId parameters: - in: path - name: settlement + name: id required: true schema: maxLength: 5000 @@ -57184,270 +68780,289 @@ paths: content: application/x-www-form-urlencoded: encoding: - expand: + automatic_tax: explode: true style: deepObject - metadata: + billing_details: + explode: true + style: deepObject + client_permissions: + explode: true + style: deepObject + discounts: explode: true style: deepObject - schema: - additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.settlement" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/transactions": - get: - description: "

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.

" - operationId: GetIssuingTransactions - parameters: - - description: Only return transactions that belong to the given card. - in: query - name: card - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return transactions that belong to the given cardholder. - in: query - name: cardholder - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return transactions that were created during the given date - interval. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Only return transactions that have the given type. One of `capture` - or `refund`. - in: query - name: type - required: false - schema: - enum: - - capture - - refund - type: string - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/issuing.transaction" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/issuing/transactions" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/issuing/transactions/{transaction}": - get: - description: "

Retrieves an Issuing Transaction object.

" - operationId: GetIssuingTransactionsTransaction - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: transaction - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/issuing.transaction" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Updates the specified Issuing Transaction object - by setting the values of the parameters passed. Any parameters not provided - will be left unchanged.

" - operationId: PostIssuingTransactionsTransaction - parameters: - - in: path - name: transaction - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: expand: explode: true style: deepObject + line_items: + explode: true + style: deepObject metadata: explode: true style: deepObject + payment: + explode: true + style: deepObject + shipping_cost: + explode: true + style: deepObject + shipping_details: + explode: true + style: deepObject + tax_details: + explode: true + style: deepObject schema: additionalProperties: false properties: + automatic_tax: + description: Settings for automatic tax calculation for this order. + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax + type: object + billing_details: + anyOf: + - properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: validated_optional_fields_address + type: object + email: + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 20 + type: string + title: billing_details + type: object + - enum: + - '' + type: string + description: Billing details for the customer. If a customer is + provided, this will be automatically populated with values from + that customer if override values are not provided. + client_permissions: + description: The fields on the order that are allowed to be updated + from your frontend application with a publishable key and order + client secret. + properties: + billing_details: + enum: + - allow + - disallow + type: string + promotion_codes: + enum: + - allow + - disallow + type: string + shipping_details: + enum: + - allow + - disallow + type: string + title: client_permissions + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: The customer associated with this order. + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + discounts: + anyOf: + - items: + properties: + coupon: + maxLength: 5000 + type: string + discount: + maxLength: 5000 + type: string + promotion_code: + maxLength: 5000 + type: string + title: discounts_data_param + type: object + type: array + - enum: + - '' + type: string + description: The coupons, promotion codes, and/or discounts to apply + to the order. Pass the empty string `""` to unset this field. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + ip_address: + description: The IP address of the purchaser for this order. + type: string + line_items: + description: A list of line items the customer is ordering. Each + line item includes information about the product, the quantity, + and the resulting cost. + items: + properties: + description: + maxLength: 5000 + type: string + discounts: + anyOf: + - items: + properties: + coupon: + maxLength: 5000 + type: string + discount: + maxLength: 5000 + type: string + title: discounts_data_param + type: object + type: array + - enum: + - '' + type: string + id: + maxLength: 5000 + type: string + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + title: price_data_with_optional_product + type: object + product: + maxLength: 5000 + type: string + product_data: + properties: + description: + maxLength: 40000 + type: string + id: + maxLength: 5000 + type: string + images: + anyOf: + - items: + type: string + type: array + - enum: + - '' + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + name: + maxLength: 5000 + type: string + package_dimensions: + anyOf: + - properties: + height: + type: number + length: + type: number + weight: + type: number + width: + type: number + required: + - height + - length + - weight + - width + title: package_dimensions_specs + type: object + - enum: + - '' + type: string + shippable: + type: boolean + tax_code: + maxLength: 5000 + type: string + url: + anyOf: + - type: string + - enum: + - '' + type: string + required: + - id + - name + title: product_upsert_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: update_params + type: object + type: array metadata: anyOf: - additionalProperties: @@ -57461,6 +69076,661 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + payment: + description: Payment information associated with the order, including + payment settings. + properties: + settings: + properties: + application_fee_amount: + anyOf: + - type: integer + - enum: + - '' + type: string + payment_method_options: + properties: + acss_debit: + anyOf: + - properties: + mandate_options: + properties: + custom_mandate_url: + anyOf: + - type: string + - enum: + - '' + type: string + interval_description: + maxLength: 500 + type: string + payment_schedule: + enum: + - combined + - interval + - sporadic + type: string + transaction_type: + enum: + - business + - personal + type: string + title: payment_intent_payment_method_options_mandate_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string + afterpay_clearpay: + anyOf: + - properties: + capture_method: + enum: + - automatic + - manual + type: string + reference: + maxLength: 128 + type: string + setup_future_usage: + enum: + - none + type: string + title: afterpay_clearpay_payment_method_options_param + type: object + - enum: + - '' + type: string + alipay: + anyOf: + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + bancontact: + anyOf: + - properties: + preferred_language: + enum: + - de + - en + - fr + - nl + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + card: + anyOf: + - properties: + capture_method: + enum: + - automatic + - manual + type: string + setup_future_usage: + enum: + - none + - off_session + - on_session + type: string + title: card_payment_method_options + type: object + - enum: + - '' + type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string + ideal: + anyOf: + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + klarna: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + preferred_locale: + enum: + - da-DK + - de-AT + - de-CH + - de-DE + - en-AT + - en-AU + - en-BE + - en-CA + - en-CH + - en-DE + - en-DK + - en-ES + - en-FI + - en-FR + - en-GB + - en-IE + - en-IT + - en-NL + - en-NO + - en-NZ + - en-PL + - en-PT + - en-SE + - en-US + - es-ES + - es-US + - fi-FI + - fr-BE + - fr-CA + - fr-CH + - fr-FR + - it-CH + - it-IT + - nb-NO + - nl-BE + - nl-NL + - pl-PL + - pt-PT + - sv-FI + - sv-SE + type: string + x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + link: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + persistent_token: + maxLength: 5000 + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string + oxxo: + anyOf: + - properties: + expires_after_days: + type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + p24: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + tos_shown_and_accepted: + type: boolean + title: payment_method_options_param + type: object + - enum: + - '' + type: string + sepa_debit: + anyOf: + - properties: + mandate_options: + properties: {} + title: payment_method_options_mandate_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string + sofort: + anyOf: + - properties: + preferred_language: + enum: + - '' + - de + - en + - es + - fr + - it + - nl + - pl + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + wechat_pay: + anyOf: + - properties: + app_id: + maxLength: 5000 + type: string + client: + enum: + - android + - ios + - web + type: string + x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string + required: + - client + title: payment_method_options_param + type: object + - enum: + - '' + type: string + title: update_params + type: object + payment_method_types: + items: + enum: + - acss_debit + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - card + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - link + - oxxo + - p24 + - sepa_debit + - sofort + - wechat_pay + type: string + x-stripeBypassValidation: true + type: array + return_url: + anyOf: + - type: string + - enum: + - '' + type: string + statement_descriptor: + maxLength: 22 + type: string + statement_descriptor_suffix: + maxLength: 22 + type: string + transfer_data: + anyOf: + - properties: + amount: + type: integer + destination: + type: string + required: + - destination + title: transfer_data + type: object + - enum: + - '' + type: string + title: update_params + type: object + required: + - settings + title: update_params + type: object + shipping_cost: + anyOf: + - properties: + shipping_rate: + maxLength: 5000 + type: string + shipping_rate_data: + properties: + delivery_estimate: + properties: + maximum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + minimum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + title: delivery_estimate + type: object + display_name: + maxLength: 100 + type: string + fixed_amount: + properties: + amount: + type: integer + currency: + type: string + currency_options: + additionalProperties: + properties: + amount: + type: integer + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + required: + - amount + title: currency_option + type: object + type: object + required: + - amount + - currency + title: fixed_amount + type: object + metadata: + additionalProperties: + type: string + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + tax_code: + type: string + type: + enum: + - fixed_amount + type: string + required: + - display_name + title: method_params + type: object + title: shipping_cost + type: object + - enum: + - '' + type: string + description: Settings for the customer cost of shipping for this + order. + shipping_details: + anyOf: + - properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: validated_optional_fields_address + type: object + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + required: + - address + - name + title: shipping_details + type: object + - enum: + - '' + type: string + description: Shipping details for the order. + tax_details: + description: Additional tax details about the purchaser to be used + for this order. + properties: + tax_exempt: + enum: + - '' + - exempt + - none + - reverse + type: string + tax_ids: + items: + properties: + type: + enum: + - ae_trn + - au_abn + - au_arn + - bg_uic + - br_cnpj + - br_cpf + - ca_bn + - ca_gst_hst + - ca_pst_bc + - ca_pst_mb + - ca_pst_sk + - ca_qst + - ch_vat + - cl_tin + - es_cif + - eu_oss_vat + - eu_vat + - gb_vat + - ge_vat + - hk_br + - hu_tin + - id_npwp + - il_vat + - in_gst + - is_vat + - jp_cn + - jp_rn + - kr_brn + - li_uid + - mx_rfc + - my_frp + - my_itn + - my_sst + - no_vat + - nz_gst + - ru_inn + - ru_kpp + - sa_vat + - sg_gst + - sg_uen + - si_tin + - th_vat + - tw_vat + - ua_vat + - us_ein + - za_vat + maxLength: 5000 + type: string + x-stripeBypassValidation: true + value: + type: string + required: + - type + - value + title: data_params + type: object + type: array + title: tax_details + type: object type: object required: false responses: @@ -57468,178 +69738,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/issuing.transaction" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/mandates/{mandate}": - get: - description: "

Retrieves a Mandate object.

" - operationId: GetMandatesMandate - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: mandate - required: true - schema: - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/mandate" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/order_returns": - get: - description: "

Returns a list of your order returns. The returns are returned - sorted by creation date, with the most recently created return appearing first.

" - operationId: GetOrderReturns - parameters: - - description: Date this return was created. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: The order to retrieve returns for. - in: query - name: order - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/order_return" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/order_returns" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/order" description: Successful response. default: content: @@ -57647,24 +69746,11 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/order_returns/{id}": - get: - description: "

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.

" - operationId: GetOrderReturnsId + "/v1/orders/{id}/cancel": + post: + description: "

Cancels the order as well as the payment intent if one is attached.

" + operationId: PostOrdersIdCancel parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - in: path name: id required: true @@ -57675,10 +69761,19 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array type: object required: false responses: @@ -57686,7 +69781,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/order_return" + "$ref": "#/components/schemas/order" description: Successful response. default: content: @@ -57694,40 +69789,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/orders": + "/v1/orders/{id}/line_items": get: - description: "

Returns a list of your orders. The orders are returned sorted - by creation date, with the most recently created orders appearing first.

" - operationId: GetOrders + description: "

When retrieving an order, there is an includable line_items + property containing the first handful of those items. There is also a URL + where you can retrieve the full (paginated) list of line items.

" + operationId: GetOrdersIdLineItems parameters: - - description: Date this order was created. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return orders for the given customer. - in: query - name: customer - required: false - schema: - maxLength: 5000 - type: string - style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -57737,6 +69805,7 @@ paths: name: ending_before required: false schema: + maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -57750,17 +69819,13 @@ paths: type: string type: array style: deepObject - - description: Only return orders with the given IDs. - explode: true - in: query - name: ids - required: false + - in: path + name: id + required: true schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject + maxLength: 5000 + type: string + style: simple - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -57777,96 +69842,10 @@ paths: in: query name: starting_after required: false - schema: - type: string - style: form - - description: Only return orders that have the given status. One of `created`, - `paid`, `fulfilled`, or `refunded`. - in: query - name: status - required: false schema: maxLength: 5000 type: string style: form - - description: Filter orders based on when they were paid, fulfilled, canceled, - or returned. - explode: true - in: query - name: status_transitions - required: false - schema: - properties: - canceled: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - fulfilled: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - paid: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - returned: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - title: order_timestamp_specs - type: object - style: deepObject - - description: Only return orders with the given upstream order IDs. - explode: true - in: query - name: upstream_ids - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject requestBody: content: application/x-www-form-urlencoded: @@ -57884,8 +69863,9 @@ paths: description: '' properties: data: + description: Details about each object. items: - "$ref": "#/components/schemas/order" + "$ref": "#/components/schemas/item" type: array has_more: description: True if this list has another page of items after @@ -57900,14 +69880,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/orders" type: string required: - data - has_more - object - url - title: OrdersLegacyResourceOrderList + title: OrdersV2ResourceLineItemList type: object x-expandableFields: - data @@ -57918,198 +69897,10 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/orders/{id}/reopen": post: - description: "

Creates a new order object.

" - operationId: PostOrders - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - items: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - shipping: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - coupon: - description: A coupon code that represents a discount to be applied - to this order. Must be one-time duration and in same currency - as the order. An order can have multiple coupons. - maxLength: 5000 - type: string - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - customer: - description: The ID of an existing customer to use for this order. - If provided, the customer email and shipping address will be used - to create the order. Subsequently, the customer will also be charged - to pay the order. If `email` or `shipping` are also provided, - they will override the values retrieved from the customer object. - maxLength: 5000 - type: string - email: - description: The email address of the customer placing the order. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - items: - description: List of items constituting the order. An order can - have up to 25 items. - items: - properties: - amount: - type: integer - currency: - type: string - description: - maxLength: 1000 - type: string - parent: - maxLength: 5000 - type: string - quantity: - type: integer - type: - enum: - - discount - - shipping - - sku - - tax - maxLength: 5000 - type: string - title: order_item_specs - type: object - type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - shipping: - description: Shipping address for the order. Required if any of - the SKUs are for products that have `shippable` set to true. - properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: optional_fields_address - type: object - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - required: - - address - - name - title: customer_shipping - type: object - required: - - currency - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/order" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/orders/{id}": - get: - description: "

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.

" - operationId: GetOrdersId - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/order" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Updates the specific order by setting the values of the parameters - passed. Any parameters not provided will be left unchanged.

" - operationId: PostOrdersId + description: "

Reopens a submitted order.

" + operationId: PostOrdersIdReopen parameters: - in: path name: id @@ -58125,72 +69916,15 @@ paths: expand: explode: true style: deepObject - metadata: - explode: true - style: deepObject - shipping: - explode: true - style: deepObject schema: additionalProperties: false properties: - coupon: - description: A coupon code that represents a discount to be applied - to this order. Must be one-time duration and in same currency - as the order. An order can have multiple coupons. - maxLength: 5000 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - selected_shipping_method: - description: The shipping method to select for fulfilling this order. - If specified, must be one of the `id`s of a shipping method in - the `shipping_methods` array. If specified, will overwrite the - existing selected shipping method, updating `items` as necessary. - maxLength: 5000 - type: string - shipping: - description: Tracking information once the order has been fulfilled. - properties: - carrier: - maxLength: 5000 - type: string - tracking_number: - maxLength: 5000 - type: string - required: - - carrier - - tracking_number - title: shipping_tracking_params - type: object - status: - description: Current order status. One of `created`, `paid`, `canceled`, - `fulfilled`, or `returned`. More detail in the [Orders Guide](https://stripe.com/docs/orders/guide#understanding-order-statuses). - enum: - - canceled - - created - - fulfilled - - paid - - returned - maxLength: 5000 - type: string type: object required: false responses: @@ -58206,11 +69940,14 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/orders/{id}/pay": + "/v1/orders/{id}/submit": post: - description: "

Pay an order by providing a source to create a - payment.

" - operationId: PostOrdersIdPay + description:

Submitting an Order transitions the status to processing + and creates a PaymentIntent object so the order can be paid. If the Order + has an amount_total of 0, no PaymentIntent object will be created. + Once the order is submitted, its contents cannot be changed, unless the reopen method is called.

+ operationId: PostOrdersIdSubmit parameters: - in: path name: id @@ -58226,142 +69963,31 @@ paths: expand: explode: true style: deepObject - metadata: - explode: true - style: deepObject schema: additionalProperties: false properties: - application_fee: - description: A fee in %s that will be applied to the order and transferred - to the application owner's Stripe account. The request must be - made with an OAuth key or the `Stripe-Account` header in order - to take an application fee. For more information, see the application - fees [documentation](https://stripe.com/docs/connect/direct-charges#collecting-fees). - type: integer - customer: - description: The ID of an existing customer that will be charged - for this order. If no customer was attached to the order at creation, - either `source` or `customer` is required. Otherwise, the specified - customer will be charged instead of the one attached to the order. - maxLength: 5000 - type: string - email: - description: The email address of the customer placing the order. - Required if not previously specified for the order. - maxLength: 5000 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - source: - description: A [Token](https://stripe.com/docs/api#tokens)'s or - a [Source](https://stripe.com/docs/api#sources)'s ID, as returned - by [Elements](https://stripe.com/docs/elements). If no customer - was attached to the order at creation, either `source` or `customer` - is required. Otherwise, the specified source will be charged intead - of the customer attached to the order. - maxLength: 5000 - type: string - x-stripeBypassValidation: true + expected_total: + description: "`expected_total` should always be set to the order's + `amount_total` field. If they don't match, submitting the order + will fail. This helps detect race conditions where something else + concurrently modifies the order." + type: integer + required: + - expected_total type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/order" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/orders/{id}/returns": - post: - description: "

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.

" - operationId: PostOrdersIdReturns - parameters: - - in: path - name: id required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - items: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - items: - anyOf: - - items: - properties: - amount: - type: integer - description: - maxLength: 1000 - type: string - parent: - maxLength: 5000 - type: string - quantity: - type: integer - type: - enum: - - discount - - shipping - - sku - - tax - maxLength: 5000 - type: string - title: return_order_item_specs - type: object - type: array - - enum: - - '' - type: string - description: List of items to return. - type: object - required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/order_return" + "$ref": "#/components/schemas/order" description: Successful response. default: content: @@ -58540,6 +70166,9 @@ paths: payment_method_types: explode: true style: deepObject + radar_options: + explode: true + style: deepObject shipping: explode: true style: deepObject @@ -58728,6 +70357,10 @@ paths: - transit_number title: payment_method_param type: object + affirm: + properties: {} + title: param + type: object afterpay_clearpay: properties: {} title: param @@ -58805,6 +70438,10 @@ paths: type: string title: billing_details_inner_params type: object + blik: + properties: {} + title: param + type: object boleto: properties: tax_id: @@ -58814,6 +70451,10 @@ paths: - tax_id title: param type: object + customer_balance: + properties: {} + title: param + type: object eps: properties: bank: @@ -58828,6 +70469,7 @@ paths: - brull_kallmus_bank_ag - btv_vier_lander_bank - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag - dolomitenbank - easybank_ag - erste_bank_und_sparkassen @@ -58932,6 +70574,14 @@ paths: type: object title: param type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object metadata: additionalProperties: type: string @@ -58973,6 +70623,25 @@ paths: x-stripeBypassValidation: true title: param type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object sepa_debit: properties: iban: @@ -59000,25 +70669,57 @@ paths: type: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object wechat_pay: properties: {} title: param @@ -59057,6 +70758,13 @@ paths: type: string title: payment_intent_payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string verification_method: enum: - automatic @@ -59069,12 +70777,38 @@ paths: - enum: - '' type: string + affirm: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string afterpay_clearpay: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string reference: maxLength: 128 type: string + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -59082,7 +70816,13 @@ paths: type: string alipay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -59090,7 +70830,14 @@ paths: type: string au_becs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -59098,7 +70845,14 @@ paths: type: string bacs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -59114,16 +70868,40 @@ paths: - fr - nl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + blik: + anyOf: + - properties: + code: + maxLength: 5000 + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string boleto: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -59132,6 +70910,11 @@ paths: card: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string cvc_token: maxLength: 5000 type: string @@ -59163,6 +70946,51 @@ paths: type: string title: installments_param type: object + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - interval + - reference + - start_date + title: mandate_options_param + type: object network: enum: - amex @@ -59192,6 +71020,20 @@ paths: - off_session - on_session type: string + statement_descriptor_suffix_kana: + anyOf: + - maxLength: 22 + type: string + - enum: + - '' + type: string + statement_descriptor_suffix_kanji: + anyOf: + - maxLength: 17 + type: string + - enum: + - '' + type: string title: payment_intent_param type: object - enum: @@ -59199,15 +71041,73 @@ paths: type: string card_present: anyOf: - - properties: {} + - properties: + request_extended_authorization: + type: boolean + request_incremental_authorization_support: + type: boolean title: payment_method_options_param type: object - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string eps: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -59215,7 +71115,11 @@ paths: type: string fpx: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -59223,7 +71127,11 @@ paths: type: string giropay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -59231,7 +71139,11 @@ paths: type: string grabpay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -59239,7 +71151,13 @@ paths: type: string ideal: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -59256,13 +71174,22 @@ paths: klarna: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string preferred_locale: enum: - da-DK - de-AT + - de-CH - de-DE - en-AT + - en-AU - en-BE + - en-CA + - en-CH - en-DE - en-DK - en-ES @@ -59273,31 +71200,100 @@ paths: - en-IT - en-NL - en-NO + - en-NZ + - en-PL + - en-PT - en-SE - en-US - es-ES - es-US - fi-FI - fr-BE + - fr-CA + - fr-CH - fr-FR + - it-CH - it-IT - nb-NO - nl-BE - nl-NL + - pl-PL + - pt-PT - sv-FI - sv-SE type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: - '' type: string + konbini: + anyOf: + - properties: + confirmation_number: + maxLength: 11 + type: string + expires_after_days: + anyOf: + - type: integer + - enum: + - '' + type: string + expires_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + product_description: + maxLength: 22 + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + link: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + persistent_token: + maxLength: 5000 + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string oxxo: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -59306,6 +71302,10 @@ paths: p24: anyOf: - properties: + setup_future_usage: + enum: + - none + type: string tos_shown_and_accepted: type: boolean title: payment_method_options_param @@ -59313,6 +71313,47 @@ paths: - enum: - '' type: string + paynow: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + pix: + anyOf: + - properties: + expires_after_seconds: + type: integer + expires_at: + format: unix-time + type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + promptpay: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -59320,6 +71361,13 @@ paths: properties: {} title: payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -59339,11 +71387,68 @@ paths: - nl - pl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string wechat_pay: anyOf: - properties: @@ -59357,6 +71462,10 @@ paths: - web type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string required: - client title: payment_method_options_param @@ -59369,11 +71478,21 @@ paths: payment_method_types: description: The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. If this is not provided, defaults - to ["card"]. + to ["card"]. Use automatic_payment_methods to manage payment methods + from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). items: maxLength: 5000 type: string type: array + radar_options: + description: Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) + for more information. + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object receipt_email: description: Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment @@ -59494,6 +71613,108 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/payment_intents/search": + get: + description: |- +

Search for PaymentIntents you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetPaymentIntentsSearch + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + in: query + name: query + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/payment_intent" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/payment_intents/{intent}": get: description: |- @@ -59627,6 +71848,13 @@ paths: fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - automatic + - manual + type: string currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). @@ -59693,6 +71921,10 @@ paths: - transit_number title: payment_method_param type: object + affirm: + properties: {} + title: param + type: object afterpay_clearpay: properties: {} title: param @@ -59770,6 +72002,10 @@ paths: type: string title: billing_details_inner_params type: object + blik: + properties: {} + title: param + type: object boleto: properties: tax_id: @@ -59779,6 +72015,10 @@ paths: - tax_id title: param type: object + customer_balance: + properties: {} + title: param + type: object eps: properties: bank: @@ -59793,6 +72033,7 @@ paths: - brull_kallmus_bank_ag - btv_vier_lander_bank - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag - dolomitenbank - easybank_ag - erste_bank_und_sparkassen @@ -59897,6 +72138,14 @@ paths: type: object title: param type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object metadata: additionalProperties: type: string @@ -59938,6 +72187,25 @@ paths: x-stripeBypassValidation: true title: param type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object sepa_debit: properties: iban: @@ -59965,25 +72233,57 @@ paths: type: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object wechat_pay: properties: {} title: param @@ -60022,6 +72322,13 @@ paths: type: string title: payment_intent_payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string verification_method: enum: - automatic @@ -60034,12 +72341,38 @@ paths: - enum: - '' type: string + affirm: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string afterpay_clearpay: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string reference: maxLength: 128 type: string + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -60047,7 +72380,13 @@ paths: type: string alipay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -60055,7 +72394,14 @@ paths: type: string au_becs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -60063,7 +72409,14 @@ paths: type: string bacs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -60079,16 +72432,40 @@ paths: - fr - nl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + blik: + anyOf: + - properties: + code: + maxLength: 5000 + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string boleto: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -60097,6 +72474,11 @@ paths: card: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string cvc_token: maxLength: 5000 type: string @@ -60128,6 +72510,51 @@ paths: type: string title: installments_param type: object + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - interval + - reference + - start_date + title: mandate_options_param + type: object network: enum: - amex @@ -60157,6 +72584,20 @@ paths: - off_session - on_session type: string + statement_descriptor_suffix_kana: + anyOf: + - maxLength: 22 + type: string + - enum: + - '' + type: string + statement_descriptor_suffix_kanji: + anyOf: + - maxLength: 17 + type: string + - enum: + - '' + type: string title: payment_intent_param type: object - enum: @@ -60164,15 +72605,73 @@ paths: type: string card_present: anyOf: - - properties: {} + - properties: + request_extended_authorization: + type: boolean + request_incremental_authorization_support: + type: boolean title: payment_method_options_param type: object - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string eps: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -60180,7 +72679,11 @@ paths: type: string fpx: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -60188,7 +72691,11 @@ paths: type: string giropay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -60196,7 +72703,11 @@ paths: type: string grabpay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -60204,7 +72715,13 @@ paths: type: string ideal: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -60221,13 +72738,22 @@ paths: klarna: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string preferred_locale: enum: - da-DK - de-AT + - de-CH - de-DE - en-AT + - en-AU - en-BE + - en-CA + - en-CH - en-DE - en-DK - en-ES @@ -60238,31 +72764,100 @@ paths: - en-IT - en-NL - en-NO + - en-NZ + - en-PL + - en-PT - en-SE - en-US - es-ES - es-US - fi-FI - fr-BE + - fr-CA + - fr-CH - fr-FR + - it-CH - it-IT - nb-NO - nl-BE - nl-NL + - pl-PL + - pt-PT - sv-FI - sv-SE type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: - '' type: string + konbini: + anyOf: + - properties: + confirmation_number: + maxLength: 11 + type: string + expires_after_days: + anyOf: + - type: integer + - enum: + - '' + type: string + expires_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + product_description: + maxLength: 22 + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + link: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + persistent_token: + maxLength: 5000 + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string oxxo: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -60271,6 +72866,10 @@ paths: p24: anyOf: - properties: + setup_future_usage: + enum: + - none + type: string tos_shown_and_accepted: type: boolean title: payment_method_options_param @@ -60278,6 +72877,47 @@ paths: - enum: - '' type: string + paynow: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + pix: + anyOf: + - properties: + expires_after_seconds: + type: integer + expires_at: + format: unix-time + type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + promptpay: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -60285,6 +72925,13 @@ paths: properties: {} title: payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -60304,11 +72951,68 @@ paths: - nl - pl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string wechat_pay: anyOf: - properties: @@ -60322,6 +73026,10 @@ paths: - web type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string required: - client title: payment_method_options_param @@ -60333,7 +73041,8 @@ paths: type: object payment_method_types: description: The list of payment method types (e.g. card) that this - PaymentIntent is allowed to use. + PaymentIntent is allowed to use. Use automatic_payment_methods + to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). items: maxLength: 5000 type: string @@ -60452,12 +73161,72 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/payment_intents/{intent}/apply_customer_balance": + post: + description: "

Manually reconcile the remaining amount for a customer_balance + PaymentIntent.

" + operationId: PostPaymentIntentsIntentApplyCustomerBalance + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: |- + Amount intended to be applied to this PaymentIntent from the customer’s cash balance. + + 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 maximum amount is the amount of the PaymentIntent. + + When omitted, the amount defaults to the remaining amount requested on the PaymentIntent. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/payment_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/payment_intents/{intent}/cancel": post: description: |-

A PaymentIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action, or processing.

-

Once canceled, no additional charges will be made by the PaymentIntent and any operations on the PaymentIntent will fail with an error. For PaymentIntents with status=’requires_capture’, the remaining amount_capturable will automatically be refunded.

+

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.

+ +

You cannot cancel the PaymentIntent for a Checkout Session. Expire the Checkout Session instead

operationId: PostPaymentIntentsIntentCancel parameters: - in: path @@ -60656,6 +73425,9 @@ paths: payment_method_types: explode: true style: deepObject + radar_options: + explode: true + style: deepObject receipt_email: explode: true style: deepObject @@ -60665,6 +73437,13 @@ paths: schema: additionalProperties: false properties: + capture_method: + description: Controls when the funds will be captured from the customer's + account. + enum: + - automatic + - manual + type: string client_secret: description: The client secret of the PaymentIntent. maxLength: 5000 @@ -60791,6 +73570,10 @@ paths: - transit_number title: payment_method_param type: object + affirm: + properties: {} + title: param + type: object afterpay_clearpay: properties: {} title: param @@ -60868,6 +73651,10 @@ paths: type: string title: billing_details_inner_params type: object + blik: + properties: {} + title: param + type: object boleto: properties: tax_id: @@ -60877,6 +73664,10 @@ paths: - tax_id title: param type: object + customer_balance: + properties: {} + title: param + type: object eps: properties: bank: @@ -60891,6 +73682,7 @@ paths: - brull_kallmus_bank_ag - btv_vier_lander_bank - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag - dolomitenbank - easybank_ag - erste_bank_und_sparkassen @@ -60995,6 +73787,14 @@ paths: type: object title: param type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object metadata: additionalProperties: type: string @@ -61036,6 +73836,25 @@ paths: x-stripeBypassValidation: true title: param type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object sepa_debit: properties: iban: @@ -61063,25 +73882,57 @@ paths: type: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object wechat_pay: properties: {} title: param @@ -61120,6 +73971,13 @@ paths: type: string title: payment_intent_payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string verification_method: enum: - automatic @@ -61132,12 +73990,38 @@ paths: - enum: - '' type: string + affirm: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string afterpay_clearpay: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string reference: maxLength: 128 type: string + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -61145,7 +74029,13 @@ paths: type: string alipay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -61153,7 +74043,14 @@ paths: type: string au_becs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -61161,7 +74058,14 @@ paths: type: string bacs_debit: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -61177,16 +74081,40 @@ paths: - fr - nl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + blik: + anyOf: + - properties: + code: + maxLength: 5000 + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string boleto: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_method_options_param type: object - enum: @@ -61195,6 +74123,11 @@ paths: card: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string cvc_token: maxLength: 5000 type: string @@ -61226,6 +74159,51 @@ paths: type: string title: installments_param type: object + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - interval + - reference + - start_date + title: mandate_options_param + type: object network: enum: - amex @@ -61255,6 +74233,20 @@ paths: - off_session - on_session type: string + statement_descriptor_suffix_kana: + anyOf: + - maxLength: 22 + type: string + - enum: + - '' + type: string + statement_descriptor_suffix_kanji: + anyOf: + - maxLength: 17 + type: string + - enum: + - '' + type: string title: payment_intent_param type: object - enum: @@ -61262,15 +74254,73 @@ paths: type: string card_present: anyOf: - - properties: {} + - properties: + request_extended_authorization: + type: boolean + request_incremental_authorization_support: + type: boolean title: payment_method_options_param type: object - enum: - '' type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_params + type: object + requested_address_types: + items: + enum: + - iban + - sepa + - sort_code + - spei + - zengin + type: string + x-stripeBypassValidation: true + type: array + type: + enum: + - eu_bank_transfer + - gb_bank_transfer + - jp_bank_transfer + - mx_bank_transfer + type: string + x-stripeBypassValidation: true + required: + - type + title: bank_transfer_param + type: object + funding_type: + enum: + - bank_transfer + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string eps: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -61278,7 +74328,11 @@ paths: type: string fpx: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -61286,7 +74340,11 @@ paths: type: string giropay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -61294,7 +74352,11 @@ paths: type: string grabpay: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -61302,7 +74364,13 @@ paths: type: string ideal: anyOf: - - properties: {} + - properties: + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: @@ -61319,13 +74387,22 @@ paths: klarna: anyOf: - properties: + capture_method: + enum: + - '' + - manual + type: string preferred_locale: enum: - da-DK - de-AT + - de-CH - de-DE - en-AT + - en-AU - en-BE + - en-CA + - en-CH - en-DE - en-DK - en-ES @@ -61336,31 +74413,100 @@ paths: - en-IT - en-NL - en-NO + - en-NZ + - en-PL + - en-PT - en-SE - en-US - es-ES - es-US - fi-FI - fr-BE + - fr-CA + - fr-CH - fr-FR + - it-CH - it-IT - nb-NO - nl-BE - nl-NL + - pl-PL + - pt-PT - sv-FI - sv-SE type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: - '' type: string + konbini: + anyOf: + - properties: + confirmation_number: + maxLength: 11 + type: string + expires_after_days: + anyOf: + - type: integer + - enum: + - '' + type: string + expires_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + product_description: + maxLength: 22 + type: string + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + link: + anyOf: + - properties: + capture_method: + enum: + - '' + - manual + type: string + persistent_token: + maxLength: 5000 + type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string oxxo: anyOf: - properties: expires_after_days: type: integer + setup_future_usage: + enum: + - none + type: string title: payment_method_options_param type: object - enum: @@ -61369,6 +74515,10 @@ paths: p24: anyOf: - properties: + setup_future_usage: + enum: + - none + type: string tos_shown_and_accepted: type: boolean title: payment_method_options_param @@ -61376,6 +74526,47 @@ paths: - enum: - '' type: string + paynow: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + pix: + anyOf: + - properties: + expires_after_seconds: + type: integer + expires_at: + format: unix-time + type: integer + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + promptpay: + anyOf: + - properties: + setup_future_usage: + enum: + - none + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string sepa_debit: anyOf: - properties: @@ -61383,6 +74574,13 @@ paths: properties: {} title: payment_method_options_mandate_options_param type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string title: payment_intent_payment_method_options_param type: object - enum: @@ -61402,11 +74600,68 @@ paths: - nl - pl type: string + setup_future_usage: + enum: + - '' + - none + - off_session + type: string title: payment_method_options_param type: object - enum: - '' type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + setup_future_usage: + enum: + - '' + - none + - off_session + - on_session + type: string + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: payment_intent_payment_method_options_param + type: object + - enum: + - '' + type: string wechat_pay: anyOf: - properties: @@ -61420,6 +74675,10 @@ paths: - web type: string x-stripeBypassValidation: true + setup_future_usage: + enum: + - none + type: string required: - client title: payment_method_options_param @@ -61431,11 +74690,21 @@ paths: type: object payment_method_types: description: The list of payment method types (e.g. card) that this - PaymentIntent is allowed to use. + PaymentIntent is allowed to use. Use automatic_payment_methods + to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). items: maxLength: 5000 type: string type: array + radar_options: + description: Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) + for more information. + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object receipt_email: anyOf: - type: string @@ -61531,6 +74800,123 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/payment_intents/{intent}/increment_authorization": + post: + description: |- +

Perform an incremental authorization on an eligible + PaymentIntent. To be eligible, the + PaymentIntent’s status must be requires_capture and + incremental_authorization_supported + must be true.

+ +

Incremental authorizations attempt to increase the authorized amount on + your customer’s card to the new, higher amount provided. As with the + initial authorization, incremental authorizations may be declined. A + single PaymentIntent can call this endpoint multiple times to further + increase the authorized amount.

+ +

If the incremental authorization succeeds, the PaymentIntent object is + returned with the updated + amount. + If the incremental authorization fails, a + card_declined error is returned, and no + fields on the PaymentIntent or Charge are updated. The PaymentIntent + object remains capturable for the previously authorized amount.

+ +

Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + Once captured, a PaymentIntent can no longer be incremented.

+ +

Learn more about incremental authorizations.

+ operationId: PostPaymentIntentsIntentIncrementAuthorization + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + transfer_data: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: The updated total amount you intend to collect from + the cardholder. This amount must be greater than the currently + authorized amount. + type: integer + application_fee_amount: + description: The amount of the application fee (if any) that will + be requested to be applied to the payment and transferred to the + application owner's Stripe account. The amount of the application + fee collected will be capped at the total payment amount. For + more information, see the PaymentIntents [use case for connected + accounts](https://stripe.com/docs/payments/connected-accounts). + type: integer + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 1000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + statement_descriptor: + description: For non-card charges, you can use this value as the + complete description that appears on your customers’ statements. + Must contain at least one letter, maximum 22 characters. + maxLength: 22 + type: string + transfer_data: + description: |- + The parameters used to automatically create a Transfer when the payment is captured. + For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + properties: + amount: + type: integer + title: transfer_data_update_params + type: object + required: + - amount + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/payment_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/payment_intents/{intent}/verify_microdeposits": post: description: "

Verifies microdeposits on a PaymentIntent object.

" @@ -61566,6 +74952,11 @@ paths: description: The client secret of the PaymentIntent. maxLength: 5000 type: string + descriptor_code: + description: A six-character code starting with SM present in the + microdeposit sent to the bank account. + maxLength: 5000 + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -61683,6 +75074,7 @@ paths: - has_more - object - url + title: PaymentLinksResourcePaymentLinkList type: object x-expandableFields: - data @@ -61706,6 +75098,9 @@ paths: automatic_tax: explode: true style: deepObject + consent_collection: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -61715,6 +75110,9 @@ paths: metadata: explode: true style: deepObject + payment_intent_data: + explode: true + style: deepObject payment_method_types: explode: true style: deepObject @@ -61724,9 +75122,15 @@ paths: shipping_address_collection: explode: true style: deepObject + shipping_options: + explode: true + style: deepObject subscription_data: explode: true style: deepObject + tax_id_collection: + explode: true + style: deepObject transfer_data: explode: true style: deepObject @@ -61793,6 +75197,33 @@ paths: - auto - required type: string + consent_collection: + description: Configure fields to gather active consent from customers. + properties: + promotions: + enum: + - auto + - none + type: string + terms_of_service: + enum: + - none + - required + type: string + title: consent_collection_params + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) + and supported by each line item's price. + type: string + customer_creation: + description: Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) + created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + enum: + - always + - if_required + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -61843,16 +75274,67 @@ paths: on_behalf_of: description: The account on behalf of which to charge. type: string + payment_intent_data: + description: A subset of parameters to be passed to PaymentIntent + creation for Checkout Sessions in `payment` mode. + properties: + capture_method: + enum: + - automatic + - manual + type: string + setup_future_usage: + enum: + - off_session + - on_session + type: string + title: payment_intent_data_params + type: object + payment_method_collection: + description: |- + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + enum: + - always + - if_required + type: string payment_method_types: description: The list of payment method types that customers can - use. Only `card` is supported. If no value is passed, Stripe will - dynamically show relevant payment methods from your [payment method - settings](https://dashboard.stripe.com/settings/payment_methods) + use. If no value is passed, Stripe will dynamically show relevant + payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). items: enum: + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto - card + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay type: string + x-stripeBypassValidation: true type: array phone_number_collection: description: |- @@ -62116,15 +75598,50 @@ paths: - allowed_countries title: shipping_address_collection_params type: object + shipping_options: + description: The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) + created by this payment link. + items: + properties: + shipping_rate: + maxLength: 5000 + type: string + title: shipping_option_params + type: object + type: array + submit_type: + description: 'Describes the type of transaction being performed + in order to customize relevant text on the page, such as the submit + button. Changing this value will also affect the hostname in the + [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) + property (example: `donate.stripe.com`).' + enum: + - auto + - book + - donate + - pay + type: string subscription_data: description: When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. properties: + description: + maxLength: 500 + type: string trial_period_days: type: integer title: subscription_data_params type: object + tax_id_collection: + description: Controls tax ID collection during checkout. + properties: + enabled: + type: boolean + required: + - enabled + title: tax_id_collection_params + type: object transfer_data: description: The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be @@ -62138,8 +75655,10 @@ paths: - destination title: transfer_data_params type: object + required: + - line_items type: object - required: false + required: true responses: '200': content: @@ -62289,6 +75808,13 @@ paths: - auto - required type: string + customer_creation: + description: Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) + created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + enum: + - always + - if_required + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -62335,19 +75861,55 @@ paths: be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. type: object + payment_method_collection: + description: |- + Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + + Can only be set in `subscription` mode. + + If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + enum: + - always + - if_required + type: string payment_method_types: anyOf: - items: enum: + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto - card + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay type: string + x-stripeBypassValidation: true type: array - enum: - '' type: string description: The list of payment method types that customers can - use. Only `card` is supported. Pass an empty string to enable - automatic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + use. Pass an empty string to enable automatic payment methods + that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). shipping_address_collection: anyOf: - properties: @@ -62727,13 +76289,12 @@ paths: description: Error response. "/v1/payment_methods": get: - description:

Returns a list of PaymentMethods. For listing a customer’s payment - methods, you should use List + description:

Returns a list of PaymentMethods attached to the StripeAccount. + For listing a customer’s payment methods, you should use List a Customer’s PaymentMethods

operationId: GetPaymentMethods parameters: - description: The ID of the customer whose PaymentMethods will be retrieved. - If not provided, the response list will be empty. in: query name: customer required: false @@ -62789,23 +76350,32 @@ paths: schema: enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto - card + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true @@ -62874,6 +76444,9 @@ paths: acss_debit: explode: true style: deepObject + affirm: + explode: true + style: deepObject afterpay_clearpay: explode: true style: deepObject @@ -62892,12 +76465,18 @@ paths: billing_details: explode: true style: deepObject + blik: + explode: true + style: deepObject boleto: explode: true style: deepObject card: explode: true style: deepObject + customer_balance: + explode: true + style: deepObject eps: explode: true style: deepObject @@ -62922,6 +76501,12 @@ paths: klarna: explode: true style: deepObject + konbini: + explode: true + style: deepObject + link: + explode: true + style: deepObject metadata: explode: true style: deepObject @@ -62931,12 +76516,27 @@ paths: p24: explode: true style: deepObject + paynow: + explode: true + style: deepObject + pix: + explode: true + style: deepObject + promptpay: + explode: true + style: deepObject + radar_options: + explode: true + style: deepObject sepa_debit: explode: true style: deepObject sofort: explode: true style: deepObject + us_bank_account: + explode: true + style: deepObject wechat_pay: explode: true style: deepObject @@ -62962,6 +76562,12 @@ paths: - transit_number title: payment_method_param type: object + affirm: + description: If this is an `affirm` PaymentMethod, this hash contains + details about the Affirm payment method. + properties: {} + title: param + type: object afterpay_clearpay: description: If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. @@ -63051,6 +76657,12 @@ paths: type: string title: billing_details_inner_params type: object + blik: + description: If this is a `blik` PaymentMethod, this hash contains + details about the BLIK payment method. + properties: {} + title: param + type: object boleto: description: If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. @@ -63103,6 +76715,12 @@ paths: attached. maxLength: 5000 type: string + customer_balance: + description: If this is a `customer_balance` PaymentMethod, this + hash contains details about the CustomerBalance payment method. + properties: {} + title: param + type: object eps: description: If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. @@ -63119,6 +76737,7 @@ paths: - brull_kallmus_bank_ag - btv_vier_lander_bank - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag - dolomitenbank - easybank_ag - erste_bank_und_sparkassen @@ -63241,6 +76860,18 @@ paths: type: object title: param type: object + konbini: + description: If this is a `konbini` PaymentMethod, this hash contains + details about the Konbini payment method. + properties: {} + title: param + type: object + link: + description: If this is an `Link` PaymentMethod, this hash contains + details about the Link payment method. + properties: {} + title: param + type: object metadata: additionalProperties: type: string @@ -63295,6 +76926,33 @@ paths: description: The PaymentMethod to share. maxLength: 5000 type: string + paynow: + description: If this is a `paynow` PaymentMethod, this hash contains + details about the PayNow payment method. + properties: {} + title: param + type: object + pix: + description: If this is a `pix` PaymentMethod, this hash contains + details about the Pix payment method. + properties: {} + title: param + type: object + promptpay: + description: If this is a `promptpay` PaymentMethod, this hash contains + details about the PromptPay payment method. + properties: {} + title: param + type: object + radar_options: + description: Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) + for more information. + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object sepa_debit: description: If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. @@ -63330,26 +76988,60 @@ paths: type. enum: - acss_debit + - affirm - afterpay_clearpay - alipay - au_becs_debit - bacs_debit - bancontact + - blik - boleto - card + - customer_balance - eps - fpx - giropay - grabpay - ideal - klarna + - konbini + - link - oxxo - p24 + - paynow + - pix + - promptpay - sepa_debit - sofort + - us_bank_account - wechat_pay type: string x-stripeBypassValidation: true + us_bank_account: + description: If this is an `us_bank_account` PaymentMethod, this + hash contains details about the US bank account payment method. + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object wechat_pay: description: If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. @@ -63373,7 +77065,9 @@ paths: description: Error response. "/v1/payment_methods/{payment_method}": get: - description: "

Retrieves a PaymentMethod object.

" + description:

Retrieves a PaymentMethod object attached to the StripeAccount. + To retrieve a payment method attached to a Customer, you should use Retrieve + a Customer’s PaymentMethods

operationId: GetPaymentMethodsPaymentMethod parameters: - description: Specifies which fields in the response should be expanded. @@ -63441,9 +77135,15 @@ paths: expand: explode: true style: deepObject + link: + explode: true + style: deepObject metadata: explode: true style: deepObject + us_bank_account: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -63507,6 +77207,12 @@ paths: maxLength: 5000 type: string type: array + link: + description: If this is an `Link` PaymentMethod, this hash contains + details about the Link payment method. + properties: {} + title: param + type: object metadata: anyOf: - additionalProperties: @@ -63520,6 +77226,17 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + us_bank_account: + description: If this is an `us_bank_account` PaymentMethod, this + hash contains details about the US bank account payment method. + properties: + account_holder_type: + enum: + - company + - individual + type: string + title: update_param + type: object type: object required: false responses: @@ -63542,9 +77259,11 @@ paths:

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.

+ These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + future use, which makes later declines and payment friction more likely. + 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, @@ -63597,7 +77316,8 @@ paths: description: Error response. "/v1/payment_methods/{payment_method}/detach": post: - description: "

Detaches a PaymentMethod object from a Customer.

" + description: "

Detaches a PaymentMethod object from a Customer. After a PaymentMethod + is detached, it can no longer be used for a payment or re-attached to a Customer.

" operationId: PostPaymentMethodsPaymentMethodDetach parameters: - in: path @@ -64291,8 +78011,9 @@ paths: - sum type: string amount: - description: A positive integer in %s (or 0 for a free plan) representing - how much to charge on a recurring basis. + description: A positive integer in cents (or local equivalent) (or + 0 for a free plan) representing how much to charge on a recurring + basis. type: integer amount_decimal: description: Same as `amount`, but accepts a decimal value with @@ -64834,6 +78555,12 @@ paths: content: application/x-www-form-urlencoded: encoding: + currency_options: + explode: true + style: deepObject + custom_unit_amount: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -64876,6 +78603,82 @@ paths: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string + currency_options: + additionalProperties: + properties: + custom_unit_amount: + properties: + enabled: + type: boolean + maximum: + type: integer + minimum: + type: integer + preset: + type: integer + required: + - enabled + title: custom_unit_amount + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + tiers: + items: + properties: + flat_amount: + type: integer + flat_amount_decimal: + format: decimal + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + up_to: + anyOf: + - enum: + - inf + maxLength: 5000 + type: string + - type: integer + required: + - up_to + title: tier + type: object + type: array + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + title: currency_option + type: object + description: Prices defined in each available currency option. Each + key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). + type: object + custom_unit_amount: + description: When set, provides configuration for the amount to + be adjusted by the customer during Checkout Sessions and Payment + Links. + properties: + enabled: + type: boolean + maximum: + type: integer + minimum: + type: integer + preset: + type: integer + required: + - enabled + title: custom_unit_amount + type: object expand: description: Specifies which fields in the response should be expanded. items: @@ -65031,13 +78834,14 @@ paths: title: transform_usage_param type: object unit_amount: - description: A positive integer in %s (or 0 for a free price) representing - how much to charge. + description: A positive integer in cents (or local equivalent) (or + 0 for a free price) representing how much to charge. One of `unit_amount` + or `custom_unit_amount` is required, unless `billing_scheme=tiered`. type: integer unit_amount_decimal: description: Same as `unit_amount`, but accepts a decimal value - in %s with at most 12 decimal places. Only one of `unit_amount` - and `unit_amount_decimal` can be set. + in cents (or local equivalent) with at most 12 decimal places. + Only one of `unit_amount` and `unit_amount_decimal` can be set. format: decimal type: string required: @@ -65057,6 +78861,108 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/prices/search": + get: + description: |- +

Search for prices you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetPricesSearch + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + in: query + name: query + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/price" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/prices/{price}": get: description: "

Retrieves the price with the given ID.

" @@ -65118,6 +79024,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + currency_options: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -65131,6 +79040,69 @@ paths: description: Whether the price can be used for new purchases. Defaults to `true`. type: boolean + currency_options: + anyOf: + - additionalProperties: + properties: + custom_unit_amount: + properties: + enabled: + type: boolean + maximum: + type: integer + minimum: + type: integer + preset: + type: integer + required: + - enabled + title: custom_unit_amount + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + tiers: + items: + properties: + flat_amount: + type: integer + flat_amount_decimal: + format: decimal + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + up_to: + anyOf: + - enum: + - inf + maxLength: 5000 + type: string + - type: integer + required: + - up_to + title: tier + type: object + type: array + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + title: currency_option + type: object + type: object + - enum: + - '' + type: string + description: Prices defined in each available currency option. Each + key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) + and a [supported currency](https://stripe.com/docs/currencies). expand: description: Specifies which fields in the response should be expanded. items: @@ -65247,7 +79219,9 @@ paths: type: string type: array style: deepObject - - description: Only return products with the given IDs. + - description: Only return products with the given IDs. Cannot be used with + [starting_after](https://stripe.com/docs/api#list_products-starting_after) + or [ending_before](https://stripe.com/docs/api#list_products-ending_before). explode: true in: query name: ids @@ -65353,6 +79327,9 @@ paths: content: application/x-www-form-urlencoded: encoding: + default_price_data: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -65372,6 +79349,98 @@ paths: description: Whether the product is currently available for purchase. Defaults to `true`. type: boolean + default_price_data: + description: Data used to generate a new [Price](https://stripe.com/docs/api/prices) + object. This Price will be set as the default price for this product. + properties: + currency: + type: string + currency_options: + additionalProperties: + properties: + custom_unit_amount: + properties: + enabled: + type: boolean + maximum: + type: integer + minimum: + type: integer + preset: + type: integer + required: + - enabled + title: custom_unit_amount + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + tiers: + items: + properties: + flat_amount: + type: integer + flat_amount_decimal: + format: decimal + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + up_to: + anyOf: + - enum: + - inf + maxLength: 5000 + type: string + - type: integer + required: + - up_to + title: tier + type: object + type: array + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + title: currency_option + type: object + type: object + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + title: price_data_without_product + type: object description: description: The product's description, meant to be displayable to the customer. Use this field to optionally store a long form @@ -65407,8 +79476,7 @@ paths: type: object name: description: The product's name, meant to be displayable to the - customer. Whenever this product is sold via a subscription, name - will show up on associated invoice line item descriptions. + customer. maxLength: 5000 type: string package_dimensions: @@ -65441,7 +79509,7 @@ paths: maxLength: 22 type: string tax_code: - description: A [tax code](https://stripe.com/docs/tax/tax-codes) + description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID. type: string unit_label: @@ -65471,6 +79539,108 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/products/search": + get: + description: |- +

Search for products you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetProductsSearch + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + in: query + name: query + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/product" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/products/{id}": delete: description: "

Delete a product. Deleting a product is only possible if it @@ -65584,12 +79754,20 @@ paths: tax_code: explode: true style: deepObject + url: + explode: true + style: deepObject schema: additionalProperties: false properties: active: description: Whether the product is available for purchase. type: boolean + default_price: + description: The ID of the [Price](https://stripe.com/docs/api/prices) + object that is the default price for this product. + maxLength: 5000 + type: string description: description: The product's description, meant to be displayable to the customer. Use this field to optionally store a long form @@ -65627,8 +79805,7 @@ paths: All keys can be unset by posting an empty value to `metadata`. name: description: The product's name, meant to be displayable to the - customer. Whenever this product is sold via a subscription, name - will show up on associated invoice line item descriptions. + customer. maxLength: 5000 type: string package_dimensions: @@ -65670,7 +79847,7 @@ paths: - enum: - '' type: string - description: A [tax code](https://stripe.com/docs/tax/tax-codes) + description: A [tax code](https://stripe.com/docs/tax/tax-categories) ID. unit_label: description: A label that represents units of this product in Stripe @@ -65680,8 +79857,12 @@ paths: maxLength: 12 type: string url: + anyOf: + - type: string + - enum: + - '' + type: string description: A URL of a publicly-accessible webpage for this product. - type: string type: object required: false responses: @@ -65838,6 +80019,7 @@ paths: - has_more - object - url + title: PromotionCodesResourcePromotionCodeList type: object x-expandableFields: - data @@ -65917,6 +80099,14 @@ paths: description: Settings that restrict the redemption of the promotion code. properties: + currency_options: + additionalProperties: + properties: + minimum_amount: + type: integer + title: currency_option + type: object + type: object first_time_transaction: type: boolean minimum_amount: @@ -66011,6 +80201,9 @@ paths: metadata: explode: true style: deepObject + restrictions: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -66038,6 +80231,20 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + restrictions: + description: Settings that restrict the redemption of the promotion + code. + properties: + currency_options: + additionalProperties: + properties: + minimum_amount: + type: integer + title: currency_option + type: object + type: object + title: restrictions_params + type: object type: object required: false responses: @@ -66121,6 +80328,16 @@ paths: - open type: string style: form + - description: Provides a list of quotes that are associated with the specified + test clock. The response will not include quotes with test clocks if this + and the customer parameter is not set. + in: query + name: test_clock + required: false + schema: + maxLength: 5000 + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -66161,6 +80378,7 @@ paths: - has_more - object - url + title: QuotesResourceQuoteList type: object x-expandableFields: - data @@ -66441,6 +80659,9 @@ paths: is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. properties: + description: + maxLength: 500 + type: string effective_date: anyOf: - enum: @@ -66460,6 +80681,10 @@ paths: type: string title: subscription_data_create_params type: object + test_clock: + description: ID of the test clock to attach to the quote. + maxLength: 5000 + type: string transfer_data: anyOf: - properties: @@ -66788,6 +81013,9 @@ paths: is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. properties: + description: + maxLength: 500 + type: string effective_date: anyOf: - enum: @@ -67527,6 +81755,7 @@ paths: - has_more - object - url + title: RadarListListItemList type: object x-expandableFields: - data @@ -67790,6 +82019,7 @@ paths: - has_more - object - url + title: RadarListListList type: object x-expandableFields: - data @@ -68018,443 +82248,6 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/recipients": - get: - deprecated: true - description: "

Returns a list of your recipients. The recipients are returned - sorted by creation date, with the most recently created recipients appearing - first.

" - operationId: GetRecipients - parameters: - - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - - in: query - name: type - required: false - schema: - enum: - - corporation - - individual - maxLength: 5000 - type: string - style: form - - description: Only return recipients that are verified or unverified. - in: query - name: verified - required: false - schema: - type: boolean - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/recipient" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/recipients" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - deprecated: true - description: |- -

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.

- operationId: PostRecipients - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - bank_account: - description: A bank account to attach to the recipient. You can - provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), - or a dictionary containing a user's bank account details, with - the options described below. - maxLength: 5000 - type: string - x-stripeBypassValidation: true - card: - description: A U.S. Visa or MasterCard debit card (_not_ prepaid) - to attach to the recipient. If the debit card is not valid, recipient - creation will fail. You can provide either a token, like the ones - returned by [Stripe.js](https://stripe.com/docs/js), or a dictionary - containing a user's debit card details, with the options described - below. Although not all information is required, the extra info - helps prevent fraud. - maxLength: 5000 - type: string - x-stripeBypassValidation: true - description: - description: An arbitrary string which you can attach to a `Recipient` - object. It is displayed alongside the recipient in the web interface. - maxLength: 5000 - type: string - email: - description: The recipient's email address. It is displayed alongside - the recipient in the web interface, and can be useful for searching - and tracking. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - name: - description: The recipient's full, legal name. For type `individual`, - should be in the format `First Last`, `First Middle Last`, or - `First M Last` (no prefixes or suffixes). For `corporation`, the - full, incorporated name. - maxLength: 5000 - type: string - tax_id: - description: The recipient's tax ID, as a string. For type `individual`, - the full SSN; for type `corporation`, the full EIN. - maxLength: 5000 - type: string - type: - description: 'Type of the recipient: either `individual` or `corporation`.' - maxLength: 5000 - type: string - required: - - name - - type - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/recipient" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/recipients/{id}": - delete: - deprecated: true - description: "

Permanently deletes a recipient. It cannot be undone.

" - operationId: DeleteRecipientsId - parameters: - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/deleted_recipient" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - get: - deprecated: true - description: "

Retrieves the details of an existing recipient. You need only - supply the unique recipient identifier that was returned upon recipient creation.

" - operationId: GetRecipientsId - parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - anyOf: - - "$ref": "#/components/schemas/recipient" - - "$ref": "#/components/schemas/deleted_recipient" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - deprecated: true - description: |- -

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.

- operationId: PostRecipientsId - parameters: - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - bank_account: - description: A bank account to attach to the recipient. You can - provide either a token, like the ones returned by [Stripe.js](https://stripe.com/docs/js), - or a dictionary containing a user's bank account details, with - the options described below. - maxLength: 5000 - type: string - x-stripeBypassValidation: true - card: - description: A U.S. Visa or MasterCard debit card (not prepaid) - to attach to the recipient. You can provide either a token, like - the ones returned by [Stripe.js](https://stripe.com/docs/js), - or a dictionary containing a user's debit card details, with the - options described below. Passing `card` will create a new card, - make it the new recipient default card, and delete the old recipient - default (if one exists). If you want to add additional debit cards - instead of replacing the existing default, use the [card creation - API](https://stripe.com/docs/api#create_card). Whenever you attach - a card to a recipient, Stripe will automatically validate the - debit card. - maxLength: 5000 - type: string - x-stripeBypassValidation: true - default_card: - description: ID of the card to set as the recipient's new default - for payouts. - maxLength: 5000 - type: string - description: - description: An arbitrary string which you can attach to a `Recipient` - object. It is displayed alongside the recipient in the web interface. - maxLength: 5000 - type: string - email: - description: The recipient's email address. It is displayed alongside - the recipient in the web interface, and can be useful for searching - and tracking. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - name: - description: The recipient's full, legal name. For type `individual`, - should be in the format `First Last`, `First Middle Last`, or - `First M Last` (no prefixes or suffixes). For `corporation`, the - full, incorporated name. - maxLength: 5000 - type: string - tax_id: - description: The recipient's tax ID, as a string. For type `individual`, - the full SSN; for type `corporation`, the full EIN. - maxLength: 5000 - type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/recipient" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. "/v1/refunds": get: description: "

Returns a list of all refunds you’ve previously created. The @@ -68578,6 +82371,7 @@ paths: - has_more - object - url + title: APIMethodRefundList type: object x-expandableFields: - data @@ -68605,16 +82399,29 @@ paths: additionalProperties: false properties: amount: + description: A positive integer representing how much to refund. type: integer charge: maxLength: 5000 type: string + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: Customer whose customer balance to refund from. + maxLength: 5000 + type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + instructions_email: + description: Address to send refund email, use customer email if + not specified + type: string metadata: anyOf: - additionalProperties: @@ -68628,6 +82435,11 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + origin: + description: Origin of the refund + enum: + - customer_balance + type: string payment_intent: maxLength: 5000 type: string @@ -68761,6 +82573,51 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/refunds/{refund}/cancel": + post: + description: |- +

Cancels a refund with a status of requires_action.

+ +

Refunds in other states cannot be canceled, and only refunds for payment methods that require customer action will enter the requires_action state.

+ operationId: PostRefundsRefundCancel + parameters: + - in: path + name: refund + required: true + schema: + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/refund" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. "/v1/reporting/report_runs": get: description: "

Returns a list of Report Runs, with the most recent appearing @@ -68869,6 +82726,7 @@ paths: - has_more - object - url + title: FinancialReportingFinanceReportRunList type: object x-expandableFields: - data @@ -69563,14 +83421,5294 @@ paths: - Zulu maxLength: 5000 type: string - title: run_parameter_specs + title: run_parameter_specs + type: object + report_type: + description: The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) + to run, such as `"balance.summary.1"`. + type: string + required: + - report_type + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/reporting.report_run" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reporting/report_runs/{report_run}": + get: + description: "

Retrieves the details of an existing Report Run.

" + operationId: GetReportingReportRunsReportRun + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: report_run + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/reporting.report_run" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reporting/report_types": + get: + description: "

Returns a full list of Report Types.

" + operationId: GetReportingReportTypes + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/reporting.report_type" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: FinancialReportingFinanceReportTypeList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reporting/report_types/{report_type}": + get: + description:

Retrieves the details of a Report Type. (Certain report types + require a live-mode + API key.)

+ operationId: GetReportingReportTypesReportType + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: report_type + required: true + schema: + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/reporting.report_type" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reviews": + get: + description: "

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.

" + operationId: GetReviews + parameters: + - explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/review" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: RadarReviewList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reviews/{review}": + get: + description: "

Retrieves a Review object.

" + operationId: GetReviewsReview + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: review + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/review" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/reviews/{review}/approve": + post: + description: "

Approves a Review object, closing it and removing + it from the list of reviews.

" + operationId: PostReviewsReviewApprove + parameters: + - in: path + name: review + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/review" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_attempts": + get: + description: "

Returns a list of SetupAttempts associated with a provided + SetupIntent.

" + operationId: GetSetupAttempts + parameters: + - description: |- + 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. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: |- + Only return SetupAttempts created by the SetupIntent specified by + this ID. + in: query + name: setup_intent + required: true + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/setup_attempt" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/setup_attempts" + type: string + required: + - data + - has_more + - object + - url + title: PaymentFlowsSetupIntentSetupAttemptList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_intents": + get: + description: "

Returns a list of SetupIntents.

" + operationId: GetSetupIntents + parameters: + - description: |- + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + in: query + name: attach_to_self + required: false + schema: + type: boolean + style: form + - description: 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. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return SetupIntents for the customer specified by this customer + ID. + in: query + name: customer + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: Only return SetupIntents associated with the specified payment + method. + in: query + name: payment_method + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/setup_intent" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/setup_intents" + type: string + required: + - data + - has_more + - object + - url + title: PaymentFlowsSetupIntentList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

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.

+ operationId: PostSetupIntents + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + flow_directions: + explode: true + style: deepObject + mandate_data: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + payment_method_data: + explode: true + style: deepObject + payment_method_options: + explode: true + style: deepObject + payment_method_types: + explode: true + style: deepObject + single_use: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + attach_to_self: + description: |- + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + type: boolean + confirm: + description: Set to `true` to attempt to confirm this SetupIntent + immediately. This parameter defaults to `false`. If the payment + method attached is a card, a return_url may be provided in case + additional authentication is required. + type: boolean + customer: + description: |- + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 1000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + flow_directions: + description: |- + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + items: + enum: + - inbound + - outbound + type: string + type: array + mandate_data: + description: This hash contains details about the Mandate to create. + This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + properties: + customer_acceptance: + properties: + accepted_at: + format: unix-time + type: integer + offline: + properties: {} + title: offline_param + type: object + online: + properties: + ip_address: + type: string + user_agent: + maxLength: 5000 + type: string + required: + - ip_address + - user_agent + title: online_param + type: object + type: + enum: + - offline + - online + maxLength: 5000 + type: string + required: + - type + title: customer_acceptance_param + type: object + required: + - customer_acceptance + title: secret_key_param + type: object + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + on_behalf_of: + description: The Stripe account ID for which this SetupIntent is + created. + type: string + payment_method: + description: ID of the payment method (a PaymentMethod, Card, or + saved Source object) to attach to this SetupIntent. + maxLength: 5000 + type: string + payment_method_data: + description: |- + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + properties: + acss_debit: + properties: + account_number: + maxLength: 5000 + type: string + institution_number: + maxLength: 5000 + type: string + transit_number: + maxLength: 5000 + type: string + required: + - account_number + - institution_number + - transit_number + title: payment_method_param + type: object + affirm: + properties: {} + title: param + type: object + afterpay_clearpay: + properties: {} + title: param + type: object + alipay: + properties: {} + title: param + type: object + au_becs_debit: + properties: + account_number: + maxLength: 5000 + type: string + bsb_number: + maxLength: 5000 + type: string + required: + - account_number + - bsb_number + title: param + type: object + bacs_debit: + properties: + account_number: + maxLength: 5000 + type: string + sort_code: + maxLength: 5000 + type: string + title: param + type: object + bancontact: + properties: {} + title: param + type: object + billing_details: + properties: + address: + anyOf: + - properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: billing_details_address + type: object + - enum: + - '' + type: string + email: + anyOf: + - type: string + - enum: + - '' + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + title: billing_details_inner_params + type: object + blik: + properties: {} + title: param + type: object + boleto: + properties: + tax_id: + maxLength: 5000 + type: string + required: + - tax_id + title: param + type: object + customer_balance: + properties: {} + title: param + type: object + eps: + properties: + bank: + enum: + - arzte_und_apotheker_bank + - austrian_anadi_bank_ag + - bank_austria + - bankhaus_carl_spangler + - bankhaus_schelhammer_und_schattera_ag + - bawag_psk_ag + - bks_bank_ag + - brull_kallmus_bank_ag + - btv_vier_lander_bank + - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag + - dolomitenbank + - easybank_ag + - erste_bank_und_sparkassen + - hypo_alpeadriabank_international_ag + - hypo_bank_burgenland_aktiengesellschaft + - hypo_noe_lb_fur_niederosterreich_u_wien + - hypo_oberosterreich_salzburg_steiermark + - hypo_tirol_bank_ag + - hypo_vorarlberg_bank_ag + - marchfelder_bank + - oberbank_ag + - raiffeisen_bankengruppe_osterreich + - schoellerbank_ag + - sparda_bank_wien + - volksbank_gruppe + - volkskreditbank_ag + - vr_bank_braunau + maxLength: 5000 + type: string + title: param + type: object + fpx: + properties: + bank: + enum: + - affin_bank + - agrobank + - alliance_bank + - ambank + - bank_islam + - bank_muamalat + - bank_rakyat + - bsn + - cimb + - deutsche_bank + - hong_leong_bank + - hsbc + - kfh + - maybank2e + - maybank2u + - ocbc + - pb_enterprise + - public_bank + - rhb + - standard_chartered + - uob + maxLength: 5000 + type: string + x-stripeBypassValidation: true + required: + - bank + title: param + type: object + giropay: + properties: {} + title: param + type: object + grabpay: + properties: {} + title: param + type: object + ideal: + properties: + bank: + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot + maxLength: 5000 + type: string + title: param + type: object + interac_present: + properties: {} + title: param + type: object + klarna: + properties: + dob: + properties: + day: + type: integer + month: + type: integer + year: + type: integer + required: + - day + - month + - year + title: date_of_birth + type: object + title: param + type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object + metadata: + additionalProperties: + type: string + type: object + oxxo: + properties: {} + title: param + type: object + p24: + properties: + bank: + enum: + - alior_bank + - bank_millennium + - bank_nowy_bfg_sa + - bank_pekao_sa + - banki_spbdzielcze + - blik + - bnp_paribas + - boz + - citi_handlowy + - credit_agricole + - envelobank + - etransfer_pocztowy24 + - getin_bank + - ideabank + - ing + - inteligo + - mbank_mtransfer + - nest_przelew + - noble_pay + - pbac_z_ipko + - plus_bank + - santander_przelew24 + - tmobile_usbugi_bankowe + - toyota_bank + - volkswagen_bank + type: string + x-stripeBypassValidation: true + title: param + type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object + sepa_debit: + properties: + iban: + maxLength: 5000 + type: string + required: + - iban + title: param + type: object + sofort: + properties: + country: + enum: + - AT + - BE + - DE + - ES + - IT + - NL + type: string + required: + - country + title: param + type: object + type: + enum: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - link + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object + wechat_pay: + properties: {} + title: param + type: object + required: + - type + title: payment_method_data_params + type: object + payment_method_options: + description: Payment-method-specific configuration for this SetupIntent. + properties: + acss_debit: + properties: + currency: + enum: + - cad + - usd + type: string + mandate_options: + properties: + custom_mandate_url: + anyOf: + - type: string + - enum: + - '' + type: string + default_for: + items: + enum: + - invoice + - subscription + type: string + type: array + interval_description: + maxLength: 500 + type: string + payment_schedule: + enum: + - combined + - interval + - sporadic + type: string + transaction_type: + enum: + - business + - personal + type: string + title: setup_intent_payment_method_options_mandate_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + blik: + properties: + code: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + card: + properties: + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + currency: + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - currency + - interval + - reference + - start_date + title: setup_intent_mandate_options_param + type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + maxLength: 5000 + type: string + x-stripeBypassValidation: true + title: setup_intent_param + type: object + link: + properties: + persistent_token: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + sepa_debit: + properties: + mandate_options: + properties: {} + title: payment_method_options_mandate_options_param + type: object + title: setup_intent_payment_method_options_param + type: object + us_bank_account: + properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + title: payment_method_options_param + type: object + payment_method_types: + description: The list of payment method types (e.g. card) that this + SetupIntent is allowed to use. If this is not provided, defaults + to ["card"]. + items: + maxLength: 5000 + type: string + type: array + return_url: + description: The URL to redirect your customer back to after they + authenticate or cancel their payment on the payment method's app + or site. If you'd prefer to redirect to a mobile application, + you can alternatively supply an application URI scheme. This parameter + can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + type: string + single_use: + description: If this hash is populated, this SetupIntent will generate + a single_use Mandate on success. + properties: + amount: + type: integer + currency: + type: string + required: + - amount + - currency + title: setup_intent_single_use_params + type: object + usage: + description: Indicates how the payment method is intended to be + used in the future. If not provided, this value defaults to `off_session`. + enum: + - off_session + - on_session + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_intents/{intent}": + get: + description: |- +

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.

+ operationId: GetSetupIntentsIntent + parameters: + - description: The client secret of the SetupIntent. Required if a publishable + key is used to retrieve the SetupIntent. + in: query + name: client_secret + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates a SetupIntent object.

" + operationId: PostSetupIntentsIntent + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + flow_directions: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + payment_method_data: + explode: true + style: deepObject + payment_method_options: + explode: true + style: deepObject + payment_method_types: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + attach_to_self: + description: |- + If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + + It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + type: boolean + customer: + description: |- + ID of the Customer this SetupIntent belongs to, if one exists. + + If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 1000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + flow_directions: + description: |- + Indicates the directions of money movement for which this payment method is intended to be used. + + Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + items: + enum: + - inbound + - outbound + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + payment_method: + description: ID of the payment method (a PaymentMethod, Card, or + saved Source object) to attach to this SetupIntent. + maxLength: 5000 + type: string + payment_method_data: + description: |- + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + properties: + acss_debit: + properties: + account_number: + maxLength: 5000 + type: string + institution_number: + maxLength: 5000 + type: string + transit_number: + maxLength: 5000 + type: string + required: + - account_number + - institution_number + - transit_number + title: payment_method_param + type: object + affirm: + properties: {} + title: param + type: object + afterpay_clearpay: + properties: {} + title: param + type: object + alipay: + properties: {} + title: param + type: object + au_becs_debit: + properties: + account_number: + maxLength: 5000 + type: string + bsb_number: + maxLength: 5000 + type: string + required: + - account_number + - bsb_number + title: param + type: object + bacs_debit: + properties: + account_number: + maxLength: 5000 + type: string + sort_code: + maxLength: 5000 + type: string + title: param + type: object + bancontact: + properties: {} + title: param + type: object + billing_details: + properties: + address: + anyOf: + - properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: billing_details_address + type: object + - enum: + - '' + type: string + email: + anyOf: + - type: string + - enum: + - '' + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + title: billing_details_inner_params + type: object + blik: + properties: {} + title: param + type: object + boleto: + properties: + tax_id: + maxLength: 5000 + type: string + required: + - tax_id + title: param + type: object + customer_balance: + properties: {} + title: param + type: object + eps: + properties: + bank: + enum: + - arzte_und_apotheker_bank + - austrian_anadi_bank_ag + - bank_austria + - bankhaus_carl_spangler + - bankhaus_schelhammer_und_schattera_ag + - bawag_psk_ag + - bks_bank_ag + - brull_kallmus_bank_ag + - btv_vier_lander_bank + - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag + - dolomitenbank + - easybank_ag + - erste_bank_und_sparkassen + - hypo_alpeadriabank_international_ag + - hypo_bank_burgenland_aktiengesellschaft + - hypo_noe_lb_fur_niederosterreich_u_wien + - hypo_oberosterreich_salzburg_steiermark + - hypo_tirol_bank_ag + - hypo_vorarlberg_bank_ag + - marchfelder_bank + - oberbank_ag + - raiffeisen_bankengruppe_osterreich + - schoellerbank_ag + - sparda_bank_wien + - volksbank_gruppe + - volkskreditbank_ag + - vr_bank_braunau + maxLength: 5000 + type: string + title: param + type: object + fpx: + properties: + bank: + enum: + - affin_bank + - agrobank + - alliance_bank + - ambank + - bank_islam + - bank_muamalat + - bank_rakyat + - bsn + - cimb + - deutsche_bank + - hong_leong_bank + - hsbc + - kfh + - maybank2e + - maybank2u + - ocbc + - pb_enterprise + - public_bank + - rhb + - standard_chartered + - uob + maxLength: 5000 + type: string + x-stripeBypassValidation: true + required: + - bank + title: param + type: object + giropay: + properties: {} + title: param + type: object + grabpay: + properties: {} + title: param + type: object + ideal: + properties: + bank: + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot + maxLength: 5000 + type: string + title: param + type: object + interac_present: + properties: {} + title: param + type: object + klarna: + properties: + dob: + properties: + day: + type: integer + month: + type: integer + year: + type: integer + required: + - day + - month + - year + title: date_of_birth + type: object + title: param + type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object + metadata: + additionalProperties: + type: string + type: object + oxxo: + properties: {} + title: param + type: object + p24: + properties: + bank: + enum: + - alior_bank + - bank_millennium + - bank_nowy_bfg_sa + - bank_pekao_sa + - banki_spbdzielcze + - blik + - bnp_paribas + - boz + - citi_handlowy + - credit_agricole + - envelobank + - etransfer_pocztowy24 + - getin_bank + - ideabank + - ing + - inteligo + - mbank_mtransfer + - nest_przelew + - noble_pay + - pbac_z_ipko + - plus_bank + - santander_przelew24 + - tmobile_usbugi_bankowe + - toyota_bank + - volkswagen_bank + type: string + x-stripeBypassValidation: true + title: param + type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object + sepa_debit: + properties: + iban: + maxLength: 5000 + type: string + required: + - iban + title: param + type: object + sofort: + properties: + country: + enum: + - AT + - BE + - DE + - ES + - IT + - NL + type: string + required: + - country + title: param + type: object + type: + enum: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - link + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object + wechat_pay: + properties: {} + title: param + type: object + required: + - type + title: payment_method_data_params + type: object + payment_method_options: + description: Payment-method-specific configuration for this SetupIntent. + properties: + acss_debit: + properties: + currency: + enum: + - cad + - usd + type: string + mandate_options: + properties: + custom_mandate_url: + anyOf: + - type: string + - enum: + - '' + type: string + default_for: + items: + enum: + - invoice + - subscription + type: string + type: array + interval_description: + maxLength: 500 + type: string + payment_schedule: + enum: + - combined + - interval + - sporadic + type: string + transaction_type: + enum: + - business + - personal + type: string + title: setup_intent_payment_method_options_mandate_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + blik: + properties: + code: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + card: + properties: + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + currency: + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - currency + - interval + - reference + - start_date + title: setup_intent_mandate_options_param + type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + maxLength: 5000 + type: string + x-stripeBypassValidation: true + title: setup_intent_param + type: object + link: + properties: + persistent_token: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + sepa_debit: + properties: + mandate_options: + properties: {} + title: payment_method_options_mandate_options_param + type: object + title: setup_intent_payment_method_options_param + type: object + us_bank_account: + properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + title: payment_method_options_param + type: object + payment_method_types: + description: The list of payment method types (e.g. card) that this + SetupIntent is allowed to set up. If this is not provided, defaults + to ["card"]. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_intents/{intent}/cancel": + post: + description: |- +

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

+ +

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

+ operationId: PostSetupIntentsIntentCancel + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + cancellation_reason: + description: Reason for canceling this SetupIntent. Possible values + are `abandoned`, `requested_by_customer`, or `duplicate` + enum: + - abandoned + - duplicate + - requested_by_customer + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_intents/{intent}/confirm": + post: + description: |- +

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.

+ operationId: PostSetupIntentsIntentConfirm + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + mandate_data: + explode: true + style: deepObject + payment_method_data: + explode: true + style: deepObject + payment_method_options: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + client_secret: + description: The client secret of the SetupIntent. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + mandate_data: + anyOf: + - properties: + customer_acceptance: + properties: + accepted_at: + format: unix-time + type: integer + offline: + properties: {} + title: offline_param + type: object + online: + properties: + ip_address: + type: string + user_agent: + maxLength: 5000 + type: string + required: + - ip_address + - user_agent + title: online_param + type: object + type: + enum: + - offline + - online + maxLength: 5000 + type: string + required: + - type + title: customer_acceptance_param + type: object + required: + - customer_acceptance + title: secret_key_param + type: object + - properties: + customer_acceptance: + properties: + online: + properties: + ip_address: + type: string + user_agent: + maxLength: 5000 + type: string + title: online_param + type: object + type: + enum: + - online + maxLength: 5000 + type: string + required: + - online + - type + title: customer_acceptance_param + type: object + required: + - customer_acceptance + title: client_key_param + type: object + description: This hash contains details about the Mandate to create + payment_method: + description: ID of the payment method (a PaymentMethod, Card, or + saved Source object) to attach to this SetupIntent. + maxLength: 5000 + type: string + payment_method_data: + description: |- + When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + value in the SetupIntent. + properties: + acss_debit: + properties: + account_number: + maxLength: 5000 + type: string + institution_number: + maxLength: 5000 + type: string + transit_number: + maxLength: 5000 + type: string + required: + - account_number + - institution_number + - transit_number + title: payment_method_param + type: object + affirm: + properties: {} + title: param + type: object + afterpay_clearpay: + properties: {} + title: param + type: object + alipay: + properties: {} + title: param + type: object + au_becs_debit: + properties: + account_number: + maxLength: 5000 + type: string + bsb_number: + maxLength: 5000 + type: string + required: + - account_number + - bsb_number + title: param + type: object + bacs_debit: + properties: + account_number: + maxLength: 5000 + type: string + sort_code: + maxLength: 5000 + type: string + title: param + type: object + bancontact: + properties: {} + title: param + type: object + billing_details: + properties: + address: + anyOf: + - properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: billing_details_address + type: object + - enum: + - '' + type: string + email: + anyOf: + - type: string + - enum: + - '' + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + title: billing_details_inner_params + type: object + blik: + properties: {} + title: param + type: object + boleto: + properties: + tax_id: + maxLength: 5000 + type: string + required: + - tax_id + title: param + type: object + customer_balance: + properties: {} + title: param + type: object + eps: + properties: + bank: + enum: + - arzte_und_apotheker_bank + - austrian_anadi_bank_ag + - bank_austria + - bankhaus_carl_spangler + - bankhaus_schelhammer_und_schattera_ag + - bawag_psk_ag + - bks_bank_ag + - brull_kallmus_bank_ag + - btv_vier_lander_bank + - capital_bank_grawe_gruppe_ag + - deutsche_bank_ag + - dolomitenbank + - easybank_ag + - erste_bank_und_sparkassen + - hypo_alpeadriabank_international_ag + - hypo_bank_burgenland_aktiengesellschaft + - hypo_noe_lb_fur_niederosterreich_u_wien + - hypo_oberosterreich_salzburg_steiermark + - hypo_tirol_bank_ag + - hypo_vorarlberg_bank_ag + - marchfelder_bank + - oberbank_ag + - raiffeisen_bankengruppe_osterreich + - schoellerbank_ag + - sparda_bank_wien + - volksbank_gruppe + - volkskreditbank_ag + - vr_bank_braunau + maxLength: 5000 + type: string + title: param + type: object + fpx: + properties: + bank: + enum: + - affin_bank + - agrobank + - alliance_bank + - ambank + - bank_islam + - bank_muamalat + - bank_rakyat + - bsn + - cimb + - deutsche_bank + - hong_leong_bank + - hsbc + - kfh + - maybank2e + - maybank2u + - ocbc + - pb_enterprise + - public_bank + - rhb + - standard_chartered + - uob + maxLength: 5000 + type: string + x-stripeBypassValidation: true + required: + - bank + title: param + type: object + giropay: + properties: {} + title: param + type: object + grabpay: + properties: {} + title: param + type: object + ideal: + properties: + bank: + enum: + - abn_amro + - asn_bank + - bunq + - handelsbanken + - ing + - knab + - moneyou + - rabobank + - regiobank + - revolut + - sns_bank + - triodos_bank + - van_lanschot + maxLength: 5000 + type: string + title: param + type: object + interac_present: + properties: {} + title: param + type: object + klarna: + properties: + dob: + properties: + day: + type: integer + month: + type: integer + year: + type: integer + required: + - day + - month + - year + title: date_of_birth + type: object + title: param + type: object + konbini: + properties: {} + title: param + type: object + link: + properties: {} + title: param + type: object + metadata: + additionalProperties: + type: string + type: object + oxxo: + properties: {} + title: param + type: object + p24: + properties: + bank: + enum: + - alior_bank + - bank_millennium + - bank_nowy_bfg_sa + - bank_pekao_sa + - banki_spbdzielcze + - blik + - bnp_paribas + - boz + - citi_handlowy + - credit_agricole + - envelobank + - etransfer_pocztowy24 + - getin_bank + - ideabank + - ing + - inteligo + - mbank_mtransfer + - nest_przelew + - noble_pay + - pbac_z_ipko + - plus_bank + - santander_przelew24 + - tmobile_usbugi_bankowe + - toyota_bank + - volkswagen_bank + type: string + x-stripeBypassValidation: true + title: param + type: object + paynow: + properties: {} + title: param + type: object + pix: + properties: {} + title: param + type: object + promptpay: + properties: {} + title: param + type: object + radar_options: + properties: + session: + maxLength: 5000 + type: string + title: radar_options + type: object + sepa_debit: + properties: + iban: + maxLength: 5000 + type: string + required: + - iban + title: param + type: object + sofort: + properties: + country: + enum: + - AT + - BE + - DE + - ES + - IT + - NL + type: string + required: + - country + title: param + type: object + type: + enum: + - acss_debit + - affirm + - afterpay_clearpay + - alipay + - au_becs_debit + - bacs_debit + - bancontact + - blik + - boleto + - customer_balance + - eps + - fpx + - giropay + - grabpay + - ideal + - klarna + - konbini + - link + - oxxo + - p24 + - paynow + - pix + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + us_bank_account: + properties: + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param + type: object + wechat_pay: + properties: {} + title: param + type: object + required: + - type + title: payment_method_data_params + type: object + payment_method_options: + description: Payment-method-specific configuration for this SetupIntent. + properties: + acss_debit: + properties: + currency: + enum: + - cad + - usd + type: string + mandate_options: + properties: + custom_mandate_url: + anyOf: + - type: string + - enum: + - '' + type: string + default_for: + items: + enum: + - invoice + - subscription + type: string + type: array + interval_description: + maxLength: 500 + type: string + payment_schedule: + enum: + - combined + - interval + - sporadic + type: string + transaction_type: + enum: + - business + - personal + type: string + title: setup_intent_payment_method_options_mandate_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + blik: + properties: + code: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + card: + properties: + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + currency: + type: string + description: + maxLength: 200 + type: string + end_date: + format: unix-time + type: integer + interval: + enum: + - day + - month + - sporadic + - week + - year + type: string + interval_count: + type: integer + reference: + maxLength: 80 + type: string + start_date: + format: unix-time + type: integer + supported_types: + items: + enum: + - india + type: string + type: array + required: + - amount + - amount_type + - currency + - interval + - reference + - start_date + title: setup_intent_mandate_options_param + type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + maxLength: 5000 + type: string + x-stripeBypassValidation: true + title: setup_intent_param + type: object + link: + properties: + persistent_token: + maxLength: 5000 + type: string + title: setup_intent_payment_method_options_param + type: object + sepa_debit: + properties: + mandate_options: + properties: {} + title: payment_method_options_mandate_options_param + type: object + title: setup_intent_payment_method_options_param + type: object + us_bank_account: + properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + return_url: + maxLength: 5000 + type: string + title: linked_account_options_param + type: object + networks: + properties: + requested: + items: + enum: + - ach + - us_domestic_wire + type: string + type: array + title: networks_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: setup_intent_payment_method_options_param + type: object + title: payment_method_options_param + type: object + return_url: + description: |- + The URL to redirect your customer back to after they authenticate on the payment method's app or site. + If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + This parameter is only used for cards and other redirect-based payment methods. + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/setup_intents/{intent}/verify_microdeposits": + post: + description: "

Verifies microdeposits on a SetupIntent object.

" + operationId: PostSetupIntentsIntentVerifyMicrodeposits + parameters: + - in: path + name: intent + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + amounts: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amounts: + description: Two positive integers, in *cents*, equal to the values + of the microdeposits sent to the bank account. + items: + type: integer + type: array + client_secret: + description: The client secret of the SetupIntent. + maxLength: 5000 + type: string + descriptor_code: + description: A six-character code starting with SM present in the + microdeposit sent to the bank account. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/setup_intent" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/shipping_rates": + get: + description: "

Returns a list of your shipping rates.

" + operationId: GetShippingRates + parameters: + - description: Only return shipping rates that are active or inactive. + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: 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. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return shipping rates for the given currency. + in: query + name: currency + required: false + schema: + type: string + style: form + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/shipping_rate" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/shipping_rates" + type: string + required: + - data + - has_more + - object + - url + title: ShippingResourcesShippingRateList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new shipping rate object.

" + operationId: PostShippingRates + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + delivery_estimate: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + fixed_amount: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + delivery_estimate: + description: The estimated range for how long shipping will take, + meant to be displayable to the customer. This will appear on CheckoutSessions. + properties: + maximum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + minimum: + properties: + unit: + enum: + - business_day + - day + - hour + - month + - week + type: string + value: + type: integer + required: + - unit + - value + title: delivery_estimate_bound + type: object + title: delivery_estimate + type: object + display_name: + description: The name of the shipping rate, meant to be displayable + to the customer. This will appear on CheckoutSessions. + maxLength: 100 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + fixed_amount: + description: Describes a fixed amount to charge for shipping. Must + be present if type is `fixed_amount`. + properties: + amount: + type: integer + currency: + type: string + currency_options: + additionalProperties: + properties: + amount: + type: integer + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + required: + - amount + title: currency_option + type: object + type: object + required: + - amount + - currency + title: fixed_amount + type: object + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + tax_behavior: + description: Specifies whether the rate is considered inclusive + of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, + or `unspecified`. + enum: + - exclusive + - inclusive + - unspecified + type: string + tax_code: + description: A [tax code](https://stripe.com/docs/tax/tax-categories) + ID. The Shipping tax code is `txcd_92010001`. + type: string + type: + description: The type of calculation to use on the shipping rate. + Can only be `fixed_amount` for now. + enum: + - fixed_amount + type: string + required: + - display_name + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/shipping_rate" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/shipping_rates/{shipping_rate_token}": + get: + description: "

Returns the shipping rate object with the given ID.

" + operationId: GetShippingRatesShippingRateToken + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: shipping_rate_token + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/shipping_rate" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates an existing shipping rate object.

" + operationId: PostShippingRatesShippingRateToken + parameters: + - in: path + name: shipping_rate_token + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + fixed_amount: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + active: + description: Whether the shipping rate can be used for new purchases. + Defaults to `true`. + type: boolean + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + fixed_amount: + description: Describes a fixed amount to charge for shipping. Must + be present if type is `fixed_amount`. + properties: + currency_options: + additionalProperties: + properties: + amount: + type: integer + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + title: currency_option_update + type: object + type: object + title: fixed_amount_update + type: object + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + tax_behavior: + description: Specifies whether the rate is considered inclusive + of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, + or `unspecified`. + enum: + - exclusive + - inclusive + - unspecified + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/shipping_rate" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sigma/scheduled_query_runs": + get: + description: "

Returns a list of scheduled query runs.

" + operationId: GetSigmaScheduledQueryRuns + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/scheduled_query_run" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/sigma/scheduled_query_runs" + type: string + required: + - data + - has_more + - object + - url + title: SigmaScheduledQueryRunList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sigma/scheduled_query_runs/{scheduled_query_run}": + get: + description: "

Retrieves the details of an scheduled query run.

" + operationId: GetSigmaScheduledQueryRunsScheduledQueryRun + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: scheduled_query_run + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/scheduled_query_run" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/skus": + get: + description: "

Returns a list of your SKUs. The SKUs are returned sorted by + creation date, with the most recently created SKUs appearing first.

" + operationId: GetSkus + parameters: + - description: Only return SKUs that are active or inactive (e.g., pass `false` + to list all inactive products). + in: query + name: active + required: false + schema: + type: boolean + style: form + - description: 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`. + explode: true + in: query + name: attributes + required: false + schema: + additionalProperties: + maxLength: 500 + type: string + type: object + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: Only return SKUs with the given IDs. + explode: true + in: query + name: ids + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: 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: query + name: in_stock + required: false + schema: + type: boolean + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The ID of the product whose SKUs will be retrieved. Must be a + product with type `good`. + in: query + name: product + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/sku" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/skus" + type: string + required: + - data + - has_more + - object + - url + title: ProductsMethodSKUList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new SKU associated with a product.

" + operationId: PostSkus + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + attributes: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + inventory: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + package_dimensions: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + active: + description: Whether the SKU is available for purchase. Default + to `true`. + type: boolean + attributes: + additionalProperties: + maxLength: 500 + type: string + description: 'A dictionary of attributes and values for the attributes + defined by the product. If, for example, a product''s attributes + are `["size", "gender"]`, a valid SKU has the following dictionary + of attributes: `{"size": "Medium", "gender": "Unisex"}`.' + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + id: + description: The identifier for the SKU. Must be unique. If not + provided, an identifier will be randomly generated. + type: string + image: + description: The URL of an image for this SKU, meant to be displayable + to the customer. + maxLength: 5000 + type: string + inventory: + description: Description of the SKU's inventory. + properties: + quantity: + type: integer + type: + enum: + - bucket + - finite + - infinite + type: string + value: + enum: + - '' + - in_stock + - limited + - out_of_stock + type: string + required: + - type + title: inventory_create_specs + type: object + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + package_dimensions: + description: The dimensions of this SKU for shipping purposes. + properties: + height: + type: number + length: + type: number + weight: + type: number + width: + type: number + required: + - height + - length + - weight + - width + title: package_dimensions_specs + type: object + price: + description: The cost of the item as a nonnegative integer in the + smallest currency unit (that is, 100 cents to charge $1.00, or + 100 to charge ¥100, Japanese Yen being a zero-decimal currency). + type: integer + product: + description: The ID of the product this SKU is associated with. + Must be a product with type `good`. + maxLength: 5000 + type: string + required: + - currency + - inventory + - price + - product + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/sku" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/skus/{id}": + delete: + description: "

Delete a SKU. Deleting a SKU is only possible until it has + been used in an order.

" + operationId: DeleteSkusId + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/deleted_sku" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + get: + description: "

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.

" + operationId: GetSkusId + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + anyOf: + - "$ref": "#/components/schemas/sku" + - "$ref": "#/components/schemas/deleted_sku" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

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.

+ operationId: PostSkusId + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + attributes: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + inventory: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + package_dimensions: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + active: + description: Whether this SKU is available for purchase. + type: boolean + attributes: + additionalProperties: + maxLength: 500 + type: string + description: A dictionary of attributes and values for the attributes + defined by the product. When specified, `attributes` will partially + update the existing attributes dictionary on the product, with + the postcondition that a value must be present for each attribute + key on the product. + type: object + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + image: + description: The URL of an image for this SKU, meant to be displayable + to the customer. + maxLength: 5000 + type: string + inventory: + description: Description of the SKU's inventory. + properties: + quantity: + type: integer + type: + enum: + - bucket + - finite + - infinite + type: string + value: + enum: + - '' + - in_stock + - limited + - out_of_stock + type: string + title: inventory_update_specs + type: object + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + package_dimensions: + anyOf: + - properties: + height: + type: number + length: + type: number + weight: + type: number + width: + type: number + required: + - height + - length + - weight + - width + title: package_dimensions_specs + type: object + - enum: + - '' + type: string + description: The dimensions of this SKU for shipping purposes. + price: + description: The cost of the item as a positive integer in the smallest + currency unit (that is, 100 cents to charge $1.00, or 100 to charge + ¥100, Japanese Yen being a zero-decimal currency). + type: integer + product: + description: The ID of the product that this SKU should belong to. + The product must exist, have the same set of attribute names as + the SKU's current product, and be of type `good`. + maxLength: 5000 + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/sku" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources": + post: + description: "

Creates a new source object.

" + operationId: PostSources + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + mandate: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + owner: + explode: true + style: deepObject + receiver: + explode: true + style: deepObject + redirect: + explode: true + style: deepObject + source_order: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount associated with the source. This is the amount + for which the source will be chargeable once ready. Required for + `single_use` sources. Not supported for `receiver` type sources, + where charge amount may not be specified until funds land. + type: integer + currency: + description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) + associated with the source. This is the currency for which the + source will be chargeable once ready. + type: string + customer: + description: The `Customer` to whom the original source is attached + to. Must be set when the original source is not a `Source` (e.g., + `Card`). + maxLength: 500 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + flow: + description: The authentication `flow` of the source to create. + `flow` is one of `redirect`, `receiver`, `code_verification`, + `none`. It is generally inferred unless a type supports multiple + flows. + enum: + - code_verification + - none + - receiver + - redirect + maxLength: 5000 + type: string + mandate: + description: Information about a mandate possibility attached to + a source object (generally for bank debits) as well as its acceptance + status. + properties: + acceptance: + properties: + date: + format: unix-time + type: integer + ip: + type: string + offline: + properties: + contact_email: + type: string + required: + - contact_email + title: mandate_offline_acceptance_params + type: object + online: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: mandate_online_acceptance_params + type: object + status: + enum: + - accepted + - pending + - refused + - revoked + maxLength: 5000 + type: string + type: + enum: + - offline + - online + maxLength: 5000 + type: string + user_agent: + maxLength: 5000 + type: string + required: + - status + title: mandate_acceptance_params + type: object + amount: + anyOf: + - type: integer + - enum: + - '' + type: string + currency: + type: string + interval: + enum: + - one_time + - scheduled + - variable + maxLength: 5000 + type: string + notification_method: + enum: + - deprecated_none + - email + - manual + - none + - stripe_email + maxLength: 5000 + type: string + title: mandate_params + type: object + metadata: + additionalProperties: + type: string + type: object + original_source: + description: The source to share. + maxLength: 5000 + type: string + owner: + description: Information about the owner of the payment instrument + that may be used or required by particular source types. + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: source_address + type: object + email: + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + title: owner + type: object + receiver: + description: Optional parameters for the receiver flow. Can be set + only if the source is a receiver (`flow` is `receiver`). + properties: + refund_attributes_method: + enum: + - email + - manual + - none + maxLength: 5000 + type: string + title: receiver_params + type: object + redirect: + description: Parameters required for the redirect flow. Required + if the source is authenticated by a redirect (`flow` is `redirect`). + properties: + return_url: + type: string + required: + - return_url + title: redirect_params + type: object + source_order: + description: Information about the items and shipping associated + with the source. Required for transactional credit (for example + Klarna) sources before you can charge it. + properties: + items: + items: + properties: + amount: + type: integer + currency: + type: string + description: + maxLength: 1000 + type: string + parent: + maxLength: 5000 + type: string + quantity: + type: integer + type: + enum: + - discount + - shipping + - sku + - tax + maxLength: 5000 + type: string + title: order_item_specs + type: object + type: array + shipping: + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + required: + - line1 + title: address + type: object + carrier: + maxLength: 5000 + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + tracking_number: + maxLength: 5000 + type: string + required: + - address + title: order_shipping + type: object + title: shallow_order_specs + type: object + statement_descriptor: + description: An arbitrary string to be displayed on your customer's + statement. As an example, if your website is `RunClub` and the + item you're charging for is a race ticket, you may want to specify + a `statement_descriptor` of `RunClub 5K race ticket.` While many + payment types will display this information, some may not display + it at all. + maxLength: 5000 + type: string + token: + description: An optional token used to create the source. When passed, + token properties will override source parameters. + maxLength: 5000 + type: string + type: + description: The `type` of the source to create. Required unless + `customer` and `original_source` are specified (see the [Cloning + card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) + guide) + maxLength: 5000 + type: string + usage: + enum: + - reusable + - single_use + maxLength: 5000 + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources/{source}": + get: + description: "

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.

" + operationId: GetSourcesSource + parameters: + - description: The client secret of the source. Required if a publishable key + is used to retrieve the source. + in: query + name: client_secret + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: |- +

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.

+ operationId: PostSourcesSource + parameters: + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + mandate: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + owner: + explode: true + style: deepObject + source_order: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount associated with the source. + type: integer + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + mandate: + description: Information about a mandate possibility attached to + a source object (generally for bank debits) as well as its acceptance + status. + properties: + acceptance: + properties: + date: + format: unix-time + type: integer + ip: + type: string + offline: + properties: + contact_email: + type: string + required: + - contact_email + title: mandate_offline_acceptance_params + type: object + online: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: mandate_online_acceptance_params + type: object + status: + enum: + - accepted + - pending + - refused + - revoked + maxLength: 5000 + type: string + type: + enum: + - offline + - online + maxLength: 5000 + type: string + user_agent: + maxLength: 5000 + type: string + required: + - status + title: mandate_acceptance_params + type: object + amount: + anyOf: + - type: integer + - enum: + - '' + type: string + currency: + type: string + interval: + enum: + - one_time + - scheduled + - variable + maxLength: 5000 + type: string + notification_method: + enum: + - deprecated_none + - email + - manual + - none + - stripe_email + maxLength: 5000 + type: string + title: mandate_params + type: object + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + owner: + description: Information about the owner of the payment instrument + that may be used or required by particular source types. + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: source_address + type: object + email: + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + title: owner + type: object + source_order: + description: Information about the items and shipping associated + with the source. Required for transactional credit (for example + Klarna) sources before you can charge it. + properties: + items: + items: + properties: + amount: + type: integer + currency: + type: string + description: + maxLength: 1000 + type: string + parent: + maxLength: 5000 + type: string + quantity: + type: integer + type: + enum: + - discount + - shipping + - sku + - tax + maxLength: 5000 + type: string + title: order_item_specs + type: object + type: array + shipping: + properties: + address: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + required: + - line1 + title: address + type: object + carrier: + maxLength: 5000 + type: string + name: + maxLength: 5000 + type: string + phone: + maxLength: 5000 + type: string + tracking_number: + maxLength: 5000 + type: string + required: + - address + title: order_shipping + type: object + title: order_params + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources/{source}/mandate_notifications/{mandate_notification}": + get: + description: "

Retrieves a new Source MandateNotification.

" + operationId: GetSourcesSourceMandateNotificationsMandateNotification + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: mandate_notification + required: true + schema: + maxLength: 5000 + type: string + style: simple + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source_mandate_notification" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources/{source}/source_transactions": + get: + description: "

List source transactions for a given source.

" + operationId: GetSourcesSourceSourceTransactions + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/source_transaction" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: ApmsSourcesSourceTransactionList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources/{source}/source_transactions/{source_transaction}": + get: + description: "

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.

" + operationId: GetSourcesSourceSourceTransactionsSourceTransaction + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + - in: path + name: source_transaction + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source_transaction" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/sources/{source}/verify": + post: + description: "

Verify a given source.

" + operationId: PostSourcesSourceVerify + parameters: + - in: path + name: source + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + values: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + values: + description: The values needed to verify the source. + items: + maxLength: 5000 + type: string + type: array + required: + - values + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/source" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/subscription_items": + get: + description: "

Returns a list of your subscription items for a given subscription.

" + operationId: GetSubscriptionItems + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + type: string + style: form + - description: The ID of the subscription whose items will be retrieved. + in: query + name: subscription + required: true + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/subscription_item" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/subscription_items" + type: string + required: + - data + - has_more + - object + - url + title: SubscriptionsItemsSubscriptionItemList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Adds a new item to an existing subscription. No existing items + will be changed or replaced.

" + operationId: PostSubscriptionItems + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + billing_thresholds: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + price_data: + explode: true + style: deepObject + tax_rates: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + description: Define thresholds at which an invoice will be sent, + and the subscription advanced to a new billing period. When updating, + pass an empty string to remove previously-defined thresholds. + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + payment_behavior: + description: |- + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + enum: + - allow_incomplete + - default_incomplete + - error_if_incomplete + - pending_if_incomplete + type: string + price: + description: The ID of the price object. + maxLength: 5000 + type: string + price_data: + description: Data used to generate a new [Price](https://stripe.com/docs/api/prices) + object inline. + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data type: object - report_type: - description: The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) - to run, such as `"balance.summary.1"`. + proration_behavior: + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting + `billing_cycle_anchor=now`, or starting a trial), or if an item's + `quantity` changes. + enum: + - always_invoice + - create_prorations + - none + type: string + proration_date: + description: If set, the proration will be calculated as though + the subscription was updated at the given time. This can be used + to apply the same proration that was previewed with the [upcoming + invoice](https://stripe.com/docs/api#retrieve_customer_invoice) + endpoint. + format: unix-time + type: integer + quantity: + description: The quantity you'd like to apply to the subscription + item you're creating. + type: integer + subscription: + description: The identifier of the subscription to modify. + maxLength: 5000 type: string + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) + ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) + on the Subscription. When updating, pass an empty string to remove + previously-defined tax rates. required: - - report_type + - subscription type: object required: true responses: @@ -69578,7 +88716,64 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/reporting.report_run" + "$ref": "#/components/schemas/subscription_item" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/subscription_items/{item}": + delete: + description: "

Deletes an item from the subscription. Removing a subscription + item from a subscription will not cancel the subscription.

" + operationId: DeleteSubscriptionItemsItem + parameters: + - in: path + name: item + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: + clear_usage: + description: Delete all usage for the given subscription item. Allowed + only when the current plan's `usage_type` is `metered`. + type: boolean + proration_behavior: + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting + `billing_cycle_anchor=now`, or starting a trial), or if an item's + `quantity` changes. + enum: + - always_invoice + - create_prorations + - none + type: string + proration_date: + description: If set, the proration will be calculated as though + the subscription was updated at the given time. This can be used + to apply the same proration that was previewed with the [upcoming + invoice](https://stripe.com/docs/api#retrieve_customer_invoice) + endpoint. + format: unix-time + type: integer + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/deleted_subscription_item" description: Successful response. default: content: @@ -69586,10 +88781,9 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reporting/report_runs/{report_run}": get: - description: "

Retrieves the details of an existing Report Run.

" - operationId: GetReportingReportRunsReportRun + description: "

Retrieves the subscription item with the given ID.

" + operationId: GetSubscriptionItemsItem parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -69603,7 +88797,7 @@ paths: type: array style: deepObject - in: path - name: report_run + name: item required: true schema: maxLength: 5000 @@ -69623,7 +88817,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/reporting.report_run" + "$ref": "#/components/schemas/subscription_item" description: Successful response. default: content: @@ -69631,11 +88825,209 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reporting/report_types": + post: + description: "

Updates the plan or quantity of an item on a current subscription.

" + operationId: PostSubscriptionItemsItem + parameters: + - in: path + name: item + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + billing_thresholds: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + price_data: + explode: true + style: deepObject + tax_rates: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + description: Define thresholds at which an invoice will be sent, + and the subscription advanced to a new billing period. When updating, + pass an empty string to remove previously-defined thresholds. + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + off_session: + description: Indicates if a customer is on or off-session while + an invoice payment is attempted. + type: boolean + payment_behavior: + description: |- + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + enum: + - allow_incomplete + - default_incomplete + - error_if_incomplete + - pending_if_incomplete + type: string + price: + description: The ID of the price object. When changing a subscription + item's price, `quantity` is set to 1 unless a `quantity` parameter + is provided. + maxLength: 5000 + type: string + price_data: + description: Data used to generate a new [Price](https://stripe.com/docs/api/prices) + object inline. + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data + type: object + proration_behavior: + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting + `billing_cycle_anchor=now`, or starting a trial), or if an item's + `quantity` changes. + enum: + - always_invoice + - create_prorations + - none + type: string + proration_date: + description: If set, the proration will be calculated as though + the subscription was updated at the given time. This can be used + to apply the same proration that was previewed with the [upcoming + invoice](https://stripe.com/docs/api#retrieve_customer_invoice) + endpoint. + format: unix-time + type: integer + quantity: + description: The quantity you'd like to apply to the subscription + item you're creating. + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) + ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) + on the Subscription. When updating, pass an empty string to remove + previously-defined tax rates. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/subscription_item" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/subscription_items/{subscription_item}/usage_record_summaries": get: - description: "

Returns a full list of Report Types.

" - operationId: GetReportingReportTypes + description: |- +

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

+ +

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

+ operationId: GetSubscriptionItemsSubscriptionItemUsageRecordSummaries parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -69647,6 +89039,32 @@ paths: type: string type: array style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - in: path + name: subscription_item + required: true + schema: + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -69665,7 +89083,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/reporting.report_type" + "$ref": "#/components/schemas/usage_record_summary" type: array has_more: description: True if this list has another page of items after @@ -69686,7 +89104,7 @@ paths: - has_more - object - url - title: FinancialReportingFinanceReportTypeList + title: UsageEventsResourceUsageRecordSummaryList type: object x-expandableFields: - data @@ -69697,26 +89115,20 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reporting/report_types/{report_type}": - get: - description:

Retrieves the details of a Report Type. (Certain report types - require a live-mode - API key.)

- operationId: GetReportingReportTypesReportType + "/v1/subscription_items/{subscription_item}/usage_records": + post: + description: |- +

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.

+ operationId: PostSubscriptionItemsSubscriptionItemUsageRecords parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - in: path - name: report_type + name: subscription_item required: true schema: type: string @@ -69724,18 +89136,58 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject + timestamp: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + action: + description: Valid values are `increment` (default) or `set`. When + using `increment` the specified `quantity` will be added to the + usage at the specified timestamp. The `set` action will overwrite + the usage quantity at that timestamp. If the subscription has + [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), + `increment` is the only allowed value. + enum: + - increment + - set + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + quantity: + description: The usage quantity for the specified timestamp. + type: integer + timestamp: + anyOf: + - enum: + - now + maxLength: 5000 + type: string + - type: integer + description: The timestamp for the usage event. This timestamp must + be within the current billing period of the subscription of the + provided `subscription_item`, and must not be in the future. When + passing `"now"`, Stripe records usage for the current time. Default + is `"now"` if a value is not provided. + required: + - quantity type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/reporting.report_type" + "$ref": "#/components/schemas/usage_record" description: Successful response. default: content: @@ -69743,14 +89195,56 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reviews": + "/v1/subscription_schedules": get: - description: "

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.

" - operationId: GetReviews + description: "

Retrieves the list of your subscription schedules.

" + operationId: GetSubscriptionSchedules parameters: - - explode: true + - description: Only return subscription schedules that were created canceled + the given date interval. + explode: true + in: query + name: canceled_at + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return subscription schedules that completed during the + given date interval. + explode: true + in: query + name: completed_at + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return subscription schedules that were created during the + given date interval. + explode: true in: query name: created required: false @@ -69769,6 +89263,14 @@ paths: type: object - type: integer style: deepObject + - description: Only return subscription schedules for the given customer. + in: query + name: customer + required: false + schema: + maxLength: 5000 + type: string + style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -69800,6 +89302,34 @@ paths: schema: type: integer style: form + - description: Only return subscription schedules that were released during + the given date interval. + explode: true + in: query + name: released_at + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: Only return subscription schedules that have not started yet. + in: query + name: scheduled + required: false + schema: + type: boolean + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -69826,35 +89356,413 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/review" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/reviews" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/subscription_schedule" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/subscription_schedules" + type: string + required: + - data + - has_more + - object + - url + title: SubscriptionSchedulesResourceScheduleList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new subscription schedule object. Each customer can + have up to 500 active or scheduled subscriptions.

" + operationId: PostSubscriptionSchedules + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + default_settings: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + phases: + explode: true + style: deepObject + start_date: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + customer: + description: The identifier of the customer to create the subscription + schedule for. + maxLength: 5000 + type: string + default_settings: + description: Object representing the subscription schedule's default + settings. + properties: + application_fee_percent: + type: number + automatic_tax: + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config + type: object + billing_cycle_anchor: + enum: + - automatic + - phase_start + type: string + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + collection_method: + enum: + - charge_automatically + - send_invoice + type: string + default_payment_method: + maxLength: 5000 + type: string + description: + maxLength: 500 + type: string + invoice_settings: + properties: + days_until_due: + type: integer + title: subscription_schedules_param + type: object + transfer_data: + anyOf: + - properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + - enum: + - '' + type: string + title: default_settings_params + type: object + end_behavior: + description: Configures how the subscription schedule behaves when + it ends. Possible values are `release` or `cancel` with the default + being `release`. `release` will end the subscription schedule + and keep the underlying subscription running.`cancel` will end + the subscription schedule and cancel the underlying subscription. + enum: + - cancel + - none + - release + - renew + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + from_subscription: + description: Migrate an existing subscription to be managed by a + subscription schedule. If this parameter is set, a subscription + schedule will be created using the subscription's item(s), set + to auto-renew using the subscription's interval. When using this + parameter, other parameters (such as phase values) cannot be set. + To create a subscription schedule with other modifications, we + recommend making two separate API calls. + maxLength: 5000 + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + phases: + description: List representing phases of the subscription schedule. + Each phase can be customized to have different durations, plans, + and coupons. If there are multiple phases, the `end_date` of one + phase will always equal the `start_date` of the next phase. + items: + properties: + add_invoice_items: + items: + properties: + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + title: one_time_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: add_invoice_item_entry + type: object + type: array + application_fee_percent: + type: number + automatic_tax: + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config + type: object + billing_cycle_anchor: + enum: + - automatic + - phase_start + type: string + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + collection_method: + enum: + - charge_automatically + - send_invoice + type: string + coupon: + maxLength: 5000 + type: string + currency: + type: string + default_payment_method: + maxLength: 5000 + type: string + default_tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: + maxLength: 500 + type: string + end_date: + format: unix-time + type: integer + invoice_settings: + properties: + days_until_due: + type: integer + title: subscription_schedules_param + type: object + items: + items: + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: configuration_item_params + type: object + type: array + iterations: + type: integer + metadata: + additionalProperties: + type: string + type: object + proration_behavior: + enum: + - always_invoice + - create_prorations + - none + type: string + transfer_data: + properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + trial: + type: boolean + trial_end: + format: unix-time + type: integer + required: + - items + title: phase_configuration_params + type: object + type: array + start_date: + anyOf: + - type: integer + - enum: + - now + maxLength: 5000 + type: string + description: When the subscription schedule starts. We recommend + using `now` so that it starts the subscription immediately. You + can also use a Unix timestamp to backdate the subscription so + that it starts on a past date, or set a future date for the subscription + to start on. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/subscription_schedule" description: Successful response. default: content: @@ -69862,10 +89770,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reviews/{review}": + "/v1/subscription_schedules/{schedule}": get: - description: "

Retrieves a Review object.

" - operationId: GetReviewsReview + description: "

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.

" + operationId: GetSubscriptionSchedulesSchedule parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -69879,7 +89789,7 @@ paths: type: array style: deepObject - in: path - name: review + name: schedule required: true schema: maxLength: 5000 @@ -69899,7 +89809,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/review" + "$ref": "#/components/schemas/subscription_schedule" description: Successful response. default: content: @@ -69907,14 +89817,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/reviews/{review}/approve": post: - description: "

Approves a Review object, closing it and removing - it from the list of reviews.

" - operationId: PostReviewsReviewApprove + description: "

Updates an existing subscription schedule.

" + operationId: PostSubscriptionSchedulesSchedule parameters: - in: path - name: review + name: schedule required: true schema: maxLength: 5000 @@ -69924,18 +89832,352 @@ paths: content: application/x-www-form-urlencoded: encoding: + default_settings: + explode: true + style: deepObject expand: explode: true style: deepObject + metadata: + explode: true + style: deepObject + phases: + explode: true + style: deepObject schema: additionalProperties: false properties: + default_settings: + description: Object representing the subscription schedule's default + settings. + properties: + application_fee_percent: + type: number + automatic_tax: + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config + type: object + billing_cycle_anchor: + enum: + - automatic + - phase_start + type: string + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + collection_method: + enum: + - charge_automatically + - send_invoice + type: string + default_payment_method: + maxLength: 5000 + type: string + description: + maxLength: 500 + type: string + invoice_settings: + properties: + days_until_due: + type: integer + title: subscription_schedules_param + type: object + transfer_data: + anyOf: + - properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + - enum: + - '' + type: string + title: default_settings_params + type: object + end_behavior: + description: Configures how the subscription schedule behaves when + it ends. Possible values are `release` or `cancel` with the default + being `release`. `release` will end the subscription schedule + and keep the underlying subscription running.`cancel` will end + the subscription schedule and cancel the underlying subscription. + enum: + - cancel + - none + - release + - renew + type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + phases: + description: List representing phases of the subscription schedule. + Each phase can be customized to have different durations, plans, + and coupons. If there are multiple phases, the `end_date` of one + phase will always equal the `start_date` of the next phase. Note + that past phases can be omitted. + items: + properties: + add_invoice_items: + items: + properties: + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + title: one_time_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: add_invoice_item_entry + type: object + type: array + application_fee_percent: + type: number + automatic_tax: + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config + type: object + billing_cycle_anchor: + enum: + - automatic + - phase_start + type: string + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + collection_method: + enum: + - charge_automatically + - send_invoice + type: string + coupon: + maxLength: 5000 + type: string + default_payment_method: + maxLength: 5000 + type: string + default_tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: + maxLength: 500 + type: string + end_date: + anyOf: + - type: integer + - enum: + - now + maxLength: 5000 + type: string + invoice_settings: + properties: + days_until_due: + type: integer + title: subscription_schedules_param + type: object + items: + items: + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: configuration_item_params + type: object + type: array + iterations: + type: integer + metadata: + additionalProperties: + type: string + type: object + proration_behavior: + enum: + - always_invoice + - create_prorations + - none + type: string + start_date: + anyOf: + - type: integer + - enum: + - now + maxLength: 5000 + type: string + transfer_data: + properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + trial: + type: boolean + trial_end: + anyOf: + - type: integer + - enum: + - now + maxLength: 5000 + type: string + required: + - items + title: phase_configuration_params + type: object + type: array + proration_behavior: + description: If the update changes the current phase, indicates + whether the changes should be prorated. The default value is `create_prorations`. + enum: + - always_invoice + - create_prorations + - none + type: string type: object required: false responses: @@ -69943,7 +90185,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/review" + "$ref": "#/components/schemas/subscription_schedule" description: Successful response. default: content: @@ -69951,95 +90193,100 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/setup_attempts": - get: - description: "

Returns a list of SetupAttempts associated with a provided - SetupIntent.

" - operationId: GetSetupAttempts + "/v1/subscription_schedules/{schedule}/cancel": + post: + description: "

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.

" + operationId: PostSubscriptionSchedulesScheduleCancel parameters: - - description: |- - 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. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: |- - Only return SetupAttempts created by the SetupIntent specified by - this ID. - in: query - name: setup_intent + - in: path + name: schedule required: true schema: maxLength: 5000 type: string - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + invoice_now: + description: If the subscription schedule is `active`, indicates + if a final invoice will be generated that contains any un-invoiced + metered usage and new/pending proration invoice items. Defaults + to `true`. + type: boolean + prorate: + description: If the subscription schedule is `active`, indicates + if the cancellation should be prorated. Defaults to `true`. + type: boolean + type: object required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/subscription_schedule" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/subscription_schedules/{schedule}/release": + post: + description: "

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.

" + operationId: PostSubscriptionSchedulesScheduleRelease + parameters: + - in: path + name: schedule + required: true schema: maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + preserve_cancel_date: + description: Keep any cancellation on the subscription that the + schedule has set + type: boolean type: object required: false responses: @@ -70047,36 +90294,7 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/setup_attempt" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/setup_attempts" - type: string - required: - - data - - has_more - - object - - url - title: PaymentFlowsSetupIntentSetupAttemptList - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/subscription_schedule" description: Successful response. default: content: @@ -70084,15 +90302,24 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/setup_intents": + "/v1/subscriptions": get: - description: "

Returns a list of SetupIntents.

" - operationId: GetSetupIntents + description: "

By default, returns a list of subscriptions that have not been + canceled. In order to list canceled subscriptions, specify status=canceled.

" + operationId: GetSubscriptions parameters: - - description: 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. - explode: true + - description: The collection method of the subscriptions to retrieve. Either + `charge_automatically` or `send_invoice`. + in: query + name: collection_method + required: false + schema: + enum: + - charge_automatically + - send_invoice + type: string + style: form + - explode: true in: query name: created required: false @@ -70111,8 +90338,45 @@ paths: type: object - type: integer style: deepObject - - description: Only return SetupIntents for the customer specified by this customer - ID. + - explode: true + in: query + name: current_period_end + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - explode: true + in: query + name: current_period_start + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: The ID of the customer whose subscriptions will be retrieved. in: query name: customer required: false @@ -70151,10 +90415,9 @@ paths: schema: type: integer style: form - - description: Only return SetupIntents associated with the specified payment - method. + - description: Filter for subscriptions that contain this recurring price ID. in: query - name: payment_method + name: price required: false schema: maxLength: 5000 @@ -70172,6 +90435,40 @@ paths: maxLength: 5000 type: string style: form + - description: The status of the subscriptions to retrieve. Passing in a value + of `canceled` will return all canceled subscriptions, including those belonging + to deleted customers. Pass `ended` to find subscriptions that are canceled + and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). + Passing in a value of `all` will return subscriptions of all statuses. If + no value is supplied, all subscriptions that have not been canceled are + returned. + in: query + name: status + required: false + schema: + enum: + - active + - all + - canceled + - ended + - incomplete + - incomplete_expired + - past_due + - trialing + - unpaid + type: string + x-stripeBypassValidation: true + style: form + - description: Filter for subscriptions that are associated with the specified + test clock. The response will not include subscriptions with test clocks + if this and the customer parameter is not set. + in: query + name: test_clock + required: false + schema: + maxLength: 5000 + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -70190,7 +90487,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/setup_intent" + "$ref": "#/components/schemas/subscription" type: array has_more: description: True if this list has another page of items after @@ -70205,14 +90502,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/setup_intents" + pattern: "^/v1/subscriptions" type: string required: - data - has_more - object - url - title: PaymentFlowsSetupIntentList + title: SubscriptionsSubscriptionList type: object x-expandableFields: - data @@ -70225,338 +90522,226 @@ paths: description: Error response. post: description: |- -

Creates a SetupIntent object.

+

Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions.

-

After the SetupIntent is created, attach a payment method and confirm - to collect any required permissions to charge the payment method later.

- operationId: PostSetupIntents +

When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + The payment_behavior parameter determines the exact behavior of the initial payment.

+ +

To start subscriptions where the first invoice always begins in a draft status, use subscription schedules instead. + Schedules provide the flexibility to model more complex billing configurations that change over time.

+ operationId: PostSubscriptions requestBody: content: application/x-www-form-urlencoded: encoding: - expand: + add_invoice_items: explode: true style: deepObject - mandate_data: + automatic_tax: explode: true style: deepObject - metadata: + billing_thresholds: explode: true style: deepObject - payment_method_options: + default_tax_rates: explode: true style: deepObject - payment_method_types: + expand: explode: true style: deepObject - single_use: + items: explode: true style: deepObject - schema: - additionalProperties: false - properties: - confirm: - description: Set to `true` to attempt to confirm this SetupIntent - immediately. This parameter defaults to `false`. If the payment - method attached is a card, a return_url may be provided in case - additional authentication is required. - type: boolean - customer: - description: |- - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. - maxLength: 5000 - type: string - description: - description: An arbitrary string attached to the object. Often useful - for displaying to users. - maxLength: 1000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - mandate_data: - description: This hash contains details about the Mandate to create. - This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - properties: - customer_acceptance: - properties: - accepted_at: - format: unix-time - type: integer - offline: - properties: {} - title: offline_param - type: object - online: - properties: - ip_address: - type: string - user_agent: - maxLength: 5000 - type: string - required: - - ip_address - - user_agent - title: online_param - type: object - type: - enum: - - offline - - online - maxLength: 5000 - type: string - required: - - type - title: customer_acceptance_param - type: object - required: - - customer_acceptance - title: secret_key_param - type: object - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - on_behalf_of: - description: The Stripe account ID for which this SetupIntent is - created. - type: string - payment_method: - description: ID of the payment method (a PaymentMethod, Card, or - saved Source object) to attach to this SetupIntent. - maxLength: 5000 - type: string - payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. - properties: - acss_debit: - properties: - currency: - enum: - - cad - - usd - type: string - mandate_options: - properties: - custom_mandate_url: - anyOf: - - type: string - - enum: - - '' - type: string - default_for: - items: - enum: - - invoice - - subscription - type: string - type: array - interval_description: - maxLength: 500 - type: string - payment_schedule: - enum: - - combined - - interval - - sporadic - type: string - transaction_type: - enum: - - business - - personal - type: string - title: setup_intent_payment_method_options_mandate_options_param - type: object - verification_method: - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: setup_intent_payment_method_options_param - type: object - card: - properties: - request_three_d_secure: - enum: - - any - - automatic - maxLength: 5000 - type: string - x-stripeBypassValidation: true - title: setup_intent_param - type: object - sepa_debit: - properties: - mandate_options: - properties: {} - title: payment_method_options_mandate_options_param - type: object - title: setup_intent_payment_method_options_param - type: object - title: payment_method_options_param - type: object - payment_method_types: - description: The list of payment method types (e.g. card) that this - SetupIntent is allowed to use. If this is not provided, defaults - to ["card"]. - items: - maxLength: 5000 - type: string - type: array - return_url: - description: The URL to redirect your customer back to after they - authenticate or cancel their payment on the payment method's app - or site. If you'd prefer to redirect to a mobile application, - you can alternatively supply an application URI scheme. This parameter - can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). - type: string - single_use: - description: If this hash is populated, this SetupIntent will generate - a single_use Mandate on success. - properties: - amount: - type: integer - currency: - type: string - required: - - amount - - currency - title: setup_intent_single_use_params - type: object - usage: - description: Indicates how the payment method is intended to be - used in the future. If not provided, this value defaults to `off_session`. - enum: - - off_session - - on_session - type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/setup_intent" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/setup_intents/{intent}": - get: - description: |- -

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.

- operationId: GetSetupIntentsIntent - parameters: - - description: The client secret of the SetupIntent. Required if a publishable - key is used to retrieve the SetupIntent. - in: query - name: client_secret - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: intent - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/setup_intent" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Updates a SetupIntent object.

" - operationId: PostSetupIntentsIntent - parameters: - - in: path - name: intent - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: + metadata: explode: true style: deepObject - metadata: + payment_settings: explode: true style: deepObject - payment_method_options: + pending_invoice_item_interval: explode: true style: deepObject - payment_method_types: + transfer_data: + explode: true + style: deepObject + trial_end: explode: true style: deepObject schema: additionalProperties: false properties: + add_invoice_items: + description: A list of prices and quantities that will generate + invoice items appended to the next invoice for this subscription. + You may pass up to 20 items. + items: + properties: + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + title: one_time_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: add_invoice_item_entry + type: object + type: array + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most + two decimal places. This represents the percentage of the subscription + invoice subtotal that will be transferred to the application owner's + Stripe account. The request must be made by a platform account + on a connected account in order to set an application fee percentage. + For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + type: number + automatic_tax: + description: Automatic tax settings for this subscription. We recommend + you only include this parameter when the existing value is being + changed. + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config + type: object + backdate_start_date: + description: For new subscriptions, a past timestamp to backdate + the subscription's start date to. If set, the first invoice will + contain a proration for the timespan between the start date and + the current time. Can be combined with trials and the billing + cycle anchor. + format: unix-time + type: integer + billing_cycle_anchor: + description: A future timestamp to anchor the subscription's [billing + cycle](https://stripe.com/docs/subscriptions/billing-cycle). This + is used to determine the date of the first full invoice, and, + for plans with `month` or `year` intervals, the day of the month + for subsequent invoices. The timestamp is in UTC format. + format: unix-time + type: integer + x-stripeBypassValidation: true + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + description: Define thresholds at which an invoice will be sent, + and the subscription advanced to a new billing period. Pass an + empty string to remove previously-defined thresholds. + cancel_at: + description: A timestamp at which the subscription should cancel. + If set to a date before the current period ends, this will cause + a proration if prorations have been enabled using `proration_behavior`. + If set during a future period, this will always cause a proration + for that period. + format: unix-time + type: integer + cancel_at_period_end: + description: Boolean indicating whether this subscription should + cancel at the end of the current period. + type: boolean + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When + charging automatically, Stripe will attempt to pay this subscription + at the end of the cycle using the default source attached to the + customer. When sending an invoice, Stripe will email your customer + an invoice with payment instructions. Defaults to `charge_automatically`. + enum: + - charge_automatically + - send_invoice + type: string + coupon: + description: The ID of the coupon to apply to this subscription. + A coupon applied to a subscription will only affect invoices created + for that particular subscription. + maxLength: 5000 + type: string + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string customer: - description: |- - ID of the Customer this SetupIntent belongs to, if one exists. - - If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + description: The identifier of the customer to subscribe. + maxLength: 5000 + type: string + days_until_due: + description: Number of days a customer has to pay invoices generated + by this subscription. Valid only for subscriptions where `collection_method` + is set to `send_invoice`. + type: integer + default_payment_method: + description: ID of the default payment method for the subscription. + It must belong to the customer associated with the subscription. + This takes precedence over `default_source`. If neither are set, + invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + maxLength: 5000 + type: string + default_source: + description: ID of the default payment source for the subscription. + It must belong to the customer associated with the subscription + and be in a chargeable state. If `default_payment_method` is also + set, `default_payment_method` will take precedence. If neither + are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). maxLength: 5000 type: string + default_tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: The tax rates that will apply to any subscription item + that does not have `tax_rates` set. Invoices created will have + their `default_tax_rates` populated from the subscription. description: - description: An arbitrary string attached to the object. Often useful - for displaying to users. - maxLength: 1000 + description: The subscription's description, meant to be displayable + to the customer. Use this field to optionally store an explanation + of the subscription for rendering in Stripe surfaces. + maxLength: 500 type: string expand: description: Specifies which fields in the response should be expanded. @@ -70564,6 +90749,83 @@ paths: maxLength: 5000 type: string type: array + items: + description: A list of up to 20 subscription items, each with an + attached price. + items: + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + metadata: + additionalProperties: + type: string + type: object + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: subscription_item_create_params + type: object + type: array metadata: anyOf: - additionalProperties: @@ -70577,153 +90839,307 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - payment_method: - description: ID of the payment method (a PaymentMethod, Card, or - saved Source object) to attach to this SetupIntent. - maxLength: 5000 + off_session: + description: Indicates if a customer is on or off-session while + an invoice payment is attempted. + type: boolean + payment_behavior: + description: |- + Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + + `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. + enum: + - allow_incomplete + - default_incomplete + - error_if_incomplete + - pending_if_incomplete type: string - payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. + payment_settings: + description: Payment settings to pass to invoices created by the + subscription. properties: - acss_debit: + payment_method_options: properties: - currency: - enum: - - cad - - usd - type: string - mandate_options: - properties: - custom_mandate_url: - anyOf: - - type: string - - enum: - - '' + acss_debit: + anyOf: + - properties: + mandate_options: + properties: + transaction_type: + enum: + - business + - personal + type: string + title: mandate_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits type: string - default_for: - items: + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + bancontact: + anyOf: + - properties: + preferred_language: enum: - - invoice - - subscription + - de + - en + - fr + - nl type: string - type: array - interval_description: - maxLength: 500 - type: string - payment_schedule: - enum: - - combined - - interval - - sporadic - type: string - transaction_type: - enum: - - business - - personal - type: string - title: setup_intent_payment_method_options_mandate_options_param - type: object - verification_method: - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: setup_intent_payment_method_options_param + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + card: + anyOf: + - properties: + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + description: + maxLength: 200 + type: string + title: mandate_options_param + type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + type: string + title: subscription_payment_method_options_param + type: object + - enum: + - '' + type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + title: payment_method_options type: object - card: - properties: - request_three_d_secure: + payment_method_types: + anyOf: + - items: enum: - - any - - automatic - maxLength: 5000 + - ach_credit_transfer + - ach_debit + - acss_debit + - au_becs_debit + - bacs_debit + - bancontact + - boleto + - card + - customer_balance + - fpx + - giropay + - grabpay + - ideal + - konbini + - link + - paynow + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay type: string x-stripeBypassValidation: true - title: setup_intent_param - type: object - sepa_debit: - properties: - mandate_options: - properties: {} - title: payment_method_options_mandate_options_param - type: object - title: setup_intent_payment_method_options_param - type: object - title: payment_method_options_param + type: array + - enum: + - '' + type: string + save_default_payment_method: + enum: + - 'off' + - on_subscription + type: string + title: payment_settings type: object - payment_method_types: - description: The list of payment method types (e.g. card) that this - SetupIntent is allowed to set up. If this is not provided, defaults - to ["card"]. - items: - maxLength: 5000 + pending_invoice_item_interval: + anyOf: + - properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: pending_invoice_item_interval_params + type: object + - enum: + - '' type: string - type: array - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/setup_intent" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/setup_intents/{intent}/cancel": - post: - description: |- -

A SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action.

- -

Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.

- operationId: PostSetupIntentsIntentCancel - parameters: - - in: path - name: intent - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - cancellation_reason: - description: Reason for canceling this SetupIntent. Possible values - are `abandoned`, `requested_by_customer`, or `duplicate` - enum: - - abandoned - - duplicate - - requested_by_customer + description: Specifies an interval for how often to bill for any + pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) + for the given subscription at the specified interval. + promotion_code: + description: The API ID of a promotion code to apply to this subscription. + A promotion code applied to a subscription will only affect invoices + created for that particular subscription. maxLength: 5000 type: string - expand: - description: Specifies which fields in the response should be expanded. - items: + proration_behavior: + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + resulting from the `billing_cycle_anchor`. If no value is passed, + the default is `create_prorations`. + enum: + - always_invoice + - create_prorations + - none + type: string + transfer_data: + description: If specified, the funds from the subscription's invoices + will be transferred to the destination and the ID of the resulting + transfers will be found on the resulting charges. + properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + trial_end: + anyOf: + - enum: + - now maxLength: 5000 type: string - type: array + - format: unix-time + type: integer + description: Unix timestamp representing the end of the trial period + the customer will get before being charged for the first time. + This will always overwrite any trials that might apply via a subscribed + plan. If set, trial_end will override the default trial period + of the plan the customer is being subscribed to. The special value + `now` can be provided to end the customer's trial immediately. + Can be at most two years from `billing_cycle_anchor`. See [Using + trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) + to learn more. + trial_from_plan: + description: Indicates if a plan's `trial_period_days` should be + applied to the subscription. Setting `trial_end` per subscription + is preferred, and this defaults to `false`. Setting this flag + to `true` together with `trial_end` is not allowed. See [Using + trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) + to learn more. + type: boolean + trial_period_days: + description: Integer representing the number of trial period days + before the customer is charged for the first time. This will always + overwrite any trials that might apply via a subscribed plan. See + [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) + to learn more. + type: integer + required: + - customer type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/setup_intent" + "$ref": "#/components/schemas/subscription" description: Successful response. default: content: @@ -70731,204 +91147,60 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/setup_intents/{intent}/confirm": - post: + "/v1/subscriptions/search": + get: description: |- -

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.

- operationId: PostSetupIntentsIntentConfirm +

Search for subscriptions you’ve previously created using Stripe’s Search Query Language. + Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating + conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + to an hour behind during outages. Search functionality is not available to merchants in India.

+ operationId: GetSubscriptionsSearch parameters: - - in: path - name: intent + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for pagination across multiple pages of results. Don't + include this parameter on the first call. Use the next_page value returned + in a previous response to request subsequent results. + in: query + name: page + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) + and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + in: query + name: query required: true schema: maxLength: 5000 type: string - style: simple + style: form requestBody: content: application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - mandate_data: - explode: true - style: deepObject - payment_method_options: - explode: true - style: deepObject + encoding: {} schema: additionalProperties: false - properties: - client_secret: - description: The client secret of the SetupIntent. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - mandate_data: - anyOf: - - properties: - customer_acceptance: - properties: - accepted_at: - format: unix-time - type: integer - offline: - properties: {} - title: offline_param - type: object - online: - properties: - ip_address: - type: string - user_agent: - maxLength: 5000 - type: string - required: - - ip_address - - user_agent - title: online_param - type: object - type: - enum: - - offline - - online - maxLength: 5000 - type: string - required: - - type - title: customer_acceptance_param - type: object - required: - - customer_acceptance - title: secret_key_param - type: object - - properties: - customer_acceptance: - properties: - online: - properties: - ip_address: - type: string - user_agent: - maxLength: 5000 - type: string - title: online_param - type: object - type: - enum: - - online - maxLength: 5000 - type: string - required: - - online - - type - title: customer_acceptance_param - type: object - required: - - customer_acceptance - title: client_key_param - type: object - description: This hash contains details about the Mandate to create - payment_method: - description: ID of the payment method (a PaymentMethod, Card, or - saved Source object) to attach to this SetupIntent. - maxLength: 5000 - type: string - payment_method_options: - description: Payment-method-specific configuration for this SetupIntent. - properties: - acss_debit: - properties: - currency: - enum: - - cad - - usd - type: string - mandate_options: - properties: - custom_mandate_url: - anyOf: - - type: string - - enum: - - '' - type: string - default_for: - items: - enum: - - invoice - - subscription - type: string - type: array - interval_description: - maxLength: 500 - type: string - payment_schedule: - enum: - - combined - - interval - - sporadic - type: string - transaction_type: - enum: - - business - - personal - type: string - title: setup_intent_payment_method_options_mandate_options_param - type: object - verification_method: - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: setup_intent_payment_method_options_param - type: object - card: - properties: - request_three_d_secure: - enum: - - any - - automatic - maxLength: 5000 - type: string - x-stripeBypassValidation: true - title: setup_intent_param - type: object - sepa_debit: - properties: - mandate_options: - properties: {} - title: payment_method_options_mandate_options_param - type: object - title: setup_intent_payment_method_options_param - type: object - title: payment_method_options_param - type: object - return_url: - description: |- - The URL to redirect your customer back to after they authenticate on the payment method's app or site. - If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. - This parameter is only used for cards and other redirect-based payment methods. - type: string + properties: {} type: object required: false responses: @@ -70936,7 +91208,40 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/setup_intent" + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/subscription" + type: array + has_more: + type: boolean + next_page: + maxLength: 5000 + nullable: true + type: string + object: + description: String representing the object's type. Objects of + the same type share the same value. + enum: + - search_result + type: string + total_count: + description: The total number of objects that match the query, + only accurate up to 10,000. + type: integer + url: + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: SearchResult + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -70944,13 +91249,18 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/setup_intents/{intent}/verify_microdeposits": - post: - description: "

Verifies microdeposits on a SetupIntent object.

" - operationId: PostSetupIntentsIntentVerifyMicrodeposits + "/v1/subscriptions/{subscription_exposed_id}": + delete: + description: |- +

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.

+ operationId: DeleteSubscriptionsSubscriptionExposedId parameters: - in: path - name: intent + name: subscription_exposed_id required: true schema: maxLength: 5000 @@ -70960,31 +91270,26 @@ paths: content: application/x-www-form-urlencoded: encoding: - amounts: - explode: true - style: deepObject expand: explode: true style: deepObject schema: additionalProperties: false properties: - amounts: - description: Two positive integers, in *cents*, equal to the values - of the microdeposits sent to the bank account. - items: - type: integer - type: array - client_secret: - description: The client secret of the SetupIntent. - maxLength: 5000 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + invoice_now: + description: Will generate a final invoice that invoices for any + un-invoiced metered usage and new/pending proration invoice items. + type: boolean + prorate: + description: Will generate a proration invoice item that credits + remaining unused time until the subscription period end. + type: boolean type: object required: false responses: @@ -70992,7 +91297,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/setup_intent" + "$ref": "#/components/schemas/subscription" description: Successful response. default: content: @@ -71000,59 +91305,10 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/shipping_rates": get: - description: "

Returns a list of your shipping rates.

" - operationId: GetShippingRates + description: "

Retrieves the subscription with the given ID.

" + operationId: GetSubscriptionsSubscriptionExposedId parameters: - - description: Only return shipping rates that are active or inactive. - in: query - name: active - required: false - schema: - type: boolean - style: form - - description: 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. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return shipping rates for the given currency. - in: query - name: currency - required: false - schema: - type: string - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -71064,26 +91320,13 @@ paths: type: string type: array style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false + - in: path + name: subscription_exposed_id + required: true schema: maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -71098,36 +91341,7 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/shipping_rate" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/shipping_rates" - type: string - required: - - data - - has_more - - object - - url - title: ShippingResourcesShippingRateList - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/subscription" description: Successful response. default: content: @@ -71136,71 +91350,228 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Creates a new shipping rate object.

" - operationId: PostShippingRates + description:

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.

+ operationId: PostSubscriptionsSubscriptionExposedId + parameters: + - in: path + name: subscription_exposed_id + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: encoding: - delivery_estimate: + add_invoice_items: explode: true style: deepObject - expand: + automatic_tax: explode: true style: deepObject - fixed_amount: + billing_thresholds: explode: true style: deepObject - metadata: + cancel_at: explode: true style: deepObject - schema: - additionalProperties: false - properties: - delivery_estimate: - description: The estimated range for how long shipping will take, - meant to be displayable to the customer. This will appear on CheckoutSessions. - properties: - maximum: - properties: - unit: - enum: - - business_day - - day - - hour - - month - - week - type: string - value: - type: integer - required: - - unit - - value - title: delivery_estimate_bound - type: object - minimum: - properties: - unit: - enum: - - business_day - - day - - hour - - month - - week + default_tax_rates: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + items: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + pause_collection: + explode: true + style: deepObject + payment_settings: + explode: true + style: deepObject + pending_invoice_item_interval: + explode: true + style: deepObject + transfer_data: + explode: true + style: deepObject + trial_end: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + add_invoice_items: + description: A list of prices and quantities that will generate + invoice items appended to the next invoice for this subscription. + You may pass up to 20 items. + items: + properties: + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + title: one_time_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' type: string - value: - type: integer - required: - - unit - - value - title: delivery_estimate_bound - type: object - title: delivery_estimate + title: add_invoice_item_entry + type: object + type: array + application_fee_percent: + description: A non-negative decimal between 0 and 100, with at most + two decimal places. This represents the percentage of the subscription + invoice subtotal that will be transferred to the application owner's + Stripe account. The request must be made by a platform account + on a connected account in order to set an application fee percentage. + For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + type: number + automatic_tax: + description: Automatic tax settings for this subscription. We recommend + you only include this parameter when the existing value is being + changed. + properties: + enabled: + type: boolean + required: + - enabled + title: automatic_tax_config type: object - display_name: - description: The name of the shipping rate, meant to be displayable - to the customer. This will appear on CheckoutSessions. - maxLength: 100 + billing_cycle_anchor: + description: Either `now` or `unchanged`. Setting the value to `now` + resets the subscription's billing cycle anchor to the current + time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + enum: + - now + - unchanged + maxLength: 5000 + type: string + x-stripeBypassValidation: true + billing_thresholds: + anyOf: + - properties: + amount_gte: + type: integer + reset_billing_cycle_anchor: + type: boolean + title: billing_thresholds_param + type: object + - enum: + - '' + type: string + description: Define thresholds at which an invoice will be sent, + and the subscription advanced to a new billing period. Pass an + empty string to remove previously-defined thresholds. + cancel_at: + anyOf: + - format: unix-time + type: integer + - enum: + - '' + type: string + description: A timestamp at which the subscription should cancel. + If set to a date before the current period ends, this will cause + a proration if prorations have been enabled using `proration_behavior`. + If set during a future period, this will always cause a proration + for that period. + cancel_at_period_end: + description: Boolean indicating whether this subscription should + cancel at the end of the current period. + type: boolean + collection_method: + description: Either `charge_automatically`, or `send_invoice`. When + charging automatically, Stripe will attempt to pay this subscription + at the end of the cycle using the default source attached to the + customer. When sending an invoice, Stripe will email your customer + an invoice with payment instructions. Defaults to `charge_automatically`. + enum: + - charge_automatically + - send_invoice + type: string + coupon: + description: The ID of the coupon to apply to this subscription. + A coupon applied to a subscription will only affect invoices created + for that particular subscription. + maxLength: 5000 + type: string + days_until_due: + description: Number of days a customer has to pay invoices generated + by this subscription. Valid only for subscriptions where `collection_method` + is set to `send_invoice`. + type: integer + default_payment_method: + description: ID of the default payment method for the subscription. + It must belong to the customer associated with the subscription. + This takes precedence over `default_source`. If neither are set, + invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + maxLength: 5000 + type: string + default_source: + description: ID of the default payment source for the subscription. + It must belong to the customer associated with the subscription + and be in a chargeable state. If `default_payment_method` is also + set, `default_payment_method` will take precedence. If neither + are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) + or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + maxLength: 5000 + type: string + default_tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + description: The tax rates that will apply to any subscription item + that does not have `tax_rates` set. Invoices created will have + their `default_tax_rates` populated from the subscription. Pass + an empty string to remove previously-defined tax rates. + description: + description: The subscription's description, meant to be displayable + to the customer. Use this field to optionally store an explanation + of the subscription for rendering in Stripe surfaces. + maxLength: 500 type: string expand: description: Specifies which fields in the response should be expanded. @@ -71208,57 +91579,434 @@ paths: maxLength: 5000 type: string type: array - fixed_amount: - description: Describes a fixed amount to charge for shipping. Must - be present if type is `fixed_amount`. - properties: - amount: - type: integer - currency: - type: string - required: - - amount - - currency - title: fixed_amount - type: object + items: + description: A list of up to 20 subscription items, each with an + attached price. + items: + properties: + billing_thresholds: + anyOf: + - properties: + usage_gte: + type: integer + required: + - usage_gte + title: item_billing_thresholds_param + type: object + - enum: + - '' + type: string + clear_usage: + type: boolean + deleted: + type: boolean + id: + maxLength: 5000 + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + price: + maxLength: 5000 + type: string + price_data: + properties: + currency: + type: string + product: + maxLength: 5000 + type: string + recurring: + properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: recurring_adhoc + type: object + tax_behavior: + enum: + - exclusive + - inclusive + - unspecified + type: string + unit_amount: + type: integer + unit_amount_decimal: + format: decimal + type: string + required: + - currency + - product + - recurring + title: recurring_price_data + type: object + quantity: + type: integer + tax_rates: + anyOf: + - items: + maxLength: 5000 + type: string + type: array + - enum: + - '' + type: string + title: subscription_item_update_params + type: object + type: array metadata: - additionalProperties: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - type: object - tax_behavior: - description: Specifies whether the rate is considered inclusive - of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, - or `unspecified`. + off_session: + description: Indicates if a customer is on or off-session while + an invoice payment is attempted. + type: boolean + pause_collection: + anyOf: + - properties: + behavior: + enum: + - keep_as_draft + - mark_uncollectible + - void + type: string + resumes_at: + format: unix-time + type: integer + required: + - behavior + title: pause_collection_param + type: object + - enum: + - '' + type: string + description: If specified, payment collection for this subscription + will be paused. + payment_behavior: + description: |- + Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + + Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + + Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + + Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. enum: - - exclusive - - inclusive - - unspecified + - allow_incomplete + - default_incomplete + - error_if_incomplete + - pending_if_incomplete type: string - tax_code: - description: A [tax code](https://stripe.com/docs/tax/tax-codes) - ID. The Shipping tax code is `txcd_92010001`. + payment_settings: + description: Payment settings to pass to invoices created by the + subscription. + properties: + payment_method_options: + properties: + acss_debit: + anyOf: + - properties: + mandate_options: + properties: + transaction_type: + enum: + - business + - personal + type: string + title: mandate_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + bancontact: + anyOf: + - properties: + preferred_language: + enum: + - de + - en + - fr + - nl + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + card: + anyOf: + - properties: + mandate_options: + properties: + amount: + type: integer + amount_type: + enum: + - fixed + - maximum + type: string + description: + maxLength: 200 + type: string + title: mandate_options_param + type: object + network: + enum: + - amex + - cartes_bancaires + - diners + - discover + - interac + - jcb + - mastercard + - unionpay + - unknown + - visa + maxLength: 5000 + type: string + x-stripeBypassValidation: true + request_three_d_secure: + enum: + - any + - automatic + type: string + title: subscription_payment_method_options_param + type: object + - enum: + - '' + type: string + customer_balance: + anyOf: + - properties: + bank_transfer: + properties: + eu_bank_transfer: + properties: + country: + maxLength: 5000 + type: string + required: + - country + title: eu_bank_transfer_param + type: object + type: + type: string + title: bank_transfer_param + type: object + funding_type: + type: string + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + konbini: + anyOf: + - properties: {} + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + us_bank_account: + anyOf: + - properties: + financial_connections: + properties: + permissions: + items: + enum: + - balances + - ownership + - payment_method + - transactions + maxLength: 5000 + type: string + x-stripeBypassValidation: true + type: array + title: invoice_linked_account_options_param + type: object + verification_method: + enum: + - automatic + - instant + - microdeposits + type: string + x-stripeBypassValidation: true + title: invoice_payment_method_options_param + type: object + - enum: + - '' + type: string + title: payment_method_options + type: object + payment_method_types: + anyOf: + - items: + enum: + - ach_credit_transfer + - ach_debit + - acss_debit + - au_becs_debit + - bacs_debit + - bancontact + - boleto + - card + - customer_balance + - fpx + - giropay + - grabpay + - ideal + - konbini + - link + - paynow + - promptpay + - sepa_debit + - sofort + - us_bank_account + - wechat_pay + type: string + x-stripeBypassValidation: true + type: array + - enum: + - '' + type: string + save_default_payment_method: + enum: + - 'off' + - on_subscription + type: string + title: payment_settings + type: object + pending_invoice_item_interval: + anyOf: + - properties: + interval: + enum: + - day + - month + - week + - year + type: string + interval_count: + type: integer + required: + - interval + title: pending_invoice_item_interval_params + type: object + - enum: + - '' + type: string + description: Specifies an interval for how often to bill for any + pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) + for the given subscription at the specified interval. + promotion_code: + description: The promotion code to apply to this subscription. A + promotion code applied to a subscription will only affect invoices + created for that particular subscription. + maxLength: 5000 type: string - type: - description: The type of calculation to use on the shipping rate. - Can only be `fixed_amount` for now. + proration_behavior: + description: Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) + when the billing cycle changes (e.g., when switching plans, resetting + `billing_cycle_anchor=now`, or starting a trial), or if an item's + `quantity` changes. enum: - - fixed_amount + - always_invoice + - create_prorations + - none type: string - required: - - display_name + proration_date: + description: If set, the proration will be calculated as though + the subscription was updated at the given time. This can be used + to apply exactly the same proration that was previewed with [upcoming + invoice](https://stripe.com/docs/api#retrieve_customer_invoice) + endpoint. It can also be used to implement custom proration logic, + such as prorating by day instead of by second, by providing the + time that you wish to use for proration calculations. + format: unix-time + type: integer + transfer_data: + anyOf: + - properties: + amount_percent: + type: number + destination: + type: string + required: + - destination + title: transfer_data_specs + type: object + - enum: + - '' + type: string + description: If specified, the funds from the subscription's invoices + will be transferred to the destination and the ID of the resulting + transfers will be found on the resulting charges. This will be + unset if you POST an empty value. + trial_end: + anyOf: + - enum: + - now + maxLength: 5000 + type: string + - format: unix-time + type: integer + description: Unix timestamp representing the end of the trial period + the customer will get before being charged for the first time. + This will always overwrite any trials that might apply via a subscribed + plan. If set, trial_end will override the default trial period + of the plan the customer is being subscribed to. The special value + `now` can be provided to end the customer's trial immediately. + Can be at most two years from `billing_cycle_anchor`. + trial_from_plan: + description: Indicates if a plan's `trial_period_days` should be + applied to the subscription. Setting `trial_end` per subscription + is preferred, and this defaults to `false`. Setting this flag + to `true` together with `trial_end` is not allowed. See [Using + trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) + to learn more. + type: boolean type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/shipping_rate" + "$ref": "#/components/schemas/subscription" description: Successful response. default: content: @@ -71266,24 +92014,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/shipping_rates/{shipping_rate_token}": - get: - description: "

Returns the shipping rate object with the given ID.

" - operationId: GetShippingRatesShippingRateToken + "/v1/subscriptions/{subscription_exposed_id}/discount": + delete: + description: "

Removes the currently applied discount on a subscription.

" + operationId: DeleteSubscriptionsSubscriptionExposedIdDiscount parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - in: path - name: shipping_rate_token + name: subscription_exposed_id required: true schema: maxLength: 5000 @@ -71303,69 +92040,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/shipping_rate" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Updates an existing shipping rate object.

" - operationId: PostShippingRatesShippingRateToken - parameters: - - in: path - name: shipping_rate_token - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - active: - description: Whether the shipping rate can be used for new purchases. - Defaults to `true`. - type: boolean - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/shipping_rate" + "$ref": "#/components/schemas/deleted_discount" description: Successful response. default: content: @@ -71373,10 +92048,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sigma/scheduled_query_runs": + "/v1/tax_codes": get: - description: "

Returns a list of scheduled query runs.

" - operationId: GetSigmaScheduledQueryRuns + description:

A list of all + tax codes available to add to Products in order to allow specific tax + calculations.

+ operationId: GetTaxCodes parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list @@ -71387,7 +92064,6 @@ paths: name: ending_before required: false schema: - maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -71418,7 +92094,6 @@ paths: name: starting_after required: false schema: - maxLength: 5000 type: string style: form requestBody: @@ -71439,7 +92114,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/scheduled_query_run" + "$ref": "#/components/schemas/tax_code" type: array has_more: description: True if this list has another page of items after @@ -71454,13 +92129,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/sigma/scheduled_query_runs" type: string required: - data - has_more - object - url + title: TaxProductResourceTaxCodeList type: object x-expandableFields: - data @@ -71471,10 +92146,11 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sigma/scheduled_query_runs/{scheduled_query_run}": + "/v1/tax_codes/{id}": get: - description: "

Retrieves the details of an scheduled query run.

" - operationId: GetSigmaScheduledQueryRunsScheduledQueryRun + description: "

Retrieves the details of an existing tax code. Supply the unique + tax code ID and Stripe will return the corresponding tax code information.

" + operationId: GetTaxCodesId parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -71488,7 +92164,7 @@ paths: type: array style: deepObject - in: path - name: scheduled_query_run + name: id required: true schema: maxLength: 5000 @@ -71508,7 +92184,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/scheduled_query_run" + "$ref": "#/components/schemas/tax_code" description: Successful response. default: content: @@ -71516,334 +92192,52 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/skus": + "/v1/tax_rates": get: - description: "

Returns a list of your SKUs. The SKUs are returned sorted by - creation date, with the most recently created SKUs appearing first.

" - operationId: GetSkus + description: "

Returns a list of your tax rates. Tax rates are returned sorted + by creation date, with the most recently created tax rates appearing first.

" + operationId: GetTaxRates parameters: - - description: Only return SKUs that are active or inactive (e.g., pass `false` - to list all inactive products). + - description: Optional flag to filter by tax rates that are either active or + inactive (archived). in: query name: active required: false schema: type: boolean style: form - - description: 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`. - explode: true - in: query - name: attributes - required: false - schema: - additionalProperties: - maxLength: 500 - type: string - type: object - style: deepObject - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: Only return SKUs with the given IDs. + - description: Optional range for filtering created date. explode: true in: query - name: ids - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - description: 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: query - name: in_stock - required: false - schema: - type: boolean - style: form - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: The ID of the product whose SKUs will be retrieved. Must be a - product with type `good`. - in: query - name: product - required: false - schema: - maxLength: 5000 - type: string - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object + name: created required: false - responses: - '200': - content: - application/json: - schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/sku" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/skus" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - post: - description: "

Creates a new SKU associated with a product.

" - operationId: PostSkus - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - attributes: - explode: true - style: deepObject - expand: - explode: true - style: deepObject - inventory: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - package_dimensions: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - active: - description: Whether the SKU is available for purchase. Default - to `true`. - type: boolean - attributes: - additionalProperties: - maxLength: 500 - type: string - description: 'A dictionary of attributes and values for the attributes - defined by the product. If, for example, a product''s attributes - are `["size", "gender"]`, a valid SKU has the following dictionary - of attributes: `{"size": "Medium", "gender": "Unisex"}`.' - type: object - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - id: - description: The identifier for the SKU. Must be unique. If not - provided, an identifier will be randomly generated. - type: string - image: - description: The URL of an image for this SKU, meant to be displayable - to the customer. - maxLength: 5000 - type: string - inventory: - description: Description of the SKU's inventory. - properties: - quantity: - type: integer - type: - enum: - - bucket - - finite - - infinite - type: string - value: - enum: - - '' - - in_stock - - limited - - out_of_stock - type: string - required: - - type - title: inventory_create_specs - type: object - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - package_dimensions: - description: The dimensions of this SKU for shipping purposes. - properties: - height: - type: number - length: - type: number - weight: - type: number - width: - type: number - required: - - height - - length - - weight - - width - title: package_dimensions_specs - type: object - price: - description: The cost of the item as a nonnegative integer in the - smallest currency unit (that is, 100 cents to charge $1.00, or - 100 to charge ¥100, Japanese Yen being a zero-decimal currency). - type: integer - product: - description: The ID of the product this SKU is associated with. - Must be a product with type `good`. - maxLength: 5000 - type: string - required: - - currency - - inventory - - price - - product - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/sku" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/skus/{id}": - delete: - description: "

Delete a SKU. Deleting a SKU is only possible until it has - been used in an order.

" - operationId: DeleteSkusId - parameters: - - in: path - name: id - required: true schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/deleted_sku" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - get: - description: "

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.

" - operationId: GetSkusId - parameters: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -71855,13 +92249,34 @@ paths: type: string type: array style: deepObject - - in: path - name: id - required: true + - description: Optional flag to filter by tax rates that are inclusive (or those + that are not inclusive). + in: query + name: inclusive + required: false + schema: + type: boolean + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false schema: maxLength: 5000 type: string - style: simple + style: form requestBody: content: application/x-www-form-urlencoded: @@ -71876,9 +92291,36 @@ paths: content: application/json: schema: - anyOf: - - "$ref": "#/components/schemas/sku" - - "$ref": "#/components/schemas/deleted_sku" + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/tax_rate" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/tax_rates" + type: string + required: + - data + - has_more + - object + - url + title: TaxRatesList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -71887,198 +92329,40 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: |- -

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.

- operationId: PostSkusId - parameters: - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

Creates a new tax rate.

" + operationId: PostTaxRates requestBody: content: application/x-www-form-urlencoded: encoding: - attributes: - explode: true - style: deepObject expand: explode: true style: deepObject - inventory: - explode: true - style: deepObject metadata: explode: true style: deepObject - package_dimensions: - explode: true - style: deepObject schema: additionalProperties: false properties: active: - description: Whether this SKU is available for purchase. + description: Flag determining whether the tax rate is active or + inactive (archived). Inactive tax rates cannot be used with new + applications or Checkout Sessions, but will still work for subscriptions + and invoices that already have it set. type: boolean - attributes: - additionalProperties: - maxLength: 500 - type: string - description: A dictionary of attributes and values for the attributes - defined by the product. When specified, `attributes` will partially - update the existing attributes dictionary on the product, with - the postcondition that a value must be present for each attribute - key on the product. - type: object - currency: - description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), - in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - image: - description: The URL of an image for this SKU, meant to be displayable - to the customer. + country: + description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). maxLength: 5000 type: string - inventory: - description: Description of the SKU's inventory. - properties: - quantity: - type: integer - type: - enum: - - bucket - - finite - - infinite - type: string - value: - enum: - - '' - - in_stock - - limited - - out_of_stock - type: string - title: inventory_update_specs - type: object - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - package_dimensions: - anyOf: - - properties: - height: - type: number - length: - type: number - weight: - type: number - width: - type: number - required: - - height - - length - - weight - - width - title: package_dimensions_specs - type: object - - enum: - - '' - type: string - description: The dimensions of this SKU for shipping purposes. - price: - description: The cost of the item as a positive integer in the smallest - currency unit (that is, 100 cents to charge $1.00, or 100 to charge - ¥100, Japanese Yen being a zero-decimal currency). - type: integer - product: - description: The ID of the product that this SKU should belong to. - The product must exist, have the same set of attribute names as - the SKU's current product, and be of type `good`. + description: + description: An arbitrary string attached to the tax rate for your + internal use only. It will not be visible to your customers. maxLength: 5000 type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/sku" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/sources": - post: - description: "

Creates a new source object.

" - operationId: PostSources - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - mandate: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - owner: - explode: true - style: deepObject - receiver: - explode: true - style: deepObject - redirect: - explode: true - style: deepObject - source_order: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: Amount associated with the source. This is the amount - for which the source will be chargeable once ready. Required for - `single_use` sources. Not supported for `receiver` type sources, - where charge amount may not be specified until funds land. - type: integer - currency: - description: Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) - associated with the source. This is the currency for which the - source will be chargeable once ready. - type: string - customer: - description: The `Customer` to whom the original source is attached - to. Must be set when the original source is not a `Source` (e.g., - `Card`). - maxLength: 500 + display_name: + description: The display name of the tax rate, which will be shown + to users. + maxLength: 50 type: string expand: description: Specifies which fields in the response should be expanded. @@ -72086,274 +92370,57 @@ paths: maxLength: 5000 type: string type: array - flow: - description: The authentication `flow` of the source to create. - `flow` is one of `redirect`, `receiver`, `code_verification`, - `none`. It is generally inferred unless a type supports multiple - flows. - enum: - - code_verification - - none - - receiver - - redirect - maxLength: 5000 - type: string - mandate: - description: Information about a mandate possibility attached to - a source object (generally for bank debits) as well as its acceptance - status. - properties: - acceptance: - properties: - date: - format: unix-time - type: integer - ip: - type: string - offline: - properties: - contact_email: - type: string - required: - - contact_email - title: mandate_offline_acceptance_params - type: object - online: - properties: - date: - format: unix-time - type: integer - ip: - type: string - user_agent: - maxLength: 5000 - type: string - title: mandate_online_acceptance_params - type: object - status: - enum: - - accepted - - pending - - refused - - revoked - maxLength: 5000 - type: string - type: - enum: - - offline - - online - maxLength: 5000 - type: string - user_agent: - maxLength: 5000 - type: string - required: - - status - title: mandate_acceptance_params - type: object - amount: - anyOf: - - type: integer - - enum: - - '' - type: string - currency: - type: string - interval: - enum: - - one_time - - scheduled - - variable - maxLength: 5000 - type: string - notification_method: - enum: - - deprecated_none - - email - - manual - - none - - stripe_email - maxLength: 5000 - type: string - title: mandate_params - type: object - metadata: - additionalProperties: - type: string - type: object - original_source: - description: The source to share. - maxLength: 5000 - type: string - owner: - description: Information about the owner of the payment instrument - that may be used or required by particular source types. - properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: source_address - type: object - email: - type: string - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - title: owner - type: object - receiver: - description: Optional parameters for the receiver flow. Can be set - only if the source is a receiver (`flow` is `receiver`). - properties: - refund_attributes_method: - enum: - - email - - manual - - none - maxLength: 5000 - type: string - title: receiver_params - type: object - redirect: - description: Parameters required for the redirect flow. Required - if the source is authenticated by a redirect (`flow` is `redirect`). - properties: - return_url: - type: string - required: - - return_url - title: redirect_params - type: object - source_order: - description: Information about the items and shipping associated - with the source. Required for transactional credit (for example - Klarna) sources before you can charge it. - properties: - items: - items: - properties: - amount: - type: integer - currency: - type: string - description: - maxLength: 1000 - type: string - parent: - maxLength: 5000 - type: string - quantity: - type: integer - type: - enum: - - discount - - shipping - - sku - - tax - maxLength: 5000 - type: string - title: order_item_specs - type: object - type: array - shipping: - properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - required: - - line1 - title: address - type: object - carrier: - maxLength: 5000 - type: string - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - tracking_number: - maxLength: 5000 - type: string - required: - - address - title: order_shipping - type: object - title: shallow_order_specs - type: object - statement_descriptor: - description: An arbitrary string to be displayed on your customer's - statement. As an example, if your website is `RunClub` and the - item you're charging for is a race ticket, you may want to specify - a `statement_descriptor` of `RunClub 5K race ticket.` While many - payment types will display this information, some may not display - it at all. - maxLength: 5000 - type: string - token: - description: An optional token used to create the source. When passed, - token properties will override source parameters. - maxLength: 5000 + inclusive: + description: This specifies if the tax rate is inclusive or exclusive. + type: boolean + jurisdiction: + description: The jurisdiction for the tax rate. You can use this + label field for tax reporting purposes. It also appears on your + customer’s invoice. + maxLength: 50 type: string - type: - description: The `type` of the source to create. Required unless - `customer` and `original_source` are specified (see the [Cloning - card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) - guide) - maxLength: 5000 + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + percentage: + description: This represents the tax rate percent out of 100. + type: number + state: + description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), + without country prefix. For example, "NY" for New York, United + States.' + maxLength: 2 type: string - usage: + tax_type: + description: The high-level tax type, such as `vat` or `sales_tax`. enum: - - reusable - - single_use - maxLength: 5000 + - gst + - hst + - jct + - pst + - qst + - rst + - sales_tax + - vat type: string + required: + - display_name + - inclusive + - percentage type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/source" + "$ref": "#/components/schemas/tax_rate" description: Successful response. default: content: @@ -72361,22 +92428,11 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sources/{source}": + "/v1/tax_rates/{tax_rate}": get: - description: "

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.

" - operationId: GetSourcesSource + description: "

Retrieves a tax rate with the given ID

" + operationId: GetTaxRatesTaxRate parameters: - - description: The client secret of the source. Required if a publishable key - is used to retrieve the source. - in: query - name: client_secret - required: false - schema: - maxLength: 5000 - type: string - style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -72389,7 +92445,7 @@ paths: type: array style: deepObject - in: path - name: source + name: tax_rate required: true schema: maxLength: 5000 @@ -72409,7 +92465,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/source" + "$ref": "#/components/schemas/tax_rate" description: Successful response. default: content: @@ -72418,14 +92474,11 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: |- -

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.

- operationId: PostSourcesSource + description: "

Updates an existing tax rate.

" + operationId: PostTaxRatesTaxRate parameters: - in: path - name: source + name: tax_rate required: true schema: maxLength: 5000 @@ -72438,109 +92491,44 @@ paths: expand: explode: true style: deepObject - mandate: - explode: true - style: deepObject metadata: explode: true style: deepObject - owner: - explode: true - style: deepObject - source_order: - explode: true - style: deepObject schema: additionalProperties: false properties: - amount: - description: Amount associated with the source. - type: integer + active: + description: Flag determining whether the tax rate is active or + inactive (archived). Inactive tax rates cannot be used with new + applications or Checkout Sessions, but will still work for subscriptions + and invoices that already have it set. + type: boolean + country: + description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the tax rate for your + internal use only. It will not be visible to your customers. + maxLength: 5000 + type: string + display_name: + description: The display name of the tax rate, which will be shown + to users. + maxLength: 50 + type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - mandate: - description: Information about a mandate possibility attached to - a source object (generally for bank debits) as well as its acceptance - status. - properties: - acceptance: - properties: - date: - format: unix-time - type: integer - ip: - type: string - offline: - properties: - contact_email: - type: string - required: - - contact_email - title: mandate_offline_acceptance_params - type: object - online: - properties: - date: - format: unix-time - type: integer - ip: - type: string - user_agent: - maxLength: 5000 - type: string - title: mandate_online_acceptance_params - type: object - status: - enum: - - accepted - - pending - - refused - - revoked - maxLength: 5000 - type: string - type: - enum: - - offline - - online - maxLength: 5000 - type: string - user_agent: - maxLength: 5000 - type: string - required: - - status - title: mandate_acceptance_params - type: object - amount: - anyOf: - - type: integer - - enum: - - '' - type: string - currency: - type: string - interval: - enum: - - one_time - - scheduled - - variable - maxLength: 5000 - type: string - notification_method: - enum: - - deprecated_none - - email - - manual - - none - - stripe_email - maxLength: 5000 - type: string - title: mandate_params - type: object + jurisdiction: + description: The jurisdiction for the tax rate. You can use this + label field for tax reporting purposes. It also appears on your + customer’s invoice. + maxLength: 50 + type: string metadata: anyOf: - additionalProperties: @@ -72554,116 +92542,402 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - owner: - description: Information about the owner of the payment instrument - that may be used or required by particular source types. + state: + description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), + without country prefix. For example, "NY" for New York, United + States.' + maxLength: 2 + type: string + tax_type: + description: The high-level tax type, such as `vat` or `sales_tax`. + enum: + - gst + - hst + - jct + - pst + - qst + - rst + - sales_tax + - vat + type: string + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/tax_rate" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/terminal/configurations": + get: + description: "

Returns a list of Configuration objects.

" + operationId: GetTerminalConfigurations + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: if present, only return the account default or non-default configurations. + in: query + name: is_account_default + required: false + schema: + type: boolean + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/terminal.configuration" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/terminal/configurations" + type: string + required: + - data + - has_more + - object + - url + title: TerminalConfigurationConfigurationList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new Configuration object.

" + operationId: PostTerminalConfigurations + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + bbpos_wisepos_e: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + tipping: + explode: true + style: deepObject + verifone_p400: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + bbpos_wisepos_e: + description: An object containing device type specific settings + for BBPOS WisePOS E readers properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: source_address - type: object - email: - type: string - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - title: owner + splashscreen: + anyOf: + - type: string + - enum: + - '' + type: string + title: bbpos_wise_pose type: object - source_order: - description: Information about the items and shipping associated - with the source. Required for transactional credit (for example - Klarna) sources before you can charge it. - properties: - items: - items: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + tipping: + anyOf: + - properties: + aud: properties: - amount: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + cad: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + chf: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + czk: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + dkk: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + eur: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + gbp: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + hkd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + myr: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + nok: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + nzd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + sek: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + sgd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: type: integer - currency: - type: string - description: - maxLength: 1000 - type: string - parent: - maxLength: 5000 - type: string - quantity: + title: currency_specific_config + type: object + usd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: type: integer - type: - enum: - - discount - - shipping - - sku - - tax - maxLength: 5000 - type: string - title: order_item_specs + title: currency_specific_config type: object - type: array - shipping: - properties: - address: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - required: - - line1 - title: address - type: object - carrier: - maxLength: 5000 - type: string - name: - maxLength: 5000 - type: string - phone: - maxLength: 5000 - type: string - tracking_number: - maxLength: 5000 - type: string - required: - - address - title: order_shipping - type: object - title: order_params + title: tipping + type: object + - enum: + - '' + type: string + description: Tipping configurations for readers supporting on-reader + tips + verifone_p400: + description: An object containing device type specific settings + for Verifone P400 readers + properties: + splashscreen: + anyOf: + - type: string + - enum: + - '' + type: string + title: verifone_p400 type: object type: object required: false @@ -72672,7 +92946,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/source" + "$ref": "#/components/schemas/terminal.configuration" description: Successful response. default: content: @@ -72680,31 +92954,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sources/{source}/mandate_notifications/{mandate_notification}": - get: - description: "

Retrieves a new Source MandateNotification.

" - operationId: GetSourcesSourceMandateNotificationsMandateNotification + "/v1/terminal/configurations/{configuration}": + delete: + description: "

Deletes a Configuration object.

" + operationId: DeleteTerminalConfigurationsConfiguration parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: mandate_notification - required: true - schema: - maxLength: 5000 - type: string - style: simple - in: path - name: source + name: configuration required: true schema: maxLength: 5000 @@ -72724,7 +92980,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/source_mandate_notification" + "$ref": "#/components/schemas/deleted_terminal.configuration" description: Successful response. default: content: @@ -72732,23 +92988,17 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sources/{source}/source_transactions": get: - description: "

List source transactions for a given source.

" - operationId: GetSourcesSourceSourceTransactions + description: "

Retrieves a Configuration object.

" + operationId: GetTerminalConfigurationsConfiguration parameters: - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false + - in: path + name: configuration + required: true schema: maxLength: 5000 type: string - style: form + style: simple - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -72760,33 +93010,6 @@ paths: type: string type: array style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - in: path - name: source - required: true - schema: - maxLength: 5000 - type: string - style: simple - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false - schema: - maxLength: 5000 - type: string - style: form requestBody: content: application/x-www-form-urlencoded: @@ -72801,35 +93024,9 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/source_transaction" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - type: string - required: - - data - - has_more - - object - - url - title: ApmsSourcesSourceTransactionList - type: object - x-expandableFields: - - data + anyOf: + - "$ref": "#/components/schemas/terminal.configuration" + - "$ref": "#/components/schemas/deleted_terminal.configuration" description: Successful response. default: content: @@ -72837,33 +93034,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sources/{source}/source_transactions/{source_transaction}": - get: - description: "

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.

" - operationId: GetSourcesSourceSourceTransactionsSourceTransaction + post: + description: "

Updates a new Configuration object.

" + operationId: PostTerminalConfigurationsConfiguration parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - - in: path - name: source - required: true - schema: - maxLength: 5000 - type: string - style: simple - in: path - name: source_transaction + name: configuration required: true schema: maxLength: 5000 @@ -72872,10 +93048,266 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + bbpos_wisepos_e: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + tipping: + explode: true + style: deepObject + verifone_p400: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + bbpos_wisepos_e: + anyOf: + - properties: + splashscreen: + anyOf: + - type: string + - enum: + - '' + type: string + title: bbpos_wise_pose + type: object + - enum: + - '' + type: string + description: An object containing device type specific settings + for BBPOS WisePOS E readers + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + tipping: + anyOf: + - properties: + aud: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + cad: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + chf: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + czk: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + dkk: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + eur: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + gbp: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + hkd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + myr: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + nok: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + nzd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + sek: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + sgd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + usd: + properties: + fixed_amounts: + items: + type: integer + type: array + percentages: + items: + type: integer + type: array + smart_tip_threshold: + type: integer + title: currency_specific_config + type: object + title: tipping + type: object + - enum: + - '' + type: string + description: Tipping configurations for readers supporting on-reader + tips + verifone_p400: + anyOf: + - properties: + splashscreen: + anyOf: + - type: string + - enum: + - '' + type: string + title: verifone_p400 + type: object + - enum: + - '' + type: string + description: An object containing device type specific settings + for Verifone P400 readers type: object required: false responses: @@ -72883,7 +93315,9 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/source_transaction" + anyOf: + - "$ref": "#/components/schemas/terminal.configuration" + - "$ref": "#/components/schemas/deleted_terminal.configuration" description: Successful response. default: content: @@ -72891,18 +93325,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/sources/{source}/verify": + "/v1/terminal/connection_tokens": post: - description: "

Verify a given source.

" - operationId: PostSourcesSourceVerify - parameters: - - in: path - name: source - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

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.

" + operationId: PostTerminalConnectionTokens requestBody: content: application/x-www-form-urlencoded: @@ -72910,9 +93338,6 @@ paths: expand: explode: true style: deepObject - values: - explode: true - style: deepObject schema: additionalProperties: false properties: @@ -72922,22 +93347,23 @@ paths: maxLength: 5000 type: string type: array - values: - description: The values needed to verify the source. - items: - maxLength: 5000 - type: string - type: array - required: - - values + location: + description: The id of the location that this connection token is + scoped to. If specified the connection token will only be usable + with readers assigned to that location, otherwise the connection + token will be usable with all readers. Note that location scoping + only applies to internet-connected readers. For more details, + see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). + maxLength: 5000 + type: string type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/source" + "$ref": "#/components/schemas/terminal.connection_token" description: Successful response. default: content: @@ -72945,10 +93371,10 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_items": + "/v1/terminal/locations": get: - description: "

Returns a list of your subscription items for a given subscription.

" - operationId: GetSubscriptionItems + description: "

Returns a list of Location objects.

" + operationId: GetTerminalLocations parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list @@ -72959,6 +93385,7 @@ paths: name: ending_before required: false schema: + maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -72988,13 +93415,6 @@ paths: in: query name: starting_after required: false - schema: - type: string - style: form - - description: The ID of the subscription whose items will be retrieved. - in: query - name: subscription - required: true schema: maxLength: 5000 type: string @@ -73017,7 +93437,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/subscription_item" + "$ref": "#/components/schemas/terminal.location" type: array has_more: description: True if this list has another page of items after @@ -73032,13 +93452,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/subscription_items" + pattern: "^/v1/terminal/locations" type: string required: - data - has_more - object - url + title: TerminalLocationLocationList type: object x-expandableFields: - data @@ -73050,164 +93471,82 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Adds a new item to an existing subscription. No existing items - will be changed or replaced.

" - operationId: PostSubscriptionItems + description: |- +

Creates a new Location object. + For further details, including which address fields are required in each country, see the Manage locations guide.

+ operationId: PostTerminalLocations requestBody: content: application/x-www-form-urlencoded: encoding: - billing_thresholds: + address: explode: true style: deepObject expand: explode: true style: deepObject metadata: - explode: true - style: deepObject - price_data: - explode: true - style: deepObject - tax_rates: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param - type: object - - enum: - - '' - type: string - description: Define thresholds at which an invoice will be sent, - and the subscription advanced to a new billing period. When updating, - pass an empty string to remove previously-defined thresholds. - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - payment_behavior: - description: |- - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - enum: - - allow_incomplete - - default_incomplete - - error_if_incomplete - - pending_if_incomplete - type: string - price: - description: The ID of the price object. - maxLength: 5000 - type: string - price_data: - description: Data used to generate a new [Price](https://stripe.com/docs/api/prices) - object inline. + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + address: + description: The full address of the location. properties: - currency: + city: + maxLength: 5000 type: string - product: + country: maxLength: 5000 type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc - type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified + line1: + maxLength: 5000 type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 type: string required: - - currency - - product - - recurring - title: recurring_price_data + - country + title: create_location_address_param type: object - proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - enum: - - always_invoice - - create_prorations - - none + configuration_overrides: + description: The ID of a configuration that will be used to customize + all readers in this location. + maxLength: 1000 type: string - proration_date: - description: If set, the proration will be calculated as though - the subscription was updated at the given time. This can be used - to apply the same proration that was previewed with the [upcoming - invoice](https://stripe.com/docs/api#retrieve_customer_invoice) - endpoint. - format: unix-time - type: integer - quantity: - description: The quantity you'd like to apply to the subscription - item you're creating. - type: integer - subscription: - description: The identifier of the subscription to modify. - maxLength: 5000 + display_name: + description: A name for the location. + maxLength: 1000 type: string - tax_rates: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: anyOf: - - items: - maxLength: 5000 + - additionalProperties: type: string - type: array + type: object - enum: - '' type: string - description: A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) - ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) - on the Subscription. When updating, pass an empty string to remove - previously-defined tax rates. + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. required: - - subscription + - address + - display_name type: object required: true responses: @@ -73215,7 +93554,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_item" + "$ref": "#/components/schemas/terminal.location" description: Successful response. default: content: @@ -73223,14 +93562,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_items/{item}": + "/v1/terminal/locations/{location}": delete: - description: "

Deletes an item from the subscription. Removing a subscription - item from a subscription will not cancel the subscription.

" - operationId: DeleteSubscriptionItemsItem + description: "

Deletes a Location object.

" + operationId: DeleteTerminalLocationsLocation parameters: - in: path - name: item + name: location required: true schema: maxLength: 5000 @@ -73242,31 +93580,7 @@ paths: encoding: {} schema: additionalProperties: false - properties: - clear_usage: - description: Delete all usage for the given subscription item. Allowed - only when the current plan's `usage_type` is `metered`. - type: boolean - proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - enum: - - always_invoice - - create_prorations - - none - type: string - proration_date: - description: If set, the proration will be calculated as though - the subscription was updated at the given time. This can be used - to apply the same proration that was previewed with the [upcoming - invoice](https://stripe.com/docs/api#retrieve_customer_invoice) - endpoint. - format: unix-time - type: integer + properties: {} type: object required: false responses: @@ -73274,7 +93588,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/deleted_subscription_item" + "$ref": "#/components/schemas/deleted_terminal.location" description: Successful response. default: content: @@ -73283,8 +93597,8 @@ paths: "$ref": "#/components/schemas/error" description: Error response. get: - description: "

Retrieves the subscription item with the given ID.

" - operationId: GetSubscriptionItemsItem + description: "

Retrieves a Location object.

" + operationId: GetTerminalLocationsLocation parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -73298,7 +93612,7 @@ paths: type: array style: deepObject - in: path - name: item + name: location required: true schema: maxLength: 5000 @@ -73318,7 +93632,9 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_item" + anyOf: + - "$ref": "#/components/schemas/terminal.location" + - "$ref": "#/components/schemas/deleted_terminal.location" description: Successful response. default: content: @@ -73327,11 +93643,12 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates the plan or quantity of an item on a current subscription.

" - operationId: PostSubscriptionItemsItem + description: "

Updates a Location object by setting the values + of the parameters passed. Any parameters not provided will be left unchanged.

" + operationId: PostTerminalLocationsLocation parameters: - in: path - name: item + name: location required: true schema: maxLength: 5000 @@ -73341,7 +93658,7 @@ paths: content: application/x-www-form-urlencoded: encoding: - billing_thresholds: + address: explode: true style: deepObject expand: @@ -73350,30 +93667,41 @@ paths: metadata: explode: true style: deepObject - price_data: - explode: true - style: deepObject - tax_rates: - explode: true - style: deepObject schema: additionalProperties: false properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param - type: object - - enum: - - '' - type: string - description: Define thresholds at which an invoice will be sent, - and the subscription advanced to a new billing period. When updating, - pass an empty string to remove previously-defined thresholds. + address: + description: The full address of the location. + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: optional_fields_address + type: object + configuration_overrides: + description: The ID of a configuration that will be used to customize + all readers in this location. + maxLength: 1000 + type: string + display_name: + description: A name for the location. + maxLength: 1000 + type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -73393,109 +93721,6 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - off_session: - description: Indicates if a customer is on or off-session while - an invoice payment is attempted. - type: boolean - payment_behavior: - description: |- - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - enum: - - allow_incomplete - - default_incomplete - - error_if_incomplete - - pending_if_incomplete - type: string - price: - description: The ID of the price object. When changing a subscription - item's price, `quantity` is set to 1 unless a `quantity` parameter - is provided. - maxLength: 5000 - type: string - price_data: - description: Data used to generate a new [Price](https://stripe.com/docs/api/prices) - object inline. - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc - type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - - recurring - title: recurring_price_data - type: object - proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - enum: - - always_invoice - - create_prorations - - none - type: string - proration_date: - description: If set, the proration will be calculated as though - the subscription was updated at the given time. This can be used - to apply the same proration that was previewed with the [upcoming - invoice](https://stripe.com/docs/api#retrieve_customer_invoice) - endpoint. - format: unix-time - type: integer - quantity: - description: The quantity you'd like to apply to the subscription - item you're creating. - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - description: A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) - ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) - on the Subscription. When updating, pass an empty string to remove - previously-defined tax rates. type: object required: false responses: @@ -73503,7 +93728,9 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_item" + anyOf: + - "$ref": "#/components/schemas/terminal.location" + - "$ref": "#/components/schemas/deleted_terminal.location" description: Successful response. default: content: @@ -73511,14 +93738,26 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_items/{subscription_item}/usage_record_summaries": + "/v1/terminal/readers": get: - description: |- -

For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that’s been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September).

- -

The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn’t ended yet. Since new usage records can still be added, the returned summary information for the subscription item’s ID should be seen as unstable until the subscription billing period ends.

- operationId: GetSubscriptionItemsSubscriptionItemUsageRecordSummaries + description: "

Returns a list of Reader objects.

" + operationId: GetTerminalReaders parameters: + - description: Filters readers by device type + in: query + name: device_type + required: false + schema: + enum: + - bbpos_chipper2x + - bbpos_wisepad3 + - bbpos_wisepos_e + - simulated_wisepos_e + - stripe_m2 + - verifone_P400 + type: string + x-stripeBypassValidation: true + style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -73550,6 +93789,15 @@ paths: schema: type: integer style: form + - description: A location ID to filter the response list to only readers at + the specific location + in: query + name: location + required: false + schema: + maxLength: 5000 + type: string + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -73562,12 +93810,16 @@ paths: maxLength: 5000 type: string style: form - - in: path - name: subscription_item - required: true + - description: A status filter to filter readers to only offline or online readers + in: query + name: status + required: false schema: + enum: + - offline + - online type: string - style: simple + style: form requestBody: content: application/x-www-form-urlencoded: @@ -73585,8 +93837,9 @@ paths: description: '' properties: data: + description: A list of readers items: - "$ref": "#/components/schemas/usage_record_summary" + "$ref": "#/components/schemas/terminal.reader" type: array has_more: description: True if this list has another page of items after @@ -73607,6 +93860,7 @@ paths: - has_more - object - url + title: TerminalReaderRetrieveReader type: object x-expandableFields: - data @@ -73617,24 +93871,9 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_items/{subscription_item}/usage_records": post: - description: |- -

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.

- operationId: PostSubscriptionItemsSubscriptionItemUsageRecords - parameters: - - in: path - name: subscription_item - required: true - schema: - type: string - style: simple + description: "

Creates a new Reader object.

" + operationId: PostTerminalReaders requestBody: content: application/x-www-form-urlencoded: @@ -73642,149 +93881,100 @@ paths: expand: explode: true style: deepObject - timestamp: + metadata: explode: true style: deepObject schema: additionalProperties: false properties: - action: - description: Valid values are `increment` (default) or `set`. When - using `increment` the specified `quantity` will be added to the - usage at the specified timestamp. The `set` action will overwrite - the usage quantity at that timestamp. If the subscription has - [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), - `increment` is the only allowed value. - enum: - - increment - - set - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - quantity: - description: The usage quantity for the specified timestamp. - type: integer - timestamp: + label: + description: Custom label given to the reader for easier identification. + If no label is specified, the registration code will be used. + maxLength: 5000 + type: string + location: + description: The location to assign the reader to. + maxLength: 5000 + type: string + metadata: anyOf: + - additionalProperties: + type: string + type: object - enum: - - now - maxLength: 5000 + - '' type: string - - type: integer - description: The timestamp for the usage event. This timestamp must - be within the current billing period of the subscription of the - provided `subscription_item`, and must not be in the future. When - passing `"now"`, Stripe records usage for the current time. Default - is `"now"` if a value is not provided. + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + registration_code: + description: A code generated by the reader used for registering + to an account. + maxLength: 5000 + type: string required: - - quantity - type: object - required: true - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/usage_record" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/subscription_schedules": - get: - description: "

Retrieves the list of your subscription schedules.

" - operationId: GetSubscriptionSchedules - parameters: - - description: Only return subscription schedules that were created canceled - the given date interval. - explode: true - in: query - name: canceled_at - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return subscription schedules that completed during the - given date interval. - explode: true - in: query - name: completed_at - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return subscription schedules that were created during the - given date interval. - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return subscription schedules for the given customer. - in: query - name: customer - required: false + - registration_code + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/terminal/readers/{reader}": + delete: + description: "

Deletes a Reader object.

" + operationId: DeleteTerminalReadersReader + parameters: + - in: path + name: reader + required: true schema: maxLength: 5000 type: string - style: form - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object required: false - schema: - maxLength: 5000 - type: string - style: form + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/deleted_terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + get: + description: "

Retrieves a Reader object.

" + operationId: GetTerminalReadersReader + parameters: - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -73796,54 +93986,13 @@ paths: type: string type: array style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false - schema: - type: integer - style: form - - description: Only return subscription schedules that were released during - the given date interval. - explode: true - in: query - name: released_at - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: Only return subscription schedules that have not started yet. - in: query - name: scheduled - required: false - schema: - type: boolean - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false + - in: path + name: reader + required: true schema: maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -73858,35 +94007,9 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/subscription_schedule" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/subscription_schedules" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + anyOf: + - "$ref": "#/components/schemas/terminal.reader" + - "$ref": "#/components/schemas/deleted_terminal.reader" description: Successful response. default: content: @@ -73895,123 +94018,38 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Creates a new subscription schedule object. Each customer can - have up to 500 active or scheduled subscriptions.

" - operationId: PostSubscriptionSchedules + description: "

Updates a Reader object by setting the values + of the parameters passed. Any parameters not provided will be left unchanged.

" + operationId: PostTerminalReadersReader + parameters: + - in: path + name: reader + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: encoding: - default_settings: - explode: true - style: deepObject expand: explode: true style: deepObject metadata: explode: true style: deepObject - phases: - explode: true - style: deepObject - start_date: - explode: true - style: deepObject schema: additionalProperties: false properties: - customer: - description: The identifier of the customer to create the subscription - schedule for. - maxLength: 5000 - type: string - default_settings: - description: Object representing the subscription schedule's default - settings. - properties: - application_fee_percent: - type: number - automatic_tax: - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - billing_cycle_anchor: - enum: - - automatic - - phase_start - type: string - billing_thresholds: - anyOf: - - properties: - amount_gte: - type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - collection_method: - enum: - - charge_automatically - - send_invoice - type: string - default_payment_method: - maxLength: 5000 - type: string - invoice_settings: - properties: - days_until_due: - type: integer - title: subscription_schedules_param - type: object - transfer_data: - anyOf: - - properties: - amount_percent: - type: number - destination: - type: string - required: - - destination - title: transfer_data_specs - type: object - - enum: - - '' - type: string - title: default_settings_params - type: object - end_behavior: - description: Configures how the subscription schedule behaves when - it ends. Possible values are `release` or `cancel` with the default - being `release`. `release` will end the subscription schedule - and keep the underlying subscription running.`cancel` will end - the subscription schedule and cancel the underlying subscription. - enum: - - cancel - - none - - release - - renew - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - from_subscription: - description: Migrate an existing subscription to be managed by a - subscription schedule. If this parameter is set, a subscription - schedule will be created using the subscription's item(s), set - to auto-renew using the subscription's interval. When using this - parameter, other parameters (such as phase values) cannot be set. - To create a subscription schedule with other modifications, we - recommend making two separate API calls. + label: + description: The new label of the reader. maxLength: 5000 type: string metadata: @@ -74027,231 +94065,118 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - phases: - description: List representing phases of the subscription schedule. - Each phase can be customized to have different durations, plans, - and coupons. If there are multiple phases, the `end_date` of one - phase will always equal the `start_date` of the next phase. + type: object + required: false + responses: + '200': + content: + application/json: + schema: + anyOf: + - "$ref": "#/components/schemas/terminal.reader" + - "$ref": "#/components/schemas/deleted_terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/terminal/readers/{reader}/cancel_action": + post: + description: "

Cancels the current reader action.

" + operationId: PostTerminalReadersReaderCancelAction + parameters: + - in: path + name: reader + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. items: - properties: - add_invoice_items: - items: - properties: - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - title: one_time_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: add_invoice_item_entry - type: object - type: array - application_fee_percent: - type: number - automatic_tax: - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - billing_cycle_anchor: - enum: - - automatic - - phase_start - type: string - billing_thresholds: - anyOf: - - properties: - amount_gte: - type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - collection_method: - enum: - - charge_automatically - - send_invoice - type: string - coupon: - maxLength: 5000 - type: string - default_payment_method: - maxLength: 5000 - type: string - default_tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - end_date: - format: unix-time - type: integer - invoice_settings: - properties: - days_until_due: - type: integer - title: subscription_schedules_param - type: object - items: - items: - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param - type: object - - enum: - - '' - type: string - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc - type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - - recurring - title: recurring_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: configuration_item_params - type: object - type: array - iterations: - type: integer - proration_behavior: - enum: - - always_invoice - - create_prorations - - none - type: string - transfer_data: - properties: - amount_percent: - type: number - destination: - type: string - required: - - destination - title: transfer_data_specs - type: object - trial: - type: boolean - trial_end: - format: unix-time - type: integer - required: - - items - title: phase_configuration_params - type: object + maxLength: 5000 + type: string type: array - start_date: - anyOf: - - type: integer - - enum: - - now + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/terminal/readers/{reader}/process_payment_intent": + post: + description: "

Initiates a payment flow on a Reader.

" + operationId: PostTerminalReadersReaderProcessPaymentIntent + parameters: + - in: path + name: reader + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + process_config: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: maxLength: 5000 type: string - description: When the subscription schedule starts. We recommend - using `now` so that it starts the subscription immediately. You - can also use a Unix timestamp to backdate the subscription so - that it starts on a past date, or set a future date for the subscription - to start on. + type: array + payment_intent: + description: PaymentIntent ID + maxLength: 5000 + type: string + process_config: + description: Configuration overrides + properties: + skip_tipping: + type: boolean + title: process_config + type: object + required: + - payment_intent type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/subscription_schedule" + "$ref": "#/components/schemas/terminal.reader" description: Successful response. default: content: @@ -74259,26 +94184,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_schedules/{schedule}": - get: - description: "

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.

" - operationId: GetSubscriptionSchedulesSchedule + "/v1/terminal/readers/{reader}/process_setup_intent": + post: + description: "

Initiates a setup intent flow on a Reader.

" + operationId: PostTerminalReadersReaderProcessSetupIntent parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false - schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject - in: path - name: schedule + name: reader required: true schema: maxLength: 5000 @@ -74287,18 +94199,37 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + customer_consent_collected: + description: Customer Consent Collected + type: boolean + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + setup_intent: + description: SetupIntent ID + maxLength: 5000 + type: string + required: + - customer_consent_collected + - setup_intent type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/subscription_schedule" + "$ref": "#/components/schemas/terminal.reader" description: Successful response. default: content: @@ -74306,12 +94237,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/terminal/readers/{reader}/set_reader_display": post: - description: "

Updates an existing subscription schedule.

" - operationId: PostSubscriptionSchedulesSchedule + description: "

Sets reader display to show cart details.

" + operationId: PostTerminalReadersReaderSetReaderDisplay parameters: - in: path - name: schedule + name: reader required: true schema: maxLength: 5000 @@ -74321,93 +94253,107 @@ paths: content: application/x-www-form-urlencoded: encoding: - default_settings: + cart: explode: true style: deepObject expand: explode: true style: deepObject - metadata: - explode: true - style: deepObject - phases: - explode: true - style: deepObject schema: additionalProperties: false properties: - default_settings: - description: Object representing the subscription schedule's default - settings. + cart: + description: Cart properties: - application_fee_percent: - type: number - automatic_tax: - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - billing_cycle_anchor: - enum: - - automatic - - phase_start + currency: type: string - billing_thresholds: - anyOf: - - properties: - amount_gte: + line_items: + items: + properties: + amount: type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - collection_method: - enum: - - charge_automatically - - send_invoice - type: string - default_payment_method: - maxLength: 5000 - type: string - invoice_settings: - properties: - days_until_due: - type: integer - title: subscription_schedules_param - type: object - transfer_data: - anyOf: - - properties: - amount_percent: - type: number - destination: + description: + maxLength: 5000 type: string + quantity: + type: integer required: - - destination - title: transfer_data_specs + - amount + - description + - quantity + title: line_item type: object - - enum: - - '' - type: string - title: default_settings_params + type: array + tax: + type: integer + total: + type: integer + required: + - currency + - line_items + - total + title: cart type: object - end_behavior: - description: Configures how the subscription schedule behaves when - it ends. Possible values are `release` or `cancel` with the default - being `release`. `release` will end the subscription schedule - and keep the underlying subscription running.`cancel` will end - the subscription schedule and cancel the underlying subscription. + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: + description: Type enum: - - cancel - - none - - release - - renew + - cart + type: string + required: + - type + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/customers/{customer}/fund_cash_balance": + post: + description: "

Create an incoming testmode bank transfer

" + operationId: PostTestHelpersCustomersCustomerFundCashBalance + parameters: + - in: path + name: customer + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount to be used for this test cash balance transaction. + A positive integer representing how much to fund in the [smallest + currency unit](https://stripe.com/docs/currencies#zero-decimal) + (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal + currency). + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). type: string expand: description: Specifies which fields in the response should be expanded. @@ -74415,249 +94361,105 @@ paths: maxLength: 5000 type: string type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - phases: - description: List representing phases of the subscription schedule. - Each phase can be customized to have different durations, plans, - and coupons. If there are multiple phases, the `end_date` of one - phase will always equal the `start_date` of the next phase. Note - that past phases can be omitted. + reference: + description: A description of the test funding. This simulates free-text + references supplied by customers when making bank transfers to + their cash balance. You can use this to test how Stripe's [reconciliation + algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) + applies to different user inputs. + maxLength: 5000 + type: string + required: + - amount + - currency + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/customer_cash_balance_transaction" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/issuing/cards/{card}/shipping/deliver": + post: + description: "

Updates the shipping status of the specified Issuing Card + object to delivered.

" + operationId: PostTestHelpersIssuingCardsCardShippingDeliver + parameters: + - in: path + name: card + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. items: - properties: - add_invoice_items: - items: - properties: - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - title: one_time_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: add_invoice_item_entry - type: object - type: array - application_fee_percent: - type: number - automatic_tax: - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - billing_cycle_anchor: - enum: - - automatic - - phase_start - type: string - billing_thresholds: - anyOf: - - properties: - amount_gte: - type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - collection_method: - enum: - - charge_automatically - - send_invoice - type: string - coupon: - maxLength: 5000 - type: string - default_payment_method: - maxLength: 5000 - type: string - default_tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - end_date: - anyOf: - - type: integer - - enum: - - now - maxLength: 5000 - type: string - invoice_settings: - properties: - days_until_due: - type: integer - title: subscription_schedules_param - type: object - items: - items: - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param - type: object - - enum: - - '' - type: string - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc - type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - - recurring - title: recurring_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: configuration_item_params - type: object - type: array - iterations: - type: integer - proration_behavior: - enum: - - always_invoice - - create_prorations - - none - type: string - start_date: - anyOf: - - type: integer - - enum: - - now - maxLength: 5000 - type: string - transfer_data: - properties: - amount_percent: - type: number - destination: - type: string - required: - - destination - title: transfer_data_specs - type: object - trial: - type: boolean - trial_end: - anyOf: - - type: integer - - enum: - - now - maxLength: 5000 - type: string - required: - - items - title: phase_configuration_params - type: object + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/issuing.card" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/issuing/cards/{card}/shipping/fail": + post: + description: "

Updates the shipping status of the specified Issuing Card + object to failure.

" + operationId: PostTestHelpersIssuingCardsCardShippingFail + parameters: + - in: path + name: card + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string type: array - proration_behavior: - description: If the update changes the current phase, indicates - if the changes should be prorated. Possible values are `create_prorations` - or `none`, and the default value is `create_prorations`. - enum: - - always_invoice - - create_prorations - - none - type: string type: object required: false responses: @@ -74665,7 +94467,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_schedule" + "$ref": "#/components/schemas/issuing.card" description: Successful response. default: content: @@ -74673,16 +94475,14 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_schedules/{schedule}/cancel": + "/v1/test_helpers/issuing/cards/{card}/shipping/return": post: - description: "

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.

" - operationId: PostSubscriptionSchedulesScheduleCancel + description: "

Updates the shipping status of the specified Issuing Card + object to returned.

" + operationId: PostTestHelpersIssuingCardsCardShippingReturn parameters: - in: path - name: schedule + name: card required: true schema: maxLength: 5000 @@ -74704,16 +94504,6 @@ paths: maxLength: 5000 type: string type: array - invoice_now: - description: If the subscription schedule is `active`, indicates - if a final invoice will be generated that contains any un-invoiced - metered usage and new/pending proration invoice items. Defaults - to `true`. - type: boolean - prorate: - description: If the subscription schedule is `active`, indicates - if the cancellation should be prorated. Defaults to `true`. - type: boolean type: object required: false responses: @@ -74721,7 +94511,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_schedule" + "$ref": "#/components/schemas/issuing.card" description: Successful response. default: content: @@ -74729,19 +94519,14 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscription_schedules/{schedule}/release": + "/v1/test_helpers/issuing/cards/{card}/shipping/ship": post: - description: "

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.

" - operationId: PostSubscriptionSchedulesScheduleRelease + description: "

Updates the shipping status of the specified Issuing Card + object to shipped.

" + operationId: PostTestHelpersIssuingCardsCardShippingShip parameters: - in: path - name: schedule + name: card required: true schema: maxLength: 5000 @@ -74763,10 +94548,6 @@ paths: maxLength: 5000 type: string type: array - preserve_cancel_date: - description: Keep any cancellation on the subscription that the - schedule has set - type: boolean type: object required: false responses: @@ -74774,7 +94555,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription_schedule" + "$ref": "#/components/schemas/issuing.card" description: Successful response. default: content: @@ -74782,88 +94563,114 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscriptions": - get: - description: "

By default, returns a list of subscriptions that have not been - canceled. In order to list canceled subscriptions, specify status=canceled.

" - operationId: GetSubscriptions + "/v1/test_helpers/refunds/{refund}/expire": + post: + description: "

Expire a refund with a status of requires_action.

" + operationId: PostTestHelpersRefundsRefundExpire parameters: - - description: The collection method of the subscriptions to retrieve. Either - `charge_automatically` or `send_invoice`. - in: query - name: collection_method - required: false + - in: path + name: refund + required: true schema: - enum: - - charge_automatically - - send_invoice type: string - style: form - - explode: true - in: query - name: created - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - explode: true - in: query - name: current_period_end - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - explode: true - in: query - name: current_period_start - required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: The ID of the customer whose subscriptions will be retrieved. - in: query - name: customer + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/refund" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/terminal/readers/{reader}/present_payment_method": + post: + description: "

Presents a payment method on a simulated reader. Can be used + to simulate accepting a payment, saving a card or refunding a transaction.

" + operationId: PostTestHelpersTerminalReadersReaderPresentPaymentMethod + parameters: + - in: path + name: reader + required: true schema: maxLength: 5000 type: string - style: form + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + card_present: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + card_present: + description: Simulated data for the card_present payment method + properties: + number: + maxLength: 5000 + type: string + title: card_present + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: + description: Simulated payment type + enum: + - card_present + type: string + x-stripeBypassValidation: true + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/terminal.reader" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/test_clocks": + get: + description: "

Returns a list of your test clocks.

" + operationId: GetTestHelpersTestClocks + parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -74895,14 +94702,6 @@ paths: schema: type: integer style: form - - description: Filter for subscriptions that contain this recurring price ID. - in: query - name: price - required: false - schema: - maxLength: 5000 - type: string - style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -74915,29 +94714,158 @@ paths: maxLength: 5000 type: string style: form - - description: The status of the subscriptions to retrieve. Passing in a value - of `canceled` will return all canceled subscriptions, including those belonging - to deleted customers. Pass `ended` to find subscriptions that are canceled - and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). - Passing in a value of `all` will return subscriptions of all statuses. If - no value is supplied, all subscriptions that have not been canceled are - returned. + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/test_helpers.test_clock" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/test_helpers/test_clocks" + type: string + required: + - data + - has_more + - object + - url + title: BillingClocksResourceBillingClockList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates a new test clock that can be attached to new customers + and quotes.

" + operationId: PostTestHelpersTestClocks + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + frozen_time: + description: The initial frozen time for this test clock. + format: unix-time + type: integer + name: + description: The name for this test clock. + maxLength: 300 + type: string + required: + - frozen_time + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/test_helpers.test_clock" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/test_clocks/{test_clock}": + delete: + description: "

Deletes a test clock.

" + operationId: DeleteTestHelpersTestClocksTestClock + parameters: + - in: path + name: test_clock + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/deleted_test_helpers.test_clock" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + get: + description: "

Retrieves a test clock.

" + operationId: GetTestHelpersTestClocksTestClock + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true in: query - name: status + name: expand required: false schema: - enum: - - active - - all - - canceled - - ended - - incomplete - - incomplete_expired - - past_due - - trialing - - unpaid + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: test_clock + required: true + schema: + maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -74952,35 +94880,175 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/subscription" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/subscriptions" - type: string - required: - - data - - has_more - - object - - url - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/test_helpers.test_clock" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/test_clocks/{test_clock}/advance": + post: + description: "

Starts advancing a test clock to a specified time in the future. + Advancement is done when status changes to Ready.

" + operationId: PostTestHelpersTestClocksTestClockAdvance + parameters: + - in: path + name: test_clock + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + frozen_time: + description: The time to advance the test clock. Must be after the + test clock's current frozen time. Cannot be more than two intervals + in the future from the shortest subscription in this test clock. + If there are no subscriptions in this test clock, it cannot be + more than two years in the future. + format: unix-time + type: integer + required: + - frozen_time + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/test_helpers.test_clock" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/inbound_transfers/{id}/fail": + post: + description: "

Transitions a test mode created InboundTransfer to the failed + status. The InboundTransfer must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryInboundTransfersIdFail + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + failure_details: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + failure_details: + description: Details about a failed InboundTransfer. + properties: + code: + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - debit_not_authorized + - incorrect_account_holder_address + - incorrect_account_holder_name + - incorrect_account_holder_tax_id + - insufficient_funds + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + title: failure_details_params + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/inbound_transfers/{id}/return": + post: + description: "

Marks the test mode InboundTransfer object as returned and + links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already + be in the succeeded state.

" + operationId: PostTestHelpersTreasuryInboundTransfersIdReturn + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" description: Successful response. default: content: @@ -74988,520 +95056,89 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/test_helpers/treasury/inbound_transfers/{id}/succeed": post: - description: "

Creates a new subscription on an existing customer. Each customer - can have up to 500 active or scheduled subscriptions.

" - operationId: PostSubscriptions + description: "

Transitions a test mode created InboundTransfer to the succeeded + status. The InboundTransfer must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryInboundTransfersIdSucceed + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: encoding: - add_invoice_items: - explode: true - style: deepObject - automatic_tax: - explode: true - style: deepObject - billing_thresholds: - explode: true - style: deepObject - default_tax_rates: - explode: true - style: deepObject expand: explode: true style: deepObject - items: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - payment_settings: - explode: true - style: deepObject - pending_invoice_item_interval: - explode: true - style: deepObject - transfer_data: - explode: true - style: deepObject - trial_end: - explode: true - style: deepObject schema: additionalProperties: false properties: - add_invoice_items: - description: A list of prices and quantities that will generate - invoice items appended to the first invoice for this subscription. - You may pass up to 20 items. - items: - properties: - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - title: one_time_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: add_invoice_item_entry - type: object - type: array - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most - two decimal places. This represents the percentage of the subscription - invoice subtotal that will be transferred to the application owner's - Stripe account. The request must be made by a platform account - on a connected account in order to set an application fee percentage. - For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - type: number - automatic_tax: - description: Automatic tax settings for this subscription. - properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - backdate_start_date: - description: For new subscriptions, a past timestamp to backdate - the subscription's start date to. If set, the first invoice will - contain a proration for the timespan between the start date and - the current time. Can be combined with trials and the billing - cycle anchor. - format: unix-time - type: integer - billing_cycle_anchor: - description: A future timestamp to anchor the subscription's [billing - cycle](https://stripe.com/docs/subscriptions/billing-cycle). This - is used to determine the date of the first full invoice, and, - for plans with `month` or `year` intervals, the day of the month - for subsequent invoices. - format: unix-time - type: integer - x-stripeBypassValidation: true - billing_thresholds: - anyOf: - - properties: - amount_gte: - type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - description: Define thresholds at which an invoice will be sent, - and the subscription advanced to a new billing period. Pass an - empty string to remove previously-defined thresholds. - cancel_at: - description: A timestamp at which the subscription should cancel. - If set to a date before the current period ends, this will cause - a proration if prorations have been enabled using `proration_behavior`. - If set during a future period, this will always cause a proration - for that period. - format: unix-time - type: integer - cancel_at_period_end: - description: Boolean indicating whether this subscription should - cancel at the end of the current period. - type: boolean - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When - charging automatically, Stripe will attempt to pay this subscription - at the end of the cycle using the default source attached to the - customer. When sending an invoice, Stripe will email your customer - an invoice with payment instructions. Defaults to `charge_automatically`. - enum: - - charge_automatically - - send_invoice - type: string - coupon: - description: The ID of the coupon to apply to this subscription. - A coupon applied to a subscription will only affect invoices created - for that particular subscription. - maxLength: 5000 - type: string - customer: - description: The identifier of the customer to subscribe. - maxLength: 5000 - type: string - days_until_due: - description: Number of days a customer has to pay invoices generated - by this subscription. Valid only for subscriptions where `collection_method` - is set to `send_invoice`. - type: integer - default_payment_method: - description: ID of the default payment method for the subscription. - It must belong to the customer associated with the subscription. - This takes precedence over `default_source`. If neither are set, - invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - maxLength: 5000 - type: string - default_source: - description: ID of the default payment source for the subscription. - It must belong to the customer associated with the subscription - and be in a chargeable state. If `default_payment_method` is also - set, `default_payment_method` will take precedence. If neither - are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - maxLength: 5000 - type: string - default_tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - description: The tax rates that will apply to any subscription item - that does not have `tax_rates` set. Invoices created will have - their `default_tax_rates` populated from the subscription. expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - items: - description: A list of up to 20 subscription items, each with an - attached price. - items: - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param - type: object - - enum: - - '' - type: string - metadata: - additionalProperties: - type: string - type: object - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: recurring_adhoc - type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - - recurring - title: recurring_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: subscription_item_create_params - type: object - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - off_session: - description: Indicates if a customer is on or off-session while - an invoice payment is attempted. - type: boolean - payment_behavior: - description: |- - Use `allow_incomplete` to create subscriptions with `status=incomplete` if the first invoice cannot be paid. Creating subscriptions with this status allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the payment intent on the first invoice. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the payment intent is not confirmed within 23 hours subscriptions transition to `status=incomplete_expired`, which is a terminal state. - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not create a subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - - `pending_if_incomplete` is only used with updates and cannot be passed when creating a subscription. - enum: - - allow_incomplete - - default_incomplete - - error_if_incomplete - - pending_if_incomplete - type: string - payment_settings: - description: Payment settings to pass to invoices created by the - subscription. - properties: - payment_method_options: - properties: - acss_debit: - anyOf: - - properties: - mandate_options: - properties: - transaction_type: - enum: - - business - - personal - type: string - title: mandate_options_param - type: object - verification_method: - enum: - - automatic - - instant - - microdeposits - type: string - x-stripeBypassValidation: true - title: invoice_payment_method_options_param - type: object - - enum: - - '' - type: string - bancontact: - anyOf: - - properties: - preferred_language: - enum: - - de - - en - - fr - - nl - type: string - title: invoice_payment_method_options_param - type: object - - enum: - - '' - type: string - card: - anyOf: - - properties: - mandate_options: - properties: - amount: - type: integer - amount_type: - enum: - - fixed - - maximum - type: string - description: - maxLength: 200 - type: string - title: mandate_options_param - type: object - request_three_d_secure: - enum: - - any - - automatic - type: string - title: subscription_payment_method_options_param - type: object - - enum: - - '' - type: string - title: payment_method_options - type: object - payment_method_types: - anyOf: - - items: - enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - fpx - - giropay - - grabpay - - ideal - - sepa_debit - - sofort - - wechat_pay - type: string - x-stripeBypassValidation: true - type: array - - enum: - - '' - type: string - title: payment_settings - type: object - pending_invoice_item_interval: - anyOf: - - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: pending_invoice_item_interval_params - type: object - - enum: - - '' - type: string - description: Specifies an interval for how often to bill for any - pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) - for the given subscription at the specified interval. - promotion_code: - description: The API ID of a promotion code to apply to this subscription. - A promotion code applied to a subscription will only affect invoices - created for that particular subscription. - maxLength: 5000 - type: string - proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) resulting from the `billing_cycle_anchor`. Valid values are `create_prorations` or `none`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. Prorations can be disabled by passing `none`. If no value is passed, the default is `create_prorations`. - enum: - - always_invoice - - create_prorations - - none - type: string - transfer_data: - description: If specified, the funds from the subscription's invoices - will be transferred to the destination and the ID of the resulting - transfers will be found on the resulting charges. - properties: - amount_percent: - type: number - destination: - type: string - required: - - destination - title: transfer_data_specs - type: object - trial_end: - anyOf: - - enum: - - now + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/outbound_payments/{id}/fail": + post: + description: "

Transitions a test mode created OutboundPayment to the failed + status. The OutboundPayment must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundPaymentsIdFail + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: maxLength: 5000 type: string - - format: unix-time - type: integer - description: Unix timestamp representing the end of the trial period - the customer will get before being charged for the first time. - This will always overwrite any trials that might apply via a subscribed - plan. If set, trial_end will override the default trial period - of the plan the customer is being subscribed to. The special value - `now` can be provided to end the customer's trial immediately. - Can be at most two years from `billing_cycle_anchor`. See [Using - trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) - to learn more. - trial_from_plan: - description: Indicates if a plan's `trial_period_days` should be - applied to the subscription. Setting `trial_end` per subscription - is preferred, and this defaults to `false`. Setting this flag - to `true` together with `trial_end` is not allowed. See [Using - trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) - to learn more. - type: boolean - trial_period_days: - description: Integer representing the number of trial period days - before the customer is charged for the first time. This will always - overwrite any trials that might apply via a subscribed plan. See - [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) - to learn more. - type: integer - required: - - customer + type: array type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/subscription" + "$ref": "#/components/schemas/treasury.outbound_payment" description: Successful response. default: content: @@ -75509,18 +95146,15 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscriptions/{subscription_exposed_id}": - delete: - description: |- -

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.

- operationId: DeleteSubscriptionsSubscriptionExposedId + "/v1/test_helpers/treasury/outbound_payments/{id}/post": + post: + description: "

Transitions a test mode created OutboundPayment to the posted + status. The OutboundPayment must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundPaymentsIdPost parameters: - in: path - name: subscription_exposed_id + name: id required: true schema: maxLength: 5000 @@ -75542,14 +95176,6 @@ paths: maxLength: 5000 type: string type: array - invoice_now: - description: Will generate a final invoice that invoices for any - un-invoiced metered usage and new/pending proration invoice items. - type: boolean - prorate: - description: Will generate a proration invoice item that credits - remaining unused time until the subscription period end. - type: boolean type: object required: false responses: @@ -75557,7 +95183,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription" + "$ref": "#/components/schemas/treasury.outbound_payment" description: Successful response. default: content: @@ -75565,23 +95191,81 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - get: - description: "

Retrieves the subscription with the given ID.

" - operationId: GetSubscriptionsSubscriptionExposedId + "/v1/test_helpers/treasury/outbound_payments/{id}/return": + post: + description: "

Transitions a test mode created OutboundPayment to the returned + status. The OutboundPayment must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundPaymentsIdReturn parameters: - - description: Specifies which fields in the response should be expanded. - explode: true - in: query - name: expand - required: false + - in: path + name: id + required: true schema: - items: - maxLength: 5000 - type: string - type: array - style: deepObject + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + returned_details: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + returned_details: + description: Optional hash to set the the return code. + properties: + code: + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - declined + - incorrect_account_holder_name + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + title: returned_details_params + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.outbound_payment" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/fail": + post: + description: "

Transitions a test mode created OutboundTransfer to the failed + status. The OutboundTransfer must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundTransfersOutboundTransferFail + parameters: - in: path - name: subscription_exposed_id + name: outbound_transfer required: true schema: maxLength: 5000 @@ -75590,10 +95274,19 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: {} + encoding: + expand: + explode: true + style: deepObject schema: additionalProperties: false - properties: {} + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array type: object required: false responses: @@ -75601,7 +95294,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription" + "$ref": "#/components/schemas/treasury.outbound_transfer" description: Successful response. default: content: @@ -75609,16 +95302,15 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/post": post: - description:

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.

- operationId: PostSubscriptionsSubscriptionExposedId + description: "

Transitions a test mode created OutboundTransfer to the posted + status. The OutboundTransfer must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundTransfersOutboundTransferPost parameters: - in: path - name: subscription_exposed_id + name: outbound_transfer required: true schema: maxLength: 5000 @@ -75628,542 +95320,1052 @@ paths: content: application/x-www-form-urlencoded: encoding: - add_invoice_items: + expand: explode: true style: deepObject - automatic_tax: + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.outbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/outbound_transfers/{outbound_transfer}/return": + post: + description: "

Transitions a test mode created OutboundTransfer to the returned + status. The OutboundTransfer must already be in the processing + state.

" + operationId: PostTestHelpersTreasuryOutboundTransfersOutboundTransferReturn + parameters: + - in: path + name: outbound_transfer + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: explode: true style: deepObject - billing_thresholds: + returned_details: explode: true style: deepObject - cancel_at: + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + returned_details: + description: Details about a returned OutboundTransfer. + properties: + code: + enum: + - account_closed + - account_frozen + - bank_account_restricted + - bank_ownership_changed + - declined + - incorrect_account_holder_name + - invalid_account_number + - invalid_currency + - no_account + - other + type: string + title: returned_details_params + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.outbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/received_credits": + post: + description: "

Use this endpoint to simulate a test mode ReceivedCredit initiated + by a third party. In live mode, you can’t directly create ReceivedCredits + initiated by third parties.

" + operationId: PostTestHelpersTreasuryReceivedCredits + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: explode: true style: deepObject - default_tax_rates: + initiating_payment_method_details: explode: true style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount (in cents) to be transferred. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_account: + description: The FinancialAccount to send funds to. + type: string + initiating_payment_method_details: + description: Initiating payment method details for the object. + properties: + type: + enum: + - us_bank_account + type: string + us_bank_account: + properties: + account_holder_name: + maxLength: 5000 + type: string + account_number: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: us_bank_account_source_params + type: object + required: + - type + title: source_params + type: object + network: + description: The rails used for the object. + enum: + - ach + - us_domestic_wire + type: string + required: + - amount + - currency + - financial_account + - network + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.received_credit" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/test_helpers/treasury/received_debits": + post: + description: "

Use this endpoint to simulate a test mode ReceivedDebit initiated + by a third party. In live mode, you can’t directly create ReceivedDebits initiated + by third parties.

" + operationId: PostTestHelpersTreasuryReceivedDebits + requestBody: + content: + application/x-www-form-urlencoded: + encoding: expand: explode: true style: deepObject - items: + initiating_payment_method_details: explode: true style: deepObject - metadata: + schema: + additionalProperties: false + properties: + amount: + description: Amount (in cents) to be transferred. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_account: + description: The FinancialAccount to pull funds from. + type: string + initiating_payment_method_details: + description: Initiating payment method details for the object. + properties: + type: + enum: + - us_bank_account + type: string + us_bank_account: + properties: + account_holder_name: + maxLength: 5000 + type: string + account_number: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: us_bank_account_source_params + type: object + required: + - type + title: source_params + type: object + network: + description: The rails used for the object. + enum: + - ach + type: string + required: + - amount + - currency + - financial_account + - network + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.received_debit" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/tokens": + post: + description: |- +

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.

+ operationId: PostTokens + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + account: explode: true style: deepObject - pause_collection: + bank_account: explode: true style: deepObject - payment_settings: + card: explode: true style: deepObject - pending_invoice_item_interval: + cvc_update: explode: true style: deepObject - transfer_data: + expand: explode: true style: deepObject - trial_end: + person: + explode: true + style: deepObject + pii: explode: true style: deepObject schema: additionalProperties: false properties: - add_invoice_items: - description: A list of prices and quantities that will generate - invoice items appended to the first invoice for this subscription. - You may pass up to 20 items. - items: - properties: - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified - type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal - type: string - required: - - currency - - product - title: one_time_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - title: add_invoice_item_entry - type: object - type: array - application_fee_percent: - description: A non-negative decimal between 0 and 100, with at most - two decimal places. This represents the percentage of the subscription - invoice subtotal that will be transferred to the application owner's - Stripe account. The request must be made by a platform account - on a connected account in order to set an application fee percentage. - For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). - type: number - automatic_tax: - description: Automatic tax settings for this subscription. + account: + description: Information for the account this token will represent. properties: - enabled: - type: boolean - required: - - enabled - title: automatic_tax_config - type: object - billing_cycle_anchor: - description: Either `now` or `unchanged`. Setting the value to `now` - resets the subscription's billing cycle anchor to the current - time. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). - enum: - - now - - unchanged - maxLength: 5000 - type: string - x-stripeBypassValidation: true - billing_thresholds: - anyOf: - - properties: - amount_gte: - type: integer - reset_billing_cycle_anchor: - type: boolean - title: billing_thresholds_param - type: object - - enum: - - '' - type: string - description: Define thresholds at which an invoice will be sent, - and the subscription advanced to a new billing period. Pass an - empty string to remove previously-defined thresholds. - cancel_at: - anyOf: - - format: unix-time - type: integer - - enum: - - '' - type: string - description: A timestamp at which the subscription should cancel. - If set to a date before the current period ends, this will cause - a proration if prorations have been enabled using `proration_behavior`. - If set during a future period, this will always cause a proration - for that period. - cancel_at_period_end: - description: Boolean indicating whether this subscription should - cancel at the end of the current period. - type: boolean - collection_method: - description: Either `charge_automatically`, or `send_invoice`. When - charging automatically, Stripe will attempt to pay this subscription - at the end of the cycle using the default source attached to the - customer. When sending an invoice, Stripe will email your customer - an invoice with payment instructions. Defaults to `charge_automatically`. - enum: - - charge_automatically - - send_invoice - type: string - coupon: - description: The ID of the coupon to apply to this subscription. - A coupon applied to a subscription will only affect invoices created - for that particular subscription. - maxLength: 5000 - type: string - days_until_due: - description: Number of days a customer has to pay invoices generated - by this subscription. Valid only for subscriptions where `collection_method` - is set to `send_invoice`. - type: integer - default_payment_method: - description: ID of the default payment method for the subscription. - It must belong to the customer associated with the subscription. - This takes precedence over `default_source`. If neither are set, - invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - maxLength: 5000 - type: string - default_source: - description: ID of the default payment source for the subscription. - It must belong to the customer associated with the subscription - and be in a chargeable state. If `default_payment_method` is also - set, `default_payment_method` will take precedence. If neither - are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) - or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). - maxLength: 5000 - type: string - default_tax_rates: - anyOf: - - items: - maxLength: 5000 + business_type: + enum: + - company + - government_entity + - individual + - non_profit type: string - type: array - - enum: - - '' - type: string - description: The tax rates that will apply to any subscription item - that does not have `tax_rates` set. Invoices created will have - their `default_tax_rates` populated from the subscription. Pass - an empty string to remove previously-defined tax rates. - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - items: - description: A list of up to 20 subscription items, each with an - attached price. - items: - properties: - billing_thresholds: - anyOf: - - properties: - usage_gte: - type: integer - required: - - usage_gte - title: item_billing_thresholds_param + x-stripeBypassValidation: true + company: + properties: + address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs type: object - - enum: - - '' + address_kana: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kana_specs + type: object + address_kanji: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kanji_specs + type: object + directors_provided: + type: boolean + executives_provided: + type: boolean + name: + maxLength: 100 type: string - clear_usage: - type: boolean - deleted: - type: boolean - id: - maxLength: 5000 - type: string - metadata: - anyOf: - - additionalProperties: - type: string + name_kana: + maxLength: 100 + type: string + name_kanji: + maxLength: 100 + type: string + owners_provided: + type: boolean + ownership_declaration: + properties: + date: + format: unix-time + type: integer + ip: + type: string + user_agent: + maxLength: 5000 + type: string + title: company_ownership_declaration type: object - - enum: + ownership_declaration_shown_and_signed: + type: boolean + phone: + maxLength: 5000 + type: string + registration_number: + maxLength: 5000 + type: string + structure: + enum: - '' + - free_zone_establishment + - free_zone_llc + - government_instrumentality + - governmental_unit + - incorporated_non_profit + - limited_liability_partnership + - llc + - multi_member_llc + - private_company + - private_corporation + - private_partnership + - public_company + - public_corporation + - public_partnership + - single_member_llc + - sole_establishment + - sole_proprietorship + - tax_exempt_government_instrumentality + - unincorporated_association + - unincorporated_non_profit type: string - price: - maxLength: 5000 - type: string - price_data: - properties: - currency: - type: string - product: - maxLength: 5000 - type: string - recurring: - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: + x-stripeBypassValidation: true + tax_id: + maxLength: 5000 + type: string + tax_id_registrar: + maxLength: 5000 + type: string + vat_id: + maxLength: 5000 + type: string + verification: + properties: + document: + properties: + back: + maxLength: 500 + type: string + front: + maxLength: 500 + type: string + title: verification_document_specs + type: object + title: verification_specs + type: object + title: connect_js_account_token_company_specs + type: object + individual: + properties: + address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object + address_kana: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kana_specs + type: object + address_kanji: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kanji_specs + type: object + dob: + anyOf: + - properties: + day: + type: integer + month: + type: integer + year: type: integer required: - - interval - title: recurring_adhoc + - day + - month + - year + title: date_of_birth_specs type: object - tax_behavior: - enum: - - exclusive - - inclusive - - unspecified + - enum: + - '' type: string - unit_amount: - type: integer - unit_amount_decimal: - format: decimal + email: + type: string + first_name: + maxLength: 100 + type: string + first_name_kana: + maxLength: 5000 + type: string + first_name_kanji: + maxLength: 5000 + type: string + full_name_aliases: + anyOf: + - items: + maxLength: 300 + type: string + type: array + - enum: + - '' type: string - required: - - currency - - product - - recurring - title: recurring_price_data - type: object - quantity: - type: integer - tax_rates: - anyOf: - - items: - maxLength: 5000 + gender: + type: string + id_number: + maxLength: 5000 + type: string + id_number_secondary: + maxLength: 5000 + type: string + last_name: + maxLength: 100 + type: string + last_name_kana: + maxLength: 5000 + type: string + last_name_kanji: + maxLength: 5000 + type: string + maiden_name: + maxLength: 5000 + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' type: string - type: array - - enum: - - '' + phone: type: string - title: subscription_item_update_params - type: object - type: array - metadata: - anyOf: - - additionalProperties: + political_exposure: + enum: + - existing + - none + type: string + registered_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object + ssn_last_4: + maxLength: 5000 + type: string + verification: + properties: + additional_document: + properties: + back: + maxLength: 500 + type: string + front: + maxLength: 500 + type: string + title: person_verification_document_specs + type: object + document: + properties: + back: + maxLength: 500 + type: string + front: + maxLength: 500 + type: string + title: person_verification_document_specs + type: object + title: person_verification_specs + type: object + title: individual_specs + type: object + tos_shown_and_accepted: + type: boolean + title: connect_js_account_token_specs + type: object + bank_account: + description: The bank account this token will represent. + properties: + account_holder_name: + maxLength: 5000 type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - off_session: - description: Indicates if a customer is on or off-session while - an invoice payment is attempted. - type: boolean - pause_collection: + account_holder_type: + enum: + - company + - individual + maxLength: 5000 + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - futsu + - savings + - toza + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + currency: + type: string + routing_number: + maxLength: 5000 + type: string + required: + - account_number + - country + title: token_create_bank_account + type: object + x-stripeBypassValidation: true + card: anyOf: - properties: - behavior: - enum: - - keep_as_draft - - mark_uncollectible - - void + address_city: + maxLength: 5000 + type: string + address_country: + maxLength: 5000 + type: string + address_line1: + maxLength: 5000 + type: string + address_line2: + maxLength: 5000 + type: string + address_state: + maxLength: 5000 + type: string + address_zip: + maxLength: 5000 + type: string + currency: + maxLength: 5000 + type: string + cvc: + maxLength: 5000 + type: string + exp_month: + maxLength: 5000 + type: string + exp_year: + maxLength: 5000 + type: string + name: + maxLength: 5000 + type: string + number: + maxLength: 5000 type: string - resumes_at: - format: unix-time - type: integer required: - - behavior - title: pause_collection_param + - exp_month + - exp_year + - number + title: credit_card_specs type: object - - enum: - - '' + - maxLength: 5000 type: string - description: If specified, payment collection for this subscription - will be paused. - payment_behavior: - description: |- - Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. - - Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. - - Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). - - Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. - enum: - - allow_incomplete - - default_incomplete - - error_if_incomplete - - pending_if_incomplete + x-stripeBypassValidation: true + customer: + description: The customer (owned by the application's account) for + which to create a token. This can be used only with an [OAuth + access token](https://stripe.com/docs/connect/standard-accounts) + or [Stripe-Account header](https://stripe.com/docs/connect/authentication). + For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + maxLength: 5000 type: string - payment_settings: - description: Payment settings to pass to invoices created by the - subscription. + cvc_update: + description: The updated CVC value this token will represent. properties: - payment_method_options: + cvc: + maxLength: 5000 + type: string + required: + - cvc + title: cvc_params + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + person: + description: Information for the person this token will represent. + properties: + address: properties: - acss_debit: - anyOf: - - properties: - mandate_options: - properties: - transaction_type: - enum: - - business - - personal - type: string - title: mandate_options_param - type: object - verification_method: - enum: - - automatic - - instant - - microdeposits + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object + address_kana: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kana_specs + type: object + address_kanji: + properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + town: + maxLength: 5000 + type: string + title: japan_address_kanji_specs + type: object + dob: + anyOf: + - properties: + day: + type: integer + month: + type: integer + year: + type: integer + required: + - day + - month + - year + title: date_of_birth_specs + type: object + - enum: + - '' + type: string + documents: + properties: + company_authorization: + properties: + files: + items: + maxLength: 500 type: string - x-stripeBypassValidation: true - title: invoice_payment_method_options_param - type: object - - enum: - - '' - type: string - bancontact: - anyOf: - - properties: - preferred_language: - enum: - - de - - en - - fr - - nl + type: array + title: documents_param + type: object + passport: + properties: + files: + items: + maxLength: 500 type: string - title: invoice_payment_method_options_param - type: object - - enum: - - '' - type: string - card: - anyOf: - - properties: - mandate_options: - properties: - amount: - type: integer - amount_type: - enum: - - fixed - - maximum - type: string - description: - maxLength: 200 - type: string - title: mandate_options_param - type: object - request_three_d_secure: - enum: - - any - - automatic + type: array + title: documents_param + type: object + visa: + properties: + files: + items: + maxLength: 500 type: string - title: subscription_payment_method_options_param - type: object - - enum: - - '' - type: string - title: payment_method_options + type: array + title: documents_param + type: object + title: person_documents_specs type: object - payment_method_types: + email: + type: string + first_name: + maxLength: 5000 + type: string + first_name_kana: + maxLength: 5000 + type: string + first_name_kanji: + maxLength: 5000 + type: string + full_name_aliases: anyOf: - items: - enum: - - ach_credit_transfer - - ach_debit - - acss_debit - - au_becs_debit - - bacs_debit - - bancontact - - boleto - - card - - fpx - - giropay - - grabpay - - ideal - - sepa_debit - - sofort - - wechat_pay + maxLength: 5000 type: string - x-stripeBypassValidation: true type: array - enum: - '' type: string - title: payment_settings - type: object - pending_invoice_item_interval: - anyOf: - - properties: - interval: - enum: - - day - - month - - week - - year - type: string - interval_count: - type: integer - required: - - interval - title: pending_invoice_item_interval_params - type: object - - enum: - - '' - type: string - description: Specifies an interval for how often to bill for any - pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) - for the given subscription at the specified interval. - promotion_code: - description: The promotion code to apply to this subscription. A - promotion code applied to a subscription will only affect invoices - created for that particular subscription. - maxLength: 5000 - type: string - proration_behavior: - description: |- - Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. Valid values are `create_prorations`, `none`, or `always_invoice`. - - Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. - - Prorations can be disabled by passing `none`. - enum: - - always_invoice - - create_prorations - - none - type: string - proration_date: - description: If set, the proration will be calculated as though - the subscription was updated at the given time. This can be used - to apply exactly the same proration that was previewed with [upcoming - invoice](https://stripe.com/docs/api#retrieve_customer_invoice) - endpoint. It can also be used to implement custom proration logic, - such as prorating by day instead of by second, by providing the - time that you wish to use for proration calculations. - format: unix-time - type: integer - transfer_data: - anyOf: - - properties: - amount_percent: - type: number - destination: + gender: + type: string + id_number: + maxLength: 5000 + type: string + id_number_secondary: + maxLength: 5000 + type: string + last_name: + maxLength: 5000 + type: string + last_name_kana: + maxLength: 5000 + type: string + last_name_kanji: + maxLength: 5000 + type: string + maiden_name: + maxLength: 5000 + type: string + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' type: string - required: - - destination - title: transfer_data_specs - type: object - - enum: - - '' - type: string - description: If specified, the funds from the subscription's invoices - will be transferred to the destination and the ID of the resulting - transfers will be found on the resulting charges. This will be - unset if you POST an empty value. - trial_end: - anyOf: - - enum: - - now - maxLength: 5000 - type: string - - format: unix-time - type: integer - description: Unix timestamp representing the end of the trial period - the customer will get before being charged for the first time. - This will always overwrite any trials that might apply via a subscribed - plan. If set, trial_end will override the default trial period - of the plan the customer is being subscribed to. The special value - `now` can be provided to end the customer's trial immediately. - Can be at most two years from `billing_cycle_anchor`. - trial_from_plan: - description: Indicates if a plan's `trial_period_days` should be - applied to the subscription. Setting `trial_end` per subscription - is preferred, and this defaults to `false`. Setting this flag - to `true` together with `trial_end` is not allowed. See [Using - trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) - to learn more. - type: boolean + nationality: + maxLength: 5000 + type: string + phone: + type: string + political_exposure: + maxLength: 5000 + type: string + registered_address: + properties: + city: + maxLength: 100 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 200 + type: string + line2: + maxLength: 200 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: address_specs + type: object + relationship: + properties: + director: + type: boolean + executive: + type: boolean + owner: + type: boolean + percent_ownership: + anyOf: + - type: number + - enum: + - '' + type: string + representative: + type: boolean + title: + maxLength: 5000 + type: string + title: relationship_specs + type: object + ssn_last_4: + type: string + verification: + properties: + additional_document: + properties: + back: + maxLength: 500 + type: string + front: + maxLength: 500 + type: string + title: person_verification_document_specs + type: object + document: + properties: + back: + maxLength: 500 + type: string + front: + maxLength: 500 + type: string + title: person_verification_document_specs + type: object + title: person_verification_specs + type: object + title: person_token_specs + type: object + pii: + description: The PII this token will represent. + properties: + id_number: + maxLength: 5000 + type: string + title: pii_token_specs + type: object type: object required: false responses: @@ -76171,7 +96373,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/subscription" + "$ref": "#/components/schemas/token" description: Successful response. default: content: @@ -76179,13 +96381,24 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/subscriptions/{subscription_exposed_id}/discount": - delete: - description: "

Removes the currently applied discount on a subscription.

" - operationId: DeleteSubscriptionsSubscriptionExposedIdDiscount + "/v1/tokens/{token}": + get: + description: "

Retrieves the token with the given ID.

" + operationId: GetTokensToken parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject - in: path - name: subscription_exposed_id + name: token required: true schema: maxLength: 5000 @@ -76205,7 +96418,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/deleted_discount" + "$ref": "#/components/schemas/token" description: Successful response. default: content: @@ -76213,13 +96426,53 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tax_codes": + "/v1/topups": get: - description:

A list of all - tax codes available to add to Products in order to allow specific tax - calculations.

- operationId: GetTaxCodes + description: "

Returns a list of top-ups.

" + operationId: GetTopups parameters: + - description: A positive integer representing how much to transfer. + explode: true + in: query + name: amount + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: 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. + explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -76229,6 +96482,7 @@ paths: name: ending_before required: false schema: + maxLength: 5000 type: string style: form - description: Specifies which fields in the response should be expanded. @@ -76259,6 +96513,21 @@ paths: name: starting_after required: false schema: + maxLength: 5000 + type: string + style: form + - description: Only return top-ups that have the given status. One of `canceled`, + `failed`, `pending` or `succeeded`. + in: query + name: status + required: false + schema: + enum: + - canceled + - failed + - pending + - succeeded + maxLength: 5000 type: string style: form requestBody: @@ -76279,7 +96548,7 @@ paths: properties: data: items: - "$ref": "#/components/schemas/tax_code" + "$ref": "#/components/schemas/topup" type: array has_more: description: True if this list has another page of items after @@ -76294,13 +96563,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 + pattern: "^/v1/topups" type: string required: - data - has_more - object - url - title: TaxProductResourceTaxCodeList + title: TopupList type: object x-expandableFields: - data @@ -76311,11 +96581,92 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tax_codes/{id}": + post: + description: "

Top up the balance of an account

" + operationId: PostTopups + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: A positive integer representing how much to transfer. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + source: + description: The ID of a source to transfer funds from. For most + users, this should be left unspecified which will use the bank + account that was set up in the dashboard for the specified currency. + In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + maxLength: 5000 + type: string + statement_descriptor: + description: Extra information about a top-up for the source's bank + statement. Limited to 15 ASCII characters. + maxLength: 15 + type: string + transfer_group: + description: A string that identifies this top-up as part of a group. + type: string + required: + - amount + - currency + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/topup" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/topups/{topup}": get: - description: "

Retrieves the details of an existing tax code. Supply the unique - tax code ID and Stripe will return the corresponding tax code information.

" - operationId: GetTaxCodesId + description: "

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.

" + operationId: GetTopupsTopup parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -76329,7 +96680,7 @@ paths: type: array style: deepObject - in: path - name: id + name: topup required: true schema: maxLength: 5000 @@ -76349,7 +96700,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/tax_code" + "$ref": "#/components/schemas/topup" description: Successful response. default: content: @@ -76357,22 +96708,121 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tax_rates": - get: - description: "

Returns a list of your tax rates. Tax rates are returned sorted - by creation date, with the most recently created tax rates appearing first.

" - operationId: GetTaxRates + post: + description: "

Updates the metadata of a top-up. Other top-up details are + not editable by design.

" + operationId: PostTopupsTopup parameters: - - description: Optional flag to filter by tax rates that are either active or - inactive (archived). - in: query - name: active + - in: path + name: topup + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/topup" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/topups/{topup}/cancel": + post: + description: "

Cancels a top-up. Only pending top-ups can be canceled.

" + operationId: PostTopupsTopupCancel + parameters: + - in: path + name: topup + required: true schema: - type: boolean - style: form - - description: Optional range for filtering created date. - explode: true + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/topup" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/transfers": + get: + description: "

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.

" + operationId: GetTransfers + parameters: + - explode: true in: query name: created required: false @@ -76391,6 +96841,15 @@ paths: type: object - type: integer style: deepObject + - description: Only return transfers for the destination specified by this account + ID. + in: query + name: destination + required: false + schema: + maxLength: 5000 + type: string + style: form - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -76414,14 +96873,217 @@ paths: type: string type: array style: deepObject - - description: Optional flag to filter by tax rates that are inclusive (or those - that are not inclusive). + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. in: query - name: inclusive + name: limit required: false schema: - type: boolean + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return transfers with the specified transfer group. + in: query + name: transfer_group + required: false + schema: + maxLength: 5000 + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/transfer" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/transfers" + type: string + required: + - data + - has_more + - object + - url + title: TransferList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description:

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.

+ operationId: PostTransfers + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: A positive integer in cents (or local equivalent) representing + how much to transfer. + type: integer + currency: + description: 3-letter [ISO code for currency](https://stripe.com/docs/payouts). + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + destination: + description: The ID of a connected Stripe account. See + the Connect documentation for details. + type: string + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + source_transaction: + description: You can use this parameter to transfer funds from a + charge before they are added to your available balance. A pending + balance will transfer immediately but the funds will not become + available until the original charge becomes available. [See the + Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) + for details. + type: string + source_type: + description: The source balance to use for this transfer. One of + `bank_account`, `card`, or `fpx`. For most users, this will default + to `card`. + enum: + - bank_account + - card + - fpx + maxLength: 5000 + type: string + x-stripeBypassValidation: true + transfer_group: + description: A string that identifies this transaction as part of + a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) + for details. + type: string + required: + - currency + - destination + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/transfers/{id}/reversals": + get: + description: "

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.

" + operationId: GetTransfersIdReversals + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -76459,8 +97121,9 @@ paths: description: '' properties: data: + description: Details about each object. items: - "$ref": "#/components/schemas/tax_rate" + "$ref": "#/components/schemas/transfer_reversal" type: array has_more: description: True if this list has another page of items after @@ -76475,13 +97138,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/tax_rates" type: string required: - data - has_more - object - url + title: TransferReversalList type: object x-expandableFields: - data @@ -76493,8 +97156,21 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Creates a new tax rate.

" - operationId: PostTaxRates + description: |- +

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.

+ operationId: PostTransfersIdReversals + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -76508,83 +97184,53 @@ paths: schema: additionalProperties: false properties: - active: - description: Flag determining whether the tax rate is active or - inactive (archived). Inactive tax rates cannot be used with new - applications or Checkout Sessions, but will still work for subscriptions - and invoices that already have it set. - type: boolean - country: - description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - maxLength: 5000 - type: string + amount: + description: A positive integer in cents (or local equivalent) 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. + type: integer description: - description: An arbitrary string attached to the tax rate for your - internal use only. It will not be visible to your customers. + description: An arbitrary string which you can attach to a reversal + object. It is displayed alongside the reversal in the Dashboard. + This will be unset if you POST an empty value. maxLength: 5000 type: string - display_name: - description: The display name of the tax rate, which will be shown - to users. - maxLength: 50 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - inclusive: - description: This specifies if the tax rate is inclusive or exclusive. - type: boolean - jurisdiction: - description: The jurisdiction for the tax rate. You can use this - label field for tax reporting purposes. It also appears on your - customer’s invoice. - maxLength: 50 - type: string metadata: - additionalProperties: + anyOf: + - additionalProperties: + type: string + type: object + - enum: + - '' type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - type: object - percentage: - description: This represents the tax rate percent out of 100. - type: number - state: - description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), - without country prefix. For example, "NY" for New York, United - States.' - maxLength: 2 - type: string - tax_type: - description: The high-level tax type, such as `vat` or `sales_tax`. - enum: - - gst - - hst - - jct - - pst - - qst - - rst - - sales_tax - - vat - type: string - required: - - display_name - - inclusive - - percentage + refund_application_fee: + description: Boolean indicating whether the application fee should + be refunded when reversing this transfer. If a full transfer reversal + is given, the full application fee will be refunded. Otherwise, + the application fee will be refunded with an amount proportional + to the amount of the transfer reversed. + type: boolean type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/tax_rate" + "$ref": "#/components/schemas/transfer_reversal" description: Successful response. default: content: @@ -76592,10 +97238,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tax_rates/{tax_rate}": + "/v1/transfers/{transfer}": get: - description: "

Retrieves a tax rate with the given ID

" - operationId: GetTaxRatesTaxRate + description: "

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.

" + operationId: GetTransfersTransfer parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -76609,7 +97257,7 @@ paths: type: array style: deepObject - in: path - name: tax_rate + name: transfer required: true schema: maxLength: 5000 @@ -76629,7 +97277,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/tax_rate" + "$ref": "#/components/schemas/transfer" description: Successful response. default: content: @@ -76638,11 +97286,14 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates an existing tax rate.

" - operationId: PostTaxRatesTaxRate + description: |- +

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.

+ operationId: PostTransfersTransfer parameters: - in: path - name: tax_rate + name: transfer required: true schema: maxLength: 5000 @@ -76661,38 +97312,17 @@ paths: schema: additionalProperties: false properties: - active: - description: Flag determining whether the tax rate is active or - inactive (archived). Inactive tax rates cannot be used with new - applications or Checkout Sessions, but will still work for subscriptions - and invoices that already have it set. - type: boolean - country: - description: Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). - maxLength: 5000 - type: string description: - description: An arbitrary string attached to the tax rate for your - internal use only. It will not be visible to your customers. + description: An arbitrary string attached to the object. Often useful + for displaying to users. maxLength: 5000 type: string - display_name: - description: The display name of the tax rate, which will be shown - to users. - maxLength: 50 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - jurisdiction: - description: The jurisdiction for the tax rate. You can use this - label field for tax reporting purposes. It also appears on your - customer’s invoice. - maxLength: 50 - type: string metadata: anyOf: - additionalProperties: @@ -76706,70 +97336,6 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - state: - description: '[ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), - without country prefix. For example, "NY" for New York, United - States.' - maxLength: 2 - type: string - tax_type: - description: The high-level tax type, such as `vat` or `sales_tax`. - enum: - - gst - - hst - - jct - - pst - - qst - - rst - - sales_tax - - vat - type: string - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/tax_rate" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/terminal/connection_tokens": - post: - description: "

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.

" - operationId: PostTerminalConnectionTokens - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - location: - description: The id of the location that this connection token is - scoped to. If specified the connection token will only be usable - with readers assigned to that location, otherwise the connection - token will be usable with all readers. Note that location scoping - only applies to internet-connected readers. For more details, - see [the docs on scoping connection tokens](https://stripe.com/docs/terminal/fleet/locations#connection-tokens). - maxLength: 5000 - type: string type: object required: false responses: @@ -76777,7 +97343,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/terminal.connection_token" + "$ref": "#/components/schemas/transfer" description: Successful response. default: content: @@ -76785,23 +97351,13 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/terminal/locations": + "/v1/transfers/{transfer}/reversals/{id}": get: - description: "

Returns a list of Location objects.

" - operationId: GetTerminalLocations + description: "

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.

" + operationId: GetTransfersTransferReversalsId parameters: - - description: A cursor for use in pagination. `ending_before` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, starting with `obj_bar`, your subsequent - call can include `ending_before=obj_bar` in order to fetch the previous - page of the list. - in: query - name: ending_before - required: false - schema: - maxLength: 5000 - type: string - style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -76813,26 +97369,20 @@ paths: type: string type: array style: deepObject - - description: A limit on the number of objects to be returned. Limit can range - between 1 and 100, and the default is 10. - in: query - name: limit - required: false + - in: path + name: id + required: true schema: - type: integer - style: form - - description: A cursor for use in pagination. `starting_after` is an object - ID that defines your place in the list. For instance, if you make a list - request and receive 100 objects, ending with `obj_foo`, your subsequent - call can include `starting_after=obj_foo` in order to fetch the next page - of the list. - in: query - name: starting_after - required: false + maxLength: 5000 + type: string + style: simple + - in: path + name: transfer + required: true schema: maxLength: 5000 type: string - style: form + style: simple requestBody: content: application/x-www-form-urlencoded: @@ -76847,36 +97397,7 @@ paths: content: application/json: schema: - description: '' - properties: - data: - items: - "$ref": "#/components/schemas/terminal.location" - type: array - has_more: - description: True if this list has another page of items after - this one that can be fetched. - type: boolean - object: - description: String representing the object's type. Objects of - the same type share the same value. Always has the value `list`. - enum: - - list - type: string - url: - description: The URL where this list can be accessed. - maxLength: 5000 - pattern: "^/v1/terminal/locations" - type: string - required: - - data - - has_more - - object - - url - title: TerminalLocationLocationList - type: object - x-expandableFields: - - data + "$ref": "#/components/schemas/transfer_reversal" description: Successful response. default: content: @@ -76886,16 +97407,29 @@ paths: description: Error response. post: description: |- -

Creates a new Location object. - For further details, including which address fields are required in each country, see the Manage locations guide.

- operationId: PostTerminalLocations +

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.

+ operationId: PostTransfersTransferReversalsId + parameters: + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + - in: path + name: transfer + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: encoding: - address: - explode: true - style: deepObject expand: explode: true style: deepObject @@ -76905,35 +97439,6 @@ paths: schema: additionalProperties: false properties: - address: - description: The full address of the location. - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - required: - - country - title: create_location_address_param - type: object - display_name: - description: A name for the location. - maxLength: 1000 - type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -76953,17 +97458,14 @@ paths: additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - required: - - address - - display_name type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/terminal.location" + "$ref": "#/components/schemas/transfer_reversal" description: Successful response. default: content: @@ -76971,44 +97473,23 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/terminal/locations/{location}": - delete: - description: "

Deletes a Location object.

" - operationId: DeleteTerminalLocationsLocation + "/v1/treasury/credit_reversals": + get: + description: "

Returns a list of CreditReversals.

" + operationId: GetTreasuryCreditReversals parameters: - - in: path - name: location - required: true + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false schema: maxLength: 5000 type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: {} - schema: - additionalProperties: false - properties: {} - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/deleted_terminal.location" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - get: - description: "

Retrieves a Location object.

" - operationId: GetTerminalLocationsLocation - parameters: + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -77020,13 +97501,52 @@ paths: type: string type: array style: deepObject - - in: path - name: location + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account required: true + schema: + type: string + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: Only return CreditReversals for the ReceivedCredit ID. + in: query + name: received_credit + required: false schema: maxLength: 5000 type: string - style: simple + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Only return CreditReversals for a given status. + in: query + name: status + required: false + schema: + enum: + - canceled + - posted + - processing + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -77041,7 +97561,36 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/terminal.location" + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.credit_reversal" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: TreasuryReceivedCreditsResourceCreditReversalList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -77050,24 +97599,12 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates a Location object by setting the values - of the parameters passed. Any parameters not provided will be left unchanged.

" - operationId: PostTerminalLocationsLocation - parameters: - - in: path - name: location - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

Reverses a ReceivedCredit and creates a CreditReversal object.

" + operationId: PostTreasuryCreditReversals requestBody: content: application/x-www-form-urlencoded: encoding: - address: - explode: true - style: deepObject expand: explode: true style: deepObject @@ -77077,33 +97614,6 @@ paths: schema: additionalProperties: false properties: - address: - description: The full address of the location. - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: optional_fields_address - type: object - display_name: - description: A name for the location. - maxLength: 1000 - type: string expand: description: Specifies which fields in the response should be expanded. items: @@ -77111,26 +97621,28 @@ paths: type: string type: array metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + additionalProperties: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + type: object + received_credit: + description: The ReceivedCredit to reverse. + maxLength: 5000 + type: string + required: + - received_credit type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/terminal.location" + "$ref": "#/components/schemas/treasury.credit_reversal" description: Successful response. default: content: @@ -77138,23 +97650,58 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/terminal/readers": + "/v1/treasury/credit_reversals/{credit_reversal}": get: - description: "

Returns a list of Reader objects.

" - operationId: GetTerminalReaders + description: "

Retrieves the details of an existing CreditReversal by passing + the unique CreditReversal ID from either the CreditReversal creation request + or CreditReversal list

" + operationId: GetTreasuryCreditReversalsCreditReversal parameters: - - description: Filters readers by device type + - in: path + name: credit_reversal + required: true + schema: + maxLength: 5000 + type: string + style: simple + - description: Specifies which fields in the response should be expanded. + explode: true in: query - name: device_type + name: expand required: false schema: - enum: - - bbpos_chipper2x - - bbpos_wisepos_e - - verifone_P400 - type: string - x-stripeBypassValidation: true - style: form + items: + maxLength: 5000 + type: string + type: array + style: deepObject + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.credit_reversal" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/debit_reversals": + get: + description: "

Returns a list of DebitReversals.

" + operationId: GetTreasuryDebitReversals + parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -77178,6 +97725,13 @@ paths: type: string type: array style: deepObject + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account + required: true + schema: + type: string + style: form - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -77186,15 +97740,24 @@ paths: schema: type: integer style: form - - description: A location ID to filter the response list to only readers at - the specific location + - description: Only return DebitReversals for the ReceivedDebit ID. in: query - name: location + name: received_debit required: false schema: maxLength: 5000 type: string style: form + - description: Only return DebitReversals for a given resolution. + in: query + name: resolution + required: false + schema: + enum: + - lost + - won + type: string + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -77207,14 +97770,15 @@ paths: maxLength: 5000 type: string style: form - - description: A status filter to filter readers to only offline or online readers + - description: Only return DebitReversals for a given status. in: query name: status required: false schema: enum: - - offline - - online + - canceled + - completed + - processing type: string style: form requestBody: @@ -77234,9 +97798,9 @@ paths: description: '' properties: data: - description: A list of readers + description: Details about each object. items: - "$ref": "#/components/schemas/terminal.reader" + "$ref": "#/components/schemas/treasury.debit_reversal" type: array has_more: description: True if this list has another page of items after @@ -77257,7 +97821,7 @@ paths: - has_more - object - url - title: TerminalReaderRetrieveReader + title: TreasuryReceivedDebitsResourceDebitReversalList type: object x-expandableFields: - data @@ -77269,8 +97833,8 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Creates a new Reader object.

" - operationId: PostTerminalReaders + description: "

Reverses a ReceivedDebit and creates a DebitReversal object.

" + operationId: PostTreasuryDebitReversals requestBody: content: application/x-www-form-urlencoded: @@ -77290,35 +97854,21 @@ paths: maxLength: 5000 type: string type: array - label: - description: Custom label given to the reader for easier identification. - If no label is specified, the registration code will be used. - maxLength: 5000 - type: string - location: - description: The location to assign the reader to. - maxLength: 5000 - type: string metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + additionalProperties: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - registration_code: - description: A code generated by the reader used for registering - to an account. + type: object + received_debit: + description: The ReceivedDebit to reverse. maxLength: 5000 type: string required: - - registration_code + - received_debit type: object required: true responses: @@ -77326,7 +97876,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/terminal.reader" + "$ref": "#/components/schemas/treasury.debit_reversal" description: Successful response. default: content: @@ -77334,18 +97884,29 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/terminal/readers/{reader}": - delete: - description: "

Deletes a Reader object.

" - operationId: DeleteTerminalReadersReader + "/v1/treasury/debit_reversals/{debit_reversal}": + get: + description: "

Retrieves a DebitReversal object.

" + operationId: GetTreasuryDebitReversalsDebitReversal parameters: - in: path - name: reader + name: debit_reversal required: true schema: maxLength: 5000 type: string style: simple + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject requestBody: content: application/x-www-form-urlencoded: @@ -77360,7 +97921,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/deleted_terminal.reader" + "$ref": "#/components/schemas/treasury.debit_reversal" description: Successful response. default: content: @@ -77368,10 +97929,38 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/treasury/financial_accounts": get: - description: "

Retrieves a Reader object.

" - operationId: GetTerminalReadersReader + description: "

Returns a list of FinancialAccounts.

" + operationId: GetTreasuryFinancialAccounts parameters: + - explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: An object ID cursor for use in pagination. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -77383,13 +97972,21 @@ paths: type: string type: array style: deepObject - - in: path - name: reader - required: true + - description: A limit ranging from 1 to 100 (defaults to 10). + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: An object ID cursor for use in pagination. + in: query + name: starting_after + required: false schema: maxLength: 5000 type: string - style: simple + style: form requestBody: content: application/x-www-form-urlencoded: @@ -77404,9 +98001,36 @@ paths: content: application/json: schema: - anyOf: - - "$ref": "#/components/schemas/terminal.reader" - - "$ref": "#/components/schemas/deleted_terminal.reader" + description: '' + properties: + data: + items: + "$ref": "#/components/schemas/treasury.financial_account" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/treasury/financial_accounts" + type: string + required: + - data + - has_more + - object + - url + title: TreasuryFinancialAccountsResourceFinancialAccountList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -77415,17 +98039,9 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Updates a Reader object by setting the values - of the parameters passed. Any parameters not provided will be left unchanged.

" - operationId: PostTerminalReadersReader - parameters: - - in: path - name: reader - required: true - schema: - maxLength: 5000 - type: string - style: simple + description: "

Creates a new FinancialAccount. For now, each connected account + can only have one FinancialAccount.

" + operationId: PostTreasuryFinancialAccounts requestBody: content: application/x-www-form-urlencoded: @@ -77433,9 +98049,18 @@ paths: expand: explode: true style: deepObject + features: + explode: true + style: deepObject metadata: explode: true style: deepObject + platform_restrictions: + explode: true + style: deepObject + supported_currencies: + explode: true + style: deepObject schema: additionalProperties: false properties: @@ -77445,23 +98070,180 @@ paths: maxLength: 5000 type: string type: array - label: - description: The new label of the reader. - maxLength: 5000 - type: string + features: + description: Encodes whether a FinancialAccount has access to a + particular feature. Stripe or the platform can control features + via the requested field. + properties: + card_issuing: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + deposit_insurance: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + financial_addresses: + properties: + aba: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: financial_addresses + type: object + inbound_transfers: + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: inbound_transfers + type: object + intra_stripe_flows: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + outbound_payments: + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + us_domestic_wire: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: outbound_payments + type: object + outbound_transfers: + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + us_domestic_wire: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: outbound_transfers + type: object + title: feature_access + type: object metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + additionalProperties: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + type: object + platform_restrictions: + description: The set of functionalities that the platform can restrict + on the FinancialAccount. + properties: + inbound_flows: + enum: + - restricted + - unrestricted + type: string + outbound_flows: + enum: + - restricted + - unrestricted + type: string + title: platform_restrictions + type: object + supported_currencies: + description: The currencies the FinancialAccount can hold a balance + in. + items: + maxLength: 5000 + type: string + type: array + required: + - supported_currencies + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.financial_account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/financial_accounts/{financial_account}": + get: + description: "

Retrieves the details of a FinancialAccount.

" + operationId: GetTreasuryFinancialAccountsFinancialAccount + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: financial_account + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} type: object required: false responses: @@ -77469,9 +98251,7 @@ paths: content: application/json: schema: - anyOf: - - "$ref": "#/components/schemas/terminal.reader" - - "$ref": "#/components/schemas/deleted_terminal.reader" + "$ref": "#/components/schemas/treasury.financial_account" description: Successful response. default: content: @@ -77479,738 +98259,1004 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tokens": post: - description: |- -

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.

- operationId: PostTokens + description: "

Updates the details of a FinancialAccount.

" + operationId: PostTreasuryFinancialAccountsFinancialAccount + parameters: + - in: path + name: financial_account + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: encoding: - account: - explode: true - style: deepObject - bank_account: - explode: true - style: deepObject - card: - explode: true - style: deepObject - cvc_update: + expand: explode: true style: deepObject - expand: + features: explode: true style: deepObject - person: + metadata: explode: true style: deepObject - pii: + platform_restrictions: explode: true style: deepObject schema: additionalProperties: false properties: - account: - description: Information for the account this token will represent. - properties: - business_type: - enum: - - company - - government_entity - - individual - - non_profit - type: string - x-stripeBypassValidation: true - company: - properties: - address: - properties: - city: - maxLength: 100 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 200 - type: string - line2: - maxLength: 200 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: address_specs - type: object - address_kana: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kana_specs - type: object - address_kanji: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kanji_specs - type: object - directors_provided: - type: boolean - executives_provided: - type: boolean - name: - maxLength: 100 - type: string - name_kana: - maxLength: 100 - type: string - name_kanji: - maxLength: 100 - type: string - owners_provided: - type: boolean - ownership_declaration: - properties: - date: - format: unix-time - type: integer - ip: - type: string - user_agent: - maxLength: 5000 - type: string - title: company_ownership_declaration - type: object - ownership_declaration_shown_and_signed: - type: boolean - phone: - maxLength: 5000 - type: string - registration_number: - maxLength: 5000 - type: string - structure: - enum: - - '' - - free_zone_establishment - - free_zone_llc - - government_instrumentality - - governmental_unit - - incorporated_non_profit - - limited_liability_partnership - - llc - - multi_member_llc - - private_company - - private_corporation - - private_partnership - - public_company - - public_corporation - - public_partnership - - single_member_llc - - sole_establishment - - sole_proprietorship - - tax_exempt_government_instrumentality - - unincorporated_association - - unincorporated_non_profit - type: string - x-stripeBypassValidation: true - tax_id: - maxLength: 5000 - type: string - tax_id_registrar: - maxLength: 5000 - type: string - vat_id: - maxLength: 5000 - type: string - verification: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + features: + description: Encodes whether a FinancialAccount has access to a + particular feature, with a status enum and associated `status_details`. + Stripe or the platform may control features via the requested + field. + properties: + card_issuing: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + deposit_insurance: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + financial_addresses: + properties: + aba: properties: - document: - properties: - back: - maxLength: 500 - type: string - front: - maxLength: 500 - type: string - title: verification_document_specs - type: object - title: verification_specs + requested: + type: boolean + required: + - requested + title: access type: object - title: connect_js_account_token_company_specs + title: financial_addresses type: object - individual: + inbound_transfers: properties: - address: + ach: properties: - city: - maxLength: 100 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 200 - type: string - line2: - maxLength: 200 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: address_specs + requested: + type: boolean + required: + - requested + title: access type: object - address_kana: + title: inbound_transfers + type: object + intra_stripe_flows: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + outbound_payments: + properties: + ach: properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kana_specs + requested: + type: boolean + required: + - requested + title: access type: object - address_kanji: + us_domestic_wire: properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kanji_specs + requested: + type: boolean + required: + - requested + title: access type: object - dob: - anyOf: - - properties: - day: - type: integer - month: - type: integer - year: - type: integer - required: - - day - - month - - year - title: date_of_birth_specs - type: object - - enum: - - '' - type: string - email: - type: string - first_name: - maxLength: 100 - type: string - first_name_kana: - maxLength: 5000 - type: string - first_name_kanji: - maxLength: 5000 - type: string - full_name_aliases: - anyOf: - - items: - maxLength: 300 - type: string - type: array - - enum: - - '' - type: string - gender: - type: string - id_number: - maxLength: 5000 - type: string - last_name: - maxLength: 100 - type: string - last_name_kana: - maxLength: 5000 - type: string - last_name_kanji: - maxLength: 5000 - type: string - maiden_name: - maxLength: 5000 - type: string - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - phone: - type: string - political_exposure: - enum: - - existing - - none - type: string - ssn_last_4: - maxLength: 5000 - type: string - verification: + title: outbound_payments + type: object + outbound_transfers: + properties: + ach: properties: - additional_document: - properties: - back: - maxLength: 500 - type: string - front: - maxLength: 500 - type: string - title: person_verification_document_specs - type: object - document: - properties: - back: - maxLength: 500 - type: string - front: - maxLength: 500 - type: string - title: person_verification_document_specs - type: object - title: person_verification_specs + requested: + type: boolean + required: + - requested + title: access type: object - title: individual_specs + us_domestic_wire: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: outbound_transfers type: object - tos_shown_and_accepted: - type: boolean - title: connect_js_account_token_specs + title: feature_access type: object - bank_account: - description: The bank account this token will represent. + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. + type: object + platform_restrictions: + description: The set of functionalities that the platform can restrict + on the FinancialAccount. properties: - account_holder_name: - maxLength: 5000 - type: string - account_holder_type: + inbound_flows: enum: - - company - - individual - maxLength: 5000 - type: string - account_number: - maxLength: 5000 + - restricted + - unrestricted type: string - account_type: + outbound_flows: enum: - - checking - - futsu - - savings - - toza - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - currency: - type: string - routing_number: - maxLength: 5000 + - restricted + - unrestricted type: string + title: platform_restrictions + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.financial_account" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/financial_accounts/{financial_account}/features": + get: + description: "

Retrieves Features information associated with the FinancialAccount.

" + operationId: GetTreasuryFinancialAccountsFinancialAccountFeatures + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: financial_account + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.financial_account_features" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Updates the Features associated with a FinancialAccount.

" + operationId: PostTreasuryFinancialAccountsFinancialAccountFeatures + parameters: + - in: path + name: financial_account + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + card_issuing: + explode: true + style: deepObject + deposit_insurance: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + financial_addresses: + explode: true + style: deepObject + inbound_transfers: + explode: true + style: deepObject + intra_stripe_flows: + explode: true + style: deepObject + outbound_payments: + explode: true + style: deepObject + outbound_transfers: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + card_issuing: + description: Encodes the FinancialAccount's ability to be used with + the Issuing product, including attaching cards to and drawing + funds from the FinancialAccount. + properties: + requested: + type: boolean required: - - account_number - - country - title: token_create_bank_account + - requested + title: access type: object - x-stripeBypassValidation: true - card: - anyOf: - - properties: - address_city: - maxLength: 5000 - type: string - address_country: - maxLength: 5000 - type: string - address_line1: - maxLength: 5000 - type: string - address_line2: - maxLength: 5000 - type: string - address_state: - maxLength: 5000 - type: string - address_zip: - maxLength: 5000 - type: string - currency: - maxLength: 5000 - type: string - cvc: - maxLength: 5000 - type: string - exp_month: - maxLength: 5000 - type: string - exp_year: - maxLength: 5000 - type: string - name: - maxLength: 5000 - type: string - number: - maxLength: 5000 - type: string - required: - - exp_month - - exp_year - - number - title: credit_card_specs - type: object - - maxLength: 5000 + deposit_insurance: + description: Represents whether this FinancialAccount is eligible + for deposit insurance. Various factors determine the insurance + amount. + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_addresses: + description: Contains Features that add FinancialAddresses to the + FinancialAccount. + properties: + aba: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: financial_addresses + type: object + inbound_transfers: + description: Contains settings related to adding funds to a FinancialAccount + from another Account with the same owner. + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: inbound_transfers + type: object + intra_stripe_flows: + description: Represents the ability for the FinancialAccount to + send money to, or receive money from other FinancialAccounts (for + example, via OutboundPayment). + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + outbound_payments: + description: Includes Features related to initiating money movement + out of the FinancialAccount to someone else's bucket of money. + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + us_domestic_wire: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: outbound_payments + type: object + outbound_transfers: + description: Contains a Feature and settings related to moving money + out of the FinancialAccount into another Account with the same + owner. + properties: + ach: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + us_domestic_wire: + properties: + requested: + type: boolean + required: + - requested + title: access + type: object + title: outbound_transfers + type: object + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.financial_account_features" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/inbound_transfers": + get: + description: "

Returns a list of InboundTransfers sent from the specified + FinancialAccount.

" + operationId: GetTreasuryInboundTransfers + parameters: + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account + required: true + schema: + type: string + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: 'Only return InboundTransfers that have the given status: `processing`, + `succeeded`, `failed` or `canceled`.' + in: query + name: status + required: false + schema: + enum: + - canceled + - failed + - processing + - succeeded + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.inbound_transfer" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list type: string - x-stripeBypassValidation: true - customer: - description: The customer (owned by the application's account) for - which to create a token. This can be used only with an [OAuth - access token](https://stripe.com/docs/connect/standard-accounts) - or [Stripe-Account header](https://stripe.com/docs/connect/authentication). - For more details, see [Cloning Saved Payment Methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: TreasuryInboundTransfersResourceInboundTransferList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates an InboundTransfer.

" + operationId: PostTreasuryInboundTransfers + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount (in cents) to be transferred. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. maxLength: 5000 type: string - cvc_update: - description: The updated CVC value this token will represent. - properties: - cvc: - maxLength: 5000 - type: string - required: - - cvc - title: cvc_params + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_account: + description: The FinancialAccount to send funds to. + type: string + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. type: object + origin_payment_method: + description: The origin payment method to be debited for the InboundTransfer. + maxLength: 5000 + type: string + statement_descriptor: + description: The complete description that appears on your customers' + statements. Maximum 10 characters. + maxLength: 10 + type: string + required: + - amount + - currency + - financial_account + - origin_payment_method + type: object + required: true + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/inbound_transfers/{id}": + get: + description: "

Retrieves the details of an existing InboundTransfer.

" + operationId: GetTreasuryInboundTransfersId + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/inbound_transfers/{inbound_transfer}/cancel": + post: + description: "

Cancels an InboundTransfer.

" + operationId: PostTreasuryInboundTransfersInboundTransferCancel + parameters: + - in: path + name: inbound_transfer + required: true + schema: + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - person: - description: Information for the person this token will represent. - properties: - address: - properties: - city: - maxLength: 100 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 200 - type: string - line2: - maxLength: 200 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - title: address_specs - type: object - address_kana: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kana_specs - type: object - address_kanji: - properties: - city: - maxLength: 5000 - type: string - country: - maxLength: 5000 - type: string - line1: - maxLength: 5000 - type: string - line2: - maxLength: 5000 - type: string - postal_code: - maxLength: 5000 - type: string - state: - maxLength: 5000 - type: string - town: - maxLength: 5000 - type: string - title: japan_address_kanji_specs - type: object - dob: - anyOf: - - properties: - day: - type: integer - month: - type: integer - year: - type: integer - required: - - day - - month - - year - title: date_of_birth_specs - type: object - - enum: - - '' - type: string - documents: - properties: - company_authorization: - properties: - files: - items: - maxLength: 500 - type: string - type: array - title: documents_param - type: object - passport: - properties: - files: - items: - maxLength: 500 - type: string - type: array - title: documents_param - type: object - visa: - properties: - files: - items: - maxLength: 500 - type: string - type: array - title: documents_param - type: object - title: person_documents_specs - type: object - email: - type: string - first_name: - maxLength: 5000 - type: string - first_name_kana: - maxLength: 5000 - type: string - first_name_kanji: - maxLength: 5000 - type: string - full_name_aliases: - anyOf: - - items: - maxLength: 5000 - type: string - type: array - - enum: - - '' - type: string - gender: - type: string - id_number: - maxLength: 5000 - type: string - last_name: - maxLength: 5000 - type: string - last_name_kana: - maxLength: 5000 - type: string - last_name_kanji: - maxLength: 5000 - type: string - maiden_name: - maxLength: 5000 - type: string - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - nationality: - maxLength: 5000 - type: string - phone: - type: string - political_exposure: - maxLength: 5000 - type: string - relationship: + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.inbound_transfer" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/outbound_payments": + get: + description: "

Returns a list of OutboundPayments sent from the specified + FinancialAccount.

" + operationId: GetTreasuryOutboundPayments + parameters: + - description: Only return OutboundPayments sent to this customer. + in: query + name: customer + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account + required: true + schema: + type: string + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: 'Only return OutboundPayments that have the given status: `processing`, + `failed`, `posted`, `returned`, or `canceled`.' + in: query + name: status + required: false + schema: + enum: + - canceled + - failed + - posted + - processing + - returned + type: string + style: form + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.outbound_payment" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + pattern: "^/v1/treasury/outbound_payments" + type: string + required: + - data + - has_more + - object + - url + title: TreasuryOutboundPaymentsResourceOutboundPaymentList + type: object + x-expandableFields: + - data + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + post: + description: "

Creates an OutboundPayment.

" + operationId: PostTreasuryOutboundPayments + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + destination_payment_method_data: + explode: true + style: deepObject + destination_payment_method_options: + explode: true + style: deepObject + end_user_details: + explode: true + style: deepObject + expand: + explode: true + style: deepObject + metadata: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + amount: + description: Amount (in cents) to be transferred. + type: integer + currency: + description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), + in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + type: string + customer: + description: ID of the customer to whom the OutboundPayment is sent. + Must match the Customer attached to the `destination_payment_method` + passed in. + maxLength: 5000 + type: string + description: + description: An arbitrary string attached to the object. Often useful + for displaying to users. + maxLength: 5000 + type: string + destination_payment_method: + description: The PaymentMethod to use as the payment instrument + for the OutboundPayment. Exclusive with `destination_payment_method_data`. + maxLength: 5000 + type: string + destination_payment_method_data: + description: Hash used to generate the PaymentMethod to be used + for this OutboundPayment. Exclusive with `destination_payment_method`. + properties: + billing_details: properties: - director: - type: boolean - executive: - type: boolean - owner: - type: boolean - percent_ownership: + address: anyOf: - - type: number + - properties: + city: + maxLength: 5000 + type: string + country: + maxLength: 5000 + type: string + line1: + maxLength: 5000 + type: string + line2: + maxLength: 5000 + type: string + postal_code: + maxLength: 5000 + type: string + state: + maxLength: 5000 + type: string + title: billing_details_address + type: object - enum: - '' type: string - representative: - type: boolean - title: + email: + anyOf: + - type: string + - enum: + - '' + type: string + name: maxLength: 5000 type: string - title: relationship_specs + phone: + maxLength: 5000 + type: string + title: billing_details_inner_params type: object - ssn_last_4: + financial_account: type: string - verification: + metadata: + additionalProperties: + type: string + type: object + type: + enum: + - financial_account + - us_bank_account + type: string + us_bank_account: properties: - additional_document: - properties: - back: - maxLength: 500 - type: string - front: - maxLength: 500 - type: string - title: person_verification_document_specs - type: object - document: - properties: - back: - maxLength: 500 - type: string - front: - maxLength: 500 - type: string - title: person_verification_document_specs - type: object - title: person_verification_specs + account_holder_type: + enum: + - company + - individual + type: string + account_number: + maxLength: 5000 + type: string + account_type: + enum: + - checking + - savings + type: string + financial_connections_account: + maxLength: 5000 + type: string + routing_number: + maxLength: 5000 + type: string + title: payment_method_param type: object - title: person_token_specs + required: + - type + title: payment_method_data type: object - pii: - description: The PII this token will represent. + destination_payment_method_options: + description: Payment method-specific configuration for this OutboundPayment. properties: - id_number: - maxLength: 5000 + us_bank_account: + anyOf: + - properties: + network: + enum: + - ach + - us_domestic_wire + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + title: payment_method_options + type: object + end_user_details: + description: End user details. + properties: + ip_address: type: string - title: pii_token_specs + present: + type: boolean + required: + - present + title: end_user_details_params + type: object + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + financial_account: + description: The FinancialAccount to pull funds from. + type: string + metadata: + additionalProperties: + type: string + description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) + that you can attach to an object. This can be useful for storing + additional information about the object in a structured format. + Individual keys can be unset by posting an empty value to them. + All keys can be unset by posting an empty value to `metadata`. type: object + statement_descriptor: + description: The description that appears on the receiving end for + this OutboundPayment (for example, bank statement for external + bank transfer). Maximum 10 characters for `ach` payments, 140 + characters for `wire` payments, or 500 characters for `stripe` + network transfers. The default value is `payment`. + maxLength: 5000 + type: string + required: + - amount + - currency + - financial_account type: object - required: false + required: true responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/token" + "$ref": "#/components/schemas/treasury.outbound_payment" description: Successful response. default: content: @@ -78218,10 +99264,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/tokens/{token}": + "/v1/treasury/outbound_payments/{id}": get: - description: "

Retrieves the token with the given ID.

" - operationId: GetTokensToken + description: "

Retrieves the details of an existing OutboundPayment by passing + the unique OutboundPayment ID from either the OutboundPayment creation request + or OutboundPayment list.

" + operationId: GetTreasuryOutboundPaymentsId parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -78235,7 +99283,7 @@ paths: type: array style: deepObject - in: path - name: token + name: id required: true schema: maxLength: 5000 @@ -78255,7 +99303,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/token" + "$ref": "#/components/schemas/treasury.outbound_payment" description: Successful response. default: content: @@ -78263,53 +99311,55 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/topups": - get: - description: "

Returns a list of top-ups.

" - operationId: GetTopups + "/v1/treasury/outbound_payments/{id}/cancel": + post: + description: "

Cancel an OutboundPayment.

" + operationId: PostTreasuryOutboundPaymentsIdCancel parameters: - - description: A positive integer representing how much to transfer. - explode: true - in: query - name: amount - required: false + - in: path + name: id + required: true schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject - - description: 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. - explode: true - in: query - name: created + maxLength: 5000 + type: string + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: + expand: + explode: true + style: deepObject + schema: + additionalProperties: false + properties: + expand: + description: Specifies which fields in the response should be expanded. + items: + maxLength: 5000 + type: string + type: array + type: object required: false - schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer - style: deepObject + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.outbound_payment" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/outbound_transfers": + get: + description: "

Returns a list of OutboundTransfers sent from the specified + FinancialAccount.

" + operationId: GetTreasuryOutboundTransfers + parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -78333,6 +99383,13 @@ paths: type: string type: array style: deepObject + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account + required: true + schema: + type: string + style: form - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -78353,8 +99410,8 @@ paths: maxLength: 5000 type: string style: form - - description: Only return top-ups that have the given status. One of `canceled`, - `failed`, `pending` or `succeeded`. + - description: 'Only return OutboundTransfers that have the given status: `processing`, + `canceled`, `failed`, `posted`, or `returned`.' in: query name: status required: false @@ -78362,9 +99419,9 @@ paths: enum: - canceled - failed - - pending - - succeeded - maxLength: 5000 + - posted + - processing + - returned type: string style: form requestBody: @@ -78384,8 +99441,9 @@ paths: description: '' properties: data: + description: Details about each object. items: - "$ref": "#/components/schemas/topup" + "$ref": "#/components/schemas/treasury.outbound_transfer" type: array has_more: description: True if this list has another page of items after @@ -78400,14 +99458,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/topups" type: string required: - data - has_more - object - url - title: TopupList + title: TreasuryOutboundTransfersResourceOutboundTransferList type: object x-expandableFields: - data @@ -78419,12 +99476,15 @@ paths: "$ref": "#/components/schemas/error" description: Error response. post: - description: "

Top up the balance of an account

" - operationId: PostTopups + description: "

Creates an OutboundTransfer.

" + operationId: PostTreasuryOutboundTransfers requestBody: content: application/x-www-form-urlencoded: encoding: + destination_payment_method_options: + explode: true + style: deepObject expand: explode: true style: deepObject @@ -78435,7 +99495,7 @@ paths: additionalProperties: false properties: amount: - description: A positive integer representing how much to transfer. + description: Amount (in cents) to be transferred. type: integer currency: description: Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), @@ -78446,43 +99506,57 @@ paths: for displaying to users. maxLength: 5000 type: string + destination_payment_method: + description: The PaymentMethod to use as the payment instrument + for the OutboundTransfer. + maxLength: 5000 + type: string + destination_payment_method_options: + description: Hash describing payment method configuration details. + properties: + us_bank_account: + anyOf: + - properties: + network: + enum: + - ach + - us_domestic_wire + type: string + title: payment_method_options_param + type: object + - enum: + - '' + type: string + title: payment_method_options + type: object expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array + financial_account: + description: The FinancialAccount to pull funds from. + type: string metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' + additionalProperties: type: string description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. - source: - description: The ID of a source to transfer funds from. For most - users, this should be left unspecified which will use the bank - account that was set up in the dashboard for the specified currency. - In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). - maxLength: 5000 - type: string + type: object statement_descriptor: - description: Extra information about a top-up for the source's bank - statement. Limited to 15 ASCII characters. - maxLength: 15 - type: string - transfer_group: - description: A string that identifies this top-up as part of a group. + description: Statement descriptor to be shown on the receiving end + of an OutboundTransfer. Maximum 10 characters for `ach` transfers + or 140 characters for `wire` transfers. The default value is `transfer`. + maxLength: 5000 type: string required: - amount - currency + - financial_account type: object required: true responses: @@ -78490,7 +99564,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/topup" + "$ref": "#/components/schemas/treasury.outbound_transfer" description: Successful response. default: content: @@ -78498,12 +99572,12 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/topups/{topup}": + "/v1/treasury/outbound_transfers/{outbound_transfer}": get: - description: "

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.

" - operationId: GetTopupsTopup + description: "

Retrieves the details of an existing OutboundTransfer by passing + the unique OutboundTransfer ID from either the OutboundTransfer creation request + or OutboundTransfer list.

" + operationId: GetTreasuryOutboundTransfersOutboundTransfer parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -78517,7 +99591,7 @@ paths: type: array style: deepObject - in: path - name: topup + name: outbound_transfer required: true schema: maxLength: 5000 @@ -78537,7 +99611,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/topup" + "$ref": "#/components/schemas/treasury.outbound_transfer" description: Successful response. default: content: @@ -78545,13 +99619,14 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. + "/v1/treasury/outbound_transfers/{outbound_transfer}/cancel": post: - description: "

Updates the metadata of a top-up. Other top-up details are - not editable by design.

" - operationId: PostTopupsTopup + description: "

An OutboundTransfer can be canceled if the funds have not yet + been paid out.

" + operationId: PostTreasuryOutboundTransfersOutboundTransferCancel parameters: - in: path - name: topup + name: outbound_transfer required: true schema: maxLength: 5000 @@ -78564,36 +99639,15 @@ paths: expand: explode: true style: deepObject - metadata: - explode: true - style: deepObject schema: additionalProperties: false properties: - description: - description: An arbitrary string attached to the object. Often useful - for displaying to users. - maxLength: 5000 - type: string expand: description: Specifies which fields in the response should be expanded. items: maxLength: 5000 type: string type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. type: object required: false responses: @@ -78601,7 +99655,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/topup" + "$ref": "#/components/schemas/treasury.outbound_transfer" description: Successful response. default: content: @@ -78609,34 +99663,100 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/topups/{topup}/cancel": - post: - description: "

Cancels a top-up. Only pending top-ups can be canceled.

" - operationId: PostTopupsTopupCancel + "/v1/treasury/received_credits": + get: + description: "

Returns a list of ReceivedCredits.

" + operationId: GetTreasuryReceivedCredits parameters: - - in: path - name: topup + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false + schema: + maxLength: 5000 + type: string + style: form + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - description: The FinancialAccount that received the funds. + in: query + name: financial_account required: true + schema: + type: string + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: Only return ReceivedCredits described by the flow. + explode: true + in: query + name: linked_flows + required: false + schema: + properties: + source_flow_type: + enum: + - credit_reversal + - other + - outbound_payment + - payout + type: string + x-stripeBypassValidation: true + required: + - source_flow_type + title: linked_flows_param + type: object + style: deepObject + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false schema: maxLength: 5000 type: string - style: simple + style: form + - description: 'Only return ReceivedCredits that have the given status: `succeeded` + or `failed`.' + in: query + name: status + required: false + schema: + enum: + - failed + - succeeded + type: string + x-stripeBypassValidation: true + style: form requestBody: content: application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject + encoding: {} schema: additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array + properties: {} type: object required: false responses: @@ -78644,7 +99764,36 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/topup" + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.received_credit" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: TreasuryReceivedCreditsResourceReceivedCreditList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -78652,41 +99801,57 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/transfers": + "/v1/treasury/received_credits/{id}": get: - description: "

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.

" - operationId: GetTransfers + description: "

Retrieves the details of an existing ReceivedCredit by passing + the unique ReceivedCredit ID from the ReceivedCredit list.

" + operationId: GetTreasuryReceivedCreditsId parameters: - - explode: true + - description: Specifies which fields in the response should be expanded. + explode: true in: query - name: created + name: expand required: false schema: - anyOf: - - properties: - gt: - type: integer - gte: - type: integer - lt: - type: integer - lte: - type: integer - title: range_query_specs - type: object - - type: integer + items: + maxLength: 5000 + type: string + type: array style: deepObject - - description: Only return transfers for the destination specified by this account - ID. - in: query - name: destination - required: false + - in: path + name: id + required: true schema: maxLength: 5000 type: string - style: form + style: simple + requestBody: + content: + application/x-www-form-urlencoded: + encoding: {} + schema: + additionalProperties: false + properties: {} + type: object + required: false + responses: + '200': + content: + application/json: + schema: + "$ref": "#/components/schemas/treasury.received_credit" + description: Successful response. + default: + content: + application/json: + schema: + "$ref": "#/components/schemas/error" + description: Error response. + "/v1/treasury/received_debits": + get: + description: "

Returns a list of ReceivedDebits.

" + operationId: GetTreasuryReceivedDebits + parameters: - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -78710,6 +99875,13 @@ paths: type: string type: array style: deepObject + - description: The FinancialAccount that funds were pulled from. + in: query + name: financial_account + required: true + schema: + type: string + style: form - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -78730,13 +99902,17 @@ paths: maxLength: 5000 type: string style: form - - description: Only return transfers with the specified transfer group. + - description: 'Only return ReceivedDebits that have the given status: `succeeded` + or `failed`.' in: query - name: transfer_group + name: status required: false schema: - maxLength: 5000 + enum: + - failed + - succeeded type: string + x-stripeBypassValidation: true style: form requestBody: content: @@ -78757,7 +99933,7 @@ paths: data: description: Details about each object. items: - "$ref": "#/components/schemas/transfer" + "$ref": "#/components/schemas/treasury.received_debit" type: array has_more: description: True if this list has another page of items after @@ -78772,14 +99948,13 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 - pattern: "^/v1/transfers" type: string required: - data - has_more - object - url - title: TransferList + title: TreasuryReceivedDebitsResourceReceivedDebitList type: object x-expandableFields: - data @@ -78790,90 +99965,45 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - post: - description:

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.

- operationId: PostTransfers + "/v1/treasury/received_debits/{id}": + get: + description: "

Retrieves the details of an existing ReceivedDebit by passing + the unique ReceivedDebit ID from the ReceivedDebit list

" + operationId: GetTreasuryReceivedDebitsId + parameters: + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false + schema: + items: + maxLength: 5000 + type: string + type: array + style: deepObject + - in: path + name: id + required: true + schema: + maxLength: 5000 + type: string + style: simple requestBody: content: application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject + encoding: {} schema: additionalProperties: false - properties: - amount: - description: A positive integer in %s representing how much to transfer. - type: integer - currency: - description: 3-letter [ISO code for currency](https://stripe.com/docs/payouts). - type: string - description: - description: An arbitrary string attached to the object. Often useful - for displaying to users. - maxLength: 5000 - type: string - destination: - description: The ID of a connected Stripe account. See - the Connect documentation for details. - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - additionalProperties: - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - source_transaction: - description: You can use this parameter to transfer funds from a - charge before they are added to your available balance. A pending - balance will transfer immediately but the funds will not become - available until the original charge becomes available. [See the - Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-availability) - for details. - type: string - source_type: - description: The source balance to use for this transfer. One of - `bank_account`, `card`, or `fpx`. For most users, this will default - to `card`. - enum: - - bank_account - - card - - fpx - maxLength: 5000 - type: string - x-stripeBypassValidation: true - transfer_group: - description: A string that identifies this transaction as part of - a group. See the [Connect documentation](https://stripe.com/docs/connect/charges-transfers#transfer-options) - for details. - type: string - required: - - currency - - destination + properties: {} type: object - required: true + required: false responses: '200': content: application/json: schema: - "$ref": "#/components/schemas/transfer" + "$ref": "#/components/schemas/treasury.received_debit" description: Successful response. default: content: @@ -78881,15 +100011,49 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - "/v1/transfers/{id}/reversals": + "/v1/treasury/transaction_entries": get: - description: "

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.

" - operationId: GetTransfersIdReversals + description: "

Retrieves a list of TransactionEntry objects.

" + operationId: GetTreasuryTransactionEntries parameters: + - explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - explode: true + in: query + name: effective_at + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject - description: A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent @@ -78913,13 +100077,13 @@ paths: type: string type: array style: deepObject - - in: path - name: id + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account required: true schema: - maxLength: 5000 type: string - style: simple + style: form - description: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. in: query @@ -78928,6 +100092,17 @@ paths: schema: type: integer style: form + - description: The results are in reverse chronological order by `created` or + `effective_at`. The default is `created`. + in: query + name: order_by + required: false + schema: + enum: + - created + - effective_at + type: string + style: form - description: A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent @@ -78940,6 +100115,14 @@ paths: maxLength: 5000 type: string style: form + - description: Only return TransactionEntries associated with this Transaction. + in: query + name: transaction + required: false + schema: + maxLength: 5000 + type: string + style: form requestBody: content: application/x-www-form-urlencoded: @@ -78959,7 +100142,7 @@ paths: data: description: Details about each object. items: - "$ref": "#/components/schemas/transfer_reversal" + "$ref": "#/components/schemas/treasury.transaction_entry" type: array has_more: description: True if this list has another page of items after @@ -78974,13 +100157,14 @@ paths: url: description: The URL where this list can be accessed. maxLength: 5000 + pattern: "^/v1/treasury/transaction_entries" type: string required: - data - has_more - object - url - title: TransferReversalList + title: TreasuryTransactionsResourceTransactionEntryList type: object x-expandableFields: - data @@ -78991,95 +100175,10 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - post: - description: |- -

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.

- operationId: PostTransfersIdReversals - parameters: - - in: path - name: id - required: true - schema: - maxLength: 5000 - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - amount: - description: A positive integer in %s representing how much of this - transfer to reverse. Can only reverse up to the unreversed amount - remaining of the transfer. Partial transfer reversals are only - allowed for transfers to Stripe Accounts. Defaults to the entire - transfer amount. - type: integer - description: - description: An arbitrary string which you can attach to a reversal - object. It is displayed alongside the reversal in the Dashboard. - This will be unset if you POST an empty value. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - refund_application_fee: - description: Boolean indicating whether the application fee should - be refunded when reversing this transfer. If a full transfer reversal - is given, the full application fee will be refunded. Otherwise, - the application fee will be refunded with an amount proportional - to the amount of the transfer reversed. - type: boolean - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/transfer_reversal" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/transfers/{transfer}": + "/v1/treasury/transaction_entries/{id}": get: - description: "

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.

" - operationId: GetTransfersTransfer + description: "

Retrieves a TransactionEntry object.

" + operationId: GetTreasuryTransactionEntriesId parameters: - description: Specifies which fields in the response should be expanded. explode: true @@ -79093,7 +100192,7 @@ paths: type: array style: deepObject - in: path - name: transfer + name: id required: true schema: maxLength: 5000 @@ -79113,7 +100212,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/transfer" + "$ref": "#/components/schemas/treasury.transaction_entry" description: Successful response. default: content: @@ -79121,79 +100220,42 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - post: - description: |- -

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.

- operationId: PostTransfersTransfer + "/v1/treasury/transactions": + get: + description: "

Retrieves a list of Transaction objects.

" + operationId: GetTreasuryTransactions parameters: - - in: path - name: transfer - required: true + - explode: true + in: query + name: created + required: false + schema: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + style: deepObject + - description: A cursor for use in pagination. `ending_before` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, starting with `obj_bar`, your subsequent + call can include `ending_before=obj_bar` in order to fetch the previous + page of the list. + in: query + name: ending_before + required: false schema: maxLength: 5000 type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject - schema: - additionalProperties: false - properties: - description: - description: An arbitrary string attached to the object. Often useful - for displaying to users. - maxLength: 5000 - type: string - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. - type: object - required: false - responses: - '200': - content: - application/json: - schema: - "$ref": "#/components/schemas/transfer" - description: Successful response. - default: - content: - application/json: - schema: - "$ref": "#/components/schemas/error" - description: Error response. - "/v1/transfers/{transfer}/reversals/{id}": - get: - description: "

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.

" - operationId: GetTransfersTransferReversalsId - parameters: + style: form - description: Specifies which fields in the response should be expanded. explode: true in: query @@ -79205,20 +100267,83 @@ paths: type: string type: array style: deepObject - - in: path - name: id + - description: Returns objects associated with this FinancialAccount. + in: query + name: financial_account required: true schema: - maxLength: 5000 type: string - style: simple - - in: path - name: transfer - required: true + style: form + - description: A limit on the number of objects to be returned. Limit can range + between 1 and 100, and the default is 10. + in: query + name: limit + required: false + schema: + type: integer + style: form + - description: The results are in reverse chronological order by `created` or + `posted_at`. The default is `created`. + in: query + name: order_by + required: false + schema: + enum: + - created + - posted_at + type: string + x-stripeBypassValidation: true + style: form + - description: A cursor for use in pagination. `starting_after` is an object + ID that defines your place in the list. For instance, if you make a list + request and receive 100 objects, ending with `obj_foo`, your subsequent + call can include `starting_after=obj_foo` in order to fetch the next page + of the list. + in: query + name: starting_after + required: false schema: maxLength: 5000 type: string - style: simple + style: form + - description: 'Only return Transactions that have the given status: `open`, + `posted`, or `void`.' + in: query + name: status + required: false + schema: + enum: + - open + - posted + - void + type: string + style: form + - description: A filter for the `status_transitions.posted_at` timestamp. When + using this filter, `status=posted` and `order_by=posted_at` must also be + specified. + explode: true + in: query + name: status_transitions + required: false + schema: + properties: + posted_at: + anyOf: + - properties: + gt: + type: integer + gte: + type: integer + lt: + type: integer + lte: + type: integer + title: range_query_specs + type: object + - type: integer + title: status_transition_timestamp_specs + type: object + style: deepObject requestBody: content: application/x-www-form-urlencoded: @@ -79233,7 +100358,36 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/transfer_reversal" + description: '' + properties: + data: + description: Details about each object. + items: + "$ref": "#/components/schemas/treasury.transaction" + type: array + has_more: + description: True if this list has another page of items after + this one that can be fetched. + type: boolean + object: + description: String representing the object's type. Objects of + the same type share the same value. Always has the value `list`. + enum: + - list + type: string + url: + description: The URL where this list can be accessed. + maxLength: 5000 + type: string + required: + - data + - has_more + - object + - url + title: TreasuryTransactionsResourceTransactionList + type: object + x-expandableFields: + - data description: Successful response. default: content: @@ -79241,22 +100395,24 @@ paths: schema: "$ref": "#/components/schemas/error" description: Error response. - post: - description: |- -

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.

- operationId: PostTransfersTransferReversalsId + "/v1/treasury/transactions/{id}": + get: + description: "

Retrieves the details of an existing Transaction.

" + operationId: GetTreasuryTransactionsId parameters: - - in: path - name: id - required: true + - description: Specifies which fields in the response should be expanded. + explode: true + in: query + name: expand + required: false schema: - maxLength: 5000 - type: string - style: simple + items: + maxLength: 5000 + type: string + type: array + style: deepObject - in: path - name: transfer + name: id required: true schema: maxLength: 5000 @@ -79265,35 +100421,10 @@ paths: requestBody: content: application/x-www-form-urlencoded: - encoding: - expand: - explode: true - style: deepObject - metadata: - explode: true - style: deepObject + encoding: {} schema: additionalProperties: false - properties: - expand: - description: Specifies which fields in the response should be expanded. - items: - maxLength: 5000 - type: string - type: array - metadata: - anyOf: - - additionalProperties: - type: string - type: object - - enum: - - '' - type: string - description: Set of [key-value pairs](https://stripe.com/docs/api/metadata) - that you can attach to an object. This can be useful for storing - additional information about the object in a structured format. - Individual keys can be unset by posting an empty value to them. - All keys can be unset by posting an empty value to `metadata`. + properties: {} type: object required: false responses: @@ -79301,7 +100432,7 @@ paths: content: application/json: schema: - "$ref": "#/components/schemas/transfer_reversal" + "$ref": "#/components/schemas/treasury.transaction" description: Successful response. default: content: @@ -79397,6 +100528,7 @@ paths: - has_more - object - url + title: NotificationWebhookEndpointList type: object x-expandableFields: - data @@ -79533,6 +100665,7 @@ paths: - '2019-12-03' - '2020-03-02' - '2020-08-27' + - '2022-08-01' maxLength: 5000 type: string x-stripeBypassValidation: true @@ -79565,7 +100698,9 @@ paths: - balance.available - billing_portal.configuration.created - billing_portal.configuration.updated + - billing_portal.session.created - capability.updated + - cash_balance.funds_available - charge.captured - charge.dispute.closed - charge.dispute.created @@ -79608,7 +100743,13 @@ paths: - customer.tax_id.deleted - customer.tax_id.updated - customer.updated + - customer_cash_balance_transaction.created - file.created + - financial_connections.account.created + - financial_connections.account.deactivated + - financial_connections.account.disconnected + - financial_connections.account.reactivated + - financial_connections.account.refreshed_balance - identity.verification_session.canceled - identity.verification_session.created - identity.verification_session.processing @@ -79647,13 +100788,10 @@ paths: - 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.partially_funded - payment_intent.payment_failed - payment_intent.processing - payment_intent.requires_action @@ -79722,16 +100860,49 @@ paths: - subscription_schedule.updated - tax_rate.created - tax_rate.updated + - terminal.reader.action_failed + - terminal.reader.action_succeeded + - test_helpers.test_clock.advancing + - test_helpers.test_clock.created + - test_helpers.test_clock.deleted + - test_helpers.test_clock.internal_failure + - test_helpers.test_clock.ready - topup.canceled - topup.created - topup.failed - topup.reversed - topup.succeeded - transfer.created - - transfer.failed - - transfer.paid - transfer.reversed - transfer.updated + - treasury.credit_reversal.created + - treasury.credit_reversal.posted + - treasury.debit_reversal.completed + - treasury.debit_reversal.created + - treasury.debit_reversal.initial_credit_granted + - treasury.financial_account.closed + - treasury.financial_account.created + - treasury.financial_account.features_status_updated + - treasury.inbound_transfer.canceled + - treasury.inbound_transfer.created + - treasury.inbound_transfer.failed + - treasury.inbound_transfer.succeeded + - treasury.outbound_payment.canceled + - treasury.outbound_payment.created + - treasury.outbound_payment.expected_arrival_date_updated + - treasury.outbound_payment.failed + - treasury.outbound_payment.posted + - treasury.outbound_payment.returned + - treasury.outbound_transfer.canceled + - treasury.outbound_transfer.created + - treasury.outbound_transfer.expected_arrival_date_updated + - treasury.outbound_transfer.failed + - treasury.outbound_transfer.posted + - treasury.outbound_transfer.returned + - treasury.received_credit.created + - treasury.received_credit.failed + - treasury.received_credit.succeeded + - treasury.received_debit.created type: string x-stripeBypassValidation: true type: array @@ -79909,7 +101080,9 @@ paths: - balance.available - billing_portal.configuration.created - billing_portal.configuration.updated + - billing_portal.session.created - capability.updated + - cash_balance.funds_available - charge.captured - charge.dispute.closed - charge.dispute.created @@ -79952,7 +101125,13 @@ paths: - customer.tax_id.deleted - customer.tax_id.updated - customer.updated + - customer_cash_balance_transaction.created - file.created + - financial_connections.account.created + - financial_connections.account.deactivated + - financial_connections.account.disconnected + - financial_connections.account.reactivated + - financial_connections.account.refreshed_balance - identity.verification_session.canceled - identity.verification_session.created - identity.verification_session.processing @@ -79991,13 +101170,10 @@ paths: - 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.partially_funded - payment_intent.payment_failed - payment_intent.processing - payment_intent.requires_action @@ -80066,16 +101242,49 @@ paths: - subscription_schedule.updated - tax_rate.created - tax_rate.updated + - terminal.reader.action_failed + - terminal.reader.action_succeeded + - test_helpers.test_clock.advancing + - test_helpers.test_clock.created + - test_helpers.test_clock.deleted + - test_helpers.test_clock.internal_failure + - test_helpers.test_clock.ready - topup.canceled - topup.created - topup.failed - topup.reversed - topup.succeeded - transfer.created - - transfer.failed - - transfer.paid - transfer.reversed - transfer.updated + - treasury.credit_reversal.created + - treasury.credit_reversal.posted + - treasury.debit_reversal.completed + - treasury.debit_reversal.created + - treasury.debit_reversal.initial_credit_granted + - treasury.financial_account.closed + - treasury.financial_account.created + - treasury.financial_account.features_status_updated + - treasury.inbound_transfer.canceled + - treasury.inbound_transfer.created + - treasury.inbound_transfer.failed + - treasury.inbound_transfer.succeeded + - treasury.outbound_payment.canceled + - treasury.outbound_payment.created + - treasury.outbound_payment.expected_arrival_date_updated + - treasury.outbound_payment.failed + - treasury.outbound_payment.posted + - treasury.outbound_payment.returned + - treasury.outbound_transfer.canceled + - treasury.outbound_transfer.created + - treasury.outbound_transfer.expected_arrival_date_updated + - treasury.outbound_transfer.failed + - treasury.outbound_transfer.posted + - treasury.outbound_transfer.returned + - treasury.received_credit.created + - treasury.received_credit.failed + - treasury.received_credit.succeeded + - treasury.received_debit.created type: string x-stripeBypassValidation: true type: array @@ -80120,4 +101329,4 @@ security: - basicAuth: [] - bearerAuth: [] servers: -- url: https://api.stripe.com/ \ No newline at end of file +- url: https://api.stripe.com/ From ad58a3481a84a9ffdf74e79bdcf1c73cfadfe947 Mon Sep 17 00:00:00 2001 From: Drew Powers Date: Mon, 3 Oct 2022 00:34:25 -0600 Subject: [PATCH 2/2] submit codecov report for main --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f02a8e18..6f56bfb67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,10 @@ name: ci on: - - pull_request + push: + branches: + - main + pull_request: jobs: lint: